Skip to content

Commit d90a4ae

Browse files
authored
ci: work around problematic npm 11 bug (#443)
* ci: work around problematic npm 11 bug * chore: reformat renovate.json5
1 parent 2f2beb4 commit d90a4ae

File tree

8 files changed

+31
-4
lines changed

8 files changed

+31
-4
lines changed

.github/workflows/format.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ jobs:
2020
with:
2121
node-version: lts/*
2222
cache: 'npm'
23+
# Use npm@10 on Node 22+ due to https://github.com/npm/cli/issues/8489
24+
- name: Setup npm version
25+
run: npm install -g npm@10
2326
- name: Install dependencies
2427
run: npm ci
2528
- name: Check formatting

.github/workflows/lint.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ jobs:
2222
node-version: lts/*
2323
cache: 'npm'
2424

25+
# Use npm@10 on Node 22+ due to https://github.com/npm/cli/issues/8489
26+
- name: Setup npm version
27+
run: npm install -g npm@10
28+
2529
- name: Setup Deno
2630
uses: denoland/setup-deno@v1
2731
with:

.github/workflows/nuxt-module.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ jobs:
2929
with:
3030
node-version: ${{ matrix.node-version }}
3131
cache: 'npm'
32+
# Use npm@10 on Node 22+ due to https://github.com/npm/cli/issues/8489
33+
- name: Setup npm version
34+
run: npm install -g npm@10
35+
if: "${{ matrix.node-version == '*' }}"
3236
- name: Setup Deno
3337
uses: denoland/setup-deno@v1
3438
with:

.github/workflows/publint.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ jobs:
2222
with:
2323
node-version: lts/*
2424
cache: 'npm'
25+
# Use npm@10 on Node 22+ due to https://github.com/npm/cli/issues/8489
26+
- name: Setup npm version
27+
run: npm install -g npm@10
2528
- name: Setup Deno
2629
uses: denoland/setup-deno@v1
2730
with:

.github/workflows/release-please.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ jobs:
4343
check-latest: true
4444
registry-url: 'https://registry.npmjs.org'
4545
if: ${{ steps.release.outputs.releases_created || github.event_name == 'workflow_dispatch' }}
46+
# Use npm@10 on Node 22+ due to https://github.com/npm/cli/issues/8489
47+
- name: Setup npm version
48+
run: npm install -g npm@10
49+
if: ${{ steps.release.outputs.releases_created || github.event_name == 'workflow_dispatch' }}
4650
- name: Setup Deno
4751
uses: denoland/setup-deno@v1
4852
with:

.github/workflows/test.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ jobs:
3939
with:
4040
node-version: ${{ matrix.node-version }}
4141
cache: 'npm'
42+
# Use npm@10 on Node 22+ due to https://github.com/npm/cli/issues/8489
43+
- name: Setup npm version
44+
run: npm install -g npm@10
45+
if: "${{ matrix.node-version == '*' }}"
4246
- name: Setup Deno
4347
uses: denoland/setup-deno@v1
4448
with:

renovate.json

Lines changed: 0 additions & 4 deletions
This file was deleted.

renovate.json5

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
$schema: 'https://docs.renovatebot.com/renovate-schema.json',
3+
extends: ['local>netlify/renovate-config'],
4+
// See https://docs.renovatebot.com/configuration-options/#constraints
5+
constraints: {
6+
// Use npm@10 (instead of default v11 on Node.js 22+) due to https://github.com/npm/cli/issues/8489
7+
npm: '^10.0.0',
8+
},
9+
}

0 commit comments

Comments
 (0)