Skip to content

Commit 2ffc64c

Browse files
authored
Update js-yaml to 5.2.2 and pin Node to 24 (Dependabot #213) (#158)
* Update js-yaml to 5.2.2 and document package-lock.json version string * Reduce lockfile change to the js-yaml bump only The previous lockfile was regenerated with npm 11 on node 24, which pruned the @emnapi optional peer deps that CI's npm 10 expects, breaking npm ci. This restores master's lockfile and edits only the js-yaml entry and the two version fields. Verified with npm ci and npm run build on node 20. * Pin Node to 24 and bump js-yaml to 5.2.2 Node 20 reached end of life on 2026-04-30 and CI was still building the release artifact on it. markdownlint-cli also declares node >=22, so CI was emitting EBADENGINE warnings on every run. - Add .nvmrc (24) as the single source of truth; workflows now read node-version-file instead of hardcoding '20' in five places. - Add engines.node >=24.15.0, the floor ini@7 requires. - Bump docker-compose node service to node:24-alpine. - Exclude .nvmrc from the distribution zip. - Regenerate package-lock.json on node 24.18 / npm 11.16, which keeps the @emnapi optional peers that npm 11.6.2 wrongly pruned. Verified: npm ci clean with no EBADENGINE warnings, npm run build passes.
1 parent b9152b3 commit 2ffc64c

9 files changed

Lines changed: 52 additions & 66 deletions

File tree

.distignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ assets/vendor/leaflet/reference-1.6.0*.html
2424
.distignore
2525
.eslintrc.js
2626
.gitignore
27+
.nvmrc
2728
Makefile
2829
package.json
2930
package-lock.json

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
- uses: actions/checkout@v6
4343
- uses: actions/setup-node@v6
4444
with:
45-
node-version: '20'
45+
node-version-file: '.nvmrc'
4646
cache: 'npm'
4747
- run: npm ci
4848
- run: node bin/validate-blueprint.js
@@ -133,7 +133,7 @@ jobs:
133133
path: build/
134134
- uses: actions/setup-node@v6
135135
with:
136-
node-version: '20'
136+
node-version-file: '.nvmrc'
137137
cache: 'npm'
138138
- uses: shivammathur/setup-php@v2
139139
with:
@@ -185,7 +185,7 @@ jobs:
185185

186186
- uses: actions/setup-node@v6
187187
with:
188-
node-version: '20'
188+
node-version-file: '.nvmrc'
189189
cache: 'npm'
190190

191191
- uses: shivammathur/setup-php@v2

.github/workflows/copilot-cr-fix.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ jobs:
157157

158158
- uses: actions/setup-node@v6
159159
with:
160-
node-version: '20'
160+
node-version-file: '.nvmrc'
161161
cache: 'npm'
162162

163163
- name: Install dependencies

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
- name: Set up Node.js
1414
uses: actions/setup-node@v6
1515
with:
16-
node-version: '20'
16+
node-version-file: '.nvmrc'
1717
cache: 'npm'
1818

1919
- name: Build JS assets

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
24

CLAUDE.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,12 +252,14 @@ When asked to **"deploy the release"**, execute the following steps in order —
252252
### Steps (automated)
253253

254254
1. **Confirm the target version** — ask if not told explicitly.
255-
2. **Update all five version strings** to the new version:
255+
2. **Update all six version strings** to the new version:
256256
- ` * Version:` header in `ootb-openstreetmap.php`
257257
- `OOTB_VERSION` constant in `ootb-openstreetmap.php`
258258
- `"version"` in `package.json`
259259
- `"version"` in `src/block/block.json`
260260
- `Stable tag:` in `readme.txt`
261+
- `"version"` in `package-lock.json` (two places: the root object and `packages[""]`).
262+
Easiest via `npm install --package-lock-only` after bumping `package.json`, rather than editing by hand.
261263
3. **Add a changelog entry** at the top of the `== Changelog ==` section in `readme.txt`:
262264
```
263265
= X.Y.Z =
@@ -285,7 +287,7 @@ After the above is done, report:
285287
Pushing the tag triggers `release.yml` and deploys to WordPress.org. It is the point of no return.
286288
287289
### Version consistency rule
288-
All five locations must match exactly before tagging. The `artifact-playwright` CI job checks three of them (PHP header, `package.json`, `readme.txt`) and fails fast if they diverge.
290+
All six locations must match exactly before tagging. The `artifact-playwright` CI job checks only three of them (PHP header, `package.json`, `readme.txt`) and fails fast if they diverge, so the other three, including `package-lock.json`, can drift without CI noticing.
289291
290292
---
291293

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ services:
6767
working_dir: /app
6868

6969
node:
70-
image: node:20-alpine
70+
image: node:24-alpine
7171
restart: "no"
7272
profiles: ["tools"]
7373
volumes:

0 commit comments

Comments
 (0)