@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
|
-
|
|
220
|
-
|
|
221
|
-
|
|
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
|
|
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
|
|
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
|
|
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.'))
|
package/lib/content/ci.yml
CHANGED