Skip to content
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] the output of the publish and postpublished are mixed up #4861

Open
2 tasks done
pygy opened this issue May 5, 2022 · 0 comments
Open
2 tasks done

[BUG] the output of the publish and postpublished are mixed up #4861

pygy opened this issue May 5, 2022 · 0 comments
Labels
Bug thing that needs fixing Needs Triage needs review for next steps Release 8.x work is associated with a specific npm 8 release

Comments

@pygy
Copy link

pygy commented May 5, 2022

Is there an existing issue for this?

  • I have searched the existing issues

This issue exists in the latest npm version

  • I am using the latest npm

Current Behavior

The upload bar of the publish script keeps being updated while the postpublish scripts are running, resulting in garbled output:

Here's a sample starting with four lines of adequate output then the rest where the progress bar is mixed with the postpublish output:

npm notice total files:   19
npm notice
npm notice Publishing to https://registry.npmjs.org/
(⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂) ⠼ : notice Publishing to https://registry.npmjs.org/
> [email protected] postpublish
> node ./scripts/postpublish.js && npm install && gosub test

(node:82564) ExperimentalWarning: Importing JSON modules is an experimental feature. This feature could change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
$ git tag v0.6.13
$ git push --tags

[... snip ...]

found 0 vulnerabilities
(⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂) ⠴ : notice Publishing to https://registry.npmjs.org/
> [email protected] test
> gosub build-regexp && ospec

(⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂) ⠴ : notice Publishing to https://registry.npmjs.org/
> [email protected] build-regexp
> node scripts/build-regexp.js

––––––⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂) ⠴ : notice Publishing to https://registry.npmjs.org/
All 714 assertions passed (old style total: 714)
+ [email protected]
pygy@Albert2 compose-regexp.js %

Expected Behavior

postpublish should start when publish is done.

Steps To Reproduce

Create a package with a postinstall script that prints to stdout, run npm publish.

Environment

  • npm: v8.9.0
  • Node.js: v17.8.0
  • OS Name: MacOS
  • System Model Name: MacBook Air
  • npm config:
; "user" config from /Users/pygy/.npmrc

//registry.npmjs.org/:_authToken = (protected)

; node bin location = /usr/local/bin/node
; node version = v17.8.0
; npm local prefix = /Users/pygy/dev/compose-regexp.js
; npm version = 8.9.0
; cwd = /Users/pygy/dev/compose-regexp.js
; HOME = /Users/pygy
; Run `npm config ls -l` to show all defaults.```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug thing that needs fixing Needs Triage needs review for next steps Release 8.x work is associated with a specific npm 8 release
Projects
None yet
Development

No branches or pull requests

1 participant