3 ms·
I've seen those characters in package.json but I never really bothered to look up how they worked, but now I will use them. Great article. I wonder though why t
by lemevi 11y ago
I've seen those characters in package.json but I never really bothered to look up how they worked, but now I will use them. Great article. I wonder though why they didn't go with using asterisk instead? Like say you used 1.. in package.json, now you'll get all updates up until 2.0.0 comes out.
- function_seven 11y ago> Like say you used 1.∗.∗ in package.json, now you'll get all updates up until 2.0.0 comes out. I think the caret and tilde indicate that the package must be at the given version or greater. Asterisks wouldn't allow you to specify a lower bound. (HN's comment system ate your asterisks. I don't know how to get around that, so I replaced them with U+2217 chars)
- bytearcher 11y agoIt's most likely due to backwards incompatibility. Major version update (1.x.x -> 2.0.0) breaks something and npm wants to play it safe, which is very understandable.