A lot has happened in the last two minor releases of the npm cli that is important to know for people using it: v11.9 : allow-git flag v11.10: min-release-age 🧵
0 reposts1 like
A lot has happened in the last two minor releases of the npm cli that is important to know for people using it: v11.9 : allow-git flag v11.10: min-release-age 🧵
0 reposts1 like
npm v11.9 (shipped with the current lts version of node) introduced the allow-git flag that lets you block the installation of dependencies from git. This prevents an attack vector that allowed rce even with ignore-scripts present. Thanks to #koi.ai for there work www.koi.ai/blog/package...
npm v11.10 added the min-release-age config that allows you to delay the installation of newly released package versions. That was possibly with the —before flag but min-release-age lets you specify a relative number of days directly from your .npmrc (github.com/npm/cli/pull...)
You can use them by adding allow-git=none min-release-age=7 to your .npmrc. Look at the specifics of the configs in the docs: docs.npmjs.com/cli/v11/comm...