-
Notifications
You must be signed in to change notification settings - Fork 313
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Skipping checks for Yarn / npm workspaces #1217
Comments
In addition to the general description in current and expected behavior, can you provide a concrete description of the particular current and expected behavior of one your test cases? Just to make sure I'm on the same page. Thanks! |
Done. Happy to provide more info if needed. |
Fixed and published in |
Thanks @raineorshine! f13fd29 makes sense and it should cover many cases. In the two monorepo I work in package names do not strictly match folder names so I still get warnings. Basically this line does not work for me: workspacePackages = workspacePackageFiles.map(file => file.split('/').slice(-2)[0]) What Examples:
|
Ah, I see. I hadn't thought of that. Should be fixed up and published in |
|
npm-check-updates
(16.3.18)node >= 14.14
👋 @raineorshine! When I run
ncu
in a monorepo with--workspaces
(or--deep
) option, I see warnings like this:When
ncu
scans workspacepackage.json
files, it does not distinguish between the references to third-party npm packages and local workspaces, which are sourced from the sibling folders. It’d be nice ifncu
skipped workspace references by default.Steps to Reproduce
You can try running
ncu --workspaces
in one of monorepo examples: https://github.com/vercel/turbo/tree/main/examples. Alternatively, you can clone https://github.com/blockprotocol/blockprotocol and runncu
from the root.You can also use this MWE:
Current Behavior
References to other workspaces are checked.
In the MWE:
Expected Behavior
References to other workspaces are ignored.
In the MWE:
Additional thoughts
I think it’s fine to keep the current behavior when running
ncu --deep
because in this case we are not necessarily runningncu
in a monorepo. I can also imagine some option that distinguishes between links to workspaces with"prviate": true
and those that actually get published, but I struggle to come up with an example where different behaviour would be needed. Just passing the full list of workspaces to the ignore list should be a good start IMHO.The text was updated successfully, but these errors were encountered: