Skip to content

Commit f041897

Browse files
committed
ci(repo): install npm v11 instead of latest
1 parent f185703 commit f041897

3 files changed

Lines changed: 6 additions & 9 deletions

File tree

.github/workflows/deprecate-version.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ jobs:
6767
registry-url: 'https://registry.npmjs.org'
6868

6969
- name: Update npm
70-
run: npm install -g npm@latest
70+
run: corepack enable npm && corepack prepare npm@11 --activate
7171

7272
- name: Deprecate package versions
7373
env:

.github/workflows/fix-lockfile.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,9 @@ jobs:
2222
with:
2323
node-version: 22
2424

25-
- name: Upgrade to latest
26-
run: npm install -g npm@latest
27-
2825
# This is needed to match the npm version used when publishing
26+
- name: Update npm
27+
run: corepack enable npm && corepack prepare npm@11 --activate
2928
- name: Regenerate lockfile
3029
run: npm install --package-lock-only --ignore-scripts
3130

.github/workflows/publish.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,8 @@ jobs:
8484
cache: 'npm'
8585
registry-url: 'https://registry.npmjs.org'
8686

87-
# Ensure npm 11.5.1 or later is installed for trusted publishing support
8887
- name: Update npm
89-
run: npm install -g npm@latest
88+
run: corepack enable npm && corepack prepare npm@11 --activate
9089

9190
- name: Install dependencies
9291
run: npm ci
@@ -257,7 +256,7 @@ jobs:
257256
registry-url: 'https://registry.npmjs.org'
258257

259258
- name: Update npm
260-
run: npm install -g npm@latest
259+
run: corepack enable npm && corepack prepare npm@11 --activate
261260

262261
- name: Install dependencies
263262
run: npm ci
@@ -378,9 +377,8 @@ jobs:
378377
cache: 'npm'
379378
registry-url: 'https://registry.npmjs.org'
380379

381-
# Ensure npm 11.5.1 or later is installed for trusted publishing support
382380
- name: Update npm
383-
run: npm install -g npm@latest
381+
run: corepack enable npm && corepack prepare npm@11 --activate
384382
- name: Install dependencies
385383
run: npm ci
386384
- name: Configure git

0 commit comments

Comments
 (0)