2 ms·
One feature I've wanted for some time now is the ability to say "give me all the latest versions that are at least N days old" when you run npm install without
by hn_throwaway_99 5y ago
One feature I've wanted for some time now is the ability to say "give me all the latest versions that are at least N days old" when you run npm install without a lockfile or npm update.
The idea being "I want the latest version, but not the absolute bleeding edge, I want something that has at least baked for a bit".
- umvi 5y agoHow do you tell your "baked" version is any good though? Doesn't that mean N days after colors.js ground zero you'll start picking up the bad colors.js since it's now baked for N days?
- zwily 5y agoYes, but presumably it would have been discovered by then.
- hn_throwaway_99 5y agoThe "bad" colors.js existed for less than 24 hours before it was removed by NPM. Similarly the other recent malicious packages were detected and removed quickly. The idea is that for maliciously published packages like this (both deliberately in this case, and also when the maintainer's account is hacked) that not all packages that depend on this dependency will need the same length of N. Some users will want to pick it up right away, but some very conservative applications may want N to be much longer. It's basically the idea that alpha/beta users can be the canaries, but those who don't want to take any risk can hold back. Right now, unless you've got a lock file, essentially everyone is pulling the latest released version whether they want to be conservative or not.
- umvi 5y agoAh, that was the piece I was missing. Basically we are relying on NPM to curate/remove obvious bad packages from the global registry within some timeframe (say, 3 days) and by lagging behind by 3 days you'll never pick up an obvious bad package.
- xconverge 5y agoSeems like you would also want "and there isnt a release 2 days after it" fixing a regression. Starts to get tough :/