Skip to content

Commit 3b7f6f2

Browse files
committed
deps: @npmcli/promise-spawn@7.0.1
1 parent 7ecd146 commit 3b7f6f2

File tree

4 files changed

+21
-17
lines changed

4 files changed

+21
-17
lines changed

node_modules/@npmcli/promise-spawn/lib/index.js

+12-2
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,8 @@ const spawnWithShell = (cmd, args, opts, extra) => {
100100
let pathToInitial
101101
try {
102102
pathToInitial = which.sync(initialCmd, {
103-
path: (options.env && options.env.PATH) || process.env.PATH,
104-
pathext: (options.env && options.env.PATHEXT) || process.env.PATHEXT,
103+
path: (options.env && findInObject(options.env, 'PATH')) || process.env.PATH,
104+
pathext: (options.env && findInObject(options.env, 'PATHEXT')) || process.env.PATHEXT,
105105
}).toLowerCase()
106106
} catch (err) {
107107
pathToInitial = initialCmd.toLowerCase()
@@ -192,4 +192,14 @@ const stdioResult = (stdout, stderr, { stdioString = true, stdio }) => {
192192
return result
193193
}
194194

195+
// case insensitive lookup in an object
196+
const findInObject = (obj, key) => {
197+
key = key.toLowerCase()
198+
for (const objKey of Object.keys(obj).sort()) {
199+
if (objKey.toLowerCase() === key) {
200+
return obj[objKey]
201+
}
202+
}
203+
}
204+
195205
module.exports = promiseSpawn

node_modules/@npmcli/promise-spawn/package.json

+4-10
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@npmcli/promise-spawn",
3-
"version": "7.0.0",
3+
"version": "7.0.1",
44
"files": [
55
"bin/",
66
"lib/"
@@ -16,7 +16,7 @@
1616
"scripts": {
1717
"test": "tap",
1818
"snap": "tap",
19-
"lint": "eslint \"**/*.js\"",
19+
"lint": "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\"",
2020
"lintfix": "npm run lint -- --fix",
2121
"posttest": "npm run lint",
2222
"postsnap": "npm run lintfix --",
@@ -32,7 +32,7 @@
3232
},
3333
"devDependencies": {
3434
"@npmcli/eslint-config": "^4.0.0",
35-
"@npmcli/template-oss": "4.18.0",
35+
"@npmcli/template-oss": "4.21.3",
3636
"spawk": "^1.7.1",
3737
"tap": "^16.0.1"
3838
},
@@ -41,13 +41,7 @@
4141
},
4242
"templateOSS": {
4343
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
44-
"ciVersions": [
45-
"16.14.0",
46-
"16.x",
47-
"18.0.0",
48-
"18.x"
49-
],
50-
"version": "4.18.0",
44+
"version": "4.21.3",
5145
"publish": true
5246
},
5347
"dependencies": {

package-lock.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@
9595
"@npmcli/fs": "^3.1.0",
9696
"@npmcli/map-workspaces": "^3.0.4",
9797
"@npmcli/package-json": "^5.0.0",
98-
"@npmcli/promise-spawn": "^7.0.0",
98+
"@npmcli/promise-spawn": "^7.0.1",
9999
"@npmcli/run-script": "^7.0.2",
100100
"@sigstore/tuf": "^2.2.0",
101101
"abbrev": "^2.0.0",
@@ -1933,9 +1933,9 @@
19331933
}
19341934
},
19351935
"node_modules/@npmcli/promise-spawn": {
1936-
"version": "7.0.0",
1937-
"resolved": "https://registry.npmjs.org/@npmcli/promise-spawn/-/promise-spawn-7.0.0.tgz",
1938-
"integrity": "sha512-wBqcGsMELZna0jDblGd7UXgOby45TQaMWmbFwWX+SEotk4HV6zG2t6rT9siyLhPk4P6YYqgfL1UO8nMWDBVJXQ==",
1936+
"version": "7.0.1",
1937+
"resolved": "https://registry.npmjs.org/@npmcli/promise-spawn/-/promise-spawn-7.0.1.tgz",
1938+
"integrity": "sha512-P4KkF9jX3y+7yFUxgcUdDtLy+t4OlDGuEBLNs57AZsfSfg+uV6MLndqGpnl4831ggaEdXwR50XFoZP4VFtHolg==",
19391939
"inBundle": true,
19401940
"dependencies": {
19411941
"which": "^4.0.0"

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
"@npmcli/fs": "^3.1.0",
5858
"@npmcli/map-workspaces": "^3.0.4",
5959
"@npmcli/package-json": "^5.0.0",
60-
"@npmcli/promise-spawn": "^7.0.0",
60+
"@npmcli/promise-spawn": "^7.0.1",
6161
"@npmcli/run-script": "^7.0.2",
6262
"@sigstore/tuf": "^2.2.0",
6363
"abbrev": "^2.0.0",

0 commit comments

Comments
 (0)