-
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-pack --json emits prepare script commands, making json invalid #7354
Comments
It should be outputting on stderr in |
It's outputting on stdout... |
- no need for `fetch-depth: 0` when checking out git - fix GH_TOKEN for `gh` cli to use the built-in ${{ github.token }} - add `--silent` to `npm pack` to work around npm/cli#7354
@ljharb I'm seeing the same issue with See my temporary workaround here sindresorhus/np#743 |
But when eg. Solution for |
Makes sense. In the project I'm testing with, https://github.com/dexaai/dexter, it has a So it looks like this is possibly just a change in the way |
You should be able to set That's just a workaround though and this should get fixed in the next release. The fix will be to put all that output on stderr when in --json mode. |
I've made a PR to move npm's banners from From #7439 (comment):
|
Is there an existing issue for this?
This issue exists in the latest npm version
Current Behavior
npm pack --json
in the latest npm version (10.5.0) emits prepare script commands and thus making the output invalid json.This is a breaking change from previous npm version, which broke our deploy workflows.
Expected Behavior
npm pack --json
should always output valid json, as it was in the previous versions.Steps To Reproduce
Create a package which includes a prepare script.
Run
npm pack --json
Environment
; copy and paste output from `npm config ls` here
The text was updated successfully, but these errors were encountered: