When consuming (or more importanty, maintaining) libraries it's critical to understand the Semver rules and how they are interpreted for your particular use case. ~1.2.3 will use releases from 1.2.3 to version ~version will update you to all future patch versions, without incrementing the minor version. When a semver version is used in a package.json file, it indicates how NPM (or Yarn) will apply updates to the project dependencies. Keep in mind that major, minor and patch version numbers are not base 10, so it's completely valid to have version number that look like:ĭon't expect that version 1.2.1 and 1.2.10 are equivalent! Package.json Where the -beta string may be anything useful. Betaįor pre-released software it may include a pre-release version indicator: Patch versions generally only include small bug fixes or performance improvements etc. Minor version changes should be backwartds compatible. Any existing functions should work as they did before, even if their internals have changed. Minor change versions can include new features or an expansion of functionality. If a feature is to be dropped or no longer supported, it should be a major version change. Major change versions may include breaking changes from a previous version. Semver is short for "Semantic Versioning", it is used as a versioning scheme for software projects.Īt it's most basic, it follows the following format: Before we get to the details of tilde and caret, we should at least cover the basics of Semver.
0 Comments
Leave a Reply. |