Skip to content

Commit 3c43b5e

Browse files
CopilotCopilot
andauthored
feat: support Node 26 alongside Node 24 (#32)
## Why Replica's package manifests exclude Node 26 even though its JavaScript tooling can run on it. The locked Hub and test dependencies make Node 24.15.0 the lowest common supported version. ## What changes Allow `^24.15.0 || ^26.0.0` in Hub, Starter, the build action, and Learning, with matching lockfile metadata. Extend existing Node-dependent CI jobs with a Node 24 and 26 matrix instead of adding a separate compatibility workflow. Individual checks and frontend test sharding stay separate. Preserve existing Node 24 check names and add a `(Node 26)` suffix to the new matrix results. Existing result gates require both versions to pass. Container images and the composite action retain their Node 24 defaults; its smoke test runs only once because it pins that runtime and uploads a single named artifact. Update the existing workflow guards and contributor guidance to match. The matrix tracks each supported major rather than its exact minimum patch release. Exact Node 24.15.0 and 26.0.0 runtime behavior remains unverified. --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 6dbb612 commit 3c43b5e

16 files changed

Lines changed: 124 additions & 46 deletions

‎.github/workflows/actions-ci.yml‎

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,26 +13,32 @@ jobs:
1313
uses: ./.github/workflows/ci-changes.yml
1414

1515
test:
16-
name: Build action suite
16+
name: Build action suite${{ matrix.node == 26 && ' (Node 26)' || '' }}
1717
needs: changes
1818
if: ${{ needs.changes.outputs.build_action == 'true' }}
1919
runs-on: ubuntu-latest
20+
strategy:
21+
fail-fast: false
22+
matrix:
23+
node: [24, 26]
2024
steps:
2125
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
2226
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
2327
with:
24-
node-version: 24
28+
node-version: ${{ matrix.node }}
2529
cache: npm
2630
cache-dependency-path: actions/build/package-lock.json
27-
- run: npm ci --ignore-scripts
31+
- run: npm ci --ignore-scripts --engine-strict
2832
working-directory: actions/build
2933
- run: npm run lint
3034
working-directory: actions/build
3135
- run: actions/build/node_modules/.bin/playwright install --with-deps chromium
3236
- run: npm test --prefix actions/build
3337
- name: Prepare composite action fixture
38+
if: ${{ matrix.node == 24 }}
3439
run: cp actions/build/test/fixture/package.json actions/build/test/fixture/package-lock.json actions/build/test/fixture/fixture-build.mjs .
3540
- uses: ./actions/build
41+
if: ${{ matrix.node == 24 }}
3642

3743
result:
3844
name: Replica action tests

‎.github/workflows/hub-ci.yml‎

Lines changed: 48 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,14 @@ jobs:
1717
uses: ./.github/workflows/ci-changes.yml
1818

1919
rails_test:
20-
name: Rails tests
20+
name: Rails tests${{ matrix.node == 26 && ' (Node 26)' || '' }}
2121
needs: changes
2222
if: ${{ needs.changes.outputs.hub == 'true' }}
2323
runs-on: ubuntu-latest
24+
strategy:
25+
fail-fast: false
26+
matrix:
27+
node: [24, 26]
2428
steps:
2529
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
2630
- uses: ruby/setup-ruby@14594264cd68ce8a2345dd349bc3d138a4ef85c8 # v1.327.0
@@ -29,13 +33,13 @@ jobs:
2933
working-directory: hub
3034
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
3135
with:
32-
node-version-file: hub/package.json
36+
node-version: ${{ matrix.node }}
3337
cache: npm
3438
cache-dependency-path: |
3539
hub/package-lock.json
3640
actions/build/package-lock.json
37-
- run: npm ci
38-
- run: npm ci --ignore-scripts --omit=dev
41+
- run: npm ci --engine-strict
42+
- run: npm ci --ignore-scripts --omit=dev --engine-strict
3943
working-directory: actions/build
4044
- run: ../actions/build/node_modules/.bin/playwright install --with-deps chromium
4145
- run: bundle exec vite build
@@ -119,43 +123,52 @@ jobs:
119123
- run: bin/bundler-audit check --update
120124

121125
typecheck:
122-
name: TypeScript types
126+
name: TypeScript types${{ matrix.node == 26 && ' (Node 26)' || '' }}
123127
needs: changes
124128
if: ${{ needs.changes.outputs.hub == 'true' }}
125129
runs-on: ubuntu-latest
130+
strategy:
131+
fail-fast: false
132+
matrix:
133+
node: [24, 26]
126134
steps:
127135
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
128136
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
129137
with:
130-
node-version-file: hub/package.json
138+
node-version: ${{ matrix.node }}
131139
cache: npm
132140
cache-dependency-path: hub/package-lock.json
133-
- run: npm ci
141+
- run: npm ci --engine-strict
134142
- run: npm run typecheck
135143

136144
frontend_lint:
137-
name: Frontend lint
145+
name: Frontend lint${{ matrix.node == 26 && ' (Node 26)' || '' }}
138146
needs: changes
139147
if: ${{ needs.changes.outputs.hub == 'true' }}
140148
runs-on: ubuntu-latest
149+
strategy:
150+
fail-fast: false
151+
matrix:
152+
node: [24, 26]
141153
steps:
142154
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
143155
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
144156
with:
145-
node-version-file: hub/package.json
157+
node-version: ${{ matrix.node }}
146158
cache: npm
147159
cache-dependency-path: hub/package-lock.json
148-
- run: npm ci
160+
- run: npm ci --engine-strict
149161
- run: npm run lint
150162

151163
frontend_test_shard:
152-
name: Frontend tests shard ${{ matrix.shard }}/4
164+
name: Frontend tests shard ${{ matrix.shard }}/4${{ matrix.node == 26 && ' (Node 26)' || '' }}
153165
needs: changes
154166
if: ${{ always() }}
155167
runs-on: ubuntu-latest
156168
strategy:
157169
fail-fast: false
158170
matrix:
171+
node: [24, 26]
159172
shard: [1, 2, 3, 4]
160173
steps:
161174
- name: Require valid suite selection
@@ -174,28 +187,32 @@ jobs:
174187
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
175188
if: ${{ needs.changes.outputs.hub == 'true' }}
176189
with:
177-
node-version-file: hub/package.json
190+
node-version: ${{ matrix.node }}
178191
cache: npm
179192
cache-dependency-path: hub/package-lock.json
180-
- run: npm ci
193+
- run: npm ci --engine-strict
181194
if: ${{ needs.changes.outputs.hub == 'true' }}
182195
- run: npm test -- --shard=${{ matrix.shard }}/4
183196
if: ${{ needs.changes.outputs.hub == 'true' }}
184197

185198
frontend_integration_test:
186-
name: Controls and extension tests
199+
name: Controls and extension tests${{ matrix.node == 26 && ' (Node 26)' || '' }}
187200
needs: changes
188201
if: ${{ needs.changes.outputs.hub == 'true' }}
189202
runs-on: ubuntu-latest
203+
strategy:
204+
fail-fast: false
205+
matrix:
206+
node: [24, 26]
190207
steps:
191208
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
192209
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
193210
with:
194-
node-version-file: hub/package.json
211+
node-version: ${{ matrix.node }}
195212
cache: npm
196213
cache-dependency-path: hub/package-lock.json
197-
- run: npm ci
198-
- run: npm ci --ignore-scripts --omit=dev
214+
- run: npm ci --engine-strict
215+
- run: npm ci --ignore-scripts --omit=dev --engine-strict
199216
working-directory: actions/build
200217
- run: ../actions/build/node_modules/.bin/playwright install --with-deps chromium
201218
- run: npm run controls:test
@@ -227,35 +244,43 @@ jobs:
227244
esac
228245
229246
frontend_build:
230-
name: Frontend build
247+
name: Frontend build${{ matrix.node == 26 && ' (Node 26)' || '' }}
231248
needs: changes
232249
if: ${{ needs.changes.outputs.hub == 'true' }}
233250
runs-on: ubuntu-latest
251+
strategy:
252+
fail-fast: false
253+
matrix:
254+
node: [24, 26]
234255
steps:
235256
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
236257
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
237258
with:
238-
node-version-file: hub/package.json
259+
node-version: ${{ matrix.node }}
239260
cache: npm
240261
cache-dependency-path: hub/package-lock.json
241-
- run: npm ci
262+
- run: npm ci --engine-strict
242263
- run: npm run build
243264
- run: npm run controls:assets:check
244265
- run: npm run extension:assets:check
245266

246267
storybook_build:
247-
name: Storybook build
268+
name: Storybook build${{ matrix.node == 26 && ' (Node 26)' || '' }}
248269
needs: changes
249270
if: ${{ needs.changes.outputs.hub == 'true' }}
250271
runs-on: ubuntu-latest
272+
strategy:
273+
fail-fast: false
274+
matrix:
275+
node: [24, 26]
251276
steps:
252277
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
253278
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
254279
with:
255-
node-version-file: hub/package.json
280+
node-version: ${{ matrix.node }}
256281
cache: npm
257282
cache-dependency-path: hub/package-lock.json
258-
- run: npm ci
283+
- run: npm ci --engine-strict
259284
- run: npm run storybook:build
260285

261286
production_database:

‎.github/workflows/learning-ci.yml‎

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,23 @@ permissions:
1616

1717
jobs:
1818
test:
19-
name: Learning checks
19+
name: Learning checks${{ matrix.node == 26 && ' (Node 26)' || '' }}
2020
runs-on: ubuntu-latest
21+
strategy:
22+
fail-fast: false
23+
matrix:
24+
node: [24, 26]
2125
defaults:
2226
run:
2327
working-directory: packages/learning
2428
steps:
2529
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
2630
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
2731
with:
28-
node-version: 24
32+
node-version: ${{ matrix.node }}
2933
cache: npm
3034
cache-dependency-path: packages/learning/package-lock.json
31-
- run: npm ci --ignore-scripts
35+
- run: npm ci --ignore-scripts --engine-strict
3236
- run: npm run schema:check
3337
- run: npm test
3438
- run: npm run demo

‎.github/workflows/starter-ci.yml‎

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,23 @@ permissions:
2424

2525
jobs:
2626
test:
27-
name: Starter checks
27+
name: Starter checks${{ matrix.node == 26 && ' (Node 26)' || '' }}
2828
runs-on: ubuntu-latest
29+
strategy:
30+
fail-fast: false
31+
matrix:
32+
node: [24, 26]
2933
defaults:
3034
run:
3135
working-directory: starter
3236
steps:
3337
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
3438
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
3539
with:
36-
node-version: 24
40+
node-version: ${{ matrix.node }}
3741
cache: npm
3842
cache-dependency-path: starter/package-lock.json
39-
- run: npm ci
43+
- run: npm ci --engine-strict
4044
- run: npm run format:check
4145
- run: npm run typecheck
4246
- run: npm test

‎CONTRIBUTING.md‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ For improvements, explain the problem you want to solve and who would benefit. D
2525

2626
## Set up the development environment
2727

28+
Each Node.js project's `engines.node` declares its supported versions. The existing Hub, Starter, build-action, and Learning CI checks run on both supported Node majors. The devcontainer, production image, and composite build action retain their pinned runtime defaults; choosing another supported major locally does not change them.
29+
2830
### Replica Hub
2931

3032
Replica Hub uses a devcontainer so contributors run the same Ruby, Node, SQLite, GitHub CLI, and Chromium versions.
@@ -85,7 +87,7 @@ npm test
8587

8688
### Replica learning
8789

88-
The learning package requires Node.js 24, npm, and Git:
90+
The learning package requires npm, Git, and a Node.js version matching `engines.node` in [packages/learning/package.json](packages/learning/package.json):
8991

9092
```sh
9193
cd packages/learning

‎actions/build/package-lock.json‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎actions/build/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"private": true,
55
"type": "module",
66
"engines": {
7-
"node": "^24.0.0"
7+
"node": "^24.15.0 || ^26.0.0"
88
},
99
"scripts": {
1010
"lint": "eslint . && prettier --check .",

‎docs/testing-and-review.md‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,14 @@ The [shared selection workflow](../.github/workflows/ci-changes.yml) calls [the
5656
| Root contributor documents, shared and Hub guides, skills, and documentation assets | Neither |
5757
| Workflow changes, selector changes, and unclassified paths | Both |
5858

59-
The workflows preserve the existing required check names; skipping an entire workflow with a path filter could leave those checks pending. Static jobs use job-level conditions. The four required Vitest shard jobs always expand their matrix and validate selection, but skip checkout, setup, and tests when Hub is unaffected. The required `Frontend tests`, `Production image`, and `Replica action tests` result jobs accept omitted work only after successful selection explicitly excluded it. The production-image matrix checks AMD64 and ARM64 independently without cancelling the other architecture on failure. Selection failures, invalid outputs, and failures in selected suites fail those result checks. Keep required-check configuration unchanged.
59+
The workflows preserve the existing required check names; skipping an entire workflow with a path filter could leave those checks pending. Static jobs use job-level conditions. The Vitest shard jobs always expand their Node and shard matrix and validate selection, but skip checkout, setup, and tests when Hub is unaffected. The required `Frontend tests`, `Production image`, and `Replica action tests` result jobs accept omitted work only after successful selection explicitly excluded it. The frontend and build-action result jobs require every selected Node version to pass. The production-image matrix checks AMD64 and ARM64 independently without cancelling the other architecture on failure. Selection failures, invalid outputs, and failures in selected suites fail those result checks. Keep required-check configuration unchanged.
6060

6161
When adding a shared dependency or a new project, update the selector and its behavioral tests together. Unclassified paths deliberately run both suites until their dependencies are known. Run `node --test scripts/select-ci-suites.test.mjs` and `ruby scripts/check-ci-workflows.rb` from the repository root. The latter reads the actual workflow gates and checks their success, failure, cancellation, and missing-output behavior; both commands run before CI selects suites. Check changed workflows with `actionlint` when available. Actual job skipping and check reporting still need verification on GitHub after publishing.
6262

63+
Existing Node-dependent jobs in Hub, Starter, build-action, and Learning CI use a Node 24 and 26 matrix rather than a separate compatibility workflow. Each check keeps its existing name on Node 24 and adds a `(Node 26)` suffix on Node 26. A failure does not cancel the other version. npm installation enforces dependency engines, and `scripts/check-ci-workflows.rb` checks the supported ranges, matching lockfile metadata, and matrix wiring. These checks track the supported majors, not their exact minimum patch releases.
64+
65+
Ruby-only jobs, CI selection, and container builds retain their configured runtimes. The build-action suite tests its JavaScript and browser capture on both Node versions, but runs the composite-action smoke test only on Node 24: the composite action pins that runtime itself and uploads a single named artifact. Container and composite-action runtime defaults are unchanged.
66+
6367
## Update dependencies
6468

6569
Hub and the shared build action wait seven days before resolving newly published dependencies. npm enforces the delay through each project's committed `.npmrc`. Hub's RubyGems source in `Gemfile` applies the delay to Bundler. Dependabot applies the same cooldown to npm, Bundler, and GitHub Actions updates across the repository. The starter manages its dependency resolution independently.

‎hub/package-lock.json‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎hub/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"private": true,
55
"type": "module",
66
"engines": {
7-
"node": "^24.0.0"
7+
"node": "^24.15.0 || ^26.0.0"
88
},
99
"scripts": {
1010
"controls:build": "node script/build-controls-bridge.mjs",

0 commit comments

Comments
 (0)