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

RFC: Publish set the tag accordingly to the semver version number #317

Closed
wants to merge 1 commit into from
Closed

RFC: Publish set the tag accordingly to the semver version number #317

wants to merge 1 commit into from

Conversation

theoludwig
Copy link

Currently : Versions numbers have no direct connection with dist-tags.
It should be possible to run npm publish without specifying the --tag argument, instead it will pick the tag based on the semver version number (inside package.json).

Examples of various versions values inside package.json

16.0.3 release the package attached to the latest tag
16.0.3-tagname.1 release the package attached to the tagname tag
16.0.3-beta.1 release the package attached to the beta tag

References

@ljharb
Copy link
Contributor

ljharb commented Feb 9, 2021

An alternative might be a new config value that opts in to this behavior, that then the project could put in its .npmrc - then there's no surprises for existing authors, but there's an ergonomic path to this behavior for those that know about it.

@darcyclarke darcyclarke added the Agenda will be discussed at the Open RFC call label Feb 10, 2021
@wesleytodd
Copy link

wesleytodd commented Feb 10, 2021

Just to document another thing I hope we could change related to dist-tags. If --save-exact was used when installing a dist-tag specifier, it would be great if that saved the exact value. So npm i --save-exact foo@next would result in "foo": "next" in the package.json.

Ended up discussing this on the call, and if we opt'd for a --save-spec that would work as well to avoid the breaking change.

@theoludwig theoludwig changed the title Publish set the tag accordingly to the semver version number RFC: Publish set the tag accordingly to the semver version number Feb 18, 2021
@darcyclarke darcyclarke removed the Agenda will be discussed at the Open RFC call label Feb 24, 2021
@theoludwig theoludwig closed this Jun 24, 2021
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