-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
deps: update @npmcli/promise-spawn@8.0.1
- Loading branch information
Showing
33 changed files
with
1,458 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
50 changes: 50 additions & 0 deletions
50
node_modules/@npmcli/git/node_modules/@npmcli/promise-spawn/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
{ | ||
"name": "@npmcli/promise-spawn", | ||
"version": "7.0.2", | ||
"files": [ | ||
"bin/", | ||
"lib/" | ||
], | ||
"main": "./lib/index.js", | ||
"description": "spawn processes the way the npm cli likes to do", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/npm/promise-spawn.git" | ||
}, | ||
"author": "GitHub Inc.", | ||
"license": "ISC", | ||
"scripts": { | ||
"test": "tap", | ||
"snap": "tap", | ||
"lint": "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\"", | ||
"lintfix": "npm run lint -- --fix", | ||
"posttest": "npm run lint", | ||
"postsnap": "npm run lintfix --", | ||
"postlint": "template-oss-check", | ||
"template-oss-apply": "template-oss-apply --force" | ||
}, | ||
"tap": { | ||
"check-coverage": true, | ||
"nyc-arg": [ | ||
"--exclude", | ||
"tap-snapshots/**" | ||
] | ||
}, | ||
"devDependencies": { | ||
"@npmcli/eslint-config": "^4.0.0", | ||
"@npmcli/template-oss": "4.22.0", | ||
"spawk": "^1.7.1", | ||
"tap": "^16.0.1" | ||
}, | ||
"engines": { | ||
"node": "^16.14.0 || >=18.0.0" | ||
}, | ||
"templateOSS": { | ||
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", | ||
"version": "4.22.0", | ||
"publish": true | ||
}, | ||
"dependencies": { | ||
"which": "^4.0.0" | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
node_modules/@npmcli/promise-spawn/node_modules/isexe/LICENSE
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
The ISC License | ||
|
||
Copyright (c) 2016-2022 Isaac Z. Schlueter and Contributors | ||
|
||
Permission to use, copy, modify, and/or distribute this software for any | ||
purpose with or without fee is hereby granted, provided that the above | ||
copyright notice and this permission notice appear in all copies. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR | ||
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
46 changes: 46 additions & 0 deletions
46
node_modules/@npmcli/promise-spawn/node_modules/isexe/dist/cjs/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
desc = { enumerable: true, get: function() { return m[k]; } }; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
}) : function(o, v) { | ||
o["default"] = v; | ||
}); | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
}; | ||
var __exportStar = (this && this.__exportStar) || function(m, exports) { | ||
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.sync = exports.isexe = exports.posix = exports.win32 = void 0; | ||
const posix = __importStar(require("./posix.js")); | ||
exports.posix = posix; | ||
const win32 = __importStar(require("./win32.js")); | ||
exports.win32 = win32; | ||
__exportStar(require("./options.js"), exports); | ||
const platform = process.env._ISEXE_TEST_PLATFORM_ || process.platform; | ||
const impl = platform === 'win32' ? win32 : posix; | ||
/** | ||
* Determine whether a path is executable on the current platform. | ||
*/ | ||
exports.isexe = impl.isexe; | ||
/** | ||
* Synchronously determine whether a path is executable on the | ||
* current platform. | ||
*/ | ||
exports.sync = impl.sync; | ||
//# sourceMappingURL=index.js.map |
3 changes: 3 additions & 0 deletions
3
node_modules/@npmcli/promise-spawn/node_modules/isexe/dist/cjs/options.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
//# sourceMappingURL=options.js.map |
3 changes: 3 additions & 0 deletions
3
node_modules/@npmcli/promise-spawn/node_modules/isexe/dist/cjs/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"type": "commonjs" | ||
} |
67 changes: 67 additions & 0 deletions
67
node_modules/@npmcli/promise-spawn/node_modules/isexe/dist/cjs/posix.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
"use strict"; | ||
/** | ||
* This is the Posix implementation of isexe, which uses the file | ||
* mode and uid/gid values. | ||
* | ||
* @module | ||
*/ | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.sync = exports.isexe = void 0; | ||
const fs_1 = require("fs"); | ||
const promises_1 = require("fs/promises"); | ||
/** | ||
* Determine whether a path is executable according to the mode and | ||
* current (or specified) user and group IDs. | ||
*/ | ||
const isexe = async (path, options = {}) => { | ||
const { ignoreErrors = false } = options; | ||
try { | ||
return checkStat(await (0, promises_1.stat)(path), options); | ||
} | ||
catch (e) { | ||
const er = e; | ||
if (ignoreErrors || er.code === 'EACCES') | ||
return false; | ||
throw er; | ||
} | ||
}; | ||
exports.isexe = isexe; | ||
/** | ||
* Synchronously determine whether a path is executable according to | ||
* the mode and current (or specified) user and group IDs. | ||
*/ | ||
const sync = (path, options = {}) => { | ||
const { ignoreErrors = false } = options; | ||
try { | ||
return checkStat((0, fs_1.statSync)(path), options); | ||
} | ||
catch (e) { | ||
const er = e; | ||
if (ignoreErrors || er.code === 'EACCES') | ||
return false; | ||
throw er; | ||
} | ||
}; | ||
exports.sync = sync; | ||
const checkStat = (stat, options) => stat.isFile() && checkMode(stat, options); | ||
const checkMode = (stat, options) => { | ||
const myUid = options.uid ?? process.getuid?.(); | ||
const myGroups = options.groups ?? process.getgroups?.() ?? []; | ||
const myGid = options.gid ?? process.getgid?.() ?? myGroups[0]; | ||
if (myUid === undefined || myGid === undefined) { | ||
throw new Error('cannot get uid or gid'); | ||
} | ||
const groups = new Set([myGid, ...myGroups]); | ||
const mod = stat.mode; | ||
const uid = stat.uid; | ||
const gid = stat.gid; | ||
const u = parseInt('100', 8); | ||
const g = parseInt('010', 8); | ||
const o = parseInt('001', 8); | ||
const ug = u | g; | ||
return !!(mod & o || | ||
(mod & g && groups.has(gid)) || | ||
(mod & u && uid === myUid) || | ||
(mod & ug && myUid === 0)); | ||
}; | ||
//# sourceMappingURL=posix.js.map |
62 changes: 62 additions & 0 deletions
62
node_modules/@npmcli/promise-spawn/node_modules/isexe/dist/cjs/win32.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
"use strict"; | ||
/** | ||
* This is the Windows implementation of isexe, which uses the file | ||
* extension and PATHEXT setting. | ||
* | ||
* @module | ||
*/ | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.sync = exports.isexe = void 0; | ||
const fs_1 = require("fs"); | ||
const promises_1 = require("fs/promises"); | ||
/** | ||
* Determine whether a path is executable based on the file extension | ||
* and PATHEXT environment variable (or specified pathExt option) | ||
*/ | ||
const isexe = async (path, options = {}) => { | ||
const { ignoreErrors = false } = options; | ||
try { | ||
return checkStat(await (0, promises_1.stat)(path), path, options); | ||
} | ||
catch (e) { | ||
const er = e; | ||
if (ignoreErrors || er.code === 'EACCES') | ||
return false; | ||
throw er; | ||
} | ||
}; | ||
exports.isexe = isexe; | ||
/** | ||
* Synchronously determine whether a path is executable based on the file | ||
* extension and PATHEXT environment variable (or specified pathExt option) | ||
*/ | ||
const sync = (path, options = {}) => { | ||
const { ignoreErrors = false } = options; | ||
try { | ||
return checkStat((0, fs_1.statSync)(path), path, options); | ||
} | ||
catch (e) { | ||
const er = e; | ||
if (ignoreErrors || er.code === 'EACCES') | ||
return false; | ||
throw er; | ||
} | ||
}; | ||
exports.sync = sync; | ||
const checkPathExt = (path, options) => { | ||
const { pathExt = process.env.PATHEXT || '' } = options; | ||
const peSplit = pathExt.split(';'); | ||
if (peSplit.indexOf('') !== -1) { | ||
return true; | ||
} | ||
for (let i = 0; i < peSplit.length; i++) { | ||
const p = peSplit[i].toLowerCase(); | ||
const ext = path.substring(path.length - p.length).toLowerCase(); | ||
if (p && ext === p) { | ||
return true; | ||
} | ||
} | ||
return false; | ||
}; | ||
const checkStat = (stat, path, options) => stat.isFile() && checkPathExt(path, options); | ||
//# sourceMappingURL=win32.js.map |
16 changes: 16 additions & 0 deletions
16
node_modules/@npmcli/promise-spawn/node_modules/isexe/dist/mjs/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import * as posix from './posix.js'; | ||
import * as win32 from './win32.js'; | ||
export * from './options.js'; | ||
export { win32, posix }; | ||
const platform = process.env._ISEXE_TEST_PLATFORM_ || process.platform; | ||
const impl = platform === 'win32' ? win32 : posix; | ||
/** | ||
* Determine whether a path is executable on the current platform. | ||
*/ | ||
export const isexe = impl.isexe; | ||
/** | ||
* Synchronously determine whether a path is executable on the | ||
* current platform. | ||
*/ | ||
export const sync = impl.sync; | ||
//# sourceMappingURL=index.js.map |
2 changes: 2 additions & 0 deletions
2
node_modules/@npmcli/promise-spawn/node_modules/isexe/dist/mjs/options.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export {}; | ||
//# sourceMappingURL=options.js.map |
3 changes: 3 additions & 0 deletions
3
node_modules/@npmcli/promise-spawn/node_modules/isexe/dist/mjs/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"type": "module" | ||
} |
62 changes: 62 additions & 0 deletions
62
node_modules/@npmcli/promise-spawn/node_modules/isexe/dist/mjs/posix.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
/** | ||
* This is the Posix implementation of isexe, which uses the file | ||
* mode and uid/gid values. | ||
* | ||
* @module | ||
*/ | ||
import { statSync } from 'fs'; | ||
import { stat } from 'fs/promises'; | ||
/** | ||
* Determine whether a path is executable according to the mode and | ||
* current (or specified) user and group IDs. | ||
*/ | ||
export const isexe = async (path, options = {}) => { | ||
const { ignoreErrors = false } = options; | ||
try { | ||
return checkStat(await stat(path), options); | ||
} | ||
catch (e) { | ||
const er = e; | ||
if (ignoreErrors || er.code === 'EACCES') | ||
return false; | ||
throw er; | ||
} | ||
}; | ||
/** | ||
* Synchronously determine whether a path is executable according to | ||
* the mode and current (or specified) user and group IDs. | ||
*/ | ||
export const sync = (path, options = {}) => { | ||
const { ignoreErrors = false } = options; | ||
try { | ||
return checkStat(statSync(path), options); | ||
} | ||
catch (e) { | ||
const er = e; | ||
if (ignoreErrors || er.code === 'EACCES') | ||
return false; | ||
throw er; | ||
} | ||
}; | ||
const checkStat = (stat, options) => stat.isFile() && checkMode(stat, options); | ||
const checkMode = (stat, options) => { | ||
const myUid = options.uid ?? process.getuid?.(); | ||
const myGroups = options.groups ?? process.getgroups?.() ?? []; | ||
const myGid = options.gid ?? process.getgid?.() ?? myGroups[0]; | ||
if (myUid === undefined || myGid === undefined) { | ||
throw new Error('cannot get uid or gid'); | ||
} | ||
const groups = new Set([myGid, ...myGroups]); | ||
const mod = stat.mode; | ||
const uid = stat.uid; | ||
const gid = stat.gid; | ||
const u = parseInt('100', 8); | ||
const g = parseInt('010', 8); | ||
const o = parseInt('001', 8); | ||
const ug = u | g; | ||
return !!(mod & o || | ||
(mod & g && groups.has(gid)) || | ||
(mod & u && uid === myUid) || | ||
(mod & ug && myUid === 0)); | ||
}; | ||
//# sourceMappingURL=posix.js.map |
Oops, something went wrong.