Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deps updates / test fix #7173

Merged
merged 6 commits into from
Jan 23, 2024
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
13 changes: 7 additions & 6 deletions DEPENDENCIES.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,8 @@ graph LR;
npmcli-package-json-->proc-log;
npmcli-package-json-->semver;
npmcli-run-script-->npmcli-node-gyp["@npmcli/node-gyp"];
npmcli-run-script-->npmcli-package-json["@npmcli/package-json"];
npmcli-run-script-->npmcli-promise-spawn["@npmcli/promise-spawn"];
npmcli-run-script-->read-package-json-fast;
npmcli-smoke-tests-->npmcli-eslint-config["@npmcli/eslint-config"];
npmcli-smoke-tests-->npmcli-mock-registry["@npmcli/mock-registry"];
npmcli-smoke-tests-->npmcli-promise-spawn["@npmcli/promise-spawn"];
Expand Down Expand Up @@ -702,8 +702,8 @@ graph LR;
npmcli-query-->postcss-selector-parser;
npmcli-run-script-->node-gyp;
npmcli-run-script-->npmcli-node-gyp["@npmcli/node-gyp"];
npmcli-run-script-->npmcli-package-json["@npmcli/package-json"];
npmcli-run-script-->npmcli-promise-spawn["@npmcli/promise-spawn"];
npmcli-run-script-->read-package-json-fast;
npmcli-run-script-->which;
npmcli-smoke-tests-->npmcli-eslint-config["@npmcli/eslint-config"];
npmcli-smoke-tests-->npmcli-mock-registry["@npmcli/mock-registry"];
Expand Down Expand Up @@ -823,9 +823,10 @@ packages higher up the chain.
- @npmcli/mock-registry, libnpmdiff, libnpmfund, libnpmpack
- @npmcli/arborist
- @npmcli/metavuln-calculator
- pacote, libnpmhook, libnpmorg, libnpmsearch, libnpmteam, npm-profile
- npm-registry-fetch, @npmcli/package-json, libnpmversion
- pacote, libnpmversion
- @npmcli/run-script, libnpmhook, libnpmorg, libnpmsearch, libnpmteam, npm-profile
- @npmcli/package-json, npm-registry-fetch
- @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, promzard
- @npmcli/docs, @npmcli/fs, npm-bundled, read-package-json-fast, unique-filename, npm-install-checks, npm-package-arg, npm-packlist, normalize-package-data, bin-links, nopt, npmlog, parse-conflict-json, @npmcli/mock-globals, read
- @npmcli/installed-package-contents, @npmcli/map-workspaces, cacache, npm-pick-manifest, read-package-json, promzard
- @npmcli/docs, @npmcli/fs, npm-bundled, read-package-json-fast, unique-filename, npm-install-checks, npm-package-arg, normalize-package-data, npm-packlist, bin-links, nopt, npmlog, parse-conflict-json, @npmcli/mock-globals, read
- @npmcli/eslint-config, @npmcli/template-oss, ignore-walk, semver, npm-normalize-package-bin, @npmcli/name-from-folder, json-parse-even-better-errors, fs-minipass, ssri, unique-slug, @npmcli/promise-spawn, hosted-git-info, proc-log, validate-npm-package-name, @npmcli/node-gyp, @npmcli/agent, minipass-fetch, @npmcli/query, cmd-shim, read-cmd-shim, write-file-atomic, abbrev, are-we-there-yet, gauge, minify-registry-metadata, ini, @npmcli/disparity-colors, mute-stream, npm-audit-report, npm-user-validate
29 changes: 4 additions & 25 deletions node_modules/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@
!/@isaacs/cliui
!/@isaacs/cliui/node_modules/
/@isaacs/cliui/node_modules/*
!/@isaacs/cliui/node_modules/ansi-regex
!/@isaacs/cliui/node_modules/emoji-regex
!/@isaacs/cliui/node_modules/string-width
!/@isaacs/cliui/node_modules/strip-ansi
!/@isaacs/string-locale-compare
!/@npmcli/
/@npmcli/*
Expand Down Expand Up @@ -67,21 +69,13 @@
!/cidr-regex
!/clean-stack
!/cli-columns
!/cli-columns/node_modules/
/cli-columns/node_modules/*
!/cli-columns/node_modules/ansi-regex
!/cli-columns/node_modules/strip-ansi
!/cli-table3
!/clone
!/cmd-shim
!/color-convert
!/color-name
!/color-support
!/columnify
!/columnify/node_modules/
/columnify/node_modules/*
!/columnify/node_modules/ansi-regex
!/columnify/node_modules/strip-ansi
!/common-ancestor-path
!/console-control-strings
!/cross-spawn
Expand All @@ -106,10 +100,6 @@
!/fs-minipass
!/function-bind
!/gauge
!/gauge/node_modules/
/gauge/node_modules/*
!/gauge/node_modules/ansi-regex
!/gauge/node_modules/strip-ansi
!/glob
!/graceful-fs
!/has-unicode
Expand Down Expand Up @@ -218,19 +208,8 @@
!/spdx-license-ids
!/ssri
!/string-width-cjs
!/string-width-cjs/node_modules/
/string-width-cjs/node_modules/*
!/string-width-cjs/node_modules/ansi-regex
!/string-width-cjs/node_modules/strip-ansi
!/string-width
!/string-width/node_modules/
/string-width/node_modules/*
!/string-width/node_modules/ansi-regex
!/string-width/node_modules/strip-ansi
!/strip-ansi-cjs
!/strip-ansi-cjs/node_modules/
/strip-ansi-cjs/node_modules/*
!/strip-ansi-cjs/node_modules/ansi-regex
!/strip-ansi
!/supports-color
!/tar
Expand Down Expand Up @@ -260,14 +239,14 @@
!/wrap-ansi-cjs
!/wrap-ansi-cjs/node_modules/
/wrap-ansi-cjs/node_modules/*
!/wrap-ansi-cjs/node_modules/ansi-regex
!/wrap-ansi-cjs/node_modules/ansi-styles
!/wrap-ansi-cjs/node_modules/strip-ansi
!/wrap-ansi
!/wrap-ansi/node_modules/
/wrap-ansi/node_modules/*
!/wrap-ansi/node_modules/ansi-regex
!/wrap-ansi/node_modules/emoji-regex
!/wrap-ansi/node_modules/string-width
!/wrap-ansi/node_modules/strip-ansi
!/write-file-atomic
!/yallist
# Always ignore some specific patterns within any allowed package
Expand Down
8 changes: 8 additions & 0 deletions node_modules/@isaacs/cliui/node_modules/ansi-regex/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
export default function ansiRegex({onlyFirst = false} = {}) {
const pattern = [
'[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)',
'(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))'
].join('|');

return new RegExp(pattern, onlyFirst ? undefined : 'g');
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
{
"name": "ansi-regex",
"version": "5.0.1",
"version": "6.0.1",
"description": "Regular expression for matching ANSI escape codes",
"license": "MIT",
"repository": "chalk/ansi-regex",
"funding": "https://github.com/chalk/ansi-regex?sponsor=1",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "sindresorhus.com"
"url": "https://sindresorhus.com"
},
"type": "module",
"exports": "./index.js",
"engines": {
"node": ">=8"
"node": ">=12"
},
"scripts": {
"test": "xo && ava && tsd",
Expand Down Expand Up @@ -48,8 +51,8 @@
"pattern"
],
"devDependencies": {
"ava": "^2.4.0",
"tsd": "^0.9.0",
"xo": "^0.25.3"
"ava": "^3.15.0",
"tsd": "^0.14.0",
"xo": "^0.38.2"
}
}
14 changes: 14 additions & 0 deletions node_modules/@isaacs/cliui/node_modules/strip-ansi/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import ansiRegex from 'ansi-regex';

const regex = ansiRegex();

export default function stripAnsi(string) {
if (typeof string !== 'string') {
throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``);
}

// Even though the regex is global, we don't need to reset the `.lastIndex`
// because unlike `.exec()` and `.test()`, `.replace()` does it automatically
// and doing it manually has a performance penalty.
return string.replace(regex, '');
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
{
"name": "strip-ansi",
"version": "6.0.1",
"version": "7.1.0",
"description": "Strip ANSI escape codes from a string",
"license": "MIT",
"repository": "chalk/strip-ansi",
"funding": "https://github.com/chalk/strip-ansi?sponsor=1",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "sindresorhus.com"
"url": "https://sindresorhus.com"
},
"type": "module",
"exports": "./index.js",
"engines": {
"node": ">=8"
"node": ">=12"
},
"scripts": {
"test": "xo && ava && tsd"
Expand Down Expand Up @@ -44,11 +47,11 @@
"text"
],
"dependencies": {
"ansi-regex": "^5.0.1"
"ansi-regex": "^6.0.1"
},
"devDependencies": {
"ava": "^2.4.0",
"tsd": "^0.10.0",
"xo": "^0.25.3"
"ava": "^3.15.0",
"tsd": "^0.17.0",
"xo": "^0.44.0"
}
}
7 changes: 3 additions & 4 deletions node_modules/@npmcli/run-script/lib/is-server-package.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
const util = require('util')
const fs = require('fs')
const { stat } = fs.promises || { stat: util.promisify(fs.stat) }
const { resolve } = require('path')
const { stat } = require('node:fs/promises')
const { resolve } = require('node:path')

module.exports = async path => {
try {
const st = await stat(resolve(path, 'server.js'))
Expand Down
2 changes: 0 additions & 2 deletions node_modules/@npmcli/run-script/lib/is-windows.js

This file was deleted.

4 changes: 2 additions & 2 deletions node_modules/@npmcli/run-script/lib/make-spawn-args.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ const makeSpawnArgs = options => {
path,
scriptShell = true,
binPaths,
env = {},
env,
stdio,
cmd,
args = [],
args,
stdioString,
} = options

Expand Down
37 changes: 20 additions & 17 deletions node_modules/@npmcli/run-script/lib/package-envs.js
Original file line number Diff line number Diff line change
@@ -1,26 +1,29 @@
// https://github.com/npm/rfcs/pull/183

const envVal = val => Array.isArray(val) ? val.map(v => envVal(v)).join('\n\n')
: val === null || val === false ? ''
: String(val)

const packageEnvs = (env, vals, prefix) => {
const packageEnvs = (vals, prefix, env = {}) => {
for (const [key, val] of Object.entries(vals)) {
if (val === undefined) {
continue
} else if (val && !Array.isArray(val) && typeof val === 'object') {
packageEnvs(env, val, `${prefix}${key}_`)
} else if (val === null || val === false) {
env[`${prefix}${key}`] = ''
} else if (Array.isArray(val)) {
val.forEach((item, index) => {
packageEnvs({ [`${key}_${index}`]: item }, `${prefix}`, env)
})
} else if (typeof val === 'object') {
packageEnvs(val, `${prefix}${key}_`, env)
} else {
env[`${prefix}${key}`] = envVal(val)
env[`${prefix}${key}`] = String(val)
}
}
return env
}

module.exports = (env, pkg) => packageEnvs({ ...env }, {
name: pkg.name,
version: pkg.version,
config: pkg.config,
engines: pkg.engines,
bin: pkg.bin,
}, 'npm_package_')
// https://github.com/npm/rfcs/pull/183 defines which fields we put into the environment
module.exports = pkg => {
return packageEnvs({
name: pkg.name,
version: pkg.version,
config: pkg.config,
engines: pkg.engines,
bin: pkg.bin,
}, 'npm_package_')
}
4 changes: 3 additions & 1 deletion node_modules/@npmcli/run-script/lib/run-script-pkg.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ const runScriptPkg = async options => {
path,
scriptShell,
binPaths,
env: packageEnvs(env, pkg),
env: { ...env, ...packageEnvs(pkg) },
stdio,
cmd,
args,
Expand All @@ -93,6 +93,8 @@ const runScriptPkg = async options => {

return p.catch(er => {
const { signal } = er
// coverage disabled because win32 never emits signals
/* istanbul ignore next */
if (stdio === 'inherit' && signal) {
// by the time we reach here, the child has already exited. we send the
// signal back to ourselves again so that npm will exit with the same
Expand Down
13 changes: 7 additions & 6 deletions node_modules/@npmcli/run-script/lib/run-script.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
const rpj = require('read-package-json-fast')
const PackageJson = require('@npmcli/package-json')
const runScriptPkg = require('./run-script-pkg.js')
const validateOptions = require('./validate-options.js')
const isServerPackage = require('./is-server-package.js')

const runScript = options => {
const runScript = async options => {
validateOptions(options)
const { pkg, path } = options
return pkg ? runScriptPkg(options)
: rpj(path + '/package.json')
.then(readPackage => runScriptPkg({ ...options, pkg: readPackage }))
if (options.pkg) {
return runScriptPkg(options)
}
const { content: pkg } = await PackageJson.normalize(options.path)
return runScriptPkg({ ...options, pkg })
}

module.exports = Object.assign(runScript, { isServerPackage })
6 changes: 3 additions & 3 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": "7.0.3",
"version": "7.0.4",
"description": "Run a lifecycle script for a package (descendant of npm-lifecycle)",
"author": "GitHub Inc.",
"license": "ISC",
Expand All @@ -17,14 +17,14 @@
"devDependencies": {
"@npmcli/eslint-config": "^4.0.0",
"@npmcli/template-oss": "4.21.3",
"require-inject": "^1.4.4",
"spawk": "^1.8.1",
"tap": "^16.0.1"
},
"dependencies": {
"@npmcli/node-gyp": "^3.0.0",
"@npmcli/package-json": "^5.0.0",
"@npmcli/promise-spawn": "^7.0.0",
"node-gyp": "^10.0.0",
"read-package-json-fast": "^3.0.0",
"which": "^4.0.0"
},
"files": [
Expand Down
8 changes: 5 additions & 3 deletions node_modules/ansi-regex/index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
export default function ansiRegex({onlyFirst = false} = {}) {
'use strict';

module.exports = ({onlyFirst = false} = {}) => {
const pattern = [
'[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)',
'[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)',
'(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))'
].join('|');

return new RegExp(pattern, onlyFirst ? undefined : 'g');
}
};
2 changes: 1 addition & 1 deletion node_modules/ansi-regex/license
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

Expand Down
Loading