Skip to content

Commit ceaa432

Browse files
Further fixes for selected Node.js versions and related CI errors (#3265)
## Summary - The project's `engines` field was recently downgraded from Node 22 back to `>=20.18.3` (PR #3260), but CI workflows were left on Node 22 (or 23). - The `Refresh WordPress Major&Beta` and `Refresh SQLite plugin` workflows were on Node 23 which is outside `@jest/diff-sequences@30.0.1`'s supported range, causing `npm ci` to fail with `EBADENGINE`. See [failing run](https://github.com/WordPress/wordpress-playground/actions/runs/21956463286). - Switches all workflows to Node 20 (the `prepare-playground` default) unless they specifically need a later version: - **Keep Node 22**: `test-playground-cli`, `test-built-npm-packages`, `test-running-unbuilt-playground-cli` (need `--experimental-strip-types`) - **Keep Node 24**: `test-unit-jspi`, `test-redis-extension`, `test-memcached-extension` (need JSPI) - **Downgraded to 20**: `test-unit-asyncify`, `build`, `test-php-wasm-cli-smoke`, `refresh-wordpress-major-and-beta`, `refresh-sqlite-integration`, `refresh-wordpress-nightly`, `publish-npm-packages` - Aligns `engines` field (`node >=20.10.0`, `npm >=10.2.3`) across all packages with [wordpress-develop](https://github.com/WordPress/wordpress-develop/blob/trunk/package.json) to match WordPress core requirements - Updates `.nvmrc` from `v20.18.3` to `20` (major version only) - Adds a CI check (`tools/check-node-engine-alignment.sh`) to the `lint-and-typecheck` job that fetches WordPress Core's `engines.node` and `engines.npm` from `wordpress-develop/trunk/package.json` and verifies all local package.json files declare the same values, preventing future drift ## Test plan - [x] CI passes on this PR - [ ] Verify scheduled workflows (`Refresh WordPress Major&Beta`, `Refresh SQLite plugin`, `Refresh WordPress Nightly`) pass after merge Note: This PR was created with the assistance of Claude Code.
1 parent 7a24787 commit ceaa432

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+224
-144
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ jobs:
2525
- run: npx nx affected --target=lint
2626
- run: npx nx affected --target=typecheck
2727
- run: npx nx check-orphan-pages docs-site
28+
- run: bash tools/check-node-engine-alignment.sh
2829
test-unit-asyncify:
2930
runs-on: ubuntu-latest
3031
strategy:
@@ -69,7 +70,7 @@ jobs:
6970
submodules: true
7071
- uses: ./.github/actions/prepare-playground
7172
with:
72-
node-version: 22
73+
node-version: 20
7374
- run: node --expose-gc node_modules/nx/bin/nx affected --target=${{ matrix.target }}
7475
env:
7576
MYSQL_DATABASE: test_db
@@ -328,7 +329,7 @@ jobs:
328329
submodules: true
329330
- uses: ./.github/actions/prepare-playground
330331
with:
331-
node-version: 22
332+
node-version: 20
332333
- run: packages/php-wasm/cli/tests/smoke-test.sh
333334

334335
# Redis extension tests - verifies the php-redis extension loads
@@ -392,7 +393,7 @@ jobs:
392393
submodules: true
393394
- uses: ./.github/actions/prepare-playground
394395
with:
395-
node-version: 22
396+
node-version: 20
396397
- run: |
397398
if ADDITIONAL_REMOTE_ORIGINS=invalid-origin npx nx build playground-client; then
398399
echo "The Playground client build should have failed due to an invalid additional origin."

.github/workflows/publish-npm-packages.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ jobs:
6666
- name: Set up Node.js with OIDC
6767
uses: actions/setup-node@v4
6868
with:
69-
node-version: '22'
69+
node-version: '20'
7070
registry-url: 'https://registry.npmjs.org'
7171
cache: 'npm'
7272

.github/workflows/refresh-sqlite-integration.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
submodules: true
3636
- uses: ./.github/actions/prepare-playground
3737
with:
38-
node-version: 23
38+
node-version: 20
3939
- name: 'Refresh the SQLite bundle'
4040
shell: bash
4141
run: npx nx bundle-sqlite-database playground-wordpress-builds

.github/workflows/refresh-wordpress-major-and-beta.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
submodules: true
4141
- uses: ./.github/actions/prepare-playground
4242
with:
43-
node-version: 23
43+
node-version: 20
4444
- name: 'Recompile WordPress'
4545
id: build
4646
shell: bash

.github/workflows/refresh-wordpress-nightly.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
submodules: true
3434
- uses: ./.github/actions/prepare-playground
3535
with:
36-
node-version: 22
36+
node-version: 20
3737
- name: 'Recompile WordPress'
3838
shell: bash
3939
run: npx nx bundle-wordpress:nightly playground-wordpress-builds

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v20.18.3
1+
20

0 commit comments

Comments
 (0)