When deciding whether to allow patch or minor level newer versions, it is important to note that old versions usually don't receive patches. Contract for Semantic Versioning in package.json. old functionality deprecated, but operational.You can allow a newer patch level version with tilde (~) and newer minor or patch level version with caret (^). Instead of specifying the exact version to be installed in package.json, npm allows you to widen the range of accepted versions.
When executing npm install on a fresh checkout without existing node_modules, npm downloads and installs a version that satisfies package.json for each dependency. Giving npm permission to install newer version The safest way is to check the module documentation. A module might use a three-part version number, but increment it as they like. Not every module follows Semantic Versioning. Fixing a bug that wasn't handling certain corner-case in _.find() would make the next release 3.9.3. A new optional argument to _.map would make the next release 3.10.0. Major backward incompatible change to, for example, how _.filter() works, would make the next release 4.0.0. Let's take lodash version 3.9.2 as a starting point.
simple bug fix to existing functionality increments the patch numberįor any dependency, the release 1.0.0 is considered the first stable release, and the semver contract does not apply to releases before it.new functionality that is backward compatible increments the minor number.backward-incompatible change increments the major number.The basic contract for the module maintainer making changes is Semantic Versioning uses three-part version number. Semver uses three-part version number like 3.9.2 and calls these three numbers from left to right as the major, minor and patch numbers. Semantic Versioning dictates what kind of changes cause the version number to be incremented. The prefix character (^) has to do with a version numbering scheme called Semantic Versioning or semver. You wouldn't like to add a dependency that might break the build for your whole team. You'd like to be clear on this one since it leaves you with that unpleasant feeling of uncertainty. You're guessing this is some sort of way to widen the range of accepted versions.