Install the pinned node when the installed one is another major version (closes #118)
check / check (push) Canceled after 0s
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 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
This commit was merged in pull request #127.
This commit is contained in:
1 parent
c55a0cb2f0
commit
f9e23ccae3
7 files changed
+146
-71
No files matched your search
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: New Repo Checklist
|
||||
last_modified: 2026-10-07
|
||||
last_modified: 2026-10-08
|
||||
---
|
||||
|
||||
Use this checklist when creating a new repository from scratch. Follow the steps
|
||||
@@ -136,8 +136,9 @@ are thin shims calling them. Model scripts:
|
||||
alpine images without bash
|
||||
- [ ] `script/bootstrap` / `make bootstrap` — installs all dependencies,
|
||||
idempotently, assuming nothing (pkg manager detection nix/apt/brew/apk;
|
||||
node used if present, else pinned version via nvm from a hash-verified
|
||||
archive; pinned yarn via corepack); a non-server repo's development
|
||||
node used if its major version is the pinned one, else pinned version via
|
||||
nvm from a hash-verified archive, with yarn and the packages installed
|
||||
under it; pinned yarn via corepack); a non-server repo's development
|
||||
environment stage runs it instead of inline installs; a gate phase or the
|
||||
build stage installs what its base image lacks either inline or by running
|
||||
it
|
||||
@@ -170,11 +171,13 @@ are thin shims calling them. Model scripts:
|
||||
on its own line before the build. The bootstrap is required: CI checks out
|
||||
and runs this alone, and `script/fmt-check` runs the formatter on the
|
||||
host.
|
||||
- [ ] `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` pick their `yarn` with the same test
|
||||
as `script/bootstrap`: the `yarn` on `PATH` when the node on `PATH` has
|
||||
the pinned major version, and otherwise yarn under the pinned node, with
|
||||
nvm loaded through `$HOME/.nvm/nvm.sh`. `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.
|
||||
- [ ] No `docker build` in `script/` leaves a dangling image behind:
|
||||
`script/lint` and `script/test` write no image, and `script/docker` and
|
||||
`script/cibuild` tag theirs
|
||||
@@ -189,10 +192,11 @@ are thin shims calling them. Model scripts:
|
||||
|
||||
- [ ] `make check` passes
|
||||
- [ ] `make docker` succeeds
|
||||
- [ ] `script/cibuild` succeeds in a fresh clone on a host carrying nothing but
|
||||
docker and git, with no node or yarn on `PATH`, which is what CI has, and
|
||||
demonstrably executed the checks — a sub-second build, or `CACHED` on a
|
||||
gate layer, means nothing ran
|
||||
- [ ] `script/cibuild` succeeds in a fresh clone on a host carrying what CI has
|
||||
(the runner image `docker.gitea.com/runner-images:ubuntu-latest`: docker,
|
||||
git and node 24, with no yarn on `PATH`), and demonstrably executed the
|
||||
checks — a sub-second build, or `CACHED` on a gate layer, means nothing
|
||||
ran
|
||||
- [ ] Plant a lint violation and confirm both `make lint` and a plain
|
||||
`docker build .` fail on it; revert. A plain build that passes proves the
|
||||
final stage is missing its `COPY --from=` edge to the gate phases.
|
||||
|
||||
Reference in new issue
Block a user