Upcoming breaking changes for NPM v12
- Security
- Open Source
- Developer Tools
- Programming
GitHub’s post lays out upcoming npm v12 breaking changes, with the headline item being that lifecycle scripts like postinstall will no longer run by default. Instead, packages have to be explicitly allowlisted. The post also frames this as a security move after years of supply-chain abuse through install scripts, which have been a known weak point in npm for roughly a decade.
If your team relies on npm packages with postinstall or other lifecycle scripts, audit that now and decide what should be allowlisted before v12 lands. More broadly, treat this as a reminder that package-manager hardening reduces one attack path, not the larger problem of trusting code that still runs at build time or runtime.
-
github.blog
- Discuss on HN