@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.
@@ -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
- {{#if jobIsMatrix}}
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
- # node 12 and 14 ship with npm@6, which is known to fail when updating itself in windows
12
- if: matrix.platform.os == 'windows-latest' && (startsWith(matrix.node-version, '12.') || startsWith(matrix.node-version, '14.'))
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
- - name: Install npm@7
21
- if: startsWith(matrix.node-version, '10.')
22
- run: npm i --prefer-online --no-fund --no-audit -g npm@7
23
- - name: Install npm@{{ npmSpec }}
24
- if: $\{{ !startsWith(matrix.node-version, '10.') }}
25
- {{else}}
26
- - name: Install npm@{{ npmSpec }}
27
- {{/if}}
28
- run: npm i --prefer-online --no-fund --no-audit -g npm@{{ npmSpec }}
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}}
@@ -163,7 +163,6 @@ module.exports = {
163
163
  publish: false,
164
164
  npm: 'npm',
165
165
  npx: 'npx',
166
- npmSpec: 'latest',
167
166
  updateNpm: true,
168
167
  dependabot: 'increase-if-necessary',
169
168
  unwantedPackages: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@npmcli/template-oss",
3
- "version": "4.18.0",
3
+ "version": "4.18.1",
4
4
  "description": "templated files used in npm CLI team oss projects",
5
5
  "main": "lib/content/index.js",
6
6
  "bin": {