You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ yarn
$ yarn knip yarn run v1.22.19 $ /Users/krishna/Documents/hypotenuse/knip-workspace-bug/node_modules/.bin/knip Unused files (1) foo/lib.js error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
I would expect foo/lib.js to not be flagged as unused because it's imported & used in bar/index.js
Looked around at previous issues but I'm not sure any of them cover my exact problem. #140 (comment) seems to suggest that knip should be aware of imports across packages.
I'm using yarn v1.22.19 (classic) and set up the monorepo according to the classic instructions. To check if that might be the root cause I tried porting the repo over to modern yarn (v3.6.3): https://github.com/tasercake/knip-workspace-bug/tree/yarn-modern, but I get the same output from knip
The text was updated successfully, but these errors were encountered:
I have a monorepo with 2 packages
foo
andbar
.bar/index.js
imports fromfoo/lib.js
, but knip flagsfoo/lib.js
as unused.Repro: https://github.com/tasercake/knip-workspace-bug
I would expect
foo/lib.js
to not be flagged as unused because it's imported & used inbar/index.js
Looked around at previous issues but I'm not sure any of them cover my exact problem. #140 (comment) seems to suggest that knip should be aware of imports across packages.
I'm using yarn v1.22.19 (classic) and set up the monorepo according to the classic instructions. To check if that might be the root cause I tried porting the repo over to modern yarn (v3.6.3): https://github.com/tasercake/knip-workspace-bug/tree/yarn-modern, but I get the same output from knip
The text was updated successfully, but these errors were encountered: