Replies: 1 comment 1 reply
-
|
Looks like this was implemented in 6.32.0! 🎉 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
In light of recent problems with npm packages that install malware via install scripts, I've been looking for a way to only run install scripts for packages I specifically trust. It looks like this isn't a feature pnpm currently supports.
One way to do this might be to set
ignore-scriptstotruein.npmrcand then manually runpnpm rebuild <package>every time a new version of a trusted package is installed, but this is cumbersome and won't scale well for a team of developers.pnpm does support a
pnpm.neverBuiltDependenciesfield inpackage.jsonthat acts as a blocklist, but this also isn't ideal because I want to block all packages from running scripts by default, and only allow a few that I trust to run scripts.It looks like Yarn 2 supports this through a combination of setting
enableScriptstofalseand setting a package-specific"built": trueoption independenciesMeta, although I haven't tried it and am not interested in switching to Yarn.I'd be thrilled if pnpm supported a
pnpm.onlyBuildDependenciesfield or something like the Yarn 2 approach viadependenciesMeta. Is this something other people would be interested in?Beta Was this translation helpful? Give feedback.
All reactions