@npmcli/template-oss 4.18.0 → 4.18.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/content/_step-node.yml +38 -12
- package/lib/content/index.js +0 -1
- package/package.json +1 -1
|
@@ -1,15 +1,20 @@
|
|
|
1
1
|
- name: Setup Node
|
|
2
2
|
uses: actions/setup-node@v3
|
|
3
|
+
id: node
|
|
3
4
|
with:
|
|
4
5
|
node-version: {{#if jobIsMatrix}}$\{{ matrix.node-version }}{{else}}{{ last ciVersions }}{{/if}}
|
|
6
|
+
check-latest: contains({{#if jobIsMatrix}}matrix.node-version{{else}}'{{ last ciVersions }}'{{/if}}, '.x')
|
|
5
7
|
{{#if lockfile}}
|
|
6
8
|
cache: npm
|
|
7
9
|
{{/if}}
|
|
10
|
+
|
|
8
11
|
{{#if updateNpm}}
|
|
9
|
-
|
|
12
|
+
# node 10/12/14 ship with npm@6, which is known to fail when updating itself in windows
|
|
10
13
|
- name: Update Windows npm
|
|
11
|
-
|
|
12
|
-
|
|
14
|
+
if: |
|
|
15
|
+
matrix.platform.os == 'windows-latest' && (
|
|
16
|
+
startsWith(steps.node.outputs.node-version, 'v10.') || startsWith(steps.node.outputs.node-version, 'v12.') || startsWith(steps.node.outputs.node-version, 'v14.')
|
|
17
|
+
)
|
|
13
18
|
run: |
|
|
14
19
|
curl -sO https://registry.npmjs.org/npm/-/npm-7.5.4.tgz
|
|
15
20
|
tar xf npm-7.5.4.tgz
|
|
@@ -17,15 +22,36 @@
|
|
|
17
22
|
node lib/npm.js install --no-fund --no-audit -g ..\npm-7.5.4.tgz
|
|
18
23
|
cd ..
|
|
19
24
|
rmdir /s /q package
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
if:
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
25
|
+
|
|
26
|
+
# Start on Node 10 because we dont test on anything lower
|
|
27
|
+
- name: Install npm@7 on Node 10
|
|
28
|
+
shell: bash
|
|
29
|
+
if: startsWith(steps.node.outputs.node-version, 'v10.')
|
|
30
|
+
id: npm-7
|
|
31
|
+
run: |
|
|
32
|
+
npm i --prefer-online --no-fund --no-audit -g npm@7
|
|
33
|
+
echo "updated=true" >> "$GITHUB_OUTPUT"
|
|
34
|
+
|
|
35
|
+
- name: Install npm@8 on Node 12
|
|
36
|
+
shell: bash
|
|
37
|
+
if: startsWith(steps.node.outputs.node-version, 'v12.')
|
|
38
|
+
id: npm-8
|
|
39
|
+
run: |
|
|
40
|
+
npm i --prefer-online --no-fund --no-audit -g npm@8
|
|
41
|
+
echo "updated=true" >> "$GITHUB_OUTPUT"
|
|
42
|
+
|
|
43
|
+
- name: Install npm@9 on Node 14/16/18.0
|
|
44
|
+
shell: bash
|
|
45
|
+
if: startsWith(steps.node.outputs.node-version, 'v14.') || startsWith(steps.node.outputs.node-version, 'v16.') || startsWith(steps.node.outputs.node-version, 'v18.0.')
|
|
46
|
+
id: npm-9
|
|
47
|
+
run: |
|
|
48
|
+
npm i --prefer-online --no-fund --no-audit -g npm@9
|
|
49
|
+
echo "updated=true" >> "$GITHUB_OUTPUT"
|
|
50
|
+
|
|
51
|
+
- name: Install npm@latest on Node
|
|
52
|
+
if: $\{{ !(steps.npm-7.outputs.updated || steps.npm-8.outputs.updated || steps.npm-9.outputs.updated) }}
|
|
53
|
+
run: npm i --prefer-online --no-fund --no-audit -g npm@latest
|
|
54
|
+
|
|
29
55
|
- name: npm Version
|
|
30
56
|
run: npm -v
|
|
31
57
|
{{/if}}
|
package/lib/content/index.js
CHANGED