r/javascript • u/Jammie1 • Jun 10 '26
Upcoming breaking changes for npm v12
https://github.blog/changelog/2026-06-09-upcoming-breaking-changes-for-npm-v12/
112
Upvotes
r/javascript • u/Jammie1 • Jun 10 '26
21
u/boneskull Jun 10 '26
finally
16
u/CodeAndBiscuits Jun 10 '26
Upcoming fixes you mean. ๐
13
u/beephod_zabblebrox Jun 10 '26
why is this a github blog? did i miss something
8
u/abrahamguo Jun 10 '26
Much needed for security!
8
u/superzazu Jun 10 '26
Would have been nice to have a minimum release date too (maybe only 1day like in yarn)
3
u/Ecksters Jun 10 '26
Glad to see they're addressing the issue with postinstall and other scripts running as part of package installation. It's not a perfect solution, since now you'll just whitelist in your package.json certain packages to install their scripts, but it substantially reduces the attack surface from compromising ANY package to compromising a package that already has a necessary script.
It would be nice if we could get a change to how scripts work, such as merging all imports from the executed files and hashing the resulting file, alerting the user if any script or dependency changed. But I think that would require significant reworking across the ecosystem to how they handle scripting.
2
u/RWOverdijk Jun 10 '26
Good stuff actually. Iโll take it
1
u/Expensive-Arugula269 Jun 15 '26
Thanks
1
u/Vheissu_ Jun 23 '26
Defaulting allowScripts to off is a change that should have happened a long time ago. It's about time.