script/bootstrap uses the installed node only when its major version is the pinned one (22). Otherwise (node missing, or another major such as the CI runner image's node 24) it installs the pinned NODE_VERSION with nvm and installs yarn and the packages under it, so yarn 1.22.22 no longer prints DEP0169. Either way it prints the version of the node it uses. The Dockerfile stages keep the image's own node 22.
script/fmt and script/fmt-check carry bootstrap's node_is_pinned_major unchanged and pick their yarn by it: the yarn on PATH when the node on PATH is the pinned major, otherwise yarn under the pinned node, loading nvm through $HOME/.nvm/nvm.sh (which honours NVM_DIR). When that yarn or nvm is missing they print "no yarn; run script/bootstrap first" and exit 1, as on next.
REPO_POLICIES.md and both checklists describe this. The version-comparison rule in REPO_POLICIES.md names node as its exception, and the checklists' final script/cibuild check names what the CI runner image has: docker, git and node 24, no yarn.
On a host whose own node is another major, a developer's node 26 included, bootstrap installs node 22.17.0 under nvm and the fmt scripts use it.
Disclosures:
Judgement call: node is compared by major version only, because the node 22 alpine image is not the exact pin and nvm cannot install on alpine.
Judgement call: bootstrap tests for node with command -v rather than its missing helper, so the function reads the same in all three scripts.
Not tried on the Gitea runner itself.
Model: opus-5-5
Implements https://git.eeqj.de/sneak/prompts/issues/118.
`script/bootstrap` uses the installed node only when its major version is the pinned one (22). Otherwise (node missing, or another major such as the CI runner image's node 24) it installs the pinned `NODE_VERSION` with nvm and installs yarn and the packages under it, so yarn 1.22.22 no longer prints DEP0169. Either way it prints the version of the node it uses. The `Dockerfile` stages keep the image's own node 22.
`script/fmt` and `script/fmt-check` carry bootstrap's `node_is_pinned_major` unchanged and pick their yarn by it: the `yarn` on `PATH` when the node on `PATH` is the pinned major, otherwise yarn under the pinned node, loading nvm through `$HOME/.nvm/nvm.sh` (which honours `NVM_DIR`). When that yarn or nvm is missing they print "no yarn; run script/bootstrap first" and exit 1, as on `next`.
`REPO_POLICIES.md` and both checklists describe this. The version-comparison rule in `REPO_POLICIES.md` names node as its exception, and the checklists' final `script/cibuild` check names what the CI runner image has: docker, git and node 24, no yarn.
On a host whose own node is another major, a developer's node 26 included, bootstrap installs node 22.17.0 under nvm and the fmt scripts use it.
Disclosures:
- Judgement call: node is compared by major version only, because the node 22 alpine image is not the exact pin and nvm cannot install on alpine.
- Judgement call: bootstrap tests for node with `command -v` rather than its `missing` helper, so the function reads the same in all three scripts.
- Not tried on the Gitea runner itself.
Model: opus-5-5
script/fmt and script/fmt-check (lines 16-19) pick which yarn to run by checking whether $HOME/.nvm/versions/node/v22.17.0 exists. That is not the test script/bootstrap uses (the major version of the node on PATH), and it ignores NVM_DIR. As a result, script/fmt-check can fail straight after a successful script/bootstrap:
NVM_DIR set to another directory (nvm's own installer does this when XDG_CONFIG_HOME is set): nvm puts node 22.17.0 there and the check misses it. The script then stops with "no yarn", which worked before this change, or, if a yarn is on PATH, runs that yarn under the other node.
The node on PATH is another 22.x with its own yarn, and nvm also holds 22.17.0 without one: bootstrap uses the yarn on PATH, while script/fmt-check switches to nvm's 22.17.0 and exits 127.
Acceptable: the fmt scripts decide the same way bootstrap does, so the two never disagree. If the node on PATH is the pinned major, use the yarn on PATH; otherwise run yarn under the pinned node, loaded through $HOME/.nvm/nvm.sh (which honours NVM_DIR). REPO_POLICIES.md, both checklists and the PR body should describe that.
prompts/REPO_POLICIES.md, the rule that script/bootstrap installs a pinned tool by comparing versions (line 536 on): it still gives comparison "over the whole version token" as the canonical form, with no exception. The canonical script/bootstrap now compares only node's major version, and the reason is given only in the bootstrap paragraph near the top of the file, so anyone reading the rule will take the canonical script for a violation of it. Acceptable: keep the major-version comparison and add one sentence at that rule naming node as the exception and why (the node 22 alpine image in the Dockerfile stages is not the exact pin, and nvm cannot install a prebuilt node on alpine).
prompts/NEW_REPO_CHECKLIST.md line 194 and prompts/EXISTING_REPO_CHECKLIST.md line 210 still say CI has "no node or yarn on PATH". That contradicts the policy text this PR adds: the CI runner image ships node 24 (and no yarn). Acceptable: both items state what CI actually has, so the check they ask for covers the host this change was made for.
Model: opus-5-5
1. `script/fmt` and `script/fmt-check` (lines 16-19) pick which yarn to run by checking whether `$HOME/.nvm/versions/node/v22.17.0` exists. That is not the test `script/bootstrap` uses (the major version of the node on `PATH`), and it ignores `NVM_DIR`. As a result, `script/fmt-check` can fail straight after a successful `script/bootstrap`:
- `NVM_DIR` set to another directory (nvm's own installer does this when `XDG_CONFIG_HOME` is set): nvm puts node 22.17.0 there and the check misses it. The script then stops with "no yarn", which worked before this change, or, if a `yarn` is on `PATH`, runs that yarn under the other node.
- The node on `PATH` is another 22.x with its own yarn, and nvm also holds 22.17.0 without one: bootstrap uses the yarn on `PATH`, while `script/fmt-check` switches to nvm's 22.17.0 and exits 127.
Acceptable: the fmt scripts decide the same way bootstrap does, so the two never disagree. If the node on `PATH` is the pinned major, use the `yarn` on `PATH`; otherwise run yarn under the pinned node, loaded through `$HOME/.nvm/nvm.sh` (which honours `NVM_DIR`). `REPO_POLICIES.md`, both checklists and the PR body should describe that.
2. `prompts/REPO_POLICIES.md`, the rule that `script/bootstrap` installs a pinned tool by comparing versions (line 536 on): it still gives comparison "over the whole version token" as the canonical form, with no exception. The canonical `script/bootstrap` now compares only node's major version, and the reason is given only in the bootstrap paragraph near the top of the file, so anyone reading the rule will take the canonical script for a violation of it. Acceptable: keep the major-version comparison and add one sentence at that rule naming node as the exception and why (the node 22 alpine image in the `Dockerfile` stages is not the exact pin, and nvm cannot install a prebuilt node on alpine).
3. `prompts/NEW_REPO_CHECKLIST.md` line 194 and `prompts/EXISTING_REPO_CHECKLIST.md` line 210 still say CI has "no node or yarn on `PATH`". That contradicts the policy text this PR adds: the CI runner image ships node 24 (and no yarn). Acceptable: both items state what CI actually has, so the check they ask for covers the host this change was made for.
Model: opus-5-5
script/fmt and script/fmt-check now carry script/bootstrap's node_is_pinned_major unchanged and pick their yarn by it, loading nvm through $HOME/.nvm/nvm.sh; the check of nvm's version directory is gone.
Added the sentence naming node as the exception at the version-comparison rule in REPO_POLICIES.md.
Both checklists' final script/cibuild item now names the CI runner image and what it has: docker, git and node 24, no yarn.
The bootstrap paragraph in REPO_POLICIES.md, the checklists' fmt items, TODO.md, the commit message and the PR body now say the same.
Model: opus-5-5
Reworked per https://git.eeqj.de/sneak/prompts/pulls/127#issuecomment-132914:
1. `script/fmt` and `script/fmt-check` now carry `script/bootstrap`'s `node_is_pinned_major` unchanged and pick their yarn by it, loading nvm through `$HOME/.nvm/nvm.sh`; the check of nvm's version directory is gone.
2. Added the sentence naming node as the exception at the version-comparison rule in `REPO_POLICIES.md`.
3. Both checklists' final `script/cibuild` item now names the CI runner image and what it has: docker, git and node 24, no yarn.
The bootstrap paragraph in `REPO_POLICIES.md`, the checklists' fmt items, `TODO.md`, the commit message and the PR body now say the same.
Model: opus-5-5
script/bootstrap, ensure_node (line 119): it does not follow the version-comparison rule in prompts/REPO_POLICIES.md (line 536 on). That rule says a check prints the version on both success paths, and the exception sentence this PR adds (line 557) frees node only from the whole-token comparison. Yet bootstrap prints no node version when it keeps the installed node; it prints one only when nvm installs node. Acceptable: bootstrap prints the node version it uses on both paths, or the exception sentence also frees node from printing and says why.
script/fmt and script/fmt-check, run_yarn (line 25): if the node on PATH is the pinned major and no yarn is on PATH (a checkout not yet bootstrapped), they now stop with exec: yarn: not found and exit 127. On next they print "no yarn; run script/bootstrap first" and exit 1. Acceptable: in that case print the same message and exit 1, without changing which yarn is picked.
Model: opus-5-5
1. `script/bootstrap`, `ensure_node` (line 119): it does not follow the version-comparison rule in `prompts/REPO_POLICIES.md` (line 536 on). That rule says a check prints the version on both success paths, and the exception sentence this PR adds (line 557) frees node only from the whole-token comparison. Yet bootstrap prints no node version when it keeps the installed node; it prints one only when nvm installs node. Acceptable: bootstrap prints the node version it uses on both paths, or the exception sentence also frees node from printing and says why.
2. `script/fmt` and `script/fmt-check`, `run_yarn` (line 25): if the node on `PATH` is the pinned major and no `yarn` is on `PATH` (a checkout not yet bootstrapped), they now stop with `exec: yarn: not found` and exit 127. On `next` they print "no yarn; run script/bootstrap first" and exit 1. Acceptable: in that case print the same message and exit 1, without changing which yarn is picked.
Model: opus-5-5
script/bootstrap used whatever node was installed, so on the CI runner
image, which ships node 24, the pinned yarn 1.22.22 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. It prints the node
version it uses. 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 carry the same test to pick their yarn: the yarn on
PATH, or yarn under the pinned node loaded through nvm.
Model: opus-5-5
ensure_node now prints "bootstrap: using node" with the version on both paths: the installed node it keeps, and the one nvm installs.
run_yarn in script/fmt and script/fmt-check prints "no yarn; run script/bootstrap first" and exits 1 when the node on PATH is the pinned major and no yarn is on PATH; the yarn picked is otherwise unchanged.
Model: opus-5-5
Reworked per https://git.eeqj.de/sneak/prompts/pulls/127#issuecomment-132995:
1. `ensure_node` now prints "bootstrap: using node" with the version on both paths: the installed node it keeps, and the one nvm installs.
2. `run_yarn` in `script/fmt` and `script/fmt-check` prints "no yarn; run script/bootstrap first" and exits 1 when the node on `PATH` is the pinned major and no `yarn` is on `PATH`; the yarn picked is otherwise unchanged.
Model: opus-5-5
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Implements #118.
script/bootstrapuses the installed node only when its major version is the pinned one (22). Otherwise (node missing, or another major such as the CI runner image's node 24) it installs the pinnedNODE_VERSIONwith nvm and installs yarn and the packages under it, so yarn 1.22.22 no longer prints DEP0169. Either way it prints the version of the node it uses. TheDockerfilestages keep the image's own node 22.script/fmtandscript/fmt-checkcarry bootstrap'snode_is_pinned_majorunchanged and pick their yarn by it: theyarnonPATHwhen the node onPATHis the pinned major, otherwise yarn under the pinned node, loading nvm through$HOME/.nvm/nvm.sh(which honoursNVM_DIR). When that yarn or nvm is missing they print "no yarn; run script/bootstrap first" and exit 1, as onnext.REPO_POLICIES.mdand both checklists describe this. The version-comparison rule inREPO_POLICIES.mdnames node as its exception, and the checklists' finalscript/cibuildcheck names what the CI runner image has: docker, git and node 24, no yarn.On a host whose own node is another major, a developer's node 26 included, bootstrap installs node 22.17.0 under nvm and the fmt scripts use it.
Disclosures:
command -vrather than itsmissinghelper, so the function reads the same in all three scripts.Model: opus-5-5
script/fmtandscript/fmt-check(lines 16-19) pick which yarn to run by checking whether$HOME/.nvm/versions/node/v22.17.0exists. That is not the testscript/bootstrapuses (the major version of the node onPATH), and it ignoresNVM_DIR. As a result,script/fmt-checkcan fail straight after a successfulscript/bootstrap:NVM_DIRset to another directory (nvm's own installer does this whenXDG_CONFIG_HOMEis set): nvm puts node 22.17.0 there and the check misses it. The script then stops with "no yarn", which worked before this change, or, if ayarnis onPATH, runs that yarn under the other node.PATHis another 22.x with its own yarn, and nvm also holds 22.17.0 without one: bootstrap uses the yarn onPATH, whilescript/fmt-checkswitches to nvm's 22.17.0 and exits 127.Acceptable: the fmt scripts decide the same way bootstrap does, so the two never disagree. If the node on
PATHis the pinned major, use theyarnonPATH; otherwise run yarn under the pinned node, loaded through$HOME/.nvm/nvm.sh(which honoursNVM_DIR).REPO_POLICIES.md, both checklists and the PR body should describe that.prompts/REPO_POLICIES.md, the rule thatscript/bootstrapinstalls a pinned tool by comparing versions (line 536 on): it still gives comparison "over the whole version token" as the canonical form, with no exception. The canonicalscript/bootstrapnow compares only node's major version, and the reason is given only in the bootstrap paragraph near the top of the file, so anyone reading the rule will take the canonical script for a violation of it. Acceptable: keep the major-version comparison and add one sentence at that rule naming node as the exception and why (the node 22 alpine image in theDockerfilestages is not the exact pin, and nvm cannot install a prebuilt node on alpine).prompts/NEW_REPO_CHECKLIST.mdline 194 andprompts/EXISTING_REPO_CHECKLIST.mdline 210 still say CI has "no node or yarn onPATH". That contradicts the policy text this PR adds: the CI runner image ships node 24 (and no yarn). Acceptable: both items state what CI actually has, so the check they ask for covers the host this change was made for.Model: opus-5-5
42af5e06e1toc2c58ea349Reworked per #127 (comment):
script/fmtandscript/fmt-checknow carryscript/bootstrap'snode_is_pinned_majorunchanged and pick their yarn by it, loading nvm through$HOME/.nvm/nvm.sh; the check of nvm's version directory is gone.REPO_POLICIES.md.script/cibuilditem now names the CI runner image and what it has: docker, git and node 24, no yarn.The bootstrap paragraph in
REPO_POLICIES.md, the checklists' fmt items,TODO.md, the commit message and the PR body now say the same.Model: opus-5-5
script/bootstrap,ensure_node(line 119): it does not follow the version-comparison rule inprompts/REPO_POLICIES.md(line 536 on). That rule says a check prints the version on both success paths, and the exception sentence this PR adds (line 557) frees node only from the whole-token comparison. Yet bootstrap prints no node version when it keeps the installed node; it prints one only when nvm installs node. Acceptable: bootstrap prints the node version it uses on both paths, or the exception sentence also frees node from printing and says why.script/fmtandscript/fmt-check,run_yarn(line 25): if the node onPATHis the pinned major and noyarnis onPATH(a checkout not yet bootstrapped), they now stop withexec: yarn: not foundand exit 127. Onnextthey print "no yarn; run script/bootstrap first" and exit 1. Acceptable: in that case print the same message and exit 1, without changing which yarn is picked.Model: opus-5-5
c2c58ea349to22b2f19a4cReworked per #127 (comment):
ensure_nodenow prints "bootstrap: using node" with the version on both paths: the installed node it keeps, and the one nvm installs.run_yarninscript/fmtandscript/fmt-checkprints "no yarn; run script/bootstrap first" and exits 1 when the node onPATHis the pinned major and noyarnis onPATH; the yarn picked is otherwise unchanged.Model: opus-5-5
Review passed.
Model: opus-5-5