Skip to content

Commit 4f0dcdb

Browse files
committed
Support Node 22 and pnpm 10
1 parent 3897de3 commit 4f0dcdb

13 files changed

Lines changed: 165 additions & 34 deletions
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Toolchain compatibility
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: [master]
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
verify:
14+
name: Node ${{ matrix.node }} / pnpm ${{ matrix.pnpm }}
15+
runs-on: ubuntu-latest
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
include:
20+
- node: 22.22.2
21+
pnpm: 10.26.0
22+
- node: 24.18.0
23+
pnpm: 11.15.1
24+
steps:
25+
- uses: actions/checkout@v7
26+
- uses: pnpm/action-setup@v6
27+
with:
28+
version: ${{ matrix.pnpm }}
29+
run_install: false
30+
- uses: actions/setup-node@v7
31+
with:
32+
node-version: ${{ matrix.node }}
33+
cache: pnpm
34+
- run: pnpm --version
35+
- run: pnpm install --frozen-lockfile
36+
- run: pnpm check
37+
- run: pnpm build

AGENTS.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ When requirements conflict, follow `docs/PRD.md`, then document the conflict and
2424
- Do not add accounts, databases, analytics, audio, hosted application services, or a visual authoring system. A static GitHub Pages landing site is required.
2525
- Do not replace plain Markdown with MDX.
2626
- Do not add custom Markdown directives beyond `explorable` and `exercise`.
27-
- Preserve TypeScript 7, Node.js 24 LTS, and pnpm 11 unless a verified incompatibility requires an ADR.
27+
- Preserve TypeScript 7, the default Node.js 24 LTS/pnpm 11 toolchain, and the
28+
tested Node.js 22/pnpm 10 compatibility floor unless a verified
29+
incompatibility requires an ADR.
2830
- Keep course code out of the main runtime document context.
2931
- Keep Codex and Claude Code Desktop support as thin adapters over the same host-neutral course format.
3032
- Treat sandboxing, accessibility, validation, and clean-checkout reproducibility as required features.

CODEX_BUILD_PROMPT.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ The completed repository must let a learner:
7575
Follow these unless the PRD explicitly says otherwise:
7676

7777
- TypeScript 7.0
78-
- Node.js 24 LTS
79-
- pnpm 11
78+
- Node.js 24 LTS by default; support Node.js 22.22.2+ within the 22.x line
79+
- pnpm 11 by default; support pnpm 10.26.0+
8080
- Plain Markdown, not MDX
8181
- React for the runtime shell only
8282
- Vite for development and bundling

CONTRIBUTING.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ Thank you for improving `explorables`. By participating, follow the
55

66
## Local setup
77

8-
Use Node.js 24 LTS and pnpm 11:
8+
Use Node.js 22.22.2+ (22.x) or 24.15.0+ (24.x), with pnpm 10.26.0+ (10.x) or
9+
pnpm 11. Node.js 24 and pnpm 11 remain the default toolchain:
910

1011
```bash
1112
pnpm install --frozen-lockfile

README.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,13 @@ Install and launch explorables from https://github.com/Doppp/explorables.
3030
Create a new `explorables` folder in my Documents folder. If that folder
3131
already exists, do not overwrite it; ask me what to do. Clone the repository
3232
using HTTPS, read its `AGENTS.md`, and follow its instructions. Check for
33-
Node.js 24 and pnpm 11, but ask before installing or changing system software.
34-
Install the locked dependencies with `pnpm install --frozen-lockfile`, run
35-
`pnpm course`, and open the printed local course library. Help me choose a
36-
course, then read that course's `AGENTS.md` and follow its tutoring policy. Ask
37-
me to predict, let me attempt exercises, run tests, and give the smallest useful
38-
hint before showing more.
33+
Node.js 22.22.2 or newer in the 22.x line, or Node.js 24.15.0 or newer in the
34+
24.x line, and pnpm 10.26.0+ (10.x) or pnpm 11, but ask before installing or
35+
changing system software. Install the locked dependencies with
36+
`pnpm install --frozen-lockfile`, run `pnpm course`, and open the printed local
37+
course library. Help me choose a course, then read that course's `AGENTS.md` and
38+
follow its tutoring policy. Ask me to predict, let me attempt exercises, run
39+
tests, and give the smallest useful hint before showing more.
3940
```
4041

4142
Codex will ask for permission before running some commands or accessing a
@@ -50,7 +51,10 @@ server, or explorables account is required.
5051

5152
## Manual quick start
5253

53-
Requirements: Node.js 24 LTS and pnpm 11.
54+
Requirements: Node.js 22.22.2+ (22.x) or 24.15.0+ (24.x), and pnpm 10.26.0+
55+
(10.x) or pnpm 11.
56+
Node.js 24 with pnpm 11 remains the default development and deployment
57+
toolchain.
5458

5559
```bash
5660
git clone https://github.com/Doppp/explorables.git

docs/PRD.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1026,7 +1026,8 @@ Explorable dependencies are bundled before loading into the iframe. Runtime impo
10261026

10271027
## 11.4 Dependency security
10281028

1029-
The reference implementation uses pnpm 11 with a committed lockfile.
1029+
The reference implementation defaults to pnpm 11 with a committed lockfile and
1030+
maintains backward compatibility with pnpm 10.26.0 and newer 10.x releases.
10301031

10311032
Course dependencies must:
10321033

@@ -1213,8 +1214,8 @@ or hidden assessment data.
12131214
| Area | Choice |
12141215
|---|---|
12151216
| Language | TypeScript 7.0 |
1216-
| Runtime | Node.js 24 LTS |
1217-
| Package manager | pnpm 11 |
1217+
| Runtime | Node.js 24 LTS default; Node.js 22.22.2+ compatible |
1218+
| Package manager | pnpm 11 default; pnpm 10.26.0+ compatible |
12181219
| Monorepo | pnpm workspaces |
12191220
| Dev server and bundling | Vite |
12201221
| Runtime UI shell | React |
@@ -1269,7 +1270,10 @@ The project should not depend on custom TypeScript language-service plugins in v
12691270

12701271
## 14.4 Node.js policy
12711272

1272-
Use Node.js 24 LTS for production and CI.
1273+
Use Node.js 24 LTS as the default for production and deployment CI. Also test
1274+
and support Node.js 22 from 22.22.2 onward while that release line remains LTS.
1275+
The lower bound follows the strictest dependency in the committed lockfile;
1276+
older Node.js 22 releases are not supported.
12731277

12741278
A `.node-version` file should pin the supported major version:
12751279

@@ -1279,7 +1283,9 @@ A `.node-version` file should pin the supported major version:
12791283

12801284
## 14.5 Package manager policy
12811285

1282-
Use pnpm 11 because it provides:
1286+
Use pnpm 11 by default and keep the committed lockfile installable with pnpm
1287+
10.26.0 and newer 10.x releases. The pnpm 10 lower bound is the first release
1288+
with the workspace's `allowBuilds` setting. Both supported majors provide:
12831289

12841290
- Strong workspace support
12851291
- Reproducible lockfiles

docs/course-roadmap.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,8 +284,9 @@ versioned educational contract.
284284
prompt, text alternative, and primary-source references where applicable.
285285
- All required work runs locally without accounts, APIs, GPUs, or weight
286286
downloads.
287-
- Every course validates, tests, and builds from a clean checkout under Node 24
288-
and pnpm 11.
287+
- Every course validates, tests, and builds from a clean checkout under the
288+
default Node.js 24/pnpm 11 toolchain and the supported Node.js 22/pnpm 10
289+
compatibility floor.
289290
- Codex and Claude Code Desktop tutor every course through the same
290291
host-neutral format.
291292
- Learner evidence shows that transitions from foundation to shared core to a
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# ADR 0006: Node.js and pnpm backward compatibility
2+
3+
Status: accepted
4+
Date: 15 August 2026
5+
6+
## Context
7+
8+
The original implementation treated Node.js 24 and pnpm 11 as exclusive
9+
versions. That made the initial clean-checkout target unambiguous, but it also
10+
rejected maintained installations that the current toolchain can support.
11+
Node.js 22 remains an LTS release, and pnpm documents both majors 10 and 11 as
12+
compatible with Node.js 22 and 24.
13+
14+
The committed dependency graph prevents a broader Node.js claim. In
15+
particular, `jsdom@30.0.1` requires Node.js 22.22.2 or Node.js 24.15.0 at
16+
minimum. Node.js 20 is end-of-life and is not a support target. The pnpm 9.0
17+
lockfile format can be installed by pnpm 10 and 11.
18+
19+
## Decision
20+
21+
Keep Node.js 24 and pnpm 11 as the default development and GitHub Pages
22+
deployment toolchain. Support these additional backward-compatible boundaries:
23+
24+
- Node.js 22 from 22.22.2 through the end of the 22.x line;
25+
- pnpm 10.26.0 and newer 10.x releases, as well as pnpm 11.x. pnpm 10.26.0 is
26+
the first release with the workspace's `allowBuilds` setting.
27+
28+
The root `engines` field enforces those ranges. The former exact
29+
`packageManager` field is removed because pnpm uses it to download and execute
30+
pnpm 11 even when the user explicitly invokes pnpm 10; retaining it would make
31+
pnpm 10 support nominal rather than real. GitHub Actions continues to pin pnpm
32+
11.15.1 as the default. Compatibility CI installs the frozen lockfile and runs
33+
the full check and build suite at the oldest supported Node major/pnpm major
34+
pairing and the default pairing.
35+
36+
Support follows maintained Node.js LTS lines and is not extended to Node.js 20
37+
or odd-numbered, end-of-life releases. A dependency upgrade that raises the
38+
minimum patch version must update the engine range, CI matrix, documentation,
39+
and this decision's consequences together.
40+
41+
## Consequences
42+
43+
- Learners and contributors can use maintained Node.js 22 environments and
44+
pnpm 10 without bypassing engine checks.
45+
- Node.js 24/pnpm 11 remains the single default, avoiding ambiguous setup
46+
instructions and deployment drift.
47+
- Backward compatibility is an exercised contract rather than an untested
48+
semver declaration.
49+
- The supported Node.js 22 window ends when upstream Node.js support ends or a
50+
verified required dependency makes it infeasible; either change requires a
51+
new ADR.
52+
53+
## References
54+
55+
- https://nodejs.org/en/about/previous-releases
56+
- https://pnpm.io/installation#compatibility

docs/deployment.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,12 @@ deployment branch.
1212

1313
## GitHub Pages
1414

15-
`.github/workflows/pages.yml` installs the pinned Node 24 and pnpm 11 versions
16-
from the lockfile, validates and tests the repository, builds `apps/site`,
17-
uploads its static output, and deploys through the `github-pages` environment.
18-
It runs on pushes to `master` and manual dispatch.
15+
`.github/workflows/pages.yml` installs the default pinned Node 24 and pnpm 11
16+
versions from the lockfile, validates and tests the repository, builds
17+
`apps/site`, uploads its static output, and deploys through the `github-pages`
18+
environment. It runs on pushes to `master` and manual dispatch. A separate
19+
compatibility workflow verifies the same frozen lockfile under the supported
20+
Node.js 22/pnpm 10 and Node.js 24/pnpm 11 boundaries.
1921

2022
Repository Pages settings must use GitHub Actions as the build type. The REST
2123
equivalent after the workflow exists is:

docs/implementation-plan.md

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ is committed and pushed to `master` after its checks pass.
99
- Local-first course folders; no accounts, database, analytics, backend, audio,
1010
hosted execution, catalogue service, or LMS features.
1111
- Plain Markdown with only `explorable` and `exercise` directives.
12-
- Node.js 24 LTS, pnpm 11, TypeScript 7, React/Vite, unified/remark/rehype,
12+
- Node.js 24 LTS and pnpm 11 by default, with Node.js 22.22.2+ and pnpm 10.26.0+
13+
compatibility; TypeScript 7, React/Vite, unified/remark/rehype,
1314
Zod, Biome, Vitest, Playwright, and axe-core.
1415
- Course JavaScript runs only in sandboxed iframes with network access denied.
1516
- `AGENTS.md` is canonical; `CLAUDE.md` and `.claude/launch.json` are thin
@@ -99,7 +100,8 @@ Deliverables:
99100

100101
Final verification:
101102

102-
1. Install using the committed lockfile under Node 24 and pnpm 11.
103+
1. Install using the committed lockfile under the default Node 24/pnpm 11
104+
toolchain and the Node 22/pnpm 10 compatibility floor.
103105
2. Run formatting/lint, typecheck, unit, integration, browser, accessibility,
104106
validator, all-package build, site build/test, and both example validations.
105107
3. Scaffold and verify a course in a temporary directory.
@@ -161,5 +163,19 @@ Deliverables:
161163

162164
Exit check: collection and standalone validation/build pass; browser tests
163165
cover selection, planned states, deep links, guidance, sandboxing, narrow
164-
layout, and axe; the full repository check and build pass under Node 24 and
165-
pnpm 11.
166+
layout, and axe; the full repository check and build pass under the default
167+
Node 24/pnpm 11 toolchain and the Node 22/pnpm 10 compatibility floor.
168+
169+
## Milestone 9 — supported toolchain compatibility
170+
171+
Deliverables:
172+
173+
- Keep Node.js 24 and pnpm 11 as the default development and deployment
174+
toolchain.
175+
- Accept Node.js 22.22.2+ within the 22.x LTS line and pnpm 10.26.0+.
176+
- Verify frozen installs, checks, and builds at both compatibility boundaries in
177+
GitHub Actions.
178+
- Document the support window and dependency-derived minimum versions.
179+
180+
Exit check: the frozen lockfile installs and the full check/build suite passes
181+
under Node.js 22 with pnpm 10 and Node.js 24 with pnpm 11.

0 commit comments

Comments
 (0)