Skip to content

Commit

Permalink
deps: @npmcli/promise-spawn@7.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
wraithgar committed Jan 9, 2024
1 parent 7ecd146 commit 3b7f6f2
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 17 deletions.
14 changes: 12 additions & 2 deletions node_modules/@npmcli/promise-spawn/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ const spawnWithShell = (cmd, args, opts, extra) => {
let pathToInitial
try {
pathToInitial = which.sync(initialCmd, {
path: (options.env && options.env.PATH) || process.env.PATH,
pathext: (options.env && options.env.PATHEXT) || process.env.PATHEXT,
path: (options.env && findInObject(options.env, 'PATH')) || process.env.PATH,
pathext: (options.env && findInObject(options.env, 'PATHEXT')) || process.env.PATHEXT,
}).toLowerCase()
} catch (err) {
pathToInitial = initialCmd.toLowerCase()
Expand Down Expand Up @@ -192,4 +192,14 @@ const stdioResult = (stdout, stderr, { stdioString = true, stdio }) => {
return result
}

// case insensitive lookup in an object
const findInObject = (obj, key) => {
key = key.toLowerCase()
for (const objKey of Object.keys(obj).sort()) {
if (objKey.toLowerCase() === key) {
return obj[objKey]
}
}
}

module.exports = promiseSpawn
14 changes: 4 additions & 10 deletions node_modules/@npmcli/promise-spawn/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@npmcli/promise-spawn",
"version": "7.0.0",
"version": "7.0.1",
"files": [
"bin/",
"lib/"
Expand All @@ -16,7 +16,7 @@
"scripts": {
"test": "tap",
"snap": "tap",
"lint": "eslint \"**/*.js\"",
"lint": "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\"",
"lintfix": "npm run lint -- --fix",
"posttest": "npm run lint",
"postsnap": "npm run lintfix --",
Expand All @@ -32,7 +32,7 @@
},
"devDependencies": {
"@npmcli/eslint-config": "^4.0.0",
"@npmcli/template-oss": "4.18.0",
"@npmcli/template-oss": "4.21.3",
"spawk": "^1.7.1",
"tap": "^16.0.1"
},
Expand All @@ -41,13 +41,7 @@
},
"templateOSS": {
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
"ciVersions": [
"16.14.0",
"16.x",
"18.0.0",
"18.x"
],
"version": "4.18.0",
"version": "4.21.3",
"publish": true
},
"dependencies": {
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
"@npmcli/fs": "^3.1.0",
"@npmcli/map-workspaces": "^3.0.4",
"@npmcli/package-json": "^5.0.0",
"@npmcli/promise-spawn": "^7.0.0",
"@npmcli/promise-spawn": "^7.0.1",
"@npmcli/run-script": "^7.0.2",
"@sigstore/tuf": "^2.2.0",
"abbrev": "^2.0.0",
Expand Down Expand Up @@ -1933,9 +1933,9 @@
}
},
"node_modules/@npmcli/promise-spawn": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/@npmcli/promise-spawn/-/promise-spawn-7.0.0.tgz",
"integrity": "sha512-wBqcGsMELZna0jDblGd7UXgOby45TQaMWmbFwWX+SEotk4HV6zG2t6rT9siyLhPk4P6YYqgfL1UO8nMWDBVJXQ==",
"version": "7.0.1",
"resolved": "https://registry.npmjs.org/@npmcli/promise-spawn/-/promise-spawn-7.0.1.tgz",
"integrity": "sha512-P4KkF9jX3y+7yFUxgcUdDtLy+t4OlDGuEBLNs57AZsfSfg+uV6MLndqGpnl4831ggaEdXwR50XFoZP4VFtHolg==",
"inBundle": true,
"dependencies": {
"which": "^4.0.0"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"@npmcli/fs": "^3.1.0",
"@npmcli/map-workspaces": "^3.0.4",
"@npmcli/package-json": "^5.0.0",
"@npmcli/promise-spawn": "^7.0.0",
"@npmcli/promise-spawn": "^7.0.1",
"@npmcli/run-script": "^7.0.2",
"@sigstore/tuf": "^2.2.0",
"abbrev": "^2.0.0",
Expand Down

0 comments on commit 3b7f6f2

Please sign in to comment.