npm package not updating minor versions

Viewed 1743

I'm trying to figure out why rollup is not updating. in my package file I have:

"devDependencies": {
    "rollup": "^0.62.0",
}

Running npm outdated shows:

package       Current    Wanted    Latest
rollup        0.62.0     0.62.0    0.67.1

If the carat indicates that everything but major versions can be updated, and in this specific case the latest version is only a minor version, why wouldn't it update with npm update rollup?

I realise that the Wanted is preventing the update, but why?

1 Answers

From https://github.com/npm/node-semver#caret-ranges-123-025-004,

[Carets] Allows changes that do not modify the left-most non-zero digit in the [major, minor, patch] tuple. In other words, this allows patch and minor updates for versions 1.0.0 and above, patch updates for versions 0.X >=0.1.0, and no updates for versions 0.0.X.

If you know that you want the latest versions 0.67.1, you could specify your dependency as

"devDependencies": {
    "rollup": "0.x",
}
Related