Install the pinned node when the installed one is another major version (closes #118)
check / check (push) Canceled after 0s

script/bootstrap used whatever node was installed, so on the CI runner
image, which ships node 24, the pinned yarn 1.22.22 ran under node 24
and printed the deprecation warning DEP0169 on every bootstrap. It now
uses the installed node only when its major version is the pinned one,
and otherwise installs the pinned node with nvm, as it already did when
node was missing, with yarn and the packages under it. Only the major is
compared because the Dockerfile stages use a node 22 alpine image that
nvm cannot replace. script/fmt and script/fmt-check run yarn under nvm's
pinned node when nvm has it installed, and otherwise the yarn on PATH.

Model: opus-5-5
This commit is contained in:
2026-10-08 00:33:44 +00:00
parent c55a0cb2f0
commit 42af5e06e1
7 changed files with 103 additions and 69 deletions
+6 -6
View File
@@ -1,6 +1,6 @@
---
title: Existing Repo Checklist
last_modified: 2026-10-07
last_modified: 2026-10-08
---
Use this checklist when beginning work in a repo that may not yet conform to our
@@ -149,11 +149,11 @@ with your task.
the image with `--no-cache`. Without the bootstrap the CI run dies in
`script/fmt-check`, which runs the formatter on the host and finds nothing
installed.
- [ ] `script/fmt` and `script/fmt-check` source nvm for the pinned node version
before invoking `yarn`, as `script/bootstrap`'s own install step does.
`script/bootstrap` leaves the node and yarn it installs off the `PATH` of
the shell that called it, so a bare `yarn` exits 127 on a runner carrying
nothing but docker and git.
- [ ] `script/fmt` and `script/fmt-check` run `yarn` under nvm's pinned node
when nvm has that version installed, and otherwise the `yarn` on `PATH`.
`script/bootstrap` leaves the node and yarn it installs under nvm off the
`PATH` of the shell that called it, so a bare `yarn` exits 127 on a runner
carrying nothing but docker and git, or runs under another node.
- [ ] `script/bootstrap` installs no linter of its own — delete the block, its
version variables and its call site. A JS repo's `yarn install` stays; it
brings a linter along with every other dependency, and no verdict is taken