Skip to content

Commit b2b2660

Browse files
committed
ci(github): use the current npm in the workflows
Node.js 26 bundles npm 11, while local development uses npm 12, so every job that sets up Node.js now updates npm first and installs with the same npm as locally.
1 parent a053231 commit b2b2660

3 files changed

Lines changed: 18 additions & 0 deletions

File tree

‎.github/workflows/build-test-package-publish.yml‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,10 @@ jobs:
9696
cache: "npm"
9797
cache-dependency-path: package-lock.json
9898

99+
- name: Update npm
100+
# Node.js bundles an older npm; use the current one, as in local development.
101+
run: npm install -g npm@latest
102+
99103
- name: install node modules
100104
run: npm install --include=dev
101105

@@ -174,6 +178,10 @@ jobs:
174178
cache: "npm"
175179
cache-dependency-path: package-lock.json
176180

181+
- name: Update npm
182+
# Node.js bundles an older npm; use the current one, as in local development.
183+
run: npm install -g npm@latest
184+
177185
- name: Setup Java
178186
uses: actions/setup-java@v5
179187
with:
@@ -275,6 +283,10 @@ jobs:
275283
cache: "npm"
276284
cache-dependency-path: package-lock.json
277285

286+
- name: Update npm
287+
# Node.js bundles an older npm; use the current one, as in local development.
288+
run: npm install -g npm@latest
289+
278290
- name: install node modules
279291
run: npm install --include=dev
280292

‎.github/workflows/deploy-docs.yml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ jobs:
4343
with:
4444
node-version: 26
4545
cache: npm
46+
- name: Update npm
47+
# Node.js bundles an older npm; use the current one, as in local development.
48+
run: npm install -g npm@latest
4649
- name: Setup Pages
4750
uses: actions/configure-pages@v6
4851
- name: Install dependencies

‎.github/workflows/docs-next.yml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ jobs:
4444
node-version: 26
4545
cache: npm
4646
cache-dependency-path: docs-next/package-lock.json
47+
- name: Update npm
48+
# Node.js bundles an older npm; use the current one, as in local development.
49+
run: npm install -g npm@latest
4750
- name: Install dependencies
4851
run: npm ci
4952
- name: Build the preview

0 commit comments

Comments
 (0)