Skip to content

Commit 679bc4a

Browse files
committed
deps: @npmcli/run-script@9.1.0
1 parent b306d25 commit 679bc4a

File tree

5 files changed

+38
-23
lines changed

5 files changed

+38
-23
lines changed

node_modules/@npmcli/run-script/lib/make-spawn-args.js

+18-5
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,34 @@
11
/* eslint camelcase: "off" */
22
const setPATH = require('./set-path.js')
33
const { resolve } = require('path')
4-
const npm_config_node_gyp = require.resolve('node-gyp/bin/node-gyp.js')
4+
5+
let npm_config_node_gyp
56

67
const makeSpawnArgs = options => {
78
const {
9+
args,
10+
binPaths,
11+
cmd,
12+
env,
813
event,
14+
nodeGyp,
915
path,
1016
scriptShell = true,
11-
binPaths,
12-
env,
1317
stdio,
14-
cmd,
15-
args,
1618
stdioString,
1719
} = options
1820

21+
if (nodeGyp) {
22+
// npm already pulled this from env and passes it in to options
23+
npm_config_node_gyp = nodeGyp
24+
} else if (env.npm_config_node_gyp) {
25+
// legacy mode for standalone user
26+
npm_config_node_gyp = env.npm_config_node_gyp
27+
} else {
28+
// default
29+
npm_config_node_gyp = require.resolve('node-gyp/bin/node-gyp.js')
30+
}
31+
1932
const spawnEnv = setPATH(path, binPaths, {
2033
// we need to at least save the PATH environment var
2134
...process.env,

node_modules/@npmcli/run-script/lib/run-script-pkg.js

+12-10
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,19 @@ const isServerPackage = require('./is-server-package.js')
77

88
const runScriptPkg = async options => {
99
const {
10-
event,
11-
path,
12-
scriptShell,
10+
args = [],
1311
binPaths = false,
1412
env = {},
15-
stdio = 'pipe',
13+
event,
14+
nodeGyp,
15+
path,
1616
pkg,
17-
args = [],
18-
stdioString,
17+
scriptShell,
1918
// how long to wait for a process.kill signal
2019
// only exposed here so that we can make the test go a bit faster.
2120
signalTimeout = 500,
21+
stdio = 'pipe',
22+
stdioString,
2223
} = options
2324

2425
const { scripts = {}, gypfile } = pkg
@@ -63,14 +64,15 @@ const runScriptPkg = async options => {
6364
}
6465

6566
const [spawnShell, spawnArgs, spawnOpts] = makeSpawnArgs({
67+
args,
68+
binPaths,
69+
cmd,
70+
env: { ...env, ...packageEnvs(pkg) },
6671
event,
72+
nodeGyp,
6773
path,
6874
scriptShell,
69-
binPaths,
70-
env: { ...env, ...packageEnvs(pkg) },
7175
stdio,
72-
cmd,
73-
args,
7476
stdioString,
7577
})
7678

node_modules/@npmcli/run-script/package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@npmcli/run-script",
3-
"version": "9.0.2",
3+
"version": "9.1.0",
44
"description": "Run a lifecycle script for a package (descendant of npm-lifecycle)",
55
"author": "GitHub Inc.",
66
"license": "ISC",
@@ -16,7 +16,7 @@
1616
},
1717
"devDependencies": {
1818
"@npmcli/eslint-config": "^5.0.0",
19-
"@npmcli/template-oss": "4.23.4",
19+
"@npmcli/template-oss": "4.24.1",
2020
"spawk": "^1.8.1",
2121
"tap": "^16.0.1"
2222
},
@@ -42,7 +42,7 @@
4242
},
4343
"templateOSS": {
4444
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
45-
"version": "4.23.4",
45+
"version": "4.24.1",
4646
"publish": "true"
4747
},
4848
"tap": {

package-lock.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292
"@npmcli/package-json": "^6.1.1",
9393
"@npmcli/promise-spawn": "^8.0.2",
9494
"@npmcli/redact": "^3.1.1",
95-
"@npmcli/run-script": "^9.0.1",
95+
"@npmcli/run-script": "^9.1.0",
9696
"@sigstore/tuf": "^3.0.0",
9797
"abbrev": "^3.0.0",
9898
"archy": "~1.0.0",
@@ -3726,9 +3726,9 @@
37263726
}
37273727
},
37283728
"node_modules/@npmcli/run-script": {
3729-
"version": "9.0.2",
3730-
"resolved": "https://registry.npmjs.org/@npmcli/run-script/-/run-script-9.0.2.tgz",
3731-
"integrity": "sha512-cJXiUlycdizQwvqE1iaAb4VRUM3RX09/8q46zjvy+ct9GhfZRWd7jXYVc1tn/CfRlGPVkX/u4sstRlepsm7hfw==",
3729+
"version": "9.1.0",
3730+
"resolved": "https://registry.npmjs.org/@npmcli/run-script/-/run-script-9.1.0.tgz",
3731+
"integrity": "sha512-aoNSbxtkePXUlbZB+anS1LqsJdctG5n3UVhfU47+CDdwMi6uNTBMF9gPcQRnqghQd2FGzcwwIFBruFMxjhBewg==",
37323732
"inBundle": true,
37333733
"license": "ISC",
37343734
"dependencies": {

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
"@npmcli/package-json": "^6.1.1",
6060
"@npmcli/promise-spawn": "^8.0.2",
6161
"@npmcli/redact": "^3.1.1",
62-
"@npmcli/run-script": "^9.0.1",
62+
"@npmcli/run-script": "^9.1.0",
6363
"@sigstore/tuf": "^3.0.0",
6464
"abbrev": "^3.0.0",
6565
"archy": "~1.0.0",

0 commit comments

Comments
 (0)