@npmcli/template-oss 4.3.0 → 4.3.2

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/config.js CHANGED
@@ -216,9 +216,13 @@ const getFullConfig = async ({
216
216
  }
217
217
 
218
218
  if (pkgConfig.ciVersions) {
219
- const versions = pkgConfig.ciVersions
220
- const defaultVersions = defaultConfig.ciVersions
221
- const parsed = parseCIVersions(versions === 'latest' ? defaultVersions.slice(-1) : versions)
219
+ let versions = pkgConfig.ciVersions
220
+ if (versions === 'latest') {
221
+ const defaultVersions = [rootPkgConfig, defaultConfig].find(c => Array.isArray(c.ciVersions))
222
+ versions = defaultVersions.ciVersions.slice(-1)
223
+ }
224
+
225
+ const parsed = parseCIVersions(versions)
222
226
  derived.ciVersions = parsed.targets
223
227
  derived.engines = pkgConfig.engines || parsed.engines
224
228
  }
@@ -1,4 +1,4 @@
1
- name: {{ jobName }}
1
+ name: {{ jobName }} - $\{{ matrix.platform.name }} - $\{{ matrix.node-version }}
2
2
  if: github.repository_owner == 'npm'
3
3
  strategy:
4
4
  fail-fast: false
@@ -26,4 +26,4 @@ defaults:
26
26
  run:
27
27
  shell: $\{{ matrix.platform.shell }}
28
28
  steps:
29
- {{> stepsSetup jobNodeMatrix=true }}
29
+ {{> stepsSetup jobIsMatrix=true }}
@@ -10,7 +10,7 @@
10
10
  token: $\{{ secrets.GITHUB_TOKEN }}
11
11
  {{#if jobCheck.sha}}
12
12
  status: {{#if jobCheck.status}}{{ jobCheck.status }}{{else}}in_progress{{/if}}
13
- name: {{#if jobCheck.name}}{{ jobCheck.name }}{{else}}{{ jobName }}{{/if}}
13
+ name: {{#if jobCheck.name}}{{ jobCheck.name }}{{else}}{{ jobName }}{{/if}}{{#if jobIsMatrix}} - $\{{ matrix.platform.name }} - $\{{ matrix.node-version }}{{/if}}
14
14
  sha: {{ jobCheck.sha }}
15
15
  # XXX: this does not work when using the default GITHUB_TOKEN.
16
16
  # Instead we post the main job url to the PR as a comment which
@@ -1,12 +1,12 @@
1
1
  - name: Setup Node
2
2
  uses: actions/setup-node@v3
3
3
  with:
4
- node-version: {{#if jobNodeMatrix}}$\{{ matrix.node-version }}{{else}}{{ last ciVersions }}{{/if}}
4
+ node-version: {{#if jobIsMatrix}}$\{{ matrix.node-version }}{{else}}{{ last ciVersions }}{{/if}}
5
5
  {{#if lockfile}}
6
6
  cache: npm
7
7
  {{/if}}
8
8
  {{#if updateNpm}}
9
- {{#if jobNodeMatrix}}
9
+ {{#if jobIsMatrix}}
10
10
  - name: Update Windows npm
11
11
  # node 12 and 14 ship with npm@6, which is known to fail when updating itself in windows
12
12
  if: matrix.platform.os == 'windows-latest' && (startsWith(matrix.node-version, '12.') || startsWith(matrix.node-version, '14.'))
@@ -23,7 +23,7 @@ jobs:
23
23
 
24
24
  test-all:
25
25
  {{> jobMatrix
26
- jobName="Test All - ${{ matrix.platform.name }} - Node ${{ matrix.node-version }}"
26
+ jobName="Test All"
27
27
  jobCheck=(obj sha="${{ inputs.check-sha }}")
28
28
  jobCheckout=(obj ref="${{ inputs.ref }}")
29
29
  }}
@@ -9,5 +9,5 @@ jobs:
9
9
  {{> stepLint jobRunFlags=pkgFlags }}
10
10
 
11
11
  test:
12
- {{> jobMatrix jobName="Test All - ${{ matrix.platform.name }} - Node ${{ matrix.node-version }}" }}
12
+ {{> jobMatrix jobName="Test" }}
13
13
  {{> stepTest jobRunFlags=pkgFlags }}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@npmcli/template-oss",
3
- "version": "4.3.0",
3
+ "version": "4.3.2",
4
4
  "description": "templated files used in npm CLI team oss projects",
5
5
  "main": "lib/content/index.js",
6
6
  "bin": {