4 ms·
Fun fact: installing some common starter packages will explode to install over a 1000 npm packages, each of them can inject malware, even if the package isn’t u
by tobyhinloopen 1y ago
Fun fact: installing some common starter packages will explode to install over a 1000 npm packages, each of them can inject malware, even if the package isn’t used, and you’ll never know.
Many packages will have over a 100 dependencies if you include the dev dependencies, so you can easily break a 1000.
- mouse_ 1y agoThat is a very fun fact.
- nailer 1y agoYes that is how dependencies work.
- poincaredisk 1y agoThe crazy part here is that in most other ecosystems 100 dependencies is "crazy high" territory, and in JS it's apparently "we're just getting started". It's known for its approach to micropackaging everything in a separate library.
- greatgib 1y agoThe crazy thing is more that multiple versions of the same package could be installed as dependencies of dependencies... They were thinking to be the cool kids supporting multiple versions and that the old way to do packaging, like debian and co that expects everyone to use the same version, was the old legacy fart way to do things. Just, developers before were engineers first and so designed things well especially to avoid this situation of dependency hell and supply chain injection. But the web dev crowd decided to do "better" and now to have old problems as new problems...
- nailer 1y agonpm design allows multiple versions of the same package if required, but deduplicates otherwise. It’s a smart design that more package managers should and will follow. Smart developers spend their time working on original code rather than rewriting the wheel.
- nailer 1y agoYes. It’s an engineering failure to have multiple copies of the same logic. That isn’t specific to JavaScript.
- tough 1y agodoes the postinstall script step has anything to do with this? i noticed bun doesn't run them by default unless you whitelist them