[@types/chrome] stuck on exact patch because caret range is ^0.0.x
; consider moving to 0.x.y or 1.x to allow npm update
#73186
Replies: 2 comments 1 reply
-
Thanks for the discussion about "chrome", some useful links for everyone: Pinging the DT module owners: @matthewkimber, @otiai10, @sreimer15, @matcarlson, @ekinsol, @EchoAbstract, @spasma, @bdbai, @JasonXian, @userTim, @idan315, @nicolas377, @idosal, @fregante, @erwanjugand. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Hi, the package was recently updated to version |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I recently noticed that my project was stuck on @types/chrome@0.0.268 even after running
npm update
. Turned out the culprit is the package's 0.0.x version scheme.Per npm's semver rules, a caret on a pre-1.0.0 package cannot bump any leftmost non-zero component. See the node-semver docs: https://github.com/npm/node-semver#caret-ranges-123-025-004.
Because every release of @types/chrome is 0.0.*, the default range generated by
npm i -D @types/chrome
effectively pins users to the exact patch they installed the first time.npm outdated
shows a newer "Latest" (currently 0.0.329) but "Wanted" stays at the old patch, sonpm update
never moves forward.Suggestion: publish future releases as
0.<minor>.<patch>
(e.g.,0.1.0
,0.2.0
) or jump to1.x
.Beta Was this translation helpful? Give feedback.
All reactions