-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
[BUG] npm view --json command returns not only JSON if failed #5444
Comments
Can you try with npm v8.18? |
of course . Result is same. Actually I thought - it looks like the issue is in |
@ThePlenkov Thanks for the report. I'm tracking a few issues with Is it ok to recharacterize this issue as only to do with the json payload? I would expect |
@lukekarrys I totally agree. If |
Fixes: #5444 This PR will continue running through all workspaces for `npm view` even when a workspace encounters an `E404` error. This usually happens when you run `npm view -ws` but have private workspaces. A future iteration could log a different message if an `E404` is encountered on a private workspace, but for this PR I wanted to keep it generic since there are a number of reasons a request for a package manifest could 404.
Is there an existing issue for this?
This issue exists in the latest npm version
Current Behavior
Use case
I have a monorepo with workspaces. Each workspace gets published to a separate package. In CI pipeline I want to check whether is module needs to be published or no. So to make a central decision which packages I need to publish I would love to know what are the most recent published versions. So what I do I run such a command
npm view -ws --json
to have a common list of published packages. In case if I add one more package which is not yet published - I get an errornpm ERR! 404 Not Found
Expected Behavior
For a single request it makes sense - for a bulk mode - I would prefer to have this error as a part of json payload.
It's ok to have an additional flag to indicate that behavior.
Do you think is possible?
Thank you!
Steps To Reproduce
npm view -ws --json
Environment
The text was updated successfully, but these errors were encountered: