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 29606eb
Show file tree
Hide file tree
Showing 5 changed files with 1,003 additions and 0 deletions.
25 changes: 25 additions & 0 deletions 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

# > project42@1.0.0 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 29606eb

Please sign in to comment.