I've struggled a little with versioning in JSPM. It adheres to SemVer but does not support everything that NPM does. Here are the rules:
Installs only exactly the version given.
[email protected] => Only installs version 1.0.0 of angular
[email protected] => Only installs version 1.4.3 of angular
Installs the latest version that matches the given version range.
angular@0 => Installs the latest version of angular that is in the 0.x.y range
[email protected] => Installs the latest version of angular that is in the 1.2.y range
Installs anything that does not modify the left-most non-zero version digit. In other words it:
- allows minor and patch updates for versions >= 1.0.0
- patch updates to versions >= 0.1.0 AND < 1.0.0
- no updates to version <0.1.0
angular@^1.0.0 => installs the latest version that is < 2.0.0
angular@*0.7.0 => installs the latest version that is < 0.8.0
Allows patch level changes if a minor is specified. Allows minor level changes if it is not.
angular@~1 => installs the latest version in the 1.x.y range
angular@~1.4 => installs the latest version in the 1.4.y range
If you want to check if a range will allow a certain release, give this tool a spin: http://jubianchi.github.io/semver-check/.
Remember that JSPM only supports the ranges specified above.
So, caret ranges are pretty hard to work with for < 1.0.0 releases that update minor often. That combination means you have to manually update the minor in your range every time you want to update to a new minor version.
For example
angular@^0.3.0
will never update to version 0.4.0. So if this is your use case, a tilde range likeangular@~0
, or just a arbitrary range likeangular@0
is probably your best bet.