Require npm 12 - #3352
Conversation
Most importantly, this makes allowScripts default to off. npm@12 also requires node 22.22.2 or greater, so we just bump the specificity a bit. Technically >=22.22.2 is less strict than npm's real engine requirements, since it has a minimum version for 24 as well, but we assume usage of node 22 in general. This also took a little extra footwork for the flake since no package currently offers npm 12, so we have to install it directly.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
4339f7a to
a1e7b58
Compare
|
Draftifying while I toy around with it |
Details in the action itself.
| runs: | ||
| using: composite | ||
| steps: | ||
| - uses: actions/setup-node@v6 |
There was a problem hiding this comment.
setup-node is apparently on v7 now
There was a problem hiding this comment.
i'm neutral on bumping. the changelog doesn't have any features that would affect what we're doing
|
So: the install works, and the caching works. If we want to do this "everywhere" (and anywhere we want to enforce usage of npm@12, we would need this action), we need to do this same kind of change. The options I can think of:
Of course, we could blend 4 with any of the other options. |
|
It's maybe 5 repos. docs, oxide-computer, rfd-site, careers, one or two more. Not a huge deal? I feel like making the standalone action repo is overkill if they're probably going to fix this in setup-node soon regardless. |
|
Ok, it doesn't look like they're going to fix that issue and it doesn't look like a Node version will ship with npm 12 as its default until 27, and we usually stick to LTSs, so I think I'm sold on the shared action in a repo. |
Even for our own repos, it's probably best to pin to a tag or commit for actions. And to specify on the defaults, but if we pin a commit that works with our defaults, that's just fine!
|
oxidecomputer/actions#6 makes it use the engines field in the Edit: cool, it works
|
oxidecomputer/console@ab7faf6...46f3fd8 * [46f3fd84](oxidecomputer/console@46f3fd84) oxidecomputer/console#3352 * [a6b03812](oxidecomputer/console@a6b03812) oxidecomputer/console#3357 * [b402ebbd](oxidecomputer/console@b402ebbd) oxidecomputer/console#3319 * [b9cea7ea](oxidecomputer/console@b9cea7ea) oxidecomputer/console#3346 * [44646771](oxidecomputer/console@44646771) oxidecomputer/console#3345 * [9e4d3206](oxidecomputer/console@9e4d3206) oxidecomputer/console#3356 * [12edea0f](oxidecomputer/console@12edea0f) oxidecomputer/console#3355 * [21d7c52d](oxidecomputer/console@21d7c52d) oxidecomputer/console#3330 * [dd44146d](oxidecomputer/console@dd44146d) oxidecomputer/console#3353 * [d44615bc](oxidecomputer/console@d44615bc) oxidecomputer/console#3350 * [4f92755b](oxidecomputer/console@4f92755b) oxidecomputer/console#3337 * [b2c28c7d](oxidecomputer/console@b2c28c7d) oxidecomputer/console#3344 * [950767c0](oxidecomputer/console@950767c0) oxidecomputer/console#3343 * [7cd18ad2](oxidecomputer/console@7cd18ad2) oxidecomputer/console#3342 * [5e1f7673](oxidecomputer/console@5e1f7673) oxidecomputer/console#3336 * [37d98e31](oxidecomputer/console@37d98e31) oxidecomputer/console#3332 * [a842fbe7](oxidecomputer/console@a842fbe7) oxidecomputer/console#3335 * [218f3c0f](oxidecomputer/console@218f3c0f) oxidecomputer/console#3334 * [ff240db0](oxidecomputer/console@ff240db0) oxidecomputer/console#3333 * [dfa45c53](oxidecomputer/console@dfa45c53) oxidecomputer/console#3331

Most importantly, this makes allowScripts default to off. npm@12 also requires node 22.22.2 or greater, so we just bump the specificity a bit. Technically >=22.22.2 is less strict than npm's real engine requirements, since it has a minimum version for 24 as well, but we assume usage of node 22 in general.
This also took a little extra footwork for the flake since no package currently offers npm 12, so we have to install it directly.