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

Publish older versions without a tag #26

Merged
merged 2 commits into from
Dec 20, 2018
Merged

Conversation

watson
Copy link
Contributor

@watson watson commented Dec 17, 2018

No description provided.

@ljharb
Copy link
Contributor

ljharb commented Dec 17, 2018

This would be great; i currently use https://npmjs.com/safe-publish-latest to prevent accidentally publishing a backport as “latest”.

Even better (on top of this) would be if the tag could be overwritten in prepublish - then i could have a package that removed the “latest” tag when it was unsafe.

Copy link
Contributor

@zkat zkat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The team had a meeting and we're happy to say we've ratified this! Thanks for the RFC, and I look forward to having this. Since it's a breaking change, we won't be able to have it until npm@7, but it should be straightforward to implement and wait for the final thing 👍

@zkat zkat merged commit a6abd58 into npm:latest Dec 20, 2018
@evocateur
Copy link

In the meantime, a better way to mitigate this in long-lived maintenance branches is to immediately set publishConfig.tag in the package.json to an appropriate value. All future publishes from that branch will use that (non-"latest") value as the dist-tag, no flags necessary.

@ljharb
Copy link
Contributor

ljharb commented Dec 21, 2018

@evocateur that’s a great workaround, but it still ends up creating a tag that i have to remove after publishing.

@evocateur
Copy link

@ljharb Oh, fair enough. At least it wouldn't be "latest" by default in the scenario I described. Still doesn't avoid a tag altogether, you are correct.

@ljharb
Copy link
Contributor

ljharb commented Dec 21, 2018

@zkat couldn’t something like --no-tag be added as a semver-minor, and the breaking change later be making that the default?

@evocateur
Copy link

evocateur commented Dec 22, 2018 via email

@ljharb
Copy link
Contributor

ljharb commented Dec 22, 2018

Oh sure, maybe --without-tag then - bikeshed aside it seems totally doable as a semver-minor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants