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] Changing version in prepublishOnly-Script has incorrect output #2756

Open
jeffrson opened this issue Feb 22, 2021 · 0 comments
Open

[BUG] Changing version in prepublishOnly-Script has incorrect output #2756

jeffrson opened this issue Feb 22, 2021 · 0 comments
Labels
Bug thing that needs fixing Priority 2 secondary priority issue Release 7.x work is associated with a specific npm 7 release

Comments

@jeffrson
Copy link

jeffrson commented Feb 22, 2021

Current Behavior:

I have a prepublishOnly script like "npm version patch". However, npm tries to publish with previous version.

Expected Behavior:

Version of published package should be incremented (like it was for npm@6)

Steps To Reproduce:

Yeah, put a "prepublishOnly" script into package.json:

scripts: {
...
"prepublishOnly": "npm version patch",
...
}

Environment:

  • npm: 7.5.5

Two notes:

  • as mentioned above, with npm@6 this worked fine
  • although the package would be published with the old version number, a git tag of the new one is commit'ed - which is a mess, of course

Edit: hmmm, when I tested with verdaccio, it seems the upload is right - it's only the output (version and tgz name) - nevertheless, that's still a mess ;-)

@jeffrson jeffrson added Bug thing that needs fixing Needs Triage needs review for next steps Release 7.x work is associated with a specific npm 7 release labels Feb 22, 2021
@jeffrson jeffrson changed the title Changing version in prepublishOnly-Script is not respected [BUG] Changing version in prepublishOnly-Script is not respected Feb 22, 2021
@wraithgar wraithgar added Priority 2 secondary priority issue and removed Needs Triage needs review for next steps labels Mar 26, 2021
@wraithgar wraithgar changed the title [BUG] Changing version in prepublishOnly-Script is not respected [BUG] Changing version in prepublishOnly-Script has incorrect output Mar 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug thing that needs fixing Priority 2 secondary priority issue Release 7.x work is associated with a specific npm 7 release
Projects
None yet
Development

No branches or pull requests

2 participants