The website uses cookies. By using this site, you agree to our use of cookies as described in the Privacy Policy.
I Agree
blank_error__heading
blank_error__body
Text direction?

如何使用语义化版本

It's important to communicate the extent of changes in a new release of code, because sometimes updates can break code that a package needs (called dependencies).Semantic versioning (semver) is a standard that was designed to solve this problem.

Semver for Publishers

If a project is going to be shared with others, it should start at 1.0.0, (though some projects on npm don't follow this rule).

After this, changes should be handled as follows:

SemVerTable

Semver for Consumers

针对使用者的语义化版本

If you were starting with a package 1.0.4, this is how you would specify the ranges:

  • Patch releases: 1.0 or 1.0.x or ~1.0.4
  • Minor releases: 1 or 1.x or ^1.0.4
  • Major releases: * or x

Learn More

For more about using semantic versioning with package.json files, see Chapter 5.

For another way to label releases, learn about npm dist tags, and how they relate to semantic versioning.

Last modified February 24, 2020           Found a typo? Send a pull request!

Measure
Measure
Related Notes
Get a free MyMarkup account to save this article and view it later on any device.
Create account

End User License Agreement

Summary | 1 Annotation
语义化版本
2020/06/03 06:32