Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions DEPENDENCIES.md
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,6 @@ graph LR;
npmcli-metavuln-calculator-->pacote;
npmcli-metavuln-calculator-->semver;
npmcli-package-json-->json-parse-even-better-errors;
npmcli-promise-spawn-->infer-owner;
npmcli-run-script-->npmcli-node-gyp["@npmcli/node-gyp"];
npmcli-run-script-->npmcli-promise-spawn["@npmcli/promise-spawn"];
npmcli-run-script-->read-package-json-fast;
Expand Down Expand Up @@ -870,7 +869,6 @@ graph LR;
npmcli-move-file-->mkdirp;
npmcli-move-file-->rimraf;
npmcli-package-json-->json-parse-even-better-errors;
npmcli-promise-spawn-->infer-owner;
npmcli-query-->postcss-selector-parser;
npmcli-run-script-->node-gyp;
npmcli-run-script-->npmcli-node-gyp["@npmcli/node-gyp"];
Expand Down Expand Up @@ -1102,5 +1100,5 @@ packages higher up the chain.
- npm-registry-fetch, libnpmversion
- @npmcli/git, make-fetch-happen, @npmcli/config, init-package-json
- @npmcli/installed-package-contents, @npmcli/map-workspaces, cacache, npm-pick-manifest, @npmcli/run-script, read-package-json, readdir-scoped-modules, promzard
- @npmcli/docs, npm-bundled, read-package-json-fast, @npmcli/fs, unique-filename, @npmcli/promise-spawn, npm-install-checks, npm-package-arg, npm-packlist, normalize-package-data, @npmcli/package-json, bin-links, nopt, npmlog, parse-conflict-json, dezalgo, read
- ignore-walk, @npmcli/eslint-config, @npmcli/template-oss, npm-normalize-package-bin, @npmcli/name-from-folder, json-parse-even-better-errors, semver, @npmcli/move-file, fs-minipass, ssri, unique-slug, infer-owner, hosted-git-info, proc-log, validate-npm-package-name, @npmcli/node-gyp, minipass-fetch, @npmcli/query, cmd-shim, read-cmd-shim, write-file-atomic, abbrev, are-we-there-yet, gauge, wrappy, treeverse, minify-registry-metadata, @npmcli/disparity-colors, @npmcli/ci-detect, mute-stream, ini, npm-audit-report, npm-user-validate
- @npmcli/docs, npm-bundled, read-package-json-fast, @npmcli/fs, unique-filename, npm-install-checks, npm-package-arg, npm-packlist, normalize-package-data, @npmcli/package-json, bin-links, nopt, npmlog, parse-conflict-json, dezalgo, read
- ignore-walk, @npmcli/eslint-config, @npmcli/template-oss, npm-normalize-package-bin, @npmcli/name-from-folder, json-parse-even-better-errors, semver, @npmcli/move-file, fs-minipass, ssri, unique-slug, @npmcli/promise-spawn, hosted-git-info, proc-log, validate-npm-package-name, @npmcli/node-gyp, minipass-fetch, @npmcli/query, cmd-shim, read-cmd-shim, write-file-atomic, abbrev, are-we-there-yet, gauge, wrappy, treeverse, minify-registry-metadata, @npmcli/disparity-colors, @npmcli/ci-detect, mute-stream, ini, npm-audit-report, npm-user-validate
10 changes: 5 additions & 5 deletions node_modules/@npmcli/git/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@npmcli/git",
"version": "4.0.1",
"version": "4.0.2",
"main": "lib/index.js",
"files": [
"bin/",
Expand Down Expand Up @@ -32,14 +32,14 @@
},
"devDependencies": {
"@npmcli/eslint-config": "^4.0.0",
"@npmcli/template-oss": "4.5.1",
"npm-package-arg": "^9.1.0",
"@npmcli/template-oss": "4.7.1",
"npm-package-arg": "^10.0.0",
"rimraf": "^3.0.2",
"slash": "^3.0.0",
"tap": "^16.0.1"
},
"dependencies": {
"@npmcli/promise-spawn": "^4.0.0",
"@npmcli/promise-spawn": "^5.0.0",
"lru-cache": "^7.4.4",
"mkdirp": "^1.0.4",
"npm-pick-manifest": "^8.0.0",
Expand All @@ -55,6 +55,6 @@
"templateOSS": {
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
"windowsCI": false,
"version": "4.5.1"
"version": "4.7.1"
}
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"name": "@npmcli/installed-package-contents",
"version": "2.0.0",
"version": "2.0.1",
"description": "Get the list of files installed in a package in node_modules, including bundled dependencies",
"author": "GitHub Inc.",
"main": "lib/index.js",
"bin": {
"installed-package-contents": "index.js"
"installed-package-contents": "lib/index.js"
},
"license": "ISC",
"scripts": {
Expand All @@ -19,7 +19,7 @@
},
"devDependencies": {
"@npmcli/eslint-config": "^4.0.0",
"@npmcli/template-oss": "4.5.1",
"@npmcli/template-oss": "4.6.2",
"mkdirp": "^1.0.4",
"require-inject": "^1.4.4",
"tap": "^16.3.0"
Expand All @@ -41,7 +41,7 @@
},
"templateOSS": {
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
"version": "4.5.1"
"version": "4.6.2"
},
"tap": {
"nyc-arg": [
Expand Down
33 changes: 10 additions & 23 deletions node_modules/@npmcli/promise-spawn/lib/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
const { spawn } = require('child_process')
const inferOwner = require('infer-owner')

const isPipe = (stdio = 'pipe', fd) =>
stdio === 'pipe' || stdio === null ? true
Expand All @@ -8,28 +7,6 @@ const isPipe = (stdio = 'pipe', fd) =>

// 'extra' object is for decorating the error a bit more
const promiseSpawn = (cmd, args, opts = {}, extra = {}) => {
const cwd = opts.cwd || process.cwd()
const isRoot = process.getuid && process.getuid() === 0
const { uid, gid } = isRoot ? inferOwner.sync(cwd) : {}
return promiseSpawnUid(cmd, args, {
...opts,
cwd,
uid,
gid,
}, extra)
}

const stdioResult = (stdout, stderr, { stdioString, stdio }) =>
stdioString ? {
stdout: isPipe(stdio, 1) ? Buffer.concat(stdout).toString() : null,
stderr: isPipe(stdio, 2) ? Buffer.concat(stderr).toString() : null,
}
: {
stdout: isPipe(stdio, 1) ? Buffer.concat(stdout) : null,
stderr: isPipe(stdio, 2) ? Buffer.concat(stderr) : null,
}

const promiseSpawnUid = (cmd, args, opts, extra) => {
let proc
const p = new Promise((res, rej) => {
proc = spawn(cmd, args, opts)
Expand Down Expand Up @@ -72,4 +49,14 @@ const promiseSpawnUid = (cmd, args, opts, extra) => {
return p
}

const stdioResult = (stdout, stderr, { stdioString, stdio }) =>
stdioString ? {
stdout: isPipe(stdio, 1) ? Buffer.concat(stdout).toString().trim() : null,
stderr: isPipe(stdio, 2) ? Buffer.concat(stderr).toString().trim() : null,
}
: {
stdout: isPipe(stdio, 1) ? Buffer.concat(stdout) : null,
stderr: isPipe(stdio, 2) ? Buffer.concat(stderr) : null,
}

module.exports = promiseSpawn
11 changes: 4 additions & 7 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": "4.0.0",
"version": "5.0.0",
"files": [
"bin/",
"lib/"
Expand Down Expand Up @@ -31,8 +31,8 @@
]
},
"devDependencies": {
"@npmcli/eslint-config": "^3.0.1",
"@npmcli/template-oss": "4.5.1",
"@npmcli/eslint-config": "^4.0.0",
"@npmcli/template-oss": "4.7.1",
"minipass": "^3.1.1",
"tap": "^16.0.1"
},
Expand All @@ -41,9 +41,6 @@
},
"templateOSS": {
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
"version": "4.5.1"
},
"dependencies": {
"infer-owner": "^1.0.4"
"version": "4.7.1"
}
}
8 changes: 4 additions & 4 deletions node_modules/@npmcli/run-script/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@npmcli/run-script",
"version": "5.0.0",
"version": "5.0.1",
"description": "Run a lifecycle script for a package (descendant of npm-lifecycle)",
"author": "GitHub Inc.",
"license": "ISC",
Expand All @@ -16,14 +16,14 @@
},
"devDependencies": {
"@npmcli/eslint-config": "^4.0.0",
"@npmcli/template-oss": "4.5.1",
"@npmcli/template-oss": "4.7.1",
"minipass": "^3.1.6",
"require-inject": "^1.4.4",
"tap": "^16.0.1"
},
"dependencies": {
"@npmcli/node-gyp": "^3.0.0",
"@npmcli/promise-spawn": "^4.0.0",
"@npmcli/promise-spawn": "^5.0.0",
"node-gyp": "^9.0.0",
"read-package-json-fast": "^3.0.0",
"which": "^2.0.2"
Expand All @@ -42,7 +42,7 @@
},
"templateOSS": {
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
"version": "4.5.1"
"version": "4.7.1"
},
"tap": {
"nyc-arg": [
Expand Down
12 changes: 6 additions & 6 deletions node_modules/pacote/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pacote",
"version": "15.0.2",
"version": "15.0.4",
"description": "JavaScript package downloader",
"author": "GitHub Inc.",
"bin": {
Expand All @@ -26,8 +26,8 @@
},
"devDependencies": {
"@npmcli/arborist": "^6.0.0 || ^6.0.0-pre.0",
"@npmcli/eslint-config": "^3.1.0",
"@npmcli/template-oss": "4.6.2",
"@npmcli/eslint-config": "^4.0.0",
"@npmcli/template-oss": "4.7.1",
"hosted-git-info": "^6.0.0",
"mutate-fs": "^2.1.1",
"nock": "^13.2.4",
Expand All @@ -45,8 +45,8 @@
],
"dependencies": {
"@npmcli/git": "^4.0.0",
"@npmcli/installed-package-contents": "^2.0.0",
"@npmcli/promise-spawn": "^4.0.0",
"@npmcli/installed-package-contents": "^2.0.1",
"@npmcli/promise-spawn": "^5.0.0",
"@npmcli/run-script": "^5.0.0",
"cacache": "^17.0.0",
"fs-minipass": "^2.1.0",
Expand All @@ -71,7 +71,7 @@
},
"templateOSS": {
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
"version": "4.6.2",
"version": "4.7.1",
"windowsCI": false
}
}
47 changes: 22 additions & 25 deletions package-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@
"@npmcli/docs": "^1.0.0",
"@npmcli/eslint-config": "^4.0.0",
"@npmcli/git": "^4.0.1",
"@npmcli/promise-spawn": "^4.0.0",
"@npmcli/promise-spawn": "^5.0.0",
"@npmcli/template-oss": "4.6.2",
"licensee": "^8.2.0",
"nock": "^13.2.4",
Expand Down Expand Up @@ -2224,12 +2224,12 @@
}
},
"node_modules/@npmcli/git": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/@npmcli/git/-/git-4.0.1.tgz",
"integrity": "sha512-sfaCFyZO7Zsxia2TNHW8TeHFIUnK63896EZFA5K0vCReOMFi9aELB5RZyFveRLaBE/pT1BS6RxbTWZGjulNgSg==",
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/@npmcli/git/-/git-4.0.2.tgz",
"integrity": "sha512-jBSmCI3F6KTZrWwez6mH6lJPWg3llZlQiHR05/sOw83H1vMc9nnL39ceP8x3SEkDJkaluXG/w4drdYS4FDONgA==",
"inBundle": true,
"dependencies": {
"@npmcli/promise-spawn": "^4.0.0",
"@npmcli/promise-spawn": "^5.0.0",
"lru-cache": "^7.4.4",
"mkdirp": "^1.0.4",
"npm-pick-manifest": "^8.0.0",
Expand All @@ -2244,16 +2244,16 @@
}
},
"node_modules/@npmcli/installed-package-contents": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/@npmcli/installed-package-contents/-/installed-package-contents-2.0.0.tgz",
"integrity": "sha512-vpPDeSnqHAXaPK1l6lcIcpgK/aIe63AbNR5vbzOhO6I2rkaFZmviQZ5nAlSpt+vwKrOH1CnplOdoE5/x8FWtNA==",
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/@npmcli/installed-package-contents/-/installed-package-contents-2.0.1.tgz",
"integrity": "sha512-GIykAFdOVK31Q1/zAtT5MbxqQL2vyl9mvFJv+OGu01zxbhL3p0xc8gJjdNGX1mWmUT43aEKVO2L6V/2j4TOsAA==",
"inBundle": true,
"dependencies": {
"npm-bundled": "^3.0.0",
"npm-normalize-package-bin": "^3.0.0"
},
"bin": {
"installed-package-contents": "index.js"
"installed-package-contents": "lib/index.js"
},
"engines": {
"node": "^14.17.0 || ^16.13.0 || >=18.0.0"
Expand Down Expand Up @@ -2328,13 +2328,10 @@
}
},
"node_modules/@npmcli/promise-spawn": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/@npmcli/promise-spawn/-/promise-spawn-4.0.0.tgz",
"integrity": "sha512-LM/GRZSwkxar1jgd58yW5WspFWrFefh8a/KVy+sbOMa0pCwqlXWxXEjQRQzbtWExyhwPb2XSK/4mJnLeiVOYng==",
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/@npmcli/promise-spawn/-/promise-spawn-5.0.0.tgz",
"integrity": "sha512-q+Le2urM3NdxSFHj+VZXLTHKgmWxqHXUSqM5m9bjnV3EtThtJor64f5inmBkO9uEGZnhpjW0wL67Qf5qcgZkxw==",
"inBundle": true,
"dependencies": {
"infer-owner": "^1.0.4"
},
"engines": {
"node": "^14.17.0 || ^16.13.0 || >=18.0.0"
}
Expand All @@ -2351,13 +2348,13 @@
}
},
"node_modules/@npmcli/run-script": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/@npmcli/run-script/-/run-script-5.0.0.tgz",
"integrity": "sha512-AuqcoTOt7v4D2JqC7mCa+eUQHb64vWbwyu9o1hoJiq2kfZNwCB71f0s7tvUw+v+1B5XMdqcr98aGzjKIg7s6Vw==",
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/@npmcli/run-script/-/run-script-5.0.1.tgz",
"integrity": "sha512-co/A+5LzdHQVLukfYT71x5e8+6HtIk2W9Jk5c8mE8LaGrkHazzRuZeyUmb6Ciaak7MRXRVOSoTaZ0zYEFVA/Gw==",
"inBundle": true,
"dependencies": {
"@npmcli/node-gyp": "^3.0.0",
"@npmcli/promise-spawn": "^4.0.0",
"@npmcli/promise-spawn": "^5.0.0",
"node-gyp": "^9.0.0",
"read-package-json-fast": "^3.0.0",
"which": "^2.0.2"
Expand Down Expand Up @@ -8920,14 +8917,14 @@
}
},
"node_modules/pacote": {
"version": "15.0.2",
"resolved": "https://registry.npmjs.org/pacote/-/pacote-15.0.2.tgz",
"integrity": "sha512-Gj4w436jiM9/0574JGI8nxpsuXssp5OhyBhnWijvzUVJdU5GvNvnYUgd5WA6mr6ImOQ7JqWqdA44ixBqqMfyZQ==",
"version": "15.0.4",
"resolved": "https://registry.npmjs.org/pacote/-/pacote-15.0.4.tgz",
"integrity": "sha512-6lSP0ly54fKrPIvXmVcmslqrcF8DL3y/RlNLwBWG1A3wd8sWcPF8hikTJDWqXUPMw6L04p6gqsJ/iLgRjth+6A==",
"inBundle": true,
"dependencies": {
"@npmcli/git": "^4.0.0",
"@npmcli/installed-package-contents": "^2.0.0",
"@npmcli/promise-spawn": "^4.0.0",
"@npmcli/installed-package-contents": "^2.0.1",
"@npmcli/promise-spawn": "^5.0.0",
"@npmcli/run-script": "^5.0.0",
"cacache": "^17.0.0",
"fs-minipass": "^2.1.0",
Expand Down Expand Up @@ -14024,7 +14021,7 @@
"license": "ISC",
"devDependencies": {
"@npmcli/eslint-config": "^4.0.0",
"@npmcli/promise-spawn": "^4.0.0",
"@npmcli/promise-spawn": "^5.0.0",
"@npmcli/template-oss": "4.6.2",
"minify-registry-metadata": "^2.2.0",
"rimraf": "^3.0.2",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@
"@npmcli/docs": "^1.0.0",
"@npmcli/eslint-config": "^4.0.0",
"@npmcli/git": "^4.0.1",
"@npmcli/promise-spawn": "^4.0.0",
"@npmcli/promise-spawn": "^5.0.0",
"@npmcli/template-oss": "4.6.2",
"licensee": "^8.2.0",
"nock": "^13.2.4",
Expand Down
2 changes: 1 addition & 1 deletion smoke-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
},
"devDependencies": {
"@npmcli/eslint-config": "^4.0.0",
"@npmcli/promise-spawn": "^4.0.0",
"@npmcli/promise-spawn": "^5.0.0",
"@npmcli/template-oss": "4.6.2",
"minify-registry-metadata": "^2.2.0",
"rimraf": "^3.0.2",
Expand Down
Loading