Skip to content

Commit

Permalink
reproduces webpro-nl/knip#678
Browse files Browse the repository at this point in the history
  • Loading branch information
DaAitch committed Jun 16, 2024
0 parents commit 09068a2
Show file tree
Hide file tree
Showing 5 changed files with 1,003 additions and 0 deletions.
25 changes: 25 additions & 0 deletions Users/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# README

- Subject [knip issue-678](https://github.com/webpro-nl/knip/issues/678)
- the deep file structure should simulate a project path, which contains `builds`


## Reproducer

The repository presents a correct JS repository, which uses the dependency `chalk`.

```bash
cd knipuser/cicd/builds/project42
npm ci
npm run knip

# > [email protected] knip
# > knip

# Unused devDependencies (1)
# chalk package.json
```

The result is wrong. `chalk` is used. See analysis [in the issue](https://github.com/webpro-nl/knip/issues/678).

Check `npm run knip -- --debug` to see that `src/index.mjs` is not matching, although entrypoint and it exists.
5 changes: 5 additions & 0 deletions Users/knipuser/cicd/builds/project42/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/node_modules

# this rule matches outside
# you can see `Users/knipuser/cicd/builds` is not being git-ignored.
builds/
Loading

0 comments on commit 09068a2

Please sign in to comment.