File tree Expand file tree Collapse file tree 6 files changed +24
-2
lines changed Expand file tree Collapse file tree 6 files changed +24
-2
lines changed Original file line number Diff line number Diff line change @@ -282,6 +282,8 @@ jobs:
282
282
- name : Reset Deps
283
283
run : node . run resetdeps
284
284
- name : Pack
285
+ env :
286
+ SMOKE_PUBLISH_NPM : 1
285
287
run : |
286
288
NPM_VERSION="$(node . --version)-$GITHUB_SHA.0"
287
289
node . version $NPM_VERSION --ignore-scripts
@@ -291,7 +293,7 @@ jobs:
291
293
node scripts/remove-files.js
292
294
# call installed npm instead of local source since we are testing
293
295
# the packed tarball that we just installed globally
294
- SMOKE_PUBLISH_NPM=1 npm test -w smoke-tests --ignore-scripts
296
+ npm test -w smoke-tests --ignore-scripts
295
297
- name : Conclude Check
296
298
uses :
LouisBrunner/[email protected]
297
299
if : steps.check.outputs.check_id && always()
Original file line number Diff line number Diff line change @@ -195,6 +195,7 @@ graph LR;
195
195
npmcli-docs-->ignore-walk;
196
196
npmcli-docs-->npmcli-eslint-config["@npmcli/eslint-config"];
197
197
npmcli-docs-->npmcli-template-oss["@npmcli/template-oss"];
198
+ npmcli-docs-->semver;
198
199
npmcli-fs-->semver;
199
200
npmcli-git-->npm-pick-manifest;
200
201
npmcli-git-->npmcli-promise-spawn["@npmcli/promise-spawn"];
@@ -644,6 +645,7 @@ graph LR;
644
645
npmcli-docs-->remark-man;
645
646
npmcli-docs-->remark-parse;
646
647
npmcli-docs-->remark-rehype;
648
+ npmcli-docs-->semver;
647
649
npmcli-docs-->tap;
648
650
npmcli-docs-->unified;
649
651
npmcli-docs-->yaml;
Original file line number Diff line number Diff line change
1
+ if (
2
+ process . env . SMOKE_PUBLISH_NPM &&
3
+ ! require ( 'semver' ) . satisfies ( process . version , require ( '../package.json' ) . engines . node )
4
+ ) {
5
+ // The docs tooling is kept in sync between releases and dependencies that are not compatible
6
+ // with the lower bound of npm@8 engines are used. When we run the SMOKE_PUBLISH_NPM we are
7
+ // testing that npm is able to pack and install itself locally and then run its own smoke tests.
8
+ // Packing will run this script automatically so in the cases where the node version is
9
+ // not compatible, it is ok to bail on this script since the generated docs are not used in
10
+ // the smoke tests.
11
+ console . log ( `Skipping docs build due to SMOKE_PUBLISH_NPM and ${ process . version } ` )
12
+ return
13
+ }
14
+
1
15
const run = require ( '../lib/build.js' )
2
16
const { paths } = require ( '../lib/index' )
3
17
Original file line number Diff line number Diff line change 31
31
"remark-man" : " ^8.0.1" ,
32
32
"remark-parse" : " ^10.0.1" ,
33
33
"remark-rehype" : " ^10.1.0" ,
34
+ "semver" : " ^7.3.8" ,
34
35
"tap" : " ^16.3.4" ,
35
36
"unified" : " ^10.1.2" ,
36
37
"yaml" : " ^2.2.1"
Original file line number Diff line number Diff line change 191
191
"remark-man": "^8.0.1",
192
192
"remark-parse": "^10.0.1",
193
193
"remark-rehype": "^10.1.0",
194
+ "semver": "^7.3.8",
194
195
"tap": "^16.3.4",
195
196
"unified": "^10.1.2",
196
197
"yaml": "^2.2.1"
Original file line number Diff line number Diff line change 8
8
windowsCI=false
9
9
}}
10
10
- name : Pack
11
+ env :
12
+ SMOKE_PUBLISH_NPM : 1
11
13
run : |
12
14
NPM_VERSION="$({{ rootNpmPath }} --version)-$GITHUB_SHA.0"
13
15
{{ rootNpmPath }} version $NPM_VERSION --ignore-scripts
17
19
node scripts/remove-files.js
18
20
# call installed npm instead of local source since we are testing
19
21
# the packed tarball that we just installed globally
20
- SMOKE_PUBLISH_NPM=1 npm test -w smoke-tests --ignore-scripts
22
+ npm test -w smoke-tests --ignore-scripts
21
23
{{> stepChecks jobCheck=true }}
You can’t perform that action at this time.
0 commit comments