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

Use npm distribution tags for upcoming releases #1316

Closed
pschaub opened this issue Dec 20, 2023 · 2 comments
Closed

Use npm distribution tags for upcoming releases #1316

pschaub opened this issue Dec 20, 2023 · 2 comments
Labels
bug Something isn't working
Milestone

Comments

@pschaub
Copy link

pschaub commented Dec 20, 2023

Summary

I recently encountered some confusion with our project dependencies listed under npm outdated. The confusion stemmed from the inability to distinguish between stable and beta versions. To address this and improve clarity for developers, I propose the adoption of NPM distribution tags.

$ npm outdated
Package                           Current   Wanted        Latest 
oidc-client-ts                      2.4.0    2.4.0    3.0.0-rc.0

Proposal

Implement the use of npm distribution tags, specifically tags like "latest" for stable releases and "beta" or "next" for pre-release versions.

Why It's Needed

In enterprise environments, stability is paramount. Without clear distinction between stable and beta releases, there's a risk of inadvertently upgrading to a less stable version, potentially introducing bugs or compatibility issues.

Using npm distribution tags would ensure that commands like npm update or npm outdated reflect the intended usage of the package versions. Developers would easily identify the stability of each version and could avoid updating to a beta release in a production environment.

For more information on NPM distribution tags and their importance in release management, please refer to the official NPM documentation: Managing Package Distribution Tags.

Conclusion

Adopting this practice would greatly enhance the developer experience and maintain the integrity of stable projects.

@pamapa pamapa added the bug Something isn't working label Dec 21, 2023
@pamapa
Copy link
Member

pamapa commented Dec 21, 2023

Good point, i have now manually set the latest version. The correct solution is the fix the gitlab workflow action. Depending on the github "latest" flag it should propagate this to the npm reqistery. No idea yet how to achieve that, if somebody knows lets me know...

@pamapa
Copy link
Member

pamapa commented Dec 21, 2023

Probably something like https://github.com/orgs/community/discussions/26281#discussioncomment-3251177:

- if: "github.event.release.prerelease"
  run: npm publish --tag beta
- if: "!github.event.release.prerelease"
  run: npm publish --tag latest

@pamapa pamapa added this to the 3.0.0 milestone Dec 22, 2023
@pamapa pamapa closed this as completed in c701196 Dec 22, 2023
dbfr3qs pushed a commit to dbfr3qs/oidc-client-ts that referenced this issue Apr 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants