Open manchuck opened 1 week ago
I am opening this as an issue again because if this is intended, then it is poorly implemented. As a workaround for this, a user now has to run a bash script to publish packages when there is no change in the version number for one package in the monorepo:
for i in $(ls -d *) ─╯
(cd $i && npm publish)
I'm not sure how this is a breaking change for a fix. Even if this was some breaking change, the remedy is to just add a new flag that can adjust the behavior without changing how it works. Something like --ignore-publish-fail
Is there an existing issue for this?
This issue exists in the latest npm version
Current Behavior
When you run
npm publish -ws
, it will go through and publish all those packages. However, if one of those packages is not updated, the command will fail since NPM rejects publishing the same version.Expected Behavior
Running
npm publish -ws
will keep publishing the other packages even if one failsSteps To Reproduce
Create a workspace with three packages (A, B, C) Bump the versions for A and C Run
npm publish -ws
B will fail to publish and npm will not try to publish CEnvironment
//registry.npmjs.org/:_authToken = (protected) save-exact = true save-prefix = ""
; node bin location = /Users/manchuck/.nvm/versions/node/v22.9.0/bin/node ; node version = v22.9.0 ; npm local prefix = /Users/manchuck/Projects/vonage/node-sdk ; npm version = 10.8.3 ; cwd = /Users/manchuck/Projects/vonage/node-sdk/packages ; HOME = /Users/manchuck ; Run
npm config ls -l
to show all defaults.