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

[FEATURE] publish should have option to silence errors about already published versions #1559

Closed
cinderblock opened this issue Jul 23, 2020 · 1 comment
Labels
Enhancement new feature or improvement Release 6.x work is associated with a specific npm 6 release

Comments

@cinderblock
Copy link
Contributor

What

Scripts that use npm publish should be able to exit with a success code if the version is already published.

Why

I've been using a CI script to build and publish a package to npm. I currently just always try to publish and just accept the error if the current version has already been published.

I'd like to be able to tell Npm: "Don't worry if I've already published this version. I just want to make sure all the other steps leading up to the publish are working as expected."

Note, this is not the same as a --dry-run. In the cases where I bump my package.json#version, I want a new version to be published.

Suggestion

A new flag for npm publish, maybe "--republish-ok" that makes npm publish exit without an error code when the package already exists in the target repository.

Related

A alternate, and possibly complimentary, flag would be to ask Npm to compare the two packs. If they don't match, then throw an exit code. Maybe it can be called "--verify-existing".

@darcyclarke darcyclarke added Enhancement new feature or improvement Release 6.x work is associated with a specific npm 6 release labels Oct 30, 2020
@darcyclarke
Copy link
Contributor

npm v6 is no longer in active development; We will continue to push security releases to v6 at our team's discretion as-per our Support Policy.

If your bug is preproducible on v7, please re-file this issue using our new issue template.

If your issue was a feature request, please consider opening a new RRFC or RFC. If your issue was a question or other idea that was not CLI-specific, consider opening a discussion on our feedback repo

Closing: This is an automated message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement new feature or improvement Release 6.x work is associated with a specific npm 6 release
Projects
None yet
Development

No branches or pull requests

2 participants