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

Small heads up about semver note in the changelog :) #2722

Closed
lydell opened this issue Dec 7, 2022 · 1 comment
Closed

Small heads up about semver note in the changelog :) #2722

lydell opened this issue Dec 7, 2022 · 1 comment

Comments

@lydell
Copy link

lydell commented Dec 7, 2022

Reading through https://github.com/evanw/esbuild/releases/tag/v0.16.0 I saw this:

To avoid automatically picking up releases like this, you should either be pinning the exact version of esbuild in your package.json file (recommended) or be using a version range syntax that only accepts patch upgrades such as ~0.15.0.

The default in npm is caret (^) ranges. I’m not a native English speaker, but I kind of got the impression that I “should” be using a non-default range to be safe.

You probably know this, but the default caret ranges are safe too. For example, ^0.15.0 only matches 0.15.x not 0.16.x. You can try it here: https://semver.npmjs.com/

It’s also explained in the npm docs you link to (https://docs.npmjs.com/cli/v6/using-npm/semver), so astute readers could figure this out themselves too. The thing is that the caret ranges work differently for 0.x.

Maybe it’s worth mentioning that ^0.15.0 is an ok range too in the changelog to spare people not super into the details of npm some docs reading time.

Make what you will of this, and thanks for creating esbuild!

@evanw
Copy link
Owner

evanw commented Dec 8, 2022

Sure, I can mention that in the release notes for the next minor release. I'll edit the release notes for 0.16.0 so I don't forget.

@evanw evanw closed this as completed in c189b30 Dec 8, 2022
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

No branches or pull requests

2 participants