Skip to content

Commit 123e0b0

Browse files
committedSep 13, 2023
chore: postinstall for dependabot template-oss PR
1 parent 737d5e1 commit 123e0b0

File tree

7 files changed

+399
-31
lines changed

7 files changed

+399
-31
lines changed
 

‎.github/workflows/audit.yml

+46-2
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,54 @@ jobs:
2525
git config --global user.name "npm CLI robot"
2626
- name: Setup Node
2727
uses: actions/setup-node@v3
28+
id: node
2829
with:
2930
node-version: 18.x
30-
- name: Install npm@8
31-
run: npm i --prefer-online --no-fund --no-audit -g npm@8
31+
check-latest: contains('18.x', '.x')
32+
33+
# node 10/12/14 ship with npm@6, which is known to fail when updating itself in windows
34+
- name: Update Windows npm
35+
if: |
36+
matrix.platform.os == 'windows-latest' && (
37+
startsWith(steps.node.outputs.node-version, 'v10.') || startsWith(steps.node.outputs.node-version, 'v12.') || startsWith(steps.node.outputs.node-version, 'v14.')
38+
)
39+
run: |
40+
curl -sO https://registry.npmjs.org/npm/-/npm-7.5.4.tgz
41+
tar xf npm-7.5.4.tgz
42+
cd package
43+
node lib/npm.js install --no-fund --no-audit -g ..\npm-7.5.4.tgz
44+
cd ..
45+
rmdir /s /q package
46+
47+
# Start on Node 10 because we dont test on anything lower
48+
- name: Install npm@7 on Node 10
49+
shell: bash
50+
if: startsWith(steps.node.outputs.node-version, 'v10.')
51+
id: npm-7
52+
run: |
53+
npm i --prefer-online --no-fund --no-audit -g npm@7
54+
echo "updated=true" >> "$GITHUB_OUTPUT"
55+
56+
- name: Install npm@8 on Node 12
57+
shell: bash
58+
if: startsWith(steps.node.outputs.node-version, 'v12.')
59+
id: npm-8
60+
run: |
61+
npm i --prefer-online --no-fund --no-audit -g npm@8
62+
echo "updated=true" >> "$GITHUB_OUTPUT"
63+
64+
- name: Install npm@9 on Node 14/16/18.0
65+
shell: bash
66+
if: startsWith(steps.node.outputs.node-version, 'v14.') || startsWith(steps.node.outputs.node-version, 'v16.') || startsWith(steps.node.outputs.node-version, 'v18.0.')
67+
id: npm-9
68+
run: |
69+
npm i --prefer-online --no-fund --no-audit -g npm@9
70+
echo "updated=true" >> "$GITHUB_OUTPUT"
71+
72+
- name: Install npm@latest on Node
73+
if: ${{ !(steps.npm-7.outputs.updated || steps.npm-8.outputs.updated || steps.npm-9.outputs.updated) }}
74+
run: npm i --prefer-online --no-fund --no-audit -g npm@latest
75+
3276
- name: npm Version
3377
run: npm -v
3478
- name: Install Dependencies

‎.github/workflows/ci-release.yml

+84-10
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,54 @@ jobs:
8080
git config --global user.name "npm CLI robot"
8181
- name: Setup Node
8282
uses: actions/setup-node@v3
83+
id: node
8384
with:
8485
node-version: 18.x
85-
- name: Install npm@8
86-
run: npm i --prefer-online --no-fund --no-audit -g npm@8
86+
check-latest: contains('18.x', '.x')
87+
88+
# node 10/12/14 ship with npm@6, which is known to fail when updating itself in windows
89+
- name: Update Windows npm
90+
if: |
91+
matrix.platform.os == 'windows-latest' && (
92+
startsWith(steps.node.outputs.node-version, 'v10.') || startsWith(steps.node.outputs.node-version, 'v12.') || startsWith(steps.node.outputs.node-version, 'v14.')
93+
)
94+
run: |
95+
curl -sO https://registry.npmjs.org/npm/-/npm-7.5.4.tgz
96+
tar xf npm-7.5.4.tgz
97+
cd package
98+
node lib/npm.js install --no-fund --no-audit -g ..\npm-7.5.4.tgz
99+
cd ..
100+
rmdir /s /q package
101+
102+
# Start on Node 10 because we dont test on anything lower
103+
- name: Install npm@7 on Node 10
104+
shell: bash
105+
if: startsWith(steps.node.outputs.node-version, 'v10.')
106+
id: npm-7
107+
run: |
108+
npm i --prefer-online --no-fund --no-audit -g npm@7
109+
echo "updated=true" >> "$GITHUB_OUTPUT"
110+
111+
- name: Install npm@8 on Node 12
112+
shell: bash
113+
if: startsWith(steps.node.outputs.node-version, 'v12.')
114+
id: npm-8
115+
run: |
116+
npm i --prefer-online --no-fund --no-audit -g npm@8
117+
echo "updated=true" >> "$GITHUB_OUTPUT"
118+
119+
- name: Install npm@9 on Node 14/16/18.0
120+
shell: bash
121+
if: startsWith(steps.node.outputs.node-version, 'v14.') || startsWith(steps.node.outputs.node-version, 'v16.') || startsWith(steps.node.outputs.node-version, 'v18.0.')
122+
id: npm-9
123+
run: |
124+
npm i --prefer-online --no-fund --no-audit -g npm@9
125+
echo "updated=true" >> "$GITHUB_OUTPUT"
126+
127+
- name: Install npm@latest on Node
128+
if: ${{ !(steps.npm-7.outputs.updated || steps.npm-8.outputs.updated || steps.npm-9.outputs.updated) }}
129+
run: npm i --prefer-online --no-fund --no-audit -g npm@latest
130+
87131
- name: npm Version
88132
run: npm -v
89133
- name: Install Dependencies
@@ -181,24 +225,54 @@ jobs:
181225
git config --global user.name "npm CLI robot"
182226
- name: Setup Node
183227
uses: actions/setup-node@v3
228+
id: node
184229
with:
185230
node-version: ${{ matrix.node-version }}
231+
check-latest: contains(matrix.node-version, '.x')
232+
233+
# node 10/12/14 ship with npm@6, which is known to fail when updating itself in windows
186234
- name: Update Windows npm
187-
# node 12 and 14 ship with npm@6, which is known to fail when updating itself in windows
188-
if: matrix.platform.os == 'windows-latest' && (startsWith(matrix.node-version, '12.') || startsWith(matrix.node-version, '14.'))
235+
if: |
236+
matrix.platform.os == 'windows-latest' && (
237+
startsWith(steps.node.outputs.node-version, 'v10.') || startsWith(steps.node.outputs.node-version, 'v12.') || startsWith(steps.node.outputs.node-version, 'v14.')
238+
)
189239
run: |
190240
curl -sO https://registry.npmjs.org/npm/-/npm-7.5.4.tgz
191241
tar xf npm-7.5.4.tgz
192242
cd package
193243
node lib/npm.js install --no-fund --no-audit -g ..\npm-7.5.4.tgz
194244
cd ..
195245
rmdir /s /q package
196-
- name: Install npm@7
197-
if: startsWith(matrix.node-version, '10.')
198-
run: npm i --prefer-online --no-fund --no-audit -g npm@7
199-
- name: Install npm@8
200-
if: ${{ !startsWith(matrix.node-version, '10.') }}
201-
run: npm i --prefer-online --no-fund --no-audit -g npm@8
246+
247+
# Start on Node 10 because we dont test on anything lower
248+
- name: Install npm@7 on Node 10
249+
shell: bash
250+
if: startsWith(steps.node.outputs.node-version, 'v10.')
251+
id: npm-7
252+
run: |
253+
npm i --prefer-online --no-fund --no-audit -g npm@7
254+
echo "updated=true" >> "$GITHUB_OUTPUT"
255+
256+
- name: Install npm@8 on Node 12
257+
shell: bash
258+
if: startsWith(steps.node.outputs.node-version, 'v12.')
259+
id: npm-8
260+
run: |
261+
npm i --prefer-online --no-fund --no-audit -g npm@8
262+
echo "updated=true" >> "$GITHUB_OUTPUT"
263+
264+
- name: Install npm@9 on Node 14/16/18.0
265+
shell: bash
266+
if: startsWith(steps.node.outputs.node-version, 'v14.') || startsWith(steps.node.outputs.node-version, 'v16.') || startsWith(steps.node.outputs.node-version, 'v18.0.')
267+
id: npm-9
268+
run: |
269+
npm i --prefer-online --no-fund --no-audit -g npm@9
270+
echo "updated=true" >> "$GITHUB_OUTPUT"
271+
272+
- name: Install npm@latest on Node
273+
if: ${{ !(steps.npm-7.outputs.updated || steps.npm-8.outputs.updated || steps.npm-9.outputs.updated) }}
274+
run: npm i --prefer-online --no-fund --no-audit -g npm@latest
275+
202276
- name: npm Version
203277
run: npm -v
204278
- name: Install Dependencies

‎.github/workflows/ci.yml

+84-10
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,54 @@ jobs:
3030
git config --global user.name "npm CLI robot"
3131
- name: Setup Node
3232
uses: actions/setup-node@v3
33+
id: node
3334
with:
3435
node-version: 18.x
35-
- name: Install npm@8
36-
run: npm i --prefer-online --no-fund --no-audit -g npm@8
36+
check-latest: contains('18.x', '.x')
37+
38+
# node 10/12/14 ship with npm@6, which is known to fail when updating itself in windows
39+
- name: Update Windows npm
40+
if: |
41+
matrix.platform.os == 'windows-latest' && (
42+
startsWith(steps.node.outputs.node-version, 'v10.') || startsWith(steps.node.outputs.node-version, 'v12.') || startsWith(steps.node.outputs.node-version, 'v14.')
43+
)
44+
run: |
45+
curl -sO https://registry.npmjs.org/npm/-/npm-7.5.4.tgz
46+
tar xf npm-7.5.4.tgz
47+
cd package
48+
node lib/npm.js install --no-fund --no-audit -g ..\npm-7.5.4.tgz
49+
cd ..
50+
rmdir /s /q package
51+
52+
# Start on Node 10 because we dont test on anything lower
53+
- name: Install npm@7 on Node 10
54+
shell: bash
55+
if: startsWith(steps.node.outputs.node-version, 'v10.')
56+
id: npm-7
57+
run: |
58+
npm i --prefer-online --no-fund --no-audit -g npm@7
59+
echo "updated=true" >> "$GITHUB_OUTPUT"
60+
61+
- name: Install npm@8 on Node 12
62+
shell: bash
63+
if: startsWith(steps.node.outputs.node-version, 'v12.')
64+
id: npm-8
65+
run: |
66+
npm i --prefer-online --no-fund --no-audit -g npm@8
67+
echo "updated=true" >> "$GITHUB_OUTPUT"
68+
69+
- name: Install npm@9 on Node 14/16/18.0
70+
shell: bash
71+
if: startsWith(steps.node.outputs.node-version, 'v14.') || startsWith(steps.node.outputs.node-version, 'v16.') || startsWith(steps.node.outputs.node-version, 'v18.0.')
72+
id: npm-9
73+
run: |
74+
npm i --prefer-online --no-fund --no-audit -g npm@9
75+
echo "updated=true" >> "$GITHUB_OUTPUT"
76+
77+
- name: Install npm@latest on Node
78+
if: ${{ !(steps.npm-7.outputs.updated || steps.npm-8.outputs.updated || steps.npm-9.outputs.updated) }}
79+
run: npm i --prefer-online --no-fund --no-audit -g npm@latest
80+
3781
- name: npm Version
3882
run: npm -v
3983
- name: Install Dependencies
@@ -79,24 +123,54 @@ jobs:
79123
git config --global user.name "npm CLI robot"
80124
- name: Setup Node
81125
uses: actions/setup-node@v3
126+
id: node
82127
with:
83128
node-version: ${{ matrix.node-version }}
129+
check-latest: contains(matrix.node-version, '.x')
130+
131+
# node 10/12/14 ship with npm@6, which is known to fail when updating itself in windows
84132
- name: Update Windows npm
85-
# node 12 and 14 ship with npm@6, which is known to fail when updating itself in windows
86-
if: matrix.platform.os == 'windows-latest' && (startsWith(matrix.node-version, '12.') || startsWith(matrix.node-version, '14.'))
133+
if: |
134+
matrix.platform.os == 'windows-latest' && (
135+
startsWith(steps.node.outputs.node-version, 'v10.') || startsWith(steps.node.outputs.node-version, 'v12.') || startsWith(steps.node.outputs.node-version, 'v14.')
136+
)
87137
run: |
88138
curl -sO https://registry.npmjs.org/npm/-/npm-7.5.4.tgz
89139
tar xf npm-7.5.4.tgz
90140
cd package
91141
node lib/npm.js install --no-fund --no-audit -g ..\npm-7.5.4.tgz
92142
cd ..
93143
rmdir /s /q package
94-
- name: Install npm@7
95-
if: startsWith(matrix.node-version, '10.')
96-
run: npm i --prefer-online --no-fund --no-audit -g npm@7
97-
- name: Install npm@8
98-
if: ${{ !startsWith(matrix.node-version, '10.') }}
99-
run: npm i --prefer-online --no-fund --no-audit -g npm@8
144+
145+
# Start on Node 10 because we dont test on anything lower
146+
- name: Install npm@7 on Node 10
147+
shell: bash
148+
if: startsWith(steps.node.outputs.node-version, 'v10.')
149+
id: npm-7
150+
run: |
151+
npm i --prefer-online --no-fund --no-audit -g npm@7
152+
echo "updated=true" >> "$GITHUB_OUTPUT"
153+
154+
- name: Install npm@8 on Node 12
155+
shell: bash
156+
if: startsWith(steps.node.outputs.node-version, 'v12.')
157+
id: npm-8
158+
run: |
159+
npm i --prefer-online --no-fund --no-audit -g npm@8
160+
echo "updated=true" >> "$GITHUB_OUTPUT"
161+
162+
- name: Install npm@9 on Node 14/16/18.0
163+
shell: bash
164+
if: startsWith(steps.node.outputs.node-version, 'v14.') || startsWith(steps.node.outputs.node-version, 'v16.') || startsWith(steps.node.outputs.node-version, 'v18.0.')
165+
id: npm-9
166+
run: |
167+
npm i --prefer-online --no-fund --no-audit -g npm@9
168+
echo "updated=true" >> "$GITHUB_OUTPUT"
169+
170+
- name: Install npm@latest on Node
171+
if: ${{ !(steps.npm-7.outputs.updated || steps.npm-8.outputs.updated || steps.npm-9.outputs.updated) }}
172+
run: npm i --prefer-online --no-fund --no-audit -g npm@latest
173+
100174
- name: npm Version
101175
run: npm -v
102176
- name: Install Dependencies

‎.github/workflows/post-dependabot.yml

+46-2
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,54 @@ jobs:
2626
git config --global user.name "npm CLI robot"
2727
- name: Setup Node
2828
uses: actions/setup-node@v3
29+
id: node
2930
with:
3031
node-version: 18.x
31-
- name: Install npm@8
32-
run: npm i --prefer-online --no-fund --no-audit -g npm@8
32+
check-latest: contains('18.x', '.x')
33+
34+
# node 10/12/14 ship with npm@6, which is known to fail when updating itself in windows
35+
- name: Update Windows npm
36+
if: |
37+
matrix.platform.os == 'windows-latest' && (
38+
startsWith(steps.node.outputs.node-version, 'v10.') || startsWith(steps.node.outputs.node-version, 'v12.') || startsWith(steps.node.outputs.node-version, 'v14.')
39+
)
40+
run: |
41+
curl -sO https://registry.npmjs.org/npm/-/npm-7.5.4.tgz
42+
tar xf npm-7.5.4.tgz
43+
cd package
44+
node lib/npm.js install --no-fund --no-audit -g ..\npm-7.5.4.tgz
45+
cd ..
46+
rmdir /s /q package
47+
48+
# Start on Node 10 because we dont test on anything lower
49+
- name: Install npm@7 on Node 10
50+
shell: bash
51+
if: startsWith(steps.node.outputs.node-version, 'v10.')
52+
id: npm-7
53+
run: |
54+
npm i --prefer-online --no-fund --no-audit -g npm@7
55+
echo "updated=true" >> "$GITHUB_OUTPUT"
56+
57+
- name: Install npm@8 on Node 12
58+
shell: bash
59+
if: startsWith(steps.node.outputs.node-version, 'v12.')
60+
id: npm-8
61+
run: |
62+
npm i --prefer-online --no-fund --no-audit -g npm@8
63+
echo "updated=true" >> "$GITHUB_OUTPUT"
64+
65+
- name: Install npm@9 on Node 14/16/18.0
66+
shell: bash
67+
if: startsWith(steps.node.outputs.node-version, 'v14.') || startsWith(steps.node.outputs.node-version, 'v16.') || startsWith(steps.node.outputs.node-version, 'v18.0.')
68+
id: npm-9
69+
run: |
70+
npm i --prefer-online --no-fund --no-audit -g npm@9
71+
echo "updated=true" >> "$GITHUB_OUTPUT"
72+
73+
- name: Install npm@latest on Node
74+
if: ${{ !(steps.npm-7.outputs.updated || steps.npm-8.outputs.updated || steps.npm-9.outputs.updated) }}
75+
run: npm i --prefer-online --no-fund --no-audit -g npm@latest
76+
3377
- name: npm Version
3478
run: npm -v
3579
- name: Install Dependencies

‎.github/workflows/pull-request.yml

+46-2
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,54 @@ jobs:
2929
git config --global user.name "npm CLI robot"
3030
- name: Setup Node
3131
uses: actions/setup-node@v3
32+
id: node
3233
with:
3334
node-version: 18.x
34-
- name: Install npm@8
35-
run: npm i --prefer-online --no-fund --no-audit -g npm@8
35+
check-latest: contains('18.x', '.x')
36+
37+
# node 10/12/14 ship with npm@6, which is known to fail when updating itself in windows
38+
- name: Update Windows npm
39+
if: |
40+
matrix.platform.os == 'windows-latest' && (
41+
startsWith(steps.node.outputs.node-version, 'v10.') || startsWith(steps.node.outputs.node-version, 'v12.') || startsWith(steps.node.outputs.node-version, 'v14.')
42+
)
43+
run: |
44+
curl -sO https://registry.npmjs.org/npm/-/npm-7.5.4.tgz
45+
tar xf npm-7.5.4.tgz
46+
cd package
47+
node lib/npm.js install --no-fund --no-audit -g ..\npm-7.5.4.tgz
48+
cd ..
49+
rmdir /s /q package
50+
51+
# Start on Node 10 because we dont test on anything lower
52+
- name: Install npm@7 on Node 10
53+
shell: bash
54+
if: startsWith(steps.node.outputs.node-version, 'v10.')
55+
id: npm-7
56+
run: |
57+
npm i --prefer-online --no-fund --no-audit -g npm@7
58+
echo "updated=true" >> "$GITHUB_OUTPUT"
59+
60+
- name: Install npm@8 on Node 12
61+
shell: bash
62+
if: startsWith(steps.node.outputs.node-version, 'v12.')
63+
id: npm-8
64+
run: |
65+
npm i --prefer-online --no-fund --no-audit -g npm@8
66+
echo "updated=true" >> "$GITHUB_OUTPUT"
67+
68+
- name: Install npm@9 on Node 14/16/18.0
69+
shell: bash
70+
if: startsWith(steps.node.outputs.node-version, 'v14.') || startsWith(steps.node.outputs.node-version, 'v16.') || startsWith(steps.node.outputs.node-version, 'v18.0.')
71+
id: npm-9
72+
run: |
73+
npm i --prefer-online --no-fund --no-audit -g npm@9
74+
echo "updated=true" >> "$GITHUB_OUTPUT"
75+
76+
- name: Install npm@latest on Node
77+
if: ${{ !(steps.npm-7.outputs.updated || steps.npm-8.outputs.updated || steps.npm-9.outputs.updated) }}
78+
run: npm i --prefer-online --no-fund --no-audit -g npm@latest
79+
3680
- name: npm Version
3781
run: npm -v
3882
- name: Install Dependencies

‎.github/workflows/release.yml

+92-4
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,54 @@ jobs:
4343
git config --global user.name "npm CLI robot"
4444
- name: Setup Node
4545
uses: actions/setup-node@v3
46+
id: node
4647
with:
4748
node-version: 18.x
48-
- name: Install npm@8
49-
run: npm i --prefer-online --no-fund --no-audit -g npm@8
49+
check-latest: contains('18.x', '.x')
50+
51+
# node 10/12/14 ship with npm@6, which is known to fail when updating itself in windows
52+
- name: Update Windows npm
53+
if: |
54+
matrix.platform.os == 'windows-latest' && (
55+
startsWith(steps.node.outputs.node-version, 'v10.') || startsWith(steps.node.outputs.node-version, 'v12.') || startsWith(steps.node.outputs.node-version, 'v14.')
56+
)
57+
run: |
58+
curl -sO https://registry.npmjs.org/npm/-/npm-7.5.4.tgz
59+
tar xf npm-7.5.4.tgz
60+
cd package
61+
node lib/npm.js install --no-fund --no-audit -g ..\npm-7.5.4.tgz
62+
cd ..
63+
rmdir /s /q package
64+
65+
# Start on Node 10 because we dont test on anything lower
66+
- name: Install npm@7 on Node 10
67+
shell: bash
68+
if: startsWith(steps.node.outputs.node-version, 'v10.')
69+
id: npm-7
70+
run: |
71+
npm i --prefer-online --no-fund --no-audit -g npm@7
72+
echo "updated=true" >> "$GITHUB_OUTPUT"
73+
74+
- name: Install npm@8 on Node 12
75+
shell: bash
76+
if: startsWith(steps.node.outputs.node-version, 'v12.')
77+
id: npm-8
78+
run: |
79+
npm i --prefer-online --no-fund --no-audit -g npm@8
80+
echo "updated=true" >> "$GITHUB_OUTPUT"
81+
82+
- name: Install npm@9 on Node 14/16/18.0
83+
shell: bash
84+
if: startsWith(steps.node.outputs.node-version, 'v14.') || startsWith(steps.node.outputs.node-version, 'v16.') || startsWith(steps.node.outputs.node-version, 'v18.0.')
85+
id: npm-9
86+
run: |
87+
npm i --prefer-online --no-fund --no-audit -g npm@9
88+
echo "updated=true" >> "$GITHUB_OUTPUT"
89+
90+
- name: Install npm@latest on Node
91+
if: ${{ !(steps.npm-7.outputs.updated || steps.npm-8.outputs.updated || steps.npm-9.outputs.updated) }}
92+
run: npm i --prefer-online --no-fund --no-audit -g npm@latest
93+
5094
- name: npm Version
5195
run: npm -v
5296
- name: Install Dependencies
@@ -156,10 +200,54 @@ jobs:
156200
git config --global user.name "npm CLI robot"
157201
- name: Setup Node
158202
uses: actions/setup-node@v3
203+
id: node
159204
with:
160205
node-version: 18.x
161-
- name: Install npm@8
162-
run: npm i --prefer-online --no-fund --no-audit -g npm@8
206+
check-latest: contains('18.x', '.x')
207+
208+
# node 10/12/14 ship with npm@6, which is known to fail when updating itself in windows
209+
- name: Update Windows npm
210+
if: |
211+
matrix.platform.os == 'windows-latest' && (
212+
startsWith(steps.node.outputs.node-version, 'v10.') || startsWith(steps.node.outputs.node-version, 'v12.') || startsWith(steps.node.outputs.node-version, 'v14.')
213+
)
214+
run: |
215+
curl -sO https://registry.npmjs.org/npm/-/npm-7.5.4.tgz
216+
tar xf npm-7.5.4.tgz
217+
cd package
218+
node lib/npm.js install --no-fund --no-audit -g ..\npm-7.5.4.tgz
219+
cd ..
220+
rmdir /s /q package
221+
222+
# Start on Node 10 because we dont test on anything lower
223+
- name: Install npm@7 on Node 10
224+
shell: bash
225+
if: startsWith(steps.node.outputs.node-version, 'v10.')
226+
id: npm-7
227+
run: |
228+
npm i --prefer-online --no-fund --no-audit -g npm@7
229+
echo "updated=true" >> "$GITHUB_OUTPUT"
230+
231+
- name: Install npm@8 on Node 12
232+
shell: bash
233+
if: startsWith(steps.node.outputs.node-version, 'v12.')
234+
id: npm-8
235+
run: |
236+
npm i --prefer-online --no-fund --no-audit -g npm@8
237+
echo "updated=true" >> "$GITHUB_OUTPUT"
238+
239+
- name: Install npm@9 on Node 14/16/18.0
240+
shell: bash
241+
if: startsWith(steps.node.outputs.node-version, 'v14.') || startsWith(steps.node.outputs.node-version, 'v16.') || startsWith(steps.node.outputs.node-version, 'v18.0.')
242+
id: npm-9
243+
run: |
244+
npm i --prefer-online --no-fund --no-audit -g npm@9
245+
echo "updated=true" >> "$GITHUB_OUTPUT"
246+
247+
- name: Install npm@latest on Node
248+
if: ${{ !(steps.npm-7.outputs.updated || steps.npm-8.outputs.updated || steps.npm-9.outputs.updated) }}
249+
run: npm i --prefer-online --no-fund --no-audit -g npm@latest
250+
163251
- name: npm Version
164252
run: npm -v
165253
- name: Install Dependencies

‎package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
"author": "GitHub Inc.",
5454
"templateOSS": {
5555
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
56-
"version": "4.18.0",
56+
"version": "4.18.1",
5757
"engines": ">=10",
5858
"ciVersions": [
5959
"10.0.0",

0 commit comments

Comments
 (0)
Please sign in to comment.