From 93e3cc39074628c4a7aee3deb1b165a5ba8de20d Mon Sep 17 00:00:00 2001
From: npm CLI robot Keys response: See this example key's response from the public npm registry. See this example key's response from the public npm registry. There are two audit endpoints that npm may use to fetch vulnerability
information: the Audit Signatures
-
-expires
: null or a simplified extended ISO 8601 format: YYYY-MM-DDTHH:mm:ss.sssZ
expires
: null or a simplified extended ISO 8601 format: YYYY-MM-DDTHH:mm:ss.sssZ
keydid
: sha256 fingerprint of the public keykeytype
: only ecdsa-sha2-nistp256
is currently supported by the npm CLIscheme
: only ecdsa-sha2-nistp256
is currently supported by the npm CLIkey
: base64 encoded public keyAudit Endpoints
Bulk Advisory
endpoint and the Quick Audit
endpoint.Description
the results to only the paths to the packages named. Note that nested
packages will also show the paths to the specified packages. For
example, running npm ls promzard
in npm's source tree will show:
npm@10.2.0 /path/to/npm
+npm@10.2.3 /path/to/npm
└─┬ init-package-json@0.0.4
└── promzard@0.1.5
diff --git a/deps/npm/docs/output/commands/npm-rebuild.html b/deps/npm/docs/output/commands/npm-rebuild.html
index 4d2ce115e6a362..3a1a5a401a6a06 100644
--- a/deps/npm/docs/output/commands/npm-rebuild.html
+++ b/deps/npm/docs/output/commands/npm-rebuild.html
@@ -151,13 +151,24 @@ Table of contents
alias: rb
This command runs the npm build
command on the matched folders. This is
-useful when you install a new version of node, and must recompile all your
-C++ addons with the new binary. It is also useful when installing with
---ignore-scripts
and --no-bin-links
, to explicitly choose which
-packages to build and/or link bins.
If one or more package specs are provided, then only packages with a -name and version matching one of the specifiers will be rebuilt.
+This command does the following:
+preinstall
, install
, postinstall
, prepare
)This command is particularly useful in scenarios including but not limited to:
+--ignore-scripts
and --no-bin-links
, to explicitly choose which packages to build and/or link bins.If one or more package specs are provided, then only packages with a name and version matching one of the specifiers will be rebuilt.
+Usually, you should not need to run npm rebuild
as it is already done for you as part of npm install (unless you suppressed these steps with --ignore-scripts
or --no-bin-links
).
If there is a binding.gyp
file in the root of your package, then npm will use a default install hook:
"scripts": {
+ "install": "node-gyp rebuild"
+}
+
+This default behavior is suppressed if the package.json
has its own install
or preinstall
scripts. It is also suppressed if the package specifies "gypfile": false
global
create / destroy:
Create a new team, or destroy an existing one. Note: You cannot remove the
-developers
team, learn more.
developers
team, learn more.
Here's how to create a new team newteam
under the org
org:
npm team create @org:newteam
diff --git a/deps/npm/docs/output/commands/npm-unpublish.html b/deps/npm/docs/output/commands/npm-unpublish.html
index 98fa487e07775c..0c4776309b5640 100644
--- a/deps/npm/docs/output/commands/npm-unpublish.html
+++ b/deps/npm/docs/output/commands/npm-unpublish.html
@@ -148,7 +148,8 @@ npm unpublish [<package-spec>]
-To learn more about how the npm registry treats unpublish, see our unpublish policies
+To learn more about how the npm registry treats unpublish, see our +unpublish policies.
Consider using the deprecate
command instead,
if your intent is to encourage users to upgrade, or if you no longer
diff --git a/deps/npm/docs/output/commands/npm.html b/deps/npm/docs/output/commands/npm.html
index dafc8c4f92c3e5..d1ca758360ff09 100644
--- a/deps/npm/docs/output/commands/npm.html
+++ b/deps/npm/docs/output/commands/npm.html
@@ -150,7 +150,7 @@
Note: This command is unaware of workspaces.
10.2.0
+10.2.3
npm is the package manager for the Node JavaScript platform. It puts modules in place so that node can find them, and manages dependency diff --git a/deps/npm/docs/output/configuring-npm/package-lock-json.html b/deps/npm/docs/output/configuring-npm/package-lock-json.html index 7587b4ad6056a8..11e4ab79900e5a 100644 --- a/deps/npm/docs/output/configuring-npm/package-lock-json.html +++ b/deps/npm/docs/output/configuring-npm/package-lock-json.html @@ -241,7 +241,7 @@
lockfileVersion
1
: The lockfile version used by npm v5 and v6.2
: The lockfile version used by npm v7 and v8. Backwards compatible to v1
lockfiles.3
: The lockfile version used by npm v9. Backwards compatible to npm v7.3
: The lockfile version used by npm v9 and above. Backwards compatible to npm v7.npm will always attempt to get whatever data it can out of a lockfile, even if it is not a version that it was designed to support.
diff --git a/deps/npm/docs/output/using-npm/scripts.html b/deps/npm/docs/output/using-npm/scripts.html index 6cc14bff7aeabe..5628c7724f8ca7 100644 --- a/deps/npm/docs/output/using-npm/scripts.html +++ b/deps/npm/docs/output/using-npm/scripts.html @@ -293,7 +293,6 @@npm publishpublish
postpublish
-prepare
will not run during --dry-run
npm rebuild
preinstall
diff --git a/deps/npm/lib/commands/audit.js b/deps/npm/lib/commands/audit.js
index c95d992c05c99f..8c10a36cfee3cf 100644
--- a/deps/npm/lib/commands/audit.js
+++ b/deps/npm/lib/commands/audit.js
@@ -55,7 +55,7 @@ class VerifySignatures {
// Didn't find any dependencies that could be verified, e.g. only local
// deps, missing version, not on a registry etc.
if (!this.auditedWithKeysCount) {
- throw new Error('found no dependencies to audit that where installed from ' +
+ throw new Error('found no dependencies to audit that were installed from ' +
'a supported registry')
}
diff --git a/deps/npm/lib/commands/link.js b/deps/npm/lib/commands/link.js
index 0c0929115a557f..cdc248569849c3 100644
--- a/deps/npm/lib/commands/link.js
+++ b/deps/npm/lib/commands/link.js
@@ -109,13 +109,13 @@ class Link extends ArboristWorkspaceCmd {
// using any of --save-dev or other types
const save =
Boolean(
- this.npm.config.find('save') !== 'default' ||
+ (this.npm.config.find('save') !== 'default' &&
+ this.npm.config.get('save')) ||
this.npm.config.get('save-optional') ||
this.npm.config.get('save-peer') ||
this.npm.config.get('save-dev') ||
this.npm.config.get('save-prod')
)
-
// create a new arborist instance for the local prefix and
// reify all the pending names as symlinks there
const localArb = new Arborist({
diff --git a/deps/npm/lib/commands/logout.js b/deps/npm/lib/commands/logout.js
index aea5e93652b0e8..665580930639cf 100644
--- a/deps/npm/lib/commands/logout.js
+++ b/deps/npm/lib/commands/logout.js
@@ -1,5 +1,5 @@
-const getAuth = require('npm-registry-fetch/lib/auth.js')
const npmFetch = require('npm-registry-fetch')
+const { getAuth } = npmFetch
const log = require('../utils/log-shim')
const BaseCommand = require('../base-command.js')
@@ -19,10 +19,14 @@ class Logout extends BaseCommand {
const auth = getAuth(reg, this.npm.flatOptions)
+ const level = this.npm.config.find(`${auth.regKey}:${auth.authKey}`)
+
+ // find the config level and only delete from there
if (auth.token) {
log.verbose('logout', `clearing token for ${reg}`)
await npmFetch(`/-/user/token/${encodeURIComponent(auth.token)}`, {
...this.npm.flatOptions,
+ registry: reg,
method: 'DELETE',
ignoreBody: true,
})
@@ -34,12 +38,12 @@ class Logout extends BaseCommand {
}
if (scope) {
- this.npm.config.delete(regRef, 'user')
+ this.npm.config.delete(regRef, level)
}
- this.npm.config.clearCredentialsByURI(reg)
+ this.npm.config.clearCredentialsByURI(reg, level)
- await this.npm.config.save('user')
+ await this.npm.config.save(level)
}
}
module.exports = Logout
diff --git a/deps/npm/lib/utils/error-message.js b/deps/npm/lib/utils/error-message.js
index a2cdb0aa48068c..e3d6c3526936f8 100644
--- a/deps/npm/lib/utils/error-message.js
+++ b/deps/npm/lib/utils/error-message.js
@@ -182,7 +182,7 @@ const errorMessage = (er, npm) => {
])
detail.push([
'',
- ['To correct this please trying logging in again with:', ' npm login'].join('\n'),
+ ['To correct this please try logging in again with:', ' npm login'].join('\n'),
])
} else if (auth.includes('Basic')) {
short.push(['', 'Incorrect or missing password.'])
diff --git a/deps/npm/lib/utils/queryable.js b/deps/npm/lib/utils/queryable.js
index 5ddcf636e83836..69621d928e8ddc 100644
--- a/deps/npm/lib/utils/queryable.js
+++ b/deps/npm/lib/utils/queryable.js
@@ -111,13 +111,9 @@ const getter = ({ data, key }) => {
}, {})
return _data
} else {
- // if can't find any more values, it means it's just over
- // and there's nothing to return
- if (!_data[k]) {
+ if (!Object.hasOwn(_data, k)) {
return undefined
}
-
- // otherwise sets the next value
_data = _data[k]
}
diff --git a/deps/npm/man/man1/npm-access.1 b/deps/npm/man/man1/npm-access.1
index 3973970b33e774..53fd371f3a67e2 100644
--- a/deps/npm/man/man1/npm-access.1
+++ b/deps/npm/man/man1/npm-access.1
@@ -1,4 +1,4 @@
-.TH "NPM-ACCESS" "1" "October 2023" "" ""
+.TH "NPM-ACCESS" "1" "November 2023" "" ""
.SH "NAME"
\fBnpm-access\fR - Set access level on published packages
.SS "Synopsis"
diff --git a/deps/npm/man/man1/npm-adduser.1 b/deps/npm/man/man1/npm-adduser.1
index bed0126358ba71..2c55c56074528d 100644
--- a/deps/npm/man/man1/npm-adduser.1
+++ b/deps/npm/man/man1/npm-adduser.1
@@ -1,4 +1,4 @@
-.TH "NPM-ADDUSER" "1" "October 2023" "" ""
+.TH "NPM-ADDUSER" "1" "November 2023" "" ""
.SH "NAME"
\fBnpm-adduser\fR - Add a registry user account
.SS "Synopsis"
diff --git a/deps/npm/man/man1/npm-audit.1 b/deps/npm/man/man1/npm-audit.1
index 2b354792825a2a..c3b84eef16325b 100644
--- a/deps/npm/man/man1/npm-audit.1
+++ b/deps/npm/man/man1/npm-audit.1
@@ -1,4 +1,4 @@
-.TH "NPM-AUDIT" "1" "October 2023" "" ""
+.TH "NPM-AUDIT" "1" "November 2023" "" ""
.SH "NAME"
\fBnpm-audit\fR - Run a security audit
.SS "Synopsis"
@@ -78,7 +78,7 @@ Public signing keys are provided at \fBregistry-host.tld/-/npm/v1/keys\fR in the
Keys response:
.RS 0
.IP \(bu 4
-\fBexpires\fR: null or a simplified extended ISO 8601 format: \fBYYYY-MM-DDTHH:mm:ss.sssZ\fR
+\fBexpires\fR: null or a simplified extended \fBISO 8601 format\fR \fI\(lahttps://en.wikipedia.org/wiki/ISO_8601"\(ra\fR: \fBYYYY-MM-DDTHH:mm:ss.sssZ\fR
.IP \(bu 4
\fBkeydid\fR: sha256 fingerprint of the public key
.IP \(bu 4
@@ -90,7 +90,7 @@ Keys response:
.RE 0
.P
-See this example key's response from the public npm registry.
+See this \fBexample key's response from the public npm registry\fR \fI\(lahttps://registry.npmjs.org/-/npm/v1/keys"\(ra\fR.
.SS "Audit Endpoints"
.P
There are two audit endpoints that npm may use to fetch vulnerability information: the \fBBulk Advisory\fR endpoint and the \fBQuick Audit\fR endpoint.
diff --git a/deps/npm/man/man1/npm-bugs.1 b/deps/npm/man/man1/npm-bugs.1
index 16fee0af9cf066..16a65feaa6d038 100644
--- a/deps/npm/man/man1/npm-bugs.1
+++ b/deps/npm/man/man1/npm-bugs.1
@@ -1,4 +1,4 @@
-.TH "NPM-BUGS" "1" "October 2023" "" ""
+.TH "NPM-BUGS" "1" "November 2023" "" ""
.SH "NAME"
\fBnpm-bugs\fR - Report bugs for a package in a web browser
.SS "Synopsis"
diff --git a/deps/npm/man/man1/npm-cache.1 b/deps/npm/man/man1/npm-cache.1
index a0faa423af17a6..8f303d21c2c455 100644
--- a/deps/npm/man/man1/npm-cache.1
+++ b/deps/npm/man/man1/npm-cache.1
@@ -1,4 +1,4 @@
-.TH "NPM-CACHE" "1" "October 2023" "" ""
+.TH "NPM-CACHE" "1" "November 2023" "" ""
.SH "NAME"
\fBnpm-cache\fR - Manipulates packages cache
.SS "Synopsis"
diff --git a/deps/npm/man/man1/npm-ci.1 b/deps/npm/man/man1/npm-ci.1
index e22f3bd8ce4134..4d7a7a0c658742 100644
--- a/deps/npm/man/man1/npm-ci.1
+++ b/deps/npm/man/man1/npm-ci.1
@@ -1,4 +1,4 @@
-.TH "NPM-CI" "1" "October 2023" "" ""
+.TH "NPM-CI" "1" "November 2023" "" ""
.SH "NAME"
\fBnpm-ci\fR - Clean install a project
.SS "Synopsis"
diff --git a/deps/npm/man/man1/npm-completion.1 b/deps/npm/man/man1/npm-completion.1
index b8f80ed6090c85..2597a926a124ac 100644
--- a/deps/npm/man/man1/npm-completion.1
+++ b/deps/npm/man/man1/npm-completion.1
@@ -1,4 +1,4 @@
-.TH "NPM-COMPLETION" "1" "October 2023" "" ""
+.TH "NPM-COMPLETION" "1" "November 2023" "" ""
.SH "NAME"
\fBnpm-completion\fR - Tab Completion for npm
.SS "Synopsis"
diff --git a/deps/npm/man/man1/npm-config.1 b/deps/npm/man/man1/npm-config.1
index bdf56c7bdb49eb..02abc5c9d8f1d7 100644
--- a/deps/npm/man/man1/npm-config.1
+++ b/deps/npm/man/man1/npm-config.1
@@ -1,4 +1,4 @@
-.TH "NPM-CONFIG" "1" "October 2023" "" ""
+.TH "NPM-CONFIG" "1" "November 2023" "" ""
.SH "NAME"
\fBnpm-config\fR - Manage the npm configuration files
.SS "Synopsis"
diff --git a/deps/npm/man/man1/npm-dedupe.1 b/deps/npm/man/man1/npm-dedupe.1
index 7857da24d22227..6ed4db0a520e0d 100644
--- a/deps/npm/man/man1/npm-dedupe.1
+++ b/deps/npm/man/man1/npm-dedupe.1
@@ -1,4 +1,4 @@
-.TH "NPM-DEDUPE" "1" "October 2023" "" ""
+.TH "NPM-DEDUPE" "1" "November 2023" "" ""
.SH "NAME"
\fBnpm-dedupe\fR - Reduce duplication in the package tree
.SS "Synopsis"
diff --git a/deps/npm/man/man1/npm-deprecate.1 b/deps/npm/man/man1/npm-deprecate.1
index b58987d3afad92..faea73b948544f 100644
--- a/deps/npm/man/man1/npm-deprecate.1
+++ b/deps/npm/man/man1/npm-deprecate.1
@@ -1,4 +1,4 @@
-.TH "NPM-DEPRECATE" "1" "October 2023" "" ""
+.TH "NPM-DEPRECATE" "1" "November 2023" "" ""
.SH "NAME"
\fBnpm-deprecate\fR - Deprecate a version of a package
.SS "Synopsis"
diff --git a/deps/npm/man/man1/npm-diff.1 b/deps/npm/man/man1/npm-diff.1
index 70227dc7aaff32..217e2ebf607019 100644
--- a/deps/npm/man/man1/npm-diff.1
+++ b/deps/npm/man/man1/npm-diff.1
@@ -1,4 +1,4 @@
-.TH "NPM-DIFF" "1" "October 2023" "" ""
+.TH "NPM-DIFF" "1" "November 2023" "" ""
.SH "NAME"
\fBnpm-diff\fR - The registry diff command
.SS "Synopsis"
diff --git a/deps/npm/man/man1/npm-dist-tag.1 b/deps/npm/man/man1/npm-dist-tag.1
index a02570f24a6f9f..668b8963a57384 100644
--- a/deps/npm/man/man1/npm-dist-tag.1
+++ b/deps/npm/man/man1/npm-dist-tag.1
@@ -1,4 +1,4 @@
-.TH "NPM-DIST-TAG" "1" "October 2023" "" ""
+.TH "NPM-DIST-TAG" "1" "November 2023" "" ""
.SH "NAME"
\fBnpm-dist-tag\fR - Modify package distribution tags
.SS "Synopsis"
diff --git a/deps/npm/man/man1/npm-docs.1 b/deps/npm/man/man1/npm-docs.1
index 81f53336cdb779..0f0d0f731b9bda 100644
--- a/deps/npm/man/man1/npm-docs.1
+++ b/deps/npm/man/man1/npm-docs.1
@@ -1,4 +1,4 @@
-.TH "NPM-DOCS" "1" "October 2023" "" ""
+.TH "NPM-DOCS" "1" "November 2023" "" ""
.SH "NAME"
\fBnpm-docs\fR - Open documentation for a package in a web browser
.SS "Synopsis"
diff --git a/deps/npm/man/man1/npm-doctor.1 b/deps/npm/man/man1/npm-doctor.1
index 17978d0d5e532a..4d2c2aa00f4e0f 100644
--- a/deps/npm/man/man1/npm-doctor.1
+++ b/deps/npm/man/man1/npm-doctor.1
@@ -1,4 +1,4 @@
-.TH "NPM-DOCTOR" "1" "October 2023" "" ""
+.TH "NPM-DOCTOR" "1" "November 2023" "" ""
.SH "NAME"
\fBnpm-doctor\fR - Check the health of your npm environment
.SS "Synopsis"
diff --git a/deps/npm/man/man1/npm-edit.1 b/deps/npm/man/man1/npm-edit.1
index 012aabad9f2858..cc1e9b5c8ede7f 100644
--- a/deps/npm/man/man1/npm-edit.1
+++ b/deps/npm/man/man1/npm-edit.1
@@ -1,4 +1,4 @@
-.TH "NPM-EDIT" "1" "October 2023" "" ""
+.TH "NPM-EDIT" "1" "November 2023" "" ""
.SH "NAME"
\fBnpm-edit\fR - Edit an installed package
.SS "Synopsis"
diff --git a/deps/npm/man/man1/npm-exec.1 b/deps/npm/man/man1/npm-exec.1
index 92e0cdb11895d7..8cb1010ffb552a 100644
--- a/deps/npm/man/man1/npm-exec.1
+++ b/deps/npm/man/man1/npm-exec.1
@@ -1,4 +1,4 @@
-.TH "NPM-EXEC" "1" "October 2023" "" ""
+.TH "NPM-EXEC" "1" "November 2023" "" ""
.SH "NAME"
\fBnpm-exec\fR - Run a command from a local or remote npm package
.SS "Synopsis"
diff --git a/deps/npm/man/man1/npm-explain.1 b/deps/npm/man/man1/npm-explain.1
index 667d46df151f40..6070bb24a24386 100644
--- a/deps/npm/man/man1/npm-explain.1
+++ b/deps/npm/man/man1/npm-explain.1
@@ -1,4 +1,4 @@
-.TH "NPM-EXPLAIN" "1" "October 2023" "" ""
+.TH "NPM-EXPLAIN" "1" "November 2023" "" ""
.SH "NAME"
\fBnpm-explain\fR - Explain installed packages
.SS "Synopsis"
diff --git a/deps/npm/man/man1/npm-explore.1 b/deps/npm/man/man1/npm-explore.1
index f30ffd4a5e27af..27371aa6c9e9e7 100644
--- a/deps/npm/man/man1/npm-explore.1
+++ b/deps/npm/man/man1/npm-explore.1
@@ -1,4 +1,4 @@
-.TH "NPM-EXPLORE" "1" "October 2023" "" ""
+.TH "NPM-EXPLORE" "1" "November 2023" "" ""
.SH "NAME"
\fBnpm-explore\fR - Browse an installed package
.SS "Synopsis"
diff --git a/deps/npm/man/man1/npm-find-dupes.1 b/deps/npm/man/man1/npm-find-dupes.1
index e4bcc8b85db3dd..d27a252baaca8d 100644
--- a/deps/npm/man/man1/npm-find-dupes.1
+++ b/deps/npm/man/man1/npm-find-dupes.1
@@ -1,4 +1,4 @@
-.TH "NPM-FIND-DUPES" "1" "October 2023" "" ""
+.TH "NPM-FIND-DUPES" "1" "November 2023" "" ""
.SH "NAME"
\fBnpm-find-dupes\fR - Find duplication in the package tree
.SS "Synopsis"
diff --git a/deps/npm/man/man1/npm-fund.1 b/deps/npm/man/man1/npm-fund.1
index afcbcfbbc85f41..88bf7caa0d5d83 100644
--- a/deps/npm/man/man1/npm-fund.1
+++ b/deps/npm/man/man1/npm-fund.1
@@ -1,4 +1,4 @@
-.TH "NPM-FUND" "1" "October 2023" "" ""
+.TH "NPM-FUND" "1" "November 2023" "" ""
.SH "NAME"
\fBnpm-fund\fR - Retrieve funding information
.SS "Synopsis"
diff --git a/deps/npm/man/man1/npm-help-search.1 b/deps/npm/man/man1/npm-help-search.1
index 2c5effe6c6e186..b98088152314b8 100644
--- a/deps/npm/man/man1/npm-help-search.1
+++ b/deps/npm/man/man1/npm-help-search.1
@@ -1,4 +1,4 @@
-.TH "NPM-HELP-SEARCH" "1" "October 2023" "" ""
+.TH "NPM-HELP-SEARCH" "1" "November 2023" "" ""
.SH "NAME"
\fBnpm-help-search\fR - Search npm help documentation
.SS "Synopsis"
diff --git a/deps/npm/man/man1/npm-help.1 b/deps/npm/man/man1/npm-help.1
index b5f7e3bdd959ef..949e54c44eab08 100644
--- a/deps/npm/man/man1/npm-help.1
+++ b/deps/npm/man/man1/npm-help.1
@@ -1,4 +1,4 @@
-.TH "NPM-HELP" "1" "October 2023" "" ""
+.TH "NPM-HELP" "1" "November 2023" "" ""
.SH "NAME"
\fBnpm-help\fR - Get help on npm
.SS "Synopsis"
diff --git a/deps/npm/man/man1/npm-hook.1 b/deps/npm/man/man1/npm-hook.1
index db68ce36d4d88a..145406b9d09877 100644
--- a/deps/npm/man/man1/npm-hook.1
+++ b/deps/npm/man/man1/npm-hook.1
@@ -1,4 +1,4 @@
-.TH "NPM-HOOK" "1" "October 2023" "" ""
+.TH "NPM-HOOK" "1" "November 2023" "" ""
.SH "NAME"
\fBnpm-hook\fR - Manage registry hooks
.SS "Synopsis"
diff --git a/deps/npm/man/man1/npm-init.1 b/deps/npm/man/man1/npm-init.1
index f2e0a289b88561..a86a09b910a810 100644
--- a/deps/npm/man/man1/npm-init.1
+++ b/deps/npm/man/man1/npm-init.1
@@ -1,4 +1,4 @@
-.TH "NPM-INIT" "1" "October 2023" "" ""
+.TH "NPM-INIT" "1" "November 2023" "" ""
.SH "NAME"
\fBnpm-init\fR - Create a package.json file
.SS "Synopsis"
diff --git a/deps/npm/man/man1/npm-install-ci-test.1 b/deps/npm/man/man1/npm-install-ci-test.1
index 9f7c1a222ef31f..21320f9378b7d8 100644
--- a/deps/npm/man/man1/npm-install-ci-test.1
+++ b/deps/npm/man/man1/npm-install-ci-test.1
@@ -1,4 +1,4 @@
-.TH "NPM-INSTALL-CI-TEST" "1" "October 2023" "" ""
+.TH "NPM-INSTALL-CI-TEST" "1" "November 2023" "" ""
.SH "NAME"
\fBnpm-install-ci-test\fR - Install a project with a clean slate and run tests
.SS "Synopsis"
diff --git a/deps/npm/man/man1/npm-install-test.1 b/deps/npm/man/man1/npm-install-test.1
index c7361dcd7ac767..3e6efb819bc6e2 100644
--- a/deps/npm/man/man1/npm-install-test.1
+++ b/deps/npm/man/man1/npm-install-test.1
@@ -1,4 +1,4 @@
-.TH "NPM-INSTALL-TEST" "1" "October 2023" "" ""
+.TH "NPM-INSTALL-TEST" "1" "November 2023" "" ""
.SH "NAME"
\fBnpm-install-test\fR - Install package(s) and run tests
.SS "Synopsis"
diff --git a/deps/npm/man/man1/npm-install.1 b/deps/npm/man/man1/npm-install.1
index 0d202d94814425..0493f5dc9577f0 100644
--- a/deps/npm/man/man1/npm-install.1
+++ b/deps/npm/man/man1/npm-install.1
@@ -1,4 +1,4 @@
-.TH "NPM-INSTALL" "1" "October 2023" "" ""
+.TH "NPM-INSTALL" "1" "November 2023" "" ""
.SH "NAME"
\fBnpm-install\fR - Install a package
.SS "Synopsis"
diff --git a/deps/npm/man/man1/npm-link.1 b/deps/npm/man/man1/npm-link.1
index 13c26b8b4043de..491cc6e45f066d 100644
--- a/deps/npm/man/man1/npm-link.1
+++ b/deps/npm/man/man1/npm-link.1
@@ -1,4 +1,4 @@
-.TH "NPM-LINK" "1" "October 2023" "" ""
+.TH "NPM-LINK" "1" "November 2023" "" ""
.SH "NAME"
\fBnpm-link\fR - Symlink a package folder
.SS "Synopsis"
diff --git a/deps/npm/man/man1/npm-login.1 b/deps/npm/man/man1/npm-login.1
index 86bc0a1f6162f3..dff4c54b206299 100644
--- a/deps/npm/man/man1/npm-login.1
+++ b/deps/npm/man/man1/npm-login.1
@@ -1,4 +1,4 @@
-.TH "NPM-LOGIN" "1" "October 2023" "" ""
+.TH "NPM-LOGIN" "1" "November 2023" "" ""
.SH "NAME"
\fBnpm-login\fR - Login to a registry user account
.SS "Synopsis"
diff --git a/deps/npm/man/man1/npm-logout.1 b/deps/npm/man/man1/npm-logout.1
index 58c7f047db0086..f4e3525a9a43ad 100644
--- a/deps/npm/man/man1/npm-logout.1
+++ b/deps/npm/man/man1/npm-logout.1
@@ -1,4 +1,4 @@
-.TH "NPM-LOGOUT" "1" "October 2023" "" ""
+.TH "NPM-LOGOUT" "1" "November 2023" "" ""
.SH "NAME"
\fBnpm-logout\fR - Log out of the registry
.SS "Synopsis"
diff --git a/deps/npm/man/man1/npm-ls.1 b/deps/npm/man/man1/npm-ls.1
index 385138d4876f99..25af64a1534878 100644
--- a/deps/npm/man/man1/npm-ls.1
+++ b/deps/npm/man/man1/npm-ls.1
@@ -1,4 +1,4 @@
-.TH "NPM-LS" "1" "October 2023" "" ""
+.TH "NPM-LS" "1" "November 2023" "" ""
.SH "NAME"
\fBnpm-ls\fR - List installed packages
.SS "Synopsis"
@@ -20,7 +20,7 @@ Positional arguments are \fBname@version-range\fR identifiers, which will limit
.P
.RS 2
.nf
-npm@10.2.0 /path/to/npm
+npm@10.2.3 /path/to/npm
└─┬ init-package-json@0.0.4
└── promzard@0.1.5
.fi
diff --git a/deps/npm/man/man1/npm-org.1 b/deps/npm/man/man1/npm-org.1
index df0495c6c6aeea..182f84af28895f 100644
--- a/deps/npm/man/man1/npm-org.1
+++ b/deps/npm/man/man1/npm-org.1
@@ -1,4 +1,4 @@
-.TH "NPM-ORG" "1" "October 2023" "" ""
+.TH "NPM-ORG" "1" "November 2023" "" ""
.SH "NAME"
\fBnpm-org\fR - Manage orgs
.SS "Synopsis"
diff --git a/deps/npm/man/man1/npm-outdated.1 b/deps/npm/man/man1/npm-outdated.1
index 2935461bbedd0a..84351aeb35d4b9 100644
--- a/deps/npm/man/man1/npm-outdated.1
+++ b/deps/npm/man/man1/npm-outdated.1
@@ -1,4 +1,4 @@
-.TH "NPM-OUTDATED" "1" "October 2023" "" ""
+.TH "NPM-OUTDATED" "1" "November 2023" "" ""
.SH "NAME"
\fBnpm-outdated\fR - Check for outdated packages
.SS "Synopsis"
diff --git a/deps/npm/man/man1/npm-owner.1 b/deps/npm/man/man1/npm-owner.1
index 288c891617d867..ceda18a6c31758 100644
--- a/deps/npm/man/man1/npm-owner.1
+++ b/deps/npm/man/man1/npm-owner.1
@@ -1,4 +1,4 @@
-.TH "NPM-OWNER" "1" "October 2023" "" ""
+.TH "NPM-OWNER" "1" "November 2023" "" ""
.SH "NAME"
\fBnpm-owner\fR - Manage package owners
.SS "Synopsis"
diff --git a/deps/npm/man/man1/npm-pack.1 b/deps/npm/man/man1/npm-pack.1
index b6d8a6bff2d275..050c208ffd64e8 100644
--- a/deps/npm/man/man1/npm-pack.1
+++ b/deps/npm/man/man1/npm-pack.1
@@ -1,4 +1,4 @@
-.TH "NPM-PACK" "1" "October 2023" "" ""
+.TH "NPM-PACK" "1" "November 2023" "" ""
.SH "NAME"
\fBnpm-pack\fR - Create a tarball from a package
.SS "Synopsis"
diff --git a/deps/npm/man/man1/npm-ping.1 b/deps/npm/man/man1/npm-ping.1
index f5e3cc536030e8..6c6e1e28281664 100644
--- a/deps/npm/man/man1/npm-ping.1
+++ b/deps/npm/man/man1/npm-ping.1
@@ -1,4 +1,4 @@
-.TH "NPM-PING" "1" "October 2023" "" ""
+.TH "NPM-PING" "1" "November 2023" "" ""
.SH "NAME"
\fBnpm-ping\fR - Ping npm registry
.SS "Synopsis"
diff --git a/deps/npm/man/man1/npm-pkg.1 b/deps/npm/man/man1/npm-pkg.1
index 75d0791abbfed6..40b0329fef13f1 100644
--- a/deps/npm/man/man1/npm-pkg.1
+++ b/deps/npm/man/man1/npm-pkg.1
@@ -1,4 +1,4 @@
-.TH "NPM-PKG" "1" "October 2023" "" ""
+.TH "NPM-PKG" "1" "November 2023" "" ""
.SH "NAME"
\fBnpm-pkg\fR - Manages your package.json
.SS "Synopsis"
diff --git a/deps/npm/man/man1/npm-prefix.1 b/deps/npm/man/man1/npm-prefix.1
index c63af6e4d99fbd..a0ab1560881243 100644
--- a/deps/npm/man/man1/npm-prefix.1
+++ b/deps/npm/man/man1/npm-prefix.1
@@ -1,4 +1,4 @@
-.TH "NPM-PREFIX" "1" "October 2023" "" ""
+.TH "NPM-PREFIX" "1" "November 2023" "" ""
.SH "NAME"
\fBnpm-prefix\fR - Display prefix
.SS "Synopsis"
diff --git a/deps/npm/man/man1/npm-profile.1 b/deps/npm/man/man1/npm-profile.1
index acc437b9b904f2..834c26428d94b8 100644
--- a/deps/npm/man/man1/npm-profile.1
+++ b/deps/npm/man/man1/npm-profile.1
@@ -1,4 +1,4 @@
-.TH "NPM-PROFILE" "1" "October 2023" "" ""
+.TH "NPM-PROFILE" "1" "November 2023" "" ""
.SH "NAME"
\fBnpm-profile\fR - Change settings on your registry profile
.SS "Synopsis"
diff --git a/deps/npm/man/man1/npm-prune.1 b/deps/npm/man/man1/npm-prune.1
index 1ccd763e2372f6..3ab15a55c879a1 100644
--- a/deps/npm/man/man1/npm-prune.1
+++ b/deps/npm/man/man1/npm-prune.1
@@ -1,4 +1,4 @@
-.TH "NPM-PRUNE" "1" "October 2023" "" ""
+.TH "NPM-PRUNE" "1" "November 2023" "" ""
.SH "NAME"
\fBnpm-prune\fR - Remove extraneous packages
.SS "Synopsis"
diff --git a/deps/npm/man/man1/npm-publish.1 b/deps/npm/man/man1/npm-publish.1
index 9d580de01e5ec5..5d8444e2fa2d04 100644
--- a/deps/npm/man/man1/npm-publish.1
+++ b/deps/npm/man/man1/npm-publish.1
@@ -1,4 +1,4 @@
-.TH "NPM-PUBLISH" "1" "October 2023" "" ""
+.TH "NPM-PUBLISH" "1" "November 2023" "" ""
.SH "NAME"
\fBnpm-publish\fR - Publish a package
.SS "Synopsis"
diff --git a/deps/npm/man/man1/npm-query.1 b/deps/npm/man/man1/npm-query.1
index 5a79a5c2fac37d..947a7b78397571 100644
--- a/deps/npm/man/man1/npm-query.1
+++ b/deps/npm/man/man1/npm-query.1
@@ -1,4 +1,4 @@
-.TH "NPM-QUERY" "1" "October 2023" "" ""
+.TH "NPM-QUERY" "1" "November 2023" "" ""
.SH "NAME"
\fBnpm-query\fR - Dependency selector query
.SS "Synopsis"
diff --git a/deps/npm/man/man1/npm-rebuild.1 b/deps/npm/man/man1/npm-rebuild.1
index 882b27fa6e0722..b00eb2816eb116 100644
--- a/deps/npm/man/man1/npm-rebuild.1
+++ b/deps/npm/man/man1/npm-rebuild.1
@@ -1,4 +1,4 @@
-.TH "NPM-REBUILD" "1" "October 2023" "" ""
+.TH "NPM-REBUILD" "1" "November 2023" "" ""
.SH "NAME"
\fBnpm-rebuild\fR - Rebuild a package
.SS "Synopsis"
@@ -12,9 +12,39 @@ alias: rb
.RE
.SS "Description"
.P
-This command runs the \fBnpm build\fR command on the matched folders. This is useful when you install a new version of node, and must recompile all your C++ addons with the new binary. It is also useful when installing with \fB--ignore-scripts\fR and \fB--no-bin-links\fR, to explicitly choose which packages to build and/or link bins.
+This command does the following:
+.RS 0
+.IP 1. 4
+Execute lifecycle scripts (\fBpreinstall\fR, \fBinstall\fR, \fBpostinstall\fR, \fBprepare\fR)
+.IP 2. 4
+Links bins depending on whether bin links are enabled
+.RE 0
+
+.P
+This command is particularly useful in scenarios including but not limited to:
+.RS 0
+.IP 1. 4
+Installing a new version of \fBnode.js\fR, where you need to recompile all your C++ add-ons with the updated binary.
+.IP 2. 4
+Installing with \fB--ignore-scripts\fR and \fB--no-bin-links\fR, to explicitly choose which packages to build and/or link bins.
+.RE 0
+
.P
If one or more package specs are provided, then only packages with a name and version matching one of the specifiers will be rebuilt.
+.P
+Usually, you should not need to run \fBnpm rebuild\fR as it is already done for you as part of npm install (unless you suppressed these steps with \fB--ignore-scripts\fR or \fB--no-bin-links\fR).
+.P
+If there is a \fBbinding.gyp\fR file in the root of your package, then npm will use a default install hook:
+.P
+.RS 2
+.nf
+"scripts": {
+ "install": "node-gyp rebuild"
+}
+.fi
+.RE
+.P
+This default behavior is suppressed if the \fBpackage.json\fR has its own \fBinstall\fR or \fBpreinstall\fR scripts. It is also suppressed if the package specifies \fB"gypfile": false\fR
.SS "Configuration"
.SS "\fBglobal\fR"
.RS 0
diff --git a/deps/npm/man/man1/npm-repo.1 b/deps/npm/man/man1/npm-repo.1
index 85805cb46b07fc..1d89a9e85c7105 100644
--- a/deps/npm/man/man1/npm-repo.1
+++ b/deps/npm/man/man1/npm-repo.1
@@ -1,4 +1,4 @@
-.TH "NPM-REPO" "1" "October 2023" "" ""
+.TH "NPM-REPO" "1" "November 2023" "" ""
.SH "NAME"
\fBnpm-repo\fR - Open package repository page in the browser
.SS "Synopsis"
diff --git a/deps/npm/man/man1/npm-restart.1 b/deps/npm/man/man1/npm-restart.1
index eea0fa265c0260..5f85577a45ac12 100644
--- a/deps/npm/man/man1/npm-restart.1
+++ b/deps/npm/man/man1/npm-restart.1
@@ -1,4 +1,4 @@
-.TH "NPM-RESTART" "1" "October 2023" "" ""
+.TH "NPM-RESTART" "1" "November 2023" "" ""
.SH "NAME"
\fBnpm-restart\fR - Restart a package
.SS "Synopsis"
diff --git a/deps/npm/man/man1/npm-root.1 b/deps/npm/man/man1/npm-root.1
index eb0cfdb848c9ef..1dce718fc0f961 100644
--- a/deps/npm/man/man1/npm-root.1
+++ b/deps/npm/man/man1/npm-root.1
@@ -1,4 +1,4 @@
-.TH "NPM-ROOT" "1" "October 2023" "" ""
+.TH "NPM-ROOT" "1" "November 2023" "" ""
.SH "NAME"
\fBnpm-root\fR - Display npm root
.SS "Synopsis"
diff --git a/deps/npm/man/man1/npm-run-script.1 b/deps/npm/man/man1/npm-run-script.1
index df369cd43a6a7c..3718c9293d45a1 100644
--- a/deps/npm/man/man1/npm-run-script.1
+++ b/deps/npm/man/man1/npm-run-script.1
@@ -1,4 +1,4 @@
-.TH "NPM-RUN-SCRIPT" "1" "October 2023" "" ""
+.TH "NPM-RUN-SCRIPT" "1" "November 2023" "" ""
.SH "NAME"
\fBnpm-run-script\fR - Run arbitrary package scripts
.SS "Synopsis"
diff --git a/deps/npm/man/man1/npm-sbom.1 b/deps/npm/man/man1/npm-sbom.1
index f9f14670f55a67..21a18ac91dc953 100644
--- a/deps/npm/man/man1/npm-sbom.1
+++ b/deps/npm/man/man1/npm-sbom.1
@@ -1,4 +1,4 @@
-.TH "NPM-SBOM" "1" "October 2023" "" ""
+.TH "NPM-SBOM" "1" "November 2023" "" ""
.SH "NAME"
\fBnpm-sbom\fR - Generate a Software Bill of Materials (SBOM)
.SS "Synopsis"
diff --git a/deps/npm/man/man1/npm-search.1 b/deps/npm/man/man1/npm-search.1
index 0dfb654fadf452..5aaeabd24af938 100644
--- a/deps/npm/man/man1/npm-search.1
+++ b/deps/npm/man/man1/npm-search.1
@@ -1,4 +1,4 @@
-.TH "NPM-SEARCH" "1" "October 2023" "" ""
+.TH "NPM-SEARCH" "1" "November 2023" "" ""
.SH "NAME"
\fBnpm-search\fR - Search for packages
.SS "Synopsis"
diff --git a/deps/npm/man/man1/npm-shrinkwrap.1 b/deps/npm/man/man1/npm-shrinkwrap.1
index 6457db0d7ecd7f..7e29d4151728c3 100644
--- a/deps/npm/man/man1/npm-shrinkwrap.1
+++ b/deps/npm/man/man1/npm-shrinkwrap.1
@@ -1,4 +1,4 @@
-.TH "NPM-SHRINKWRAP" "1" "October 2023" "" ""
+.TH "NPM-SHRINKWRAP" "1" "November 2023" "" ""
.SH "NAME"
\fBnpm-shrinkwrap\fR - Lock down dependency versions for publication
.SS "Synopsis"
diff --git a/deps/npm/man/man1/npm-star.1 b/deps/npm/man/man1/npm-star.1
index 5656bc38c20ce6..b6a3f7e8f174a9 100644
--- a/deps/npm/man/man1/npm-star.1
+++ b/deps/npm/man/man1/npm-star.1
@@ -1,4 +1,4 @@
-.TH "NPM-STAR" "1" "October 2023" "" ""
+.TH "NPM-STAR" "1" "November 2023" "" ""
.SH "NAME"
\fBnpm-star\fR - Mark your favorite packages
.SS "Synopsis"
diff --git a/deps/npm/man/man1/npm-stars.1 b/deps/npm/man/man1/npm-stars.1
index e57b1311062b70..ad66d694917f68 100644
--- a/deps/npm/man/man1/npm-stars.1
+++ b/deps/npm/man/man1/npm-stars.1
@@ -1,4 +1,4 @@
-.TH "NPM-STARS" "1" "October 2023" "" ""
+.TH "NPM-STARS" "1" "November 2023" "" ""
.SH "NAME"
\fBnpm-stars\fR - View packages marked as favorites
.SS "Synopsis"
diff --git a/deps/npm/man/man1/npm-start.1 b/deps/npm/man/man1/npm-start.1
index d88f1e2478ec73..f35690a145e58c 100644
--- a/deps/npm/man/man1/npm-start.1
+++ b/deps/npm/man/man1/npm-start.1
@@ -1,4 +1,4 @@
-.TH "NPM-START" "1" "October 2023" "" ""
+.TH "NPM-START" "1" "November 2023" "" ""
.SH "NAME"
\fBnpm-start\fR - Start a package
.SS "Synopsis"
diff --git a/deps/npm/man/man1/npm-stop.1 b/deps/npm/man/man1/npm-stop.1
index 4980c16fc6ea90..2913641d2845d3 100644
--- a/deps/npm/man/man1/npm-stop.1
+++ b/deps/npm/man/man1/npm-stop.1
@@ -1,4 +1,4 @@
-.TH "NPM-STOP" "1" "October 2023" "" ""
+.TH "NPM-STOP" "1" "November 2023" "" ""
.SH "NAME"
\fBnpm-stop\fR - Stop a package
.SS "Synopsis"
diff --git a/deps/npm/man/man1/npm-team.1 b/deps/npm/man/man1/npm-team.1
index 28b7b904fe0456..729e9d3194dd49 100644
--- a/deps/npm/man/man1/npm-team.1
+++ b/deps/npm/man/man1/npm-team.1
@@ -1,4 +1,4 @@
-.TH "NPM-TEAM" "1" "October 2023" "" ""
+.TH "NPM-TEAM" "1" "November 2023" "" ""
.SH "NAME"
\fBnpm-team\fR - Manage organization teams and team memberships
.SS "Synopsis"
@@ -23,7 +23,7 @@ Teams must always be fully qualified with the organization/scope they belong to
If you have two-factor authentication enabled in \fBauth-and-writes\fR mode, then you can provide a code from your authenticator with \fB\[lB]--otp \[rB]\fR. If you don't include this then you will be taken through a second factor flow based on your \fBauthtype\fR.
.RS 0
.IP \(bu 4
-create / destroy: Create a new team, or destroy an existing one. Note: You cannot remove the \fBdevelopers\fR team, learn more.
+create / destroy: Create a new team, or destroy an existing one. Note: You cannot remove the \fBdevelopers\fR team, \fBlearn more.\fR \fI\(lahttps://docs.npmjs.com/about-developers-team\(ra\fR
.P
Here's how to create a new team \fBnewteam\fR under the \fBorg\fR org:
.P
diff --git a/deps/npm/man/man1/npm-test.1 b/deps/npm/man/man1/npm-test.1
index f2da6368450065..bfecac60a9a113 100644
--- a/deps/npm/man/man1/npm-test.1
+++ b/deps/npm/man/man1/npm-test.1
@@ -1,4 +1,4 @@
-.TH "NPM-TEST" "1" "October 2023" "" ""
+.TH "NPM-TEST" "1" "November 2023" "" ""
.SH "NAME"
\fBnpm-test\fR - Test a package
.SS "Synopsis"
diff --git a/deps/npm/man/man1/npm-token.1 b/deps/npm/man/man1/npm-token.1
index 8bbfaac64962aa..84e0e8ea0220a3 100644
--- a/deps/npm/man/man1/npm-token.1
+++ b/deps/npm/man/man1/npm-token.1
@@ -1,4 +1,4 @@
-.TH "NPM-TOKEN" "1" "October 2023" "" ""
+.TH "NPM-TOKEN" "1" "November 2023" "" ""
.SH "NAME"
\fBnpm-token\fR - Manage your authentication tokens
.SS "Synopsis"
diff --git a/deps/npm/man/man1/npm-uninstall.1 b/deps/npm/man/man1/npm-uninstall.1
index 17e906228b57d2..749ae7533a4f5f 100644
--- a/deps/npm/man/man1/npm-uninstall.1
+++ b/deps/npm/man/man1/npm-uninstall.1
@@ -1,4 +1,4 @@
-.TH "NPM-UNINSTALL" "1" "October 2023" "" ""
+.TH "NPM-UNINSTALL" "1" "November 2023" "" ""
.SH "NAME"
\fBnpm-uninstall\fR - Remove a package
.SS "Synopsis"
diff --git a/deps/npm/man/man1/npm-unpublish.1 b/deps/npm/man/man1/npm-unpublish.1
index 77eeb843b363b9..0b059350966a00 100644
--- a/deps/npm/man/man1/npm-unpublish.1
+++ b/deps/npm/man/man1/npm-unpublish.1
@@ -1,4 +1,4 @@
-.TH "NPM-UNPUBLISH" "1" "October 2023" "" ""
+.TH "NPM-UNPUBLISH" "1" "November 2023" "" ""
.SH "NAME"
\fBnpm-unpublish\fR - Remove a package from the registry
.SS "Synopsis"
@@ -9,7 +9,7 @@ npm unpublish \[lB]\[rB]
.fi
.RE
.P
-To learn more about how the npm registry treats unpublish, see our unpublish policies
+To learn more about how the npm registry treats unpublish, see our \fBunpublish policies\fR \fI\(lahttps://docs.npmjs.com/policies/unpublish\(ra\fR.
.SS "Warning"
.P
Consider using the npm help deprecate command instead, if your intent is to encourage users to upgrade, or if you no longer want to maintain a package.
diff --git a/deps/npm/man/man1/npm-unstar.1 b/deps/npm/man/man1/npm-unstar.1
index d77464de965580..0e44709c83da65 100644
--- a/deps/npm/man/man1/npm-unstar.1
+++ b/deps/npm/man/man1/npm-unstar.1
@@ -1,4 +1,4 @@
-.TH "NPM-UNSTAR" "1" "October 2023" "" ""
+.TH "NPM-UNSTAR" "1" "November 2023" "" ""
.SH "NAME"
\fBnpm-unstar\fR - Remove an item from your favorite packages
.SS "Synopsis"
diff --git a/deps/npm/man/man1/npm-update.1 b/deps/npm/man/man1/npm-update.1
index 4b59f8600e0a67..0b247f80d8d9f8 100644
--- a/deps/npm/man/man1/npm-update.1
+++ b/deps/npm/man/man1/npm-update.1
@@ -1,4 +1,4 @@
-.TH "NPM-UPDATE" "1" "October 2023" "" ""
+.TH "NPM-UPDATE" "1" "November 2023" "" ""
.SH "NAME"
\fBnpm-update\fR - Update packages
.SS "Synopsis"
diff --git a/deps/npm/man/man1/npm-version.1 b/deps/npm/man/man1/npm-version.1
index 03dd68d3e0956a..07f8352de3c7ce 100644
--- a/deps/npm/man/man1/npm-version.1
+++ b/deps/npm/man/man1/npm-version.1
@@ -1,4 +1,4 @@
-.TH "NPM-VERSION" "1" "October 2023" "" ""
+.TH "NPM-VERSION" "1" "November 2023" "" ""
.SH "NAME"
\fBnpm-version\fR - Bump a package version
.SS "Synopsis"
diff --git a/deps/npm/man/man1/npm-view.1 b/deps/npm/man/man1/npm-view.1
index 73512687904971..decf76a1e9bfc7 100644
--- a/deps/npm/man/man1/npm-view.1
+++ b/deps/npm/man/man1/npm-view.1
@@ -1,4 +1,4 @@
-.TH "NPM-VIEW" "1" "October 2023" "" ""
+.TH "NPM-VIEW" "1" "November 2023" "" ""
.SH "NAME"
\fBnpm-view\fR - View registry info
.SS "Synopsis"
diff --git a/deps/npm/man/man1/npm-whoami.1 b/deps/npm/man/man1/npm-whoami.1
index 67735a171494e1..6e182bbff873c2 100644
--- a/deps/npm/man/man1/npm-whoami.1
+++ b/deps/npm/man/man1/npm-whoami.1
@@ -1,4 +1,4 @@
-.TH "NPM-WHOAMI" "1" "October 2023" "" ""
+.TH "NPM-WHOAMI" "1" "November 2023" "" ""
.SH "NAME"
\fBnpm-whoami\fR - Display npm username
.SS "Synopsis"
diff --git a/deps/npm/man/man1/npm.1 b/deps/npm/man/man1/npm.1
index 740c99ee0be370..2f08cb27dbbca5 100644
--- a/deps/npm/man/man1/npm.1
+++ b/deps/npm/man/man1/npm.1
@@ -1,4 +1,4 @@
-.TH "NPM" "1" "October 2023" "" ""
+.TH "NPM" "1" "November 2023" "" ""
.SH "NAME"
\fBnpm\fR - javascript package manager
.SS "Synopsis"
@@ -12,7 +12,7 @@ npm
Note: This command is unaware of workspaces.
.SS "Version"
.P
-10.2.0
+10.2.3
.SS "Description"
.P
npm is the package manager for the Node JavaScript platform. It puts modules in place so that node can find them, and manages dependency conflicts intelligently.
diff --git a/deps/npm/man/man1/npx.1 b/deps/npm/man/man1/npx.1
index a280ca57f7a7ad..d318fa2a6ea6c6 100644
--- a/deps/npm/man/man1/npx.1
+++ b/deps/npm/man/man1/npx.1
@@ -1,4 +1,4 @@
-.TH "NPX" "1" "October 2023" "" ""
+.TH "NPX" "1" "November 2023" "" ""
.SH "NAME"
\fBnpx\fR - Run a command from a local or remote npm package
.SS "Synopsis"
diff --git a/deps/npm/man/man5/folders.5 b/deps/npm/man/man5/folders.5
index d3e9e6fc78dffc..f6248235a2e9bd 100644
--- a/deps/npm/man/man5/folders.5
+++ b/deps/npm/man/man5/folders.5
@@ -1,4 +1,4 @@
-.TH "FOLDERS" "5" "October 2023" "" ""
+.TH "FOLDERS" "5" "November 2023" "" ""
.SH "NAME"
\fBfolders\fR - Folder Structures Used by npm
.SS "Description"
diff --git a/deps/npm/man/man5/install.5 b/deps/npm/man/man5/install.5
index 3a8da18ba18544..5b32048710b9e0 100644
--- a/deps/npm/man/man5/install.5
+++ b/deps/npm/man/man5/install.5
@@ -1,4 +1,4 @@
-.TH "INSTALL" "5" "October 2023" "" ""
+.TH "INSTALL" "5" "November 2023" "" ""
.SH "NAME"
\fBinstall\fR - Download and install node and npm
.SS "Description"
diff --git a/deps/npm/man/man5/npm-global.5 b/deps/npm/man/man5/npm-global.5
index d3e9e6fc78dffc..f6248235a2e9bd 100644
--- a/deps/npm/man/man5/npm-global.5
+++ b/deps/npm/man/man5/npm-global.5
@@ -1,4 +1,4 @@
-.TH "FOLDERS" "5" "October 2023" "" ""
+.TH "FOLDERS" "5" "November 2023" "" ""
.SH "NAME"
\fBfolders\fR - Folder Structures Used by npm
.SS "Description"
diff --git a/deps/npm/man/man5/npm-json.5 b/deps/npm/man/man5/npm-json.5
index 71d630e750e645..8054048290285e 100644
--- a/deps/npm/man/man5/npm-json.5
+++ b/deps/npm/man/man5/npm-json.5
@@ -1,4 +1,4 @@
-.TH "PACKAGE.JSON" "5" "October 2023" "" ""
+.TH "PACKAGE.JSON" "5" "November 2023" "" ""
.SH "NAME"
\fBpackage.json\fR - Specifics of npm's package.json handling
.SS "Description"
diff --git a/deps/npm/man/man5/npm-shrinkwrap-json.5 b/deps/npm/man/man5/npm-shrinkwrap-json.5
index 8346df052db259..d1f8b923c2c0de 100644
--- a/deps/npm/man/man5/npm-shrinkwrap-json.5
+++ b/deps/npm/man/man5/npm-shrinkwrap-json.5
@@ -1,4 +1,4 @@
-.TH "NPM-SHRINKWRAP.JSON" "5" "October 2023" "" ""
+.TH "NPM-SHRINKWRAP.JSON" "5" "November 2023" "" ""
.SH "NAME"
\fBnpm-shrinkwrap.json\fR - A publishable lockfile
.SS "Description"
diff --git a/deps/npm/man/man5/npmrc.5 b/deps/npm/man/man5/npmrc.5
index d7dc344865c4a0..2fe1d3eeba7cc7 100644
--- a/deps/npm/man/man5/npmrc.5
+++ b/deps/npm/man/man5/npmrc.5
@@ -1,4 +1,4 @@
-.TH "NPMRC" "5" "October 2023" "" ""
+.TH "NPMRC" "5" "November 2023" "" ""
.SH "NAME"
\fBnpmrc\fR - The npm config files
.SS "Description"
diff --git a/deps/npm/man/man5/package-json.5 b/deps/npm/man/man5/package-json.5
index 71d630e750e645..8054048290285e 100644
--- a/deps/npm/man/man5/package-json.5
+++ b/deps/npm/man/man5/package-json.5
@@ -1,4 +1,4 @@
-.TH "PACKAGE.JSON" "5" "October 2023" "" ""
+.TH "PACKAGE.JSON" "5" "November 2023" "" ""
.SH "NAME"
\fBpackage.json\fR - Specifics of npm's package.json handling
.SS "Description"
diff --git a/deps/npm/man/man5/package-lock-json.5 b/deps/npm/man/man5/package-lock-json.5
index 22ae8cd1dd2d87..2f303d610ff127 100644
--- a/deps/npm/man/man5/package-lock-json.5
+++ b/deps/npm/man/man5/package-lock-json.5
@@ -1,4 +1,4 @@
-.TH "PACKAGE-LOCK.JSON" "5" "October 2023" "" ""
+.TH "PACKAGE-LOCK.JSON" "5" "November 2023" "" ""
.SH "NAME"
\fBpackage-lock.json\fR - A manifestation of the manifest
.SS "Description"
@@ -69,7 +69,7 @@ No version provided: an "ancient" shrinkwrap file from a version of npm prior to
.IP \(bu 4
\fB2\fR: The lockfile version used by npm v7 and v8. Backwards compatible to v1 lockfiles.
.IP \(bu 4
-\fB3\fR: The lockfile version used by npm v9. Backwards compatible to npm v7.
+\fB3\fR: The lockfile version used by npm v9 and above. Backwards compatible to npm v7.
.RE 0
.P
diff --git a/deps/npm/man/man7/config.7 b/deps/npm/man/man7/config.7
index 496cfcb4ba71a2..73552f74e29746 100644
--- a/deps/npm/man/man7/config.7
+++ b/deps/npm/man/man7/config.7
@@ -1,4 +1,4 @@
-.TH "CONFIG" "7" "October 2023" "" ""
+.TH "CONFIG" "7" "November 2023" "" ""
.SH "NAME"
\fBconfig\fR - More than you probably want to know about npm configuration
.SS "Description"
diff --git a/deps/npm/man/man7/dependency-selectors.7 b/deps/npm/man/man7/dependency-selectors.7
index fe78a200cb682f..78aaa5a18a9fff 100644
--- a/deps/npm/man/man7/dependency-selectors.7
+++ b/deps/npm/man/man7/dependency-selectors.7
@@ -1,4 +1,4 @@
-.TH "QUERYING" "7" "October 2023" "" ""
+.TH "QUERYING" "7" "November 2023" "" ""
.SH "NAME"
\fBQuerying\fR - Dependency Selector Syntax & Querying
.SS "Description"
diff --git a/deps/npm/man/man7/developers.7 b/deps/npm/man/man7/developers.7
index e0748fe1960c7d..9516ee1030c22a 100644
--- a/deps/npm/man/man7/developers.7
+++ b/deps/npm/man/man7/developers.7
@@ -1,4 +1,4 @@
-.TH "DEVELOPERS" "7" "October 2023" "" ""
+.TH "DEVELOPERS" "7" "November 2023" "" ""
.SH "NAME"
\fBdevelopers\fR - Developer Guide
.SS "Description"
diff --git a/deps/npm/man/man7/logging.7 b/deps/npm/man/man7/logging.7
index 767759fbb8249d..a6fb699796ea5d 100644
--- a/deps/npm/man/man7/logging.7
+++ b/deps/npm/man/man7/logging.7
@@ -1,4 +1,4 @@
-.TH "LOGGING" "7" "October 2023" "" ""
+.TH "LOGGING" "7" "November 2023" "" ""
.SH "NAME"
\fBLogging\fR - Why, What & How We Log
.SS "Description"
diff --git a/deps/npm/man/man7/orgs.7 b/deps/npm/man/man7/orgs.7
index 68410b66be297b..2f282bc29165de 100644
--- a/deps/npm/man/man7/orgs.7
+++ b/deps/npm/man/man7/orgs.7
@@ -1,4 +1,4 @@
-.TH "ORGS" "7" "October 2023" "" ""
+.TH "ORGS" "7" "November 2023" "" ""
.SH "NAME"
\fBorgs\fR - Working with Teams & Orgs
.SS "Description"
diff --git a/deps/npm/man/man7/package-spec.7 b/deps/npm/man/man7/package-spec.7
index 212d78dd71bf0b..6c38ccdcbf8434 100644
--- a/deps/npm/man/man7/package-spec.7
+++ b/deps/npm/man/man7/package-spec.7
@@ -1,4 +1,4 @@
-.TH "PACKAGE-SPEC" "7" "October 2023" "" ""
+.TH "PACKAGE-SPEC" "7" "November 2023" "" ""
.SH "NAME"
\fBpackage-spec\fR - Package name specifier
.SS "Description"
diff --git a/deps/npm/man/man7/registry.7 b/deps/npm/man/man7/registry.7
index f1133f43666af7..a1dc9352fc706b 100644
--- a/deps/npm/man/man7/registry.7
+++ b/deps/npm/man/man7/registry.7
@@ -1,4 +1,4 @@
-.TH "REGISTRY" "7" "October 2023" "" ""
+.TH "REGISTRY" "7" "November 2023" "" ""
.SH "NAME"
\fBregistry\fR - The JavaScript Package Registry
.SS "Description"
diff --git a/deps/npm/man/man7/removal.7 b/deps/npm/man/man7/removal.7
index f96bbe84a4ea5a..0047ac99fd5832 100644
--- a/deps/npm/man/man7/removal.7
+++ b/deps/npm/man/man7/removal.7
@@ -1,4 +1,4 @@
-.TH "REMOVAL" "7" "October 2023" "" ""
+.TH "REMOVAL" "7" "November 2023" "" ""
.SH "NAME"
\fBremoval\fR - Cleaning the Slate
.SS "Synopsis"
diff --git a/deps/npm/man/man7/scope.7 b/deps/npm/man/man7/scope.7
index c2a6ecd8d25342..b7c6d0104ac3b8 100644
--- a/deps/npm/man/man7/scope.7
+++ b/deps/npm/man/man7/scope.7
@@ -1,4 +1,4 @@
-.TH "SCOPE" "7" "October 2023" "" ""
+.TH "SCOPE" "7" "November 2023" "" ""
.SH "NAME"
\fBscope\fR - Scoped packages
.SS "Description"
diff --git a/deps/npm/man/man7/scripts.7 b/deps/npm/man/man7/scripts.7
index 8306b12e37fa8a..881e8202e086f3 100644
--- a/deps/npm/man/man7/scripts.7
+++ b/deps/npm/man/man7/scripts.7
@@ -1,4 +1,4 @@
-.TH "SCRIPTS" "7" "October 2023" "" ""
+.TH "SCRIPTS" "7" "November 2023" "" ""
.SH "NAME"
\fBscripts\fR - How npm handles the "scripts" field
.SS "Description"
@@ -201,8 +201,6 @@ These are run from the scripts of \fB\fR
\fBpostpublish\fR
.RE 0
-.P
-\fBprepare\fR will not run during \fB--dry-run\fR
.SS "npm help rebuild"
.RS 0
.IP \(bu 4
diff --git a/deps/npm/man/man7/workspaces.7 b/deps/npm/man/man7/workspaces.7
index 0558c8446399f6..a81dd84a928fb0 100644
--- a/deps/npm/man/man7/workspaces.7
+++ b/deps/npm/man/man7/workspaces.7
@@ -1,4 +1,4 @@
-.TH "WORKSPACES" "7" "October 2023" "" ""
+.TH "WORKSPACES" "7" "November 2023" "" ""
.SH "NAME"
\fBworkspaces\fR - Working with workspaces
.SS "Description"
diff --git a/deps/npm/node_modules/@npmcli/agent/node_modules/https-proxy-agent/dist/index.js b/deps/npm/node_modules/@npmcli/agent/node_modules/https-proxy-agent/dist/index.js
index e3bbfe632c454d..978af031baf3aa 100644
--- a/deps/npm/node_modules/@npmcli/agent/node_modules/https-proxy-agent/dist/index.js
+++ b/deps/npm/node_modules/@npmcli/agent/node_modules/https-proxy-agent/dist/index.js
@@ -81,7 +81,11 @@ class HttpsProxyAgent extends agent_base_1.Agent {
let socket;
if (proxy.protocol === 'https:') {
debug('Creating `tls.Socket`: %o', this.connectOpts);
- socket = tls.connect(this.connectOpts);
+ const servername = this.connectOpts.servername || this.connectOpts.host;
+ socket = tls.connect({
+ ...this.connectOpts,
+ servername: servername && net.isIP(servername) ? undefined : servername
+ });
}
else {
debug('Creating `net.Socket`: %o', this.connectOpts);
diff --git a/deps/npm/node_modules/@npmcli/agent/node_modules/https-proxy-agent/dist/parse-proxy-response.js b/deps/npm/node_modules/@npmcli/agent/node_modules/https-proxy-agent/dist/parse-proxy-response.js
index a28f1d811805f8..d3f506f9413066 100644
--- a/deps/npm/node_modules/@npmcli/agent/node_modules/https-proxy-agent/dist/parse-proxy-response.js
+++ b/deps/npm/node_modules/@npmcli/agent/node_modules/https-proxy-agent/dist/parse-proxy-response.js
@@ -47,7 +47,10 @@ function parseProxyResponse(socket) {
read();
return;
}
- const headerParts = buffered.slice(0, endOfHeaders).toString('ascii').split('\r\n');
+ const headerParts = buffered
+ .slice(0, endOfHeaders)
+ .toString('ascii')
+ .split('\r\n');
const firstLine = headerParts.shift();
if (!firstLine) {
socket.destroy();
diff --git a/deps/npm/node_modules/@npmcli/agent/node_modules/https-proxy-agent/package.json b/deps/npm/node_modules/@npmcli/agent/node_modules/https-proxy-agent/package.json
index fc5f988d3b02bf..07c04f82a9c3ab 100644
--- a/deps/npm/node_modules/@npmcli/agent/node_modules/https-proxy-agent/package.json
+++ b/deps/npm/node_modules/@npmcli/agent/node_modules/https-proxy-agent/package.json
@@ -1,6 +1,6 @@
{
"name": "https-proxy-agent",
- "version": "7.0.1",
+ "version": "7.0.2",
"description": "An HTTP(s) proxy `http.Agent` implementation for HTTPS",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
diff --git a/deps/npm/node_modules/@npmcli/agent/node_modules/socks-proxy-agent/dist/index.js b/deps/npm/node_modules/@npmcli/agent/node_modules/socks-proxy-agent/dist/index.js
index 8189e014c13a0d..102ecd64c0b9d6 100644
--- a/deps/npm/node_modules/@npmcli/agent/node_modules/socks-proxy-agent/dist/index.js
+++ b/deps/npm/node_modules/@npmcli/agent/node_modules/socks-proxy-agent/dist/index.js
@@ -33,6 +33,7 @@ const debug_1 = __importDefault(require("debug"));
const dns = __importStar(require("dns"));
const net = __importStar(require("net"));
const tls = __importStar(require("tls"));
+const url_1 = require("url");
const debug = (0, debug_1.default)('socks-proxy-agent');
function parseSocksURL(url) {
let lookup = false;
@@ -88,7 +89,7 @@ function parseSocksURL(url) {
class SocksProxyAgent extends agent_base_1.Agent {
constructor(uri, opts) {
super(opts);
- const url = typeof uri === 'string' ? new URL(uri) : uri;
+ const url = typeof uri === 'string' ? new url_1.URL(uri) : uri;
const { proxy, lookup } = parseSocksURL(url);
this.shouldLookup = lookup;
this.proxy = proxy;
diff --git a/deps/npm/node_modules/@npmcli/agent/node_modules/socks-proxy-agent/package.json b/deps/npm/node_modules/@npmcli/agent/node_modules/socks-proxy-agent/package.json
index a6c7c0741641a1..6e1c2c12de3674 100644
--- a/deps/npm/node_modules/@npmcli/agent/node_modules/socks-proxy-agent/package.json
+++ b/deps/npm/node_modules/@npmcli/agent/node_modules/socks-proxy-agent/package.json
@@ -1,6 +1,6 @@
{
"name": "socks-proxy-agent",
- "version": "8.0.1",
+ "version": "8.0.2",
"description": "A SOCKS proxy `http.Agent` implementation for HTTP and HTTPS",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
@@ -107,7 +107,7 @@
"socks5h"
],
"dependencies": {
- "agent-base": "^7.0.1",
+ "agent-base": "^7.0.2",
"debug": "^4.3.4",
"socks": "^2.7.1"
},
@@ -117,7 +117,7 @@
"@types/dns2": "^2.0.3",
"@types/jest": "^29.5.1",
"@types/node": "^14.18.45",
- "async-listen": "^2.1.0",
+ "async-listen": "^3.0.0",
"async-retry": "^1.3.3",
"cacheable-lookup": "^6.1.0",
"dns2": "^2.1.0",
@@ -125,8 +125,8 @@
"socksv5": "github:TooTallNate/socksv5#fix/dstSock-close-event",
"ts-jest": "^29.1.0",
"typescript": "^5.0.4",
- "tsconfig": "0.0.0",
- "proxy": "2.0.1"
+ "proxy": "2.1.1",
+ "tsconfig": "0.0.0"
},
"engines": {
"node": ">= 14"
diff --git a/deps/npm/node_modules/@npmcli/arborist/package.json b/deps/npm/node_modules/@npmcli/arborist/package.json
index 95d9bc7416905b..a4d47d5627031c 100644
--- a/deps/npm/node_modules/@npmcli/arborist/package.json
+++ b/deps/npm/node_modules/@npmcli/arborist/package.json
@@ -1,6 +1,6 @@
{
"name": "@npmcli/arborist",
- "version": "7.2.0",
+ "version": "7.2.1",
"description": "Manage node_modules trees",
"dependencies": {
"@isaacs/string-locale-compare": "^1.1.0",
@@ -12,7 +12,7 @@
"@npmcli/node-gyp": "^3.0.0",
"@npmcli/package-json": "^5.0.0",
"@npmcli/query": "^3.0.1",
- "@npmcli/run-script": "^7.0.1",
+ "@npmcli/run-script": "^7.0.2",
"bin-links": "^4.0.1",
"cacache": "^18.0.0",
"common-ancestor-path": "^1.0.1",
diff --git a/deps/npm/node_modules/@npmcli/config/README.md b/deps/npm/node_modules/@npmcli/config/README.md
index 32418381a4c76a..12a5e23331d3ae 100644
--- a/deps/npm/node_modules/@npmcli/config/README.md
+++ b/deps/npm/node_modules/@npmcli/config/README.md
@@ -55,20 +55,17 @@ The resulting hierarchy of configs:
```js
const Config = require('@npmcli/config')
-// the types of all the configs we know about
-const types = require('./config/types.js')
-// default values for all the configs we know about
-const defaults = require('./config/defaults.js')
-// if you want -c to be short for --call and so on, define it here
-const shorthands = require('./config/shorthands.js')
+const { shorthands, definitions, flatten } = require('@npmcli/config/lib/definitions')
const conf = new Config({
// path to the npm module being run
npmPath: resolve(__dirname, '..'),
- types,
+ definitions,
shorthands,
- defaults,
+ flatten,
// optional, defaults to process.argv
+ // argv: [] <- if you are using this package in your own cli
+ // and dont want to have colliding argv
argv: process.argv,
// optional, defaults to process.env
env: process.env,
diff --git a/deps/npm/node_modules/@npmcli/config/lib/index.js b/deps/npm/node_modules/@npmcli/config/lib/index.js
index ad07fcdf51826a..b09ecc478f64fd 100644
--- a/deps/npm/node_modules/@npmcli/config/lib/index.js
+++ b/deps/npm/node_modules/@npmcli/config/lib/index.js
@@ -774,29 +774,29 @@ class Config {
await chmod(conf.source, mode)
}
- clearCredentialsByURI (uri) {
+ clearCredentialsByURI (uri, level = 'user') {
const nerfed = nerfDart(uri)
const def = nerfDart(this.get('registry'))
if (def === nerfed) {
- this.delete(`-authtoken`, 'user')
- this.delete(`_authToken`, 'user')
- this.delete(`_authtoken`, 'user')
- this.delete(`_auth`, 'user')
- this.delete(`_password`, 'user')
- this.delete(`username`, 'user')
+ this.delete(`-authtoken`, level)
+ this.delete(`_authToken`, level)
+ this.delete(`_authtoken`, level)
+ this.delete(`_auth`, level)
+ this.delete(`_password`, level)
+ this.delete(`username`, level)
// de-nerf email if it's nerfed to the default registry
- const email = this.get(`${nerfed}:email`, 'user')
+ const email = this.get(`${nerfed}:email`, level)
if (email) {
- this.set('email', email, 'user')
+ this.set('email', email, level)
}
}
- this.delete(`${nerfed}:_authToken`, 'user')
- this.delete(`${nerfed}:_auth`, 'user')
- this.delete(`${nerfed}:_password`, 'user')
- this.delete(`${nerfed}:username`, 'user')
- this.delete(`${nerfed}:email`, 'user')
- this.delete(`${nerfed}:certfile`, 'user')
- this.delete(`${nerfed}:keyfile`, 'user')
+ this.delete(`${nerfed}:_authToken`, level)
+ this.delete(`${nerfed}:_auth`, level)
+ this.delete(`${nerfed}:_password`, level)
+ this.delete(`${nerfed}:username`, level)
+ this.delete(`${nerfed}:email`, level)
+ this.delete(`${nerfed}:certfile`, level)
+ this.delete(`${nerfed}:keyfile`, level)
}
setCredentialsByURI (uri, { token, username, password, email, certfile, keyfile }) {
diff --git a/deps/npm/node_modules/@npmcli/config/package.json b/deps/npm/node_modules/@npmcli/config/package.json
index 85af7ee1c7d405..2f30c7ff98a644 100644
--- a/deps/npm/node_modules/@npmcli/config/package.json
+++ b/deps/npm/node_modules/@npmcli/config/package.json
@@ -1,6 +1,6 @@
{
"name": "@npmcli/config",
- "version": "8.0.0",
+ "version": "8.0.1",
"files": [
"bin/",
"lib/"
diff --git a/deps/npm/node_modules/@npmcli/run-script/package.json b/deps/npm/node_modules/@npmcli/run-script/package.json
index 7e7d2561571566..21f00c7f1cbfbb 100644
--- a/deps/npm/node_modules/@npmcli/run-script/package.json
+++ b/deps/npm/node_modules/@npmcli/run-script/package.json
@@ -1,6 +1,6 @@
{
"name": "@npmcli/run-script",
- "version": "7.0.1",
+ "version": "7.0.2",
"description": "Run a lifecycle script for a package (descendant of npm-lifecycle)",
"author": "GitHub Inc.",
"license": "ISC",
@@ -16,14 +16,14 @@
},
"devDependencies": {
"@npmcli/eslint-config": "^4.0.0",
- "@npmcli/template-oss": "4.18.0",
+ "@npmcli/template-oss": "4.19.0",
"require-inject": "^1.4.4",
"tap": "^16.0.1"
},
"dependencies": {
"@npmcli/node-gyp": "^3.0.0",
"@npmcli/promise-spawn": "^7.0.0",
- "node-gyp": "^9.0.0",
+ "node-gyp": "^10.0.0",
"read-package-json-fast": "^3.0.0",
"which": "^4.0.0"
},
@@ -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.19.0",
"publish": "true"
},
"tap": {
diff --git a/deps/npm/node_modules/@tootallnate/once/LICENSE b/deps/npm/node_modules/@tootallnate/once/LICENSE
deleted file mode 100644
index c4c56a2a53b2fe..00000000000000
--- a/deps/npm/node_modules/@tootallnate/once/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-MIT License
-
-Copyright (c) 2020 Nathan Rajlich
-
-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:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
diff --git a/deps/npm/node_modules/@tootallnate/once/dist/index.js b/deps/npm/node_modules/@tootallnate/once/dist/index.js
deleted file mode 100644
index ca6385b1b82f88..00000000000000
--- a/deps/npm/node_modules/@tootallnate/once/dist/index.js
+++ /dev/null
@@ -1,24 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-function once(emitter, name, { signal } = {}) {
- return new Promise((resolve, reject) => {
- function cleanup() {
- signal === null || signal === void 0 ? void 0 : signal.removeEventListener('abort', cleanup);
- emitter.removeListener(name, onEvent);
- emitter.removeListener('error', onError);
- }
- function onEvent(...args) {
- cleanup();
- resolve(args);
- }
- function onError(err) {
- cleanup();
- reject(err);
- }
- signal === null || signal === void 0 ? void 0 : signal.addEventListener('abort', cleanup);
- emitter.on(name, onEvent);
- emitter.on('error', onError);
- });
-}
-exports.default = once;
-//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/deps/npm/node_modules/@tootallnate/once/dist/overloaded-parameters.js b/deps/npm/node_modules/@tootallnate/once/dist/overloaded-parameters.js
deleted file mode 100644
index 207186d9e7cca0..00000000000000
--- a/deps/npm/node_modules/@tootallnate/once/dist/overloaded-parameters.js
+++ /dev/null
@@ -1,3 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-//# sourceMappingURL=overloaded-parameters.js.map
\ No newline at end of file
diff --git a/deps/npm/node_modules/@tootallnate/once/dist/types.js b/deps/npm/node_modules/@tootallnate/once/dist/types.js
deleted file mode 100644
index 11e638d1ee44ae..00000000000000
--- a/deps/npm/node_modules/@tootallnate/once/dist/types.js
+++ /dev/null
@@ -1,3 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-//# sourceMappingURL=types.js.map
\ No newline at end of file
diff --git a/deps/npm/node_modules/@tootallnate/once/package.json b/deps/npm/node_modules/@tootallnate/once/package.json
deleted file mode 100644
index 69ce947d9c3103..00000000000000
--- a/deps/npm/node_modules/@tootallnate/once/package.json
+++ /dev/null
@@ -1,52 +0,0 @@
-{
- "name": "@tootallnate/once",
- "version": "2.0.0",
- "description": "Creates a Promise that waits for a single event",
- "main": "./dist/index.js",
- "types": "./dist/index.d.ts",
- "files": [
- "dist"
- ],
- "scripts": {
- "prebuild": "rimraf dist",
- "build": "tsc",
- "test": "jest",
- "prepublishOnly": "npm run build"
- },
- "repository": {
- "type": "git",
- "url": "git://github.com/TooTallNate/once.git"
- },
- "keywords": [],
- "author": "Nathan Rajlich (http://n8.io/)",
- "license": "MIT",
- "bugs": {
- "url": "https://github.com/TooTallNate/once/issues"
- },
- "devDependencies": {
- "@types/jest": "^27.0.2",
- "@types/node": "^12.12.11",
- "abort-controller": "^3.0.0",
- "jest": "^27.2.1",
- "rimraf": "^3.0.0",
- "ts-jest": "^27.0.5",
- "typescript": "^4.4.3"
- },
- "engines": {
- "node": ">= 10"
- },
- "jest": {
- "preset": "ts-jest",
- "globals": {
- "ts-jest": {
- "diagnostics": false,
- "isolatedModules": true
- }
- },
- "verbose": false,
- "testEnvironment": "node",
- "testMatch": [
- "/test/**/*.test.ts"
- ]
- }
-}
diff --git a/deps/npm/node_modules/agent-base/dist/src/index.js b/deps/npm/node_modules/agent-base/dist/src/index.js
deleted file mode 100644
index bfd9e22071e7ee..00000000000000
--- a/deps/npm/node_modules/agent-base/dist/src/index.js
+++ /dev/null
@@ -1,203 +0,0 @@
-"use strict";
-var __importDefault = (this && this.__importDefault) || function (mod) {
- return (mod && mod.__esModule) ? mod : { "default": mod };
-};
-const events_1 = require("events");
-const debug_1 = __importDefault(require("debug"));
-const promisify_1 = __importDefault(require("./promisify"));
-const debug = debug_1.default('agent-base');
-function isAgent(v) {
- return Boolean(v) && typeof v.addRequest === 'function';
-}
-function isSecureEndpoint() {
- const { stack } = new Error();
- if (typeof stack !== 'string')
- return false;
- return stack.split('\n').some(l => l.indexOf('(https.js:') !== -1 || l.indexOf('node:https:') !== -1);
-}
-function createAgent(callback, opts) {
- return new createAgent.Agent(callback, opts);
-}
-(function (createAgent) {
- /**
- * Base `http.Agent` implementation.
- * No pooling/keep-alive is implemented by default.
- *
- * @param {Function} callback
- * @api public
- */
- class Agent extends events_1.EventEmitter {
- constructor(callback, _opts) {
- super();
- let opts = _opts;
- if (typeof callback === 'function') {
- this.callback = callback;
- }
- else if (callback) {
- opts = callback;
- }
- // Timeout for the socket to be returned from the callback
- this.timeout = null;
- if (opts && typeof opts.timeout === 'number') {
- this.timeout = opts.timeout;
- }
- // These aren't actually used by `agent-base`, but are required
- // for the TypeScript definition files in `@types/node` :/
- this.maxFreeSockets = 1;
- this.maxSockets = 1;
- this.maxTotalSockets = Infinity;
- this.sockets = {};
- this.freeSockets = {};
- this.requests = {};
- this.options = {};
- }
- get defaultPort() {
- if (typeof this.explicitDefaultPort === 'number') {
- return this.explicitDefaultPort;
- }
- return isSecureEndpoint() ? 443 : 80;
- }
- set defaultPort(v) {
- this.explicitDefaultPort = v;
- }
- get protocol() {
- if (typeof this.explicitProtocol === 'string') {
- return this.explicitProtocol;
- }
- return isSecureEndpoint() ? 'https:' : 'http:';
- }
- set protocol(v) {
- this.explicitProtocol = v;
- }
- callback(req, opts, fn) {
- throw new Error('"agent-base" has no default implementation, you must subclass and override `callback()`');
- }
- /**
- * Called by node-core's "_http_client.js" module when creating
- * a new HTTP request with this Agent instance.
- *
- * @api public
- */
- addRequest(req, _opts) {
- const opts = Object.assign({}, _opts);
- if (typeof opts.secureEndpoint !== 'boolean') {
- opts.secureEndpoint = isSecureEndpoint();
- }
- if (opts.host == null) {
- opts.host = 'localhost';
- }
- if (opts.port == null) {
- opts.port = opts.secureEndpoint ? 443 : 80;
- }
- if (opts.protocol == null) {
- opts.protocol = opts.secureEndpoint ? 'https:' : 'http:';
- }
- if (opts.host && opts.path) {
- // If both a `host` and `path` are specified then it's most
- // likely the result of a `url.parse()` call... we need to
- // remove the `path` portion so that `net.connect()` doesn't
- // attempt to open that as a unix socket file.
- delete opts.path;
- }
- delete opts.agent;
- delete opts.hostname;
- delete opts._defaultAgent;
- delete opts.defaultPort;
- delete opts.createConnection;
- // Hint to use "Connection: close"
- // XXX: non-documented `http` module API :(
- req._last = true;
- req.shouldKeepAlive = false;
- let timedOut = false;
- let timeoutId = null;
- const timeoutMs = opts.timeout || this.timeout;
- const onerror = (err) => {
- if (req._hadError)
- return;
- req.emit('error', err);
- // For Safety. Some additional errors might fire later on
- // and we need to make sure we don't double-fire the error event.
- req._hadError = true;
- };
- const ontimeout = () => {
- timeoutId = null;
- timedOut = true;
- const err = new Error(`A "socket" was not created for HTTP request before ${timeoutMs}ms`);
- err.code = 'ETIMEOUT';
- onerror(err);
- };
- const callbackError = (err) => {
- if (timedOut)
- return;
- if (timeoutId !== null) {
- clearTimeout(timeoutId);
- timeoutId = null;
- }
- onerror(err);
- };
- const onsocket = (socket) => {
- if (timedOut)
- return;
- if (timeoutId != null) {
- clearTimeout(timeoutId);
- timeoutId = null;
- }
- if (isAgent(socket)) {
- // `socket` is actually an `http.Agent` instance, so
- // relinquish responsibility for this `req` to the Agent
- // from here on
- debug('Callback returned another Agent instance %o', socket.constructor.name);
- socket.addRequest(req, opts);
- return;
- }
- if (socket) {
- socket.once('free', () => {
- this.freeSocket(socket, opts);
- });
- req.onSocket(socket);
- return;
- }
- const err = new Error(`no Duplex stream was returned to agent-base for \`${req.method} ${req.path}\``);
- onerror(err);
- };
- if (typeof this.callback !== 'function') {
- onerror(new Error('`callback` is not defined'));
- return;
- }
- if (!this.promisifiedCallback) {
- if (this.callback.length >= 3) {
- debug('Converting legacy callback function to promise');
- this.promisifiedCallback = promisify_1.default(this.callback);
- }
- else {
- this.promisifiedCallback = this.callback;
- }
- }
- if (typeof timeoutMs === 'number' && timeoutMs > 0) {
- timeoutId = setTimeout(ontimeout, timeoutMs);
- }
- if ('port' in opts && typeof opts.port !== 'number') {
- opts.port = Number(opts.port);
- }
- try {
- debug('Resolving socket for %o request: %o', opts.protocol, `${req.method} ${req.path}`);
- Promise.resolve(this.promisifiedCallback(req, opts)).then(onsocket, callbackError);
- }
- catch (err) {
- Promise.reject(err).catch(callbackError);
- }
- }
- freeSocket(socket, opts) {
- debug('Freeing socket %o %o', socket.constructor.name, opts);
- socket.destroy();
- }
- destroy() {
- debug('Destroying agent %o', this.constructor.name);
- }
- }
- createAgent.Agent = Agent;
- // So that `instanceof` works correctly
- createAgent.prototype = createAgent.Agent.prototype;
-})(createAgent || (createAgent = {}));
-module.exports = createAgent;
-//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/deps/npm/node_modules/agent-base/dist/src/promisify.js b/deps/npm/node_modules/agent-base/dist/src/promisify.js
deleted file mode 100644
index b2f6132a7beaa5..00000000000000
--- a/deps/npm/node_modules/agent-base/dist/src/promisify.js
+++ /dev/null
@@ -1,18 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-function promisify(fn) {
- return function (req, opts) {
- return new Promise((resolve, reject) => {
- fn.call(this, req, opts, (err, rtn) => {
- if (err) {
- reject(err);
- }
- else {
- resolve(rtn);
- }
- });
- });
- };
-}
-exports.default = promisify;
-//# sourceMappingURL=promisify.js.map
\ No newline at end of file
diff --git a/deps/npm/node_modules/agent-base/package.json b/deps/npm/node_modules/agent-base/package.json
deleted file mode 100644
index fadce3ad99f22d..00000000000000
--- a/deps/npm/node_modules/agent-base/package.json
+++ /dev/null
@@ -1,64 +0,0 @@
-{
- "name": "agent-base",
- "version": "6.0.2",
- "description": "Turn a function into an `http.Agent` instance",
- "main": "dist/src/index",
- "typings": "dist/src/index",
- "files": [
- "dist/src",
- "src"
- ],
- "scripts": {
- "prebuild": "rimraf dist",
- "build": "tsc",
- "postbuild": "cpy --parents src test '!**/*.ts' dist",
- "test": "mocha --reporter spec dist/test/*.js",
- "test-lint": "eslint src --ext .js,.ts",
- "prepublishOnly": "npm run build"
- },
- "repository": {
- "type": "git",
- "url": "git://github.com/TooTallNate/node-agent-base.git"
- },
- "keywords": [
- "http",
- "agent",
- "base",
- "barebones",
- "https"
- ],
- "author": "Nathan Rajlich (http://n8.io/)",
- "license": "MIT",
- "bugs": {
- "url": "https://github.com/TooTallNate/node-agent-base/issues"
- },
- "dependencies": {
- "debug": "4"
- },
- "devDependencies": {
- "@types/debug": "4",
- "@types/mocha": "^5.2.7",
- "@types/node": "^14.0.20",
- "@types/semver": "^7.1.0",
- "@types/ws": "^6.0.3",
- "@typescript-eslint/eslint-plugin": "1.6.0",
- "@typescript-eslint/parser": "1.1.0",
- "async-listen": "^1.2.0",
- "cpy-cli": "^2.0.0",
- "eslint": "5.16.0",
- "eslint-config-airbnb": "17.1.0",
- "eslint-config-prettier": "4.1.0",
- "eslint-import-resolver-typescript": "1.1.1",
- "eslint-plugin-import": "2.16.0",
- "eslint-plugin-jsx-a11y": "6.2.1",
- "eslint-plugin-react": "7.12.4",
- "mocha": "^6.2.0",
- "rimraf": "^3.0.0",
- "semver": "^7.1.2",
- "typescript": "^3.5.3",
- "ws": "^3.0.0"
- },
- "engines": {
- "node": ">= 6.0.0"
- }
-}
diff --git a/deps/npm/node_modules/agentkeepalive/LICENSE b/deps/npm/node_modules/agentkeepalive/LICENSE
deleted file mode 100644
index 941258ca703b30..00000000000000
--- a/deps/npm/node_modules/agentkeepalive/LICENSE
+++ /dev/null
@@ -1,23 +0,0 @@
-The MIT License
-
-Copyright(c) node-modules and other contributors.
-Copyright(c) 2012 - 2015 fengmk2
-
-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:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/deps/npm/node_modules/agentkeepalive/browser.js b/deps/npm/node_modules/agentkeepalive/browser.js
deleted file mode 100644
index 29c9398aa567f9..00000000000000
--- a/deps/npm/node_modules/agentkeepalive/browser.js
+++ /dev/null
@@ -1,5 +0,0 @@
-module.exports = noop;
-module.exports.HttpsAgent = noop;
-
-// Noop function for browser since native api's don't use agents.
-function noop () {}
diff --git a/deps/npm/node_modules/agentkeepalive/index.js b/deps/npm/node_modules/agentkeepalive/index.js
deleted file mode 100644
index 6ca1513463724d..00000000000000
--- a/deps/npm/node_modules/agentkeepalive/index.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-module.exports = require('./lib/agent');
-module.exports.HttpsAgent = require('./lib/https_agent');
-module.exports.constants = require('./lib/constants');
diff --git a/deps/npm/node_modules/agentkeepalive/lib/agent.js b/deps/npm/node_modules/agentkeepalive/lib/agent.js
deleted file mode 100644
index 8bd354effa05ec..00000000000000
--- a/deps/npm/node_modules/agentkeepalive/lib/agent.js
+++ /dev/null
@@ -1,402 +0,0 @@
-'use strict';
-
-const OriginalAgent = require('http').Agent;
-const ms = require('humanize-ms');
-const debug = require('util').debuglog('agentkeepalive');
-const {
- INIT_SOCKET,
- CURRENT_ID,
- CREATE_ID,
- SOCKET_CREATED_TIME,
- SOCKET_NAME,
- SOCKET_REQUEST_COUNT,
- SOCKET_REQUEST_FINISHED_COUNT,
-} = require('./constants');
-
-// OriginalAgent come from
-// - https://github.com/nodejs/node/blob/v8.12.0/lib/_http_agent.js
-// - https://github.com/nodejs/node/blob/v10.12.0/lib/_http_agent.js
-
-// node <= 10
-let defaultTimeoutListenerCount = 1;
-const majorVersion = parseInt(process.version.split('.', 1)[0].substring(1));
-if (majorVersion >= 11 && majorVersion <= 12) {
- defaultTimeoutListenerCount = 2;
-} else if (majorVersion >= 13) {
- defaultTimeoutListenerCount = 3;
-}
-
-function deprecate(message) {
- console.log('[agentkeepalive:deprecated] %s', message);
-}
-
-class Agent extends OriginalAgent {
- constructor(options) {
- options = options || {};
- options.keepAlive = options.keepAlive !== false;
- // default is keep-alive and 4s free socket timeout
- // see https://medium.com/ssense-tech/reduce-networking-errors-in-nodejs-23b4eb9f2d83
- if (options.freeSocketTimeout === undefined) {
- options.freeSocketTimeout = 4000;
- }
- // Legacy API: keepAliveTimeout should be rename to `freeSocketTimeout`
- if (options.keepAliveTimeout) {
- deprecate('options.keepAliveTimeout is deprecated, please use options.freeSocketTimeout instead');
- options.freeSocketTimeout = options.keepAliveTimeout;
- delete options.keepAliveTimeout;
- }
- // Legacy API: freeSocketKeepAliveTimeout should be rename to `freeSocketTimeout`
- if (options.freeSocketKeepAliveTimeout) {
- deprecate('options.freeSocketKeepAliveTimeout is deprecated, please use options.freeSocketTimeout instead');
- options.freeSocketTimeout = options.freeSocketKeepAliveTimeout;
- delete options.freeSocketKeepAliveTimeout;
- }
-
- // Sets the socket to timeout after timeout milliseconds of inactivity on the socket.
- // By default is double free socket timeout.
- if (options.timeout === undefined) {
- // make sure socket default inactivity timeout >= 8s
- options.timeout = Math.max(options.freeSocketTimeout * 2, 8000);
- }
-
- // support humanize format
- options.timeout = ms(options.timeout);
- options.freeSocketTimeout = ms(options.freeSocketTimeout);
- options.socketActiveTTL = options.socketActiveTTL ? ms(options.socketActiveTTL) : 0;
-
- super(options);
-
- this[CURRENT_ID] = 0;
-
- // create socket success counter
- this.createSocketCount = 0;
- this.createSocketCountLastCheck = 0;
-
- this.createSocketErrorCount = 0;
- this.createSocketErrorCountLastCheck = 0;
-
- this.closeSocketCount = 0;
- this.closeSocketCountLastCheck = 0;
-
- // socket error event count
- this.errorSocketCount = 0;
- this.errorSocketCountLastCheck = 0;
-
- // request finished counter
- this.requestCount = 0;
- this.requestCountLastCheck = 0;
-
- // including free socket timeout counter
- this.timeoutSocketCount = 0;
- this.timeoutSocketCountLastCheck = 0;
-
- this.on('free', socket => {
- // https://github.com/nodejs/node/pull/32000
- // Node.js native agent will check socket timeout eqs agent.options.timeout.
- // Use the ttl or freeSocketTimeout to overwrite.
- const timeout = this.calcSocketTimeout(socket);
- if (timeout > 0 && socket.timeout !== timeout) {
- socket.setTimeout(timeout);
- }
- });
- }
-
- get freeSocketKeepAliveTimeout() {
- deprecate('agent.freeSocketKeepAliveTimeout is deprecated, please use agent.options.freeSocketTimeout instead');
- return this.options.freeSocketTimeout;
- }
-
- get timeout() {
- deprecate('agent.timeout is deprecated, please use agent.options.timeout instead');
- return this.options.timeout;
- }
-
- get socketActiveTTL() {
- deprecate('agent.socketActiveTTL is deprecated, please use agent.options.socketActiveTTL instead');
- return this.options.socketActiveTTL;
- }
-
- calcSocketTimeout(socket) {
- /**
- * return <= 0: should free socket
- * return > 0: should update socket timeout
- * return undefined: not find custom timeout
- */
- let freeSocketTimeout = this.options.freeSocketTimeout;
- const socketActiveTTL = this.options.socketActiveTTL;
- if (socketActiveTTL) {
- // check socketActiveTTL
- const aliveTime = Date.now() - socket[SOCKET_CREATED_TIME];
- const diff = socketActiveTTL - aliveTime;
- if (diff <= 0) {
- return diff;
- }
- if (freeSocketTimeout && diff < freeSocketTimeout) {
- freeSocketTimeout = diff;
- }
- }
- // set freeSocketTimeout
- if (freeSocketTimeout) {
- // set free keepalive timer
- // try to use socket custom freeSocketTimeout first, support headers['keep-alive']
- // https://github.com/node-modules/urllib/blob/b76053020923f4d99a1c93cf2e16e0c5ba10bacf/lib/urllib.js#L498
- const customFreeSocketTimeout = socket.freeSocketTimeout || socket.freeSocketKeepAliveTimeout;
- return customFreeSocketTimeout || freeSocketTimeout;
- }
- }
-
- keepSocketAlive(socket) {
- const result = super.keepSocketAlive(socket);
- // should not keepAlive, do nothing
- if (!result) return result;
-
- const customTimeout = this.calcSocketTimeout(socket);
- if (typeof customTimeout === 'undefined') {
- return true;
- }
- if (customTimeout <= 0) {
- debug('%s(requests: %s, finished: %s) free but need to destroy by TTL, request count %s, diff is %s',
- socket[SOCKET_NAME], socket[SOCKET_REQUEST_COUNT], socket[SOCKET_REQUEST_FINISHED_COUNT], customTimeout);
- return false;
- }
- if (socket.timeout !== customTimeout) {
- socket.setTimeout(customTimeout);
- }
- return true;
- }
-
- // only call on addRequest
- reuseSocket(...args) {
- // reuseSocket(socket, req)
- super.reuseSocket(...args);
- const socket = args[0];
- const req = args[1];
- req.reusedSocket = true;
- const agentTimeout = this.options.timeout;
- if (getSocketTimeout(socket) !== agentTimeout) {
- // reset timeout before use
- socket.setTimeout(agentTimeout);
- debug('%s reset timeout to %sms', socket[SOCKET_NAME], agentTimeout);
- }
- socket[SOCKET_REQUEST_COUNT]++;
- debug('%s(requests: %s, finished: %s) reuse on addRequest, timeout %sms',
- socket[SOCKET_NAME], socket[SOCKET_REQUEST_COUNT], socket[SOCKET_REQUEST_FINISHED_COUNT],
- getSocketTimeout(socket));
- }
-
- [CREATE_ID]() {
- const id = this[CURRENT_ID]++;
- if (this[CURRENT_ID] === Number.MAX_SAFE_INTEGER) this[CURRENT_ID] = 0;
- return id;
- }
-
- [INIT_SOCKET](socket, options) {
- // bugfix here.
- // https on node 8, 10 won't set agent.options.timeout by default
- // TODO: need to fix on node itself
- if (options.timeout) {
- const timeout = getSocketTimeout(socket);
- if (!timeout) {
- socket.setTimeout(options.timeout);
- }
- }
-
- if (this.options.keepAlive) {
- // Disable Nagle's algorithm: http://blog.caustik.com/2012/04/08/scaling-node-js-to-100k-concurrent-connections/
- // https://fengmk2.com/benchmark/nagle-algorithm-delayed-ack-mock.html
- socket.setNoDelay(true);
- }
- this.createSocketCount++;
- if (this.options.socketActiveTTL) {
- socket[SOCKET_CREATED_TIME] = Date.now();
- }
- // don't show the hole '-----BEGIN CERTIFICATE----' key string
- socket[SOCKET_NAME] = `sock[${this[CREATE_ID]()}#${options._agentKey}]`.split('-----BEGIN', 1)[0];
- socket[SOCKET_REQUEST_COUNT] = 1;
- socket[SOCKET_REQUEST_FINISHED_COUNT] = 0;
- installListeners(this, socket, options);
- }
-
- createConnection(options, oncreate) {
- let called = false;
- const onNewCreate = (err, socket) => {
- if (called) return;
- called = true;
-
- if (err) {
- this.createSocketErrorCount++;
- return oncreate(err);
- }
- this[INIT_SOCKET](socket, options);
- oncreate(err, socket);
- };
-
- const newSocket = super.createConnection(options, onNewCreate);
- if (newSocket) onNewCreate(null, newSocket);
- return newSocket;
- }
-
- get statusChanged() {
- const changed = this.createSocketCount !== this.createSocketCountLastCheck ||
- this.createSocketErrorCount !== this.createSocketErrorCountLastCheck ||
- this.closeSocketCount !== this.closeSocketCountLastCheck ||
- this.errorSocketCount !== this.errorSocketCountLastCheck ||
- this.timeoutSocketCount !== this.timeoutSocketCountLastCheck ||
- this.requestCount !== this.requestCountLastCheck;
- if (changed) {
- this.createSocketCountLastCheck = this.createSocketCount;
- this.createSocketErrorCountLastCheck = this.createSocketErrorCount;
- this.closeSocketCountLastCheck = this.closeSocketCount;
- this.errorSocketCountLastCheck = this.errorSocketCount;
- this.timeoutSocketCountLastCheck = this.timeoutSocketCount;
- this.requestCountLastCheck = this.requestCount;
- }
- return changed;
- }
-
- getCurrentStatus() {
- return {
- createSocketCount: this.createSocketCount,
- createSocketErrorCount: this.createSocketErrorCount,
- closeSocketCount: this.closeSocketCount,
- errorSocketCount: this.errorSocketCount,
- timeoutSocketCount: this.timeoutSocketCount,
- requestCount: this.requestCount,
- freeSockets: inspect(this.freeSockets),
- sockets: inspect(this.sockets),
- requests: inspect(this.requests),
- };
- }
-}
-
-// node 8 don't has timeout attribute on socket
-// https://github.com/nodejs/node/pull/21204/files#diff-e6ef024c3775d787c38487a6309e491dR408
-function getSocketTimeout(socket) {
- return socket.timeout || socket._idleTimeout;
-}
-
-function installListeners(agent, socket, options) {
- debug('%s create, timeout %sms', socket[SOCKET_NAME], getSocketTimeout(socket));
-
- // listener socket events: close, timeout, error, free
- function onFree() {
- // create and socket.emit('free') logic
- // https://github.com/nodejs/node/blob/master/lib/_http_agent.js#L311
- // no req on the socket, it should be the new socket
- if (!socket._httpMessage && socket[SOCKET_REQUEST_COUNT] === 1) return;
-
- socket[SOCKET_REQUEST_FINISHED_COUNT]++;
- agent.requestCount++;
- debug('%s(requests: %s, finished: %s) free',
- socket[SOCKET_NAME], socket[SOCKET_REQUEST_COUNT], socket[SOCKET_REQUEST_FINISHED_COUNT]);
-
- // should reuse on pedding requests?
- const name = agent.getName(options);
- if (socket.writable && agent.requests[name] && agent.requests[name].length) {
- // will be reuse on agent free listener
- socket[SOCKET_REQUEST_COUNT]++;
- debug('%s(requests: %s, finished: %s) will be reuse on agent free event',
- socket[SOCKET_NAME], socket[SOCKET_REQUEST_COUNT], socket[SOCKET_REQUEST_FINISHED_COUNT]);
- }
- }
- socket.on('free', onFree);
-
- function onClose(isError) {
- debug('%s(requests: %s, finished: %s) close, isError: %s',
- socket[SOCKET_NAME], socket[SOCKET_REQUEST_COUNT], socket[SOCKET_REQUEST_FINISHED_COUNT], isError);
- agent.closeSocketCount++;
- }
- socket.on('close', onClose);
-
- // start socket timeout handler
- function onTimeout() {
- // onTimeout and emitRequestTimeout(_http_client.js)
- // https://github.com/nodejs/node/blob/v12.x/lib/_http_client.js#L711
- const listenerCount = socket.listeners('timeout').length;
- // node <= 10, default listenerCount is 1, onTimeout
- // 11 < node <= 12, default listenerCount is 2, onTimeout and emitRequestTimeout
- // node >= 13, default listenerCount is 3, onTimeout,
- // onTimeout(https://github.com/nodejs/node/pull/32000/files#diff-5f7fb0850412c6be189faeddea6c5359R333)
- // and emitRequestTimeout
- const timeout = getSocketTimeout(socket);
- const req = socket._httpMessage;
- const reqTimeoutListenerCount = req && req.listeners('timeout').length || 0;
- debug('%s(requests: %s, finished: %s) timeout after %sms, listeners %s, defaultTimeoutListenerCount %s, hasHttpRequest %s, HttpRequest timeoutListenerCount %s',
- socket[SOCKET_NAME], socket[SOCKET_REQUEST_COUNT], socket[SOCKET_REQUEST_FINISHED_COUNT],
- timeout, listenerCount, defaultTimeoutListenerCount, !!req, reqTimeoutListenerCount);
- if (debug.enabled) {
- debug('timeout listeners: %s', socket.listeners('timeout').map(f => f.name).join(', '));
- }
- agent.timeoutSocketCount++;
- const name = agent.getName(options);
- if (agent.freeSockets[name] && agent.freeSockets[name].indexOf(socket) !== -1) {
- // free socket timeout, destroy quietly
- socket.destroy();
- // Remove it from freeSockets list immediately to prevent new requests
- // from being sent through this socket.
- agent.removeSocket(socket, options);
- debug('%s is free, destroy quietly', socket[SOCKET_NAME]);
- } else {
- // if there is no any request socket timeout handler,
- // agent need to handle socket timeout itself.
- //
- // custom request socket timeout handle logic must follow these rules:
- // 1. Destroy socket first
- // 2. Must emit socket 'agentRemove' event tell agent remove socket
- // from freeSockets list immediately.
- // Otherise you may be get 'socket hang up' error when reuse
- // free socket and timeout happen in the same time.
- if (reqTimeoutListenerCount === 0) {
- const error = new Error('Socket timeout');
- error.code = 'ERR_SOCKET_TIMEOUT';
- error.timeout = timeout;
- // must manually call socket.end() or socket.destroy() to end the connection.
- // https://nodejs.org/dist/latest-v10.x/docs/api/net.html#net_socket_settimeout_timeout_callback
- socket.destroy(error);
- agent.removeSocket(socket, options);
- debug('%s destroy with timeout error', socket[SOCKET_NAME]);
- }
- }
- }
- socket.on('timeout', onTimeout);
-
- function onError(err) {
- const listenerCount = socket.listeners('error').length;
- debug('%s(requests: %s, finished: %s) error: %s, listenerCount: %s',
- socket[SOCKET_NAME], socket[SOCKET_REQUEST_COUNT], socket[SOCKET_REQUEST_FINISHED_COUNT],
- err, listenerCount);
- agent.errorSocketCount++;
- if (listenerCount === 1) {
- // if socket don't contain error event handler, don't catch it, emit it again
- debug('%s emit uncaught error event', socket[SOCKET_NAME]);
- socket.removeListener('error', onError);
- socket.emit('error', err);
- }
- }
- socket.on('error', onError);
-
- function onRemove() {
- debug('%s(requests: %s, finished: %s) agentRemove',
- socket[SOCKET_NAME],
- socket[SOCKET_REQUEST_COUNT], socket[SOCKET_REQUEST_FINISHED_COUNT]);
- // We need this function for cases like HTTP 'upgrade'
- // (defined by WebSockets) where we need to remove a socket from the
- // pool because it'll be locked up indefinitely
- socket.removeListener('close', onClose);
- socket.removeListener('error', onError);
- socket.removeListener('free', onFree);
- socket.removeListener('timeout', onTimeout);
- socket.removeListener('agentRemove', onRemove);
- }
- socket.on('agentRemove', onRemove);
-}
-
-module.exports = Agent;
-
-function inspect(obj) {
- const res = {};
- for (const key in obj) {
- res[key] = obj[key].length;
- }
- return res;
-}
diff --git a/deps/npm/node_modules/agentkeepalive/lib/constants.js b/deps/npm/node_modules/agentkeepalive/lib/constants.js
deleted file mode 100644
index ca7ab97eacd9c9..00000000000000
--- a/deps/npm/node_modules/agentkeepalive/lib/constants.js
+++ /dev/null
@@ -1,14 +0,0 @@
-'use strict';
-
-module.exports = {
- // agent
- CURRENT_ID: Symbol('agentkeepalive#currentId'),
- CREATE_ID: Symbol('agentkeepalive#createId'),
- INIT_SOCKET: Symbol('agentkeepalive#initSocket'),
- CREATE_HTTPS_CONNECTION: Symbol('agentkeepalive#createHttpsConnection'),
- // socket
- SOCKET_CREATED_TIME: Symbol('agentkeepalive#socketCreatedTime'),
- SOCKET_NAME: Symbol('agentkeepalive#socketName'),
- SOCKET_REQUEST_COUNT: Symbol('agentkeepalive#socketRequestCount'),
- SOCKET_REQUEST_FINISHED_COUNT: Symbol('agentkeepalive#socketRequestFinishedCount'),
-};
diff --git a/deps/npm/node_modules/agentkeepalive/lib/https_agent.js b/deps/npm/node_modules/agentkeepalive/lib/https_agent.js
deleted file mode 100644
index 344fb32cadd862..00000000000000
--- a/deps/npm/node_modules/agentkeepalive/lib/https_agent.js
+++ /dev/null
@@ -1,51 +0,0 @@
-'use strict';
-
-const OriginalHttpsAgent = require('https').Agent;
-const HttpAgent = require('./agent');
-const {
- INIT_SOCKET,
- CREATE_HTTPS_CONNECTION,
-} = require('./constants');
-
-class HttpsAgent extends HttpAgent {
- constructor(options) {
- super(options);
-
- this.defaultPort = 443;
- this.protocol = 'https:';
- this.maxCachedSessions = this.options.maxCachedSessions;
- /* istanbul ignore next */
- if (this.maxCachedSessions === undefined) {
- this.maxCachedSessions = 100;
- }
-
- this._sessionCache = {
- map: {},
- list: [],
- };
- }
-
- createConnection(options, oncreate) {
- const socket = this[CREATE_HTTPS_CONNECTION](options, oncreate);
- this[INIT_SOCKET](socket, options);
- return socket;
- }
-}
-
-// https://github.com/nodejs/node/blob/master/lib/https.js#L89
-HttpsAgent.prototype[CREATE_HTTPS_CONNECTION] = OriginalHttpsAgent.prototype.createConnection;
-
-[
- 'getName',
- '_getSession',
- '_cacheSession',
- // https://github.com/nodejs/node/pull/4982
- '_evictSession',
-].forEach(function(method) {
- /* istanbul ignore next */
- if (typeof OriginalHttpsAgent.prototype[method] === 'function') {
- HttpsAgent.prototype[method] = OriginalHttpsAgent.prototype[method];
- }
-});
-
-module.exports = HttpsAgent;
diff --git a/deps/npm/node_modules/agentkeepalive/package.json b/deps/npm/node_modules/agentkeepalive/package.json
deleted file mode 100644
index d8e9aa7160d0b3..00000000000000
--- a/deps/npm/node_modules/agentkeepalive/package.json
+++ /dev/null
@@ -1,56 +0,0 @@
-{
- "name": "agentkeepalive",
- "version": "4.5.0",
- "description": "Missing keepalive http.Agent",
- "main": "index.js",
- "browser": "browser.js",
- "files": [
- "index.js",
- "index.d.ts",
- "browser.js",
- "lib"
- ],
- "scripts": {
- "contributor": "git-contributor",
- "test": "npm run lint && egg-bin test --full-trace",
- "test-local": "egg-bin test --full-trace",
- "cov": "cross-env NODE_DEBUG=agentkeepalive egg-bin cov --full-trace",
- "ci": "npm run lint && npm run cov",
- "lint": "eslint lib test index.js"
- },
- "repository": {
- "type": "git",
- "url": "git://github.com/node-modules/agentkeepalive.git"
- },
- "bugs": {
- "url": "https://github.com/node-modules/agentkeepalive/issues"
- },
- "keywords": [
- "http",
- "https",
- "agent",
- "keepalive",
- "agentkeepalive",
- "HttpAgent",
- "HttpsAgent"
- ],
- "dependencies": {
- "humanize-ms": "^1.2.1"
- },
- "devDependencies": {
- "coffee": "^5.3.0",
- "cross-env": "^6.0.3",
- "egg-bin": "^4.9.0",
- "eslint": "^5.7.0",
- "eslint-config-egg": "^7.1.0",
- "git-contributor": "^2.0.0",
- "mm": "^2.4.1",
- "pedding": "^1.1.0",
- "typescript": "^3.8.3"
- },
- "engines": {
- "node": ">= 8.0.0"
- },
- "author": "fengmk2 (https://github.com/fengmk2)",
- "license": "MIT"
-}
diff --git a/deps/npm/node_modules/are-we-there-yet/lib/tracker-base.js b/deps/npm/node_modules/are-we-there-yet/lib/tracker-base.js
index 6f436875578a7a..1b5e0dc30c49bb 100644
--- a/deps/npm/node_modules/are-we-there-yet/lib/tracker-base.js
+++ b/deps/npm/node_modules/are-we-there-yet/lib/tracker-base.js
@@ -1,11 +1,13 @@
'use strict'
-var EventEmitter = require('events').EventEmitter
-var util = require('util')
+const EventEmitter = require('events')
-var trackerId = 0
-var TrackerBase = module.exports = function (name) {
- EventEmitter.call(this)
- this.id = ++trackerId
- this.name = name
+let trackerId = 0
+class TrackerBase extends EventEmitter {
+ constructor (name) {
+ super()
+ this.id = ++trackerId
+ this.name = name
+ }
}
-util.inherits(TrackerBase, EventEmitter)
+
+module.exports = TrackerBase
diff --git a/deps/npm/node_modules/are-we-there-yet/lib/tracker-group.js b/deps/npm/node_modules/are-we-there-yet/lib/tracker-group.js
index a3c7af804c4d3b..162c22584cdc53 100644
--- a/deps/npm/node_modules/are-we-there-yet/lib/tracker-group.js
+++ b/deps/npm/node_modules/are-we-there-yet/lib/tracker-group.js
@@ -1,116 +1,112 @@
'use strict'
-var util = require('util')
-var TrackerBase = require('./tracker-base.js')
-var Tracker = require('./tracker.js')
-var TrackerStream = require('./tracker-stream.js')
+const TrackerBase = require('./tracker-base.js')
+const Tracker = require('./tracker.js')
+const TrackerStream = require('./tracker-stream.js')
-var TrackerGroup = module.exports = function (name) {
- TrackerBase.call(this, name)
- this.parentGroup = null
- this.trackers = []
- this.completion = {}
- this.weight = {}
- this.totalWeight = 0
- this.finished = false
- this.bubbleChange = bubbleChange(this)
-}
-util.inherits(TrackerGroup, TrackerBase)
+class TrackerGroup extends TrackerBase {
+ parentGroup = null
+ trackers = []
+ completion = {}
+ weight = {}
+ totalWeight = 0
+ finished = false
+ bubbleChange = bubbleChange(this)
-function bubbleChange (trackerGroup) {
- return function (name, completed, tracker) {
- trackerGroup.completion[tracker.id] = completed
- if (trackerGroup.finished) {
- return
+ nameInTree () {
+ var names = []
+ var from = this
+ while (from) {
+ names.unshift(from.name)
+ from = from.parentGroup
}
- trackerGroup.emit('change', name || trackerGroup.name, trackerGroup.completed(), trackerGroup)
+ return names.join('/')
}
-}
-TrackerGroup.prototype.nameInTree = function () {
- var names = []
- var from = this
- while (from) {
- names.unshift(from.name)
- from = from.parentGroup
- }
- return names.join('/')
-}
-
-TrackerGroup.prototype.addUnit = function (unit, weight) {
- if (unit.addUnit) {
- var toTest = this
- while (toTest) {
- if (unit === toTest) {
- throw new Error(
- 'Attempted to add tracker group ' +
- unit.name + ' to tree that already includes it ' +
- this.nameInTree(this))
+ addUnit (unit, weight) {
+ if (unit.addUnit) {
+ var toTest = this
+ while (toTest) {
+ if (unit === toTest) {
+ throw new Error(
+ 'Attempted to add tracker group ' +
+ unit.name + ' to tree that already includes it ' +
+ this.nameInTree(this))
+ }
+ toTest = toTest.parentGroup
}
- toTest = toTest.parentGroup
+ unit.parentGroup = this
}
- unit.parentGroup = this
+ this.weight[unit.id] = weight || 1
+ this.totalWeight += this.weight[unit.id]
+ this.trackers.push(unit)
+ this.completion[unit.id] = unit.completed()
+ unit.on('change', this.bubbleChange)
+ if (!this.finished) {
+ this.emit('change', unit.name, this.completion[unit.id], unit)
+ }
+ return unit
}
- this.weight[unit.id] = weight || 1
- this.totalWeight += this.weight[unit.id]
- this.trackers.push(unit)
- this.completion[unit.id] = unit.completed()
- unit.on('change', this.bubbleChange)
- if (!this.finished) {
- this.emit('change', unit.name, this.completion[unit.id], unit)
+
+ completed () {
+ if (this.trackers.length === 0) {
+ return 0
+ }
+ var valPerWeight = 1 / this.totalWeight
+ var completed = 0
+ for (var ii = 0; ii < this.trackers.length; ii++) {
+ var trackerId = this.trackers[ii].id
+ completed +=
+ valPerWeight * this.weight[trackerId] * this.completion[trackerId]
+ }
+ return completed
}
- return unit
-}
-TrackerGroup.prototype.completed = function () {
- if (this.trackers.length === 0) {
- return 0
+ newGroup (name, weight) {
+ return this.addUnit(new TrackerGroup(name), weight)
}
- var valPerWeight = 1 / this.totalWeight
- var completed = 0
- for (var ii = 0; ii < this.trackers.length; ii++) {
- var trackerId = this.trackers[ii].id
- completed +=
- valPerWeight * this.weight[trackerId] * this.completion[trackerId]
+
+ newItem (name, todo, weight) {
+ return this.addUnit(new Tracker(name, todo), weight)
}
- return completed
-}
-TrackerGroup.prototype.newGroup = function (name, weight) {
- return this.addUnit(new TrackerGroup(name), weight)
-}
+ newStream (name, todo, weight) {
+ return this.addUnit(new TrackerStream(name, todo), weight)
+ }
-TrackerGroup.prototype.newItem = function (name, todo, weight) {
- return this.addUnit(new Tracker(name, todo), weight)
-}
+ finish () {
+ this.finished = true
+ if (!this.trackers.length) {
+ this.addUnit(new Tracker(), 1, true)
+ }
+ for (var ii = 0; ii < this.trackers.length; ii++) {
+ var tracker = this.trackers[ii]
+ tracker.finish()
+ tracker.removeListener('change', this.bubbleChange)
+ }
+ this.emit('change', this.name, 1, this)
+ }
-TrackerGroup.prototype.newStream = function (name, todo, weight) {
- return this.addUnit(new TrackerStream(name, todo), weight)
-}
+ debug (depth = 0) {
+ const indent = ' '.repeat(depth)
+ let output = `${indent}${this.name || 'top'}: ${this.completed()}\n`
-TrackerGroup.prototype.finish = function () {
- this.finished = true
- if (!this.trackers.length) {
- this.addUnit(new Tracker(), 1, true)
- }
- for (var ii = 0; ii < this.trackers.length; ii++) {
- var tracker = this.trackers[ii]
- tracker.finish()
- tracker.removeListener('change', this.bubbleChange)
+ this.trackers.forEach(function (tracker) {
+ output += tracker instanceof TrackerGroup
+ ? tracker.debug(depth + 1)
+ : `${indent} ${tracker.name}: ${tracker.completed()}\n`
+ })
+ return output
}
- this.emit('change', this.name, 1, this)
}
-var buffer = ' '
-TrackerGroup.prototype.debug = function (depth) {
- depth = depth || 0
- var indent = depth ? buffer.slice(0, depth) : ''
- var output = indent + (this.name || 'top') + ': ' + this.completed() + '\n'
- this.trackers.forEach(function (tracker) {
- if (tracker instanceof TrackerGroup) {
- output += tracker.debug(depth + 1)
- } else {
- output += indent + ' ' + tracker.name + ': ' + tracker.completed() + '\n'
+function bubbleChange (trackerGroup) {
+ return function (name, completed, tracker) {
+ trackerGroup.completion[tracker.id] = completed
+ if (trackerGroup.finished) {
+ return
}
- })
- return output
+ trackerGroup.emit('change', name || trackerGroup.name, trackerGroup.completed(), trackerGroup)
+ }
}
+
+module.exports = TrackerGroup
diff --git a/deps/npm/node_modules/are-we-there-yet/lib/tracker-stream.js b/deps/npm/node_modules/are-we-there-yet/lib/tracker-stream.js
index e1cf85055702a7..4b111b6bae8a81 100644
--- a/deps/npm/node_modules/are-we-there-yet/lib/tracker-stream.js
+++ b/deps/npm/node_modules/are-we-there-yet/lib/tracker-stream.js
@@ -1,17 +1,28 @@
'use strict'
-var util = require('util')
-var stream = require('readable-stream')
-var delegate = require('delegates')
-var Tracker = require('./tracker.js')
+const stream = require('readable-stream')
+const delegate = require('delegates')
+const Tracker = require('./tracker.js')
-var TrackerStream = module.exports = function (name, size, options) {
- stream.Transform.call(this, options)
- this.tracker = new Tracker(name, size)
- this.name = name
- this.id = this.tracker.id
- this.tracker.on('change', delegateChange(this))
+class TrackerStream extends stream.Transform {
+ constructor (name, size, options) {
+ super(options)
+ this.tracker = new Tracker(name, size)
+ this.name = name
+ this.id = this.tracker.id
+ this.tracker.on('change', delegateChange(this))
+ }
+
+ _transform (data, encoding, cb) {
+ this.tracker.completeWork(data.length ? data.length : 1)
+ this.push(data)
+ cb()
+ }
+
+ _flush (cb) {
+ this.tracker.finish()
+ cb()
+ }
}
-util.inherits(TrackerStream, stream.Transform)
function delegateChange (trackerStream) {
return function (name, completion, tracker) {
@@ -19,18 +30,9 @@ function delegateChange (trackerStream) {
}
}
-TrackerStream.prototype._transform = function (data, encoding, cb) {
- this.tracker.completeWork(data.length ? data.length : 1)
- this.push(data)
- cb()
-}
-
-TrackerStream.prototype._flush = function (cb) {
- this.tracker.finish()
- cb()
-}
-
delegate(TrackerStream.prototype, 'tracker')
.method('completed')
.method('addWork')
.method('finish')
+
+module.exports = TrackerStream
diff --git a/deps/npm/node_modules/are-we-there-yet/lib/tracker.js b/deps/npm/node_modules/are-we-there-yet/lib/tracker.js
index a8f8b3ba013915..02e879ce6e3e26 100644
--- a/deps/npm/node_modules/are-we-there-yet/lib/tracker.js
+++ b/deps/npm/node_modules/are-we-there-yet/lib/tracker.js
@@ -1,32 +1,34 @@
'use strict'
-var util = require('util')
-var TrackerBase = require('./tracker-base.js')
+const TrackerBase = require('./tracker-base.js')
-var Tracker = module.exports = function (name, todo) {
- TrackerBase.call(this, name)
- this.workDone = 0
- this.workTodo = todo || 0
-}
-util.inherits(Tracker, TrackerBase)
+class Tracker extends TrackerBase {
+ constructor (name, todo) {
+ super(name)
+ this.workDone = 0
+ this.workTodo = todo || 0
+ }
-Tracker.prototype.completed = function () {
- return this.workTodo === 0 ? 0 : this.workDone / this.workTodo
-}
+ completed () {
+ return this.workTodo === 0 ? 0 : this.workDone / this.workTodo
+ }
-Tracker.prototype.addWork = function (work) {
- this.workTodo += work
- this.emit('change', this.name, this.completed(), this)
-}
+ addWork (work) {
+ this.workTodo += work
+ this.emit('change', this.name, this.completed(), this)
+ }
-Tracker.prototype.completeWork = function (work) {
- this.workDone += work
- if (this.workDone > this.workTodo) {
- this.workDone = this.workTodo
+ completeWork (work) {
+ this.workDone += work
+ if (this.workDone > this.workTodo) {
+ this.workDone = this.workTodo
+ }
+ this.emit('change', this.name, this.completed(), this)
}
- this.emit('change', this.name, this.completed(), this)
-}
-Tracker.prototype.finish = function () {
- this.workTodo = this.workDone = 1
- this.emit('change', this.name, 1, this)
+ finish () {
+ this.workTodo = this.workDone = 1
+ this.emit('change', this.name, 1, this)
+ }
}
+
+module.exports = Tracker
diff --git a/deps/npm/node_modules/are-we-there-yet/package.json b/deps/npm/node_modules/are-we-there-yet/package.json
index 919cb9a1dc5a73..e238c6581df667 100644
--- a/deps/npm/node_modules/are-we-there-yet/package.json
+++ b/deps/npm/node_modules/are-we-there-yet/package.json
@@ -1,6 +1,6 @@
{
"name": "are-we-there-yet",
- "version": "4.0.0",
+ "version": "4.0.1",
"description": "Keep track of the overall completion of many disparate processes",
"main": "lib/index.js",
"scripts": {
@@ -24,8 +24,8 @@
},
"homepage": "https://github.com/npm/are-we-there-yet",
"devDependencies": {
- "@npmcli/eslint-config": "^3.0.1",
- "@npmcli/template-oss": "4.5.1",
+ "@npmcli/eslint-config": "^4.0.0",
+ "@npmcli/template-oss": "4.17.0",
"tap": "^16.0.1"
},
"dependencies": {
@@ -51,6 +51,7 @@
},
"templateOSS": {
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
- "version": "4.5.1"
+ "version": "4.17.0",
+ "publish": true
}
}
diff --git a/deps/npm/node_modules/bin-links/lib/link-mans.js b/deps/npm/node_modules/bin-links/lib/link-mans.js
index 656e179b6ca54b..b6dd214cebdfe7 100644
--- a/deps/npm/node_modules/bin-links/lib/link-mans.js
+++ b/deps/npm/node_modules/bin-links/lib/link-mans.js
@@ -2,22 +2,23 @@ const { dirname, relative, join, resolve, basename } = require('path')
const linkGently = require('./link-gently.js')
const manTarget = require('./man-target.js')
-const linkMans = ({ path, pkg, top, force }) => {
+const linkMans = async ({ path, pkg, top, force }) => {
const target = manTarget({ path, top })
- if (!target || !pkg.man || !Array.isArray(pkg.man) || !pkg.man.length) {
- return Promise.resolve([])
+ if (!target || !Array.isArray(pkg?.man) || !pkg.man.length) {
+ return []
}
- // break any links to c:\\blah or /foo/blah or ../blah
- // and filter out duplicates
- const set = [...new Set(pkg.man.map(man =>
- man ? join('/', man).replace(/\\|:/g, '/').slice(1) : null)
- .filter(man => typeof man === 'string'))]
-
- return Promise.all(set.map(man => {
- const parseMan = man.match(/(.*\.([0-9]+)(\.gz)?)$/)
+ const links = []
+ // `new Set` to filter out duplicates
+ for (let man of new Set(pkg.man)) {
+ if (!man || typeof man !== 'string') {
+ continue
+ }
+ // break any links to c:\\blah or /foo/blah or ../blah
+ man = join('/', man).replace(/\\|:/g, '/').slice(1)
+ const parseMan = man.match(/\.([0-9]+)(\.gz)?$/)
if (!parseMan) {
- return Promise.reject(Object.assign(new Error('invalid man entry name\n' +
+ throw Object.assign(new Error('invalid man entry name\n' +
'Man files must end with a number, ' +
'and optionally a .gz suffix if they are compressed.'
), {
@@ -25,28 +26,28 @@ const linkMans = ({ path, pkg, top, force }) => {
path,
pkgid: pkg._id,
man,
- }))
+ })
}
- const stem = parseMan[1]
- const sxn = parseMan[2]
- const base = basename(stem)
+ const section = parseMan[1]
+ const base = basename(man)
const absFrom = resolve(path, man)
/* istanbul ignore if - that unpossible */
if (absFrom.indexOf(path) !== 0) {
- return Promise.reject(Object.assign(new Error('invalid man entry'), {
+ throw Object.assign(new Error('invalid man entry'), {
code: 'EBADMAN',
path,
pkgid: pkg._id,
man,
- }))
+ })
}
- const to = resolve(target, 'man' + sxn, base)
+ const to = resolve(target, 'man' + section, base)
const from = relative(dirname(to), absFrom)
- return linkGently({ from, to, path, absFrom, force })
- }))
+ links.push(linkGently({ from, to, path, absFrom, force }))
+ }
+ return Promise.all(links)
}
module.exports = linkMans
diff --git a/deps/npm/node_modules/bin-links/package.json b/deps/npm/node_modules/bin-links/package.json
index e6abb0b589808b..d5c11f7971f942 100644
--- a/deps/npm/node_modules/bin-links/package.json
+++ b/deps/npm/node_modules/bin-links/package.json
@@ -1,6 +1,6 @@
{
"name": "bin-links",
- "version": "4.0.2",
+ "version": "4.0.3",
"description": "JavaScript package binary linker",
"main": "./lib/index.js",
"scripts": {
@@ -30,7 +30,7 @@
},
"devDependencies": {
"@npmcli/eslint-config": "^4.0.0",
- "@npmcli/template-oss": "4.15.1",
+ "@npmcli/template-oss": "4.19.0",
"require-inject": "^1.4.4",
"tap": "^16.0.1"
},
@@ -53,7 +53,7 @@
"templateOSS": {
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
"windowsCI": false,
- "version": "4.15.1",
+ "version": "4.19.0",
"publish": true
}
}
diff --git a/deps/npm/node_modules/ci-info/LICENSE b/deps/npm/node_modules/ci-info/LICENSE
index 44ca33aa611e73..95f61daaaf485f 100644
--- a/deps/npm/node_modules/ci-info/LICENSE
+++ b/deps/npm/node_modules/ci-info/LICENSE
@@ -1,6 +1,6 @@
The MIT License (MIT)
-Copyright (c) 2016-2023 Thomas Watson Steen
+Copyright (c) 2016 Thomas Watson Steen
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/deps/npm/node_modules/ci-info/package.json b/deps/npm/node_modules/ci-info/package.json
index 3edae7417a33ef..8d3ff0030cc919 100644
--- a/deps/npm/node_modules/ci-info/package.json
+++ b/deps/npm/node_modules/ci-info/package.json
@@ -1,6 +1,6 @@
{
"name": "ci-info",
- "version": "3.8.0",
+ "version": "3.9.0",
"description": "Get details about the current Continuous Integration environment",
"main": "index.js",
"typings": "index.d.ts",
@@ -35,9 +35,9 @@
},
"devDependencies": {
"clear-module": "^4.1.2",
- "husky": "^8.0.2",
- "standard": "^17.0.0",
- "tape": "^5.6.1"
+ "husky": "^8.0.3",
+ "standard": "^17.1.0",
+ "tape": "^5.7.0"
},
"engines": {
"node": ">=8"
diff --git a/deps/npm/node_modules/ci-info/vendors.json b/deps/npm/node_modules/ci-info/vendors.json
index 213711755273ae..7bedd96a7972fa 100644
--- a/deps/npm/node_modules/ci-info/vendors.json
+++ b/deps/npm/node_modules/ci-info/vendors.json
@@ -18,8 +18,10 @@
{
"name": "Azure Pipelines",
"constant": "AZURE_PIPELINES",
- "env": "SYSTEM_TEAMFOUNDATIONCOLLECTIONURI",
- "pr": "SYSTEM_PULLREQUEST_PULLREQUESTID"
+ "env": "TF_BUILD",
+ "pr": {
+ "BUILD_REASON": "PullRequest"
+ }
},
{
"name": "Bamboo",
@@ -287,7 +289,8 @@
"NOW_BUILDER",
"VERCEL"
]
- }
+ },
+ "pr": "VERCEL_GIT_PULL_REQUEST_ID"
},
{
"name": "Visual Studio App Center",
diff --git a/deps/npm/node_modules/cmd-shim/lib/index.js b/deps/npm/node_modules/cmd-shim/lib/index.js
index 76ea2cb6d624d8..9cf2243ebf035f 100644
--- a/deps/npm/node_modules/cmd-shim/lib/index.js
+++ b/deps/npm/node_modules/cmd-shim/lib/index.js
@@ -122,7 +122,11 @@ const writeShim_ = (from, to, prog, args, variables) => {
// basedir=`dirname "$0"`
//
// case `uname` in
- // *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
+ // *CYGWIN*|*MINGW*|*MSYS*)
+ // if command -v cygpath > /dev/null 2>&1; then
+ // basedir=`cygpath -w "$basedir"`
+ // fi
+ // ;;
// esac
//
// if [ -x "$basedir/node.exe" ]; then
@@ -137,7 +141,11 @@ const writeShim_ = (from, to, prog, args, variables) => {
+ `basedir=$(dirname "$(echo "$0" | sed -e 's,\\\\,/,g')")\n`
+ '\n'
+ 'case `uname` in\n'
- + ' *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;\n'
+ + ' *CYGWIN*|*MINGW*|*MSYS*)\n'
+ + ' if command -v cygpath > /dev/null 2>&1; then\n'
+ + ' basedir=`cygpath -w "$basedir"`\n'
+ + ' fi\n'
+ + ' ;;\n'
+ 'esac\n'
+ '\n'
diff --git a/deps/npm/node_modules/cmd-shim/package.json b/deps/npm/node_modules/cmd-shim/package.json
index 4e52de2412f24a..ec274b2768fbb7 100644
--- a/deps/npm/node_modules/cmd-shim/package.json
+++ b/deps/npm/node_modules/cmd-shim/package.json
@@ -1,6 +1,6 @@
{
"name": "cmd-shim",
- "version": "6.0.1",
+ "version": "6.0.2",
"description": "Used in npm for command line application support",
"scripts": {
"test": "tap",
@@ -18,7 +18,7 @@
"license": "ISC",
"devDependencies": {
"@npmcli/eslint-config": "^4.0.0",
- "@npmcli/template-oss": "4.11.0",
+ "@npmcli/template-oss": "4.19.0",
"tap": "^16.0.1"
},
"files": [
@@ -41,6 +41,7 @@
"author": "GitHub Inc.",
"templateOSS": {
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
- "version": "4.11.0"
+ "version": "4.19.0",
+ "publish": true
}
}
diff --git a/deps/npm/node_modules/concat-map/LICENSE b/deps/npm/node_modules/concat-map/LICENSE
deleted file mode 100644
index ee27ba4b4412b0..00000000000000
--- a/deps/npm/node_modules/concat-map/LICENSE
+++ /dev/null
@@ -1,18 +0,0 @@
-This software is released under the MIT license:
-
-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:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
-FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
-COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
-IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/deps/npm/node_modules/concat-map/example/map.js b/deps/npm/node_modules/concat-map/example/map.js
deleted file mode 100644
index 33656217b61d8f..00000000000000
--- a/deps/npm/node_modules/concat-map/example/map.js
+++ /dev/null
@@ -1,6 +0,0 @@
-var concatMap = require('../');
-var xs = [ 1, 2, 3, 4, 5, 6 ];
-var ys = concatMap(xs, function (x) {
- return x % 2 ? [ x - 0.1, x, x + 0.1 ] : [];
-});
-console.dir(ys);
diff --git a/deps/npm/node_modules/concat-map/index.js b/deps/npm/node_modules/concat-map/index.js
deleted file mode 100644
index b29a7812e5055a..00000000000000
--- a/deps/npm/node_modules/concat-map/index.js
+++ /dev/null
@@ -1,13 +0,0 @@
-module.exports = function (xs, fn) {
- var res = [];
- for (var i = 0; i < xs.length; i++) {
- var x = fn(xs[i], i);
- if (isArray(x)) res.push.apply(res, x);
- else res.push(x);
- }
- return res;
-};
-
-var isArray = Array.isArray || function (xs) {
- return Object.prototype.toString.call(xs) === '[object Array]';
-};
diff --git a/deps/npm/node_modules/concat-map/package.json b/deps/npm/node_modules/concat-map/package.json
deleted file mode 100644
index d3640e6b027b9e..00000000000000
--- a/deps/npm/node_modules/concat-map/package.json
+++ /dev/null
@@ -1,43 +0,0 @@
-{
- "name" : "concat-map",
- "description" : "concatenative mapdashery",
- "version" : "0.0.1",
- "repository" : {
- "type" : "git",
- "url" : "git://github.com/substack/node-concat-map.git"
- },
- "main" : "index.js",
- "keywords" : [
- "concat",
- "concatMap",
- "map",
- "functional",
- "higher-order"
- ],
- "directories" : {
- "example" : "example",
- "test" : "test"
- },
- "scripts" : {
- "test" : "tape test/*.js"
- },
- "devDependencies" : {
- "tape" : "~2.4.0"
- },
- "license" : "MIT",
- "author" : {
- "name" : "James Halliday",
- "email" : "mail@substack.net",
- "url" : "http://substack.net"
- },
- "testling" : {
- "files" : "test/*.js",
- "browsers" : {
- "ie" : [ 6, 7, 8, 9 ],
- "ff" : [ 3.5, 10, 15.0 ],
- "chrome" : [ 10, 22 ],
- "safari" : [ 5.1 ],
- "opera" : [ 12 ]
- }
- }
-}
diff --git a/deps/npm/node_modules/concat-map/test/map.js b/deps/npm/node_modules/concat-map/test/map.js
deleted file mode 100644
index fdbd7022f6da17..00000000000000
--- a/deps/npm/node_modules/concat-map/test/map.js
+++ /dev/null
@@ -1,39 +0,0 @@
-var concatMap = require('../');
-var test = require('tape');
-
-test('empty or not', function (t) {
- var xs = [ 1, 2, 3, 4, 5, 6 ];
- var ixes = [];
- var ys = concatMap(xs, function (x, ix) {
- ixes.push(ix);
- return x % 2 ? [ x - 0.1, x, x + 0.1 ] : [];
- });
- t.same(ys, [ 0.9, 1, 1.1, 2.9, 3, 3.1, 4.9, 5, 5.1 ]);
- t.same(ixes, [ 0, 1, 2, 3, 4, 5 ]);
- t.end();
-});
-
-test('always something', function (t) {
- var xs = [ 'a', 'b', 'c', 'd' ];
- var ys = concatMap(xs, function (x) {
- return x === 'b' ? [ 'B', 'B', 'B' ] : [ x ];
- });
- t.same(ys, [ 'a', 'B', 'B', 'B', 'c', 'd' ]);
- t.end();
-});
-
-test('scalars', function (t) {
- var xs = [ 'a', 'b', 'c', 'd' ];
- var ys = concatMap(xs, function (x) {
- return x === 'b' ? [ 'B', 'B', 'B' ] : x;
- });
- t.same(ys, [ 'a', 'B', 'B', 'B', 'c', 'd' ]);
- t.end();
-});
-
-test('undefs', function (t) {
- var xs = [ 'a', 'b', 'c', 'd' ];
- var ys = concatMap(xs, function () {});
- t.same(ys, [ undefined, undefined, undefined, undefined ]);
- t.end();
-});
diff --git a/deps/npm/node_modules/fs.realpath/LICENSE b/deps/npm/node_modules/fs.realpath/LICENSE
deleted file mode 100644
index 5bd884c252ac49..00000000000000
--- a/deps/npm/node_modules/fs.realpath/LICENSE
+++ /dev/null
@@ -1,43 +0,0 @@
-The ISC License
-
-Copyright (c) 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.
-
-----
-
-This library bundles a version of the `fs.realpath` and `fs.realpathSync`
-methods from Node.js v0.10 under the terms of the Node.js MIT license.
-
-Node's license follows, also included at the header of `old.js` which contains
-the licensed code:
-
- Copyright Joyent, Inc. and other Node contributors.
-
- 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:
-
- The above copyright notice and this permission notice shall be included in
- all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- DEALINGS IN THE SOFTWARE.
diff --git a/deps/npm/node_modules/fs.realpath/index.js b/deps/npm/node_modules/fs.realpath/index.js
deleted file mode 100644
index b09c7c7e6364da..00000000000000
--- a/deps/npm/node_modules/fs.realpath/index.js
+++ /dev/null
@@ -1,66 +0,0 @@
-module.exports = realpath
-realpath.realpath = realpath
-realpath.sync = realpathSync
-realpath.realpathSync = realpathSync
-realpath.monkeypatch = monkeypatch
-realpath.unmonkeypatch = unmonkeypatch
-
-var fs = require('fs')
-var origRealpath = fs.realpath
-var origRealpathSync = fs.realpathSync
-
-var version = process.version
-var ok = /^v[0-5]\./.test(version)
-var old = require('./old.js')
-
-function newError (er) {
- return er && er.syscall === 'realpath' && (
- er.code === 'ELOOP' ||
- er.code === 'ENOMEM' ||
- er.code === 'ENAMETOOLONG'
- )
-}
-
-function realpath (p, cache, cb) {
- if (ok) {
- return origRealpath(p, cache, cb)
- }
-
- if (typeof cache === 'function') {
- cb = cache
- cache = null
- }
- origRealpath(p, cache, function (er, result) {
- if (newError(er)) {
- old.realpath(p, cache, cb)
- } else {
- cb(er, result)
- }
- })
-}
-
-function realpathSync (p, cache) {
- if (ok) {
- return origRealpathSync(p, cache)
- }
-
- try {
- return origRealpathSync(p, cache)
- } catch (er) {
- if (newError(er)) {
- return old.realpathSync(p, cache)
- } else {
- throw er
- }
- }
-}
-
-function monkeypatch () {
- fs.realpath = realpath
- fs.realpathSync = realpathSync
-}
-
-function unmonkeypatch () {
- fs.realpath = origRealpath
- fs.realpathSync = origRealpathSync
-}
diff --git a/deps/npm/node_modules/fs.realpath/old.js b/deps/npm/node_modules/fs.realpath/old.js
deleted file mode 100644
index b40305e73fd583..00000000000000
--- a/deps/npm/node_modules/fs.realpath/old.js
+++ /dev/null
@@ -1,303 +0,0 @@
-// Copyright Joyent, Inc. and other Node contributors.
-//
-// 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:
-//
-// The above copyright notice and this permission notice shall be included
-// in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
-// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
-// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
-// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
-// USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-var pathModule = require('path');
-var isWindows = process.platform === 'win32';
-var fs = require('fs');
-
-// JavaScript implementation of realpath, ported from node pre-v6
-
-var DEBUG = process.env.NODE_DEBUG && /fs/.test(process.env.NODE_DEBUG);
-
-function rethrow() {
- // Only enable in debug mode. A backtrace uses ~1000 bytes of heap space and
- // is fairly slow to generate.
- var callback;
- if (DEBUG) {
- var backtrace = new Error;
- callback = debugCallback;
- } else
- callback = missingCallback;
-
- return callback;
-
- function debugCallback(err) {
- if (err) {
- backtrace.message = err.message;
- err = backtrace;
- missingCallback(err);
- }
- }
-
- function missingCallback(err) {
- if (err) {
- if (process.throwDeprecation)
- throw err; // Forgot a callback but don't know where? Use NODE_DEBUG=fs
- else if (!process.noDeprecation) {
- var msg = 'fs: missing callback ' + (err.stack || err.message);
- if (process.traceDeprecation)
- console.trace(msg);
- else
- console.error(msg);
- }
- }
- }
-}
-
-function maybeCallback(cb) {
- return typeof cb === 'function' ? cb : rethrow();
-}
-
-var normalize = pathModule.normalize;
-
-// Regexp that finds the next partion of a (partial) path
-// result is [base_with_slash, base], e.g. ['somedir/', 'somedir']
-if (isWindows) {
- var nextPartRe = /(.*?)(?:[\/\\]+|$)/g;
-} else {
- var nextPartRe = /(.*?)(?:[\/]+|$)/g;
-}
-
-// Regex to find the device root, including trailing slash. E.g. 'c:\\'.
-if (isWindows) {
- var splitRootRe = /^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/;
-} else {
- var splitRootRe = /^[\/]*/;
-}
-
-exports.realpathSync = function realpathSync(p, cache) {
- // make p is absolute
- p = pathModule.resolve(p);
-
- if (cache && Object.prototype.hasOwnProperty.call(cache, p)) {
- return cache[p];
- }
-
- var original = p,
- seenLinks = {},
- knownHard = {};
-
- // current character position in p
- var pos;
- // the partial path so far, including a trailing slash if any
- var current;
- // the partial path without a trailing slash (except when pointing at a root)
- var base;
- // the partial path scanned in the previous round, with slash
- var previous;
-
- start();
-
- function start() {
- // Skip over roots
- var m = splitRootRe.exec(p);
- pos = m[0].length;
- current = m[0];
- base = m[0];
- previous = '';
-
- // On windows, check that the root exists. On unix there is no need.
- if (isWindows && !knownHard[base]) {
- fs.lstatSync(base);
- knownHard[base] = true;
- }
- }
-
- // walk down the path, swapping out linked pathparts for their real
- // values
- // NB: p.length changes.
- while (pos < p.length) {
- // find the next part
- nextPartRe.lastIndex = pos;
- var result = nextPartRe.exec(p);
- previous = current;
- current += result[0];
- base = previous + result[1];
- pos = nextPartRe.lastIndex;
-
- // continue if not a symlink
- if (knownHard[base] || (cache && cache[base] === base)) {
- continue;
- }
-
- var resolvedLink;
- if (cache && Object.prototype.hasOwnProperty.call(cache, base)) {
- // some known symbolic link. no need to stat again.
- resolvedLink = cache[base];
- } else {
- var stat = fs.lstatSync(base);
- if (!stat.isSymbolicLink()) {
- knownHard[base] = true;
- if (cache) cache[base] = base;
- continue;
- }
-
- // read the link if it wasn't read before
- // dev/ino always return 0 on windows, so skip the check.
- var linkTarget = null;
- if (!isWindows) {
- var id = stat.dev.toString(32) + ':' + stat.ino.toString(32);
- if (seenLinks.hasOwnProperty(id)) {
- linkTarget = seenLinks[id];
- }
- }
- if (linkTarget === null) {
- fs.statSync(base);
- linkTarget = fs.readlinkSync(base);
- }
- resolvedLink = pathModule.resolve(previous, linkTarget);
- // track this, if given a cache.
- if (cache) cache[base] = resolvedLink;
- if (!isWindows) seenLinks[id] = linkTarget;
- }
-
- // resolve the link, then start over
- p = pathModule.resolve(resolvedLink, p.slice(pos));
- start();
- }
-
- if (cache) cache[original] = p;
-
- return p;
-};
-
-
-exports.realpath = function realpath(p, cache, cb) {
- if (typeof cb !== 'function') {
- cb = maybeCallback(cache);
- cache = null;
- }
-
- // make p is absolute
- p = pathModule.resolve(p);
-
- if (cache && Object.prototype.hasOwnProperty.call(cache, p)) {
- return process.nextTick(cb.bind(null, null, cache[p]));
- }
-
- var original = p,
- seenLinks = {},
- knownHard = {};
-
- // current character position in p
- var pos;
- // the partial path so far, including a trailing slash if any
- var current;
- // the partial path without a trailing slash (except when pointing at a root)
- var base;
- // the partial path scanned in the previous round, with slash
- var previous;
-
- start();
-
- function start() {
- // Skip over roots
- var m = splitRootRe.exec(p);
- pos = m[0].length;
- current = m[0];
- base = m[0];
- previous = '';
-
- // On windows, check that the root exists. On unix there is no need.
- if (isWindows && !knownHard[base]) {
- fs.lstat(base, function(err) {
- if (err) return cb(err);
- knownHard[base] = true;
- LOOP();
- });
- } else {
- process.nextTick(LOOP);
- }
- }
-
- // walk down the path, swapping out linked pathparts for their real
- // values
- function LOOP() {
- // stop if scanned past end of path
- if (pos >= p.length) {
- if (cache) cache[original] = p;
- return cb(null, p);
- }
-
- // find the next part
- nextPartRe.lastIndex = pos;
- var result = nextPartRe.exec(p);
- previous = current;
- current += result[0];
- base = previous + result[1];
- pos = nextPartRe.lastIndex;
-
- // continue if not a symlink
- if (knownHard[base] || (cache && cache[base] === base)) {
- return process.nextTick(LOOP);
- }
-
- if (cache && Object.prototype.hasOwnProperty.call(cache, base)) {
- // known symbolic link. no need to stat again.
- return gotResolvedLink(cache[base]);
- }
-
- return fs.lstat(base, gotStat);
- }
-
- function gotStat(err, stat) {
- if (err) return cb(err);
-
- // if not a symlink, skip to the next path part
- if (!stat.isSymbolicLink()) {
- knownHard[base] = true;
- if (cache) cache[base] = base;
- return process.nextTick(LOOP);
- }
-
- // stat & read the link if not read before
- // call gotTarget as soon as the link target is known
- // dev/ino always return 0 on windows, so skip the check.
- if (!isWindows) {
- var id = stat.dev.toString(32) + ':' + stat.ino.toString(32);
- if (seenLinks.hasOwnProperty(id)) {
- return gotTarget(null, seenLinks[id], base);
- }
- }
- fs.stat(base, function(err) {
- if (err) return cb(err);
-
- fs.readlink(base, function(err, target) {
- if (!isWindows) seenLinks[id] = target;
- gotTarget(err, target);
- });
- });
- }
-
- function gotTarget(err, target, base) {
- if (err) return cb(err);
-
- var resolvedLink = pathModule.resolve(previous, target);
- if (cache) cache[base] = resolvedLink;
- gotResolvedLink(resolvedLink);
- }
-
- function gotResolvedLink(resolvedLink) {
- // resolve the link, then start over
- p = pathModule.resolve(resolvedLink, p.slice(pos));
- start();
- }
-};
diff --git a/deps/npm/node_modules/fs.realpath/package.json b/deps/npm/node_modules/fs.realpath/package.json
deleted file mode 100644
index 3edc57d21c7137..00000000000000
--- a/deps/npm/node_modules/fs.realpath/package.json
+++ /dev/null
@@ -1,26 +0,0 @@
-{
- "name": "fs.realpath",
- "version": "1.0.0",
- "description": "Use node's fs.realpath, but fall back to the JS implementation if the native one fails",
- "main": "index.js",
- "dependencies": {},
- "devDependencies": {},
- "scripts": {
- "test": "tap test/*.js --cov"
- },
- "repository": {
- "type": "git",
- "url": "git+https://github.com/isaacs/fs.realpath.git"
- },
- "keywords": [
- "realpath",
- "fs",
- "polyfill"
- ],
- "author": "Isaac Z. Schlueter (http://blog.izs.me/)",
- "license": "ISC",
- "files": [
- "old.js",
- "index.js"
- ]
-}
diff --git a/deps/npm/node_modules/http-proxy-agent/dist/agent.js b/deps/npm/node_modules/http-proxy-agent/dist/agent.js
deleted file mode 100644
index aca82804314882..00000000000000
--- a/deps/npm/node_modules/http-proxy-agent/dist/agent.js
+++ /dev/null
@@ -1,145 +0,0 @@
-"use strict";
-var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
- return new (P || (P = Promise))(function (resolve, reject) {
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
- step((generator = generator.apply(thisArg, _arguments || [])).next());
- });
-};
-var __importDefault = (this && this.__importDefault) || function (mod) {
- return (mod && mod.__esModule) ? mod : { "default": mod };
-};
-Object.defineProperty(exports, "__esModule", { value: true });
-const net_1 = __importDefault(require("net"));
-const tls_1 = __importDefault(require("tls"));
-const url_1 = __importDefault(require("url"));
-const debug_1 = __importDefault(require("debug"));
-const once_1 = __importDefault(require("@tootallnate/once"));
-const agent_base_1 = require("agent-base");
-const debug = (0, debug_1.default)('http-proxy-agent');
-function isHTTPS(protocol) {
- return typeof protocol === 'string' ? /^https:?$/i.test(protocol) : false;
-}
-/**
- * The `HttpProxyAgent` implements an HTTP Agent subclass that connects
- * to the specified "HTTP proxy server" in order to proxy HTTP requests.
- *
- * @api public
- */
-class HttpProxyAgent extends agent_base_1.Agent {
- constructor(_opts) {
- let opts;
- if (typeof _opts === 'string') {
- opts = url_1.default.parse(_opts);
- }
- else {
- opts = _opts;
- }
- if (!opts) {
- throw new Error('an HTTP(S) proxy server `host` and `port` must be specified!');
- }
- debug('Creating new HttpProxyAgent instance: %o', opts);
- super(opts);
- const proxy = Object.assign({}, opts);
- // If `true`, then connect to the proxy server over TLS.
- // Defaults to `false`.
- this.secureProxy = opts.secureProxy || isHTTPS(proxy.protocol);
- // Prefer `hostname` over `host`, and set the `port` if needed.
- proxy.host = proxy.hostname || proxy.host;
- if (typeof proxy.port === 'string') {
- proxy.port = parseInt(proxy.port, 10);
- }
- if (!proxy.port && proxy.host) {
- proxy.port = this.secureProxy ? 443 : 80;
- }
- if (proxy.host && proxy.path) {
- // If both a `host` and `path` are specified then it's most likely
- // the result of a `url.parse()` call... we need to remove the
- // `path` portion so that `net.connect()` doesn't attempt to open
- // that as a Unix socket file.
- delete proxy.path;
- delete proxy.pathname;
- }
- this.proxy = proxy;
- }
- /**
- * Called when the node-core HTTP client library is creating a
- * new HTTP request.
- *
- * @api protected
- */
- callback(req, opts) {
- return __awaiter(this, void 0, void 0, function* () {
- const { proxy, secureProxy } = this;
- const parsed = url_1.default.parse(req.path);
- if (!parsed.protocol) {
- parsed.protocol = 'http:';
- }
- if (!parsed.hostname) {
- parsed.hostname = opts.hostname || opts.host || null;
- }
- if (parsed.port == null && typeof opts.port) {
- parsed.port = String(opts.port);
- }
- if (parsed.port === '80') {
- // if port is 80, then we can remove the port so that the
- // ":80" portion is not on the produced URL
- parsed.port = '';
- }
- // Change the `http.ClientRequest` instance's "path" field
- // to the absolute path of the URL that will be requested.
- req.path = url_1.default.format(parsed);
- // Inject the `Proxy-Authorization` header if necessary.
- if (proxy.auth) {
- req.setHeader('Proxy-Authorization', `Basic ${Buffer.from(proxy.auth).toString('base64')}`);
- }
- // Create a socket connection to the proxy server.
- let socket;
- if (secureProxy) {
- debug('Creating `tls.Socket`: %o', proxy);
- socket = tls_1.default.connect(proxy);
- }
- else {
- debug('Creating `net.Socket`: %o', proxy);
- socket = net_1.default.connect(proxy);
- }
- // At this point, the http ClientRequest's internal `_header` field
- // might have already been set. If this is the case then we'll need
- // to re-generate the string since we just changed the `req.path`.
- if (req._header) {
- let first;
- let endOfHeaders;
- debug('Regenerating stored HTTP header string for request');
- req._header = null;
- req._implicitHeader();
- if (req.output && req.output.length > 0) {
- // Node < 12
- debug('Patching connection write() output buffer with updated header');
- first = req.output[0];
- endOfHeaders = first.indexOf('\r\n\r\n') + 4;
- req.output[0] = req._header + first.substring(endOfHeaders);
- debug('Output buffer: %o', req.output);
- }
- else if (req.outputData && req.outputData.length > 0) {
- // Node >= 12
- debug('Patching connection write() output buffer with updated header');
- first = req.outputData[0].data;
- endOfHeaders = first.indexOf('\r\n\r\n') + 4;
- req.outputData[0].data =
- req._header + first.substring(endOfHeaders);
- debug('Output buffer: %o', req.outputData[0].data);
- }
- }
- // Wait for the socket's `connect` event, so that this `callback()`
- // function throws instead of the `http` request machinery. This is
- // important for i.e. `PacProxyAgent` which determines a failed proxy
- // connection via the `callback()` function throwing.
- yield (0, once_1.default)(socket, 'connect');
- return socket;
- });
- }
-}
-exports.default = HttpProxyAgent;
-//# sourceMappingURL=agent.js.map
\ No newline at end of file
diff --git a/deps/npm/node_modules/http-proxy-agent/dist/index.js b/deps/npm/node_modules/http-proxy-agent/dist/index.js
deleted file mode 100644
index 0a71180594605b..00000000000000
--- a/deps/npm/node_modules/http-proxy-agent/dist/index.js
+++ /dev/null
@@ -1,14 +0,0 @@
-"use strict";
-var __importDefault = (this && this.__importDefault) || function (mod) {
- return (mod && mod.__esModule) ? mod : { "default": mod };
-};
-const agent_1 = __importDefault(require("./agent"));
-function createHttpProxyAgent(opts) {
- return new agent_1.default(opts);
-}
-(function (createHttpProxyAgent) {
- createHttpProxyAgent.HttpProxyAgent = agent_1.default;
- createHttpProxyAgent.prototype = agent_1.default.prototype;
-})(createHttpProxyAgent || (createHttpProxyAgent = {}));
-module.exports = createHttpProxyAgent;
-//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/deps/npm/node_modules/http-proxy-agent/package.json b/deps/npm/node_modules/http-proxy-agent/package.json
deleted file mode 100644
index 659d6e11e80e40..00000000000000
--- a/deps/npm/node_modules/http-proxy-agent/package.json
+++ /dev/null
@@ -1,57 +0,0 @@
-{
- "name": "http-proxy-agent",
- "version": "5.0.0",
- "description": "An HTTP(s) proxy `http.Agent` implementation for HTTP",
- "main": "./dist/index.js",
- "types": "./dist/index.d.ts",
- "files": [
- "dist"
- ],
- "scripts": {
- "prebuild": "rimraf dist",
- "build": "tsc",
- "test": "mocha",
- "test-lint": "eslint src --ext .js,.ts",
- "prepublishOnly": "npm run build"
- },
- "repository": {
- "type": "git",
- "url": "git://github.com/TooTallNate/node-http-proxy-agent.git"
- },
- "keywords": [
- "http",
- "proxy",
- "endpoint",
- "agent"
- ],
- "author": "Nathan Rajlich (http://n8.io/)",
- "license": "MIT",
- "bugs": {
- "url": "https://github.com/TooTallNate/node-http-proxy-agent/issues"
- },
- "dependencies": {
- "@tootallnate/once": "2",
- "agent-base": "6",
- "debug": "4"
- },
- "devDependencies": {
- "@types/debug": "4",
- "@types/node": "^12.19.2",
- "@typescript-eslint/eslint-plugin": "1.6.0",
- "@typescript-eslint/parser": "1.1.0",
- "eslint": "5.16.0",
- "eslint-config-airbnb": "17.1.0",
- "eslint-config-prettier": "4.1.0",
- "eslint-import-resolver-typescript": "1.1.1",
- "eslint-plugin-import": "2.16.0",
- "eslint-plugin-jsx-a11y": "6.2.1",
- "eslint-plugin-react": "7.12.4",
- "mocha": "^6.2.2",
- "proxy": "1",
- "rimraf": "^3.0.0",
- "typescript": "^4.4.3"
- },
- "engines": {
- "node": ">= 6"
- }
-}
diff --git a/deps/npm/node_modules/https-proxy-agent/dist/agent.js b/deps/npm/node_modules/https-proxy-agent/dist/agent.js
deleted file mode 100644
index 75d11364ed3001..00000000000000
--- a/deps/npm/node_modules/https-proxy-agent/dist/agent.js
+++ /dev/null
@@ -1,177 +0,0 @@
-"use strict";
-var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
- return new (P || (P = Promise))(function (resolve, reject) {
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
- step((generator = generator.apply(thisArg, _arguments || [])).next());
- });
-};
-var __importDefault = (this && this.__importDefault) || function (mod) {
- return (mod && mod.__esModule) ? mod : { "default": mod };
-};
-Object.defineProperty(exports, "__esModule", { value: true });
-const net_1 = __importDefault(require("net"));
-const tls_1 = __importDefault(require("tls"));
-const url_1 = __importDefault(require("url"));
-const assert_1 = __importDefault(require("assert"));
-const debug_1 = __importDefault(require("debug"));
-const agent_base_1 = require("agent-base");
-const parse_proxy_response_1 = __importDefault(require("./parse-proxy-response"));
-const debug = debug_1.default('https-proxy-agent:agent');
-/**
- * The `HttpsProxyAgent` implements an HTTP Agent subclass that connects to
- * the specified "HTTP(s) proxy server" in order to proxy HTTPS requests.
- *
- * Outgoing HTTP requests are first tunneled through the proxy server using the
- * `CONNECT` HTTP request method to establish a connection to the proxy server,
- * and then the proxy server connects to the destination target and issues the
- * HTTP request from the proxy server.
- *
- * `https:` requests have their socket connection upgraded to TLS once
- * the connection to the proxy server has been established.
- *
- * @api public
- */
-class HttpsProxyAgent extends agent_base_1.Agent {
- constructor(_opts) {
- let opts;
- if (typeof _opts === 'string') {
- opts = url_1.default.parse(_opts);
- }
- else {
- opts = _opts;
- }
- if (!opts) {
- throw new Error('an HTTP(S) proxy server `host` and `port` must be specified!');
- }
- debug('creating new HttpsProxyAgent instance: %o', opts);
- super(opts);
- const proxy = Object.assign({}, opts);
- // If `true`, then connect to the proxy server over TLS.
- // Defaults to `false`.
- this.secureProxy = opts.secureProxy || isHTTPS(proxy.protocol);
- // Prefer `hostname` over `host`, and set the `port` if needed.
- proxy.host = proxy.hostname || proxy.host;
- if (typeof proxy.port === 'string') {
- proxy.port = parseInt(proxy.port, 10);
- }
- if (!proxy.port && proxy.host) {
- proxy.port = this.secureProxy ? 443 : 80;
- }
- // ALPN is supported by Node.js >= v5.
- // attempt to negotiate http/1.1 for proxy servers that support http/2
- if (this.secureProxy && !('ALPNProtocols' in proxy)) {
- proxy.ALPNProtocols = ['http 1.1'];
- }
- if (proxy.host && proxy.path) {
- // If both a `host` and `path` are specified then it's most likely
- // the result of a `url.parse()` call... we need to remove the
- // `path` portion so that `net.connect()` doesn't attempt to open
- // that as a Unix socket file.
- delete proxy.path;
- delete proxy.pathname;
- }
- this.proxy = proxy;
- }
- /**
- * Called when the node-core HTTP client library is creating a
- * new HTTP request.
- *
- * @api protected
- */
- callback(req, opts) {
- return __awaiter(this, void 0, void 0, function* () {
- const { proxy, secureProxy } = this;
- // Create a socket connection to the proxy server.
- let socket;
- if (secureProxy) {
- debug('Creating `tls.Socket`: %o', proxy);
- socket = tls_1.default.connect(proxy);
- }
- else {
- debug('Creating `net.Socket`: %o', proxy);
- socket = net_1.default.connect(proxy);
- }
- const headers = Object.assign({}, proxy.headers);
- const hostname = `${opts.host}:${opts.port}`;
- let payload = `CONNECT ${hostname} HTTP/1.1\r\n`;
- // Inject the `Proxy-Authorization` header if necessary.
- if (proxy.auth) {
- headers['Proxy-Authorization'] = `Basic ${Buffer.from(proxy.auth).toString('base64')}`;
- }
- // The `Host` header should only include the port
- // number when it is not the default port.
- let { host, port, secureEndpoint } = opts;
- if (!isDefaultPort(port, secureEndpoint)) {
- host += `:${port}`;
- }
- headers.Host = host;
- headers.Connection = 'close';
- for (const name of Object.keys(headers)) {
- payload += `${name}: ${headers[name]}\r\n`;
- }
- const proxyResponsePromise = parse_proxy_response_1.default(socket);
- socket.write(`${payload}\r\n`);
- const { statusCode, buffered } = yield proxyResponsePromise;
- if (statusCode === 200) {
- req.once('socket', resume);
- if (opts.secureEndpoint) {
- // The proxy is connecting to a TLS server, so upgrade
- // this socket connection to a TLS connection.
- debug('Upgrading socket connection to TLS');
- const servername = opts.servername || opts.host;
- return tls_1.default.connect(Object.assign(Object.assign({}, omit(opts, 'host', 'hostname', 'path', 'port')), { socket,
- servername }));
- }
- return socket;
- }
- // Some other status code that's not 200... need to re-play the HTTP
- // header "data" events onto the socket once the HTTP machinery is
- // attached so that the node core `http` can parse and handle the
- // error status code.
- // Close the original socket, and a new "fake" socket is returned
- // instead, so that the proxy doesn't get the HTTP request
- // written to it (which may contain `Authorization` headers or other
- // sensitive data).
- //
- // See: https://hackerone.com/reports/541502
- socket.destroy();
- const fakeSocket = new net_1.default.Socket({ writable: false });
- fakeSocket.readable = true;
- // Need to wait for the "socket" event to re-play the "data" events.
- req.once('socket', (s) => {
- debug('replaying proxy buffer for failed request');
- assert_1.default(s.listenerCount('data') > 0);
- // Replay the "buffered" Buffer onto the fake `socket`, since at
- // this point the HTTP module machinery has been hooked up for
- // the user.
- s.push(buffered);
- s.push(null);
- });
- return fakeSocket;
- });
- }
-}
-exports.default = HttpsProxyAgent;
-function resume(socket) {
- socket.resume();
-}
-function isDefaultPort(port, secure) {
- return Boolean((!secure && port === 80) || (secure && port === 443));
-}
-function isHTTPS(protocol) {
- return typeof protocol === 'string' ? /^https:?$/i.test(protocol) : false;
-}
-function omit(obj, ...keys) {
- const ret = {};
- let key;
- for (key in obj) {
- if (!keys.includes(key)) {
- ret[key] = obj[key];
- }
- }
- return ret;
-}
-//# sourceMappingURL=agent.js.map
\ No newline at end of file
diff --git a/deps/npm/node_modules/https-proxy-agent/dist/index.js b/deps/npm/node_modules/https-proxy-agent/dist/index.js
deleted file mode 100644
index b03e7631a45a45..00000000000000
--- a/deps/npm/node_modules/https-proxy-agent/dist/index.js
+++ /dev/null
@@ -1,14 +0,0 @@
-"use strict";
-var __importDefault = (this && this.__importDefault) || function (mod) {
- return (mod && mod.__esModule) ? mod : { "default": mod };
-};
-const agent_1 = __importDefault(require("./agent"));
-function createHttpsProxyAgent(opts) {
- return new agent_1.default(opts);
-}
-(function (createHttpsProxyAgent) {
- createHttpsProxyAgent.HttpsProxyAgent = agent_1.default;
- createHttpsProxyAgent.prototype = agent_1.default.prototype;
-})(createHttpsProxyAgent || (createHttpsProxyAgent = {}));
-module.exports = createHttpsProxyAgent;
-//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/deps/npm/node_modules/https-proxy-agent/dist/parse-proxy-response.js b/deps/npm/node_modules/https-proxy-agent/dist/parse-proxy-response.js
deleted file mode 100644
index aa5ce3cc2d371f..00000000000000
--- a/deps/npm/node_modules/https-proxy-agent/dist/parse-proxy-response.js
+++ /dev/null
@@ -1,66 +0,0 @@
-"use strict";
-var __importDefault = (this && this.__importDefault) || function (mod) {
- return (mod && mod.__esModule) ? mod : { "default": mod };
-};
-Object.defineProperty(exports, "__esModule", { value: true });
-const debug_1 = __importDefault(require("debug"));
-const debug = debug_1.default('https-proxy-agent:parse-proxy-response');
-function parseProxyResponse(socket) {
- return new Promise((resolve, reject) => {
- // we need to buffer any HTTP traffic that happens with the proxy before we get
- // the CONNECT response, so that if the response is anything other than an "200"
- // response code, then we can re-play the "data" events on the socket once the
- // HTTP parser is hooked up...
- let buffersLength = 0;
- const buffers = [];
- function read() {
- const b = socket.read();
- if (b)
- ondata(b);
- else
- socket.once('readable', read);
- }
- function cleanup() {
- socket.removeListener('end', onend);
- socket.removeListener('error', onerror);
- socket.removeListener('close', onclose);
- socket.removeListener('readable', read);
- }
- function onclose(err) {
- debug('onclose had error %o', err);
- }
- function onend() {
- debug('onend');
- }
- function onerror(err) {
- cleanup();
- debug('onerror %o', err);
- reject(err);
- }
- function ondata(b) {
- buffers.push(b);
- buffersLength += b.length;
- const buffered = Buffer.concat(buffers, buffersLength);
- const endOfHeaders = buffered.indexOf('\r\n\r\n');
- if (endOfHeaders === -1) {
- // keep buffering
- debug('have not received end of HTTP headers yet...');
- read();
- return;
- }
- const firstLine = buffered.toString('ascii', 0, buffered.indexOf('\r\n'));
- const statusCode = +firstLine.split(' ')[1];
- debug('got proxy server response: %o', firstLine);
- resolve({
- statusCode,
- buffered
- });
- }
- socket.on('error', onerror);
- socket.on('close', onclose);
- socket.on('end', onend);
- read();
- });
-}
-exports.default = parseProxyResponse;
-//# sourceMappingURL=parse-proxy-response.js.map
\ No newline at end of file
diff --git a/deps/npm/node_modules/https-proxy-agent/package.json b/deps/npm/node_modules/https-proxy-agent/package.json
deleted file mode 100644
index fb2aba1b946951..00000000000000
--- a/deps/npm/node_modules/https-proxy-agent/package.json
+++ /dev/null
@@ -1,56 +0,0 @@
-{
- "name": "https-proxy-agent",
- "version": "5.0.1",
- "description": "An HTTP(s) proxy `http.Agent` implementation for HTTPS",
- "main": "dist/index",
- "types": "dist/index",
- "files": [
- "dist"
- ],
- "scripts": {
- "prebuild": "rimraf dist",
- "build": "tsc",
- "test": "mocha --reporter spec",
- "test-lint": "eslint src --ext .js,.ts",
- "prepublishOnly": "npm run build"
- },
- "repository": {
- "type": "git",
- "url": "git://github.com/TooTallNate/node-https-proxy-agent.git"
- },
- "keywords": [
- "https",
- "proxy",
- "endpoint",
- "agent"
- ],
- "author": "Nathan Rajlich (http://n8.io/)",
- "license": "MIT",
- "bugs": {
- "url": "https://github.com/TooTallNate/node-https-proxy-agent/issues"
- },
- "dependencies": {
- "agent-base": "6",
- "debug": "4"
- },
- "devDependencies": {
- "@types/debug": "4",
- "@types/node": "^12.12.11",
- "@typescript-eslint/eslint-plugin": "1.6.0",
- "@typescript-eslint/parser": "1.1.0",
- "eslint": "5.16.0",
- "eslint-config-airbnb": "17.1.0",
- "eslint-config-prettier": "4.1.0",
- "eslint-import-resolver-typescript": "1.1.1",
- "eslint-plugin-import": "2.16.0",
- "eslint-plugin-jsx-a11y": "6.2.1",
- "eslint-plugin-react": "7.12.4",
- "mocha": "^6.2.2",
- "proxy": "1",
- "rimraf": "^3.0.0",
- "typescript": "^3.5.3"
- },
- "engines": {
- "node": ">= 6"
- }
-}
diff --git a/deps/npm/node_modules/humanize-ms/LICENSE b/deps/npm/node_modules/humanize-ms/LICENSE
deleted file mode 100644
index 89de354795ec7a..00000000000000
--- a/deps/npm/node_modules/humanize-ms/LICENSE
+++ /dev/null
@@ -1,17 +0,0 @@
-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:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/deps/npm/node_modules/humanize-ms/index.js b/deps/npm/node_modules/humanize-ms/index.js
deleted file mode 100644
index 660df81def5120..00000000000000
--- a/deps/npm/node_modules/humanize-ms/index.js
+++ /dev/null
@@ -1,24 +0,0 @@
-/*!
- * humanize-ms - index.js
- * Copyright(c) 2014 dead_horse
- * MIT Licensed
- */
-
-'use strict';
-
-/**
- * Module dependencies.
- */
-
-var util = require('util');
-var ms = require('ms');
-
-module.exports = function (t) {
- if (typeof t === 'number') return t;
- var r = ms(t);
- if (r === undefined) {
- var err = new Error(util.format('humanize-ms(%j) result undefined', t));
- console.warn(err.stack);
- }
- return r;
-};
diff --git a/deps/npm/node_modules/humanize-ms/package.json b/deps/npm/node_modules/humanize-ms/package.json
deleted file mode 100644
index da4ab7f571a686..00000000000000
--- a/deps/npm/node_modules/humanize-ms/package.json
+++ /dev/null
@@ -1,37 +0,0 @@
-{
- "name": "humanize-ms",
- "version": "1.2.1",
- "description": "transform humanize time to ms",
- "main": "index.js",
- "files": [
- "index.js"
- ],
- "scripts": {
- "test": "make test"
- },
- "keywords": [
- "humanize",
- "ms"
- ],
- "author": {
- "name": "dead-horse",
- "email": "dead_horse@qq.com",
- "url": "http://deadhorse.me"
- },
- "repository": {
- "type": "git",
- "url": "https://github.com/node-modules/humanize-ms"
- },
- "license": "MIT",
- "dependencies": {
- "ms": "^2.0.0"
- },
- "devDependencies": {
- "autod": "*",
- "beautify-benchmark": "~0.2.4",
- "benchmark": "~1.0.0",
- "istanbul": "*",
- "mocha": "*",
- "should": "*"
- }
-}
diff --git a/deps/npm/node_modules/inflight/LICENSE b/deps/npm/node_modules/inflight/LICENSE
deleted file mode 100644
index 05eeeb88c2ef4c..00000000000000
--- a/deps/npm/node_modules/inflight/LICENSE
+++ /dev/null
@@ -1,15 +0,0 @@
-The ISC License
-
-Copyright (c) Isaac Z. Schlueter
-
-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.
diff --git a/deps/npm/node_modules/inflight/inflight.js b/deps/npm/node_modules/inflight/inflight.js
deleted file mode 100644
index 48202b3ca41d97..00000000000000
--- a/deps/npm/node_modules/inflight/inflight.js
+++ /dev/null
@@ -1,54 +0,0 @@
-var wrappy = require('wrappy')
-var reqs = Object.create(null)
-var once = require('once')
-
-module.exports = wrappy(inflight)
-
-function inflight (key, cb) {
- if (reqs[key]) {
- reqs[key].push(cb)
- return null
- } else {
- reqs[key] = [cb]
- return makeres(key)
- }
-}
-
-function makeres (key) {
- return once(function RES () {
- var cbs = reqs[key]
- var len = cbs.length
- var args = slice(arguments)
-
- // XXX It's somewhat ambiguous whether a new callback added in this
- // pass should be queued for later execution if something in the
- // list of callbacks throws, or if it should just be discarded.
- // However, it's such an edge case that it hardly matters, and either
- // choice is likely as surprising as the other.
- // As it happens, we do go ahead and schedule it for later execution.
- try {
- for (var i = 0; i < len; i++) {
- cbs[i].apply(null, args)
- }
- } finally {
- if (cbs.length > len) {
- // added more in the interim.
- // de-zalgo, just in case, but don't call again.
- cbs.splice(0, len)
- process.nextTick(function () {
- RES.apply(null, args)
- })
- } else {
- delete reqs[key]
- }
- }
- })
-}
-
-function slice (args) {
- var length = args.length
- var array = []
-
- for (var i = 0; i < length; i++) array[i] = args[i]
- return array
-}
diff --git a/deps/npm/node_modules/inflight/package.json b/deps/npm/node_modules/inflight/package.json
deleted file mode 100644
index 6084d3509a5d6d..00000000000000
--- a/deps/npm/node_modules/inflight/package.json
+++ /dev/null
@@ -1,29 +0,0 @@
-{
- "name": "inflight",
- "version": "1.0.6",
- "description": "Add callbacks to requests in flight to avoid async duplication",
- "main": "inflight.js",
- "files": [
- "inflight.js"
- ],
- "dependencies": {
- "once": "^1.3.0",
- "wrappy": "1"
- },
- "devDependencies": {
- "tap": "^7.1.2"
- },
- "scripts": {
- "test": "tap test.js --100"
- },
- "repository": {
- "type": "git",
- "url": "https://github.com/npm/inflight.git"
- },
- "author": "Isaac Z. Schlueter (http://blog.izs.me/)",
- "bugs": {
- "url": "https://github.com/isaacs/inflight/issues"
- },
- "homepage": "https://github.com/isaacs/inflight",
- "license": "ISC"
-}
diff --git a/deps/npm/node_modules/inherits/LICENSE b/deps/npm/node_modules/inherits/LICENSE
deleted file mode 100644
index dea3013d6710ee..00000000000000
--- a/deps/npm/node_modules/inherits/LICENSE
+++ /dev/null
@@ -1,16 +0,0 @@
-The ISC License
-
-Copyright (c) Isaac Z. Schlueter
-
-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.
-
diff --git a/deps/npm/node_modules/inherits/inherits.js b/deps/npm/node_modules/inherits/inherits.js
deleted file mode 100644
index f71f2d93294a67..00000000000000
--- a/deps/npm/node_modules/inherits/inherits.js
+++ /dev/null
@@ -1,9 +0,0 @@
-try {
- var util = require('util');
- /* istanbul ignore next */
- if (typeof util.inherits !== 'function') throw '';
- module.exports = util.inherits;
-} catch (e) {
- /* istanbul ignore next */
- module.exports = require('./inherits_browser.js');
-}
diff --git a/deps/npm/node_modules/inherits/inherits_browser.js b/deps/npm/node_modules/inherits/inherits_browser.js
deleted file mode 100644
index 86bbb3dc29e484..00000000000000
--- a/deps/npm/node_modules/inherits/inherits_browser.js
+++ /dev/null
@@ -1,27 +0,0 @@
-if (typeof Object.create === 'function') {
- // implementation from standard node.js 'util' module
- module.exports = function inherits(ctor, superCtor) {
- if (superCtor) {
- ctor.super_ = superCtor
- ctor.prototype = Object.create(superCtor.prototype, {
- constructor: {
- value: ctor,
- enumerable: false,
- writable: true,
- configurable: true
- }
- })
- }
- };
-} else {
- // old school shim for old browsers
- module.exports = function inherits(ctor, superCtor) {
- if (superCtor) {
- ctor.super_ = superCtor
- var TempCtor = function () {}
- TempCtor.prototype = superCtor.prototype
- ctor.prototype = new TempCtor()
- ctor.prototype.constructor = ctor
- }
- }
-}
diff --git a/deps/npm/node_modules/inherits/package.json b/deps/npm/node_modules/inherits/package.json
deleted file mode 100644
index 37b4366b83e63e..00000000000000
--- a/deps/npm/node_modules/inherits/package.json
+++ /dev/null
@@ -1,29 +0,0 @@
-{
- "name": "inherits",
- "description": "Browser-friendly inheritance fully compatible with standard node.js inherits()",
- "version": "2.0.4",
- "keywords": [
- "inheritance",
- "class",
- "klass",
- "oop",
- "object-oriented",
- "inherits",
- "browser",
- "browserify"
- ],
- "main": "./inherits.js",
- "browser": "./inherits_browser.js",
- "repository": "git://github.com/isaacs/inherits",
- "license": "ISC",
- "scripts": {
- "test": "tap"
- },
- "devDependencies": {
- "tap": "^14.2.4"
- },
- "files": [
- "inherits.js",
- "inherits_browser.js"
- ]
-}
diff --git a/deps/npm/node_modules/is-core-module/core.json b/deps/npm/node_modules/is-core-module/core.json
index af29f0b734b225..3cda693d7d0fd3 100644
--- a/deps/npm/node_modules/is-core-module/core.json
+++ b/deps/npm/node_modules/is-core-module/core.json
@@ -115,7 +115,7 @@
"sys": [">= 0.4 && < 0.7", ">= 0.8"],
"node:sys": [">= 14.18 && < 15", ">= 16"],
"test/reporters": ">= 19.9 && < 20.2",
- "node:test/reporters": [">= 19.9", ">= 20"],
+ "node:test/reporters": [">= 18.17 && < 19", ">= 19.9", ">= 20"],
"node:test": [">= 16.17 && < 17", ">= 18"],
"timers": true,
"node:timers": [">= 14.18 && < 15", ">= 16"],
@@ -149,8 +149,8 @@
"node:v8": [">= 14.18 && < 15", ">= 16"],
"vm": true,
"node:vm": [">= 14.18 && < 15", ">= 16"],
- "wasi": [">= 13.4 && < 13.5", ">= 20"],
- "node:wasi": ">= 20",
+ "wasi": [">= 13.4 && < 13.5", ">= 18.17 && < 19", ">= 20"],
+ "node:wasi": [">= 18.17 && < 19", ">= 20"],
"worker_threads": ">= 11.7",
"node:worker_threads": [">= 14.18 && < 15", ">= 16"],
"zlib": ">= 0.5",
diff --git a/deps/npm/node_modules/is-core-module/package.json b/deps/npm/node_modules/is-core-module/package.json
index 62bb065e8364a8..1269c80c5520d8 100644
--- a/deps/npm/node_modules/is-core-module/package.json
+++ b/deps/npm/node_modules/is-core-module/package.json
@@ -1,6 +1,6 @@
{
"name": "is-core-module",
- "version": "2.12.1",
+ "version": "2.13.0",
"description": "Is this specifier a node.js core module?",
"main": "index.js",
"sideEffects": false,
@@ -45,8 +45,8 @@
"has": "^1.0.3"
},
"devDependencies": {
- "@ljharb/eslint-config": "^21.0.1",
- "aud": "^2.0.2",
+ "@ljharb/eslint-config": "^21.1.0",
+ "aud": "^2.0.3",
"auto-changelog": "^2.4.0",
"eslint": "=8.8.0",
"in-publish": "^2.0.1",
@@ -54,8 +54,8 @@
"npmignore": "^0.3.0",
"nyc": "^10.3.2",
"safe-publish-latest": "^2.0.0",
- "semver": "^6.3.0",
- "tape": "^5.6.3"
+ "semver": "^6.3.1",
+ "tape": "^5.6.6"
},
"auto-changelog": {
"output": "CHANGELOG.md",
diff --git a/deps/npm/node_modules/libnpmdiff/package.json b/deps/npm/node_modules/libnpmdiff/package.json
index f54a35ff5f868d..54a54ece0f026a 100644
--- a/deps/npm/node_modules/libnpmdiff/package.json
+++ b/deps/npm/node_modules/libnpmdiff/package.json
@@ -1,6 +1,6 @@
{
"name": "libnpmdiff",
- "version": "6.0.2",
+ "version": "6.0.3",
"description": "The registry diff",
"repository": {
"type": "git",
@@ -46,7 +46,7 @@
"tap": "^16.3.8"
},
"dependencies": {
- "@npmcli/arborist": "^7.2.0",
+ "@npmcli/arborist": "^7.2.1",
"@npmcli/disparity-colors": "^3.0.0",
"@npmcli/installed-package-contents": "^2.0.2",
"binary-extensions": "^2.2.0",
diff --git a/deps/npm/node_modules/libnpmexec/package.json b/deps/npm/node_modules/libnpmexec/package.json
index 5ab1484e216aba..5e4ae52a2fdddf 100644
--- a/deps/npm/node_modules/libnpmexec/package.json
+++ b/deps/npm/node_modules/libnpmexec/package.json
@@ -1,6 +1,6 @@
{
"name": "libnpmexec",
- "version": "7.0.2",
+ "version": "7.0.3",
"files": [
"bin/",
"lib/"
@@ -59,8 +59,8 @@
"tap": "^16.3.8"
},
"dependencies": {
- "@npmcli/arborist": "^7.2.0",
- "@npmcli/run-script": "^7.0.1",
+ "@npmcli/arborist": "^7.2.1",
+ "@npmcli/run-script": "^7.0.2",
"ci-info": "^3.7.1",
"npm-package-arg": "^11.0.1",
"npmlog": "^7.0.1",
diff --git a/deps/npm/node_modules/libnpmfund/package.json b/deps/npm/node_modules/libnpmfund/package.json
index 034e39c60d277d..9bacac4cdaabf6 100644
--- a/deps/npm/node_modules/libnpmfund/package.json
+++ b/deps/npm/node_modules/libnpmfund/package.json
@@ -1,6 +1,6 @@
{
"name": "libnpmfund",
- "version": "5.0.0",
+ "version": "5.0.1",
"main": "lib/index.js",
"files": [
"bin/",
@@ -45,7 +45,7 @@
"tap": "^16.3.8"
},
"dependencies": {
- "@npmcli/arborist": "^7.2.0"
+ "@npmcli/arborist": "^7.2.1"
},
"engines": {
"node": "^16.14.0 || >=18.0.0"
diff --git a/deps/npm/node_modules/libnpmpack/package.json b/deps/npm/node_modules/libnpmpack/package.json
index d3ceea0882fc3b..fbaa3dc256bc54 100644
--- a/deps/npm/node_modules/libnpmpack/package.json
+++ b/deps/npm/node_modules/libnpmpack/package.json
@@ -1,6 +1,6 @@
{
"name": "libnpmpack",
- "version": "6.0.2",
+ "version": "6.0.3",
"description": "Programmatic API for the bits behind npm pack",
"author": "GitHub Inc.",
"main": "lib/index.js",
@@ -36,8 +36,8 @@
"bugs": "https://github.com/npm/libnpmpack/issues",
"homepage": "https://npmjs.com/package/libnpmpack",
"dependencies": {
- "@npmcli/arborist": "^7.2.0",
- "@npmcli/run-script": "^7.0.1",
+ "@npmcli/arborist": "^7.2.1",
+ "@npmcli/run-script": "^7.0.2",
"npm-package-arg": "^11.0.1",
"pacote": "^17.0.4"
},
diff --git a/deps/npm/node_modules/libnpmversion/package.json b/deps/npm/node_modules/libnpmversion/package.json
index a440ee75cec7fc..5baac0c437e8b6 100644
--- a/deps/npm/node_modules/libnpmversion/package.json
+++ b/deps/npm/node_modules/libnpmversion/package.json
@@ -1,6 +1,6 @@
{
"name": "libnpmversion",
- "version": "5.0.0",
+ "version": "5.0.1",
"main": "lib/index.js",
"files": [
"bin/",
@@ -38,7 +38,7 @@
},
"dependencies": {
"@npmcli/git": "^5.0.3",
- "@npmcli/run-script": "^7.0.1",
+ "@npmcli/run-script": "^7.0.2",
"json-parse-even-better-errors": "^3.0.0",
"proc-log": "^3.0.0",
"semver": "^7.3.7"
diff --git a/deps/npm/node_modules/node-gyp/.github/ISSUE_TEMPLATE.md b/deps/npm/node_modules/node-gyp/.github/ISSUE_TEMPLATE.md
deleted file mode 100644
index c6b213d7be3663..00000000000000
--- a/deps/npm/node_modules/node-gyp/.github/ISSUE_TEMPLATE.md
+++ /dev/null
@@ -1,52 +0,0 @@
-
-
-Please look thru your error log for the string `gyp info using node-gyp@` and if the version number is less than the [current release of node-gyp](https://github.com/nodejs/node-gyp/releases) then __please upgrade__ using the instructions at https://github.com/nodejs/node-gyp/blob/master/docs/Updating-npm-bundled-node-gyp.md and try your command again.
-
-Requests for help with [`node-sass` are very common](https://github.com/nodejs/node-gyp/issues?q=label%3A%22Node+Sass+--%3E+Dart+Sass%22). Please be aware that this package is deprecated, you should seek alternatives and avoid opening new issues about it here.
-
-* **Node Version**:
-* **Platform**:
-* **Compiler**:
-* **Module**:
-
-Verbose output (from npm or node-gyp):
-
-```
-Paste your log here, between the backticks. It can be:
- - npm --verbose output,
- - or contents of npm-debug.log,
- - or output of node-gyp rebuild --verbose.
-Include the command you were trying to run.
-
-This should look like this:
-
->npm --verbose
-npm info it worked if it ends with ok
-npm verb cli [
-npm verb cli 'C:\\...\\node\\13.9.0\\x64\\node.exe',
-npm verb cli 'C:\\...\\node\\13.9.0\\x64\\node_modules\\npm\\bin\\npm-cli.js',
-npm verb cli '--verbose'
-npm verb cli ]
-npm info using npm@6.13.7
-npm info using node@v13.9.0
-
-Usage: npm
-(...)
-```
-
-
-
-
diff --git a/deps/npm/node_modules/node-gyp/.github/PULL_REQUEST_TEMPLATE.md b/deps/npm/node_modules/node-gyp/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index bcc4bb1a048c80..00000000000000
--- a/deps/npm/node_modules/node-gyp/.github/PULL_REQUEST_TEMPLATE.md
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-##### Checklist
-
-
-- [ ] `npm install && npm test` passes
-- [ ] tests are included
-- [ ] documentation is changed or added
-- [ ] commit message follows [commit guidelines](https://github.com/googleapis/release-please#how-should-i-write-my-commits)
-
-##### Description of change
-
-
diff --git a/deps/npm/node_modules/node-gyp/.github/workflows/release-please.yml b/deps/npm/node_modules/node-gyp/.github/workflows/release-please.yml
deleted file mode 100644
index c3057c3a3159ae..00000000000000
--- a/deps/npm/node_modules/node-gyp/.github/workflows/release-please.yml
+++ /dev/null
@@ -1,56 +0,0 @@
-name: release-please
-
-on:
- push:
- branches:
- - main
-
-jobs:
- release-please:
- runs-on: ubuntu-latest
- steps:
- - uses: google-github-actions/release-please-action@v2
- id: release
- with:
- package-name: node-gyp
- release-type: node
- changelog-types: >
- [{"type":"feat","section":"Features","hidden":false},
- {"type":"fix","section":"Bug Fixes","hidden":false},
- {"type":"bin","section":"Core","hidden":false},
- {"type":"gyp","section":"Core","hidden":false},
- {"type":"lib","section":"Core","hidden":false},
- {"type":"src","section":"Core","hidden":false},
- {"type":"test","section":"Tests","hidden":false},
- {"type":"build","section":"Core","hidden":false},
- {"type":"clean","section":"Core","hidden":false},
- {"type":"configure","section":"Core","hidden":false},
- {"type":"install","section":"Core","hidden":false},
- {"type":"list","section":"Core","hidden":false},
- {"type":"rebuild","section":"Core","hidden":false},
- {"type":"remove","section":"Core","hidden":false},
- {"type":"deps","section":"Core","hidden":false},
- {"type":"python","section":"Core","hidden":false},
- {"type":"lin","section":"Core","hidden":false},
- {"type":"linux","section":"Core","hidden":false},
- {"type":"mac","section":"Core","hidden":false},
- {"type":"macos","section":"Core","hidden":false},
- {"type":"win","section":"Core","hidden":false},
- {"type":"windows","section":"Core","hidden":false},
- {"type":"zos","section":"Core","hidden":false},
- {"type":"doc","section":"Doc","hidden":false},
- {"type":"docs","section":"Doc","hidden":false},
- {"type":"readme","section":"Doc","hidden":false},
- {"type":"chore","section":"Miscellaneous","hidden":false},
- {"type":"refactor","section":"Miscellaneous","hidden":false},
- {"type":"ci","section":"Miscellaneous","hidden":false},
- {"type":"meta","section":"Miscellaneous","hidden":false}]
-
- # Standard Conventional Commits: `feat` and `fix`
- # node-gyp subdirectories: `bin`, `gyp`, `lib`, `src`, `test`
- # node-gyp subcommands: `build`, `clean`, `configure`, `install`, `list`, `rebuild`, `remove`
- # Core abstract category: `deps`
- # Languages/platforms: `python`, `lin`, `linux`, `mac`, `macos`, `win`, `window`, `zos`
- # Documentation: `doc`, `docs`, `readme`
- # Standard Conventional Commits: `chore` (under "Miscellaneous")
- # Miscellaneous abstract categories: `refactor`, `ci`, `meta`
diff --git a/deps/npm/node_modules/node-gyp/.github/workflows/tests.yml b/deps/npm/node_modules/node-gyp/.github/workflows/tests.yml
deleted file mode 100644
index 517b2d95a48c6f..00000000000000
--- a/deps/npm/node_modules/node-gyp/.github/workflows/tests.yml
+++ /dev/null
@@ -1,55 +0,0 @@
-# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources
-# TODO: Line 48, enable pytest --doctest-modules
-
-name: Tests
-on:
- push:
- branches: [ main ]
- pull_request:
- branches: [ main ]
-jobs:
- Lint_Python:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v3
- - run: pip install --user ruff
- - run: ruff --format=github --select="E,F,PLC,PLE,UP,W,YTT" --ignore="PLC1901,S101,UP031" --target-version=py37 .
- Tests:
- strategy:
- fail-fast: false
- max-parallel: 15
- matrix:
- node: [16.x, 18.x, 20.x]
- python: ["3.8", "3.11"]
- os: [macos-latest, ubuntu-latest, windows-latest]
- runs-on: ${{ matrix.os }}
- steps:
- - name: Checkout Repository
- uses: actions/checkout@v3
- - name: Use Node.js ${{ matrix.node }}
- uses: actions/setup-node@v3
- with:
- node-version: ${{ matrix.node }}
- - name: Use Python ${{ matrix.python }}
- uses: actions/setup-python@v4
- with:
- python-version: ${{ matrix.python }}
- env:
- PYTHON_VERSION: ${{ matrix.python }} # Why do this?
- - name: Install Dependencies
- run: |
- npm install --no-progress
- pip install pytest
- - name: Set Windows environment
- if: startsWith(matrix.os, 'windows')
- run: |
- echo 'GYP_MSVS_VERSION=2015' >> $Env:GITHUB_ENV
- echo 'GYP_MSVS_OVERRIDE_PATH=C:\\Dummy' >> $Env:GITHUB_ENV
- - name: Run Python tests
- run: python -m pytest
- # - name: Run doctests with pytest
- # run: python -m pytest --doctest-modules
- - name: Environment Information
- run: npx envinfo
- - name: Run Node tests
- run: npm test
diff --git a/deps/npm/node_modules/node-gyp/.github/workflows/visual-studio.yml b/deps/npm/node_modules/node-gyp/.github/workflows/visual-studio.yml
deleted file mode 100644
index 12125e54479b87..00000000000000
--- a/deps/npm/node_modules/node-gyp/.github/workflows/visual-studio.yml
+++ /dev/null
@@ -1,33 +0,0 @@
-# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources
-
-name: visual-studio
-on:
- push:
- branches: [ main ]
- pull_request:
- branches: [ main ]
-jobs:
- visual-studio:
- strategy:
- fail-fast: false
- max-parallel: 8
- matrix:
- os: [windows-latest]
- msvs-version: [2016, 2019, 2022] # https://github.com/actions/virtual-environments/tree/main/images/win
- runs-on: ${{ matrix.os }}
- steps:
- - name: Checkout Repository
- uses: actions/checkout@v3
- - name: Install Dependencies
- run: |
- npm install --no-progress
- # npm audit fix --force
- - name: Set Windows environment
- if: startsWith(matrix.os, 'windows')
- run: |
- echo 'GYP_MSVS_VERSION=${{ matrix.msvs-version }}' >> $Env:GITHUB_ENV
- echo 'GYP_MSVS_OVERRIDE_PATH=C:\\Dummy' >> $Env:GITHUB_ENV
- - name: Environment Information
- run: npx envinfo
- - name: Run Node tests
- run: npm test
diff --git a/deps/npm/node_modules/node-gyp/CHANGELOG.md b/deps/npm/node_modules/node-gyp/CHANGELOG.md
index 9fb5f11847bb26..98315add5e0d46 100644
--- a/deps/npm/node_modules/node-gyp/CHANGELOG.md
+++ b/deps/npm/node_modules/node-gyp/CHANGELOG.md
@@ -1,5 +1,83 @@
# Changelog
+### [10.0.1](https://www.github.com/nodejs/node-gyp/compare/v10.0.0...v10.0.1) (2023-11-02)
+
+
+### Bug Fixes
+
+* use local `util` for `findAccessibleSync()` ([b39e681](https://www.github.com/nodejs/node-gyp/commit/b39e6819aa9e2c45107d6e60a4913ca036ebfbfd))
+
+
+### Miscellaneous
+
+* add parallel test logging ([7de1f5f](https://www.github.com/nodejs/node-gyp/commit/7de1f5f32d550d26d48fe4f76aed5866744edcba))
+* lint fixes ([4e0ed99](https://www.github.com/nodejs/node-gyp/commit/4e0ed992566f43abc6e988af091ad07fde04acbf))
+* use platform specific timeouts in tests ([a68586a](https://www.github.com/nodejs/node-gyp/commit/a68586a67d0af238300662cc062422b42820044d))
+
+## [10.0.0](https://www.github.com/nodejs/node-gyp/compare/v9.4.0...v10.0.0) (2023-10-28)
+
+
+### ⚠ BREAKING CHANGES
+
+* use .npmignore file to limit which files are published (#2921)
+* the `Gyp` class exported is now created using ECMAScript classes and therefore might have small differences to classes that were previously created with `util.inherits`.
+* All internal functions have been coverted to return promises and no longer accept callbacks. This is not a breaking change for users but may be breaking to consumers of `node-gyp` if you are requiring internal functions directly.
+* `node-gyp` now supports node `^16.14.0 || >=18.0.0`
+* update engines.node to ^14.17.0 || ^16.13.0 || >=18.0.0
+
+### Features
+
+* convert all internal functions to async/await ([355622f](https://www.github.com/nodejs/node-gyp/commit/355622f4aac3bd3056b9e03aac5fa2f42a4b3576))
+* convert internal classes from util.inherits to classes ([d52997e](https://www.github.com/nodejs/node-gyp/commit/d52997e975b9da6e0cea3d9b99873e9ddc768679))
+* drop node 14 support ([#2929](https://www.github.com/nodejs/node-gyp/issues/2929)) ([1b3bd34](https://www.github.com/nodejs/node-gyp/commit/1b3bd341b40f384988d03207ce8187e93ba609bc))
+* drop rimraf dependency ([4a50fe3](https://www.github.com/nodejs/node-gyp/commit/4a50fe31574217c4b2a798fc72b19947a64ceea1))
+* **gyp:** update gyp to v0.16.1 ([#2923](https://www.github.com/nodejs/node-gyp/issues/2923)) ([707927c](https://www.github.com/nodejs/node-gyp/commit/707927cd579205ef2b4b17e61c1cce24c056b452))
+* replace npmlog with proc-log ([4a50fe3](https://www.github.com/nodejs/node-gyp/commit/4a50fe31574217c4b2a798fc72b19947a64ceea1))
+* update engines.node to ^14.17.0 || ^16.13.0 || >=18.0.0 ([4a50fe3](https://www.github.com/nodejs/node-gyp/commit/4a50fe31574217c4b2a798fc72b19947a64ceea1))
+* use .npmignore file to limit which files are published ([#2921](https://www.github.com/nodejs/node-gyp/issues/2921)) ([864a979](https://www.github.com/nodejs/node-gyp/commit/864a979930cf0ef5ad64bc887b901fa8955d058f))
+
+
+### Bug Fixes
+
+* create Python symlink only during builds, and clean it up after ([#2721](https://www.github.com/nodejs/node-gyp/issues/2721)) ([0f1f667](https://www.github.com/nodejs/node-gyp/commit/0f1f667b737d21905e283df100a2cb639993562a))
+* promisify build command ([4a50fe3](https://www.github.com/nodejs/node-gyp/commit/4a50fe31574217c4b2a798fc72b19947a64ceea1))
+* use fs/promises in favor of fs.promises ([4a50fe3](https://www.github.com/nodejs/node-gyp/commit/4a50fe31574217c4b2a798fc72b19947a64ceea1))
+
+
+### Tests
+
+* increase mocha timeout ([#2887](https://www.github.com/nodejs/node-gyp/issues/2887)) ([445c28f](https://www.github.com/nodejs/node-gyp/commit/445c28fabc5fbdf9c3bb3341fb70660a3530f6ad))
+* update expired certs ([#2908](https://www.github.com/nodejs/node-gyp/issues/2908)) ([5746691](https://www.github.com/nodejs/node-gyp/commit/5746691a36f7b37019d4b8d4e9616aec43d20410))
+
+
+### Doc
+
+* Add note about Python symlinks (PR 2362) to CHANGELOG.md for 9.1.0 ([#2783](https://www.github.com/nodejs/node-gyp/issues/2783)) ([b3d41ae](https://www.github.com/nodejs/node-gyp/commit/b3d41aeb737ddd54cc292f363abc561dcc0a614e))
+* README.md Do not hardcode the supported versions of Python ([#2880](https://www.github.com/nodejs/node-gyp/issues/2880)) ([bb93b94](https://www.github.com/nodejs/node-gyp/commit/bb93b946a9c74934b59164deb52128cf913c97d5))
+* update applicable GitHub links from master to main ([#2843](https://www.github.com/nodejs/node-gyp/issues/2843)) ([d644ce4](https://www.github.com/nodejs/node-gyp/commit/d644ce48311edf090d0e920ad449e5766c757933))
+* Update windows installation instructions in README.md ([#2882](https://www.github.com/nodejs/node-gyp/issues/2882)) ([c9caa2e](https://www.github.com/nodejs/node-gyp/commit/c9caa2ecf3c7deae68444ce8fabb32d2dca651cd))
+
+
+### Core
+
+* find python checks order changed on windows ([#2872](https://www.github.com/nodejs/node-gyp/issues/2872)) ([b030555](https://www.github.com/nodejs/node-gyp/commit/b030555cdb754d9c23906e7e707115cd077bbf76))
+* glob@10.3.10 ([#2926](https://www.github.com/nodejs/node-gyp/issues/2926)) ([4bef1ec](https://www.github.com/nodejs/node-gyp/commit/4bef1ecc7554097d92beb397fbe1a546c5227545))
+* glob@8.0.3 ([4a50fe3](https://www.github.com/nodejs/node-gyp/commit/4a50fe31574217c4b2a798fc72b19947a64ceea1))
+* make-fetch-happen@13.0.0 ([#2927](https://www.github.com/nodejs/node-gyp/issues/2927)) ([059bb6f](https://www.github.com/nodejs/node-gyp/commit/059bb6fd41bb50955a9efbd97887773d60d53221))
+* nopt@^7.0.0 ([4a50fe3](https://www.github.com/nodejs/node-gyp/commit/4a50fe31574217c4b2a798fc72b19947a64ceea1))
+* standard@17.0.0 and fix linting errors ([4a50fe3](https://www.github.com/nodejs/node-gyp/commit/4a50fe31574217c4b2a798fc72b19947a64ceea1))
+* which@3.0.0 ([4a50fe3](https://www.github.com/nodejs/node-gyp/commit/4a50fe31574217c4b2a798fc72b19947a64ceea1))
+* which@4.0.0 ([#2928](https://www.github.com/nodejs/node-gyp/issues/2928)) ([e388255](https://www.github.com/nodejs/node-gyp/commit/e38825531403aabeae7abe58e76867f31b832f36))
+
+
+### Miscellaneous
+
+* add check engines script to CI ([#2922](https://www.github.com/nodejs/node-gyp/issues/2922)) ([21a7249](https://www.github.com/nodejs/node-gyp/commit/21a7249b40d8f95e7721e450fd18764adb1648a7))
+* empty commit to add changelog entries from [#2770](https://www.github.com/nodejs/node-gyp/issues/2770) ([4a50fe3](https://www.github.com/nodejs/node-gyp/commit/4a50fe31574217c4b2a798fc72b19947a64ceea1))
+* GitHub Workflows security hardening ([#2740](https://www.github.com/nodejs/node-gyp/issues/2740)) ([26683e9](https://www.github.com/nodejs/node-gyp/commit/26683e993df038fb94d89f2276f3535e4522d79a))
+* misc testing fixes ([#2930](https://www.github.com/nodejs/node-gyp/issues/2930)) ([4e493d4](https://www.github.com/nodejs/node-gyp/commit/4e493d4fb262d12ac52c84979071ccc79e666a1a))
+* run tests after release please PR ([3032e10](https://www.github.com/nodejs/node-gyp/commit/3032e1061cc2b7b49f83c397d385bafddc6b0214))
+
## [9.4.0](https://www.github.com/nodejs/node-gyp/compare/v9.3.1...v9.4.0) (2023-06-12)
@@ -98,6 +176,7 @@
### Core
* update due to rename of primary branch ([ca1f068](https://www.github.com/nodejs/node-gyp/commit/ca1f0681a5567ca8cd51acebccd37a633f19bc6a))
+* Add Python symlink to path (for non-Windows OSes only) ([#2362](https://github.com/nodejs/node-gyp/pull/2362)) ([b9ddcd5](https://github.com/nodejs/node-gyp/commit/b9ddcd5bbd93b05b03674836b6ebdae2c2e74c8c))
### Tests
diff --git a/deps/npm/node_modules/node-gyp/CONTRIBUTING.md b/deps/npm/node_modules/node-gyp/CONTRIBUTING.md
index c1c50eab4e58b7..5b977898f104b3 100644
--- a/deps/npm/node_modules/node-gyp/CONTRIBUTING.md
+++ b/deps/npm/node_modules/node-gyp/CONTRIBUTING.md
@@ -3,7 +3,7 @@
## Code of Conduct
Please read the
-[Code of Conduct](https://github.com/nodejs/admin/blob/master/CODE_OF_CONDUCT.md)
+[Code of Conduct](https://github.com/nodejs/admin/blob/main/CODE_OF_CONDUCT.md)
which explains the minimum behavior expectations for node-gyp contributors.
diff --git a/deps/npm/node_modules/node-gyp/README.md b/deps/npm/node_modules/node-gyp/README.md
index 99494a38d09b38..f46ee06308db1e 100644
--- a/deps/npm/node_modules/node-gyp/README.md
+++ b/deps/npm/node_modules/node-gyp/README.md
@@ -1,12 +1,13 @@
# `node-gyp` - Node.js native addon build tool
-[![Build Status](https://github.com/nodejs/node-gyp/workflows/Tests/badge.svg?branch=master)](https://github.com/nodejs/node-gyp/actions?query=workflow%3ATests+branch%3Amaster)
+[![Build Status](https://github.com/nodejs/node-gyp/workflows/Tests/badge.svg?branch=main)](https://github.com/nodejs/node-gyp/actions?query=workflow%3ATests+branch%3Amain)
![npm](https://img.shields.io/npm/dm/node-gyp)
`node-gyp` is a cross-platform command-line tool written in Node.js for
compiling native addon modules for Node.js. It contains a vendored copy of the
[gyp-next](https://github.com/nodejs/gyp-next) project that was previously used
-by the Chromium team, extended to support the development of Node.js native addons.
+by the Chromium team and extended to support the development of Node.js native
+addons.
Note that `node-gyp` is _not_ used to build Node.js itself.
@@ -31,27 +32,26 @@ Depending on your operating system, you will need to install:
### On Unix
- * Python v3.7, v3.8, v3.9, or v3.10
+ * [A supported version of Python](https://devguide.python.org/versions/)
* `make`
* A proper C/C++ compiler toolchain, like [GCC](https://gcc.gnu.org)
### On macOS
-**ATTENTION**: If your Mac has been _upgraded_ to macOS Catalina (10.15) or higher, please read [macOS_Catalina.md](macOS_Catalina.md).
-
- * Python v3.7, v3.8, v3.9, or v3.10
- * `XCode Command Line Tools` which will install `clang`, `clang++`, and `make`.
- * Install the `XCode Command Line Tools` standalone by running `xcode-select --install`. -- OR --
+ * [A supported version of Python](https://devguide.python.org/versions/)
+ * `Xcode Command Line Tools` which will install `clang`, `clang++`, and `make`.
+ * Install the `Xcode Command Line Tools` standalone by running `xcode-select --install`. -- OR --
* Alternatively, if you already have the [full Xcode installed](https://developer.apple.com/xcode/download/), you can install the Command Line Tools under the menu `Xcode -> Open Developer Tool -> More Developer Tools...`.
### On Windows
-Install the current version of Python from the [Microsoft Store package](https://www.microsoft.com/en-us/p/python-310/9pjpw5ldxlz5).
+Install the current [version of Python](https://devguide.python.org/versions/) from the
+[Microsoft Store](https://apps.microsoft.com/store/search?publisher=Python+Software+Foundation).
Install tools and configuration manually:
* Install Visual C++ Build Environment: [Visual Studio Build Tools](https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=BuildTools)
- (using "Visual C++ build tools" workload) or [Visual Studio Community](https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=Community)
+ (using "Visual C++ build tools" if using a version older than VS2019, otherwise use "Desktop development with C++" workload) or [Visual Studio Community](https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=Community)
(using the "Desktop development with C++" workload)
If the above steps didn't work for you, please visit [Microsoft's Node.js Guidelines for Windows](https://github.com/Microsoft/nodejs-guidelines/blob/master/windows-environment.md#compiling-native-addon-modules) for additional tips.
@@ -62,9 +62,9 @@ Install tools and configuration manually:
### Configuring Python Dependency
-`node-gyp` requires that you have installed a compatible version of Python, one of: v3.7, v3.8,
-v3.9, or v3.10. If you have multiple Python versions installed, you can identify which Python
-version `node-gyp` should use in one of the following ways:
+`node-gyp` requires that you have installed a [supported version of Python](https://devguide.python.org/versions/).
+If you have multiple versions of Python installed, you can identify which version
+`node-gyp` should use in one of the following ways:
1. by setting the `--python` command-line option, e.g.:
@@ -73,24 +73,28 @@ node-gyp --python /path/to/executable/python
```
2. If `node-gyp` is called by way of `npm`, *and* you have multiple versions of
-Python installed, then you can set `npm`'s 'python' config key to the appropriate
-value:
-
+Python installed, then you can set the `npm_config_python` environment variable
+to the appropriate path:
``` bash
-npm config set python /path/to/executable/python
+export npm_config_python=/path/to/executable/python
+```
+ Or on Windows:
+```console
+py --list-paths # To see the installed Python versions
+set npm_config_python=C:\path\to\python.exe
```
3. If the `PYTHON` environment variable is set to the path of a Python executable,
-then that version will be used, if it is a compatible version.
+then that version will be used if it is a supported version.
4. If the `NODE_GYP_FORCE_PYTHON` environment variable is set to the path of a
Python executable, it will be used instead of any of the other configured or
-builtin Python search paths. If it's not a compatible version, no further
+built-in Python search paths. If it's not a compatible version, no further
searching will be done.
### Build for Third Party Node.js Runtimes
-When building modules for third party Node.js runtimes like Electron, which have
+When building modules for third-party Node.js runtimes like Electron, which have
different build configurations from the official Node.js distribution, you
should use `--dist-url` or `--nodedir` flags to specify the headers of the
runtime to build for.
@@ -106,7 +110,7 @@ to work around configuration errors.
## How to Use
-To compile your native addon, first go to its root directory:
+To compile your native addon first go to its root directory:
``` bash
cd my_node_addon
@@ -168,7 +172,7 @@ The **[docs](./docs/)** directory contains additional documentation on specific
Some additional resources for Node.js native addons and writing `gyp` configuration files:
* ["Going Native" a nodeschool.io tutorial](http://nodeschool.io/#goingnative)
- * ["Hello World" node addon example](https://github.com/nodejs/node/tree/master/test/addons/hello-world)
+ * ["Hello World" node addon example](https://github.com/nodejs/node/tree/main/test/addons/hello-world)
* [gyp user documentation](https://gyp.gsrc.io/docs/UserDocumentation.md)
* [gyp input format reference](https://gyp.gsrc.io/docs/InputFormatReference.md)
* [*"binding.gyp" files out in the wild* wiki page](./docs/binding.gyp-files-in-the-wild.md)
@@ -240,7 +244,7 @@ Or this on Windows:
set npm_config_devdir=c:\temp\.gyp
```
-### `npm` configuration
+### `npm` configuration for npm versions before v9
Use the form `OPTION_NAME` for any of the command options listed above.
diff --git a/deps/npm/node_modules/node-gyp/bin/node-gyp.js b/deps/npm/node_modules/node-gyp/bin/node-gyp.js
index 8652ea21eceebb..f8317b47b34147 100755
--- a/deps/npm/node_modules/node-gyp/bin/node-gyp.js
+++ b/deps/npm/node_modules/node-gyp/bin/node-gyp.js
@@ -6,7 +6,7 @@ process.title = 'node-gyp'
const envPaths = require('env-paths')
const gyp = require('../')
-const log = require('npmlog')
+const log = require('../lib/log')
const os = require('os')
/**
@@ -14,11 +14,11 @@ const os = require('os')
*/
const prog = gyp()
-var completed = false
+let completed = false
prog.parseArgv(process.argv)
prog.devDir = prog.opts.devdir
-var homeDir = os.homedir()
+const homeDir = os.homedir()
if (prog.devDir) {
prog.devDir = prog.devDir.replace(/^~/, homeDir)
} else if (homeDir) {
@@ -32,9 +32,9 @@ if (prog.devDir) {
if (prog.todo.length === 0) {
if (~process.argv.indexOf('-v') || ~process.argv.indexOf('--version')) {
- console.log('v%s', prog.version)
+ log.stdout('v%s', prog.version)
} else {
- console.log('%s', prog.usage())
+ log.stdout('%s', prog.usage())
}
process.exit(0)
}
@@ -48,11 +48,11 @@ log.info('using', 'node@%s | %s | %s', process.versions.node, process.platform,
* Change dir if -C/--directory was passed.
*/
-var dir = prog.opts.directory
+const dir = prog.opts.directory
if (dir) {
- var fs = require('fs')
+ const fs = require('fs')
try {
- var stat = fs.statSync(dir)
+ const stat = fs.statSync(dir)
if (stat.isDirectory()) {
log.info('chdir', dir)
process.chdir(dir)
@@ -68,8 +68,8 @@ if (dir) {
}
}
-function run () {
- var command = prog.todo.shift()
+async function run () {
+ const command = prog.todo.shift()
if (!command) {
// done!
completed = true
@@ -77,30 +77,28 @@ function run () {
return
}
- prog.commands[command.name](command.args, function (err) {
- if (err) {
- log.error(command.name + ' error')
- log.error('stack', err.stack)
- errorMessage()
- log.error('not ok')
- return process.exit(1)
- }
+ try {
+ const args = await prog.commands[command.name](command.args) ?? []
+
if (command.name === 'list') {
- var versions = arguments[1]
- if (versions.length > 0) {
- versions.forEach(function (version) {
- console.log(version)
- })
+ if (args.length) {
+ args.forEach((version) => log.stdout(version))
} else {
- console.log('No node development files installed. Use `node-gyp install` to install a version.')
+ log.stdout('No node development files installed. Use `node-gyp install` to install a version.')
}
- } else if (arguments.length >= 2) {
- console.log.apply(console, [].slice.call(arguments, 1))
+ } else if (args.length >= 1) {
+ log.stdout(...args.slice(1))
}
// now run the next command in the queue
- process.nextTick(run)
- })
+ return run()
+ } catch (err) {
+ log.error(command.name + ' error')
+ log.error('stack', err.stack)
+ errorMessage()
+ log.error('not ok')
+ return process.exit(1)
+ }
}
process.on('exit', function (code) {
@@ -120,7 +118,7 @@ process.on('uncaughtException', function (err) {
function errorMessage () {
// copied from npm's lib/utils/error-handler.js
- var os = require('os')
+ const os = require('os')
log.error('System', os.type() + ' ' + os.release())
log.error('command', process.argv
.map(JSON.stringify).join(' '))
diff --git a/deps/npm/node_modules/node-gyp/docs/Error-pre-versions-of-node-cannot-be-installed.md b/deps/npm/node_modules/node-gyp/docs/Error-pre-versions-of-node-cannot-be-installed.md
deleted file mode 100644
index c1e1158d70190b..00000000000000
--- a/deps/npm/node_modules/node-gyp/docs/Error-pre-versions-of-node-cannot-be-installed.md
+++ /dev/null
@@ -1,94 +0,0 @@
-When using `node-gyp` you might see an error like this when attempting to compile/install a node.js native addon:
-
-```
-$ npm install bcrypt
-npm http GET https://registry.npmjs.org/bcrypt/0.7.5
-npm http 304 https://registry.npmjs.org/bcrypt/0.7.5
-npm http GET https://registry.npmjs.org/bindings/1.0.0
-npm http 304 https://registry.npmjs.org/bindings/1.0.0
-
-> bcrypt@0.7.5 install /home/ubuntu/public/song-swap/node_modules/bcrypt
-> node-gyp rebuild
-
-gyp ERR! configure error
-gyp ERR! stack Error: "pre" versions of node cannot be installed, use the --nodedir flag instead
-gyp ERR! stack at install (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/install.js:69:16)
-gyp ERR! stack at Object.self.commands.(anonymous function) [as install] (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/node-gyp.js:56:37)
-gyp ERR! stack at getNodeDir (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:219:20)
-gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:105:9
-gyp ERR! stack at ChildProcess.exithandler (child_process.js:630:7)
-gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:99:17)
-gyp ERR! stack at maybeClose (child_process.js:730:16)
-gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:797:5)
-gyp ERR! System Linux 3.5.0-21-generic
-gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
-gyp ERR! cwd /home/ubuntu/public/song-swap/node_modules/bcrypt
-gyp ERR! node -v v0.11.2-pre
-gyp ERR! node-gyp -v v0.9.5
-gyp ERR! not ok
-npm ERR! bcrypt@0.7.5 install: `node-gyp rebuild`
-npm ERR! `sh "-c" "node-gyp rebuild"` failed with 1
-npm ERR!
-npm ERR! Failed at the bcrypt@0.7.5 install script.
-npm ERR! This is most likely a problem with the bcrypt package,
-npm ERR! not with npm itself.
-npm ERR! Tell the author that this fails on your system:
-npm ERR! node-gyp rebuild
-npm ERR! You can get their info via:
-npm ERR! npm owner ls bcrypt
-npm ERR! There is likely additional logging output above.
-
-npm ERR! System Linux 3.5.0-21-generic
-npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install" "bcrypt"
-npm ERR! cwd /home/ubuntu/public/song-swap
-npm ERR! node -v v0.11.2-pre
-npm ERR! npm -v 1.2.18
-npm ERR! code ELIFECYCLE
-npm ERR!
-npm ERR! Additional logging details can be found in:
-npm ERR! /home/ubuntu/public/song-swap/npm-debug.log
-npm ERR! not ok code 0
-```
-
-The main error here is:
-
-```
-Error: "pre" versions of node cannot be installed, use the --nodedir flag instead
-```
-
-This error is caused when you attempt to compile a native addon using a version of node.js with `-pre` at the end of the version number:
-
-``` bash
-$ node -v
-v0.10.4-pre
-```
-
-## How to avoid (the short answer)
-
-To avoid this error completely just use a stable release of node.js. i.e. `v0.10.4`, and __not__ `v0.10.4-pre`.
-
-## How to fix (the long answer)
-
-This error happens because `node-gyp` does not know what header files were used to compile your "pre" version of node, and therefore it needs you to specify the node source code directory path using the `--nodedir` flag.
-
-For example, if I compiled my development ("pre") version of node.js using the source code in `/Users/nrajlich/node`, then I could invoke `node-gyp` like:
-
-``` bash
-$ node-gyp rebuild --nodedir=/Users/nrajlich/node
-```
-
-Or install an native addon through `npm` like:
-
-``` bash
-$ npm install bcrypt --nodedir=/Users/nrajlich/node
-```
-
-### Always use `--nodedir`
-
-__Note:__ This is for advanced users who use `-pre` versions of node more often than tagged releases.
-
-If you're invoking `node-gyp` through `npm`, then you can leverage `npm`'s configuration system and not have to specify the `--nodedir` flag all the time:
-
-``` bash
-$ npm config set nodedir /Users/nrajlich/node
-```
\ No newline at end of file
diff --git a/deps/npm/node_modules/node-gyp/docs/Force-npm-to-use-global-node-gyp.md b/deps/npm/node_modules/node-gyp/docs/Force-npm-to-use-global-node-gyp.md
deleted file mode 100644
index c6304e490a75d9..00000000000000
--- a/deps/npm/node_modules/node-gyp/docs/Force-npm-to-use-global-node-gyp.md
+++ /dev/null
@@ -1,47 +0,0 @@
-# Force npm to use global installed node-gyp
-
-**Note: These instructions only work with npm 6 or older. For a solution that works with npm 8 (or older), see [Updating-npm-bundled-node-gyp.md](Updating-npm-bundled-node-gyp.md).**
-
-[Many issues](https://github.com/nodejs/node-gyp/labels/ERR%21%20node-gyp%20-v%20%3C%3D%20v5.1.0) are opened by users who are
-not running a [current version of node-gyp](https://github.com/nodejs/node-gyp/releases).
-
-npm bundles its own, internal, copy of node-gyp located at `npm/node_modules`, within npm's private dependencies which are separate from *globally* accessible packages. Therefore this internal copy of node-gyp is independent from any globally installed copy of node-gyp that
-may have been installed via `npm install -g node-gyp`.
-
-So npm's internal copy of node-gyp **isn't** stored inside *global* `node_modules` and thus isn't available for use as a standalone package. npm uses it's *internal* copy of `node-gyp` to automatically build native addons.
-
-When you install a _new_ version of node-gyp outside of npm, it'll go into your *global* `node_modules`, but not under the `npm/node_modules` (where internal copy of node-gyp is stored). So it will get into your `$PATH` and you will be able to use this globally installed version (**but not internal node-gyp of npm**) as any other globally installed package.
-
-The catch is that npm **won't** use global version unless you tell it to, it'll keep on using the **internal one**. You need to instruct it to by setting the `node_gyp` config variable (which goes into your `~/.npmrc`). You do this by running the `npm config set` command as below. Then npm will use the command in the path you supply whenever it needs to build a native addon.
-
-**Important**: You also need to remember to unset this when you upgrade npm with a newer version of node-gyp, or you have to manually keep your globally installed node-gyp to date. See "Undo" below.
-
-## Linux and macOS
-```
-npm install --global node-gyp@latest
-npm config set node_gyp $(npm prefix -g)/lib/node_modules/node-gyp/bin/node-gyp.js
-```
-
-`sudo` may be required for the first command if you get a permission error.
-
-## Windows
-
-### Windows Command Prompt
-```
-npm install --global node-gyp@latest
-for /f "delims=" %P in ('npm prefix -g') do npm config set node_gyp "%P\node_modules\node-gyp\bin\node-gyp.js"
-```
-
-### Powershell
-```
-npm install --global node-gyp@latest
-npm prefix -g | % {npm config set node_gyp "$_\node_modules\node-gyp\bin\node-gyp.js"}
-```
-
-## Undo
-**Beware** if you don't unset the `node_gyp` config option, npm will continue to use the globally installed version of node-gyp rather than the one it ships with, which may end up being newer.
-
-```
-npm config delete node_gyp
-npm uninstall --global node-gyp
-```
diff --git a/deps/npm/node_modules/node-gyp/docs/Home.md b/deps/npm/node_modules/node-gyp/docs/Home.md
deleted file mode 100644
index fe099868b28225..00000000000000
--- a/deps/npm/node_modules/node-gyp/docs/Home.md
+++ /dev/null
@@ -1,7 +0,0 @@
-Welcome to the node-gyp wiki!
-
- * [["binding.gyp" files out in the wild]]
- * [[Linking to OpenSSL]]
- * [[Common Issues]]
- * [[Updating npm's bundled node-gyp]]
- * [[Error: "pre" versions of node cannot be installed]]
diff --git a/deps/npm/node_modules/node-gyp/docs/Linking-to-OpenSSL.md b/deps/npm/node_modules/node-gyp/docs/Linking-to-OpenSSL.md
deleted file mode 100644
index 1c17ab8e313667..00000000000000
--- a/deps/npm/node_modules/node-gyp/docs/Linking-to-OpenSSL.md
+++ /dev/null
@@ -1,86 +0,0 @@
-A handful of native addons require linking to OpenSSL in one way or another. This introduces a small challenge since node will sometimes bundle OpenSSL statically (the default for node >= v0.8.x), or sometimes dynamically link to the system OpenSSL (default for node <= v0.6.x).
-
-Good native addons should account for both scenarios. It's recommended that you use the `binding.gyp` file provided below as a starting-point for any addon that needs to use OpenSSL:
-
-``` python
-{
- 'variables': {
- # node v0.6.x doesn't give us its build variables,
- # but on Unix it was only possible to use the system OpenSSL library,
- # so default the variable to "true", v0.8.x node and up will overwrite it.
- 'node_shared_openssl%': 'true'
- },
- 'targets': [
- {
- 'target_name': 'binding',
- 'sources': [
- 'src/binding.cc'
- ],
- 'conditions': [
- ['node_shared_openssl=="false"', {
- # so when "node_shared_openssl" is "false", then OpenSSL has been
- # bundled into the node executable. So we need to include the same
- # header files that were used when building node.
- 'include_dirs': [
- '<(node_root_dir)/deps/openssl/openssl/include'
- ],
- "conditions" : [
- ["target_arch=='ia32'", {
- "include_dirs": [ "<(node_root_dir)/deps/openssl/config/piii" ]
- }],
- ["target_arch=='x64'", {
- "include_dirs": [ "<(node_root_dir)/deps/openssl/config/k8" ]
- }],
- ["target_arch=='arm'", {
- "include_dirs": [ "<(node_root_dir)/deps/openssl/config/arm" ]
- }]
- ]
- }]
- ]
- }
- ]
-}
-```
-
-This ensures that when OpenSSL is statically linked into `node` then, the bundled OpenSSL headers are included, but when the system OpenSSL is in use, then only those headers will be used.
-
-## Windows?
-
-As you can see this baseline `binding.gyp` file only accounts for the Unix scenario. Currently on Windows the situation is a little less ideal. On Windows, OpenSSL is _always_ statically compiled into the `node` executable, so ideally it would be possible to use that copy of OpenSSL when building native addons.
-
-Unfortunately it doesn't seem like that is possible at the moment, as there would need to be tweaks made to the generated `node.lib` file to include the openssl glue functions, or a new `openssl.lib` file would need to be created during the node build. I'm not sure which is the easiest/most feasible.
-
-In the meantime, one possible solution is using another copy of OpenSSL, which is what [`node-bcrypt`](https://github.com/ncb000gt/node.bcrypt.js) currently does. Adding something like this to your `binding.gyp` file's `"conditions"` block would enable this:
-
-``` python
- [ 'OS=="win"', {
- 'conditions': [
- # "openssl_root" is the directory on Windows of the OpenSSL files.
- # Check the "target_arch" variable to set good default values for
- # both 64-bit and 32-bit builds of the module.
- ['target_arch=="x64"', {
- 'variables': {
- 'openssl_root%': 'C:/OpenSSL-Win64'
- },
- }, {
- 'variables': {
- 'openssl_root%': 'C:/OpenSSL-Win32'
- },
- }],
- ],
- 'libraries': [
- '-l<(openssl_root)/lib/libeay32.lib',
- ],
- 'include_dirs': [
- '<(openssl_root)/include',
- ],
- }]
-```
-
-Now you can direct your users to install OpenSSL on Windows from here (be sure to tell them to install the 64-bit version if they're compiling against a 64-bit version of node): http://slproweb.com/products/Win32OpenSSL.html
-
-Also note that both `node-gyp` and `npm` allow you to overwrite that default `openssl_root` variable on the command line:
-
-``` bash
-$ node-gyp rebuild --openssl-root="C:\Users\Nathan\Desktop\openssl"
-```
\ No newline at end of file
diff --git a/deps/npm/node_modules/node-gyp/docs/README.md b/deps/npm/node_modules/node-gyp/docs/README.md
deleted file mode 100644
index 487fb0a57edbfa..00000000000000
--- a/deps/npm/node_modules/node-gyp/docs/README.md
+++ /dev/null
@@ -1,19 +0,0 @@
-## Versions of `node-gyp` that are earlier than v9.x.x
-
-Please look thru your error log for the string `gyp info using node-gyp@` and if that version number is less than the [current release of node-gyp](https://github.com/nodejs/node-gyp/releases) then __please upgrade__ using [these instructions](https://github.com/nodejs/node-gyp/blob/master/docs/Updating-npm-bundled-node-gyp.md) and then try your command again.
-
-## `node-sass` is deprecated
-
-Please be aware that the package [`node-sass` is deprecated](https://github.com/sass/node-sass#node-sass) so you should actively seek alternatives. You can try:
-```
-npm uninstall node-sass
-npm install sass --save
-# or ...
-npm install --global node-sass@latest
-```
-`node-sass` projects _may_ work by downgrading to Node.js v14 but [that release is end-of-life](https://github.com/nodejs/release#release-schedule).
-But in any case, please avoid opening new `node-sass` issues on this repo because we [cannot help much](https://github.com/nodejs/node-gyp/issues?q=is%3Aissue+label%3A%22Node+Sass+--%3E+Dart+Sass%22+).
-
-## Issues finding the installed Visual Studio
-
-In cmd, [`npm config set msvs_version 20xx`](https://github.com/nodejs/node-gyp#on-windows) with ___xx___ matching your locally installed version of Visual Studio.
diff --git a/deps/npm/node_modules/node-gyp/docs/Updating-npm-bundled-node-gyp.md b/deps/npm/node_modules/node-gyp/docs/Updating-npm-bundled-node-gyp.md
deleted file mode 100644
index 5759add3fee572..00000000000000
--- a/deps/npm/node_modules/node-gyp/docs/Updating-npm-bundled-node-gyp.md
+++ /dev/null
@@ -1,72 +0,0 @@
-# Updating the npm-bundled version of node-gyp
-
-**Note: These instructions are (only) tested and known to work with npm 8 and older.**
-
-**Note: These instructions will be undone if you reinstall or upgrade npm or node! For a more permanent (and simpler) solution, see [Force-npm-to-use-global-node-gyp.md](Force-npm-to-use-global-node-gyp.md). (npm 6 or older only!)**
-
-[Many issues](https://github.com/nodejs/node-gyp/issues?q=label%3A"ERR!+node-gyp+-v+<%3D+v9.x.x") are opened by users who are
-not running a [current version of node-gyp](https://github.com/nodejs/node-gyp/releases).
-
-`npm` bundles its own, internal, copy of `node-gyp`. This internal copy is independent of any globally installed copy of node-gyp that
-may have been installed via `npm install -g node-gyp`.
-
-This means that while `node-gyp` doesn't get installed into your `$PATH` by default, npm still keeps its own copy to invoke when you
-attempt to `npm install` a native add-on.
-
-Sometimes, you may need to update npm's internal node-gyp to a newer version than what is installed. A simple `npm install -g node-gyp`
-_won't_ do the trick since npm will still continue to use its internal copy over the global one.
-
-So instead:
-
-## Version of npm
-
-We need to start by knowing your version of `npm`:
-```bash
-npm --version
-```
-
-## Linux, macOS, Solaris, etc.
-
-Unix is easy. Just run the following command.
-
-If your npm is version ___7 or 8___, do:
-```bash
-$ npm explore npm/node_modules/@npmcli/run-script -g -- npm_config_global=false npm install node-gyp@latest
-```
-
-Else if your npm is version ___less than 7___, do:
-```bash
-$ npm explore npm/node_modules/npm-lifecycle -g -- npm install node-gyp@latest
-```
-
-If the command fails with a permissions error, please try `sudo` and then the command.
-
-## Windows
-
-Windows is a bit trickier, since `npm` might be installed to the "Program Files" directory, which needs admin privileges in order to
-modify on current Windows. Therefore, run the following commands __inside a `cmd.exe` started with "Run as Administrator"__:
-
-First we need to find the location of `node`. If you don't already know the location that `node.exe` got installed to, then run:
-```bash
-$ where node
-```
-
-Now `cd` to the directory that `node.exe` is contained in e.g.:
-```bash
-$ cd "C:\Program Files\nodejs"
-```
-
-If your npm version is ___7 or 8___, do:
-```bash
-cd node_modules\npm\node_modules\@npmcli\run-script
-```
-
-Else if your npm version is ___less than 7___, do:
-```bash
-cd node_modules\npm\node_modules\npm-lifecycle
-```
-
-Finish by running:
-```bash
-$ npm install node-gyp@latest
-```
diff --git a/deps/npm/node_modules/node-gyp/docs/binding.gyp-files-in-the-wild.md b/deps/npm/node_modules/node-gyp/docs/binding.gyp-files-in-the-wild.md
deleted file mode 100644
index 78afb32544776f..00000000000000
--- a/deps/npm/node_modules/node-gyp/docs/binding.gyp-files-in-the-wild.md
+++ /dev/null
@@ -1,49 +0,0 @@
-This page contains links to some examples of existing `binding.gyp` files that other node modules are using. Take a look at them for inspiration.
-
-To add to this page, just add the link to the project's `binding.gyp` file below:
-
- * [ons](https://github.com/XadillaX/aliyun-ons/blob/master/binding.gyp)
- * [thmclrx](https://github.com/XadillaX/thmclrx/blob/master/binding.gyp)
- * [libxmljs](https://github.com/polotek/libxmljs/blob/master/binding.gyp)
- * [node-buffertools](https://github.com/bnoordhuis/node-buffertools/blob/master/binding.gyp)
- * [node-canvas](https://github.com/LearnBoost/node-canvas/blob/master/binding.gyp)
- * [node-ffi](https://github.com/rbranson/node-ffi/blob/master/binding.gyp) + [libffi](https://github.com/rbranson/node-ffi/blob/master/deps/libffi/libffi.gyp)
- * [node-time](https://github.com/TooTallNate/node-time/blob/master/binding.gyp)
- * [node-sass](https://github.com/sass/node-sass/blob/master/binding.gyp) + [libsass](https://github.com/sass/node-sass/blob/master/src/libsass.gyp)
- * [node-serialport](https://github.com/voodootikigod/node-serialport/blob/master/binding.gyp)
- * [node-weak](https://github.com/TooTallNate/node-weak/blob/master/binding.gyp)
- * [pty.js](https://github.com/chjj/pty.js/blob/master/binding.gyp)
- * [ref](https://github.com/TooTallNate/ref/blob/master/binding.gyp)
- * [appjs](https://github.com/milani/appjs/blob/master/binding.gyp)
- * [nwm](https://github.com/mixu/nwm/blob/master/binding.gyp)
- * [bcrypt](https://github.com/ncb000gt/node.bcrypt.js/blob/master/binding.gyp)
- * [nk-mysql](https://github.com/mmod/nodamysql/blob/master/binding.gyp)
- * [nk-xrm-installer](https://github.com/mmod/nk-xrm-installer/blob/master/binding.gyp) + [includable.gypi](https://github.com/mmod/nk-xrm-installer/blob/master/includable.gypi) + [unpack.py](https://github.com/mmod/nk-xrm-installer/blob/master/unpack.py) + [disburse.py](https://github.com/mmod/nk-xrm-installer/blob/master/disburse.py)
- .py files above provide complete reference for examples of fetching source via http, extracting, and moving files.
- * [node-memwatch](https://github.com/lloyd/node-memwatch/blob/master/binding.gyp)
- * [node-ip2location](https://github.com/bolgovr/node-ip2location/blob/master/binding.gyp)
- * [node-midi](https://github.com/justinlatimer/node-midi/blob/master/binding.gyp)
- * [node-sqlite3](https://github.com/developmentseed/node-sqlite3/blob/master/binding.gyp) + [libsqlite3](https://github.com/developmentseed/node-sqlite3/blob/master/deps/sqlite3.gyp)
- * [node-zipfile](https://github.com/mapbox/node-zipfile/blob/master/binding.gyp)
- * [node-mapnik](https://github.com/mapnik/node-mapnik/blob/master/binding.gyp)
- * [node-inotify](https://github.com/c4milo/node-inotify/blob/master/binding.gyp)
- * [v8-profiler](https://github.com/c4milo/v8-profiler/blob/master/binding.gyp)
- * [airtunes](https://github.com/radioline/node_airtunes/blob/master/binding.gyp)
- * [node-fann](https://github.com/c4milo/node-fann/blob/master/binding.gyp)
- * [node-talib](https://github.com/oransel/node-talib/blob/master/binding.gyp)
- * [node-leveldown](https://github.com/rvagg/node-leveldown/blob/master/binding.gyp) + [leveldb.gyp](https://github.com/rvagg/node-leveldown/blob/master/deps/leveldb/leveldb.gyp) + [snappy.gyp](https://github.com/rvagg/node-leveldown/blob/master/deps/snappy/snappy.gyp)
- * [node-expat](https://github.com/astro/node-expat/blob/master/binding.gyp) + [libexpat](https://github.com/astro/node-expat/blob/master/deps/libexpat/libexpat.gyp)
- * [node-openvg-canvas](https://github.com/luismreis/node-openvg-canvas/blob/master/binding.gyp) + [node-openvg](https://github.com/luismreis/node-openvg/blob/master/binding.gyp)
- * [node-cryptopp](https://github.com/BatikhSouri/node-cryptopp/blob/master/binding.gyp)
- * [topcube](https://github.com/creationix/topcube/blob/master/binding.gyp)
- * [node-osmium](https://github.com/osmcode/node-osmium/blob/master/binding.gyp)
- * [node-osrm](https://github.com/DennisOSRM/node-osrm)
- * [node-oracle](https://github.com/joeferner/node-oracle/blob/master/binding.gyp)
- * [node-process-list](https://github.com/ReklatsMasters/node-process-list/blob/master/binding.gyp)
- * [node-nanomsg](https://github.com/nickdesaulniers/node-nanomsg/blob/master/binding.gyp)
- * [Ghostscript4JS](https://github.com/NickNaso/ghostscript4js/blob/master/binding.gyp)
- * [nodecv](https://github.com/xudafeng/nodecv/blob/master/binding.gyp)
- * [magick-cli](https://github.com/NickNaso/magick-cli/blob/master/binding.gyp)
- * [sharp](https://github.com/lovell/sharp/blob/master/binding.gyp)
- * [krb5](https://github.com/adaltas/node-krb5/blob/master/binding.gyp)
- * [node-heapdump](https://github.com/bnoordhuis/node-heapdump/blob/master/binding.gyp)
diff --git a/deps/npm/node_modules/node-gyp/gyp/.flake8 b/deps/npm/node_modules/node-gyp/gyp/.flake8
deleted file mode 100644
index ea0c7680ef87b2..00000000000000
--- a/deps/npm/node_modules/node-gyp/gyp/.flake8
+++ /dev/null
@@ -1,4 +0,0 @@
-[flake8]
-max-complexity = 101
-max-line-length = 88
-extend-ignore = E203 # whitespace before ':' to agree with psf/black
diff --git a/deps/npm/node_modules/node-gyp/gyp/.github/workflows/Python_tests.yml b/deps/npm/node_modules/node-gyp/gyp/.github/workflows/Python_tests.yml
deleted file mode 100644
index aad135027ce8fc..00000000000000
--- a/deps/npm/node_modules/node-gyp/gyp/.github/workflows/Python_tests.yml
+++ /dev/null
@@ -1,36 +0,0 @@
-# TODO: Enable os: windows-latest
-# TODO: Enable pytest --doctest-modules
-
-name: Python_tests
-on:
- push:
- branches: [ main ]
- pull_request:
- branches: [ main ]
- workflow_dispatch:
-jobs:
- Python_tests:
- runs-on: ${{ matrix.os }}
- strategy:
- fail-fast: false
- max-parallel: 8
- matrix:
- os: [macos-latest, ubuntu-latest] # , windows-latest]
- python-version: ["3.7", "3.8", "3.9", "3.10", "3.11-dev"]
- steps:
- - uses: actions/checkout@v3
- - name: Set up Python ${{ matrix.python-version }}
- uses: actions/setup-python@v4
- with:
- python-version: ${{ matrix.python-version }}
- - name: Install dependencies
- run: |
- python -m pip install --upgrade pip setuptools
- pip install --editable ".[dev]"
- - run: ./gyp -V && ./gyp --version && gyp -V && gyp --version
- - name: Lint with flake8
- run: flake8 . --ignore=E203,W503 --max-complexity=101 --max-line-length=88 --show-source --statistics
- - name: Test with pytest
- run: pytest
- # - name: Run doctests with pytest
- # run: pytest --doctest-modules
diff --git a/deps/npm/node_modules/node-gyp/gyp/.github/workflows/node-gyp.yml b/deps/npm/node_modules/node-gyp/gyp/.github/workflows/node-gyp.yml
deleted file mode 100644
index 7cc1f9e0754365..00000000000000
--- a/deps/npm/node_modules/node-gyp/gyp/.github/workflows/node-gyp.yml
+++ /dev/null
@@ -1,45 +0,0 @@
-name: node-gyp integration
-on:
- push:
- branches: [ main ]
- pull_request:
- branches: [ main ]
- workflow_dispatch:
-jobs:
- integration:
- strategy:
- fail-fast: false
- matrix:
- os: [macos-latest, ubuntu-latest, windows-latest]
- python: ["3.7", "3.10"]
-
- runs-on: ${{ matrix.os }}
- steps:
- - name: Clone gyp-next
- uses: actions/checkout@v3
- with:
- path: gyp-next
- - name: Clone nodejs/node-gyp
- uses: actions/checkout@v3
- with:
- repository: nodejs/node-gyp
- path: node-gyp
- - uses: actions/setup-node@v3
- with:
- node-version: 14.x
- - uses: actions/setup-python@v4
- with:
- python-version: ${{ matrix.python }}
- - name: Install dependencies
- run: |
- cd node-gyp
- npm install --no-progress
- - name: Replace gyp in node-gyp
- shell: bash
- run: |
- rm -rf node-gyp/gyp
- cp -r gyp-next node-gyp/gyp
- - name: Run tests
- run: |
- cd node-gyp
- npm test
diff --git a/deps/npm/node_modules/node-gyp/gyp/.github/workflows/nodejs-windows.yml b/deps/npm/node_modules/node-gyp/gyp/.github/workflows/nodejs-windows.yml
deleted file mode 100644
index 4e6c9548ff5c59..00000000000000
--- a/deps/npm/node_modules/node-gyp/gyp/.github/workflows/nodejs-windows.yml
+++ /dev/null
@@ -1,32 +0,0 @@
-name: Node.js Windows integration
-
-on:
- push:
- branches: [ main ]
- pull_request:
- branches: [ main ]
- workflow_dispatch:
-
-jobs:
- build-windows:
- runs-on: windows-2019
- steps:
- - name: Clone gyp-next
- uses: actions/checkout@v3
- with:
- path: gyp-next
- - name: Clone nodejs/node
- uses: actions/checkout@v3
- with:
- repository: nodejs/node
- path: node
- - name: Install deps
- run: choco install nasm
- - name: Replace gyp in Node.js
- run: |
- rm -Recurse node/tools/gyp
- cp -Recurse gyp-next node/tools/gyp
- - name: Build Node.js
- run: |
- cd node
- ./vcbuild.bat
diff --git a/deps/npm/node_modules/node-gyp/gyp/.github/workflows/release-please.yml b/deps/npm/node_modules/node-gyp/gyp/.github/workflows/release-please.yml
deleted file mode 100644
index 665c4c48fed210..00000000000000
--- a/deps/npm/node_modules/node-gyp/gyp/.github/workflows/release-please.yml
+++ /dev/null
@@ -1,16 +0,0 @@
-on:
- push:
- branches:
- - main
-
-name: release-please
-jobs:
- release-please:
- runs-on: ubuntu-latest
- steps:
- - uses: google-github-actions/release-please-action@v3
- with:
- token: ${{ secrets.GITHUB_TOKEN }}
- release-type: python
- package-name: gyp-next
- bump-minor-pre-major: true
diff --git a/deps/npm/node_modules/node-gyp/gyp/AUTHORS b/deps/npm/node_modules/node-gyp/gyp/AUTHORS
deleted file mode 100644
index f49a357b9ed104..00000000000000
--- a/deps/npm/node_modules/node-gyp/gyp/AUTHORS
+++ /dev/null
@@ -1,16 +0,0 @@
-# Names should be added to this file like so:
-# Name or Organization
-
-Google Inc. <*@google.com>
-Bloomberg Finance L.P. <*@bloomberg.net>
-IBM Inc. <*@*.ibm.com>
-Yandex LLC <*@yandex-team.ru>
-
-Steven Knight
-Ryan Norton
-David J. Sankel
-Eric N. Vander Weele
-Tom Freudenberg
-Julien Brianceau
-Refael Ackermann
-Ujjwal Sharma
diff --git a/deps/npm/node_modules/node-gyp/gyp/CHANGELOG.md b/deps/npm/node_modules/node-gyp/gyp/CHANGELOG.md
deleted file mode 100644
index 4b4968f6a4ca8e..00000000000000
--- a/deps/npm/node_modules/node-gyp/gyp/CHANGELOG.md
+++ /dev/null
@@ -1,233 +0,0 @@
-# Changelog
-
-## [0.14.0](https://github.com/nodejs/gyp-next/compare/v0.13.0...v0.14.0) (2022-10-08)
-
-
-### Features
-
-* Add command line argument for `gyp --version` ([#164](https://github.com/nodejs/gyp-next/issues/164)) ([5c9f4d0](https://github.com/nodejs/gyp-next/commit/5c9f4d05678dd855e18ed2327219e5d18e5374db))
-* ninja build for iOS ([#174](https://github.com/nodejs/gyp-next/issues/174)) ([b6f2714](https://github.com/nodejs/gyp-next/commit/b6f271424e0033d7ed54d437706695af2ba7a1bf))
-* **zos:** support IBM Open XL C/C++ & PL/I compilers on z/OS ([#178](https://github.com/nodejs/gyp-next/issues/178)) ([43a7211](https://github.com/nodejs/gyp-next/commit/43a72110ae3fafb13c9625cc7a969624b27cda47))
-
-
-### Bug Fixes
-
-* lock windows env ([#163](https://github.com/nodejs/gyp-next/issues/163)) ([44bd0dd](https://github.com/nodejs/gyp-next/commit/44bd0ddc93ea0b5770a44dd326a2e4ae62c21442))
-* move configuration information into pyproject.toml ([#176](https://github.com/nodejs/gyp-next/issues/176)) ([d69d8ec](https://github.com/nodejs/gyp-next/commit/d69d8ece6dbff7af4f2ea073c9fd170baf8cb7f7))
-* node.js debugger adds stderr (but exit code is 0) -> shouldn't throw ([#179](https://github.com/nodejs/gyp-next/issues/179)) ([1a457d9](https://github.com/nodejs/gyp-next/commit/1a457d9ed08cfd30c9fa551bc5cf0d90fb583787))
-
-## [0.13.0](https://www.github.com/nodejs/gyp-next/compare/v0.12.1...v0.13.0) (2022-05-11)
-
-
-### Features
-
-* add PRODUCT_DIR_ABS variable ([#151](https://www.github.com/nodejs/gyp-next/issues/151)) ([80d2626](https://www.github.com/nodejs/gyp-next/commit/80d26263581db829b61b312a7bdb5cc791df7824))
-
-
-### Bug Fixes
-
-* execvp: printf: Argument list too long ([#147](https://www.github.com/nodejs/gyp-next/issues/147)) ([c4e14f3](https://www.github.com/nodejs/gyp-next/commit/c4e14f301673fadbac3ab7882d0b5f4d02530cb9))
-
-### [0.12.1](https://www.github.com/nodejs/gyp-next/compare/v0.12.0...v0.12.1) (2022-04-06)
-
-
-### Bug Fixes
-
-* **msvs:** avoid fixing path for arguments with "=" ([#143](https://www.github.com/nodejs/gyp-next/issues/143)) ([7e8f16e](https://www.github.com/nodejs/gyp-next/commit/7e8f16eb165e042e64bec98fa6c2a0232a42c26b))
-
-## [0.12.0](https://www.github.com/nodejs/gyp-next/compare/v0.11.0...v0.12.0) (2022-04-04)
-
-
-### Features
-
-* support building shared libraries on z/OS ([#137](https://www.github.com/nodejs/gyp-next/issues/137)) ([293bcfa](https://www.github.com/nodejs/gyp-next/commit/293bcfa4c25c6adb743377adafc45a80fee492c6))
-
-## [0.11.0](https://www.github.com/nodejs/gyp-next/compare/v0.10.1...v0.11.0) (2022-03-04)
-
-
-### Features
-
-* Add proper support for IBM i ([#140](https://www.github.com/nodejs/gyp-next/issues/140)) ([fdda4a3](https://www.github.com/nodejs/gyp-next/commit/fdda4a3038b8a7042ad960ce7a223687c24a21b1))
-
-### [0.10.1](https://www.github.com/nodejs/gyp-next/compare/v0.10.0...v0.10.1) (2021-11-24)
-
-
-### Bug Fixes
-
-* **make:** only generate makefile for multiple toolsets if requested ([#133](https://www.github.com/nodejs/gyp-next/issues/133)) ([f463a77](https://www.github.com/nodejs/gyp-next/commit/f463a77705973289ea38fec1b244c922ac438e26))
-
-## [0.10.0](https://www.github.com/nodejs/gyp-next/compare/v0.9.6...v0.10.0) (2021-08-26)
-
-
-### Features
-
-* **msvs:** add support for Visual Studio 2022 ([#124](https://www.github.com/nodejs/gyp-next/issues/124)) ([4bd9215](https://www.github.com/nodejs/gyp-next/commit/4bd9215c44d300f06e916aec1d6327c22b78272d))
-
-### [0.9.6](https://www.github.com/nodejs/gyp-next/compare/v0.9.5...v0.9.6) (2021-08-23)
-
-
-### Bug Fixes
-
-* align flake8 test ([#122](https://www.github.com/nodejs/gyp-next/issues/122)) ([f1faa8d](https://www.github.com/nodejs/gyp-next/commit/f1faa8d3081e1a47e917ff910892f00dff16cf8a))
-* **msvs:** fix paths again in action command arguments ([#121](https://www.github.com/nodejs/gyp-next/issues/121)) ([7159dfb](https://www.github.com/nodejs/gyp-next/commit/7159dfbc5758c9ec717e215f2c36daf482c846a1))
-
-### [0.9.5](https://www.github.com/nodejs/gyp-next/compare/v0.9.4...v0.9.5) (2021-08-18)
-
-
-### Bug Fixes
-
-* add python 3.6 to node-gyp integration test ([3462d4c](https://www.github.com/nodejs/gyp-next/commit/3462d4ce3c31cce747513dc7ca9760c81d57c60e))
-* revert for windows compatibility ([d078e7d](https://www.github.com/nodejs/gyp-next/commit/d078e7d7ae080ddae243188f6415f940376a7368))
-* support msvs_quote_cmd in ninja generator ([#117](https://www.github.com/nodejs/gyp-next/issues/117)) ([46486ac](https://www.github.com/nodejs/gyp-next/commit/46486ac6e9329529d51061e006a5b39631e46729))
-
-### [0.9.4](https://www.github.com/nodejs/gyp-next/compare/v0.9.3...v0.9.4) (2021-08-09)
-
-
-### Bug Fixes
-
-* .S is an extension for asm file on Windows ([#115](https://www.github.com/nodejs/gyp-next/issues/115)) ([d2fad44](https://www.github.com/nodejs/gyp-next/commit/d2fad44ef3a79ca8900f1307060153ded57053fc))
-
-### [0.9.3](https://www.github.com/nodejs/gyp-next/compare/v0.9.2...v0.9.3) (2021-07-07)
-
-
-### Bug Fixes
-
-* build failure with ninja and Python 3 on Windows ([#113](https://www.github.com/nodejs/gyp-next/issues/113)) ([c172d10](https://www.github.com/nodejs/gyp-next/commit/c172d105deff5db4244e583942215918fa80dd3c))
-
-### [0.9.2](https://www.github.com/nodejs/gyp-next/compare/v0.9.1...v0.9.2) (2021-05-21)
-
-
-### Bug Fixes
-
-* add support of utf8 encoding ([#105](https://www.github.com/nodejs/gyp-next/issues/105)) ([4d0f93c](https://www.github.com/nodejs/gyp-next/commit/4d0f93c249286d1f0c0f665f5fe7346119f98cf1))
-
-### [0.9.1](https://www.github.com/nodejs/gyp-next/compare/v0.9.0...v0.9.1) (2021-05-14)
-
-
-### Bug Fixes
-
-* py lint ([3b6a8ee](https://www.github.com/nodejs/gyp-next/commit/3b6a8ee7a66193a8a6867eba9e1d2b70bdf04402))
-
-## [0.9.0](https://www.github.com/nodejs/gyp-next/compare/v0.8.1...v0.9.0) (2021-05-13)
-
-
-### Features
-
-* use LDFLAGS_host for host toolset ([#98](https://www.github.com/nodejs/gyp-next/issues/98)) ([bea5c7b](https://www.github.com/nodejs/gyp-next/commit/bea5c7bd67d6ad32acbdce79767a5481c70675a2))
-
-
-### Bug Fixes
-
-* msvs.py: remove overindentation ([#102](https://www.github.com/nodejs/gyp-next/issues/102)) ([3f83e99](https://www.github.com/nodejs/gyp-next/commit/3f83e99056d004d9579ceb786e06b624ddc36529))
-* update gyp.el to change case to cl-case ([#93](https://www.github.com/nodejs/gyp-next/issues/93)) ([13d5b66](https://www.github.com/nodejs/gyp-next/commit/13d5b66aab35985af9c2fb1174fdc6e1c1407ecc))
-
-### [0.8.1](https://www.github.com/nodejs/gyp-next/compare/v0.8.0...v0.8.1) (2021-02-18)
-
-
-### Bug Fixes
-
-* update shebang lines from python to python3 ([#94](https://www.github.com/nodejs/gyp-next/issues/94)) ([a1b0d41](https://www.github.com/nodejs/gyp-next/commit/a1b0d4171a8049a4ab7a614202063dec332f2df4))
-
-## [0.8.0](https://www.github.com/nodejs/gyp-next/compare/v0.7.0...v0.8.0) (2021-01-15)
-
-
-### ⚠ BREAKING CHANGES
-
-* remove support for Python 2
-
-### Bug Fixes
-
-* revert posix build job ([#86](https://www.github.com/nodejs/gyp-next/issues/86)) ([39dc34f](https://www.github.com/nodejs/gyp-next/commit/39dc34f0799c074624005fb9bbccf6e028607f9d))
-
-
-### gyp
-
-* Remove support for Python 2 ([#88](https://www.github.com/nodejs/gyp-next/issues/88)) ([22e4654](https://www.github.com/nodejs/gyp-next/commit/22e465426fd892403c95534229af819a99c3f8dc))
-
-## [0.7.0](https://www.github.com/nodejs/gyp-next/compare/v0.6.2...v0.7.0) (2020-12-17)
-
-
-### ⚠ BREAKING CHANGES
-
-* **msvs:** On Windows, arguments passed to the "action" commands are no longer transformed to replace slashes with backslashes.
-
-### Features
-
-* **xcode:** --cross-compiling overrides arch-specific settings ([973bae0](https://www.github.com/nodejs/gyp-next/commit/973bae0b7b08be7b680ecae9565fbd04b3e0787d))
-
-
-### Bug Fixes
-
-* **msvs:** do not fix paths in action command arguments ([fc22f83](https://www.github.com/nodejs/gyp-next/commit/fc22f8335e2016da4aae4f4233074bd651d2faea))
-* cmake on python 3 ([fd61f5f](https://www.github.com/nodejs/gyp-next/commit/fd61f5faa5275ec8fc98e3c7868c0dd46f109540))
-* ValueError: invalid mode: 'rU' while trying to load binding.gyp ([d0504e6](https://www.github.com/nodejs/gyp-next/commit/d0504e6700ce48f44957a4d5891b142a60be946f))
-* xcode cmake parsing ([eefe8d1](https://www.github.com/nodejs/gyp-next/commit/eefe8d10e99863bc4ac7e2ed32facd608d400d4b))
-
-### [0.6.2](https://www.github.com/nodejs/gyp-next/compare/v0.6.1...v0.6.2) (2020-10-16)
-
-
-### Bug Fixes
-
-* do not rewrite absolute paths to avoid long paths ([#74](https://www.github.com/nodejs/gyp-next/issues/74)) ([c2ccc1a](https://www.github.com/nodejs/gyp-next/commit/c2ccc1a81f7f94433a94f4d01a2e820db4c4331a))
-* only include MARMASM when toolset is target ([5a2794a](https://www.github.com/nodejs/gyp-next/commit/5a2794aefb58f0c00404ff042b61740bc8b8d5cd))
-
-### [0.6.1](https://github.com/nodejs/gyp-next/compare/v0.6.0...v0.6.1) (2020-10-14)
-
-
-### Bug Fixes
-
-* Correctly rename object files for absolute paths in MSVS generator.
-
-## [0.6.0](https://github.com/nodejs/gyp-next/compare/v0.5.0...v0.6.0) (2020-10-13)
-
-
-### Features
-
-* The Makefile generator will now output shared libraries directly to the product directory on all platforms (previously only macOS).
-
-## [0.5.0](https://github.com/nodejs/gyp-next/compare/v0.4.0...v0.5.0) (2020-09-30)
-
-
-### Features
-
-* Extended compile_commands_json generator to consider more file extensions than just `c` and `cc`. `cpp` and `cxx` are now supported.
-* Source files with duplicate basenames are now supported.
-
-### Removed
-
-* The `--no-duplicate-basename-check` option was removed.
-* The `msvs_enable_marmasm` configuration option was removed in favor of auto-inclusion of the "marmasm" sections for Windows on ARM.
-
-## [0.4.0](https://github.com/nodejs/gyp-next/compare/v0.3.0...v0.4.0) (2020-07-14)
-
-
-### Features
-
-* Added support for passing arbitrary architectures to Xcode builds, enables `arm64` builds.
-
-### Bug Fixes
-
-* Fixed a bug on Solaris where copying archives failed.
-
-## [0.3.0](https://github.com/nodejs/gyp-next/compare/v0.2.1...v0.3.0) (2020-06-06)
-
-
-### Features
-
-* Added support for MSVC cross-compilation. This allows compilation on x64 for a Windows ARM target.
-
-### Bug Fixes
-
-* Fixed XCode CLT version detection on macOS Catalina.
-
-### [0.2.1](https://github.com/nodejs/gyp-next/compare/v0.2.0...v0.2.1) (2020-05-05)
-
-
-### Bug Fixes
-
-* Relicensed to Node.js contributors.
-* Fixed Windows bug introduced in v0.2.0.
-
-## [0.2.0](https://github.com/nodejs/gyp-next/releases/tag/v0.2.0) (2020-04-06)
-
-This is the first release of this project, based on https://chromium.googlesource.com/external/gyp with changes made over the years in Node.js and node-gyp.
diff --git a/deps/npm/node_modules/node-gyp/gyp/CODE_OF_CONDUCT.md b/deps/npm/node_modules/node-gyp/gyp/CODE_OF_CONDUCT.md
deleted file mode 100644
index d724027fd9aadb..00000000000000
--- a/deps/npm/node_modules/node-gyp/gyp/CODE_OF_CONDUCT.md
+++ /dev/null
@@ -1,4 +0,0 @@
-# Code of Conduct
-
-* [Node.js Code of Conduct](https://github.com/nodejs/admin/blob/HEAD/CODE_OF_CONDUCT.md)
-* [Node.js Moderation Policy](https://github.com/nodejs/admin/blob/HEAD/Moderation-Policy.md)
diff --git a/deps/npm/node_modules/node-gyp/gyp/CONTRIBUTING.md b/deps/npm/node_modules/node-gyp/gyp/CONTRIBUTING.md
deleted file mode 100644
index 1a0bcde2b48d8e..00000000000000
--- a/deps/npm/node_modules/node-gyp/gyp/CONTRIBUTING.md
+++ /dev/null
@@ -1,32 +0,0 @@
-# Contributing to gyp-next
-
-## Code of Conduct
-
-This project is bound to the [Node.js Code of Conduct](https://github.com/nodejs/admin/blob/HEAD/CODE_OF_CONDUCT.md).
-
-
-## Developer's Certificate of Origin 1.1
-
-By making a contribution to this project, I certify that:
-
-* (a) The contribution was created in whole or in part by me and I
- have the right to submit it under the open source license
- indicated in the file; or
-
-* (b) The contribution is based upon previous work that, to the best
- of my knowledge, is covered under an appropriate open source
- license and I have the right under that license to submit that
- work with modifications, whether created in whole or in part
- by me, under the same open source license (unless I am
- permitted to submit under a different license), as indicated
- in the file; or
-
-* (c) The contribution was provided directly to me by some other
- person who certified (a), (b) or (c) and I have not modified
- it.
-
-* (d) I understand and agree that this project and the contribution
- are public and that a record of the contribution (including all
- personal information I submit with it, including my sign-off) is
- maintained indefinitely and may be redistributed consistent with
- this project or the open source license(s) involved.
diff --git a/deps/npm/node_modules/node-gyp/gyp/README.md b/deps/npm/node_modules/node-gyp/gyp/README.md
index 9ffc2b21e81b8b..be1d7b9ebf6611 100644
--- a/deps/npm/node_modules/node-gyp/gyp/README.md
+++ b/deps/npm/node_modules/node-gyp/gyp/README.md
@@ -5,3 +5,26 @@ Documents are available at [gyp.gsrc.io](https://gyp.gsrc.io), or you can check
__gyp-next__ is [released](https://github.com/nodejs/gyp-next/releases) to the [__Python Packaging Index__](https://pypi.org/project/gyp-next) (PyPI) and can be installed with the command:
* `python3 -m pip install gyp-next`
+
+When used as a command line utility, __gyp-next__ can also be installed with [pipx](https://pypa.github.io/pipx):
+* `pipx install gyp-next`
+```
+Installing to a new venv 'gyp-next'
+ installed package gyp-next 0.13.0, installed using Python 3.10.6
+ These apps are now globally available
+ - gyp
+done! ✨ 🌟 ✨
+```
+
+Or to run __gyp-next__ directly without installing it:
+* `pipx run gyp-next --help`
+```
+NOTE: running app 'gyp' from 'gyp-next'
+usage: usage: gyp [options ...] [build_file ...]
+
+options:
+ -h, --help show this help message and exit
+ --build CONFIGS configuration for build after project generation
+ --check check format of gyp files
+ [ ... ]
+```
diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSNew.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSNew.py
index d6b189760cef99..bc0e93d07f8900 100644
--- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSNew.py
+++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSNew.py
@@ -285,19 +285,17 @@ def Write(self, writer=gyp.common.WriteOnDiff):
"\tEndProjectSection\r\n"
)
- if isinstance(e, MSVSFolder):
- if e.items:
- f.write("\tProjectSection(SolutionItems) = preProject\r\n")
- for i in e.items:
- f.write(f"\t\t{i} = {i}\r\n")
- f.write("\tEndProjectSection\r\n")
-
- if isinstance(e, MSVSProject):
- if e.dependencies:
- f.write("\tProjectSection(ProjectDependencies) = postProject\r\n")
- for d in e.dependencies:
- f.write(f"\t\t{d.get_guid()} = {d.get_guid()}\r\n")
- f.write("\tEndProjectSection\r\n")
+ if isinstance(e, MSVSFolder) and e.items:
+ f.write("\tProjectSection(SolutionItems) = preProject\r\n")
+ for i in e.items:
+ f.write(f"\t\t{i} = {i}\r\n")
+ f.write("\tEndProjectSection\r\n")
+
+ if isinstance(e, MSVSProject) and e.dependencies:
+ f.write("\tProjectSection(ProjectDependencies) = postProject\r\n")
+ for d in e.dependencies:
+ f.write(f"\t\t{d.get_guid()} = {d.get_guid()}\r\n")
+ f.write("\tEndProjectSection\r\n")
f.write("EndProject\r\n")
@@ -353,7 +351,7 @@ def Write(self, writer=gyp.common.WriteOnDiff):
# Folder mappings
# Omit this section if there are no folders
- if any([e.entries for e in all_entries if isinstance(e, MSVSFolder)]):
+ if any(e.entries for e in all_entries if isinstance(e, MSVSFolder)):
f.write("\tGlobalSection(NestedProjects) = preSolution\r\n")
for e in all_entries:
if not isinstance(e, MSVSFolder):
diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSProject.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSProject.py
index f0cfabe8349099..629f3f61b4819d 100644
--- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSProject.py
+++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSProject.py
@@ -79,7 +79,7 @@ def __init__(self, project_path, version, name, guid=None, platforms=None):
self.files_section = ["Files"]
# Keep a dict keyed on filename to speed up access.
- self.files_dict = dict()
+ self.files_dict = {}
def AddToolFile(self, path):
"""Adds a tool file to the project.
diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings.py
index e89a971a3bb4fd..93633dbca133c7 100644
--- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings.py
+++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings.py
@@ -141,7 +141,7 @@ class _Boolean(_Type):
"""Boolean settings, can have the values 'false' or 'true'."""
def _Validate(self, value):
- if value != "true" and value != "false":
+ if value not in {"true", "false"}:
raise ValueError("expected bool; got %r" % value)
def ValidateMSVS(self, value):
diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py
index 2aa39d0318860f..d6cc01307d997c 100755
--- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py
+++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py
@@ -108,7 +108,9 @@ def Load(
if default_variables["GENERATOR"] == "ninja":
default_variables.setdefault(
"PRODUCT_DIR_ABS",
- os.path.join(output_dir, "out", default_variables["build_type"]),
+ os.path.join(
+ output_dir, "out", default_variables.get("build_type", "default")
+ ),
)
else:
default_variables.setdefault(
@@ -622,7 +624,7 @@ def gyp_main(args):
if options.generator_flags:
gen_flags += options.generator_flags
generator_flags = NameValueListToDict(gen_flags)
- if DEBUG_GENERAL in gyp.debug.keys():
+ if DEBUG_GENERAL in gyp.debug:
DebugOutput(DEBUG_GENERAL, "generator_flags: %s", generator_flags)
# Generate all requested formats (use a set in case we got one format request
diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/common.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/common.py
index d77adee8afd55d..b73a0c55b1e349 100644
--- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/common.py
+++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/common.py
@@ -144,20 +144,16 @@ def RelativePath(path, relative_to, follow_path_symlink=True):
# symlink, this option has no effect.
# Convert to normalized (and therefore absolute paths).
- if follow_path_symlink:
- path = os.path.realpath(path)
- else:
- path = os.path.abspath(path)
+ path = os.path.realpath(path) if follow_path_symlink else os.path.abspath(path)
relative_to = os.path.realpath(relative_to)
# On Windows, we can't create a relative path to a different drive, so just
# use the absolute path.
- if sys.platform == "win32":
- if (
- os.path.splitdrive(path)[0].lower()
- != os.path.splitdrive(relative_to)[0].lower()
- ):
- return path
+ if sys.platform == "win32" and (
+ os.path.splitdrive(path)[0].lower()
+ != os.path.splitdrive(relative_to)[0].lower()
+ ):
+ return path
# Split the paths into components.
path_split = path.split(os.path.sep)
@@ -277,10 +273,7 @@ def EncodePOSIXShellArgument(argument):
if not isinstance(argument, str):
argument = str(argument)
- if _quote.search(argument):
- quote = '"'
- else:
- quote = ""
+ quote = '"' if _quote.search(argument) else ""
encoded = quote + re.sub(_escape, r"\\\1", argument) + quote
diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/easy_xml.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/easy_xml.py
index bda1a47468ae2b..02567b251446d7 100644
--- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/easy_xml.py
+++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/easy_xml.py
@@ -121,7 +121,11 @@ def WriteXmlIfChanged(content, path, encoding="utf-8", pretty=False,
if win32 and os.linesep != "\r\n":
xml_string = xml_string.replace("\n", "\r\n")
- default_encoding = locale.getdefaultlocale()[1]
+ try: # getdefaultlocale() was removed in Python 3.11
+ default_encoding = locale.getdefaultlocale()[1]
+ except AttributeError:
+ default_encoding = locale.getencoding()
+
if default_encoding and default_encoding.upper() != encoding.upper():
xml_string = xml_string.encode(encoding)
diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/easy_xml_test.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/easy_xml_test.py
index 342f693a329d26..2d9b15210dc126 100755
--- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/easy_xml_test.py
+++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/easy_xml_test.py
@@ -76,6 +76,8 @@ def test_EasyXml_complex(self):
'\'Debug|Win32\'" Label="Configuration">'
"Application "
"Unicode "
+ "SpectreLoadCF "
+ "14.36.32532 "
""
""
)
@@ -99,6 +101,8 @@ def test_EasyXml_complex(self):
},
["ConfigurationType", "Application"],
["CharacterSet", "Unicode"],
+ ["SpectreMitigation", "SpectreLoadCF"],
+ ["VCToolsVersion", "14.36.32532"],
],
]
)
diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/analyzer.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/analyzer.py
index f15df00c36373e..1334f2fca9967c 100644
--- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/analyzer.py
+++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/analyzer.py
@@ -379,7 +379,7 @@ def _GenerateTargets(data, target_list, target_dicts, toplevel_dir, files, build
target.is_executable = target_type == "executable"
target.is_static_library = target_type == "static_library"
target.is_or_has_linked_ancestor = (
- target_type == "executable" or target_type == "shared_library"
+ target_type in {"executable", "shared_library"}
)
build_file = gyp.common.ParseQualifiedTarget(target_name)[0]
@@ -433,14 +433,14 @@ def _GetUnqualifiedToTargetMapping(all_targets, to_find):
if not to_find:
return {}, []
to_find = set(to_find)
- for target_name in all_targets.keys():
+ for target_name in all_targets:
extracted = gyp.common.ParseQualifiedTarget(target_name)
if len(extracted) > 1 and extracted[1] in to_find:
to_find.remove(extracted[1])
result[extracted[1]] = all_targets[target_name]
if not to_find:
return result, []
- return result, [x for x in to_find]
+ return result, list(to_find)
def _DoesTargetDependOnMatchingTargets(target):
@@ -451,8 +451,8 @@ def _DoesTargetDependOnMatchingTargets(target):
if target.match_status == MATCH_STATUS_DOESNT_MATCH:
return False
if (
- target.match_status == MATCH_STATUS_MATCHES
- or target.match_status == MATCH_STATUS_MATCHES_BY_DEPENDENCY
+ target.match_status in {MATCH_STATUS_MATCHES,
+ MATCH_STATUS_MATCHES_BY_DEPENDENCY}
):
return True
for dep in target.deps:
@@ -683,11 +683,9 @@ def find_matching_test_target_names(self):
)
test_target_names_contains_all = "all" in self._test_target_names
if test_target_names_contains_all:
- test_targets = [
- x for x in (set(test_targets_no_all) | set(self._root_targets))
- ]
+ test_targets = list(set(test_targets_no_all) | set(self._root_targets))
else:
- test_targets = [x for x in test_targets_no_all]
+ test_targets = list(test_targets_no_all)
print("supplied test_targets")
for target_name in self._test_target_names:
print("\t", target_name)
@@ -702,9 +700,9 @@ def find_matching_test_target_names(self):
if matching_test_targets_contains_all:
# Remove any of the targets for all that were not explicitly supplied,
# 'all' is subsequentely added to the matching names below.
- matching_test_targets = [
- x for x in (set(matching_test_targets) & set(test_targets_no_all))
- ]
+ matching_test_targets = list(
+ set(matching_test_targets) & set(test_targets_no_all)
+ )
print("matched test_targets")
for target in matching_test_targets:
print("\t", target.name)
@@ -729,9 +727,7 @@ def find_matching_compile_target_names(self):
self._supplied_target_names_no_all(), self._unqualified_mapping
)
if "all" in self._supplied_target_names():
- supplied_targets = [
- x for x in (set(supplied_targets) | set(self._root_targets))
- ]
+ supplied_targets = list(set(supplied_targets) | set(self._root_targets))
print("Supplied test_targets & compile_targets")
for target in supplied_targets:
print("\t", target.name)
diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/android.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/android.py
index cdf1a4832cf1ad..d3c97c666db077 100644
--- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/android.py
+++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/android.py
@@ -697,7 +697,7 @@ def ComputeOutputParts(self, spec):
target,
)
- if self.type != "static_library" and self.type != "shared_library":
+ if self.type not in {"static_library", "shared_library"}:
target_prefix = spec.get("product_prefix", target_prefix)
target = spec.get("product_name", target)
product_ext = spec.get("product_extension")
diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/cmake.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/cmake.py
index c95d18415cdb37..320a891aa8adc9 100644
--- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/cmake.py
+++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/cmake.py
@@ -103,7 +103,7 @@ def NormjoinPathForceCMakeSource(base_path, rel_path):
"""
if os.path.isabs(rel_path):
return rel_path
- if any([rel_path.startswith(var) for var in FULL_PATH_VARS]):
+ if any(rel_path.startswith(var) for var in FULL_PATH_VARS):
return rel_path
# TODO: do we need to check base_path for absolute variables as well?
return os.path.join(
@@ -328,7 +328,7 @@ def WriteActions(target_name, actions, extra_sources, extra_deps, path_to_gyp, o
def NormjoinRulePathForceCMakeSource(base_path, rel_path, rule_source):
if rel_path.startswith(("${RULE_INPUT_PATH}", "${RULE_INPUT_DIRNAME}")):
- if any([rule_source.startswith(var) for var in FULL_PATH_VARS]):
+ if any(rule_source.startswith(var) for var in FULL_PATH_VARS):
return rel_path
return NormjoinPathForceCMakeSource(base_path, rel_path)
@@ -929,10 +929,7 @@ def WriteTarget(
product_prefix = spec.get("product_prefix", default_product_prefix)
product_name = spec.get("product_name", default_product_name)
product_ext = spec.get("product_extension")
- if product_ext:
- product_ext = "." + product_ext
- else:
- product_ext = default_product_ext
+ product_ext = "." + product_ext if product_ext else default_product_ext
SetTargetProperty(output, cmake_target_name, "PREFIX", product_prefix)
SetTargetProperty(
diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/compile_commands_json.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/compile_commands_json.py
index f330a04dea4c53..0ffa3bb5980fe9 100644
--- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/compile_commands_json.py
+++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/compile_commands_json.py
@@ -34,7 +34,7 @@
def IsMac(params):
- return "mac" == gyp.common.GetFlavor(params)
+ return gyp.common.GetFlavor(params) == "mac"
def CalculateVariables(default_variables, params):
@@ -93,7 +93,7 @@ def resolve(filename):
gyp.common.EncodePOSIXShellArgument(file),
)
)
- commands.append(dict(command=command, directory=output_dir, file=file))
+ commands.append({"command": command, "directory": output_dir, "file": file})
def GenerateOutput(target_list, target_dicts, data, params):
@@ -108,7 +108,10 @@ def GenerateOutput(target_list, target_dicts, data, params):
cwd = os.path.dirname(build_file)
AddCommandsForTarget(cwd, target, params, per_config_commands)
- output_dir = params["generator_flags"].get("output_dir", "out")
+ try:
+ output_dir = params["options"].generator_output
+ except (AttributeError, KeyError):
+ output_dir = params["generator_flags"].get("output_dir", "out")
for configuration_name, commands in per_config_commands.items():
filename = os.path.join(output_dir, configuration_name, "compile_commands.json")
gyp.common.EnsureDirExists(filename)
diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/eclipse.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/eclipse.py
index a851b4db757eda..52aeae6050990b 100644
--- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/eclipse.py
+++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/eclipse.py
@@ -248,10 +248,7 @@ def GetAllDefines(target_list, target_dicts, data, config_name, params, compiler
continue
cpp_line_parts = cpp_line.split(" ", 2)
key = cpp_line_parts[1]
- if len(cpp_line_parts) >= 3:
- val = cpp_line_parts[2]
- else:
- val = "1"
+ val = cpp_line_parts[2] if len(cpp_line_parts) >= 3 else "1"
all_defines[key] = val
return all_defines
diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py
index f1d01a629d435f..1b9974948e4de5 100644
--- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py
+++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py
@@ -681,10 +681,7 @@ def WriteRootHeaderSuffixRules(writer):
def Compilable(filename):
"""Return true if the file is compilable (should be in OBJS)."""
- for res in (filename.endswith(e) for e in COMPILABLE_EXTENSIONS):
- if res:
- return True
- return False
+ return any(res for res in (filename.endswith(e) for e in COMPILABLE_EXTENSIONS))
def Linkable(filename):
@@ -778,7 +775,7 @@ def __init__(self, generator_flags, flavor):
self.suffix_rules_objdir2 = {}
# Generate suffix rules for all compilable extensions.
- for ext in COMPILABLE_EXTENSIONS.keys():
+ for ext in COMPILABLE_EXTENSIONS:
# Suffix rules for source folder.
self.suffix_rules_srcdir.update(
{
@@ -1066,7 +1063,7 @@ def WriteActions(
# libraries, but until everything is made cross-compile safe, also use
# target libraries.
# TODO(piman): when everything is cross-compile safe, remove lib.target
- if self.flavor == "zos" or self.flavor == "aix":
+ if self.flavor in {"zos", "aix"}:
self.WriteLn(
"cmd_%s = LIBPATH=$(builddir)/lib.host:"
"$(builddir)/lib.target:$$LIBPATH; "
@@ -1992,10 +1989,7 @@ def WriteTarget(
and self.toolset == "target"
):
# On mac, products are created in install_path immediately.
- assert install_path == self.output, "{} != {}".format(
- install_path,
- self.output,
- )
+ assert install_path == self.output, f"{install_path} != {self.output}"
# Point the target alias to the final binary output.
self.WriteMakeRule(
@@ -2034,7 +2028,7 @@ def WriteTarget(
installable_deps.append(
self.GetUnversionedSidedeckFromSidedeck(install_path)
)
- if self.output != self.alias and self.alias != self.target:
+ if self.alias not in (self.output, self.target):
self.WriteMakeRule(
[self.alias],
installable_deps,
diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs.py
index fd950057847980..13b0794b4dccc3 100644
--- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs.py
+++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs.py
@@ -164,7 +164,7 @@ def _FixPath(path, separator="\\"):
fixpath_prefix
and path
and not os.path.isabs(path)
- and not path[0] == "$"
+ and path[0] != "$"
and not _IsWindowsAbsPath(path)
):
path = os.path.join(fixpath_prefix, path)
@@ -281,9 +281,9 @@ def _ToolSetOrAppend(tools, tool_name, setting, value, only_if_unset=False):
else:
value = [i.replace("/", "\\") for i in value]
if not tools.get(tool_name):
- tools[tool_name] = dict()
+ tools[tool_name] = {}
tool = tools[tool_name]
- if "CompileAsWinRT" == setting:
+ if setting == "CompileAsWinRT":
return
if tool.get(setting):
if only_if_unset:
@@ -412,10 +412,7 @@ def _BuildCommandLineForRuleRaw(
return input_dir_preamble + cmd
else:
# Convert cat --> type to mimic unix.
- if cmd[0] == "cat":
- command = ["type"]
- else:
- command = [cmd[0].replace("/", "\\")]
+ command = ["type"] if cmd[0] == "cat" else [cmd[0].replace("/", "\\")]
# Add call before command to ensure that commands can be tied together one
# after the other without aborting in Incredibuild, since IB makes a bat
# file out of the raw command string, and some commands (like python) are
@@ -438,6 +435,7 @@ def _BuildCommandLineForRuleRaw(
# Support a mode for using cmd directly.
# Convert any paths to native form (first element is used directly).
# TODO(quote): regularize quoting path names throughout the module
+ command[1] = '"%s"' % command[1]
arguments = ['"%s"' % i for i in arguments]
# Collapse into a single command.
return input_dir_preamble + " ".join(command + arguments)
@@ -687,7 +685,7 @@ def _GenerateExternalRules(rules, output_dir, spec, sources, options, actions_to
all_outputs.update(OrderedSet(outputs))
# Only use one target from each rule as the dependency for
# 'all' so we don't try to build each rule multiple times.
- first_outputs.append(list(outputs)[0])
+ first_outputs.append(next(iter(outputs)))
# Get the unique output directories for this rule.
output_dirs = [os.path.split(i)[0] for i in outputs]
for od in output_dirs:
@@ -756,7 +754,7 @@ def _EscapeEnvironmentVariableExpansion(s):
Returns:
The escaped string.
- """ # noqa: E731,E123,E501
+ """
s = s.replace("%", "%%")
return s
@@ -1189,7 +1187,7 @@ def _AddConfigurationToMSVSProject(p, spec, config_type, config_name, config):
precompiled_header = config.get("msvs_precompiled_header")
# Prepare the list of tools as a dictionary.
- tools = dict()
+ tools = {}
# Add in user specified msvs_settings.
msvs_settings = config.get("msvs_settings", {})
MSVSSettings.ValidateMSVSSettings(msvs_settings)
@@ -1384,10 +1382,7 @@ def _GetDefines(config):
"""
defines = []
for d in config.get("defines", []):
- if type(d) == list:
- fd = "=".join([str(dpart) for dpart in d])
- else:
- fd = str(d)
+ fd = "=".join([str(dpart) for dpart in d]) if isinstance(d, list) else str(d)
defines.append(fd)
return defines
@@ -1578,10 +1573,10 @@ def _AdjustSourcesAndConvertToFilterHierarchy(
# such as ../../src/modules/module1 etc.
if version.UsesVcxproj():
while (
- all([isinstance(s, MSVSProject.Filter) for s in sources])
+ all(isinstance(s, MSVSProject.Filter) for s in sources)
and len({s.name for s in sources}) == 1
):
- assert all([len(s.contents) == 1 for s in sources])
+ assert all(len(s.contents) == 1 for s in sources)
sources = [s.contents[0] for s in sources]
else:
while len(sources) == 1 and isinstance(sources[0], MSVSProject.Filter):
@@ -1598,10 +1593,7 @@ def _IdlFilesHandledNonNatively(spec, sources):
if rule["extension"] == "idl" and int(rule.get("msvs_external_rule", 0)):
using_idl = True
break
- if using_idl:
- excluded_idl = [i for i in sources if i.endswith(".idl")]
- else:
- excluded_idl = []
+ excluded_idl = [i for i in sources if i.endswith(".idl")] if using_idl else []
return excluded_idl
@@ -1819,7 +1811,7 @@ def _GetPathDict(root, path):
parent, folder = os.path.split(path)
parent_dict = _GetPathDict(root, parent)
if folder not in parent_dict:
- parent_dict[folder] = dict()
+ parent_dict[folder] = {}
return parent_dict[folder]
@@ -3013,18 +3005,26 @@ def _GetMSBuildConfigurationDetails(spec, build_file):
msbuild_attributes = _GetMSBuildAttributes(spec, settings, build_file)
condition = _GetConfigurationCondition(name, settings, spec)
character_set = msbuild_attributes.get("CharacterSet")
+ vctools_version = msbuild_attributes.get("VCToolsVersion")
config_type = msbuild_attributes.get("ConfigurationType")
_AddConditionalProperty(properties, condition, "ConfigurationType", config_type)
+ spectre_mitigation = msbuild_attributes.get('SpectreMitigation')
+ if spectre_mitigation:
+ _AddConditionalProperty(properties, condition, "SpectreMitigation",
+ spectre_mitigation)
if config_type == "Driver":
_AddConditionalProperty(properties, condition, "DriverType", "WDM")
_AddConditionalProperty(
properties, condition, "TargetVersion", _ConfigTargetVersion(settings)
)
- if character_set:
- if "msvs_enable_winrt" not in spec:
- _AddConditionalProperty(
- properties, condition, "CharacterSet", character_set
- )
+ if character_set and "msvs_enable_winrt" not in spec:
+ _AddConditionalProperty(
+ properties, condition, "CharacterSet", character_set
+ )
+ if vctools_version and "msvs_enable_winrt" not in spec:
+ _AddConditionalProperty(
+ properties, condition, "VCToolsVersion", vctools_version
+ )
return _GetMSBuildPropertyGroup(spec, "Configuration", properties)
@@ -3104,6 +3104,10 @@ def _ConvertMSVSBuildAttributes(spec, config, build_file):
msbuild_attributes[a] = _ConvertMSVSCharacterSet(msvs_attributes[a])
elif a == "ConfigurationType":
msbuild_attributes[a] = _ConvertMSVSConfigurationType(msvs_attributes[a])
+ elif a == "SpectreMitigation":
+ msbuild_attributes[a] = msvs_attributes[a]
+ elif a == "VCToolsVersion":
+ msbuild_attributes[a] = msvs_attributes[a]
else:
print("Warning: Do not know how to convert MSVS attribute " + a)
return msbuild_attributes
@@ -3326,15 +3330,14 @@ def _GetMSBuildToolSettingsSections(spec, configurations):
for tool_name, tool_settings in sorted(msbuild_settings.items()):
# Skip the tool named '' which is a holder of global settings handled
# by _GetMSBuildConfigurationGlobalProperties.
- if tool_name:
- if tool_settings:
- tool = [tool_name]
- for name, value in sorted(tool_settings.items()):
- formatted_value = _GetValueFormattedForMSBuild(
- tool_name, name, value
- )
- tool.append([name, formatted_value])
- group.append(tool)
+ if tool_name and tool_settings:
+ tool = [tool_name]
+ for name, value in sorted(tool_settings.items()):
+ formatted_value = _GetValueFormattedForMSBuild(
+ tool_name, name, value
+ )
+ tool.append([name, formatted_value])
+ group.append(tool)
groups.append(group)
return groups
@@ -3462,10 +3465,7 @@ def _GetValueFormattedForMSBuild(tool_name, name, value):
"Link": ["AdditionalOptions"],
"Lib": ["AdditionalOptions"],
}
- if tool_name in exceptions and name in exceptions[tool_name]:
- char = " "
- else:
- char = ";"
+ char = " " if name in exceptions.get(tool_name, []) else ";"
formatted_value = char.join(
[MSVSSettings.ConvertVCMacrosToMSBuild(i) for i in value]
)
diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja.py
index ca04ee13a1c1bf..8ba341e96d3f0d 100644
--- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja.py
+++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja.py
@@ -1815,10 +1815,7 @@ def ComputeOutputFileName(self, spec, type=None):
"executable": default_variables["EXECUTABLE_SUFFIX"],
}
extension = spec.get("product_extension")
- if extension:
- extension = "." + extension
- else:
- extension = DEFAULT_EXTENSION.get(type, "")
+ extension = "." + extension if extension else DEFAULT_EXTENSION.get(type, "")
if "product_name" in spec:
# If we were given an explicit name, use that.
@@ -2533,7 +2530,7 @@ def GenerateOutputForConfig(target_list, target_dicts, data, params, config_name
description="SOLINK $lib",
restat=True,
command=mtime_preserving_solink_base
- % {"suffix": "@$link_file_list"}, # noqa: E501
+ % {"suffix": "@$link_file_list"},
rspfile="$link_file_list",
rspfile_content=(
"-Wl,--whole-archive $in $solibs -Wl," "--no-whole-archive $libs"
diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode.py
index 2f4d17e514e439..1ac672c3876bd9 100644
--- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode.py
+++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode.py
@@ -439,7 +439,7 @@ def Finalize2(self, xcode_targets, xcode_target_to_target_dict):
# it opens the project file, which will result in unnecessary diffs.
# TODO(mark): This is evil because it relies on internal knowledge of
# PBXProject._other_pbxprojects.
- for other_pbxproject in self.project._other_pbxprojects.keys():
+ for other_pbxproject in self.project._other_pbxprojects:
self.project.AddOrGetProjectReference(other_pbxproject)
self.project.SortRemoteProductReferences()
@@ -1118,10 +1118,7 @@ def GenerateOutput(target_list, target_dicts, data, params):
for concrete_output_index, concrete_output in enumerate(
concrete_outputs
):
- if concrete_output_index == 0:
- bol = ""
- else:
- bol = " "
+ bol = "" if concrete_output_index == 0 else " "
makefile.write(f"{bol}{concrete_output} \\\n")
concrete_output_dir = posixpath.dirname(concrete_output)
diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py
index d9699a0a502183..8f39519dee51fb 100644
--- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py
+++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py
@@ -16,9 +16,9 @@
import sys
import threading
import traceback
-from distutils.version import StrictVersion
from gyp.common import GypError
from gyp.common import OrderedSet
+from packaging.version import Version
# A list of types that are treated as linkable.
linkable_types = [
@@ -225,7 +225,7 @@ def LoadOneBuildFile(build_file_path, data, aux_data, includes, is_target, check
return data[build_file_path]
if os.path.exists(build_file_path):
- build_file_contents = open(build_file_path, encoding='utf-8').read()
+ build_file_contents = open(build_file_path, encoding="utf-8").read()
else:
raise GypError(f"{build_file_path} not found (cwd: {os.getcwd()})")
@@ -870,10 +870,7 @@ def ExpandVariables(input, phase, variables, build_file):
# This works around actions/rules which have more inputs than will
# fit on the command line.
if file_list:
- if type(contents) is list:
- contents_list = contents
- else:
- contents_list = contents.split(" ")
+ contents_list = contents if type(contents) is list else contents.split(" ")
replacement = contents_list[0]
if os.path.isabs(replacement):
raise GypError('| cannot handle absolute paths, got "%s"' % replacement)
@@ -1183,7 +1180,7 @@ def EvalSingleCondition(cond_expr, true_dict, false_dict, phase, variables, buil
else:
ast_code = compile(cond_expr_expanded, "", "eval")
cached_conditions_asts[cond_expr_expanded] = ast_code
- env = {"__builtins__": {}, "v": StrictVersion}
+ env = {"__builtins__": {}, "v": Version}
if eval(ast_code, env, variables):
return true_dict
return false_dict
@@ -1579,14 +1576,12 @@ def ExpandWildcardDependencies(targets, data):
continue
dependency_target_name = dependency_target_dict["target_name"]
if (
- dependency_target != "*"
- and dependency_target != dependency_target_name
+ dependency_target not in {"*", dependency_target_name}
):
continue
dependency_target_toolset = dependency_target_dict["toolset"]
if (
- dependency_toolset != "*"
- and dependency_toolset != dependency_target_toolset
+ dependency_toolset not in {"*", dependency_target_toolset}
):
continue
dependency = gyp.common.QualifiedTarget(
@@ -1630,15 +1625,14 @@ def RemoveSelfDependencies(targets):
dependencies = target_dict.get(dependency_key, [])
if dependencies:
for t in dependencies:
- if t == target_name:
- if (
- targets[t]
- .get("variables", {})
- .get("prune_self_dependency", 0)
- ):
- target_dict[dependency_key] = Filter(
- dependencies, target_name
- )
+ if t == target_name and (
+ targets[t]
+ .get("variables", {})
+ .get("prune_self_dependency", 0)
+ ):
+ target_dict[dependency_key] = Filter(
+ dependencies, target_name
+ )
def RemoveLinkDependenciesFromNoneTargets(targets):
@@ -2238,10 +2232,7 @@ def is_in_set_or_list(x, s, items):
singleton = False
if type(item) in (str, int):
# The cheap and easy case.
- if is_paths:
- to_item = MakePathRelative(to_file, fro_file, item)
- else:
- to_item = item
+ to_item = MakePathRelative(to_file, fro_file, item) if is_paths else item
if not (type(item) is str and item.startswith("-")):
# Any string that doesn't begin with a "-" is a singleton - it can
@@ -2467,10 +2458,7 @@ def SetUpConfigurations(target, target_dict):
new_configuration_dict = {}
for (key, target_val) in target_dict.items():
key_ext = key[-1:]
- if key_ext in key_suffixes:
- key_base = key[:-1]
- else:
- key_base = key
+ key_base = key[:-1] if key_ext in key_suffixes else key
if key_base not in non_configuration_keys:
new_configuration_dict[key] = gyp.simple_copy.deepcopy(target_val)
@@ -2482,7 +2470,7 @@ def SetUpConfigurations(target, target_dict):
merged_configurations[configuration] = new_configuration_dict
# Put the new configurations back into the target dict as a configuration.
- for configuration in merged_configurations.keys():
+ for configuration in merged_configurations:
target_dict["configurations"][configuration] = merged_configurations[
configuration
]
@@ -2499,19 +2487,16 @@ def SetUpConfigurations(target, target_dict):
delete_keys = []
for key in target_dict:
key_ext = key[-1:]
- if key_ext in key_suffixes:
- key_base = key[:-1]
- else:
- key_base = key
+ key_base = key[:-1] if key_ext in key_suffixes else key
if key_base not in non_configuration_keys:
delete_keys.append(key)
for key in delete_keys:
del target_dict[key]
# Check the configurations to see if they contain invalid keys.
- for configuration in target_dict["configurations"].keys():
+ for configuration in target_dict["configurations"]:
configuration_dict = target_dict["configurations"][configuration]
- for key in configuration_dict.keys():
+ for key in configuration_dict:
if key in invalid_configuration_keys:
raise GypError(
"%s not allowed in the %s configuration, found in "
@@ -2554,7 +2539,7 @@ def ProcessListFiltersInDict(name, the_dict):
del_lists = []
for key, value in the_dict.items():
operation = key[-1]
- if operation != "!" and operation != "/":
+ if operation not in {"!", "/"}:
continue
if type(value) is not list:
diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/msvs_emulation.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/msvs_emulation.py
index 5b9c2712e091b4..38fa21dd666697 100644
--- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/msvs_emulation.py
+++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/msvs_emulation.py
@@ -93,7 +93,7 @@ def _AddPrefix(element, prefix):
if element is None:
return element
# Note, not Iterable because we don't want to handle strings like that.
- if isinstance(element, list) or isinstance(element, tuple):
+ if isinstance(element, (list, tuple)):
return [prefix + e for e in element]
else:
return prefix + element
@@ -105,7 +105,7 @@ def _DoRemapping(element, map):
if map is not None and element is not None:
if not callable(map):
map = map.get # Assume it's a dict, otherwise a callable to do the remap.
- if isinstance(element, list) or isinstance(element, tuple):
+ if isinstance(element, (list, tuple)):
element = filter(None, [map(elem) for elem in element])
else:
element = map(element)
@@ -117,7 +117,7 @@ def _AppendOrReturn(append, element):
then add |element| to it, adding each item in |element| if it's a list or
tuple."""
if append is not None and element is not None:
- if isinstance(element, list) or isinstance(element, tuple):
+ if isinstance(element, (list, tuple)):
append.extend(element)
else:
append.append(element)
@@ -183,7 +183,7 @@ def ExtractSharedMSVSSystemIncludes(configs, generator_flags):
expanded_system_includes = OrderedSet(
[ExpandMacros(include, env) for include in all_system_includes]
)
- if any(["$" in include for include in expanded_system_includes]):
+ if any("$" in include for include in expanded_system_includes):
# Some path relies on target-specific variables, bail.
return None
@@ -255,10 +255,7 @@ def GetVSMacroEnv(self, base_to_build=None, config=None):
"""Get a dict of variables mapping internal VS macro names to their gyp
equivalents."""
target_arch = self.GetArch(config)
- if target_arch == "x86":
- target_platform = "Win32"
- else:
- target_platform = target_arch
+ target_platform = "Win32" if target_arch == "x86" else target_arch
target_name = self.spec.get("product_prefix", "") + self.spec.get(
"product_name", self.spec["target_name"]
)
@@ -738,10 +735,7 @@ def GetLdflags(
# TODO(scottmg): This should sort of be somewhere else (not really a flag).
ld("AdditionalDependencies", prefix="")
- if self.GetArch(config) == "x86":
- safeseh_default = "true"
- else:
- safeseh_default = None
+ safeseh_default = "true" if self.GetArch(config) == "x86" else None
ld(
"ImageHasSafeExceptionHandlers",
map={"false": ":NO", "true": ""},
@@ -960,15 +954,12 @@ def GetRuleShellFlags(self, rule):
def _HasExplicitRuleForExtension(self, spec, extension):
"""Determine if there's an explicit rule for a particular extension."""
- for rule in spec.get("rules", []):
- if rule["extension"] == extension:
- return True
- return False
+ return any(rule["extension"] == extension for rule in spec.get("rules", []))
def _HasExplicitIdlActions(self, spec):
"""Determine if an action should not run midl for .idl files."""
return any(
- [action.get("explicit_idl_action", 0) for action in spec.get("actions", [])]
+ action.get("explicit_idl_action", 0) for action in spec.get("actions", [])
)
def HasExplicitIdlRulesOrActions(self, spec):
diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/win_tool.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/win_tool.py
index 638eee40029411..171d7295747fcd 100755
--- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/win_tool.py
+++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/win_tool.py
@@ -219,11 +219,10 @@ def ExecLinkWithManifests(
our_manifest = "%(out)s.manifest" % variables
# Load and normalize the manifests. mt.exe sometimes removes whitespace,
# and sometimes doesn't unfortunately.
- with open(our_manifest) as our_f:
- with open(assert_manifest) as assert_f:
- translator = str.maketrans('', '', string.whitespace)
- our_data = our_f.read().translate(translator)
- assert_data = assert_f.read().translate(translator)
+ with open(our_manifest) as our_f, open(assert_manifest) as assert_f:
+ translator = str.maketrans("", "", string.whitespace)
+ our_data = our_f.read().translate(translator)
+ assert_data = assert_f.read().translate(translator)
if our_data != assert_data:
os.unlink(out)
diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py
index a75d8eeab7bda0..29caf1ce7fbb97 100644
--- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py
+++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py
@@ -685,10 +685,7 @@ def GetCflags(self, configname, arch=None):
if platform_root:
cflags.append("-F" + platform_root + "/Developer/Library/Frameworks/")
- if sdk_root:
- framework_root = sdk_root
- else:
- framework_root = ""
+ framework_root = sdk_root if sdk_root else ""
config = self.spec["configurations"][self.configname]
framework_dirs = config.get("mac_framework_dirs", [])
for directory in framework_dirs:
@@ -1248,10 +1245,7 @@ def _AdjustLibrary(self, library, config_name=None):
l_flag = "-framework " + os.path.splitext(os.path.basename(library))[0]
else:
m = self.library_re.match(library)
- if m:
- l_flag = "-l" + m.group(1)
- else:
- l_flag = library
+ l_flag = "-l" + m.group(1) if m else library
sdk_root = self._SdkPath(config_name)
if not sdk_root:
@@ -1545,7 +1539,7 @@ def CLTVersion():
except GypError:
continue
- regex = re.compile(r'Command Line Tools for Xcode\s+(?P\S+)')
+ regex = re.compile(r"Command Line Tools for Xcode\s+(?P\S+)")
try:
output = GetStdout(["/usr/sbin/softwareupdate", "--history"])
return re.search(regex, output).groupdict()["version"]
diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/xcodeproj_file.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/xcodeproj_file.py
index 4e0ec5e8828f79..33c667c266bf69 100644
--- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/xcodeproj_file.py
+++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/xcodeproj_file.py
@@ -971,7 +971,7 @@ def __init__(self, properties=None, id=None, parent=None):
if "path" in self._properties and "name" not in self._properties:
path = self._properties["path"]
name = posixpath.basename(path)
- if name != "" and path != name:
+ if name not in ("", path):
self.SetProperty("name", name)
if "path" in self._properties and (
@@ -2355,9 +2355,8 @@ def __init__(
# property was supplied, set "productName" if it is not present. Also set
# the "PRODUCT_NAME" build setting in each configuration, but only if
# the setting is not present in any build configuration.
- if "name" in self._properties:
- if "productName" not in self._properties:
- self.SetProperty("productName", self._properties["name"])
+ if "name" in self._properties and "productName" not in self._properties:
+ self.SetProperty("productName", self._properties["name"])
if "productName" in self._properties:
if "buildConfigurationList" in self._properties:
@@ -2547,13 +2546,12 @@ def __init__(
force_extension = suffix[1:]
if (
- self._properties["productType"]
- == "com.apple.product-type-bundle.unit.test"
- or self._properties["productType"]
- == "com.apple.product-type-bundle.ui-testing"
- ):
- if force_extension is None:
- force_extension = suffix[1:]
+ self._properties["productType"] in {
+ "com.apple.product-type-bundle.unit.test",
+ "com.apple.product-type-bundle.ui-testing"
+ }
+ ) and force_extension is None:
+ force_extension = suffix[1:]
if force_extension is not None:
# If it's a wrapper (bundle), set WRAPPER_EXTENSION.
@@ -2636,10 +2634,13 @@ def HeadersPhase(self):
# frameworks phases, if any.
insert_at = len(self._properties["buildPhases"])
for index, phase in enumerate(self._properties["buildPhases"]):
- if (
- isinstance(phase, PBXResourcesBuildPhase)
- or isinstance(phase, PBXSourcesBuildPhase)
- or isinstance(phase, PBXFrameworksBuildPhase)
+ if isinstance(
+ phase,
+ (
+ PBXResourcesBuildPhase,
+ PBXSourcesBuildPhase,
+ PBXFrameworksBuildPhase,
+ ),
):
insert_at = index
break
@@ -2658,9 +2659,7 @@ def ResourcesPhase(self):
# phases, if any.
insert_at = len(self._properties["buildPhases"])
for index, phase in enumerate(self._properties["buildPhases"]):
- if isinstance(phase, PBXSourcesBuildPhase) or isinstance(
- phase, PBXFrameworksBuildPhase
- ):
+ if isinstance(phase, (PBXSourcesBuildPhase, PBXFrameworksBuildPhase)):
insert_at = index
break
@@ -2701,8 +2700,10 @@ def AddDependency(self, other):
other._properties["productType"] == static_library_type
or (
(
- other._properties["productType"] == shared_library_type
- or other._properties["productType"] == framework_type
+ other._properties["productType"] in {
+ shared_library_type,
+ framework_type
+ }
)
and (
(not other.HasBuildSetting("MACH_O_TYPE"))
diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/packaging/LICENSE b/deps/npm/node_modules/node-gyp/gyp/pylib/packaging/LICENSE
new file mode 100644
index 00000000000000..6f62d44e4ef733
--- /dev/null
+++ b/deps/npm/node_modules/node-gyp/gyp/pylib/packaging/LICENSE
@@ -0,0 +1,3 @@
+This software is made available under the terms of *either* of the licenses
+found in LICENSE.APACHE or LICENSE.BSD. Contributions to this software is made
+under the terms of *both* these licenses.
diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/packaging/LICENSE.APACHE b/deps/npm/node_modules/node-gyp/gyp/pylib/packaging/LICENSE.APACHE
new file mode 100644
index 00000000000000..f433b1a53f5b83
--- /dev/null
+++ b/deps/npm/node_modules/node-gyp/gyp/pylib/packaging/LICENSE.APACHE
@@ -0,0 +1,177 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/packaging/LICENSE.BSD b/deps/npm/node_modules/node-gyp/gyp/pylib/packaging/LICENSE.BSD
new file mode 100644
index 00000000000000..42ce7b75c92fb0
--- /dev/null
+++ b/deps/npm/node_modules/node-gyp/gyp/pylib/packaging/LICENSE.BSD
@@ -0,0 +1,23 @@
+Copyright (c) Donald Stufft and individual contributors.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/packaging/__init__.py b/deps/npm/node_modules/node-gyp/gyp/pylib/packaging/__init__.py
new file mode 100644
index 00000000000000..5fd91838316fbe
--- /dev/null
+++ b/deps/npm/node_modules/node-gyp/gyp/pylib/packaging/__init__.py
@@ -0,0 +1,15 @@
+# This file is dual licensed under the terms of the Apache License, Version
+# 2.0, and the BSD License. See the LICENSE file in the root of this repository
+# for complete details.
+
+__title__ = "packaging"
+__summary__ = "Core utilities for Python packages"
+__uri__ = "https://github.com/pypa/packaging"
+
+__version__ = "23.3.dev0"
+
+__author__ = "Donald Stufft and individual contributors"
+__email__ = "donald@stufft.io"
+
+__license__ = "BSD-2-Clause or Apache-2.0"
+__copyright__ = "2014 %s" % __author__
diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/packaging/_elffile.py b/deps/npm/node_modules/node-gyp/gyp/pylib/packaging/_elffile.py
new file mode 100644
index 00000000000000..6fb19b30bb53c1
--- /dev/null
+++ b/deps/npm/node_modules/node-gyp/gyp/pylib/packaging/_elffile.py
@@ -0,0 +1,108 @@
+"""
+ELF file parser.
+
+This provides a class ``ELFFile`` that parses an ELF executable in a similar
+interface to ``ZipFile``. Only the read interface is implemented.
+
+Based on: https://gist.github.com/lyssdod/f51579ae8d93c8657a5564aefc2ffbca
+ELF header: https://refspecs.linuxfoundation.org/elf/gabi4+/ch4.eheader.html
+"""
+
+import enum
+import os
+import struct
+from typing import IO, Optional, Tuple
+
+
+class ELFInvalid(ValueError):
+ pass
+
+
+class EIClass(enum.IntEnum):
+ C32 = 1
+ C64 = 2
+
+
+class EIData(enum.IntEnum):
+ Lsb = 1
+ Msb = 2
+
+
+class EMachine(enum.IntEnum):
+ I386 = 3
+ S390 = 22
+ Arm = 40
+ X8664 = 62
+ AArc64 = 183
+
+
+class ELFFile:
+ """
+ Representation of an ELF executable.
+ """
+
+ def __init__(self, f: IO[bytes]) -> None:
+ self._f = f
+
+ try:
+ ident = self._read("16B")
+ except struct.error:
+ raise ELFInvalid("unable to parse identification")
+ magic = bytes(ident[:4])
+ if magic != b"\x7fELF":
+ raise ELFInvalid(f"invalid magic: {magic!r}")
+
+ self.capacity = ident[4] # Format for program header (bitness).
+ self.encoding = ident[5] # Data structure encoding (endianness).
+
+ try:
+ # e_fmt: Format for program header.
+ # p_fmt: Format for section header.
+ # p_idx: Indexes to find p_type, p_offset, and p_filesz.
+ e_fmt, self._p_fmt, self._p_idx = {
+ (1, 1): ("HHIIIIIHHH", ">IIIIIIII", (0, 1, 4)), # 32-bit MSB.
+ (2, 1): ("HHIQQQIHHH", ">IIQQQQQQ", (0, 2, 5)), # 64-bit MSB.
+ }[(self.capacity, self.encoding)]
+ except KeyError:
+ raise ELFInvalid(
+ f"unrecognized capacity ({self.capacity}) or "
+ f"encoding ({self.encoding})"
+ )
+
+ try:
+ (
+ _,
+ self.machine, # Architecture type.
+ _,
+ _,
+ self._e_phoff, # Offset of program header.
+ _,
+ self.flags, # Processor-specific flags.
+ _,
+ self._e_phentsize, # Size of section.
+ self._e_phnum, # Number of sections.
+ ) = self._read(e_fmt)
+ except struct.error as e:
+ raise ELFInvalid("unable to parse machine and section information") from e
+
+ def _read(self, fmt: str) -> Tuple[int, ...]:
+ return struct.unpack(fmt, self._f.read(struct.calcsize(fmt)))
+
+ @property
+ def interpreter(self) -> Optional[str]:
+ """
+ The path recorded in the ``PT_INTERP`` section header.
+ """
+ for index in range(self._e_phnum):
+ self._f.seek(self._e_phoff + self._e_phentsize * index)
+ try:
+ data = self._read(self._p_fmt)
+ except struct.error:
+ continue
+ if data[self._p_idx[0]] != 3: # Not PT_INTERP.
+ continue
+ self._f.seek(data[self._p_idx[1]])
+ return os.fsdecode(self._f.read(data[self._p_idx[2]])).strip("\0")
+ return None
diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/packaging/_manylinux.py b/deps/npm/node_modules/node-gyp/gyp/pylib/packaging/_manylinux.py
new file mode 100644
index 00000000000000..3705d50db9193e
--- /dev/null
+++ b/deps/npm/node_modules/node-gyp/gyp/pylib/packaging/_manylinux.py
@@ -0,0 +1,252 @@
+import collections
+import contextlib
+import functools
+import os
+import re
+import sys
+import warnings
+from typing import Dict, Generator, Iterator, NamedTuple, Optional, Sequence, Tuple
+
+from ._elffile import EIClass, EIData, ELFFile, EMachine
+
+EF_ARM_ABIMASK = 0xFF000000
+EF_ARM_ABI_VER5 = 0x05000000
+EF_ARM_ABI_FLOAT_HARD = 0x00000400
+
+
+# `os.PathLike` not a generic type until Python 3.9, so sticking with `str`
+# as the type for `path` until then.
+@contextlib.contextmanager
+def _parse_elf(path: str) -> Generator[Optional[ELFFile], None, None]:
+ try:
+ with open(path, "rb") as f:
+ yield ELFFile(f)
+ except (OSError, TypeError, ValueError):
+ yield None
+
+
+def _is_linux_armhf(executable: str) -> bool:
+ # hard-float ABI can be detected from the ELF header of the running
+ # process
+ # https://static.docs.arm.com/ihi0044/g/aaelf32.pdf
+ with _parse_elf(executable) as f:
+ return (
+ f is not None
+ and f.capacity == EIClass.C32
+ and f.encoding == EIData.Lsb
+ and f.machine == EMachine.Arm
+ and f.flags & EF_ARM_ABIMASK == EF_ARM_ABI_VER5
+ and f.flags & EF_ARM_ABI_FLOAT_HARD == EF_ARM_ABI_FLOAT_HARD
+ )
+
+
+def _is_linux_i686(executable: str) -> bool:
+ with _parse_elf(executable) as f:
+ return (
+ f is not None
+ and f.capacity == EIClass.C32
+ and f.encoding == EIData.Lsb
+ and f.machine == EMachine.I386
+ )
+
+
+def _have_compatible_abi(executable: str, archs: Sequence[str]) -> bool:
+ if "armv7l" in archs:
+ return _is_linux_armhf(executable)
+ if "i686" in archs:
+ return _is_linux_i686(executable)
+ allowed_archs = {"x86_64", "aarch64", "ppc64", "ppc64le", "s390x", "loongarch64"}
+ return any(arch in allowed_archs for arch in archs)
+
+
+# If glibc ever changes its major version, we need to know what the last
+# minor version was, so we can build the complete list of all versions.
+# For now, guess what the highest minor version might be, assume it will
+# be 50 for testing. Once this actually happens, update the dictionary
+# with the actual value.
+_LAST_GLIBC_MINOR: Dict[int, int] = collections.defaultdict(lambda: 50)
+
+
+class _GLibCVersion(NamedTuple):
+ major: int
+ minor: int
+
+
+def _glibc_version_string_confstr() -> Optional[str]:
+ """
+ Primary implementation of glibc_version_string using os.confstr.
+ """
+ # os.confstr is quite a bit faster than ctypes.DLL. It's also less likely
+ # to be broken or missing. This strategy is used in the standard library
+ # platform module.
+ # https://github.com/python/cpython/blob/fcf1d003bf4f0100c/Lib/platform.py#L175-L183
+ try:
+ # Should be a string like "glibc 2.17".
+ version_string: str = getattr(os, "confstr")("CS_GNU_LIBC_VERSION")
+ assert version_string is not None
+ _, version = version_string.rsplit()
+ except (AssertionError, AttributeError, OSError, ValueError):
+ # os.confstr() or CS_GNU_LIBC_VERSION not available (or a bad value)...
+ return None
+ return version
+
+
+def _glibc_version_string_ctypes() -> Optional[str]:
+ """
+ Fallback implementation of glibc_version_string using ctypes.
+ """
+ try:
+ import ctypes
+ except ImportError:
+ return None
+
+ # ctypes.CDLL(None) internally calls dlopen(NULL), and as the dlopen
+ # manpage says, "If filename is NULL, then the returned handle is for the
+ # main program". This way we can let the linker do the work to figure out
+ # which libc our process is actually using.
+ #
+ # We must also handle the special case where the executable is not a
+ # dynamically linked executable. This can occur when using musl libc,
+ # for example. In this situation, dlopen() will error, leading to an
+ # OSError. Interestingly, at least in the case of musl, there is no
+ # errno set on the OSError. The single string argument used to construct
+ # OSError comes from libc itself and is therefore not portable to
+ # hard code here. In any case, failure to call dlopen() means we
+ # can proceed, so we bail on our attempt.
+ try:
+ process_namespace = ctypes.CDLL(None)
+ except OSError:
+ return None
+
+ try:
+ gnu_get_libc_version = process_namespace.gnu_get_libc_version
+ except AttributeError:
+ # Symbol doesn't exist -> therefore, we are not linked to
+ # glibc.
+ return None
+
+ # Call gnu_get_libc_version, which returns a string like "2.5"
+ gnu_get_libc_version.restype = ctypes.c_char_p
+ version_str: str = gnu_get_libc_version()
+ # py2 / py3 compatibility:
+ if not isinstance(version_str, str):
+ version_str = version_str.decode("ascii")
+
+ return version_str
+
+
+def _glibc_version_string() -> Optional[str]:
+ """Returns glibc version string, or None if not using glibc."""
+ return _glibc_version_string_confstr() or _glibc_version_string_ctypes()
+
+
+def _parse_glibc_version(version_str: str) -> Tuple[int, int]:
+ """Parse glibc version.
+
+ We use a regexp instead of str.split because we want to discard any
+ random junk that might come after the minor version -- this might happen
+ in patched/forked versions of glibc (e.g. Linaro's version of glibc
+ uses version strings like "2.20-2014.11"). See gh-3588.
+ """
+ m = re.match(r"(?P[0-9]+)\.(?P[0-9]+)", version_str)
+ if not m:
+ warnings.warn(
+ f"Expected glibc version with 2 components major.minor,"
+ f" got: {version_str}",
+ RuntimeWarning,
+ )
+ return -1, -1
+ return int(m.group("major")), int(m.group("minor"))
+
+
+@functools.lru_cache()
+def _get_glibc_version() -> Tuple[int, int]:
+ version_str = _glibc_version_string()
+ if version_str is None:
+ return (-1, -1)
+ return _parse_glibc_version(version_str)
+
+
+# From PEP 513, PEP 600
+def _is_compatible(arch: str, version: _GLibCVersion) -> bool:
+ sys_glibc = _get_glibc_version()
+ if sys_glibc < version:
+ return False
+ # Check for presence of _manylinux module.
+ try:
+ import _manylinux # noqa
+ except ImportError:
+ return True
+ if hasattr(_manylinux, "manylinux_compatible"):
+ result = _manylinux.manylinux_compatible(version[0], version[1], arch)
+ if result is not None:
+ return bool(result)
+ return True
+ if version == _GLibCVersion(2, 5):
+ if hasattr(_manylinux, "manylinux1_compatible"):
+ return bool(_manylinux.manylinux1_compatible)
+ if version == _GLibCVersion(2, 12):
+ if hasattr(_manylinux, "manylinux2010_compatible"):
+ return bool(_manylinux.manylinux2010_compatible)
+ if version == _GLibCVersion(2, 17):
+ if hasattr(_manylinux, "manylinux2014_compatible"):
+ return bool(_manylinux.manylinux2014_compatible)
+ return True
+
+
+_LEGACY_MANYLINUX_MAP = {
+ # CentOS 7 w/ glibc 2.17 (PEP 599)
+ (2, 17): "manylinux2014",
+ # CentOS 6 w/ glibc 2.12 (PEP 571)
+ (2, 12): "manylinux2010",
+ # CentOS 5 w/ glibc 2.5 (PEP 513)
+ (2, 5): "manylinux1",
+}
+
+
+def platform_tags(archs: Sequence[str]) -> Iterator[str]:
+ """Generate manylinux tags compatible to the current platform.
+
+ :param archs: Sequence of compatible architectures.
+ The first one shall be the closest to the actual architecture and be the part of
+ platform tag after the ``linux_`` prefix, e.g. ``x86_64``.
+ The ``linux_`` prefix is assumed as a prerequisite for the current platform to
+ be manylinux-compatible.
+
+ :returns: An iterator of compatible manylinux tags.
+ """
+ if not _have_compatible_abi(sys.executable, archs):
+ return
+ # Oldest glibc to be supported regardless of architecture is (2, 17).
+ too_old_glibc2 = _GLibCVersion(2, 16)
+ if set(archs) & {"x86_64", "i686"}:
+ # On x86/i686 also oldest glibc to be supported is (2, 5).
+ too_old_glibc2 = _GLibCVersion(2, 4)
+ current_glibc = _GLibCVersion(*_get_glibc_version())
+ glibc_max_list = [current_glibc]
+ # We can assume compatibility across glibc major versions.
+ # https://sourceware.org/bugzilla/show_bug.cgi?id=24636
+ #
+ # Build a list of maximum glibc versions so that we can
+ # output the canonical list of all glibc from current_glibc
+ # down to too_old_glibc2, including all intermediary versions.
+ for glibc_major in range(current_glibc.major - 1, 1, -1):
+ glibc_minor = _LAST_GLIBC_MINOR[glibc_major]
+ glibc_max_list.append(_GLibCVersion(glibc_major, glibc_minor))
+ for arch in archs:
+ for glibc_max in glibc_max_list:
+ if glibc_max.major == too_old_glibc2.major:
+ min_minor = too_old_glibc2.minor
+ else:
+ # For other glibc major versions oldest supported is (x, 0).
+ min_minor = -1
+ for glibc_minor in range(glibc_max.minor, min_minor, -1):
+ glibc_version = _GLibCVersion(glibc_max.major, glibc_minor)
+ tag = "manylinux_{}_{}".format(*glibc_version)
+ if _is_compatible(arch, glibc_version):
+ yield f"{tag}_{arch}"
+ # Handle the legacy manylinux1, manylinux2010, manylinux2014 tags.
+ if glibc_version in _LEGACY_MANYLINUX_MAP:
+ legacy_tag = _LEGACY_MANYLINUX_MAP[glibc_version]
+ if _is_compatible(arch, glibc_version):
+ yield f"{legacy_tag}_{arch}"
diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/packaging/_musllinux.py b/deps/npm/node_modules/node-gyp/gyp/pylib/packaging/_musllinux.py
new file mode 100644
index 00000000000000..86419df9d7087f
--- /dev/null
+++ b/deps/npm/node_modules/node-gyp/gyp/pylib/packaging/_musllinux.py
@@ -0,0 +1,83 @@
+"""PEP 656 support.
+
+This module implements logic to detect if the currently running Python is
+linked against musl, and what musl version is used.
+"""
+
+import functools
+import re
+import subprocess
+import sys
+from typing import Iterator, NamedTuple, Optional, Sequence
+
+from ._elffile import ELFFile
+
+
+class _MuslVersion(NamedTuple):
+ major: int
+ minor: int
+
+
+def _parse_musl_version(output: str) -> Optional[_MuslVersion]:
+ lines = [n for n in (n.strip() for n in output.splitlines()) if n]
+ if len(lines) < 2 or lines[0][:4] != "musl":
+ return None
+ m = re.match(r"Version (\d+)\.(\d+)", lines[1])
+ if not m:
+ return None
+ return _MuslVersion(major=int(m.group(1)), minor=int(m.group(2)))
+
+
+@functools.lru_cache()
+def _get_musl_version(executable: str) -> Optional[_MuslVersion]:
+ """Detect currently-running musl runtime version.
+
+ This is done by checking the specified executable's dynamic linking
+ information, and invoking the loader to parse its output for a version
+ string. If the loader is musl, the output would be something like::
+
+ musl libc (x86_64)
+ Version 1.2.2
+ Dynamic Program Loader
+ """
+ try:
+ with open(executable, "rb") as f:
+ ld = ELFFile(f).interpreter
+ except (OSError, TypeError, ValueError):
+ return None
+ if ld is None or "musl" not in ld:
+ return None
+ proc = subprocess.run([ld], stderr=subprocess.PIPE, text=True)
+ return _parse_musl_version(proc.stderr)
+
+
+def platform_tags(archs: Sequence[str]) -> Iterator[str]:
+ """Generate musllinux tags compatible to the current platform.
+
+ :param archs: Sequence of compatible architectures.
+ The first one shall be the closest to the actual architecture and be the part of
+ platform tag after the ``linux_`` prefix, e.g. ``x86_64``.
+ The ``linux_`` prefix is assumed as a prerequisite for the current platform to
+ be musllinux-compatible.
+
+ :returns: An iterator of compatible musllinux tags.
+ """
+ sys_musl = _get_musl_version(sys.executable)
+ if sys_musl is None: # Python not dynamically linked against musl.
+ return
+ for arch in archs:
+ for minor in range(sys_musl.minor, -1, -1):
+ yield f"musllinux_{sys_musl.major}_{minor}_{arch}"
+
+
+if __name__ == "__main__": # pragma: no cover
+ import sysconfig
+
+ plat = sysconfig.get_platform()
+ assert plat.startswith("linux-"), "not linux"
+
+ print("plat:", plat)
+ print("musl:", _get_musl_version(sys.executable))
+ print("tags:", end=" ")
+ for t in platform_tags(re.sub(r"[.-]", "_", plat.split("-", 1)[-1])):
+ print(t, end="\n ")
diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/packaging/_parser.py b/deps/npm/node_modules/node-gyp/gyp/pylib/packaging/_parser.py
new file mode 100644
index 00000000000000..4576981c2dd755
--- /dev/null
+++ b/deps/npm/node_modules/node-gyp/gyp/pylib/packaging/_parser.py
@@ -0,0 +1,359 @@
+"""Handwritten parser of dependency specifiers.
+
+The docstring for each __parse_* function contains ENBF-inspired grammar representing
+the implementation.
+"""
+
+import ast
+from typing import Any, List, NamedTuple, Optional, Tuple, Union
+
+from ._tokenizer import DEFAULT_RULES, Tokenizer
+
+
+class Node:
+ def __init__(self, value: str) -> None:
+ self.value = value
+
+ def __str__(self) -> str:
+ return self.value
+
+ def __repr__(self) -> str:
+ return f"<{self.__class__.__name__}('{self}')>"
+
+ def serialize(self) -> str:
+ raise NotImplementedError
+
+
+class Variable(Node):
+ def serialize(self) -> str:
+ return str(self)
+
+
+class Value(Node):
+ def serialize(self) -> str:
+ return f'"{self}"'
+
+
+class Op(Node):
+ def serialize(self) -> str:
+ return str(self)
+
+
+MarkerVar = Union[Variable, Value]
+MarkerItem = Tuple[MarkerVar, Op, MarkerVar]
+# MarkerAtom = Union[MarkerItem, List["MarkerAtom"]]
+# MarkerList = List[Union["MarkerList", MarkerAtom, str]]
+# mypy does not support recursive type definition
+# https://github.com/python/mypy/issues/731
+MarkerAtom = Any
+MarkerList = List[Any]
+
+
+class ParsedRequirement(NamedTuple):
+ name: str
+ url: str
+ extras: List[str]
+ specifier: str
+ marker: Optional[MarkerList]
+
+
+# --------------------------------------------------------------------------------------
+# Recursive descent parser for dependency specifier
+# --------------------------------------------------------------------------------------
+def parse_requirement(source: str) -> ParsedRequirement:
+ return _parse_requirement(Tokenizer(source, rules=DEFAULT_RULES))
+
+
+def _parse_requirement(tokenizer: Tokenizer) -> ParsedRequirement:
+ """
+ requirement = WS? IDENTIFIER WS? extras WS? requirement_details
+ """
+ tokenizer.consume("WS")
+
+ name_token = tokenizer.expect(
+ "IDENTIFIER", expected="package name at the start of dependency specifier"
+ )
+ name = name_token.text
+ tokenizer.consume("WS")
+
+ extras = _parse_extras(tokenizer)
+ tokenizer.consume("WS")
+
+ url, specifier, marker = _parse_requirement_details(tokenizer)
+ tokenizer.expect("END", expected="end of dependency specifier")
+
+ return ParsedRequirement(name, url, extras, specifier, marker)
+
+
+def _parse_requirement_details(
+ tokenizer: Tokenizer,
+) -> Tuple[str, str, Optional[MarkerList]]:
+ """
+ requirement_details = AT URL (WS requirement_marker?)?
+ | specifier WS? (requirement_marker)?
+ """
+
+ specifier = ""
+ url = ""
+ marker = None
+
+ if tokenizer.check("AT"):
+ tokenizer.read()
+ tokenizer.consume("WS")
+
+ url_start = tokenizer.position
+ url = tokenizer.expect("URL", expected="URL after @").text
+ if tokenizer.check("END", peek=True):
+ return (url, specifier, marker)
+
+ tokenizer.expect("WS", expected="whitespace after URL")
+
+ # The input might end after whitespace.
+ if tokenizer.check("END", peek=True):
+ return (url, specifier, marker)
+
+ marker = _parse_requirement_marker(
+ tokenizer, span_start=url_start, after="URL and whitespace"
+ )
+ else:
+ specifier_start = tokenizer.position
+ specifier = _parse_specifier(tokenizer)
+ tokenizer.consume("WS")
+
+ if tokenizer.check("END", peek=True):
+ return (url, specifier, marker)
+
+ marker = _parse_requirement_marker(
+ tokenizer,
+ span_start=specifier_start,
+ after=(
+ "version specifier"
+ if specifier
+ else "name and no valid version specifier"
+ ),
+ )
+
+ return (url, specifier, marker)
+
+
+def _parse_requirement_marker(
+ tokenizer: Tokenizer, *, span_start: int, after: str
+) -> MarkerList:
+ """
+ requirement_marker = SEMICOLON marker WS?
+ """
+
+ if not tokenizer.check("SEMICOLON"):
+ tokenizer.raise_syntax_error(
+ f"Expected end or semicolon (after {after})",
+ span_start=span_start,
+ )
+ tokenizer.read()
+
+ marker = _parse_marker(tokenizer)
+ tokenizer.consume("WS")
+
+ return marker
+
+
+def _parse_extras(tokenizer: Tokenizer) -> List[str]:
+ """
+ extras = (LEFT_BRACKET wsp* extras_list? wsp* RIGHT_BRACKET)?
+ """
+ if not tokenizer.check("LEFT_BRACKET", peek=True):
+ return []
+
+ with tokenizer.enclosing_tokens(
+ "LEFT_BRACKET",
+ "RIGHT_BRACKET",
+ around="extras",
+ ):
+ tokenizer.consume("WS")
+ extras = _parse_extras_list(tokenizer)
+ tokenizer.consume("WS")
+
+ return extras
+
+
+def _parse_extras_list(tokenizer: Tokenizer) -> List[str]:
+ """
+ extras_list = identifier (wsp* ',' wsp* identifier)*
+ """
+ extras: List[str] = []
+
+ if not tokenizer.check("IDENTIFIER"):
+ return extras
+
+ extras.append(tokenizer.read().text)
+
+ while True:
+ tokenizer.consume("WS")
+ if tokenizer.check("IDENTIFIER", peek=True):
+ tokenizer.raise_syntax_error("Expected comma between extra names")
+ elif not tokenizer.check("COMMA"):
+ break
+
+ tokenizer.read()
+ tokenizer.consume("WS")
+
+ extra_token = tokenizer.expect("IDENTIFIER", expected="extra name after comma")
+ extras.append(extra_token.text)
+
+ return extras
+
+
+def _parse_specifier(tokenizer: Tokenizer) -> str:
+ """
+ specifier = LEFT_PARENTHESIS WS? version_many WS? RIGHT_PARENTHESIS
+ | WS? version_many WS?
+ """
+ with tokenizer.enclosing_tokens(
+ "LEFT_PARENTHESIS",
+ "RIGHT_PARENTHESIS",
+ around="version specifier",
+ ):
+ tokenizer.consume("WS")
+ parsed_specifiers = _parse_version_many(tokenizer)
+ tokenizer.consume("WS")
+
+ return parsed_specifiers
+
+
+def _parse_version_many(tokenizer: Tokenizer) -> str:
+ """
+ version_many = (SPECIFIER (WS? COMMA WS? SPECIFIER)*)?
+ """
+ parsed_specifiers = ""
+ while tokenizer.check("SPECIFIER"):
+ span_start = tokenizer.position
+ parsed_specifiers += tokenizer.read().text
+ if tokenizer.check("VERSION_PREFIX_TRAIL", peek=True):
+ tokenizer.raise_syntax_error(
+ ".* suffix can only be used with `==` or `!=` operators",
+ span_start=span_start,
+ span_end=tokenizer.position + 1,
+ )
+ if tokenizer.check("VERSION_LOCAL_LABEL_TRAIL", peek=True):
+ tokenizer.raise_syntax_error(
+ "Local version label can only be used with `==` or `!=` operators",
+ span_start=span_start,
+ span_end=tokenizer.position,
+ )
+ tokenizer.consume("WS")
+ if not tokenizer.check("COMMA"):
+ break
+ parsed_specifiers += tokenizer.read().text
+ tokenizer.consume("WS")
+
+ return parsed_specifiers
+
+
+# --------------------------------------------------------------------------------------
+# Recursive descent parser for marker expression
+# --------------------------------------------------------------------------------------
+def parse_marker(source: str) -> MarkerList:
+ return _parse_full_marker(Tokenizer(source, rules=DEFAULT_RULES))
+
+
+def _parse_full_marker(tokenizer: Tokenizer) -> MarkerList:
+ retval = _parse_marker(tokenizer)
+ tokenizer.expect("END", expected="end of marker expression")
+ return retval
+
+
+def _parse_marker(tokenizer: Tokenizer) -> MarkerList:
+ """
+ marker = marker_atom (BOOLOP marker_atom)+
+ """
+ expression = [_parse_marker_atom(tokenizer)]
+ while tokenizer.check("BOOLOP"):
+ token = tokenizer.read()
+ expr_right = _parse_marker_atom(tokenizer)
+ expression.extend((token.text, expr_right))
+ return expression
+
+
+def _parse_marker_atom(tokenizer: Tokenizer) -> MarkerAtom:
+ """
+ marker_atom = WS? LEFT_PARENTHESIS WS? marker WS? RIGHT_PARENTHESIS WS?
+ | WS? marker_item WS?
+ """
+
+ tokenizer.consume("WS")
+ if tokenizer.check("LEFT_PARENTHESIS", peek=True):
+ with tokenizer.enclosing_tokens(
+ "LEFT_PARENTHESIS",
+ "RIGHT_PARENTHESIS",
+ around="marker expression",
+ ):
+ tokenizer.consume("WS")
+ marker: MarkerAtom = _parse_marker(tokenizer)
+ tokenizer.consume("WS")
+ else:
+ marker = _parse_marker_item(tokenizer)
+ tokenizer.consume("WS")
+ return marker
+
+
+def _parse_marker_item(tokenizer: Tokenizer) -> MarkerItem:
+ """
+ marker_item = WS? marker_var WS? marker_op WS? marker_var WS?
+ """
+ tokenizer.consume("WS")
+ marker_var_left = _parse_marker_var(tokenizer)
+ tokenizer.consume("WS")
+ marker_op = _parse_marker_op(tokenizer)
+ tokenizer.consume("WS")
+ marker_var_right = _parse_marker_var(tokenizer)
+ tokenizer.consume("WS")
+ return (marker_var_left, marker_op, marker_var_right)
+
+
+def _parse_marker_var(tokenizer: Tokenizer) -> MarkerVar:
+ """
+ marker_var = VARIABLE | QUOTED_STRING
+ """
+ if tokenizer.check("VARIABLE"):
+ return process_env_var(tokenizer.read().text.replace(".", "_"))
+ elif tokenizer.check("QUOTED_STRING"):
+ return process_python_str(tokenizer.read().text)
+ else:
+ tokenizer.raise_syntax_error(
+ message="Expected a marker variable or quoted string"
+ )
+
+
+def process_env_var(env_var: str) -> Variable:
+ if (
+ env_var == "platform_python_implementation"
+ or env_var == "python_implementation"
+ ):
+ return Variable("platform_python_implementation")
+ else:
+ return Variable(env_var)
+
+
+def process_python_str(python_str: str) -> Value:
+ value = ast.literal_eval(python_str)
+ return Value(str(value))
+
+
+def _parse_marker_op(tokenizer: Tokenizer) -> Op:
+ """
+ marker_op = IN | NOT IN | OP
+ """
+ if tokenizer.check("IN"):
+ tokenizer.read()
+ return Op("in")
+ elif tokenizer.check("NOT"):
+ tokenizer.read()
+ tokenizer.expect("WS", expected="whitespace after 'not'")
+ tokenizer.expect("IN", expected="'in' after 'not'")
+ return Op("not in")
+ elif tokenizer.check("OP"):
+ return Op(tokenizer.read().text)
+ else:
+ return tokenizer.raise_syntax_error(
+ "Expected marker operator, one of "
+ "<=, <, !=, ==, >=, >, ~=, ===, in, not in"
+ )
diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/packaging/_structures.py b/deps/npm/node_modules/node-gyp/gyp/pylib/packaging/_structures.py
new file mode 100644
index 00000000000000..90a6465f9682c8
--- /dev/null
+++ b/deps/npm/node_modules/node-gyp/gyp/pylib/packaging/_structures.py
@@ -0,0 +1,61 @@
+# This file is dual licensed under the terms of the Apache License, Version
+# 2.0, and the BSD License. See the LICENSE file in the root of this repository
+# for complete details.
+
+
+class InfinityType:
+ def __repr__(self) -> str:
+ return "Infinity"
+
+ def __hash__(self) -> int:
+ return hash(repr(self))
+
+ def __lt__(self, other: object) -> bool:
+ return False
+
+ def __le__(self, other: object) -> bool:
+ return False
+
+ def __eq__(self, other: object) -> bool:
+ return isinstance(other, self.__class__)
+
+ def __gt__(self, other: object) -> bool:
+ return True
+
+ def __ge__(self, other: object) -> bool:
+ return True
+
+ def __neg__(self: object) -> "NegativeInfinityType":
+ return NegativeInfinity
+
+
+Infinity = InfinityType()
+
+
+class NegativeInfinityType:
+ def __repr__(self) -> str:
+ return "-Infinity"
+
+ def __hash__(self) -> int:
+ return hash(repr(self))
+
+ def __lt__(self, other: object) -> bool:
+ return True
+
+ def __le__(self, other: object) -> bool:
+ return True
+
+ def __eq__(self, other: object) -> bool:
+ return isinstance(other, self.__class__)
+
+ def __gt__(self, other: object) -> bool:
+ return False
+
+ def __ge__(self, other: object) -> bool:
+ return False
+
+ def __neg__(self: object) -> InfinityType:
+ return Infinity
+
+
+NegativeInfinity = NegativeInfinityType()
diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/packaging/_tokenizer.py b/deps/npm/node_modules/node-gyp/gyp/pylib/packaging/_tokenizer.py
new file mode 100644
index 00000000000000..dd0d648d49a7c1
--- /dev/null
+++ b/deps/npm/node_modules/node-gyp/gyp/pylib/packaging/_tokenizer.py
@@ -0,0 +1,192 @@
+import contextlib
+import re
+from dataclasses import dataclass
+from typing import Dict, Iterator, NoReturn, Optional, Tuple, Union
+
+from .specifiers import Specifier
+
+
+@dataclass
+class Token:
+ name: str
+ text: str
+ position: int
+
+
+class ParserSyntaxError(Exception):
+ """The provided source text could not be parsed correctly."""
+
+ def __init__(
+ self,
+ message: str,
+ *,
+ source: str,
+ span: Tuple[int, int],
+ ) -> None:
+ self.span = span
+ self.message = message
+ self.source = source
+
+ super().__init__()
+
+ def __str__(self) -> str:
+ marker = " " * self.span[0] + "~" * (self.span[1] - self.span[0]) + "^"
+ return "\n ".join([self.message, self.source, marker])
+
+
+DEFAULT_RULES: "Dict[str, Union[str, re.Pattern[str]]]" = {
+ "LEFT_PARENTHESIS": r"\(",
+ "RIGHT_PARENTHESIS": r"\)",
+ "LEFT_BRACKET": r"\[",
+ "RIGHT_BRACKET": r"\]",
+ "SEMICOLON": r";",
+ "COMMA": r",",
+ "QUOTED_STRING": re.compile(
+ r"""
+ (
+ ('[^']*')
+ |
+ ("[^"]*")
+ )
+ """,
+ re.VERBOSE,
+ ),
+ "OP": r"(===|==|~=|!=|<=|>=|<|>)",
+ "BOOLOP": r"\b(or|and)\b",
+ "IN": r"\bin\b",
+ "NOT": r"\bnot\b",
+ "VARIABLE": re.compile(
+ r"""
+ \b(
+ python_version
+ |python_full_version
+ |os[._]name
+ |sys[._]platform
+ |platform_(release|system)
+ |platform[._](version|machine|python_implementation)
+ |python_implementation
+ |implementation_(name|version)
+ |extra
+ )\b
+ """,
+ re.VERBOSE,
+ ),
+ "SPECIFIER": re.compile(
+ Specifier._operator_regex_str + Specifier._version_regex_str,
+ re.VERBOSE | re.IGNORECASE,
+ ),
+ "AT": r"\@",
+ "URL": r"[^ \t]+",
+ "IDENTIFIER": r"\b[a-zA-Z0-9][a-zA-Z0-9._-]*\b",
+ "VERSION_PREFIX_TRAIL": r"\.\*",
+ "VERSION_LOCAL_LABEL_TRAIL": r"\+[a-z0-9]+(?:[-_\.][a-z0-9]+)*",
+ "WS": r"[ \t]+",
+ "END": r"$",
+}
+
+
+class Tokenizer:
+ """Context-sensitive token parsing.
+
+ Provides methods to examine the input stream to check whether the next token
+ matches.
+ """
+
+ def __init__(
+ self,
+ source: str,
+ *,
+ rules: "Dict[str, Union[str, re.Pattern[str]]]",
+ ) -> None:
+ self.source = source
+ self.rules: Dict[str, re.Pattern[str]] = {
+ name: re.compile(pattern) for name, pattern in rules.items()
+ }
+ self.next_token: Optional[Token] = None
+ self.position = 0
+
+ def consume(self, name: str) -> None:
+ """Move beyond provided token name, if at current position."""
+ if self.check(name):
+ self.read()
+
+ def check(self, name: str, *, peek: bool = False) -> bool:
+ """Check whether the next token has the provided name.
+
+ By default, if the check succeeds, the token *must* be read before
+ another check. If `peek` is set to `True`, the token is not loaded and
+ would need to be checked again.
+ """
+ assert (
+ self.next_token is None
+ ), f"Cannot check for {name!r}, already have {self.next_token!r}"
+ assert name in self.rules, f"Unknown token name: {name!r}"
+
+ expression = self.rules[name]
+
+ match = expression.match(self.source, self.position)
+ if match is None:
+ return False
+ if not peek:
+ self.next_token = Token(name, match[0], self.position)
+ return True
+
+ def expect(self, name: str, *, expected: str) -> Token:
+ """Expect a certain token name next, failing with a syntax error otherwise.
+
+ The token is *not* read.
+ """
+ if not self.check(name):
+ raise self.raise_syntax_error(f"Expected {expected}")
+ return self.read()
+
+ def read(self) -> Token:
+ """Consume the next token and return it."""
+ token = self.next_token
+ assert token is not None
+
+ self.position += len(token.text)
+ self.next_token = None
+
+ return token
+
+ def raise_syntax_error(
+ self,
+ message: str,
+ *,
+ span_start: Optional[int] = None,
+ span_end: Optional[int] = None,
+ ) -> NoReturn:
+ """Raise ParserSyntaxError at the given position."""
+ span = (
+ self.position if span_start is None else span_start,
+ self.position if span_end is None else span_end,
+ )
+ raise ParserSyntaxError(
+ message,
+ source=self.source,
+ span=span,
+ )
+
+ @contextlib.contextmanager
+ def enclosing_tokens(
+ self, open_token: str, close_token: str, *, around: str
+ ) -> Iterator[None]:
+ if self.check(open_token):
+ open_position = self.position
+ self.read()
+ else:
+ open_position = None
+
+ yield
+
+ if open_position is None:
+ return
+
+ if not self.check(close_token):
+ self.raise_syntax_error(
+ f"Expected matching {close_token} for {open_token}, after {around}",
+ span_start=open_position,
+ )
+
+ self.read()
diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/packaging/markers.py b/deps/npm/node_modules/node-gyp/gyp/pylib/packaging/markers.py
new file mode 100644
index 00000000000000..8b98fca7233be6
--- /dev/null
+++ b/deps/npm/node_modules/node-gyp/gyp/pylib/packaging/markers.py
@@ -0,0 +1,252 @@
+# This file is dual licensed under the terms of the Apache License, Version
+# 2.0, and the BSD License. See the LICENSE file in the root of this repository
+# for complete details.
+
+import operator
+import os
+import platform
+import sys
+from typing import Any, Callable, Dict, List, Optional, Tuple, Union
+
+from ._parser import (
+ MarkerAtom,
+ MarkerList,
+ Op,
+ Value,
+ Variable,
+ parse_marker as _parse_marker,
+)
+from ._tokenizer import ParserSyntaxError
+from .specifiers import InvalidSpecifier, Specifier
+from .utils import canonicalize_name
+
+__all__ = [
+ "InvalidMarker",
+ "UndefinedComparison",
+ "UndefinedEnvironmentName",
+ "Marker",
+ "default_environment",
+]
+
+Operator = Callable[[str, str], bool]
+
+
+class InvalidMarker(ValueError):
+ """
+ An invalid marker was found, users should refer to PEP 508.
+ """
+
+
+class UndefinedComparison(ValueError):
+ """
+ An invalid operation was attempted on a value that doesn't support it.
+ """
+
+
+class UndefinedEnvironmentName(ValueError):
+ """
+ A name was attempted to be used that does not exist inside of the
+ environment.
+ """
+
+
+def _normalize_extra_values(results: Any) -> Any:
+ """
+ Normalize extra values.
+ """
+ if isinstance(results[0], tuple):
+ lhs, op, rhs = results[0]
+ if isinstance(lhs, Variable) and lhs.value == "extra":
+ normalized_extra = canonicalize_name(rhs.value)
+ rhs = Value(normalized_extra)
+ elif isinstance(rhs, Variable) and rhs.value == "extra":
+ normalized_extra = canonicalize_name(lhs.value)
+ lhs = Value(normalized_extra)
+ results[0] = lhs, op, rhs
+ return results
+
+
+def _format_marker(
+ marker: Union[List[str], MarkerAtom, str], first: Optional[bool] = True
+) -> str:
+
+ assert isinstance(marker, (list, tuple, str))
+
+ # Sometimes we have a structure like [[...]] which is a single item list
+ # where the single item is itself it's own list. In that case we want skip
+ # the rest of this function so that we don't get extraneous () on the
+ # outside.
+ if (
+ isinstance(marker, list)
+ and len(marker) == 1
+ and isinstance(marker[0], (list, tuple))
+ ):
+ return _format_marker(marker[0])
+
+ if isinstance(marker, list):
+ inner = (_format_marker(m, first=False) for m in marker)
+ if first:
+ return " ".join(inner)
+ else:
+ return "(" + " ".join(inner) + ")"
+ elif isinstance(marker, tuple):
+ return " ".join([m.serialize() for m in marker])
+ else:
+ return marker
+
+
+_operators: Dict[str, Operator] = {
+ "in": lambda lhs, rhs: lhs in rhs,
+ "not in": lambda lhs, rhs: lhs not in rhs,
+ "<": operator.lt,
+ "<=": operator.le,
+ "==": operator.eq,
+ "!=": operator.ne,
+ ">=": operator.ge,
+ ">": operator.gt,
+}
+
+
+def _eval_op(lhs: str, op: Op, rhs: str) -> bool:
+ try:
+ spec = Specifier("".join([op.serialize(), rhs]))
+ except InvalidSpecifier:
+ pass
+ else:
+ return spec.contains(lhs, prereleases=True)
+
+ oper: Optional[Operator] = _operators.get(op.serialize())
+ if oper is None:
+ raise UndefinedComparison(f"Undefined {op!r} on {lhs!r} and {rhs!r}.")
+
+ return oper(lhs, rhs)
+
+
+def _normalize(*values: str, key: str) -> Tuple[str, ...]:
+ # PEP 685 – Comparison of extra names for optional distribution dependencies
+ # https://peps.python.org/pep-0685/
+ # > When comparing extra names, tools MUST normalize the names being
+ # > compared using the semantics outlined in PEP 503 for names
+ if key == "extra":
+ return tuple(canonicalize_name(v) for v in values)
+
+ # other environment markers don't have such standards
+ return values
+
+
+def _evaluate_markers(markers: MarkerList, environment: Dict[str, str]) -> bool:
+ groups: List[List[bool]] = [[]]
+
+ for marker in markers:
+ assert isinstance(marker, (list, tuple, str))
+
+ if isinstance(marker, list):
+ groups[-1].append(_evaluate_markers(marker, environment))
+ elif isinstance(marker, tuple):
+ lhs, op, rhs = marker
+
+ if isinstance(lhs, Variable):
+ environment_key = lhs.value
+ lhs_value = environment[environment_key]
+ rhs_value = rhs.value
+ else:
+ lhs_value = lhs.value
+ environment_key = rhs.value
+ rhs_value = environment[environment_key]
+
+ lhs_value, rhs_value = _normalize(lhs_value, rhs_value, key=environment_key)
+ groups[-1].append(_eval_op(lhs_value, op, rhs_value))
+ else:
+ assert marker in ["and", "or"]
+ if marker == "or":
+ groups.append([])
+
+ return any(all(item) for item in groups)
+
+
+def format_full_version(info: "sys._version_info") -> str:
+ version = "{0.major}.{0.minor}.{0.micro}".format(info)
+ kind = info.releaselevel
+ if kind != "final":
+ version += kind[0] + str(info.serial)
+ return version
+
+
+def default_environment() -> Dict[str, str]:
+ iver = format_full_version(sys.implementation.version)
+ implementation_name = sys.implementation.name
+ return {
+ "implementation_name": implementation_name,
+ "implementation_version": iver,
+ "os_name": os.name,
+ "platform_machine": platform.machine(),
+ "platform_release": platform.release(),
+ "platform_system": platform.system(),
+ "platform_version": platform.version(),
+ "python_full_version": platform.python_version(),
+ "platform_python_implementation": platform.python_implementation(),
+ "python_version": ".".join(platform.python_version_tuple()[:2]),
+ "sys_platform": sys.platform,
+ }
+
+
+class Marker:
+ def __init__(self, marker: str) -> None:
+ # Note: We create a Marker object without calling this constructor in
+ # packaging.requirements.Requirement. If any additional logic is
+ # added here, make sure to mirror/adapt Requirement.
+ try:
+ self._markers = _normalize_extra_values(_parse_marker(marker))
+ # The attribute `_markers` can be described in terms of a recursive type:
+ # MarkerList = List[Union[Tuple[Node, ...], str, MarkerList]]
+ #
+ # For example, the following expression:
+ # python_version > "3.6" or (python_version == "3.6" and os_name == "unix")
+ #
+ # is parsed into:
+ # [
+ # (, ')>, ),
+ # 'and',
+ # [
+ # (, , ),
+ # 'or',
+ # (, , )
+ # ]
+ # ]
+ except ParserSyntaxError as e:
+ raise InvalidMarker(str(e)) from e
+
+ def __str__(self) -> str:
+ return _format_marker(self._markers)
+
+ def __repr__(self) -> str:
+ return f""
+
+ def __hash__(self) -> int:
+ return hash((self.__class__.__name__, str(self)))
+
+ def __eq__(self, other: Any) -> bool:
+ if not isinstance(other, Marker):
+ return NotImplemented
+
+ return str(self) == str(other)
+
+ def evaluate(self, environment: Optional[Dict[str, str]] = None) -> bool:
+ """Evaluate a marker.
+
+ Return the boolean from evaluating the given marker against the
+ environment. environment is an optional argument to override all or
+ part of the determined environment.
+
+ The environment is determined from the current Python process.
+ """
+ current_environment = default_environment()
+ current_environment["extra"] = ""
+ if environment is not None:
+ current_environment.update(environment)
+ # The API used to allow setting extra to None. We need to handle this
+ # case for backwards compatibility.
+ if current_environment["extra"] is None:
+ current_environment["extra"] = ""
+
+ return _evaluate_markers(self._markers, current_environment)
diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/packaging/metadata.py b/deps/npm/node_modules/node-gyp/gyp/pylib/packaging/metadata.py
new file mode 100644
index 00000000000000..fb274930799da0
--- /dev/null
+++ b/deps/npm/node_modules/node-gyp/gyp/pylib/packaging/metadata.py
@@ -0,0 +1,825 @@
+import email.feedparser
+import email.header
+import email.message
+import email.parser
+import email.policy
+import sys
+import typing
+from typing import (
+ Any,
+ Callable,
+ Dict,
+ Generic,
+ List,
+ Optional,
+ Tuple,
+ Type,
+ Union,
+ cast,
+)
+
+from . import requirements, specifiers, utils, version as version_module
+
+T = typing.TypeVar("T")
+if sys.version_info[:2] >= (3, 8): # pragma: no cover
+ from typing import Literal, TypedDict
+else: # pragma: no cover
+ if typing.TYPE_CHECKING:
+ from typing_extensions import Literal, TypedDict
+ else:
+ try:
+ from typing_extensions import Literal, TypedDict
+ except ImportError:
+
+ class Literal:
+ def __init_subclass__(*_args, **_kwargs):
+ pass
+
+ class TypedDict:
+ def __init_subclass__(*_args, **_kwargs):
+ pass
+
+
+try:
+ ExceptionGroup
+except NameError: # pragma: no cover
+
+ class ExceptionGroup(Exception): # noqa: N818
+ """A minimal implementation of :external:exc:`ExceptionGroup` from Python 3.11.
+
+ If :external:exc:`ExceptionGroup` is already defined by Python itself,
+ that version is used instead.
+ """
+
+ message: str
+ exceptions: List[Exception]
+
+ def __init__(self, message: str, exceptions: List[Exception]) -> None:
+ self.message = message
+ self.exceptions = exceptions
+
+ def __repr__(self) -> str:
+ return f"{self.__class__.__name__}({self.message!r}, {self.exceptions!r})"
+
+else: # pragma: no cover
+ ExceptionGroup = ExceptionGroup
+
+
+class InvalidMetadata(ValueError):
+ """A metadata field contains invalid data."""
+
+ field: str
+ """The name of the field that contains invalid data."""
+
+ def __init__(self, field: str, message: str) -> None:
+ self.field = field
+ super().__init__(message)
+
+
+# The RawMetadata class attempts to make as few assumptions about the underlying
+# serialization formats as possible. The idea is that as long as a serialization
+# formats offer some very basic primitives in *some* way then we can support
+# serializing to and from that format.
+class RawMetadata(TypedDict, total=False):
+ """A dictionary of raw core metadata.
+
+ Each field in core metadata maps to a key of this dictionary (when data is
+ provided). The key is lower-case and underscores are used instead of dashes
+ compared to the equivalent core metadata field. Any core metadata field that
+ can be specified multiple times or can hold multiple values in a single
+ field have a key with a plural name. See :class:`Metadata` whose attributes
+ match the keys of this dictionary.
+
+ Core metadata fields that can be specified multiple times are stored as a
+ list or dict depending on which is appropriate for the field. Any fields
+ which hold multiple values in a single field are stored as a list.
+
+ """
+
+ # Metadata 1.0 - PEP 241
+ metadata_version: str
+ name: str
+ version: str
+ platforms: List[str]
+ summary: str
+ description: str
+ keywords: List[str]
+ home_page: str
+ author: str
+ author_email: str
+ license: str
+
+ # Metadata 1.1 - PEP 314
+ supported_platforms: List[str]
+ download_url: str
+ classifiers: List[str]
+ requires: List[str]
+ provides: List[str]
+ obsoletes: List[str]
+
+ # Metadata 1.2 - PEP 345
+ maintainer: str
+ maintainer_email: str
+ requires_dist: List[str]
+ provides_dist: List[str]
+ obsoletes_dist: List[str]
+ requires_python: str
+ requires_external: List[str]
+ project_urls: Dict[str, str]
+
+ # Metadata 2.0
+ # PEP 426 attempted to completely revamp the metadata format
+ # but got stuck without ever being able to build consensus on
+ # it and ultimately ended up withdrawn.
+ #
+ # However, a number of tools had started emitting METADATA with
+ # `2.0` Metadata-Version, so for historical reasons, this version
+ # was skipped.
+
+ # Metadata 2.1 - PEP 566
+ description_content_type: str
+ provides_extra: List[str]
+
+ # Metadata 2.2 - PEP 643
+ dynamic: List[str]
+
+ # Metadata 2.3 - PEP 685
+ # No new fields were added in PEP 685, just some edge case were
+ # tightened up to provide better interoptability.
+
+
+_STRING_FIELDS = {
+ "author",
+ "author_email",
+ "description",
+ "description_content_type",
+ "download_url",
+ "home_page",
+ "license",
+ "maintainer",
+ "maintainer_email",
+ "metadata_version",
+ "name",
+ "requires_python",
+ "summary",
+ "version",
+}
+
+_LIST_FIELDS = {
+ "classifiers",
+ "dynamic",
+ "obsoletes",
+ "obsoletes_dist",
+ "platforms",
+ "provides",
+ "provides_dist",
+ "provides_extra",
+ "requires",
+ "requires_dist",
+ "requires_external",
+ "supported_platforms",
+}
+
+_DICT_FIELDS = {
+ "project_urls",
+}
+
+
+def _parse_keywords(data: str) -> List[str]:
+ """Split a string of comma-separate keyboards into a list of keywords."""
+ return [k.strip() for k in data.split(",")]
+
+
+def _parse_project_urls(data: List[str]) -> Dict[str, str]:
+ """Parse a list of label/URL string pairings separated by a comma."""
+ urls = {}
+ for pair in data:
+ # Our logic is slightly tricky here as we want to try and do
+ # *something* reasonable with malformed data.
+ #
+ # The main thing that we have to worry about, is data that does
+ # not have a ',' at all to split the label from the Value. There
+ # isn't a singular right answer here, and we will fail validation
+ # later on (if the caller is validating) so it doesn't *really*
+ # matter, but since the missing value has to be an empty str
+ # and our return value is dict[str, str], if we let the key
+ # be the missing value, then they'd have multiple '' values that
+ # overwrite each other in a accumulating dict.
+ #
+ # The other potentional issue is that it's possible to have the
+ # same label multiple times in the metadata, with no solid "right"
+ # answer with what to do in that case. As such, we'll do the only
+ # thing we can, which is treat the field as unparseable and add it
+ # to our list of unparsed fields.
+ parts = [p.strip() for p in pair.split(",", 1)]
+ parts.extend([""] * (max(0, 2 - len(parts)))) # Ensure 2 items
+
+ # TODO: The spec doesn't say anything about if the keys should be
+ # considered case sensitive or not... logically they should
+ # be case-preserving and case-insensitive, but doing that
+ # would open up more cases where we might have duplicate
+ # entries.
+ label, url = parts
+ if label in urls:
+ # The label already exists in our set of urls, so this field
+ # is unparseable, and we can just add the whole thing to our
+ # unparseable data and stop processing it.
+ raise KeyError("duplicate labels in project urls")
+ urls[label] = url
+
+ return urls
+
+
+def _get_payload(msg: email.message.Message, source: Union[bytes, str]) -> str:
+ """Get the body of the message."""
+ # If our source is a str, then our caller has managed encodings for us,
+ # and we don't need to deal with it.
+ if isinstance(source, str):
+ payload: str = msg.get_payload()
+ return payload
+ # If our source is a bytes, then we're managing the encoding and we need
+ # to deal with it.
+ else:
+ bpayload: bytes = msg.get_payload(decode=True)
+ try:
+ return bpayload.decode("utf8", "strict")
+ except UnicodeDecodeError:
+ raise ValueError("payload in an invalid encoding")
+
+
+# The various parse_FORMAT functions here are intended to be as lenient as
+# possible in their parsing, while still returning a correctly typed
+# RawMetadata.
+#
+# To aid in this, we also generally want to do as little touching of the
+# data as possible, except where there are possibly some historic holdovers
+# that make valid data awkward to work with.
+#
+# While this is a lower level, intermediate format than our ``Metadata``
+# class, some light touch ups can make a massive difference in usability.
+
+# Map METADATA fields to RawMetadata.
+_EMAIL_TO_RAW_MAPPING = {
+ "author": "author",
+ "author-email": "author_email",
+ "classifier": "classifiers",
+ "description": "description",
+ "description-content-type": "description_content_type",
+ "download-url": "download_url",
+ "dynamic": "dynamic",
+ "home-page": "home_page",
+ "keywords": "keywords",
+ "license": "license",
+ "maintainer": "maintainer",
+ "maintainer-email": "maintainer_email",
+ "metadata-version": "metadata_version",
+ "name": "name",
+ "obsoletes": "obsoletes",
+ "obsoletes-dist": "obsoletes_dist",
+ "platform": "platforms",
+ "project-url": "project_urls",
+ "provides": "provides",
+ "provides-dist": "provides_dist",
+ "provides-extra": "provides_extra",
+ "requires": "requires",
+ "requires-dist": "requires_dist",
+ "requires-external": "requires_external",
+ "requires-python": "requires_python",
+ "summary": "summary",
+ "supported-platform": "supported_platforms",
+ "version": "version",
+}
+_RAW_TO_EMAIL_MAPPING = {raw: email for email, raw in _EMAIL_TO_RAW_MAPPING.items()}
+
+
+def parse_email(data: Union[bytes, str]) -> Tuple[RawMetadata, Dict[str, List[str]]]:
+ """Parse a distribution's metadata stored as email headers (e.g. from ``METADATA``).
+
+ This function returns a two-item tuple of dicts. The first dict is of
+ recognized fields from the core metadata specification. Fields that can be
+ parsed and translated into Python's built-in types are converted
+ appropriately. All other fields are left as-is. Fields that are allowed to
+ appear multiple times are stored as lists.
+
+ The second dict contains all other fields from the metadata. This includes
+ any unrecognized fields. It also includes any fields which are expected to
+ be parsed into a built-in type but were not formatted appropriately. Finally,
+ any fields that are expected to appear only once but are repeated are
+ included in this dict.
+
+ """
+ raw: Dict[str, Union[str, List[str], Dict[str, str]]] = {}
+ unparsed: Dict[str, List[str]] = {}
+
+ if isinstance(data, str):
+ parsed = email.parser.Parser(policy=email.policy.compat32).parsestr(data)
+ else:
+ parsed = email.parser.BytesParser(policy=email.policy.compat32).parsebytes(data)
+
+ # We have to wrap parsed.keys() in a set, because in the case of multiple
+ # values for a key (a list), the key will appear multiple times in the
+ # list of keys, but we're avoiding that by using get_all().
+ for name in frozenset(parsed.keys()):
+ # Header names in RFC are case insensitive, so we'll normalize to all
+ # lower case to make comparisons easier.
+ name = name.lower()
+
+ # We use get_all() here, even for fields that aren't multiple use,
+ # because otherwise someone could have e.g. two Name fields, and we
+ # would just silently ignore it rather than doing something about it.
+ headers = parsed.get_all(name) or []
+
+ # The way the email module works when parsing bytes is that it
+ # unconditionally decodes the bytes as ascii using the surrogateescape
+ # handler. When you pull that data back out (such as with get_all() ),
+ # it looks to see if the str has any surrogate escapes, and if it does
+ # it wraps it in a Header object instead of returning the string.
+ #
+ # As such, we'll look for those Header objects, and fix up the encoding.
+ value = []
+ # Flag if we have run into any issues processing the headers, thus
+ # signalling that the data belongs in 'unparsed'.
+ valid_encoding = True
+ for h in headers:
+ # It's unclear if this can return more types than just a Header or
+ # a str, so we'll just assert here to make sure.
+ assert isinstance(h, (email.header.Header, str))
+
+ # If it's a header object, we need to do our little dance to get
+ # the real data out of it. In cases where there is invalid data
+ # we're going to end up with mojibake, but there's no obvious, good
+ # way around that without reimplementing parts of the Header object
+ # ourselves.
+ #
+ # That should be fine since, if mojibacked happens, this key is
+ # going into the unparsed dict anyways.
+ if isinstance(h, email.header.Header):
+ # The Header object stores it's data as chunks, and each chunk
+ # can be independently encoded, so we'll need to check each
+ # of them.
+ chunks: List[Tuple[bytes, Optional[str]]] = []
+ for bin, encoding in email.header.decode_header(h):
+ try:
+ bin.decode("utf8", "strict")
+ except UnicodeDecodeError:
+ # Enable mojibake.
+ encoding = "latin1"
+ valid_encoding = False
+ else:
+ encoding = "utf8"
+ chunks.append((bin, encoding))
+
+ # Turn our chunks back into a Header object, then let that
+ # Header object do the right thing to turn them into a
+ # string for us.
+ value.append(str(email.header.make_header(chunks)))
+ # This is already a string, so just add it.
+ else:
+ value.append(h)
+
+ # We've processed all of our values to get them into a list of str,
+ # but we may have mojibake data, in which case this is an unparsed
+ # field.
+ if not valid_encoding:
+ unparsed[name] = value
+ continue
+
+ raw_name = _EMAIL_TO_RAW_MAPPING.get(name)
+ if raw_name is None:
+ # This is a bit of a weird situation, we've encountered a key that
+ # we don't know what it means, so we don't know whether it's meant
+ # to be a list or not.
+ #
+ # Since we can't really tell one way or another, we'll just leave it
+ # as a list, even though it may be a single item list, because that's
+ # what makes the most sense for email headers.
+ unparsed[name] = value
+ continue
+
+ # If this is one of our string fields, then we'll check to see if our
+ # value is a list of a single item. If it is then we'll assume that
+ # it was emitted as a single string, and unwrap the str from inside
+ # the list.
+ #
+ # If it's any other kind of data, then we haven't the faintest clue
+ # what we should parse it as, and we have to just add it to our list
+ # of unparsed stuff.
+ if raw_name in _STRING_FIELDS and len(value) == 1:
+ raw[raw_name] = value[0]
+ # If this is one of our list of string fields, then we can just assign
+ # the value, since email *only* has strings, and our get_all() call
+ # above ensures that this is a list.
+ elif raw_name in _LIST_FIELDS:
+ raw[raw_name] = value
+ # Special Case: Keywords
+ # The keywords field is implemented in the metadata spec as a str,
+ # but it conceptually is a list of strings, and is serialized using
+ # ", ".join(keywords), so we'll do some light data massaging to turn
+ # this into what it logically is.
+ elif raw_name == "keywords" and len(value) == 1:
+ raw[raw_name] = _parse_keywords(value[0])
+ # Special Case: Project-URL
+ # The project urls is implemented in the metadata spec as a list of
+ # specially-formatted strings that represent a key and a value, which
+ # is fundamentally a mapping, however the email format doesn't support
+ # mappings in a sane way, so it was crammed into a list of strings
+ # instead.
+ #
+ # We will do a little light data massaging to turn this into a map as
+ # it logically should be.
+ elif raw_name == "project_urls":
+ try:
+ raw[raw_name] = _parse_project_urls(value)
+ except KeyError:
+ unparsed[name] = value
+ # Nothing that we've done has managed to parse this, so it'll just
+ # throw it in our unparseable data and move on.
+ else:
+ unparsed[name] = value
+
+ # We need to support getting the Description from the message payload in
+ # addition to getting it from the the headers. This does mean, though, there
+ # is the possibility of it being set both ways, in which case we put both
+ # in 'unparsed' since we don't know which is right.
+ try:
+ payload = _get_payload(parsed, data)
+ except ValueError:
+ unparsed.setdefault("description", []).append(
+ parsed.get_payload(decode=isinstance(data, bytes))
+ )
+ else:
+ if payload:
+ # Check to see if we've already got a description, if so then both
+ # it, and this body move to unparseable.
+ if "description" in raw:
+ description_header = cast(str, raw.pop("description"))
+ unparsed.setdefault("description", []).extend(
+ [description_header, payload]
+ )
+ elif "description" in unparsed:
+ unparsed["description"].append(payload)
+ else:
+ raw["description"] = payload
+
+ # We need to cast our `raw` to a metadata, because a TypedDict only support
+ # literal key names, but we're computing our key names on purpose, but the
+ # way this function is implemented, our `TypedDict` can only have valid key
+ # names.
+ return cast(RawMetadata, raw), unparsed
+
+
+_NOT_FOUND = object()
+
+
+# Keep the two values in sync.
+_VALID_METADATA_VERSIONS = ["1.0", "1.1", "1.2", "2.1", "2.2", "2.3"]
+_MetadataVersion = Literal["1.0", "1.1", "1.2", "2.1", "2.2", "2.3"]
+
+_REQUIRED_ATTRS = frozenset(["metadata_version", "name", "version"])
+
+
+class _Validator(Generic[T]):
+ """Validate a metadata field.
+
+ All _process_*() methods correspond to a core metadata field. The method is
+ called with the field's raw value. If the raw value is valid it is returned
+ in its "enriched" form (e.g. ``version.Version`` for the ``Version`` field).
+ If the raw value is invalid, :exc:`InvalidMetadata` is raised (with a cause
+ as appropriate).
+ """
+
+ name: str
+ raw_name: str
+ added: _MetadataVersion
+
+ def __init__(
+ self,
+ *,
+ added: _MetadataVersion = "1.0",
+ ) -> None:
+ self.added = added
+
+ def __set_name__(self, _owner: "Metadata", name: str) -> None:
+ self.name = name
+ self.raw_name = _RAW_TO_EMAIL_MAPPING[name]
+
+ def __get__(self, instance: "Metadata", _owner: Type["Metadata"]) -> T:
+ # With Python 3.8, the caching can be replaced with functools.cached_property().
+ # No need to check the cache as attribute lookup will resolve into the
+ # instance's __dict__ before __get__ is called.
+ cache = instance.__dict__
+ value = instance._raw.get(self.name)
+
+ # To make the _process_* methods easier, we'll check if the value is None
+ # and if this field is NOT a required attribute, and if both of those
+ # things are true, we'll skip the the converter. This will mean that the
+ # converters never have to deal with the None union.
+ if self.name in _REQUIRED_ATTRS or value is not None:
+ try:
+ converter: Callable[[Any], T] = getattr(self, f"_process_{self.name}")
+ except AttributeError:
+ pass
+ else:
+ value = converter(value)
+
+ cache[self.name] = value
+ try:
+ del instance._raw[self.name] # type: ignore[misc]
+ except KeyError:
+ pass
+
+ return cast(T, value)
+
+ def _invalid_metadata(
+ self, msg: str, cause: Optional[Exception] = None
+ ) -> InvalidMetadata:
+ exc = InvalidMetadata(
+ self.raw_name, msg.format_map({"field": repr(self.raw_name)})
+ )
+ exc.__cause__ = cause
+ return exc
+
+ def _process_metadata_version(self, value: str) -> _MetadataVersion:
+ # Implicitly makes Metadata-Version required.
+ if value not in _VALID_METADATA_VERSIONS:
+ raise self._invalid_metadata(f"{value!r} is not a valid metadata version")
+ return cast(_MetadataVersion, value)
+
+ def _process_name(self, value: str) -> str:
+ if not value:
+ raise self._invalid_metadata("{field} is a required field")
+ # Validate the name as a side-effect.
+ try:
+ utils.canonicalize_name(value, validate=True)
+ except utils.InvalidName as exc:
+ raise self._invalid_metadata(
+ f"{value!r} is invalid for {{field}}", cause=exc
+ )
+ else:
+ return value
+
+ def _process_version(self, value: str) -> version_module.Version:
+ if not value:
+ raise self._invalid_metadata("{field} is a required field")
+ try:
+ return version_module.parse(value)
+ except version_module.InvalidVersion as exc:
+ raise self._invalid_metadata(
+ f"{value!r} is invalid for {{field}}", cause=exc
+ )
+
+ def _process_summary(self, value: str) -> str:
+ """Check the field contains no newlines."""
+ if "\n" in value:
+ raise self._invalid_metadata("{field} must be a single line")
+ return value
+
+ def _process_description_content_type(self, value: str) -> str:
+ content_types = {"text/plain", "text/x-rst", "text/markdown"}
+ message = email.message.EmailMessage()
+ message["content-type"] = value
+
+ content_type, parameters = (
+ # Defaults to `text/plain` if parsing failed.
+ message.get_content_type().lower(),
+ message["content-type"].params,
+ )
+ # Check if content-type is valid or defaulted to `text/plain` and thus was
+ # not parseable.
+ if content_type not in content_types or content_type not in value.lower():
+ raise self._invalid_metadata(
+ f"{{field}} must be one of {list(content_types)}, not {value!r}"
+ )
+
+ charset = parameters.get("charset", "UTF-8")
+ if charset != "UTF-8":
+ raise self._invalid_metadata(
+ f"{{field}} can only specify the UTF-8 charset, not {list(charset)}"
+ )
+
+ markdown_variants = {"GFM", "CommonMark"}
+ variant = parameters.get("variant", "GFM") # Use an acceptable default.
+ if content_type == "text/markdown" and variant not in markdown_variants:
+ raise self._invalid_metadata(
+ f"valid Markdown variants for {{field}} are {list(markdown_variants)}, "
+ f"not {variant!r}",
+ )
+ return value
+
+ def _process_dynamic(self, value: List[str]) -> List[str]:
+ for dynamic_field in map(str.lower, value):
+ if dynamic_field in {"name", "version", "metadata-version"}:
+ raise self._invalid_metadata(
+ f"{value!r} is not allowed as a dynamic field"
+ )
+ elif dynamic_field not in _EMAIL_TO_RAW_MAPPING:
+ raise self._invalid_metadata(f"{value!r} is not a valid dynamic field")
+ return list(map(str.lower, value))
+
+ def _process_provides_extra(
+ self,
+ value: List[str],
+ ) -> List[utils.NormalizedName]:
+ normalized_names = []
+ try:
+ for name in value:
+ normalized_names.append(utils.canonicalize_name(name, validate=True))
+ except utils.InvalidName as exc:
+ raise self._invalid_metadata(
+ f"{name!r} is invalid for {{field}}", cause=exc
+ )
+ else:
+ return normalized_names
+
+ def _process_requires_python(self, value: str) -> specifiers.SpecifierSet:
+ try:
+ return specifiers.SpecifierSet(value)
+ except specifiers.InvalidSpecifier as exc:
+ raise self._invalid_metadata(
+ f"{value!r} is invalid for {{field}}", cause=exc
+ )
+
+ def _process_requires_dist(
+ self,
+ value: List[str],
+ ) -> List[requirements.Requirement]:
+ reqs = []
+ try:
+ for req in value:
+ reqs.append(requirements.Requirement(req))
+ except requirements.InvalidRequirement as exc:
+ raise self._invalid_metadata(f"{req!r} is invalid for {{field}}", cause=exc)
+ else:
+ return reqs
+
+
+class Metadata:
+ """Representation of distribution metadata.
+
+ Compared to :class:`RawMetadata`, this class provides objects representing
+ metadata fields instead of only using built-in types. Any invalid metadata
+ will cause :exc:`InvalidMetadata` to be raised (with a
+ :py:attr:`~BaseException.__cause__` attribute as appropriate).
+ """
+
+ _raw: RawMetadata
+
+ @classmethod
+ def from_raw(cls, data: RawMetadata, *, validate: bool = True) -> "Metadata":
+ """Create an instance from :class:`RawMetadata`.
+
+ If *validate* is true, all metadata will be validated. All exceptions
+ related to validation will be gathered and raised as an :class:`ExceptionGroup`.
+ """
+ ins = cls()
+ ins._raw = data.copy() # Mutations occur due to caching enriched values.
+
+ if validate:
+ exceptions: List[Exception] = []
+ try:
+ metadata_version = ins.metadata_version
+ metadata_age = _VALID_METADATA_VERSIONS.index(metadata_version)
+ except InvalidMetadata as metadata_version_exc:
+ exceptions.append(metadata_version_exc)
+ metadata_version = None
+
+ # Make sure to check for the fields that are present, the required
+ # fields (so their absence can be reported).
+ fields_to_check = frozenset(ins._raw) | _REQUIRED_ATTRS
+ # Remove fields that have already been checked.
+ fields_to_check -= {"metadata_version"}
+
+ for key in fields_to_check:
+ try:
+ if metadata_version:
+ # Can't use getattr() as that triggers descriptor protocol which
+ # will fail due to no value for the instance argument.
+ try:
+ field_metadata_version = cls.__dict__[key].added
+ except KeyError:
+ exc = InvalidMetadata(key, f"unrecognized field: {key!r}")
+ exceptions.append(exc)
+ continue
+ field_age = _VALID_METADATA_VERSIONS.index(
+ field_metadata_version
+ )
+ if field_age > metadata_age:
+ field = _RAW_TO_EMAIL_MAPPING[key]
+ exc = InvalidMetadata(
+ field,
+ "{field} introduced in metadata version "
+ "{field_metadata_version}, not {metadata_version}",
+ )
+ exceptions.append(exc)
+ continue
+ getattr(ins, key)
+ except InvalidMetadata as exc:
+ exceptions.append(exc)
+
+ if exceptions:
+ raise ExceptionGroup("invalid metadata", exceptions)
+
+ return ins
+
+ @classmethod
+ def from_email(
+ cls, data: Union[bytes, str], *, validate: bool = True
+ ) -> "Metadata":
+ """Parse metadata from email headers.
+
+ If *validate* is true, the metadata will be validated. All exceptions
+ related to validation will be gathered and raised as an :class:`ExceptionGroup`.
+ """
+ raw, unparsed = parse_email(data)
+
+ if validate:
+ exceptions: list[Exception] = []
+ for unparsed_key in unparsed:
+ if unparsed_key in _EMAIL_TO_RAW_MAPPING:
+ message = f"{unparsed_key!r} has invalid data"
+ else:
+ message = f"unrecognized field: {unparsed_key!r}"
+ exceptions.append(InvalidMetadata(unparsed_key, message))
+
+ if exceptions:
+ raise ExceptionGroup("unparsed", exceptions)
+
+ try:
+ return cls.from_raw(raw, validate=validate)
+ except ExceptionGroup as exc_group:
+ raise ExceptionGroup(
+ "invalid or unparsed metadata", exc_group.exceptions
+ ) from None
+
+ metadata_version: _Validator[_MetadataVersion] = _Validator()
+ """:external:ref:`core-metadata-metadata-version`
+ (required; validated to be a valid metadata version)"""
+ name: _Validator[str] = _Validator()
+ """:external:ref:`core-metadata-name`
+ (required; validated using :func:`~packaging.utils.canonicalize_name` and its
+ *validate* parameter)"""
+ version: _Validator[version_module.Version] = _Validator()
+ """:external:ref:`core-metadata-version` (required)"""
+ dynamic: _Validator[Optional[List[str]]] = _Validator(
+ added="2.2",
+ )
+ """:external:ref:`core-metadata-dynamic`
+ (validated against core metadata field names and lowercased)"""
+ platforms: _Validator[Optional[List[str]]] = _Validator()
+ """:external:ref:`core-metadata-platform`"""
+ supported_platforms: _Validator[Optional[List[str]]] = _Validator(added="1.1")
+ """:external:ref:`core-metadata-supported-platform`"""
+ summary: _Validator[Optional[str]] = _Validator()
+ """:external:ref:`core-metadata-summary` (validated to contain no newlines)"""
+ description: _Validator[Optional[str]] = _Validator() # TODO 2.1: can be in body
+ """:external:ref:`core-metadata-description`"""
+ description_content_type: _Validator[Optional[str]] = _Validator(added="2.1")
+ """:external:ref:`core-metadata-description-content-type` (validated)"""
+ keywords: _Validator[Optional[List[str]]] = _Validator()
+ """:external:ref:`core-metadata-keywords`"""
+ home_page: _Validator[Optional[str]] = _Validator()
+ """:external:ref:`core-metadata-home-page`"""
+ download_url: _Validator[Optional[str]] = _Validator(added="1.1")
+ """:external:ref:`core-metadata-download-url`"""
+ author: _Validator[Optional[str]] = _Validator()
+ """:external:ref:`core-metadata-author`"""
+ author_email: _Validator[Optional[str]] = _Validator()
+ """:external:ref:`core-metadata-author-email`"""
+ maintainer: _Validator[Optional[str]] = _Validator(added="1.2")
+ """:external:ref:`core-metadata-maintainer`"""
+ maintainer_email: _Validator[Optional[str]] = _Validator(added="1.2")
+ """:external:ref:`core-metadata-maintainer-email`"""
+ license: _Validator[Optional[str]] = _Validator()
+ """:external:ref:`core-metadata-license`"""
+ classifiers: _Validator[Optional[List[str]]] = _Validator(added="1.1")
+ """:external:ref:`core-metadata-classifier`"""
+ requires_dist: _Validator[Optional[List[requirements.Requirement]]] = _Validator(
+ added="1.2"
+ )
+ """:external:ref:`core-metadata-requires-dist`"""
+ requires_python: _Validator[Optional[specifiers.SpecifierSet]] = _Validator(
+ added="1.2"
+ )
+ """:external:ref:`core-metadata-requires-python`"""
+ # Because `Requires-External` allows for non-PEP 440 version specifiers, we
+ # don't do any processing on the values.
+ requires_external: _Validator[Optional[List[str]]] = _Validator(added="1.2")
+ """:external:ref:`core-metadata-requires-external`"""
+ project_urls: _Validator[Optional[Dict[str, str]]] = _Validator(added="1.2")
+ """:external:ref:`core-metadata-project-url`"""
+ # PEP 685 lets us raise an error if an extra doesn't pass `Name` validation
+ # regardless of metadata version.
+ provides_extra: _Validator[Optional[List[utils.NormalizedName]]] = _Validator(
+ added="2.1",
+ )
+ """:external:ref:`core-metadata-provides-extra`"""
+ provides_dist: _Validator[Optional[List[str]]] = _Validator(added="1.2")
+ """:external:ref:`core-metadata-provides-dist`"""
+ obsoletes_dist: _Validator[Optional[List[str]]] = _Validator(added="1.2")
+ """:external:ref:`core-metadata-obsoletes-dist`"""
+ requires: _Validator[Optional[List[str]]] = _Validator(added="1.1")
+ """``Requires`` (deprecated)"""
+ provides: _Validator[Optional[List[str]]] = _Validator(added="1.1")
+ """``Provides`` (deprecated)"""
+ obsoletes: _Validator[Optional[List[str]]] = _Validator(added="1.1")
+ """``Obsoletes`` (deprecated)"""
diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/packaging/py.typed b/deps/npm/node_modules/node-gyp/gyp/pylib/packaging/py.typed
new file mode 100644
index 00000000000000..e69de29bb2d1d6
diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/packaging/requirements.py b/deps/npm/node_modules/node-gyp/gyp/pylib/packaging/requirements.py
new file mode 100644
index 00000000000000..0c00eba331b736
--- /dev/null
+++ b/deps/npm/node_modules/node-gyp/gyp/pylib/packaging/requirements.py
@@ -0,0 +1,90 @@
+# This file is dual licensed under the terms of the Apache License, Version
+# 2.0, and the BSD License. See the LICENSE file in the root of this repository
+# for complete details.
+
+from typing import Any, Iterator, Optional, Set
+
+from ._parser import parse_requirement as _parse_requirement
+from ._tokenizer import ParserSyntaxError
+from .markers import Marker, _normalize_extra_values
+from .specifiers import SpecifierSet
+from .utils import canonicalize_name
+
+
+class InvalidRequirement(ValueError):
+ """
+ An invalid requirement was found, users should refer to PEP 508.
+ """
+
+
+class Requirement:
+ """Parse a requirement.
+
+ Parse a given requirement string into its parts, such as name, specifier,
+ URL, and extras. Raises InvalidRequirement on a badly-formed requirement
+ string.
+ """
+
+ # TODO: Can we test whether something is contained within a requirement?
+ # If so how do we do that? Do we need to test against the _name_ of
+ # the thing as well as the version? What about the markers?
+ # TODO: Can we normalize the name and extra name?
+
+ def __init__(self, requirement_string: str) -> None:
+ try:
+ parsed = _parse_requirement(requirement_string)
+ except ParserSyntaxError as e:
+ raise InvalidRequirement(str(e)) from e
+
+ self.name: str = parsed.name
+ self.url: Optional[str] = parsed.url or None
+ self.extras: Set[str] = set(parsed.extras if parsed.extras else [])
+ self.specifier: SpecifierSet = SpecifierSet(parsed.specifier)
+ self.marker: Optional[Marker] = None
+ if parsed.marker is not None:
+ self.marker = Marker.__new__(Marker)
+ self.marker._markers = _normalize_extra_values(parsed.marker)
+
+ def _iter_parts(self, name: str) -> Iterator[str]:
+ yield name
+
+ if self.extras:
+ formatted_extras = ",".join(sorted(self.extras))
+ yield f"[{formatted_extras}]"
+
+ if self.specifier:
+ yield str(self.specifier)
+
+ if self.url:
+ yield f"@ {self.url}"
+ if self.marker:
+ yield " "
+
+ if self.marker:
+ yield f"; {self.marker}"
+
+ def __str__(self) -> str:
+ return "".join(self._iter_parts(self.name))
+
+ def __repr__(self) -> str:
+ return f""
+
+ def __hash__(self) -> int:
+ return hash(
+ (
+ self.__class__.__name__,
+ *self._iter_parts(canonicalize_name(self.name)),
+ )
+ )
+
+ def __eq__(self, other: Any) -> bool:
+ if not isinstance(other, Requirement):
+ return NotImplemented
+
+ return (
+ canonicalize_name(self.name) == canonicalize_name(other.name)
+ and self.extras == other.extras
+ and self.specifier == other.specifier
+ and self.url == other.url
+ and self.marker == other.marker
+ )
diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/packaging/specifiers.py b/deps/npm/node_modules/node-gyp/gyp/pylib/packaging/specifiers.py
new file mode 100644
index 00000000000000..94448327ae2d44
--- /dev/null
+++ b/deps/npm/node_modules/node-gyp/gyp/pylib/packaging/specifiers.py
@@ -0,0 +1,1030 @@
+# This file is dual licensed under the terms of the Apache License, Version
+# 2.0, and the BSD License. See the LICENSE file in the root of this repository
+# for complete details.
+"""
+.. testsetup::
+
+ from packaging.specifiers import Specifier, SpecifierSet, InvalidSpecifier
+ from packaging.version import Version
+"""
+
+import abc
+import itertools
+import re
+from typing import (
+ Callable,
+ Iterable,
+ Iterator,
+ List,
+ Optional,
+ Set,
+ Tuple,
+ TypeVar,
+ Union,
+)
+
+from .utils import canonicalize_version
+from .version import Version
+
+UnparsedVersion = Union[Version, str]
+UnparsedVersionVar = TypeVar("UnparsedVersionVar", bound=UnparsedVersion)
+CallableOperator = Callable[[Version, str], bool]
+
+
+def _coerce_version(version: UnparsedVersion) -> Version:
+ if not isinstance(version, Version):
+ version = Version(version)
+ return version
+
+
+class InvalidSpecifier(ValueError):
+ """
+ Raised when attempting to create a :class:`Specifier` with a specifier
+ string that is invalid.
+
+ >>> Specifier("lolwat")
+ Traceback (most recent call last):
+ ...
+ packaging.specifiers.InvalidSpecifier: Invalid specifier: 'lolwat'
+ """
+
+
+class BaseSpecifier(metaclass=abc.ABCMeta):
+ @abc.abstractmethod
+ def __str__(self) -> str:
+ """
+ Returns the str representation of this Specifier-like object. This
+ should be representative of the Specifier itself.
+ """
+
+ @abc.abstractmethod
+ def __hash__(self) -> int:
+ """
+ Returns a hash value for this Specifier-like object.
+ """
+
+ @abc.abstractmethod
+ def __eq__(self, other: object) -> bool:
+ """
+ Returns a boolean representing whether or not the two Specifier-like
+ objects are equal.
+
+ :param other: The other object to check against.
+ """
+
+ @property
+ @abc.abstractmethod
+ def prereleases(self) -> Optional[bool]:
+ """Whether or not pre-releases as a whole are allowed.
+
+ This can be set to either ``True`` or ``False`` to explicitly enable or disable
+ prereleases or it can be set to ``None`` (the default) to use default semantics.
+ """
+
+ @prereleases.setter
+ def prereleases(self, value: bool) -> None:
+ """Setter for :attr:`prereleases`.
+
+ :param value: The value to set.
+ """
+
+ @abc.abstractmethod
+ def contains(self, item: str, prereleases: Optional[bool] = None) -> bool:
+ """
+ Determines if the given item is contained within this specifier.
+ """
+
+ @abc.abstractmethod
+ def filter(
+ self, iterable: Iterable[UnparsedVersionVar], prereleases: Optional[bool] = None
+ ) -> Iterator[UnparsedVersionVar]:
+ """
+ Takes an iterable of items and filters them so that only items which
+ are contained within this specifier are allowed in it.
+ """
+
+
+class Specifier(BaseSpecifier):
+ """This class abstracts handling of version specifiers.
+
+ .. tip::
+
+ It is generally not required to instantiate this manually. You should instead
+ prefer to work with :class:`SpecifierSet` instead, which can parse
+ comma-separated version specifiers (which is what package metadata contains).
+ """
+
+ _operator_regex_str = r"""
+ (?P(~=|==|!=|<=|>=|<|>|===))
+ """
+ _version_regex_str = r"""
+ (?P
+ (?:
+ # The identity operators allow for an escape hatch that will
+ # do an exact string match of the version you wish to install.
+ # This will not be parsed by PEP 440 and we cannot determine
+ # any semantic meaning from it. This operator is discouraged
+ # but included entirely as an escape hatch.
+ (?<====) # Only match for the identity operator
+ \s*
+ [^\s;)]* # The arbitrary version can be just about anything,
+ # we match everything except for whitespace, a
+ # semi-colon for marker support, and a closing paren
+ # since versions can be enclosed in them.
+ )
+ |
+ (?:
+ # The (non)equality operators allow for wild card and local
+ # versions to be specified so we have to define these two
+ # operators separately to enable that.
+ (?<===|!=) # Only match for equals and not equals
+
+ \s*
+ v?
+ (?:[0-9]+!)? # epoch
+ [0-9]+(?:\.[0-9]+)* # release
+
+ # You cannot use a wild card and a pre-release, post-release, a dev or
+ # local version together so group them with a | and make them optional.
+ (?:
+ \.\* # Wild card syntax of .*
+ |
+ (?: # pre release
+ [-_\.]?
+ (alpha|beta|preview|pre|a|b|c|rc)
+ [-_\.]?
+ [0-9]*
+ )?
+ (?: # post release
+ (?:-[0-9]+)|(?:[-_\.]?(post|rev|r)[-_\.]?[0-9]*)
+ )?
+ (?:[-_\.]?dev[-_\.]?[0-9]*)? # dev release
+ (?:\+[a-z0-9]+(?:[-_\.][a-z0-9]+)*)? # local
+ )?
+ )
+ |
+ (?:
+ # The compatible operator requires at least two digits in the
+ # release segment.
+ (?<=~=) # Only match for the compatible operator
+
+ \s*
+ v?
+ (?:[0-9]+!)? # epoch
+ [0-9]+(?:\.[0-9]+)+ # release (We have a + instead of a *)
+ (?: # pre release
+ [-_\.]?
+ (alpha|beta|preview|pre|a|b|c|rc)
+ [-_\.]?
+ [0-9]*
+ )?
+ (?: # post release
+ (?:-[0-9]+)|(?:[-_\.]?(post|rev|r)[-_\.]?[0-9]*)
+ )?
+ (?:[-_\.]?dev[-_\.]?[0-9]*)? # dev release
+ )
+ |
+ (?:
+ # All other operators only allow a sub set of what the
+ # (non)equality operators do. Specifically they do not allow
+ # local versions to be specified nor do they allow the prefix
+ # matching wild cards.
+ (?=": "greater_than_equal",
+ "<": "less_than",
+ ">": "greater_than",
+ "===": "arbitrary",
+ }
+
+ def __init__(self, spec: str = "", prereleases: Optional[bool] = None) -> None:
+ """Initialize a Specifier instance.
+
+ :param spec:
+ The string representation of a specifier which will be parsed and
+ normalized before use.
+ :param prereleases:
+ This tells the specifier if it should accept prerelease versions if
+ applicable or not. The default of ``None`` will autodetect it from the
+ given specifiers.
+ :raises InvalidSpecifier:
+ If the given specifier is invalid (i.e. bad syntax).
+ """
+ match = self._regex.search(spec)
+ if not match:
+ raise InvalidSpecifier(f"Invalid specifier: '{spec}'")
+
+ self._spec: Tuple[str, str] = (
+ match.group("operator").strip(),
+ match.group("version").strip(),
+ )
+
+ # Store whether or not this Specifier should accept prereleases
+ self._prereleases = prereleases
+
+ # https://github.com/python/mypy/pull/13475#pullrequestreview-1079784515
+ @property # type: ignore[override]
+ def prereleases(self) -> bool:
+ # If there is an explicit prereleases set for this, then we'll just
+ # blindly use that.
+ if self._prereleases is not None:
+ return self._prereleases
+
+ # Look at all of our specifiers and determine if they are inclusive
+ # operators, and if they are if they are including an explicit
+ # prerelease.
+ operator, version = self._spec
+ if operator in ["==", ">=", "<=", "~=", "==="]:
+ # The == specifier can include a trailing .*, if it does we
+ # want to remove before parsing.
+ if operator == "==" and version.endswith(".*"):
+ version = version[:-2]
+
+ # Parse the version, and if it is a pre-release than this
+ # specifier allows pre-releases.
+ if Version(version).is_prerelease:
+ return True
+
+ return False
+
+ @prereleases.setter
+ def prereleases(self, value: bool) -> None:
+ self._prereleases = value
+
+ @property
+ def operator(self) -> str:
+ """The operator of this specifier.
+
+ >>> Specifier("==1.2.3").operator
+ '=='
+ """
+ return self._spec[0]
+
+ @property
+ def version(self) -> str:
+ """The version of this specifier.
+
+ >>> Specifier("==1.2.3").version
+ '1.2.3'
+ """
+ return self._spec[1]
+
+ def __repr__(self) -> str:
+ """A representation of the Specifier that shows all internal state.
+
+ >>> Specifier('>=1.0.0')
+ =1.0.0')>
+ >>> Specifier('>=1.0.0', prereleases=False)
+ =1.0.0', prereleases=False)>
+ >>> Specifier('>=1.0.0', prereleases=True)
+ =1.0.0', prereleases=True)>
+ """
+ pre = (
+ f", prereleases={self.prereleases!r}"
+ if self._prereleases is not None
+ else ""
+ )
+
+ return f"<{self.__class__.__name__}({str(self)!r}{pre})>"
+
+ def __str__(self) -> str:
+ """A string representation of the Specifier that can be round-tripped.
+
+ >>> str(Specifier('>=1.0.0'))
+ '>=1.0.0'
+ >>> str(Specifier('>=1.0.0', prereleases=False))
+ '>=1.0.0'
+ """
+ return "{}{}".format(*self._spec)
+
+ @property
+ def _canonical_spec(self) -> Tuple[str, str]:
+ canonical_version = canonicalize_version(
+ self._spec[1],
+ strip_trailing_zero=(self._spec[0] != "~="),
+ )
+ return self._spec[0], canonical_version
+
+ def __hash__(self) -> int:
+ return hash(self._canonical_spec)
+
+ def __eq__(self, other: object) -> bool:
+ """Whether or not the two Specifier-like objects are equal.
+
+ :param other: The other object to check against.
+
+ The value of :attr:`prereleases` is ignored.
+
+ >>> Specifier("==1.2.3") == Specifier("== 1.2.3.0")
+ True
+ >>> (Specifier("==1.2.3", prereleases=False) ==
+ ... Specifier("==1.2.3", prereleases=True))
+ True
+ >>> Specifier("==1.2.3") == "==1.2.3"
+ True
+ >>> Specifier("==1.2.3") == Specifier("==1.2.4")
+ False
+ >>> Specifier("==1.2.3") == Specifier("~=1.2.3")
+ False
+ """
+ if isinstance(other, str):
+ try:
+ other = self.__class__(str(other))
+ except InvalidSpecifier:
+ return NotImplemented
+ elif not isinstance(other, self.__class__):
+ return NotImplemented
+
+ return self._canonical_spec == other._canonical_spec
+
+ def _get_operator(self, op: str) -> CallableOperator:
+ operator_callable: CallableOperator = getattr(
+ self, f"_compare_{self._operators[op]}"
+ )
+ return operator_callable
+
+ def _compare_compatible(self, prospective: Version, spec: str) -> bool:
+
+ # Compatible releases have an equivalent combination of >= and ==. That
+ # is that ~=2.2 is equivalent to >=2.2,==2.*. This allows us to
+ # implement this in terms of the other specifiers instead of
+ # implementing it ourselves. The only thing we need to do is construct
+ # the other specifiers.
+
+ # We want everything but the last item in the version, but we want to
+ # ignore suffix segments.
+ prefix = _version_join(
+ list(itertools.takewhile(_is_not_suffix, _version_split(spec)))[:-1]
+ )
+
+ # Add the prefix notation to the end of our string
+ prefix += ".*"
+
+ return self._get_operator(">=")(prospective, spec) and self._get_operator("==")(
+ prospective, prefix
+ )
+
+ def _compare_equal(self, prospective: Version, spec: str) -> bool:
+
+ # We need special logic to handle prefix matching
+ if spec.endswith(".*"):
+ # In the case of prefix matching we want to ignore local segment.
+ normalized_prospective = canonicalize_version(
+ prospective.public, strip_trailing_zero=False
+ )
+ # Get the normalized version string ignoring the trailing .*
+ normalized_spec = canonicalize_version(spec[:-2], strip_trailing_zero=False)
+ # Split the spec out by bangs and dots, and pretend that there is
+ # an implicit dot in between a release segment and a pre-release segment.
+ split_spec = _version_split(normalized_spec)
+
+ # Split the prospective version out by bangs and dots, and pretend
+ # that there is an implicit dot in between a release segment and
+ # a pre-release segment.
+ split_prospective = _version_split(normalized_prospective)
+
+ # 0-pad the prospective version before shortening it to get the correct
+ # shortened version.
+ padded_prospective, _ = _pad_version(split_prospective, split_spec)
+
+ # Shorten the prospective version to be the same length as the spec
+ # so that we can determine if the specifier is a prefix of the
+ # prospective version or not.
+ shortened_prospective = padded_prospective[: len(split_spec)]
+
+ return shortened_prospective == split_spec
+ else:
+ # Convert our spec string into a Version
+ spec_version = Version(spec)
+
+ # If the specifier does not have a local segment, then we want to
+ # act as if the prospective version also does not have a local
+ # segment.
+ if not spec_version.local:
+ prospective = Version(prospective.public)
+
+ return prospective == spec_version
+
+ def _compare_not_equal(self, prospective: Version, spec: str) -> bool:
+ return not self._compare_equal(prospective, spec)
+
+ def _compare_less_than_equal(self, prospective: Version, spec: str) -> bool:
+
+ # NB: Local version identifiers are NOT permitted in the version
+ # specifier, so local version labels can be universally removed from
+ # the prospective version.
+ return Version(prospective.public) <= Version(spec)
+
+ def _compare_greater_than_equal(self, prospective: Version, spec: str) -> bool:
+
+ # NB: Local version identifiers are NOT permitted in the version
+ # specifier, so local version labels can be universally removed from
+ # the prospective version.
+ return Version(prospective.public) >= Version(spec)
+
+ def _compare_less_than(self, prospective: Version, spec_str: str) -> bool:
+
+ # Convert our spec to a Version instance, since we'll want to work with
+ # it as a version.
+ spec = Version(spec_str)
+
+ # Check to see if the prospective version is less than the spec
+ # version. If it's not we can short circuit and just return False now
+ # instead of doing extra unneeded work.
+ if not prospective < spec:
+ return False
+
+ # This special case is here so that, unless the specifier itself
+ # includes is a pre-release version, that we do not accept pre-release
+ # versions for the version mentioned in the specifier (e.g. <3.1 should
+ # not match 3.1.dev0, but should match 3.0.dev0).
+ if not spec.is_prerelease and prospective.is_prerelease:
+ if Version(prospective.base_version) == Version(spec.base_version):
+ return False
+
+ # If we've gotten to here, it means that prospective version is both
+ # less than the spec version *and* it's not a pre-release of the same
+ # version in the spec.
+ return True
+
+ def _compare_greater_than(self, prospective: Version, spec_str: str) -> bool:
+
+ # Convert our spec to a Version instance, since we'll want to work with
+ # it as a version.
+ spec = Version(spec_str)
+
+ # Check to see if the prospective version is greater than the spec
+ # version. If it's not we can short circuit and just return False now
+ # instead of doing extra unneeded work.
+ if not prospective > spec:
+ return False
+
+ # This special case is here so that, unless the specifier itself
+ # includes is a post-release version, that we do not accept
+ # post-release versions for the version mentioned in the specifier
+ # (e.g. >3.1 should not match 3.0.post0, but should match 3.2.post0).
+ if not spec.is_postrelease and prospective.is_postrelease:
+ if Version(prospective.base_version) == Version(spec.base_version):
+ return False
+
+ # Ensure that we do not allow a local version of the version mentioned
+ # in the specifier, which is technically greater than, to match.
+ if prospective.local is not None:
+ if Version(prospective.base_version) == Version(spec.base_version):
+ return False
+
+ # If we've gotten to here, it means that prospective version is both
+ # greater than the spec version *and* it's not a pre-release of the
+ # same version in the spec.
+ return True
+
+ def _compare_arbitrary(self, prospective: Version, spec: str) -> bool:
+ return str(prospective).lower() == str(spec).lower()
+
+ def __contains__(self, item: Union[str, Version]) -> bool:
+ """Return whether or not the item is contained in this specifier.
+
+ :param item: The item to check for.
+
+ This is used for the ``in`` operator and behaves the same as
+ :meth:`contains` with no ``prereleases`` argument passed.
+
+ >>> "1.2.3" in Specifier(">=1.2.3")
+ True
+ >>> Version("1.2.3") in Specifier(">=1.2.3")
+ True
+ >>> "1.0.0" in Specifier(">=1.2.3")
+ False
+ >>> "1.3.0a1" in Specifier(">=1.2.3")
+ False
+ >>> "1.3.0a1" in Specifier(">=1.2.3", prereleases=True)
+ True
+ """
+ return self.contains(item)
+
+ def contains(
+ self, item: UnparsedVersion, prereleases: Optional[bool] = None
+ ) -> bool:
+ """Return whether or not the item is contained in this specifier.
+
+ :param item:
+ The item to check for, which can be a version string or a
+ :class:`Version` instance.
+ :param prereleases:
+ Whether or not to match prereleases with this Specifier. If set to
+ ``None`` (the default), it uses :attr:`prereleases` to determine
+ whether or not prereleases are allowed.
+
+ >>> Specifier(">=1.2.3").contains("1.2.3")
+ True
+ >>> Specifier(">=1.2.3").contains(Version("1.2.3"))
+ True
+ >>> Specifier(">=1.2.3").contains("1.0.0")
+ False
+ >>> Specifier(">=1.2.3").contains("1.3.0a1")
+ False
+ >>> Specifier(">=1.2.3", prereleases=True).contains("1.3.0a1")
+ True
+ >>> Specifier(">=1.2.3").contains("1.3.0a1", prereleases=True)
+ True
+ """
+
+ # Determine if prereleases are to be allowed or not.
+ if prereleases is None:
+ prereleases = self.prereleases
+
+ # Normalize item to a Version, this allows us to have a shortcut for
+ # "2.0" in Specifier(">=2")
+ normalized_item = _coerce_version(item)
+
+ # Determine if we should be supporting prereleases in this specifier
+ # or not, if we do not support prereleases than we can short circuit
+ # logic if this version is a prereleases.
+ if normalized_item.is_prerelease and not prereleases:
+ return False
+
+ # Actually do the comparison to determine if this item is contained
+ # within this Specifier or not.
+ operator_callable: CallableOperator = self._get_operator(self.operator)
+ return operator_callable(normalized_item, self.version)
+
+ def filter(
+ self, iterable: Iterable[UnparsedVersionVar], prereleases: Optional[bool] = None
+ ) -> Iterator[UnparsedVersionVar]:
+ """Filter items in the given iterable, that match the specifier.
+
+ :param iterable:
+ An iterable that can contain version strings and :class:`Version` instances.
+ The items in the iterable will be filtered according to the specifier.
+ :param prereleases:
+ Whether or not to allow prereleases in the returned iterator. If set to
+ ``None`` (the default), it will be intelligently decide whether to allow
+ prereleases or not (based on the :attr:`prereleases` attribute, and
+ whether the only versions matching are prereleases).
+
+ This method is smarter than just ``filter(Specifier().contains, [...])``
+ because it implements the rule from :pep:`440` that a prerelease item
+ SHOULD be accepted if no other versions match the given specifier.
+
+ >>> list(Specifier(">=1.2.3").filter(["1.2", "1.3", "1.5a1"]))
+ ['1.3']
+ >>> list(Specifier(">=1.2.3").filter(["1.2", "1.2.3", "1.3", Version("1.4")]))
+ ['1.2.3', '1.3', ]
+ >>> list(Specifier(">=1.2.3").filter(["1.2", "1.5a1"]))
+ ['1.5a1']
+ >>> list(Specifier(">=1.2.3").filter(["1.3", "1.5a1"], prereleases=True))
+ ['1.3', '1.5a1']
+ >>> list(Specifier(">=1.2.3", prereleases=True).filter(["1.3", "1.5a1"]))
+ ['1.3', '1.5a1']
+ """
+
+ yielded = False
+ found_prereleases = []
+
+ kw = {"prereleases": prereleases if prereleases is not None else True}
+
+ # Attempt to iterate over all the values in the iterable and if any of
+ # them match, yield them.
+ for version in iterable:
+ parsed_version = _coerce_version(version)
+
+ if self.contains(parsed_version, **kw):
+ # If our version is a prerelease, and we were not set to allow
+ # prereleases, then we'll store it for later in case nothing
+ # else matches this specifier.
+ if parsed_version.is_prerelease and not (
+ prereleases or self.prereleases
+ ):
+ found_prereleases.append(version)
+ # Either this is not a prerelease, or we should have been
+ # accepting prereleases from the beginning.
+ else:
+ yielded = True
+ yield version
+
+ # Now that we've iterated over everything, determine if we've yielded
+ # any values, and if we have not and we have any prereleases stored up
+ # then we will go ahead and yield the prereleases.
+ if not yielded and found_prereleases:
+ for version in found_prereleases:
+ yield version
+
+
+_prefix_regex = re.compile(r"^([0-9]+)((?:a|b|c|rc)[0-9]+)$")
+
+
+def _version_split(version: str) -> List[str]:
+ """Split version into components.
+
+ The split components are intended for version comparison. The logic does
+ not attempt to retain the original version string, so joining the
+ components back with :func:`_version_join` may not produce the original
+ version string.
+ """
+ result: List[str] = []
+
+ epoch, _, rest = version.rpartition("!")
+ result.append(epoch or "0")
+
+ for item in rest.split("."):
+ match = _prefix_regex.search(item)
+ if match:
+ result.extend(match.groups())
+ else:
+ result.append(item)
+ return result
+
+
+def _version_join(components: List[str]) -> str:
+ """Join split version components into a version string.
+
+ This function assumes the input came from :func:`_version_split`, where the
+ first component must be the epoch (either empty or numeric), and all other
+ components numeric.
+ """
+ epoch, *rest = components
+ return f"{epoch}!{'.'.join(rest)}"
+
+
+def _is_not_suffix(segment: str) -> bool:
+ return not any(
+ segment.startswith(prefix) for prefix in ("dev", "a", "b", "rc", "post")
+ )
+
+
+def _pad_version(left: List[str], right: List[str]) -> Tuple[List[str], List[str]]:
+ left_split, right_split = [], []
+
+ # Get the release segment of our versions
+ left_split.append(list(itertools.takewhile(lambda x: x.isdigit(), left)))
+ right_split.append(list(itertools.takewhile(lambda x: x.isdigit(), right)))
+
+ # Get the rest of our versions
+ left_split.append(left[len(left_split[0]) :])
+ right_split.append(right[len(right_split[0]) :])
+
+ # Insert our padding
+ left_split.insert(1, ["0"] * max(0, len(right_split[0]) - len(left_split[0])))
+ right_split.insert(1, ["0"] * max(0, len(left_split[0]) - len(right_split[0])))
+
+ return (list(itertools.chain(*left_split)), list(itertools.chain(*right_split)))
+
+
+class SpecifierSet(BaseSpecifier):
+ """This class abstracts handling of a set of version specifiers.
+
+ It can be passed a single specifier (``>=3.0``), a comma-separated list of
+ specifiers (``>=3.0,!=3.1``), or no specifier at all.
+ """
+
+ def __init__(
+ self, specifiers: str = "", prereleases: Optional[bool] = None
+ ) -> None:
+ """Initialize a SpecifierSet instance.
+
+ :param specifiers:
+ The string representation of a specifier or a comma-separated list of
+ specifiers which will be parsed and normalized before use.
+ :param prereleases:
+ This tells the SpecifierSet if it should accept prerelease versions if
+ applicable or not. The default of ``None`` will autodetect it from the
+ given specifiers.
+
+ :raises InvalidSpecifier:
+ If the given ``specifiers`` are not parseable than this exception will be
+ raised.
+ """
+
+ # Split on `,` to break each individual specifier into it's own item, and
+ # strip each item to remove leading/trailing whitespace.
+ split_specifiers = [s.strip() for s in specifiers.split(",") if s.strip()]
+
+ # Parsed each individual specifier, attempting first to make it a
+ # Specifier.
+ parsed: Set[Specifier] = set()
+ for specifier in split_specifiers:
+ parsed.add(Specifier(specifier))
+
+ # Turn our parsed specifiers into a frozen set and save them for later.
+ self._specs = frozenset(parsed)
+
+ # Store our prereleases value so we can use it later to determine if
+ # we accept prereleases or not.
+ self._prereleases = prereleases
+
+ @property
+ def prereleases(self) -> Optional[bool]:
+ # If we have been given an explicit prerelease modifier, then we'll
+ # pass that through here.
+ if self._prereleases is not None:
+ return self._prereleases
+
+ # If we don't have any specifiers, and we don't have a forced value,
+ # then we'll just return None since we don't know if this should have
+ # pre-releases or not.
+ if not self._specs:
+ return None
+
+ # Otherwise we'll see if any of the given specifiers accept
+ # prereleases, if any of them do we'll return True, otherwise False.
+ return any(s.prereleases for s in self._specs)
+
+ @prereleases.setter
+ def prereleases(self, value: bool) -> None:
+ self._prereleases = value
+
+ def __repr__(self) -> str:
+ """A representation of the specifier set that shows all internal state.
+
+ Note that the ordering of the individual specifiers within the set may not
+ match the input string.
+
+ >>> SpecifierSet('>=1.0.0,!=2.0.0')
+ =1.0.0')>
+ >>> SpecifierSet('>=1.0.0,!=2.0.0', prereleases=False)
+ =1.0.0', prereleases=False)>
+ >>> SpecifierSet('>=1.0.0,!=2.0.0', prereleases=True)
+ =1.0.0', prereleases=True)>
+ """
+ pre = (
+ f", prereleases={self.prereleases!r}"
+ if self._prereleases is not None
+ else ""
+ )
+
+ return f""
+
+ def __str__(self) -> str:
+ """A string representation of the specifier set that can be round-tripped.
+
+ Note that the ordering of the individual specifiers within the set may not
+ match the input string.
+
+ >>> str(SpecifierSet(">=1.0.0,!=1.0.1"))
+ '!=1.0.1,>=1.0.0'
+ >>> str(SpecifierSet(">=1.0.0,!=1.0.1", prereleases=False))
+ '!=1.0.1,>=1.0.0'
+ """
+ return ",".join(sorted(str(s) for s in self._specs))
+
+ def __hash__(self) -> int:
+ return hash(self._specs)
+
+ def __and__(self, other: Union["SpecifierSet", str]) -> "SpecifierSet":
+ """Return a SpecifierSet which is a combination of the two sets.
+
+ :param other: The other object to combine with.
+
+ >>> SpecifierSet(">=1.0.0,!=1.0.1") & '<=2.0.0,!=2.0.1'
+ =1.0.0')>
+ >>> SpecifierSet(">=1.0.0,!=1.0.1") & SpecifierSet('<=2.0.0,!=2.0.1')
+ =1.0.0')>
+ """
+ if isinstance(other, str):
+ other = SpecifierSet(other)
+ elif not isinstance(other, SpecifierSet):
+ return NotImplemented
+
+ specifier = SpecifierSet()
+ specifier._specs = frozenset(self._specs | other._specs)
+
+ if self._prereleases is None and other._prereleases is not None:
+ specifier._prereleases = other._prereleases
+ elif self._prereleases is not None and other._prereleases is None:
+ specifier._prereleases = self._prereleases
+ elif self._prereleases == other._prereleases:
+ specifier._prereleases = self._prereleases
+ else:
+ raise ValueError(
+ "Cannot combine SpecifierSets with True and False prerelease "
+ "overrides."
+ )
+
+ return specifier
+
+ def __eq__(self, other: object) -> bool:
+ """Whether or not the two SpecifierSet-like objects are equal.
+
+ :param other: The other object to check against.
+
+ The value of :attr:`prereleases` is ignored.
+
+ >>> SpecifierSet(">=1.0.0,!=1.0.1") == SpecifierSet(">=1.0.0,!=1.0.1")
+ True
+ >>> (SpecifierSet(">=1.0.0,!=1.0.1", prereleases=False) ==
+ ... SpecifierSet(">=1.0.0,!=1.0.1", prereleases=True))
+ True
+ >>> SpecifierSet(">=1.0.0,!=1.0.1") == ">=1.0.0,!=1.0.1"
+ True
+ >>> SpecifierSet(">=1.0.0,!=1.0.1") == SpecifierSet(">=1.0.0")
+ False
+ >>> SpecifierSet(">=1.0.0,!=1.0.1") == SpecifierSet(">=1.0.0,!=1.0.2")
+ False
+ """
+ if isinstance(other, (str, Specifier)):
+ other = SpecifierSet(str(other))
+ elif not isinstance(other, SpecifierSet):
+ return NotImplemented
+
+ return self._specs == other._specs
+
+ def __len__(self) -> int:
+ """Returns the number of specifiers in this specifier set."""
+ return len(self._specs)
+
+ def __iter__(self) -> Iterator[Specifier]:
+ """
+ Returns an iterator over all the underlying :class:`Specifier` instances
+ in this specifier set.
+
+ >>> sorted(SpecifierSet(">=1.0.0,!=1.0.1"), key=str)
+ [, =1.0.0')>]
+ """
+ return iter(self._specs)
+
+ def __contains__(self, item: UnparsedVersion) -> bool:
+ """Return whether or not the item is contained in this specifier.
+
+ :param item: The item to check for.
+
+ This is used for the ``in`` operator and behaves the same as
+ :meth:`contains` with no ``prereleases`` argument passed.
+
+ >>> "1.2.3" in SpecifierSet(">=1.0.0,!=1.0.1")
+ True
+ >>> Version("1.2.3") in SpecifierSet(">=1.0.0,!=1.0.1")
+ True
+ >>> "1.0.1" in SpecifierSet(">=1.0.0,!=1.0.1")
+ False
+ >>> "1.3.0a1" in SpecifierSet(">=1.0.0,!=1.0.1")
+ False
+ >>> "1.3.0a1" in SpecifierSet(">=1.0.0,!=1.0.1", prereleases=True)
+ True
+ """
+ return self.contains(item)
+
+ def contains(
+ self,
+ item: UnparsedVersion,
+ prereleases: Optional[bool] = None,
+ installed: Optional[bool] = None,
+ ) -> bool:
+ """Return whether or not the item is contained in this SpecifierSet.
+
+ :param item:
+ The item to check for, which can be a version string or a
+ :class:`Version` instance.
+ :param prereleases:
+ Whether or not to match prereleases with this SpecifierSet. If set to
+ ``None`` (the default), it uses :attr:`prereleases` to determine
+ whether or not prereleases are allowed.
+
+ >>> SpecifierSet(">=1.0.0,!=1.0.1").contains("1.2.3")
+ True
+ >>> SpecifierSet(">=1.0.0,!=1.0.1").contains(Version("1.2.3"))
+ True
+ >>> SpecifierSet(">=1.0.0,!=1.0.1").contains("1.0.1")
+ False
+ >>> SpecifierSet(">=1.0.0,!=1.0.1").contains("1.3.0a1")
+ False
+ >>> SpecifierSet(">=1.0.0,!=1.0.1", prereleases=True).contains("1.3.0a1")
+ True
+ >>> SpecifierSet(">=1.0.0,!=1.0.1").contains("1.3.0a1", prereleases=True)
+ True
+ """
+ # Ensure that our item is a Version instance.
+ if not isinstance(item, Version):
+ item = Version(item)
+
+ # Determine if we're forcing a prerelease or not, if we're not forcing
+ # one for this particular filter call, then we'll use whatever the
+ # SpecifierSet thinks for whether or not we should support prereleases.
+ if prereleases is None:
+ prereleases = self.prereleases
+
+ # We can determine if we're going to allow pre-releases by looking to
+ # see if any of the underlying items supports them. If none of them do
+ # and this item is a pre-release then we do not allow it and we can
+ # short circuit that here.
+ # Note: This means that 1.0.dev1 would not be contained in something
+ # like >=1.0.devabc however it would be in >=1.0.debabc,>0.0.dev0
+ if not prereleases and item.is_prerelease:
+ return False
+
+ if installed and item.is_prerelease:
+ item = Version(item.base_version)
+
+ # We simply dispatch to the underlying specs here to make sure that the
+ # given version is contained within all of them.
+ # Note: This use of all() here means that an empty set of specifiers
+ # will always return True, this is an explicit design decision.
+ return all(s.contains(item, prereleases=prereleases) for s in self._specs)
+
+ def filter(
+ self, iterable: Iterable[UnparsedVersionVar], prereleases: Optional[bool] = None
+ ) -> Iterator[UnparsedVersionVar]:
+ """Filter items in the given iterable, that match the specifiers in this set.
+
+ :param iterable:
+ An iterable that can contain version strings and :class:`Version` instances.
+ The items in the iterable will be filtered according to the specifier.
+ :param prereleases:
+ Whether or not to allow prereleases in the returned iterator. If set to
+ ``None`` (the default), it will be intelligently decide whether to allow
+ prereleases or not (based on the :attr:`prereleases` attribute, and
+ whether the only versions matching are prereleases).
+
+ This method is smarter than just ``filter(SpecifierSet(...).contains, [...])``
+ because it implements the rule from :pep:`440` that a prerelease item
+ SHOULD be accepted if no other versions match the given specifier.
+
+ >>> list(SpecifierSet(">=1.2.3").filter(["1.2", "1.3", "1.5a1"]))
+ ['1.3']
+ >>> list(SpecifierSet(">=1.2.3").filter(["1.2", "1.3", Version("1.4")]))
+ ['1.3', ]
+ >>> list(SpecifierSet(">=1.2.3").filter(["1.2", "1.5a1"]))
+ []
+ >>> list(SpecifierSet(">=1.2.3").filter(["1.3", "1.5a1"], prereleases=True))
+ ['1.3', '1.5a1']
+ >>> list(SpecifierSet(">=1.2.3", prereleases=True).filter(["1.3", "1.5a1"]))
+ ['1.3', '1.5a1']
+
+ An "empty" SpecifierSet will filter items based on the presence of prerelease
+ versions in the set.
+
+ >>> list(SpecifierSet("").filter(["1.3", "1.5a1"]))
+ ['1.3']
+ >>> list(SpecifierSet("").filter(["1.5a1"]))
+ ['1.5a1']
+ >>> list(SpecifierSet("", prereleases=True).filter(["1.3", "1.5a1"]))
+ ['1.3', '1.5a1']
+ >>> list(SpecifierSet("").filter(["1.3", "1.5a1"], prereleases=True))
+ ['1.3', '1.5a1']
+ """
+ # Determine if we're forcing a prerelease or not, if we're not forcing
+ # one for this particular filter call, then we'll use whatever the
+ # SpecifierSet thinks for whether or not we should support prereleases.
+ if prereleases is None:
+ prereleases = self.prereleases
+
+ # If we have any specifiers, then we want to wrap our iterable in the
+ # filter method for each one, this will act as a logical AND amongst
+ # each specifier.
+ if self._specs:
+ for spec in self._specs:
+ iterable = spec.filter(iterable, prereleases=bool(prereleases))
+ return iter(iterable)
+ # If we do not have any specifiers, then we need to have a rough filter
+ # which will filter out any pre-releases, unless there are no final
+ # releases.
+ else:
+ filtered: List[UnparsedVersionVar] = []
+ found_prereleases: List[UnparsedVersionVar] = []
+
+ for item in iterable:
+ parsed_version = _coerce_version(item)
+
+ # Store any item which is a pre-release for later unless we've
+ # already found a final version or we are accepting prereleases
+ if parsed_version.is_prerelease and not prereleases:
+ if not filtered:
+ found_prereleases.append(item)
+ else:
+ filtered.append(item)
+
+ # If we've found no items except for pre-releases, then we'll go
+ # ahead and use the pre-releases
+ if not filtered and found_prereleases and prereleases is None:
+ return iter(found_prereleases)
+
+ return iter(filtered)
diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/packaging/tags.py b/deps/npm/node_modules/node-gyp/gyp/pylib/packaging/tags.py
new file mode 100644
index 00000000000000..37f33b1ef849ed
--- /dev/null
+++ b/deps/npm/node_modules/node-gyp/gyp/pylib/packaging/tags.py
@@ -0,0 +1,553 @@
+# This file is dual licensed under the terms of the Apache License, Version
+# 2.0, and the BSD License. See the LICENSE file in the root of this repository
+# for complete details.
+
+import logging
+import platform
+import struct
+import subprocess
+import sys
+import sysconfig
+from importlib.machinery import EXTENSION_SUFFIXES
+from typing import (
+ Dict,
+ FrozenSet,
+ Iterable,
+ Iterator,
+ List,
+ Optional,
+ Sequence,
+ Tuple,
+ Union,
+ cast,
+)
+
+from . import _manylinux, _musllinux
+
+logger = logging.getLogger(__name__)
+
+PythonVersion = Sequence[int]
+MacVersion = Tuple[int, int]
+
+INTERPRETER_SHORT_NAMES: Dict[str, str] = {
+ "python": "py", # Generic.
+ "cpython": "cp",
+ "pypy": "pp",
+ "ironpython": "ip",
+ "jython": "jy",
+}
+
+
+_32_BIT_INTERPRETER = struct.calcsize("P") == 4
+
+
+class Tag:
+ """
+ A representation of the tag triple for a wheel.
+
+ Instances are considered immutable and thus are hashable. Equality checking
+ is also supported.
+ """
+
+ __slots__ = ["_interpreter", "_abi", "_platform", "_hash"]
+
+ def __init__(self, interpreter: str, abi: str, platform: str) -> None:
+ self._interpreter = interpreter.lower()
+ self._abi = abi.lower()
+ self._platform = platform.lower()
+ # The __hash__ of every single element in a Set[Tag] will be evaluated each time
+ # that a set calls its `.disjoint()` method, which may be called hundreds of
+ # times when scanning a page of links for packages with tags matching that
+ # Set[Tag]. Pre-computing the value here produces significant speedups for
+ # downstream consumers.
+ self._hash = hash((self._interpreter, self._abi, self._platform))
+
+ @property
+ def interpreter(self) -> str:
+ return self._interpreter
+
+ @property
+ def abi(self) -> str:
+ return self._abi
+
+ @property
+ def platform(self) -> str:
+ return self._platform
+
+ def __eq__(self, other: object) -> bool:
+ if not isinstance(other, Tag):
+ return NotImplemented
+
+ return (
+ (self._hash == other._hash) # Short-circuit ASAP for perf reasons.
+ and (self._platform == other._platform)
+ and (self._abi == other._abi)
+ and (self._interpreter == other._interpreter)
+ )
+
+ def __hash__(self) -> int:
+ return self._hash
+
+ def __str__(self) -> str:
+ return f"{self._interpreter}-{self._abi}-{self._platform}"
+
+ def __repr__(self) -> str:
+ return f"<{self} @ {id(self)}>"
+
+
+def parse_tag(tag: str) -> FrozenSet[Tag]:
+ """
+ Parses the provided tag (e.g. `py3-none-any`) into a frozenset of Tag instances.
+
+ Returning a set is required due to the possibility that the tag is a
+ compressed tag set.
+ """
+ tags = set()
+ interpreters, abis, platforms = tag.split("-")
+ for interpreter in interpreters.split("."):
+ for abi in abis.split("."):
+ for platform_ in platforms.split("."):
+ tags.add(Tag(interpreter, abi, platform_))
+ return frozenset(tags)
+
+
+def _get_config_var(name: str, warn: bool = False) -> Union[int, str, None]:
+ value: Union[int, str, None] = sysconfig.get_config_var(name)
+ if value is None and warn:
+ logger.debug(
+ "Config variable '%s' is unset, Python ABI tag may be incorrect", name
+ )
+ return value
+
+
+def _normalize_string(string: str) -> str:
+ return string.replace(".", "_").replace("-", "_").replace(" ", "_")
+
+
+def _abi3_applies(python_version: PythonVersion) -> bool:
+ """
+ Determine if the Python version supports abi3.
+
+ PEP 384 was first implemented in Python 3.2.
+ """
+ return len(python_version) > 1 and tuple(python_version) >= (3, 2)
+
+
+def _cpython_abis(py_version: PythonVersion, warn: bool = False) -> List[str]:
+ py_version = tuple(py_version) # To allow for version comparison.
+ abis = []
+ version = _version_nodot(py_version[:2])
+ debug = pymalloc = ucs4 = ""
+ with_debug = _get_config_var("Py_DEBUG", warn)
+ has_refcount = hasattr(sys, "gettotalrefcount")
+ # Windows doesn't set Py_DEBUG, so checking for support of debug-compiled
+ # extension modules is the best option.
+ # https://github.com/pypa/pip/issues/3383#issuecomment-173267692
+ has_ext = "_d.pyd" in EXTENSION_SUFFIXES
+ if with_debug or (with_debug is None and (has_refcount or has_ext)):
+ debug = "d"
+ if py_version < (3, 8):
+ with_pymalloc = _get_config_var("WITH_PYMALLOC", warn)
+ if with_pymalloc or with_pymalloc is None:
+ pymalloc = "m"
+ if py_version < (3, 3):
+ unicode_size = _get_config_var("Py_UNICODE_SIZE", warn)
+ if unicode_size == 4 or (
+ unicode_size is None and sys.maxunicode == 0x10FFFF
+ ):
+ ucs4 = "u"
+ elif debug:
+ # Debug builds can also load "normal" extension modules.
+ # We can also assume no UCS-4 or pymalloc requirement.
+ abis.append(f"cp{version}")
+ abis.insert(
+ 0,
+ "cp{version}{debug}{pymalloc}{ucs4}".format(
+ version=version, debug=debug, pymalloc=pymalloc, ucs4=ucs4
+ ),
+ )
+ return abis
+
+
+def cpython_tags(
+ python_version: Optional[PythonVersion] = None,
+ abis: Optional[Iterable[str]] = None,
+ platforms: Optional[Iterable[str]] = None,
+ *,
+ warn: bool = False,
+) -> Iterator[Tag]:
+ """
+ Yields the tags for a CPython interpreter.
+
+ The tags consist of:
+ - cp--
+ - cp-abi3-
+ - cp-none-
+ - cp-abi3- # Older Python versions down to 3.2.
+
+ If python_version only specifies a major version then user-provided ABIs and
+ the 'none' ABItag will be used.
+
+ If 'abi3' or 'none' are specified in 'abis' then they will be yielded at
+ their normal position and not at the beginning.
+ """
+ if not python_version:
+ python_version = sys.version_info[:2]
+
+ interpreter = f"cp{_version_nodot(python_version[:2])}"
+
+ if abis is None:
+ if len(python_version) > 1:
+ abis = _cpython_abis(python_version, warn)
+ else:
+ abis = []
+ abis = list(abis)
+ # 'abi3' and 'none' are explicitly handled later.
+ for explicit_abi in ("abi3", "none"):
+ try:
+ abis.remove(explicit_abi)
+ except ValueError:
+ pass
+
+ platforms = list(platforms or platform_tags())
+ for abi in abis:
+ for platform_ in platforms:
+ yield Tag(interpreter, abi, platform_)
+ if _abi3_applies(python_version):
+ yield from (Tag(interpreter, "abi3", platform_) for platform_ in platforms)
+ yield from (Tag(interpreter, "none", platform_) for platform_ in platforms)
+
+ if _abi3_applies(python_version):
+ for minor_version in range(python_version[1] - 1, 1, -1):
+ for platform_ in platforms:
+ interpreter = "cp{version}".format(
+ version=_version_nodot((python_version[0], minor_version))
+ )
+ yield Tag(interpreter, "abi3", platform_)
+
+
+def _generic_abi() -> List[str]:
+ """
+ Return the ABI tag based on EXT_SUFFIX.
+ """
+ # The following are examples of `EXT_SUFFIX`.
+ # We want to keep the parts which are related to the ABI and remove the
+ # parts which are related to the platform:
+ # - linux: '.cpython-310-x86_64-linux-gnu.so' => cp310
+ # - mac: '.cpython-310-darwin.so' => cp310
+ # - win: '.cp310-win_amd64.pyd' => cp310
+ # - win: '.pyd' => cp37 (uses _cpython_abis())
+ # - pypy: '.pypy38-pp73-x86_64-linux-gnu.so' => pypy38_pp73
+ # - graalpy: '.graalpy-38-native-x86_64-darwin.dylib'
+ # => graalpy_38_native
+
+ ext_suffix = _get_config_var("EXT_SUFFIX", warn=True)
+ if not isinstance(ext_suffix, str) or ext_suffix[0] != ".":
+ raise SystemError("invalid sysconfig.get_config_var('EXT_SUFFIX')")
+ parts = ext_suffix.split(".")
+ if len(parts) < 3:
+ # CPython3.7 and earlier uses ".pyd" on Windows.
+ return _cpython_abis(sys.version_info[:2])
+ soabi = parts[1]
+ if soabi.startswith("cpython"):
+ # non-windows
+ abi = "cp" + soabi.split("-")[1]
+ elif soabi.startswith("cp"):
+ # windows
+ abi = soabi.split("-")[0]
+ elif soabi.startswith("pypy"):
+ abi = "-".join(soabi.split("-")[:2])
+ elif soabi.startswith("graalpy"):
+ abi = "-".join(soabi.split("-")[:3])
+ elif soabi:
+ # pyston, ironpython, others?
+ abi = soabi
+ else:
+ return []
+ return [_normalize_string(abi)]
+
+
+def generic_tags(
+ interpreter: Optional[str] = None,
+ abis: Optional[Iterable[str]] = None,
+ platforms: Optional[Iterable[str]] = None,
+ *,
+ warn: bool = False,
+) -> Iterator[Tag]:
+ """
+ Yields the tags for a generic interpreter.
+
+ The tags consist of:
+ - --
+
+ The "none" ABI will be added if it was not explicitly provided.
+ """
+ if not interpreter:
+ interp_name = interpreter_name()
+ interp_version = interpreter_version(warn=warn)
+ interpreter = "".join([interp_name, interp_version])
+ if abis is None:
+ abis = _generic_abi()
+ else:
+ abis = list(abis)
+ platforms = list(platforms or platform_tags())
+ if "none" not in abis:
+ abis.append("none")
+ for abi in abis:
+ for platform_ in platforms:
+ yield Tag(interpreter, abi, platform_)
+
+
+def _py_interpreter_range(py_version: PythonVersion) -> Iterator[str]:
+ """
+ Yields Python versions in descending order.
+
+ After the latest version, the major-only version will be yielded, and then
+ all previous versions of that major version.
+ """
+ if len(py_version) > 1:
+ yield f"py{_version_nodot(py_version[:2])}"
+ yield f"py{py_version[0]}"
+ if len(py_version) > 1:
+ for minor in range(py_version[1] - 1, -1, -1):
+ yield f"py{_version_nodot((py_version[0], minor))}"
+
+
+def compatible_tags(
+ python_version: Optional[PythonVersion] = None,
+ interpreter: Optional[str] = None,
+ platforms: Optional[Iterable[str]] = None,
+) -> Iterator[Tag]:
+ """
+ Yields the sequence of tags that are compatible with a specific version of Python.
+
+ The tags consist of:
+ - py*-none-
+ - -none-any # ... if `interpreter` is provided.
+ - py*-none-any
+ """
+ if not python_version:
+ python_version = sys.version_info[:2]
+ platforms = list(platforms or platform_tags())
+ for version in _py_interpreter_range(python_version):
+ for platform_ in platforms:
+ yield Tag(version, "none", platform_)
+ if interpreter:
+ yield Tag(interpreter, "none", "any")
+ for version in _py_interpreter_range(python_version):
+ yield Tag(version, "none", "any")
+
+
+def _mac_arch(arch: str, is_32bit: bool = _32_BIT_INTERPRETER) -> str:
+ if not is_32bit:
+ return arch
+
+ if arch.startswith("ppc"):
+ return "ppc"
+
+ return "i386"
+
+
+def _mac_binary_formats(version: MacVersion, cpu_arch: str) -> List[str]:
+ formats = [cpu_arch]
+ if cpu_arch == "x86_64":
+ if version < (10, 4):
+ return []
+ formats.extend(["intel", "fat64", "fat32"])
+
+ elif cpu_arch == "i386":
+ if version < (10, 4):
+ return []
+ formats.extend(["intel", "fat32", "fat"])
+
+ elif cpu_arch == "ppc64":
+ # TODO: Need to care about 32-bit PPC for ppc64 through 10.2?
+ if version > (10, 5) or version < (10, 4):
+ return []
+ formats.append("fat64")
+
+ elif cpu_arch == "ppc":
+ if version > (10, 6):
+ return []
+ formats.extend(["fat32", "fat"])
+
+ if cpu_arch in {"arm64", "x86_64"}:
+ formats.append("universal2")
+
+ if cpu_arch in {"x86_64", "i386", "ppc64", "ppc", "intel"}:
+ formats.append("universal")
+
+ return formats
+
+
+def mac_platforms(
+ version: Optional[MacVersion] = None, arch: Optional[str] = None
+) -> Iterator[str]:
+ """
+ Yields the platform tags for a macOS system.
+
+ The `version` parameter is a two-item tuple specifying the macOS version to
+ generate platform tags for. The `arch` parameter is the CPU architecture to
+ generate platform tags for. Both parameters default to the appropriate value
+ for the current system.
+ """
+ version_str, _, cpu_arch = platform.mac_ver()
+ if version is None:
+ version = cast("MacVersion", tuple(map(int, version_str.split(".")[:2])))
+ if version == (10, 16):
+ # When built against an older macOS SDK, Python will report macOS 10.16
+ # instead of the real version.
+ version_str = subprocess.run(
+ [
+ sys.executable,
+ "-sS",
+ "-c",
+ "import platform; print(platform.mac_ver()[0])",
+ ],
+ check=True,
+ env={"SYSTEM_VERSION_COMPAT": "0"},
+ stdout=subprocess.PIPE,
+ text=True,
+ ).stdout
+ version = cast("MacVersion", tuple(map(int, version_str.split(".")[:2])))
+ else:
+ version = version
+ if arch is None:
+ arch = _mac_arch(cpu_arch)
+ else:
+ arch = arch
+
+ if (10, 0) <= version and version < (11, 0):
+ # Prior to Mac OS 11, each yearly release of Mac OS bumped the
+ # "minor" version number. The major version was always 10.
+ for minor_version in range(version[1], -1, -1):
+ compat_version = 10, minor_version
+ binary_formats = _mac_binary_formats(compat_version, arch)
+ for binary_format in binary_formats:
+ yield "macosx_{major}_{minor}_{binary_format}".format(
+ major=10, minor=minor_version, binary_format=binary_format
+ )
+
+ if version >= (11, 0):
+ # Starting with Mac OS 11, each yearly release bumps the major version
+ # number. The minor versions are now the midyear updates.
+ for major_version in range(version[0], 10, -1):
+ compat_version = major_version, 0
+ binary_formats = _mac_binary_formats(compat_version, arch)
+ for binary_format in binary_formats:
+ yield "macosx_{major}_{minor}_{binary_format}".format(
+ major=major_version, minor=0, binary_format=binary_format
+ )
+
+ if version >= (11, 0):
+ # Mac OS 11 on x86_64 is compatible with binaries from previous releases.
+ # Arm64 support was introduced in 11.0, so no Arm binaries from previous
+ # releases exist.
+ #
+ # However, the "universal2" binary format can have a
+ # macOS version earlier than 11.0 when the x86_64 part of the binary supports
+ # that version of macOS.
+ if arch == "x86_64":
+ for minor_version in range(16, 3, -1):
+ compat_version = 10, minor_version
+ binary_formats = _mac_binary_formats(compat_version, arch)
+ for binary_format in binary_formats:
+ yield "macosx_{major}_{minor}_{binary_format}".format(
+ major=compat_version[0],
+ minor=compat_version[1],
+ binary_format=binary_format,
+ )
+ else:
+ for minor_version in range(16, 3, -1):
+ compat_version = 10, minor_version
+ binary_format = "universal2"
+ yield "macosx_{major}_{minor}_{binary_format}".format(
+ major=compat_version[0],
+ minor=compat_version[1],
+ binary_format=binary_format,
+ )
+
+
+def _linux_platforms(is_32bit: bool = _32_BIT_INTERPRETER) -> Iterator[str]:
+ linux = _normalize_string(sysconfig.get_platform())
+ if not linux.startswith("linux_"):
+ # we should never be here, just yield the sysconfig one and return
+ yield linux
+ return
+ if is_32bit:
+ if linux == "linux_x86_64":
+ linux = "linux_i686"
+ elif linux == "linux_aarch64":
+ linux = "linux_armv8l"
+ _, arch = linux.split("_", 1)
+ archs = {"armv8l": ["armv8l", "armv7l"]}.get(arch, [arch])
+ yield from _manylinux.platform_tags(archs)
+ yield from _musllinux.platform_tags(archs)
+ for arch in archs:
+ yield f"linux_{arch}"
+
+
+def _generic_platforms() -> Iterator[str]:
+ yield _normalize_string(sysconfig.get_platform())
+
+
+def platform_tags() -> Iterator[str]:
+ """
+ Provides the platform tags for this installation.
+ """
+ if platform.system() == "Darwin":
+ return mac_platforms()
+ elif platform.system() == "Linux":
+ return _linux_platforms()
+ else:
+ return _generic_platforms()
+
+
+def interpreter_name() -> str:
+ """
+ Returns the name of the running interpreter.
+
+ Some implementations have a reserved, two-letter abbreviation which will
+ be returned when appropriate.
+ """
+ name = sys.implementation.name
+ return INTERPRETER_SHORT_NAMES.get(name) or name
+
+
+def interpreter_version(*, warn: bool = False) -> str:
+ """
+ Returns the version of the running interpreter.
+ """
+ version = _get_config_var("py_version_nodot", warn=warn)
+ if version:
+ version = str(version)
+ else:
+ version = _version_nodot(sys.version_info[:2])
+ return version
+
+
+def _version_nodot(version: PythonVersion) -> str:
+ return "".join(map(str, version))
+
+
+def sys_tags(*, warn: bool = False) -> Iterator[Tag]:
+ """
+ Returns the sequence of tag triples for the running interpreter.
+
+ The order of the sequence corresponds to priority order for the
+ interpreter, from most to least important.
+ """
+
+ interp_name = interpreter_name()
+ if interp_name == "cp":
+ yield from cpython_tags(warn=warn)
+ else:
+ yield from generic_tags()
+
+ if interp_name == "pp":
+ interp = "pp3"
+ elif interp_name == "cp":
+ interp = "cp" + interpreter_version(warn=warn)
+ else:
+ interp = None
+ yield from compatible_tags(interpreter=interp)
diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/packaging/utils.py b/deps/npm/node_modules/node-gyp/gyp/pylib/packaging/utils.py
new file mode 100644
index 00000000000000..c2c2f75aa80628
--- /dev/null
+++ b/deps/npm/node_modules/node-gyp/gyp/pylib/packaging/utils.py
@@ -0,0 +1,172 @@
+# This file is dual licensed under the terms of the Apache License, Version
+# 2.0, and the BSD License. See the LICENSE file in the root of this repository
+# for complete details.
+
+import re
+from typing import FrozenSet, NewType, Tuple, Union, cast
+
+from .tags import Tag, parse_tag
+from .version import InvalidVersion, Version
+
+BuildTag = Union[Tuple[()], Tuple[int, str]]
+NormalizedName = NewType("NormalizedName", str)
+
+
+class InvalidName(ValueError):
+ """
+ An invalid distribution name; users should refer to the packaging user guide.
+ """
+
+
+class InvalidWheelFilename(ValueError):
+ """
+ An invalid wheel filename was found, users should refer to PEP 427.
+ """
+
+
+class InvalidSdistFilename(ValueError):
+ """
+ An invalid sdist filename was found, users should refer to the packaging user guide.
+ """
+
+
+# Core metadata spec for `Name`
+_validate_regex = re.compile(
+ r"^([A-Z0-9]|[A-Z0-9][A-Z0-9._-]*[A-Z0-9])$", re.IGNORECASE
+)
+_canonicalize_regex = re.compile(r"[-_.]+")
+_normalized_regex = re.compile(r"^([a-z0-9]|[a-z0-9]([a-z0-9-](?!--))*[a-z0-9])$")
+# PEP 427: The build number must start with a digit.
+_build_tag_regex = re.compile(r"(\d+)(.*)")
+
+
+def canonicalize_name(name: str, *, validate: bool = False) -> NormalizedName:
+ if validate and not _validate_regex.match(name):
+ raise InvalidName(f"name is invalid: {name!r}")
+ # This is taken from PEP 503.
+ value = _canonicalize_regex.sub("-", name).lower()
+ return cast(NormalizedName, value)
+
+
+def is_normalized_name(name: str) -> bool:
+ return _normalized_regex.match(name) is not None
+
+
+def canonicalize_version(
+ version: Union[Version, str], *, strip_trailing_zero: bool = True
+) -> str:
+ """
+ This is very similar to Version.__str__, but has one subtle difference
+ with the way it handles the release segment.
+ """
+ if isinstance(version, str):
+ try:
+ parsed = Version(version)
+ except InvalidVersion:
+ # Legacy versions cannot be normalized
+ return version
+ else:
+ parsed = version
+
+ parts = []
+
+ # Epoch
+ if parsed.epoch != 0:
+ parts.append(f"{parsed.epoch}!")
+
+ # Release segment
+ release_segment = ".".join(str(x) for x in parsed.release)
+ if strip_trailing_zero:
+ # NB: This strips trailing '.0's to normalize
+ release_segment = re.sub(r"(\.0)+$", "", release_segment)
+ parts.append(release_segment)
+
+ # Pre-release
+ if parsed.pre is not None:
+ parts.append("".join(str(x) for x in parsed.pre))
+
+ # Post-release
+ if parsed.post is not None:
+ parts.append(f".post{parsed.post}")
+
+ # Development release
+ if parsed.dev is not None:
+ parts.append(f".dev{parsed.dev}")
+
+ # Local version segment
+ if parsed.local is not None:
+ parts.append(f"+{parsed.local}")
+
+ return "".join(parts)
+
+
+def parse_wheel_filename(
+ filename: str,
+) -> Tuple[NormalizedName, Version, BuildTag, FrozenSet[Tag]]:
+ if not filename.endswith(".whl"):
+ raise InvalidWheelFilename(
+ f"Invalid wheel filename (extension must be '.whl'): {filename}"
+ )
+
+ filename = filename[:-4]
+ dashes = filename.count("-")
+ if dashes not in (4, 5):
+ raise InvalidWheelFilename(
+ f"Invalid wheel filename (wrong number of parts): {filename}"
+ )
+
+ parts = filename.split("-", dashes - 2)
+ name_part = parts[0]
+ # See PEP 427 for the rules on escaping the project name.
+ if "__" in name_part or re.match(r"^[\w\d._]*$", name_part, re.UNICODE) is None:
+ raise InvalidWheelFilename(f"Invalid project name: {filename}")
+ name = canonicalize_name(name_part)
+
+ try:
+ version = Version(parts[1])
+ except InvalidVersion as e:
+ raise InvalidWheelFilename(
+ f"Invalid wheel filename (invalid version): {filename}"
+ ) from e
+
+ if dashes == 5:
+ build_part = parts[2]
+ build_match = _build_tag_regex.match(build_part)
+ if build_match is None:
+ raise InvalidWheelFilename(
+ f"Invalid build number: {build_part} in '{filename}'"
+ )
+ build = cast(BuildTag, (int(build_match.group(1)), build_match.group(2)))
+ else:
+ build = ()
+ tags = parse_tag(parts[-1])
+ return (name, version, build, tags)
+
+
+def parse_sdist_filename(filename: str) -> Tuple[NormalizedName, Version]:
+ if filename.endswith(".tar.gz"):
+ file_stem = filename[: -len(".tar.gz")]
+ elif filename.endswith(".zip"):
+ file_stem = filename[: -len(".zip")]
+ else:
+ raise InvalidSdistFilename(
+ f"Invalid sdist filename (extension must be '.tar.gz' or '.zip'):"
+ f" {filename}"
+ )
+
+ # We are requiring a PEP 440 version, which cannot contain dashes,
+ # so we split on the last dash.
+ name_part, sep, version_part = file_stem.rpartition("-")
+ if not sep:
+ raise InvalidSdistFilename(f"Invalid sdist filename: {filename}")
+
+ name = canonicalize_name(name_part)
+
+ try:
+ version = Version(version_part)
+ except InvalidVersion as e:
+ raise InvalidSdistFilename(
+ f"Invalid sdist filename (invalid version): {filename}"
+ ) from e
+
+ return (name, version)
diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/packaging/version.py b/deps/npm/node_modules/node-gyp/gyp/pylib/packaging/version.py
new file mode 100644
index 00000000000000..5faab9bd0dcf28
--- /dev/null
+++ b/deps/npm/node_modules/node-gyp/gyp/pylib/packaging/version.py
@@ -0,0 +1,563 @@
+# This file is dual licensed under the terms of the Apache License, Version
+# 2.0, and the BSD License. See the LICENSE file in the root of this repository
+# for complete details.
+"""
+.. testsetup::
+
+ from packaging.version import parse, Version
+"""
+
+import itertools
+import re
+from typing import Any, Callable, NamedTuple, Optional, SupportsInt, Tuple, Union
+
+from ._structures import Infinity, InfinityType, NegativeInfinity, NegativeInfinityType
+
+__all__ = ["VERSION_PATTERN", "parse", "Version", "InvalidVersion"]
+
+LocalType = Tuple[Union[int, str], ...]
+
+CmpPrePostDevType = Union[InfinityType, NegativeInfinityType, Tuple[str, int]]
+CmpLocalType = Union[
+ NegativeInfinityType,
+ Tuple[Union[Tuple[int, str], Tuple[NegativeInfinityType, Union[int, str]]], ...],
+]
+CmpKey = Tuple[
+ int,
+ Tuple[int, ...],
+ CmpPrePostDevType,
+ CmpPrePostDevType,
+ CmpPrePostDevType,
+ CmpLocalType,
+]
+VersionComparisonMethod = Callable[[CmpKey, CmpKey], bool]
+
+
+class _Version(NamedTuple):
+ epoch: int
+ release: Tuple[int, ...]
+ dev: Optional[Tuple[str, int]]
+ pre: Optional[Tuple[str, int]]
+ post: Optional[Tuple[str, int]]
+ local: Optional[LocalType]
+
+
+def parse(version: str) -> "Version":
+ """Parse the given version string.
+
+ >>> parse('1.0.dev1')
+
+
+ :param version: The version string to parse.
+ :raises InvalidVersion: When the version string is not a valid version.
+ """
+ return Version(version)
+
+
+class InvalidVersion(ValueError):
+ """Raised when a version string is not a valid version.
+
+ >>> Version("invalid")
+ Traceback (most recent call last):
+ ...
+ packaging.version.InvalidVersion: Invalid version: 'invalid'
+ """
+
+
+class _BaseVersion:
+ _key: Tuple[Any, ...]
+
+ def __hash__(self) -> int:
+ return hash(self._key)
+
+ # Please keep the duplicated `isinstance` check
+ # in the six comparisons hereunder
+ # unless you find a way to avoid adding overhead function calls.
+ def __lt__(self, other: "_BaseVersion") -> bool:
+ if not isinstance(other, _BaseVersion):
+ return NotImplemented
+
+ return self._key < other._key
+
+ def __le__(self, other: "_BaseVersion") -> bool:
+ if not isinstance(other, _BaseVersion):
+ return NotImplemented
+
+ return self._key <= other._key
+
+ def __eq__(self, other: object) -> bool:
+ if not isinstance(other, _BaseVersion):
+ return NotImplemented
+
+ return self._key == other._key
+
+ def __ge__(self, other: "_BaseVersion") -> bool:
+ if not isinstance(other, _BaseVersion):
+ return NotImplemented
+
+ return self._key >= other._key
+
+ def __gt__(self, other: "_BaseVersion") -> bool:
+ if not isinstance(other, _BaseVersion):
+ return NotImplemented
+
+ return self._key > other._key
+
+ def __ne__(self, other: object) -> bool:
+ if not isinstance(other, _BaseVersion):
+ return NotImplemented
+
+ return self._key != other._key
+
+
+# Deliberately not anchored to the start and end of the string, to make it
+# easier for 3rd party code to reuse
+_VERSION_PATTERN = r"""
+ v?
+ (?:
+ (?:(?P[0-9]+)!)? # epoch
+ (?P[0-9]+(?:\.[0-9]+)*) # release segment
+ (?P # pre-release
+ [-_\.]?
+ (?Palpha|a|beta|b|preview|pre|c|rc)
+ [-_\.]?
+ (?P[0-9]+)?
+ )?
+ (?P # post release
+ (?:-(?P[0-9]+))
+ |
+ (?:
+ [-_\.]?
+ (?Ppost|rev|r)
+ [-_\.]?
+ (?P[0-9]+)?
+ )
+ )?
+ (?P # dev release
+ [-_\.]?
+ (?Pdev)
+ [-_\.]?
+ (?P[0-9]+)?
+ )?
+ )
+ (?:\+(?P[a-z0-9]+(?:[-_\.][a-z0-9]+)*))? # local version
+"""
+
+VERSION_PATTERN = _VERSION_PATTERN
+"""
+A string containing the regular expression used to match a valid version.
+
+The pattern is not anchored at either end, and is intended for embedding in larger
+expressions (for example, matching a version number as part of a file name). The
+regular expression should be compiled with the ``re.VERBOSE`` and ``re.IGNORECASE``
+flags set.
+
+:meta hide-value:
+"""
+
+
+class Version(_BaseVersion):
+ """This class abstracts handling of a project's versions.
+
+ A :class:`Version` instance is comparison aware and can be compared and
+ sorted using the standard Python interfaces.
+
+ >>> v1 = Version("1.0a5")
+ >>> v2 = Version("1.0")
+ >>> v1
+
+ >>> v2
+
+ >>> v1 < v2
+ True
+ >>> v1 == v2
+ False
+ >>> v1 > v2
+ False
+ >>> v1 >= v2
+ False
+ >>> v1 <= v2
+ True
+ """
+
+ _regex = re.compile(r"^\s*" + VERSION_PATTERN + r"\s*$", re.VERBOSE | re.IGNORECASE)
+ _key: CmpKey
+
+ def __init__(self, version: str) -> None:
+ """Initialize a Version object.
+
+ :param version:
+ The string representation of a version which will be parsed and normalized
+ before use.
+ :raises InvalidVersion:
+ If the ``version`` does not conform to PEP 440 in any way then this
+ exception will be raised.
+ """
+
+ # Validate the version and parse it into pieces
+ match = self._regex.search(version)
+ if not match:
+ raise InvalidVersion(f"Invalid version: '{version}'")
+
+ # Store the parsed out pieces of the version
+ self._version = _Version(
+ epoch=int(match.group("epoch")) if match.group("epoch") else 0,
+ release=tuple(int(i) for i in match.group("release").split(".")),
+ pre=_parse_letter_version(match.group("pre_l"), match.group("pre_n")),
+ post=_parse_letter_version(
+ match.group("post_l"), match.group("post_n1") or match.group("post_n2")
+ ),
+ dev=_parse_letter_version(match.group("dev_l"), match.group("dev_n")),
+ local=_parse_local_version(match.group("local")),
+ )
+
+ # Generate a key which will be used for sorting
+ self._key = _cmpkey(
+ self._version.epoch,
+ self._version.release,
+ self._version.pre,
+ self._version.post,
+ self._version.dev,
+ self._version.local,
+ )
+
+ def __repr__(self) -> str:
+ """A representation of the Version that shows all internal state.
+
+ >>> Version('1.0.0')
+
+ """
+ return f""
+
+ def __str__(self) -> str:
+ """A string representation of the version that can be rounded-tripped.
+
+ >>> str(Version("1.0a5"))
+ '1.0a5'
+ """
+ parts = []
+
+ # Epoch
+ if self.epoch != 0:
+ parts.append(f"{self.epoch}!")
+
+ # Release segment
+ parts.append(".".join(str(x) for x in self.release))
+
+ # Pre-release
+ if self.pre is not None:
+ parts.append("".join(str(x) for x in self.pre))
+
+ # Post-release
+ if self.post is not None:
+ parts.append(f".post{self.post}")
+
+ # Development release
+ if self.dev is not None:
+ parts.append(f".dev{self.dev}")
+
+ # Local version segment
+ if self.local is not None:
+ parts.append(f"+{self.local}")
+
+ return "".join(parts)
+
+ @property
+ def epoch(self) -> int:
+ """The epoch of the version.
+
+ >>> Version("2.0.0").epoch
+ 0
+ >>> Version("1!2.0.0").epoch
+ 1
+ """
+ return self._version.epoch
+
+ @property
+ def release(self) -> Tuple[int, ...]:
+ """The components of the "release" segment of the version.
+
+ >>> Version("1.2.3").release
+ (1, 2, 3)
+ >>> Version("2.0.0").release
+ (2, 0, 0)
+ >>> Version("1!2.0.0.post0").release
+ (2, 0, 0)
+
+ Includes trailing zeroes but not the epoch or any pre-release / development /
+ post-release suffixes.
+ """
+ return self._version.release
+
+ @property
+ def pre(self) -> Optional[Tuple[str, int]]:
+ """The pre-release segment of the version.
+
+ >>> print(Version("1.2.3").pre)
+ None
+ >>> Version("1.2.3a1").pre
+ ('a', 1)
+ >>> Version("1.2.3b1").pre
+ ('b', 1)
+ >>> Version("1.2.3rc1").pre
+ ('rc', 1)
+ """
+ return self._version.pre
+
+ @property
+ def post(self) -> Optional[int]:
+ """The post-release number of the version.
+
+ >>> print(Version("1.2.3").post)
+ None
+ >>> Version("1.2.3.post1").post
+ 1
+ """
+ return self._version.post[1] if self._version.post else None
+
+ @property
+ def dev(self) -> Optional[int]:
+ """The development number of the version.
+
+ >>> print(Version("1.2.3").dev)
+ None
+ >>> Version("1.2.3.dev1").dev
+ 1
+ """
+ return self._version.dev[1] if self._version.dev else None
+
+ @property
+ def local(self) -> Optional[str]:
+ """The local version segment of the version.
+
+ >>> print(Version("1.2.3").local)
+ None
+ >>> Version("1.2.3+abc").local
+ 'abc'
+ """
+ if self._version.local:
+ return ".".join(str(x) for x in self._version.local)
+ else:
+ return None
+
+ @property
+ def public(self) -> str:
+ """The public portion of the version.
+
+ >>> Version("1.2.3").public
+ '1.2.3'
+ >>> Version("1.2.3+abc").public
+ '1.2.3'
+ >>> Version("1.2.3+abc.dev1").public
+ '1.2.3'
+ """
+ return str(self).split("+", 1)[0]
+
+ @property
+ def base_version(self) -> str:
+ """The "base version" of the version.
+
+ >>> Version("1.2.3").base_version
+ '1.2.3'
+ >>> Version("1.2.3+abc").base_version
+ '1.2.3'
+ >>> Version("1!1.2.3+abc.dev1").base_version
+ '1!1.2.3'
+
+ The "base version" is the public version of the project without any pre or post
+ release markers.
+ """
+ parts = []
+
+ # Epoch
+ if self.epoch != 0:
+ parts.append(f"{self.epoch}!")
+
+ # Release segment
+ parts.append(".".join(str(x) for x in self.release))
+
+ return "".join(parts)
+
+ @property
+ def is_prerelease(self) -> bool:
+ """Whether this version is a pre-release.
+
+ >>> Version("1.2.3").is_prerelease
+ False
+ >>> Version("1.2.3a1").is_prerelease
+ True
+ >>> Version("1.2.3b1").is_prerelease
+ True
+ >>> Version("1.2.3rc1").is_prerelease
+ True
+ >>> Version("1.2.3dev1").is_prerelease
+ True
+ """
+ return self.dev is not None or self.pre is not None
+
+ @property
+ def is_postrelease(self) -> bool:
+ """Whether this version is a post-release.
+
+ >>> Version("1.2.3").is_postrelease
+ False
+ >>> Version("1.2.3.post1").is_postrelease
+ True
+ """
+ return self.post is not None
+
+ @property
+ def is_devrelease(self) -> bool:
+ """Whether this version is a development release.
+
+ >>> Version("1.2.3").is_devrelease
+ False
+ >>> Version("1.2.3.dev1").is_devrelease
+ True
+ """
+ return self.dev is not None
+
+ @property
+ def major(self) -> int:
+ """The first item of :attr:`release` or ``0`` if unavailable.
+
+ >>> Version("1.2.3").major
+ 1
+ """
+ return self.release[0] if len(self.release) >= 1 else 0
+
+ @property
+ def minor(self) -> int:
+ """The second item of :attr:`release` or ``0`` if unavailable.
+
+ >>> Version("1.2.3").minor
+ 2
+ >>> Version("1").minor
+ 0
+ """
+ return self.release[1] if len(self.release) >= 2 else 0
+
+ @property
+ def micro(self) -> int:
+ """The third item of :attr:`release` or ``0`` if unavailable.
+
+ >>> Version("1.2.3").micro
+ 3
+ >>> Version("1").micro
+ 0
+ """
+ return self.release[2] if len(self.release) >= 3 else 0
+
+
+def _parse_letter_version(
+ letter: Optional[str], number: Union[str, bytes, SupportsInt, None]
+) -> Optional[Tuple[str, int]]:
+
+ if letter:
+ # We consider there to be an implicit 0 in a pre-release if there is
+ # not a numeral associated with it.
+ if number is None:
+ number = 0
+
+ # We normalize any letters to their lower case form
+ letter = letter.lower()
+
+ # We consider some words to be alternate spellings of other words and
+ # in those cases we want to normalize the spellings to our preferred
+ # spelling.
+ if letter == "alpha":
+ letter = "a"
+ elif letter == "beta":
+ letter = "b"
+ elif letter in ["c", "pre", "preview"]:
+ letter = "rc"
+ elif letter in ["rev", "r"]:
+ letter = "post"
+
+ return letter, int(number)
+ if not letter and number:
+ # We assume if we are given a number, but we are not given a letter
+ # then this is using the implicit post release syntax (e.g. 1.0-1)
+ letter = "post"
+
+ return letter, int(number)
+
+ return None
+
+
+_local_version_separators = re.compile(r"[\._-]")
+
+
+def _parse_local_version(local: Optional[str]) -> Optional[LocalType]:
+ """
+ Takes a string like abc.1.twelve and turns it into ("abc", 1, "twelve").
+ """
+ if local is not None:
+ return tuple(
+ part.lower() if not part.isdigit() else int(part)
+ for part in _local_version_separators.split(local)
+ )
+ return None
+
+
+def _cmpkey(
+ epoch: int,
+ release: Tuple[int, ...],
+ pre: Optional[Tuple[str, int]],
+ post: Optional[Tuple[str, int]],
+ dev: Optional[Tuple[str, int]],
+ local: Optional[LocalType],
+) -> CmpKey:
+
+ # When we compare a release version, we want to compare it with all of the
+ # trailing zeros removed. So we'll use a reverse the list, drop all the now
+ # leading zeros until we come to something non zero, then take the rest
+ # re-reverse it back into the correct order and make it a tuple and use
+ # that for our sorting key.
+ _release = tuple(
+ reversed(list(itertools.dropwhile(lambda x: x == 0, reversed(release))))
+ )
+
+ # We need to "trick" the sorting algorithm to put 1.0.dev0 before 1.0a0.
+ # We'll do this by abusing the pre segment, but we _only_ want to do this
+ # if there is not a pre or a post segment. If we have one of those then
+ # the normal sorting rules will handle this case correctly.
+ if pre is None and post is None and dev is not None:
+ _pre: CmpPrePostDevType = NegativeInfinity
+ # Versions without a pre-release (except as noted above) should sort after
+ # those with one.
+ elif pre is None:
+ _pre = Infinity
+ else:
+ _pre = pre
+
+ # Versions without a post segment should sort before those with one.
+ if post is None:
+ _post: CmpPrePostDevType = NegativeInfinity
+
+ else:
+ _post = post
+
+ # Versions without a development segment should sort after those with one.
+ if dev is None:
+ _dev: CmpPrePostDevType = Infinity
+
+ else:
+ _dev = dev
+
+ if local is None:
+ # Versions without a local segment should sort before those with one.
+ _local: CmpLocalType = NegativeInfinity
+ else:
+ # Versions with a local segment need that segment parsed to implement
+ # the sorting rules in PEP440.
+ # - Alpha numeric segments sort before numeric segments
+ # - Alpha numeric segments sort lexicographically
+ # - Numeric segments sort numerically
+ # - Shorter versions sort before longer versions when the prefixes
+ # match exactly
+ _local = tuple(
+ (i, "") if isinstance(i, int) else (NegativeInfinity, i) for i in local
+ )
+
+ return epoch, _release, _pre, _post, _dev, _local
diff --git a/deps/npm/node_modules/node-gyp/gyp/pyproject.toml b/deps/npm/node_modules/node-gyp/gyp/pyproject.toml
index d8a5451520cc3c..0c25d0b3c1a065 100644
--- a/deps/npm/node_modules/node-gyp/gyp/pyproject.toml
+++ b/deps/npm/node_modules/node-gyp/gyp/pyproject.toml
@@ -4,14 +4,16 @@ build-backend = "setuptools.build_meta"
[project]
name = "gyp-next"
-version = "0.14.0"
+version = "0.16.1"
authors = [
{ name="Node.js contributors", email="ryzokuken@disroot.org" },
]
description = "A fork of the GYP build system for use in the Node.js projects"
readme = "README.md"
license = { file="LICENSE" }
-requires-python = ">=3.6"
+requires-python = ">=3.8"
+# The Python module "packaging" is vendored in the "pylib/packaging" directory to support Python >= 3.12.
+# dependencies = ["packaging>=23.1"] # Uncomment this line if the vendored version is removed.
classifiers = [
"Development Status :: 3 - Alpha",
"Environment :: Console",
@@ -20,15 +22,14 @@ classifiers = [
"Natural Language :: English",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
- "Programming Language :: Python :: 3.6",
- "Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
+ "Programming Language :: Python :: 3.11",
]
[project.optional-dependencies]
-dev = ["flake8", "pytest"]
+dev = ["flake8", "ruff", "pytest"]
[project.scripts]
gyp = "gyp:script_main"
@@ -36,6 +37,83 @@ gyp = "gyp:script_main"
[project.urls]
"Homepage" = "https://github.com/nodejs/gyp-next"
+[tool.ruff]
+select = [
+ "C4", # flake8-comprehensions
+ "C90", # McCabe cyclomatic complexity
+ "DTZ", # flake8-datetimez
+ "E", # pycodestyle
+ "F", # Pyflakes
+ "G", # flake8-logging-format
+ "ICN", # flake8-import-conventions
+ "INT", # flake8-gettext
+ "PL", # Pylint
+ "PYI", # flake8-pyi
+ "RSE", # flake8-raise
+ "RUF", # Ruff-specific rules
+ "T10", # flake8-debugger
+ "TCH", # flake8-type-checking
+ "TID", # flake8-tidy-imports
+ "UP", # pyupgrade
+ "W", # pycodestyle
+ "YTT", # flake8-2020
+ # "A", # flake8-builtins
+ # "ANN", # flake8-annotations
+ # "ARG", # flake8-unused-arguments
+ # "B", # flake8-bugbear
+ # "BLE", # flake8-blind-except
+ # "COM", # flake8-commas
+ # "D", # pydocstyle
+ # "DJ", # flake8-django
+ # "EM", # flake8-errmsg
+ # "ERA", # eradicate
+ # "EXE", # flake8-executable
+ # "FBT", # flake8-boolean-trap
+ # "I", # isort
+ # "INP", # flake8-no-pep420
+ # "ISC", # flake8-implicit-str-concat
+ # "N", # pep8-naming
+ # "NPY", # NumPy-specific rules
+ # "PD", # pandas-vet
+ # "PGH", # pygrep-hooks
+ # "PIE", # flake8-pie
+ # "PT", # flake8-pytest-style
+ # "PTH", # flake8-use-pathlib
+ # "Q", # flake8-quotes
+ # "RET", # flake8-return
+ # "S", # flake8-bandit
+ # "SIM", # flake8-simplify
+ # "SLF", # flake8-self
+ # "T20", # flake8-print
+ # "TRY", # tryceratops
+]
+ignore = [
+ "E721",
+ "PLC1901",
+ "PLR0402",
+ "PLR1714",
+ "PLR2004",
+ "PLR5501",
+ "PLW0603",
+ "PLW2901",
+ "PYI024",
+ "RUF005",
+ "RUF012",
+ "UP031",
+]
+extend-exclude = ["pylib/packaging"]
+line-length = 88
+target-version = "py37"
+
+[tool.ruff.mccabe]
+max-complexity = 101
+
+[tool.ruff.pylint]
+max-args = 11
+max-branches = 108
+max-returns = 10
+max-statements = 286
+
[tool.setuptools]
package-dir = {"" = "pylib"}
packages = ["gyp", "gyp.generator"]
diff --git a/deps/npm/node_modules/node-gyp/gyp/tools/README b/deps/npm/node_modules/node-gyp/gyp/tools/README
deleted file mode 100644
index 84a73d15214b68..00000000000000
--- a/deps/npm/node_modules/node-gyp/gyp/tools/README
+++ /dev/null
@@ -1,15 +0,0 @@
-pretty_vcproj:
- Usage: pretty_vcproj.py "c:\path\to\vcproj.vcproj" [key1=value1] [key2=value2]
-
- They key/value pair are used to resolve vsprops name.
-
- For example, if I want to diff the base.vcproj project:
-
- pretty_vcproj.py z:\dev\src-chrome\src\base\build\base.vcproj "$(SolutionDir)=z:\dev\src-chrome\src\chrome\\" "$(CHROMIUM_BUILD)=" "$(CHROME_BUILD_TYPE)=" > original.txt
- pretty_vcproj.py z:\dev\src-chrome\src\base\base_gyp.vcproj "$(SolutionDir)=z:\dev\src-chrome\src\chrome\\" "$(CHROMIUM_BUILD)=" "$(CHROME_BUILD_TYPE)=" > gyp.txt
-
- And you can use your favorite diff tool to see the changes.
-
- Note: In the case of base.vcproj, the original vcproj is one level up the generated one.
- I suggest you do a search and replace for '"..\' and replace it with '"' in original.txt
- before you perform the diff.
\ No newline at end of file
diff --git a/deps/npm/node_modules/node-gyp/gyp/tools/Xcode/README b/deps/npm/node_modules/node-gyp/gyp/tools/Xcode/README
deleted file mode 100644
index 2492a2c2f8f170..00000000000000
--- a/deps/npm/node_modules/node-gyp/gyp/tools/Xcode/README
+++ /dev/null
@@ -1,5 +0,0 @@
-Specifications contains syntax formatters for Xcode 3. These do not appear to be supported yet on Xcode 4. To use these with Xcode 3 please install both the gyp.pbfilespec and gyp.xclangspec files in
-
-~/Library/Application Support/Developer/Shared/Xcode/Specifications/
-
-and restart Xcode.
\ No newline at end of file
diff --git a/deps/npm/node_modules/node-gyp/gyp/tools/Xcode/Specifications/gyp.pbfilespec b/deps/npm/node_modules/node-gyp/gyp/tools/Xcode/Specifications/gyp.pbfilespec
deleted file mode 100644
index 85e2e268a51b76..00000000000000
--- a/deps/npm/node_modules/node-gyp/gyp/tools/Xcode/Specifications/gyp.pbfilespec
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- gyp.pbfilespec
- GYP source file spec for Xcode 3
-
- There is not much documentation available regarding the format
- of .pbfilespec files. As a starting point, see for instance the
- outdated documentation at:
- http://maxao.free.fr/xcode-plugin-interface/specifications.html
- and the files in:
- /Developer/Library/PrivateFrameworks/XcodeEdit.framework/Versions/A/Resources/
-
- Place this file in directory:
- ~/Library/Application Support/Developer/Shared/Xcode/Specifications/
-*/
-
-(
- {
- Identifier = sourcecode.gyp;
- BasedOn = sourcecode;
- Name = "GYP Files";
- Extensions = ("gyp", "gypi");
- MIMETypes = ("text/gyp");
- Language = "xcode.lang.gyp";
- IsTextFile = YES;
- IsSourceFile = YES;
- }
-)
diff --git a/deps/npm/node_modules/node-gyp/gyp/tools/Xcode/Specifications/gyp.xclangspec b/deps/npm/node_modules/node-gyp/gyp/tools/Xcode/Specifications/gyp.xclangspec
deleted file mode 100644
index 3b3506d319e0f2..00000000000000
--- a/deps/npm/node_modules/node-gyp/gyp/tools/Xcode/Specifications/gyp.xclangspec
+++ /dev/null
@@ -1,226 +0,0 @@
-/*
- Copyright (c) 2011 Google Inc. All rights reserved.
- Use of this source code is governed by a BSD-style license that can be
- found in the LICENSE file.
-
- gyp.xclangspec
- GYP language specification for Xcode 3
-
- There is not much documentation available regarding the format
- of .xclangspec files. As a starting point, see for instance the
- outdated documentation at:
- http://maxao.free.fr/xcode-plugin-interface/specifications.html
- and the files in:
- /Developer/Library/PrivateFrameworks/XcodeEdit.framework/Versions/A/Resources/
-
- Place this file in directory:
- ~/Library/Application Support/Developer/Shared/Xcode/Specifications/
-*/
-
-(
-
- {
- Identifier = "xcode.lang.gyp.keyword";
- Syntax = {
- Words = (
- "and",
- "or",
- " (caar gyp-parse-history) target-point)
- (setq gyp-parse-history (cdr gyp-parse-history))))
-
-(defun gyp-parse-point ()
- "The point of the last parse state added by gyp-parse-to."
- (caar gyp-parse-history))
-
-(defun gyp-parse-sections ()
- "A list of section symbols holding at the last parse state point."
- (cdar gyp-parse-history))
-
-(defun gyp-inside-dictionary-p ()
- "Predicate returning true if the parser is inside a dictionary."
- (not (eq (cadar gyp-parse-history) 'list)))
-
-(defun gyp-add-parse-history (point sections)
- "Add parse state SECTIONS to the parse history at POINT so that parsing can be
- resumed instantly."
- (while (>= (caar gyp-parse-history) point)
- (setq gyp-parse-history (cdr gyp-parse-history)))
- (setq gyp-parse-history (cons (cons point sections) gyp-parse-history)))
-
-(defun gyp-parse-to (target-point)
- "Parses from (point) to TARGET-POINT adding the parse state information to
- gyp-parse-state-history. Parsing stops if TARGET-POINT is reached or if a
- string literal has been parsed. Returns nil if no further parsing can be
- done, otherwise returns the position of the start of a parsed string, leaving
- the point at the end of the string."
- (let ((parsing t)
- string-start)
- (while parsing
- (setq string-start nil)
- ;; Parse up to a character that starts a sexp, or if the nesting
- ;; level decreases.
- (let ((state (parse-partial-sexp (gyp-parse-point)
- target-point
- -1
- t))
- (sections (gyp-parse-sections)))
- (if (= (nth 0 state) -1)
- (setq sections (cdr sections)) ; pop out a level
- (cond ((looking-at-p "['\"]") ; a string
- (setq string-start (point))
- (goto-char (scan-sexps (point) 1))
- (if (gyp-inside-dictionary-p)
- ;; Look for sections inside a dictionary
- (let ((section (gyp-section-name
- (buffer-substring-no-properties
- (+ 1 string-start)
- (- (point) 1)))))
- (setq sections (cons section (cdr sections)))))
- ;; Stop after the string so it can be fontified.
- (setq target-point (point)))
- ((looking-at-p "{")
- ;; Inside a dictionary. Increase nesting.
- (forward-char 1)
- (setq sections (cons 'unknown sections)))
- ((looking-at-p "\\[")
- ;; Inside a list. Increase nesting
- (forward-char 1)
- (setq sections (cons 'list sections)))
- ((not (eobp))
- ;; other
- (forward-char 1))))
- (gyp-add-parse-history (point) sections)
- (setq parsing (< (point) target-point))))
- string-start))
-
-(defun gyp-section-at-point ()
- "Transform the last parse state, which is a list of nested sections and return
- the section symbol that should be used to determine font-lock information for
- the string. Can return nil indicating the string should not have any attached
- section."
- (let ((sections (gyp-parse-sections)))
- (cond
- ((eq (car sections) 'conditions)
- ;; conditions can occur in a variables section, but we still want to
- ;; highlight it as a keyword.
- nil)
- ((and (eq (car sections) 'list)
- (eq (cadr sections) 'list))
- ;; conditions and sources can have items in [[ ]]
- (caddr sections))
- (t (cadr sections)))))
-
-(defun gyp-section-match (limit)
- "Parse from (point) to LIMIT returning by means of match data what was
- matched. The group of the match indicates what style font-lock should apply.
- See also `gyp-add-font-lock-keywords'."
- (gyp-invalidate-parse-states-after (point))
- (let ((group nil)
- (string-start t))
- (while (and (< (point) limit)
- (not group)
- string-start)
- (setq string-start (gyp-parse-to limit))
- (if string-start
- (setq group (cl-case (gyp-section-at-point)
- ('dependencies 1)
- ('variables 2)
- ('conditions 2)
- ('sources 3)
- ('defines 4)
- (nil nil)))))
- (if group
- (progn
- ;; Set the match data to indicate to the font-lock mechanism the
- ;; highlighting to be performed.
- (set-match-data (append (list string-start (point))
- (make-list (* (1- group) 2) nil)
- (list (1+ string-start) (1- (point)))))
- t))))
-
-;;; Please see http://code.google.com/p/gyp/wiki/GypLanguageSpecification for
-;;; canonical list of keywords.
-(defun gyp-add-font-lock-keywords ()
- "Add gyp-mode keywords to font-lock mechanism."
- ;; TODO(jknotten): Move all the keyword highlighting into gyp-section-match
- ;; so that we can do the font-locking in a single font-lock pass.
- (font-lock-add-keywords
- nil
- (list
- ;; Top-level keywords
- (list (concat "['\"]\\("
- (regexp-opt (list "action" "action_name" "actions" "cflags"
- "cflags_cc" "conditions" "configurations"
- "copies" "defines" "dependencies" "destination"
- "direct_dependent_settings"
- "export_dependent_settings" "extension" "files"
- "include_dirs" "includes" "inputs" "ldflags" "libraries"
- "link_settings" "mac_bundle" "message"
- "msvs_external_rule" "outputs" "product_name"
- "process_outputs_as_sources" "rules" "rule_name"
- "sources" "suppress_wildcard"
- "target_conditions" "target_defaults"
- "target_defines" "target_name" "toolsets"
- "targets" "type" "variables" "xcode_settings"))
- "[!/+=]?\\)") 1 'font-lock-keyword-face t)
- ;; Type of target
- (list (concat "['\"]\\("
- (regexp-opt (list "loadable_module" "static_library"
- "shared_library" "executable" "none"))
- "\\)") 1 'font-lock-type-face t)
- (list "\\(?:target\\|action\\)_name['\"]\\s-*:\\s-*['\"]\\([^ '\"]*\\)" 1
- 'font-lock-function-name-face t)
- (list 'gyp-section-match
- (list 1 'font-lock-function-name-face t t) ; dependencies
- (list 2 'font-lock-variable-name-face t t) ; variables, conditions
- (list 3 'font-lock-constant-face t t) ; sources
- (list 4 'font-lock-preprocessor-face t t)) ; preprocessor
- ;; Variable expansion
- (list "<@?(\\([^\n )]+\\))" 1 'font-lock-variable-name-face t)
- ;; Command expansion
- (list " "{dst}"')
-
- print("}")
-
-
-def main():
- if len(sys.argv) < 2:
- print(__doc__, file=sys.stderr)
- print(file=sys.stderr)
- print("usage: %s target1 target2..." % (sys.argv[0]), file=sys.stderr)
- return 1
-
- edges = LoadEdges("dump.json", sys.argv[1:])
-
- WriteGraph(edges)
- return 0
-
-
-if __name__ == "__main__":
- sys.exit(main())
diff --git a/deps/npm/node_modules/node-gyp/gyp/tools/pretty_gyp.py b/deps/npm/node_modules/node-gyp/gyp/tools/pretty_gyp.py
deleted file mode 100755
index 6eef3a1bbf02a5..00000000000000
--- a/deps/npm/node_modules/node-gyp/gyp/tools/pretty_gyp.py
+++ /dev/null
@@ -1,156 +0,0 @@
-#!/usr/bin/env python3
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""Pretty-prints the contents of a GYP file."""
-
-
-import sys
-import re
-
-
-# Regex to remove comments when we're counting braces.
-COMMENT_RE = re.compile(r"\s*#.*")
-
-# Regex to remove quoted strings when we're counting braces.
-# It takes into account quoted quotes, and makes sure that the quotes match.
-# NOTE: It does not handle quotes that span more than one line, or
-# cases where an escaped quote is preceded by an escaped backslash.
-QUOTE_RE_STR = r'(?P[\'"])(.*?)(? 0:
- after = True
-
- # This catches the special case of a closing brace having something
- # other than just whitespace ahead of it -- we don't want to
- # unindent that until after this line is printed so it stays with
- # the previous indentation level.
- if cnt < 0 and closing_prefix_re.match(stripline):
- after = True
- return (cnt, after)
-
-
-def prettyprint_input(lines):
- """Does the main work of indenting the input based on the brace counts."""
- indent = 0
- basic_offset = 2
- for line in lines:
- if COMMENT_RE.match(line):
- print(line)
- else:
- line = line.strip("\r\n\t ") # Otherwise doesn't strip \r on Unix.
- if len(line) > 0:
- (brace_diff, after) = count_braces(line)
- if brace_diff != 0:
- if after:
- print(" " * (basic_offset * indent) + line)
- indent += brace_diff
- else:
- indent += brace_diff
- print(" " * (basic_offset * indent) + line)
- else:
- print(" " * (basic_offset * indent) + line)
- else:
- print("")
-
-
-def main():
- if len(sys.argv) > 1:
- data = open(sys.argv[1]).read().splitlines()
- else:
- data = sys.stdin.read().splitlines()
- # Split up the double braces.
- lines = split_double_braces(data)
-
- # Indent and print the output.
- prettyprint_input(lines)
- return 0
-
-
-if __name__ == "__main__":
- sys.exit(main())
diff --git a/deps/npm/node_modules/node-gyp/gyp/tools/pretty_sln.py b/deps/npm/node_modules/node-gyp/gyp/tools/pretty_sln.py
deleted file mode 100755
index 6ca0cd12a7ba06..00000000000000
--- a/deps/npm/node_modules/node-gyp/gyp/tools/pretty_sln.py
+++ /dev/null
@@ -1,181 +0,0 @@
-#!/usr/bin/env python3
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""Prints the information in a sln file in a diffable way.
-
- It first outputs each projects in alphabetical order with their
- dependencies.
-
- Then it outputs a possible build order.
-"""
-
-
-import os
-import re
-import sys
-import pretty_vcproj
-
-__author__ = "nsylvain (Nicolas Sylvain)"
-
-
-def BuildProject(project, built, projects, deps):
- # if all dependencies are done, we can build it, otherwise we try to build the
- # dependency.
- # This is not infinite-recursion proof.
- for dep in deps[project]:
- if dep not in built:
- BuildProject(dep, built, projects, deps)
- print(project)
- built.append(project)
-
-
-def ParseSolution(solution_file):
- # All projects, their clsid and paths.
- projects = dict()
-
- # A list of dependencies associated with a project.
- dependencies = dict()
-
- # Regular expressions that matches the SLN format.
- # The first line of a project definition.
- begin_project = re.compile(
- r'^Project\("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942'
- r'}"\) = "(.*)", "(.*)", "(.*)"$'
- )
- # The last line of a project definition.
- end_project = re.compile("^EndProject$")
- # The first line of a dependency list.
- begin_dep = re.compile(r"ProjectSection\(ProjectDependencies\) = postProject$")
- # The last line of a dependency list.
- end_dep = re.compile("EndProjectSection$")
- # A line describing a dependency.
- dep_line = re.compile(" *({.*}) = ({.*})$")
-
- in_deps = False
- solution = open(solution_file)
- for line in solution:
- results = begin_project.search(line)
- if results:
- # Hack to remove icu because the diff is too different.
- if results.group(1).find("icu") != -1:
- continue
- # We remove "_gyp" from the names because it helps to diff them.
- current_project = results.group(1).replace("_gyp", "")
- projects[current_project] = [
- results.group(2).replace("_gyp", ""),
- results.group(3),
- results.group(2),
- ]
- dependencies[current_project] = []
- continue
-
- results = end_project.search(line)
- if results:
- current_project = None
- continue
-
- results = begin_dep.search(line)
- if results:
- in_deps = True
- continue
-
- results = end_dep.search(line)
- if results:
- in_deps = False
- continue
-
- results = dep_line.search(line)
- if results and in_deps and current_project:
- dependencies[current_project].append(results.group(1))
- continue
-
- # Change all dependencies clsid to name instead.
- for project in dependencies:
- # For each dependencies in this project
- new_dep_array = []
- for dep in dependencies[project]:
- # Look for the project name matching this cldis
- for project_info in projects:
- if projects[project_info][1] == dep:
- new_dep_array.append(project_info)
- dependencies[project] = sorted(new_dep_array)
-
- return (projects, dependencies)
-
-
-def PrintDependencies(projects, deps):
- print("---------------------------------------")
- print("Dependencies for all projects")
- print("---------------------------------------")
- print("-- --")
-
- for (project, dep_list) in sorted(deps.items()):
- print("Project : %s" % project)
- print("Path : %s" % projects[project][0])
- if dep_list:
- for dep in dep_list:
- print(" - %s" % dep)
- print("")
-
- print("-- --")
-
-
-def PrintBuildOrder(projects, deps):
- print("---------------------------------------")
- print("Build order ")
- print("---------------------------------------")
- print("-- --")
-
- built = []
- for (project, _) in sorted(deps.items()):
- if project not in built:
- BuildProject(project, built, projects, deps)
-
- print("-- --")
-
-
-def PrintVCProj(projects):
-
- for project in projects:
- print("-------------------------------------")
- print("-------------------------------------")
- print(project)
- print(project)
- print(project)
- print("-------------------------------------")
- print("-------------------------------------")
-
- project_path = os.path.abspath(
- os.path.join(os.path.dirname(sys.argv[1]), projects[project][2])
- )
-
- pretty = pretty_vcproj
- argv = [
- "",
- project_path,
- "$(SolutionDir)=%s\\" % os.path.dirname(sys.argv[1]),
- ]
- argv.extend(sys.argv[3:])
- pretty.main(argv)
-
-
-def main():
- # check if we have exactly 1 parameter.
- if len(sys.argv) < 2:
- print('Usage: %s "c:\\path\\to\\project.sln"' % sys.argv[0])
- return 1
-
- (projects, deps) = ParseSolution(sys.argv[1])
- PrintDependencies(projects, deps)
- PrintBuildOrder(projects, deps)
-
- if "--recursive" in sys.argv:
- PrintVCProj(projects)
- return 0
-
-
-if __name__ == "__main__":
- sys.exit(main())
diff --git a/deps/npm/node_modules/node-gyp/gyp/tools/pretty_vcproj.py b/deps/npm/node_modules/node-gyp/gyp/tools/pretty_vcproj.py
deleted file mode 100755
index 00d32debda51f0..00000000000000
--- a/deps/npm/node_modules/node-gyp/gyp/tools/pretty_vcproj.py
+++ /dev/null
@@ -1,339 +0,0 @@
-#!/usr/bin/env python3
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""Make the format of a vcproj really pretty.
-
- This script normalize and sort an xml. It also fetches all the properties
- inside linked vsprops and include them explicitly in the vcproj.
-
- It outputs the resulting xml to stdout.
-"""
-
-
-import os
-import sys
-
-from xml.dom.minidom import parse
-from xml.dom.minidom import Node
-
-__author__ = "nsylvain (Nicolas Sylvain)"
-ARGUMENTS = None
-REPLACEMENTS = dict()
-
-
-def cmp(x, y):
- return (x > y) - (x < y)
-
-
-class CmpTuple:
- """Compare function between 2 tuple."""
-
- def __call__(self, x, y):
- return cmp(x[0], y[0])
-
-
-class CmpNode:
- """Compare function between 2 xml nodes."""
-
- def __call__(self, x, y):
- def get_string(node):
- node_string = "node"
- node_string += node.nodeName
- if node.nodeValue:
- node_string += node.nodeValue
-
- if node.attributes:
- # We first sort by name, if present.
- node_string += node.getAttribute("Name")
-
- all_nodes = []
- for (name, value) in node.attributes.items():
- all_nodes.append((name, value))
-
- all_nodes.sort(CmpTuple())
- for (name, value) in all_nodes:
- node_string += name
- node_string += value
-
- return node_string
-
- return cmp(get_string(x), get_string(y))
-
-
-def PrettyPrintNode(node, indent=0):
- if node.nodeType == Node.TEXT_NODE:
- if node.data.strip():
- print("{}{}".format(" " * indent, node.data.strip()))
- return
-
- if node.childNodes:
- node.normalize()
- # Get the number of attributes
- attr_count = 0
- if node.attributes:
- attr_count = node.attributes.length
-
- # Print the main tag
- if attr_count == 0:
- print("{}<{}>".format(" " * indent, node.nodeName))
- else:
- print("{}<{}".format(" " * indent, node.nodeName))
-
- all_attributes = []
- for (name, value) in node.attributes.items():
- all_attributes.append((name, value))
- all_attributes.sort(CmpTuple())
- for (name, value) in all_attributes:
- print('{} {}="{}"'.format(" " * indent, name, value))
- print("%s>" % (" " * indent))
- if node.nodeValue:
- print("{} {}".format(" " * indent, node.nodeValue))
-
- for sub_node in node.childNodes:
- PrettyPrintNode(sub_node, indent=indent + 2)
- print("{}{}>".format(" " * indent, node.nodeName))
-
-
-def FlattenFilter(node):
- """Returns a list of all the node and sub nodes."""
- node_list = []
-
- if node.attributes and node.getAttribute("Name") == "_excluded_files":
- # We don't add the "_excluded_files" filter.
- return []
-
- for current in node.childNodes:
- if current.nodeName == "Filter":
- node_list.extend(FlattenFilter(current))
- else:
- node_list.append(current)
-
- return node_list
-
-
-def FixFilenames(filenames, current_directory):
- new_list = []
- for filename in filenames:
- if filename:
- for key in REPLACEMENTS:
- filename = filename.replace(key, REPLACEMENTS[key])
- os.chdir(current_directory)
- filename = filename.strip("\"' ")
- if filename.startswith("$"):
- new_list.append(filename)
- else:
- new_list.append(os.path.abspath(filename))
- return new_list
-
-
-def AbsoluteNode(node):
- """Makes all the properties we know about in this node absolute."""
- if node.attributes:
- for (name, value) in node.attributes.items():
- if name in [
- "InheritedPropertySheets",
- "RelativePath",
- "AdditionalIncludeDirectories",
- "IntermediateDirectory",
- "OutputDirectory",
- "AdditionalLibraryDirectories",
- ]:
- # We want to fix up these paths
- path_list = value.split(";")
- new_list = FixFilenames(path_list, os.path.dirname(ARGUMENTS[1]))
- node.setAttribute(name, ";".join(new_list))
- if not value:
- node.removeAttribute(name)
-
-
-def CleanupVcproj(node):
- """For each sub node, we call recursively this function."""
- for sub_node in node.childNodes:
- AbsoluteNode(sub_node)
- CleanupVcproj(sub_node)
-
- # Normalize the node, and remove all extraneous whitespaces.
- for sub_node in node.childNodes:
- if sub_node.nodeType == Node.TEXT_NODE:
- sub_node.data = sub_node.data.replace("\r", "")
- sub_node.data = sub_node.data.replace("\n", "")
- sub_node.data = sub_node.data.rstrip()
-
- # Fix all the semicolon separated attributes to be sorted, and we also
- # remove the dups.
- if node.attributes:
- for (name, value) in node.attributes.items():
- sorted_list = sorted(value.split(";"))
- unique_list = []
- for i in sorted_list:
- if not unique_list.count(i):
- unique_list.append(i)
- node.setAttribute(name, ";".join(unique_list))
- if not value:
- node.removeAttribute(name)
-
- if node.childNodes:
- node.normalize()
-
- # For each node, take a copy, and remove it from the list.
- node_array = []
- while node.childNodes and node.childNodes[0]:
- # Take a copy of the node and remove it from the list.
- current = node.childNodes[0]
- node.removeChild(current)
-
- # If the child is a filter, we want to append all its children
- # to this same list.
- if current.nodeName == "Filter":
- node_array.extend(FlattenFilter(current))
- else:
- node_array.append(current)
-
- # Sort the list.
- node_array.sort(CmpNode())
-
- # Insert the nodes in the correct order.
- for new_node in node_array:
- # But don't append empty tool node.
- if new_node.nodeName == "Tool":
- if new_node.attributes and new_node.attributes.length == 1:
- # This one was empty.
- continue
- if new_node.nodeName == "UserMacro":
- continue
- node.appendChild(new_node)
-
-
-def GetConfiguationNodes(vcproj):
- # TODO(nsylvain): Find a better way to navigate the xml.
- nodes = []
- for node in vcproj.childNodes:
- if node.nodeName == "Configurations":
- for sub_node in node.childNodes:
- if sub_node.nodeName == "Configuration":
- nodes.append(sub_node)
-
- return nodes
-
-
-def GetChildrenVsprops(filename):
- dom = parse(filename)
- if dom.documentElement.attributes:
- vsprops = dom.documentElement.getAttribute("InheritedPropertySheets")
- return FixFilenames(vsprops.split(";"), os.path.dirname(filename))
- return []
-
-
-def SeekToNode(node1, child2):
- # A text node does not have properties.
- if child2.nodeType == Node.TEXT_NODE:
- return None
-
- # Get the name of the current node.
- current_name = child2.getAttribute("Name")
- if not current_name:
- # There is no name. We don't know how to merge.
- return None
-
- # Look through all the nodes to find a match.
- for sub_node in node1.childNodes:
- if sub_node.nodeName == child2.nodeName:
- name = sub_node.getAttribute("Name")
- if name == current_name:
- return sub_node
-
- # No match. We give up.
- return None
-
-
-def MergeAttributes(node1, node2):
- # No attributes to merge?
- if not node2.attributes:
- return
-
- for (name, value2) in node2.attributes.items():
- # Don't merge the 'Name' attribute.
- if name == "Name":
- continue
- value1 = node1.getAttribute(name)
- if value1:
- # The attribute exist in the main node. If it's equal, we leave it
- # untouched, otherwise we concatenate it.
- if value1 != value2:
- node1.setAttribute(name, ";".join([value1, value2]))
- else:
- # The attribute does not exist in the main node. We append this one.
- node1.setAttribute(name, value2)
-
- # If the attribute was a property sheet attributes, we remove it, since
- # they are useless.
- if name == "InheritedPropertySheets":
- node1.removeAttribute(name)
-
-
-def MergeProperties(node1, node2):
- MergeAttributes(node1, node2)
- for child2 in node2.childNodes:
- child1 = SeekToNode(node1, child2)
- if child1:
- MergeProperties(child1, child2)
- else:
- node1.appendChild(child2.cloneNode(True))
-
-
-def main(argv):
- """Main function of this vcproj prettifier."""
- global ARGUMENTS
- ARGUMENTS = argv
-
- # check if we have exactly 1 parameter.
- if len(argv) < 2:
- print(
- 'Usage: %s "c:\\path\\to\\vcproj.vcproj" [key1=value1] '
- "[key2=value2]" % argv[0]
- )
- return 1
-
- # Parse the keys
- for i in range(2, len(argv)):
- (key, value) = argv[i].split("=")
- REPLACEMENTS[key] = value
-
- # Open the vcproj and parse the xml.
- dom = parse(argv[1])
-
- # First thing we need to do is find the Configuration Node and merge them
- # with the vsprops they include.
- for configuration_node in GetConfiguationNodes(dom.documentElement):
- # Get the property sheets associated with this configuration.
- vsprops = configuration_node.getAttribute("InheritedPropertySheets")
-
- # Fix the filenames to be absolute.
- vsprops_list = FixFilenames(
- vsprops.strip().split(";"), os.path.dirname(argv[1])
- )
-
- # Extend the list of vsprops with all vsprops contained in the current
- # vsprops.
- for current_vsprops in vsprops_list:
- vsprops_list.extend(GetChildrenVsprops(current_vsprops))
-
- # Now that we have all the vsprops, we need to merge them.
- for current_vsprops in vsprops_list:
- MergeProperties(configuration_node, parse(current_vsprops).documentElement)
-
- # Now that everything is merged, we need to cleanup the xml.
- CleanupVcproj(dom.documentElement)
-
- # Finally, we use the prett xml function to print the vcproj back to the
- # user.
- # print dom.toprettyxml(newl="\n")
- PrettyPrintNode(dom.documentElement)
- return 0
-
-
-if __name__ == "__main__":
- sys.exit(main(sys.argv))
diff --git a/deps/npm/node_modules/node-gyp/lib/build.js b/deps/npm/node_modules/node-gyp/lib/build.js
index ea1f90652a05d8..6b8d84d3ede344 100644
--- a/deps/npm/node_modules/node-gyp/lib/build.js
+++ b/deps/npm/node_modules/node-gyp/lib/build.js
@@ -1,14 +1,14 @@
'use strict'
-const fs = require('graceful-fs')
+const fs = require('graceful-fs').promises
const path = require('path')
-const glob = require('glob')
-const log = require('npmlog')
+const { glob } = require('glob')
+const log = require('./log')
const which = require('which')
const win = process.platform === 'win32'
-function build (gyp, argv, callback) {
- var platformMake = 'make'
+async function build (gyp, argv) {
+ let platformMake = 'make'
if (process.platform === 'aix') {
platformMake = 'gmake'
} else if (process.platform === 'os400') {
@@ -21,113 +21,107 @@ function build (gyp, argv, callback) {
})
}
- var makeCommand = gyp.opts.make || process.env.MAKE || platformMake
- var command = win ? 'msbuild' : makeCommand
- var jobs = gyp.opts.jobs || process.env.JOBS
- var buildType
- var config
- var arch
- var nodeDir
- var guessedSolution
+ const makeCommand = gyp.opts.make || process.env.MAKE || platformMake
+ let command = win ? 'msbuild' : makeCommand
+ const jobs = gyp.opts.jobs || process.env.JOBS
+ let buildType
+ let config
+ let arch
+ let nodeDir
+ let guessedSolution
+ let python
+ let buildBinsDir
- loadConfigGypi()
+ await loadConfigGypi()
/**
* Load the "config.gypi" file that was generated during "configure".
*/
- function loadConfigGypi () {
- var configPath = path.resolve('build', 'config.gypi')
-
- fs.readFile(configPath, 'utf8', function (err, data) {
- if (err) {
- if (err.code === 'ENOENT') {
- callback(new Error('You must run `node-gyp configure` first!'))
- } else {
- callback(err)
- }
- return
+ async function loadConfigGypi () {
+ let data
+ try {
+ const configPath = path.resolve('build', 'config.gypi')
+ data = await fs.readFile(configPath, 'utf8')
+ } catch (err) {
+ if (err.code === 'ENOENT') {
+ throw new Error('You must run `node-gyp configure` first!')
+ } else {
+ throw err
}
- config = JSON.parse(data.replace(/#.+\n/, ''))
+ }
- // get the 'arch', 'buildType', and 'nodeDir' vars from the config
- buildType = config.target_defaults.default_configuration
- arch = config.variables.target_arch
- nodeDir = config.variables.nodedir
+ config = JSON.parse(data.replace(/#.+\n/, ''))
- if ('debug' in gyp.opts) {
- buildType = gyp.opts.debug ? 'Debug' : 'Release'
- }
- if (!buildType) {
- buildType = 'Release'
- }
+ // get the 'arch', 'buildType', and 'nodeDir' vars from the config
+ buildType = config.target_defaults.default_configuration
+ arch = config.variables.target_arch
+ nodeDir = config.variables.nodedir
+ python = config.variables.python
- log.verbose('build type', buildType)
- log.verbose('architecture', arch)
- log.verbose('node dev dir', nodeDir)
+ if ('debug' in gyp.opts) {
+ buildType = gyp.opts.debug ? 'Debug' : 'Release'
+ }
+ if (!buildType) {
+ buildType = 'Release'
+ }
- if (win) {
- findSolutionFile()
- } else {
- doWhich()
- }
- })
+ log.verbose('build type', buildType)
+ log.verbose('architecture', arch)
+ log.verbose('node dev dir', nodeDir)
+ log.verbose('python', python)
+
+ if (win) {
+ await findSolutionFile()
+ } else {
+ await doWhich()
+ }
}
/**
* On Windows, find the first build/*.sln file.
*/
- function findSolutionFile () {
- glob('build/*.sln', function (err, files) {
- if (err) {
- return callback(err)
- }
- if (files.length === 0) {
- return callback(new Error('Could not find *.sln file. Did you run "configure"?'))
- }
- guessedSolution = files[0]
- log.verbose('found first Solution file', guessedSolution)
- doWhich()
- })
+ async function findSolutionFile () {
+ const files = await glob('build/*.sln')
+ if (files.length === 0) {
+ throw new Error('Could not find *.sln file. Did you run "configure"?')
+ }
+ guessedSolution = files[0]
+ log.verbose('found first Solution file', guessedSolution)
+ await doWhich()
}
/**
* Uses node-which to locate the msbuild / make executable.
*/
- function doWhich () {
+ async function doWhich () {
// On Windows use msbuild provided by node-gyp configure
if (win) {
if (!config.variables.msbuild_path) {
- return callback(new Error(
- 'MSBuild is not set, please run `node-gyp configure`.'))
+ throw new Error('MSBuild is not set, please run `node-gyp configure`.')
}
command = config.variables.msbuild_path
log.verbose('using MSBuild:', command)
- doBuild()
+ await doBuild()
return
}
+
// First make sure we have the build command in the PATH
- which(command, function (err, execPath) {
- if (err) {
- // Some other error or 'make' not found on Unix, report that to the user
- callback(err)
- return
- }
- log.verbose('`which` succeeded for `' + command + '`', execPath)
- doBuild()
- })
+ const execPath = await which(command)
+ log.verbose('`which` succeeded for `' + command + '`', execPath)
+ await doBuild()
}
/**
* Actually spawn the process and compile the module.
*/
- function doBuild () {
+ async function doBuild () {
// Enable Verbose build
- var verbose = log.levels[log.level] <= log.levels.verbose
- var j
+ const verbose = log.logger.isVisible('verbose')
+ let j
if (!win && verbose) {
argv.push('V=1')
@@ -147,10 +141,12 @@ function build (gyp, argv, callback) {
// Convert .gypi config target_arch to MSBuild /Platform
// Since there are many ways to state '32-bit Intel', default to it.
// N.B. msbuild's Condition string equality tests are case-insensitive.
- var archLower = arch.toLowerCase()
- var p = archLower === 'x64' ? 'x64'
- : (archLower === 'arm' ? 'ARM'
- : (archLower === 'arm64' ? 'ARM64' : 'Win32'))
+ const archLower = arch.toLowerCase()
+ const p = archLower === 'x64'
+ ? 'x64'
+ : (archLower === 'arm'
+ ? 'ARM'
+ : (archLower === 'arm64' ? 'ARM64' : 'Win32'))
argv.push('/p:Configuration=' + buildType + ';Platform=' + p)
if (jobs) {
j = parseInt(jobs, 10)
@@ -179,7 +175,7 @@ function build (gyp, argv, callback) {
if (win) {
// did the user specify their own .sln file?
- var hasSln = argv.some(function (arg) {
+ const hasSln = argv.some(function (arg) {
return path.extname(arg) === '.sln'
})
if (!hasSln) {
@@ -189,23 +185,34 @@ function build (gyp, argv, callback) {
if (!win) {
// Add build-time dependency symlinks (such as Python) to PATH
- const buildBinsDir = path.resolve('build', 'node_gyp_bins')
+ buildBinsDir = path.resolve('build', 'node_gyp_bins')
process.env.PATH = `${buildBinsDir}:${process.env.PATH}`
- log.verbose('bin symlinks', `adding symlinks (such as Python), at "${buildBinsDir}", to PATH`)
+ await fs.mkdir(buildBinsDir, { recursive: true })
+ const symlinkDestination = path.join(buildBinsDir, 'python3')
+ try {
+ await fs.unlink(symlinkDestination)
+ } catch (err) {
+ if (err.code !== 'ENOENT') throw err
+ }
+ await fs.symlink(python, symlinkDestination)
+ log.verbose('bin symlinks', `created symlink to "${python}" in "${buildBinsDir}" and added to PATH`)
}
- var proc = gyp.spawn(command, argv)
- proc.on('exit', onExit)
- }
+ const proc = gyp.spawn(command, argv)
+ await new Promise((resolve, reject) => proc.on('exit', async (code, signal) => {
+ if (buildBinsDir) {
+ // Clean up the build-time dependency symlinks:
+ await fs.rm(buildBinsDir, { recursive: true })
+ }
- function onExit (code, signal) {
- if (code !== 0) {
- return callback(new Error('`' + command + '` failed with exit code: ' + code))
- }
- if (signal) {
- return callback(new Error('`' + command + '` got signal: ' + signal))
- }
- callback()
+ if (code !== 0) {
+ return reject(new Error('`' + command + '` failed with exit code: ' + code))
+ }
+ if (signal) {
+ return reject(new Error('`' + command + '` got signal: ' + signal))
+ }
+ resolve()
+ }))
}
}
diff --git a/deps/npm/node_modules/node-gyp/lib/clean.js b/deps/npm/node_modules/node-gyp/lib/clean.js
index dbfa4dbb99d3cb..523f8016caecef 100644
--- a/deps/npm/node_modules/node-gyp/lib/clean.js
+++ b/deps/npm/node_modules/node-gyp/lib/clean.js
@@ -1,14 +1,14 @@
'use strict'
-const rm = require('rimraf')
-const log = require('npmlog')
+const fs = require('graceful-fs').promises
+const log = require('./log')
-function clean (gyp, argv, callback) {
+async function clean (gyp, argv) {
// Remove the 'build' dir
- var buildDir = 'build'
+ const buildDir = 'build'
log.verbose('clean', 'removing "%s" directory', buildDir)
- rm(buildDir, callback)
+ await fs.rm(buildDir, { recursive: true, force: true })
}
module.exports = clean
diff --git a/deps/npm/node_modules/node-gyp/lib/configure.js b/deps/npm/node_modules/node-gyp/lib/configure.js
index 1ca3ade70935ee..8da41a849dfcf6 100644
--- a/deps/npm/node_modules/node-gyp/lib/configure.js
+++ b/deps/npm/node_modules/node-gyp/lib/configure.js
@@ -1,47 +1,36 @@
'use strict'
-const fs = require('graceful-fs')
+const { promises: fs } = require('graceful-fs')
const path = require('path')
-const log = require('npmlog')
+const log = require('./log')
const os = require('os')
const processRelease = require('./process-release')
const win = process.platform === 'win32'
const findNodeDirectory = require('./find-node-directory')
-const createConfigGypi = require('./create-config-gypi')
-const msgFormat = require('util').format
-var findPython = require('./find-python')
-if (win) {
- var findVisualStudio = require('./find-visualstudio')
-}
-
-function configure (gyp, argv, callback) {
- var python
- var buildDir = path.resolve('build')
- var buildBinsDir = path.join(buildDir, 'node_gyp_bins')
- var configNames = ['config.gypi', 'common.gypi']
- var configs = []
- var nodeDir
- var release = processRelease(argv, gyp, process.version, process.release)
-
- findPython(gyp.opts.python, function (err, found) {
- if (err) {
- callback(err)
- } else {
- python = found
- getNodeDir()
- }
- })
-
- function getNodeDir () {
+const { createConfigGypi } = require('./create-config-gypi')
+const { format: msgFormat } = require('util')
+const { findAccessibleSync } = require('./util')
+const { findPython } = require('./find-python')
+const { findVisualStudio } = win ? require('./find-visualstudio') : {}
+
+async function configure (gyp, argv) {
+ const buildDir = path.resolve('build')
+ const configNames = ['config.gypi', 'common.gypi']
+ const configs = []
+ let nodeDir
+ const release = processRelease(argv, gyp, process.version, process.release)
+
+ const python = await findPython(gyp.opts.python)
+ return getNodeDir()
+
+ async function getNodeDir () {
// 'python' should be set by now
process.env.PYTHON = python
if (gyp.opts.nodedir) {
// --nodedir was specified. use that for the dev files
nodeDir = gyp.opts.nodedir.replace(/^~/, os.homedir())
-
log.verbose('get node dir', 'compiling against specified --nodedir dev files: %s', nodeDir)
- createBuildDir()
} else {
// if no --nodedir specified, ensure node dependencies are installed
if ('v' + release.version !== process.version) {
@@ -54,108 +43,66 @@ function configure (gyp, argv, callback) {
if (!release.semver) {
// could not parse the version string with semver
- return callback(new Error('Invalid version number: ' + release.version))
+ throw new Error('Invalid version number: ' + release.version)
}
// If the tarball option is set, always remove and reinstall the headers
// into devdir. Otherwise only install if they're not already there.
gyp.opts.ensure = !gyp.opts.tarball
- gyp.commands.install([release.version], function (err) {
- if (err) {
- return callback(err)
- }
- log.verbose('get node dir', 'target node version installed:', release.versionDir)
- nodeDir = path.resolve(gyp.devDir, release.versionDir)
- createBuildDir()
- })
- }
- }
+ await gyp.commands.install([release.version])
- function createBuildDir () {
- log.verbose('build dir', 'attempting to create "build" dir: %s', buildDir)
+ log.verbose('get node dir', 'target node version installed:', release.versionDir)
+ nodeDir = path.resolve(gyp.devDir, release.versionDir)
+ }
- const deepestBuildDirSubdirectory = win ? buildDir : buildBinsDir
- fs.mkdir(deepestBuildDirSubdirectory, { recursive: true }, function (err, isNew) {
- if (err) {
- return callback(err)
- }
- log.verbose(
- 'build dir', '"build" dir needed to be created?', isNew ? 'Yes' : 'No'
- )
- if (win) {
- findVisualStudio(release.semver, gyp.opts.msvs_version,
- createConfigFile)
- } else {
- createPythonSymlink()
- createConfigFile()
- }
- })
+ return createBuildDir()
}
- function createPythonSymlink () {
- const symlinkDestination = path.join(buildBinsDir, 'python3')
-
- log.verbose('python symlink', `creating symlink to "${python}" at "${symlinkDestination}"`)
+ async function createBuildDir () {
+ log.verbose('build dir', 'attempting to create "build" dir: %s', buildDir)
- fs.unlink(symlinkDestination, function (err) {
- if (err && err.code !== 'ENOENT') {
- log.verbose('python symlink', 'error when attempting to remove existing symlink')
- log.verbose('python symlink', err.stack, 'errno: ' + err.errno)
- }
- fs.symlink(python, symlinkDestination, function (err) {
- if (err) {
- log.verbose('python symlink', 'error when attempting to create Python symlink')
- log.verbose('python symlink', err.stack, 'errno: ' + err.errno)
- }
- })
- })
+ const isNew = await fs.mkdir(buildDir, { recursive: true })
+ log.verbose(
+ 'build dir', '"build" dir needed to be created?', isNew ? 'Yes' : 'No'
+ )
+ const vsInfo = win ? await findVisualStudio(release.semver, gyp.opts['msvs-version']) : null
+ return createConfigFile(vsInfo)
}
- function createConfigFile (err, vsInfo) {
- if (err) {
- return callback(err)
- }
- if (process.platform === 'win32') {
+ async function createConfigFile (vsInfo) {
+ if (win) {
process.env.GYP_MSVS_VERSION = Math.min(vsInfo.versionYear, 2015)
process.env.GYP_MSVS_OVERRIDE_PATH = vsInfo.path
}
- createConfigGypi({ gyp, buildDir, nodeDir, vsInfo }).then(configPath => {
- configs.push(configPath)
- findConfigs()
- }).catch(err => {
- callback(err)
- })
+ const configPath = await createConfigGypi({ gyp, buildDir, nodeDir, vsInfo, python })
+ configs.push(configPath)
+ return findConfigs()
}
- function findConfigs () {
- var name = configNames.shift()
+ async function findConfigs () {
+ const name = configNames.shift()
if (!name) {
return runGyp()
}
- var fullPath = path.resolve(name)
+ const fullPath = path.resolve(name)
log.verbose(name, 'checking for gypi file: %s', fullPath)
- fs.stat(fullPath, function (err) {
- if (err) {
- if (err.code === 'ENOENT') {
- findConfigs() // check next gypi filename
- } else {
- callback(err)
- }
- } else {
- log.verbose(name, 'found gypi file')
- configs.push(fullPath)
- findConfigs()
+ try {
+ await fs.stat(fullPath)
+ log.verbose(name, 'found gypi file')
+ configs.push(fullPath)
+ } catch (err) {
+ // ENOENT will check next gypi filename
+ if (err.code !== 'ENOENT') {
+ throw err
}
- })
- }
-
- function runGyp (err) {
- if (err) {
- return callback(err)
}
+ return findConfigs()
+ }
+
+ async function runGyp () {
if (!~argv.indexOf('-f') && !~argv.indexOf('--format')) {
if (win) {
log.verbose('gyp', 'gyp format was not specified; forcing "msvs"')
@@ -175,11 +122,13 @@ function configure (gyp, argv, callback) {
// For AIX and z/OS we need to set up the path to the exports file
// which contains the symbols needed for linking.
- var nodeExpFile
+ let nodeExpFile
+ let nodeRootDir
+ let candidates
+ let logprefix = 'find exports file'
if (process.platform === 'aix' || process.platform === 'os390' || process.platform === 'os400') {
- var ext = process.platform === 'os390' ? 'x' : 'exp'
- var nodeRootDir = findNodeDirectory()
- var candidates
+ const ext = process.platform === 'os390' ? 'x' : 'exp'
+ nodeRootDir = findNodeDirectory()
if (process.platform === 'aix' || process.platform === 'os400') {
candidates = [
@@ -202,24 +151,23 @@ function configure (gyp, argv, callback) {
})
}
- var logprefix = 'find exports file'
nodeExpFile = findAccessibleSync(logprefix, nodeRootDir, candidates)
if (nodeExpFile !== undefined) {
log.verbose(logprefix, 'Found exports file: %s', nodeExpFile)
} else {
- var msg = msgFormat('Could not find node.%s file in %s', ext, nodeRootDir)
+ const msg = msgFormat('Could not find node.%s file in %s', ext, nodeRootDir)
log.error(logprefix, 'Could not find exports file')
- return callback(new Error(msg))
+ throw new Error(msg)
}
}
// For z/OS we need to set up the path to zoslib include directory,
// which contains headers included in v8config.h.
- var zoslibIncDir
+ let zoslibIncDir
if (process.platform === 'os390') {
logprefix = "find zoslib's zos-base.h:"
let msg
- var zoslibIncPath = process.env.ZOSLIB_INCLUDES
+ let zoslibIncPath = process.env.ZOSLIB_INCLUDES
if (zoslibIncPath) {
zoslibIncPath = findAccessibleSync(logprefix, zoslibIncPath, ['zos-base.h'])
if (zoslibIncPath === undefined) {
@@ -247,114 +195,88 @@ function configure (gyp, argv, callback) {
} else if (release.version.split('.')[0] >= 16) {
// zoslib is only shipped in Node v16 and above.
log.error(logprefix, msg)
- return callback(new Error(msg))
+ throw new Error(msg)
}
}
// this logic ported from the old `gyp_addon` python file
- var gypScript = path.resolve(__dirname, '..', 'gyp', 'gyp_main.py')
- var addonGypi = path.resolve(__dirname, '..', 'addon.gypi')
- var commonGypi = path.resolve(nodeDir, 'include/node/common.gypi')
- fs.stat(commonGypi, function (err) {
- if (err) {
- commonGypi = path.resolve(nodeDir, 'common.gypi')
- }
+ const gypScript = path.resolve(__dirname, '..', 'gyp', 'gyp_main.py')
+ const addonGypi = path.resolve(__dirname, '..', 'addon.gypi')
+ let commonGypi = path.resolve(nodeDir, 'include/node/common.gypi')
+ try {
+ await fs.stat(commonGypi)
+ } catch (err) {
+ commonGypi = path.resolve(nodeDir, 'common.gypi')
+ }
- var outputDir = 'build'
- if (win) {
- // Windows expects an absolute path
- outputDir = buildDir
- }
- var nodeGypDir = path.resolve(__dirname, '..')
-
- var nodeLibFile = path.join(nodeDir,
- !gyp.opts.nodedir ? '<(target_arch)' : '$(Configuration)',
- release.name + '.lib')
-
- argv.push('-I', addonGypi)
- argv.push('-I', commonGypi)
- argv.push('-Dlibrary=shared_library')
- argv.push('-Dvisibility=default')
- argv.push('-Dnode_root_dir=' + nodeDir)
- if (process.platform === 'aix' || process.platform === 'os390' || process.platform === 'os400') {
- argv.push('-Dnode_exp_file=' + nodeExpFile)
- if (process.platform === 'os390' && zoslibIncDir) {
- argv.push('-Dzoslib_include_dir=' + zoslibIncDir)
- }
- }
- argv.push('-Dnode_gyp_dir=' + nodeGypDir)
+ let outputDir = 'build'
+ if (win) {
+ // Windows expects an absolute path
+ outputDir = buildDir
+ }
+ const nodeGypDir = path.resolve(__dirname, '..')
- // Do this to keep Cygwin environments happy, else the unescaped '\' gets eaten up,
- // resulting in bad paths, Ex c:parentFolderfolderanotherFolder instead of c:\parentFolder\folder\anotherFolder
- if (win) {
- nodeLibFile = nodeLibFile.replace(/\\/g, '\\\\')
- }
- argv.push('-Dnode_lib_file=' + nodeLibFile)
- argv.push('-Dmodule_root_dir=' + process.cwd())
- argv.push('-Dnode_engine=' +
- (gyp.opts.node_engine || process.jsEngine || 'v8'))
- argv.push('--depth=.')
- argv.push('--no-parallel')
+ let nodeLibFile = path.join(nodeDir,
+ !gyp.opts.nodedir ? '<(target_arch)' : '$(Configuration)',
+ release.name + '.lib')
- // tell gyp to write the Makefile/Solution files into output_dir
- argv.push('--generator-output', outputDir)
+ argv.push('-I', addonGypi)
+ argv.push('-I', commonGypi)
+ argv.push('-Dlibrary=shared_library')
+ argv.push('-Dvisibility=default')
+ argv.push('-Dnode_root_dir=' + nodeDir)
+ if (process.platform === 'aix' || process.platform === 'os390' || process.platform === 'os400') {
+ argv.push('-Dnode_exp_file=' + nodeExpFile)
+ if (process.platform === 'os390' && zoslibIncDir) {
+ argv.push('-Dzoslib_include_dir=' + zoslibIncDir)
+ }
+ }
+ argv.push('-Dnode_gyp_dir=' + nodeGypDir)
- // tell make to write its output into the same dir
- argv.push('-Goutput_dir=.')
+ // Do this to keep Cygwin environments happy, else the unescaped '\' gets eaten up,
+ // resulting in bad paths, Ex c:parentFolderfolderanotherFolder instead of c:\parentFolder\folder\anotherFolder
+ if (win) {
+ nodeLibFile = nodeLibFile.replace(/\\/g, '\\\\')
+ }
+ argv.push('-Dnode_lib_file=' + nodeLibFile)
+ argv.push('-Dmodule_root_dir=' + process.cwd())
+ argv.push('-Dnode_engine=' +
+ (gyp.opts.node_engine || process.jsEngine || 'v8'))
+ argv.push('--depth=.')
+ argv.push('--no-parallel')
- // enforce use of the "binding.gyp" file
- argv.unshift('binding.gyp')
+ // tell gyp to write the Makefile/Solution files into output_dir
+ argv.push('--generator-output', outputDir)
- // execute `gyp` from the current target nodedir
- argv.unshift(gypScript)
+ // tell make to write its output into the same dir
+ argv.push('-Goutput_dir=.')
- // make sure python uses files that came with this particular node package
- var pypath = [path.join(__dirname, '..', 'gyp', 'pylib')]
- if (process.env.PYTHONPATH) {
- pypath.push(process.env.PYTHONPATH)
- }
- process.env.PYTHONPATH = pypath.join(win ? ';' : ':')
+ // enforce use of the "binding.gyp" file
+ argv.unshift('binding.gyp')
- var cp = gyp.spawn(python, argv)
- cp.on('exit', onCpExit)
- })
- }
+ // execute `gyp` from the current target nodedir
+ argv.unshift(gypScript)
- function onCpExit (code) {
- if (code !== 0) {
- callback(new Error('`gyp` failed with exit code: ' + code))
- } else {
- // we're done
- callback()
+ // make sure python uses files that came with this particular node package
+ const pypath = [path.join(__dirname, '..', 'gyp', 'pylib')]
+ if (process.env.PYTHONPATH) {
+ pypath.push(process.env.PYTHONPATH)
}
- }
-}
+ process.env.PYTHONPATH = pypath.join(win ? ';' : ':')
-/**
- * Returns the first file or directory from an array of candidates that is
- * readable by the current user, or undefined if none of the candidates are
- * readable.
- */
-function findAccessibleSync (logprefix, dir, candidates) {
- for (var next = 0; next < candidates.length; next++) {
- var candidate = path.resolve(dir, candidates[next])
- try {
- var fd = fs.openSync(candidate, 'r')
- } catch (e) {
- // this candidate was not found or not readable, do nothing
- log.silly(logprefix, 'Could not open %s: %s', candidate, e.message)
- continue
- }
- fs.closeSync(fd)
- log.silly(logprefix, 'Found readable %s', candidate)
- return candidate
+ await new Promise((resolve, reject) => {
+ const cp = gyp.spawn(python, argv)
+ cp.on('exit', (code) => {
+ if (code !== 0) {
+ reject(new Error('`gyp` failed with exit code: ' + code))
+ } else {
+ // we're done
+ resolve()
+ }
+ })
+ })
}
-
- return undefined
}
module.exports = configure
-module.exports.test = {
- findAccessibleSync: findAccessibleSync
-}
module.exports.usage = 'Generates ' + (win ? 'MSVC project files' : 'a Makefile') + ' for the current module'
diff --git a/deps/npm/node_modules/node-gyp/lib/create-config-gypi.js b/deps/npm/node_modules/node-gyp/lib/create-config-gypi.js
index ced49115027336..d598dea6e2e7fa 100644
--- a/deps/npm/node_modules/node-gyp/lib/create-config-gypi.js
+++ b/deps/npm/node_modules/node-gyp/lib/create-config-gypi.js
@@ -1,7 +1,7 @@
'use strict'
-const fs = require('graceful-fs')
-const log = require('npmlog')
+const fs = require('graceful-fs').promises
+const log = require('./log')
const path = require('path')
function parseConfigGypi (config) {
@@ -24,7 +24,7 @@ async function getBaseConfigGypi ({ gyp, nodeDir }) {
if (shouldReadConfigGypi && nodeDir) {
try {
const baseConfigGypiPath = path.resolve(nodeDir, 'include/node/config.gypi')
- const baseConfigGypi = await fs.promises.readFile(baseConfigGypiPath)
+ const baseConfigGypi = await fs.readFile(baseConfigGypiPath)
return parseConfigGypi(baseConfigGypi.toString())
} catch (err) {
log.warn('read config.gypi', err.message)
@@ -35,7 +35,7 @@ async function getBaseConfigGypi ({ gyp, nodeDir }) {
return JSON.parse(JSON.stringify(process.config))
}
-async function getCurrentConfigGypi ({ gyp, nodeDir, vsInfo }) {
+async function getCurrentConfigGypi ({ gyp, nodeDir, vsInfo, python }) {
const config = await getBaseConfigGypi({ gyp, nodeDir })
if (!config.target_defaults) {
config.target_defaults = {}
@@ -75,6 +75,9 @@ async function getCurrentConfigGypi ({ gyp, nodeDir, vsInfo }) {
// set the node development directory
variables.nodedir = nodeDir
+ // set the configured Python path
+ variables.python = python
+
// disable -T "thin" static archives by default
variables.standalone_static_library = gyp.opts.thin ? 0 : 1
@@ -112,13 +115,13 @@ async function getCurrentConfigGypi ({ gyp, nodeDir, vsInfo }) {
return config
}
-async function createConfigGypi ({ gyp, buildDir, nodeDir, vsInfo }) {
+async function createConfigGypi ({ gyp, buildDir, nodeDir, vsInfo, python }) {
const configFilename = 'config.gypi'
const configPath = path.resolve(buildDir, configFilename)
log.verbose('build/' + configFilename, 'creating config file')
- const config = await getCurrentConfigGypi({ gyp, nodeDir, vsInfo })
+ const config = await getCurrentConfigGypi({ gyp, nodeDir, vsInfo, python })
// ensures that any boolean values in config.gypi get stringified
function boolsToString (k, v) {
@@ -135,13 +138,13 @@ async function createConfigGypi ({ gyp, buildDir, nodeDir, vsInfo }) {
const json = JSON.stringify(config, boolsToString, 2)
log.verbose('build/' + configFilename, 'writing out config file: %s', configPath)
- await fs.promises.writeFile(configPath, [prefix, json, ''].join('\n'))
+ await fs.writeFile(configPath, [prefix, json, ''].join('\n'))
return configPath
}
-module.exports = createConfigGypi
-module.exports.test = {
- parseConfigGypi: parseConfigGypi,
- getCurrentConfigGypi: getCurrentConfigGypi
+module.exports = {
+ createConfigGypi,
+ parseConfigGypi,
+ getCurrentConfigGypi
}
diff --git a/deps/npm/node_modules/node-gyp/lib/download.js b/deps/npm/node_modules/node-gyp/lib/download.js
new file mode 100644
index 00000000000000..ed0aa37f441165
--- /dev/null
+++ b/deps/npm/node_modules/node-gyp/lib/download.js
@@ -0,0 +1,39 @@
+const fetch = require('make-fetch-happen')
+const { promises: fs } = require('graceful-fs')
+const log = require('./log')
+
+async function download (gyp, url) {
+ log.http('GET', url)
+
+ const requestOpts = {
+ headers: {
+ 'User-Agent': `node-gyp v${gyp.version} (node ${process.version})`,
+ Connection: 'keep-alive'
+ },
+ proxy: gyp.opts.proxy,
+ noProxy: gyp.opts.noproxy
+ }
+
+ const cafile = gyp.opts.cafile
+ if (cafile) {
+ requestOpts.ca = await readCAFile(cafile)
+ }
+
+ const res = await fetch(url, requestOpts)
+ log.http(res.status, res.url)
+
+ return res
+}
+
+async function readCAFile (filename) {
+ // The CA file can contain multiple certificates so split on certificate
+ // boundaries. [\S\s]*? is used to match everything including newlines.
+ const ca = await fs.readFile(filename, 'utf8')
+ const re = /(-----BEGIN CERTIFICATE-----[\S\s]*?-----END CERTIFICATE-----)/g
+ return ca.match(re)
+}
+
+module.exports = {
+ download,
+ readCAFile
+}
diff --git a/deps/npm/node_modules/node-gyp/lib/find-node-directory.js b/deps/npm/node_modules/node-gyp/lib/find-node-directory.js
index 0dd781a6cfae8c..8838b81d338997 100644
--- a/deps/npm/node_modules/node-gyp/lib/find-node-directory.js
+++ b/deps/npm/node_modules/node-gyp/lib/find-node-directory.js
@@ -1,7 +1,7 @@
'use strict'
const path = require('path')
-const log = require('npmlog')
+const log = require('./log')
function findNodeDirectory (scriptLocation, processObj) {
// set dirname and process if not passed in
@@ -14,10 +14,10 @@ function findNodeDirectory (scriptLocation, processObj) {
}
// Have a look to see what is above us, to try and work out where we are
- var npmParentDirectory = path.join(scriptLocation, '../../../..')
+ const npmParentDirectory = path.join(scriptLocation, '../../../..')
log.verbose('node-gyp root', 'npm_parent_directory is ' +
path.basename(npmParentDirectory))
- var nodeRootDir = ''
+ let nodeRootDir = ''
log.verbose('node-gyp root', 'Finding node root directory')
if (path.basename(npmParentDirectory) === 'deps') {
@@ -41,8 +41,8 @@ function findNodeDirectory (scriptLocation, processObj) {
} else {
// We don't know where we are, try working it out from the location
// of the node binary
- var nodeDir = path.dirname(processObj.execPath)
- var directoryUp = path.basename(nodeDir)
+ const nodeDir = path.dirname(processObj.execPath)
+ const directoryUp = path.basename(nodeDir)
if (directoryUp === 'bin') {
nodeRootDir = path.join(nodeDir, '..')
} else if (directoryUp === 'Release' || directoryUp === 'Debug') {
diff --git a/deps/npm/node_modules/node-gyp/lib/find-python.js b/deps/npm/node_modules/node-gyp/lib/find-python.js
index a445e825b9d7e3..615da57bb85723 100644
--- a/deps/npm/node_modules/node-gyp/lib/find-python.js
+++ b/deps/npm/node_modules/node-gyp/lib/find-python.js
@@ -1,11 +1,15 @@
'use strict'
-const log = require('npmlog')
+const log = require('./log')
const semver = require('semver')
-const cp = require('child_process')
-const extend = require('util')._extend // eslint-disable-line
+const { execFile } = require('./util')
const win = process.platform === 'win32'
-const logWithPrefix = require('./util').logWithPrefix
+
+function getOsUserInfo () {
+ try {
+ return require('os').userInfo().username
+ } catch {}
+}
const systemDrive = process.env.SystemDrive || 'C:'
const username = process.env.USERNAME || process.env.USER || getOsUserInfo()
@@ -15,7 +19,7 @@ const programFiles = process.env.ProgramW6432 || process.env.ProgramFiles || `${
const programFilesX86 = process.env['ProgramFiles(x86)'] || `${programFiles} (x86)`
const winDefaultLocationsArray = []
-for (const majorMinor of ['39', '38', '37', '36']) {
+for (const majorMinor of ['311', '310', '39', '38']) {
if (foundLocalAppData) {
winDefaultLocationsArray.push(
`${localAppData}\\Programs\\Python\\Python${majorMinor}\\python.exe`,
@@ -33,45 +37,39 @@ for (const majorMinor of ['39', '38', '37', '36']) {
}
}
-function getOsUserInfo () {
- try {
- return require('os').userInfo().username
- } catch (e) {}
-}
-
-function PythonFinder (configPython, callback) {
- this.callback = callback
- this.configPython = configPython
- this.errorLog = []
-}
+class PythonFinder {
+ static findPython = (...args) => new PythonFinder(...args).findPython()
-PythonFinder.prototype = {
- log: logWithPrefix(log, 'find Python'),
- argsExecutable: ['-c', 'import sys; print(sys.executable);'],
- argsVersion: ['-c', 'import sys; print("%s.%s.%s" % sys.version_info[:3]);'],
- semverRange: '>=3.6.0',
+ log = log.withPrefix('find Python')
+ argsExecutable = ['-c', 'import sys; print(sys.executable);']
+ argsVersion = ['-c', 'import sys; print("%s.%s.%s" % sys.version_info[:3]);']
+ semverRange = '>=3.6.0'
// These can be overridden for testing:
- execFile: cp.execFile,
- env: process.env,
- win: win,
- pyLauncher: 'py.exe',
- winDefaultLocations: winDefaultLocationsArray,
+ execFile = execFile
+ env = process.env
+ win = win
+ pyLauncher = 'py.exe'
+ winDefaultLocations = winDefaultLocationsArray
+
+ constructor (configPython) {
+ this.configPython = configPython
+ this.errorLog = []
+ }
// Logs a message at verbose level, but also saves it to be displayed later
// at error level if an error occurs. This should help diagnose the problem.
- addLog: function addLog (message) {
+ addLog (message) {
this.log.verbose(message)
this.errorLog.push(message)
- },
+ }
// Find Python by trying a sequence of possibilities.
// Ignore errors, keep trying until Python is found.
- findPython: function findPython () {
- const SKIP = 0; const FAIL = 1
- var toCheck = getChecks.apply(this)
-
- function getChecks () {
+ async findPython () {
+ const SKIP = 0
+ const FAIL = 1
+ const toCheck = (() => {
if (this.env.NODE_GYP_FORCE_PYTHON) {
return [{
before: () => {
@@ -80,12 +78,11 @@ PythonFinder.prototype = {
this.addLog('- process.env.NODE_GYP_FORCE_PYTHON is ' +
`"${this.env.NODE_GYP_FORCE_PYTHON}"`)
},
- check: this.checkCommand,
- arg: this.env.NODE_GYP_FORCE_PYTHON
+ check: () => this.checkCommand(this.env.NODE_GYP_FORCE_PYTHON)
}]
}
- var checks = [
+ const checks = [
{
before: () => {
if (!this.configPython) {
@@ -98,8 +95,7 @@ PythonFinder.prototype = {
this.addLog('- "--python=" or "npm config get python" is ' +
`"${this.configPython}"`)
},
- check: this.checkCommand,
- arg: this.configPython
+ check: () => this.checkCommand(this.configPython)
},
{
before: () => {
@@ -112,78 +108,69 @@ PythonFinder.prototype = {
'variable PYTHON')
this.addLog(`- process.env.PYTHON is "${this.env.PYTHON}"`)
},
- check: this.checkCommand,
- arg: this.env.PYTHON
- },
+ check: () => this.checkCommand(this.env.PYTHON)
+ }
+ ]
+
+ if (this.win) {
+ checks.push({
+ before: () => {
+ this.addLog(
+ 'checking if the py launcher can be used to find Python 3')
+ },
+ check: () => this.checkPyLauncher()
+ })
+ }
+
+ checks.push(...[
{
before: () => { this.addLog('checking if "python3" can be used') },
- check: this.checkCommand,
- arg: 'python3'
+ check: () => this.checkCommand('python3')
},
{
before: () => { this.addLog('checking if "python" can be used') },
- check: this.checkCommand,
- arg: 'python'
+ check: () => this.checkCommand('python')
}
- ]
+ ])
if (this.win) {
- for (var i = 0; i < this.winDefaultLocations.length; ++i) {
+ for (let i = 0; i < this.winDefaultLocations.length; ++i) {
const location = this.winDefaultLocations[i]
checks.push({
- before: () => {
- this.addLog('checking if Python is ' +
- `${location}`)
- },
- check: this.checkExecPath,
- arg: location
+ before: () => this.addLog(`checking if Python is ${location}`),
+ check: () => this.checkExecPath(location)
})
}
- checks.push({
- before: () => {
- this.addLog(
- 'checking if the py launcher can be used to find Python 3')
- },
- check: this.checkPyLauncher
- })
}
return checks
- }
-
- function runChecks (err) {
- this.log.silly('runChecks: err = %j', (err && err.stack) || err)
+ })()
- const check = toCheck.shift()
- if (!check) {
- return this.fail()
- }
-
- const before = check.before.apply(this)
+ for (const check of toCheck) {
+ const before = check.before()
if (before === SKIP) {
- return runChecks.apply(this)
+ continue
}
if (before === FAIL) {
return this.fail()
}
-
- const args = [runChecks.bind(this)]
- if (check.arg) {
- args.unshift(check.arg)
+ try {
+ return await check.check()
+ } catch (err) {
+ this.log.silly('runChecks: err = %j', (err && err.stack) || err)
}
- check.check.apply(this, args)
}
- runChecks.apply(this)
- },
+ return this.fail()
+ }
// Check if command is a valid Python to use.
// Will exit the Python finder on success.
// If on Windows, run in a CMD shell to support BAT/CMD launchers.
- checkCommand: function checkCommand (command, errorCallback) {
- var exec = command
- var args = this.argsExecutable
- var shell = false
+ async checkCommand (command) {
+ let exec = command
+ let args = this.argsExecutable
+ let shell = false
if (this.win) {
// Arguments have to be manually quoted
exec = `"${exec}"`
@@ -192,19 +179,19 @@ PythonFinder.prototype = {
}
this.log.verbose(`- executing "${command}" to get executable path`)
- this.run(exec, args, shell, function (err, execPath) {
- // Possible outcomes:
- // - Error: not in PATH, not executable or execution fails
- // - Gibberish: the next command to check version will fail
- // - Absolute path to executable
- if (err) {
- this.addLog(`- "${command}" is not in PATH or produced an error`)
- return errorCallback(err)
- }
+ // Possible outcomes:
+ // - Error: not in PATH, not executable or execution fails
+ // - Gibberish: the next command to check version will fail
+ // - Absolute path to executable
+ try {
+ const execPath = await this.run(exec, args, shell)
this.addLog(`- executable path is "${execPath}"`)
- this.checkExecPath(execPath, errorCallback)
- }.bind(this))
- },
+ return this.checkExecPath(execPath)
+ } catch (err) {
+ this.addLog(`- "${command}" is not in PATH or produced an error`)
+ throw err
+ }
+ }
// Check if the py launcher can find a valid Python to use.
// Will exit the Python finder on success.
@@ -216,97 +203,86 @@ PythonFinder.prototype = {
// the first command line argument. Since "py.exe -3" would be an invalid
// executable for "execFile", we have to use the launcher to figure out
// where the actual "python.exe" executable is located.
- checkPyLauncher: function checkPyLauncher (errorCallback) {
- this.log.verbose(
- `- executing "${this.pyLauncher}" to get Python 3 executable path`)
- this.run(this.pyLauncher, ['-3', ...this.argsExecutable], false,
- function (err, execPath) {
- // Possible outcomes: same as checkCommand
- if (err) {
- this.addLog(
- `- "${this.pyLauncher}" is not in PATH or produced an error`)
- return errorCallback(err)
- }
- this.addLog(`- executable path is "${execPath}"`)
- this.checkExecPath(execPath, errorCallback)
- }.bind(this))
- },
+ async checkPyLauncher () {
+ this.log.verbose(`- executing "${this.pyLauncher}" to get Python 3 executable path`)
+ // Possible outcomes: same as checkCommand
+ try {
+ const execPath = await this.run(this.pyLauncher, ['-3', ...this.argsExecutable], false)
+ this.addLog(`- executable path is "${execPath}"`)
+ return this.checkExecPath(execPath)
+ } catch (err) {
+ this.addLog(`- "${this.pyLauncher}" is not in PATH or produced an error`)
+ throw err
+ }
+ }
// Check if a Python executable is the correct version to use.
// Will exit the Python finder on success.
- checkExecPath: function checkExecPath (execPath, errorCallback) {
+ async checkExecPath (execPath) {
this.log.verbose(`- executing "${execPath}" to get version`)
- this.run(execPath, this.argsVersion, false, function (err, version) {
- // Possible outcomes:
- // - Error: executable can not be run (likely meaning the command wasn't
- // a Python executable and the previous command produced gibberish)
- // - Gibberish: somehow the last command produced an executable path,
- // this will fail when verifying the version
- // - Version of the Python executable
- if (err) {
- this.addLog(`- "${execPath}" could not be run`)
- return errorCallback(err)
- }
+ // Possible outcomes:
+ // - Error: executable can not be run (likely meaning the command wasn't
+ // a Python executable and the previous command produced gibberish)
+ // - Gibberish: somehow the last command produced an executable path,
+ // this will fail when verifying the version
+ // - Version of the Python executable
+ try {
+ const version = await this.run(execPath, this.argsVersion, false)
this.addLog(`- version is "${version}"`)
const range = new semver.Range(this.semverRange)
- var valid = false
+ let valid = false
try {
valid = range.test(version)
} catch (err) {
this.log.silly('range.test() threw:\n%s', err.stack)
this.addLog(`- "${execPath}" does not have a valid version`)
this.addLog('- is it a Python executable?')
- return errorCallback(err)
+ throw err
}
-
if (!valid) {
this.addLog(`- version is ${version} - should be ${this.semverRange}`)
this.addLog('- THIS VERSION OF PYTHON IS NOT SUPPORTED')
- return errorCallback(new Error(
- `Found unsupported Python version ${version}`))
+ throw new Error(`Found unsupported Python version ${version}`)
}
- this.succeed(execPath, version)
- }.bind(this))
- },
+ return this.succeed(execPath, version)
+ } catch (err) {
+ this.addLog(`- "${execPath}" could not be run`)
+ throw err
+ }
+ }
// Run an executable or shell command, trimming the output.
- run: function run (exec, args, shell, callback) {
- var env = extend({}, this.env)
+ async run (exec, args, shell) {
+ const env = Object.assign({}, this.env)
env.TERM = 'dumb'
- const opts = { env: env, shell: shell }
+ const opts = { env, shell }
this.log.silly('execFile: exec = %j', exec)
this.log.silly('execFile: args = %j', args)
this.log.silly('execFile: opts = %j', opts)
try {
- this.execFile(exec, args, opts, execFileCallback.bind(this))
- } catch (err) {
- this.log.silly('execFile: threw:\n%s', err.stack)
- return callback(err)
- }
-
- function execFileCallback (err, stdout, stderr) {
+ const [err, stdout, stderr] = await this.execFile(exec, args, opts)
this.log.silly('execFile result: err = %j', (err && err.stack) || err)
this.log.silly('execFile result: stdout = %j', stdout)
this.log.silly('execFile result: stderr = %j', stderr)
- if (err) {
- return callback(err)
- }
- const execPath = stdout.trim()
- callback(null, execPath)
+ return stdout.trim()
+ } catch (err) {
+ this.log.silly('execFile: threw:\n%s', err.stack)
+ throw err
}
- },
+ }
- succeed: function succeed (execPath, version) {
+ succeed (execPath, version) {
this.log.info(`using Python version ${version} found at "${execPath}"`)
- process.nextTick(this.callback.bind(null, null, execPath))
- },
+ return execPath
+ }
- fail: function fail () {
+ fail () {
const errorLog = this.errorLog.join('\n')
- const pathExample = this.win ? 'C:\\Path\\To\\python.exe'
+ const pathExample = this.win
+ ? 'C:\\Path\\To\\python.exe'
: '/path/to/pythonexecutable'
// For Windows 80 col console, use up to the column before the one marked
// with X (total 79 chars including logger prefix, 58 chars usable here):
@@ -327,18 +303,8 @@ PythonFinder.prototype = {
].join('\n')
this.log.error(`\n${errorLog}\n\n${info}\n`)
- process.nextTick(this.callback.bind(null, new Error(
- 'Could not find any Python installation to use')))
+ throw new Error('Could not find any Python installation to use')
}
}
-function findPython (configPython, callback) {
- var finder = new PythonFinder(configPython, callback)
- finder.findPython()
-}
-
-module.exports = findPython
-module.exports.test = {
- PythonFinder: PythonFinder,
- findPython: findPython
-}
+module.exports = PythonFinder
diff --git a/deps/npm/node_modules/node-gyp/lib/find-visualstudio.js b/deps/npm/node_modules/node-gyp/lib/find-visualstudio.js
index 16f6e79559307c..b57770259abde3 100644
--- a/deps/npm/node_modules/node-gyp/lib/find-visualstudio.js
+++ b/deps/npm/node_modules/node-gyp/lib/find-visualstudio.js
@@ -1,39 +1,32 @@
'use strict'
-const log = require('npmlog')
-const execFile = require('child_process').execFile
-const fs = require('fs')
-const path = require('path').win32
-const logWithPrefix = require('./util').logWithPrefix
-const regSearchKeys = require('./util').regSearchKeys
-
-function findVisualStudio (nodeSemver, configMsvsVersion, callback) {
- const finder = new VisualStudioFinder(nodeSemver, configMsvsVersion,
- callback)
- finder.findVisualStudio()
-}
+const log = require('./log')
+const { existsSync } = require('fs')
+const { win32: path } = require('path')
+const { regSearchKeys, execFile } = require('./util')
-function VisualStudioFinder (nodeSemver, configMsvsVersion, callback) {
- this.nodeSemver = nodeSemver
- this.configMsvsVersion = configMsvsVersion
- this.callback = callback
- this.errorLog = []
- this.validVersions = []
-}
+class VisualStudioFinder {
+ static findVisualStudio = (...args) => new VisualStudioFinder(...args).findVisualStudio()
+
+ log = log.withPrefix('find VS')
-VisualStudioFinder.prototype = {
- log: logWithPrefix(log, 'find VS'),
+ regSearchKeys = regSearchKeys
- regSearchKeys: regSearchKeys,
+ constructor (nodeSemver, configMsvsVersion) {
+ this.nodeSemver = nodeSemver
+ this.configMsvsVersion = configMsvsVersion
+ this.errorLog = []
+ this.validVersions = []
+ }
// Logs a message at verbose level, but also saves it to be displayed later
// at error level if an error occurs. This should help diagnose the problem.
- addLog: function addLog (message) {
+ addLog (message) {
this.log.verbose(message)
this.errorLog.push(message)
- },
+ }
- findVisualStudio: function findVisualStudio () {
+ async findVisualStudio () {
this.configVersionYear = null
this.configPath = null
if (this.configMsvsVersion) {
@@ -60,32 +53,30 @@ VisualStudioFinder.prototype = {
this.addLog('VCINSTALLDIR not set, not running in VS Command Prompt')
}
- this.findVisualStudio2017OrNewer((info) => {
+ const checks = [
+ () => this.findVisualStudio2017OrNewer(),
+ () => this.findVisualStudio2015(),
+ () => this.findVisualStudio2013()
+ ]
+
+ for (const check of checks) {
+ const info = await check()
if (info) {
return this.succeed(info)
}
- this.findVisualStudio2015((info) => {
- if (info) {
- return this.succeed(info)
- }
- this.findVisualStudio2013((info) => {
- if (info) {
- return this.succeed(info)
- }
- this.fail()
- })
- })
- })
- },
+ }
+
+ return this.fail()
+ }
- succeed: function succeed (info) {
+ succeed (info) {
this.log.info(`using VS${info.versionYear} (${info.version}) found at:` +
`\n"${info.path}"` +
'\nrun with --verbose for detailed information')
- process.nextTick(this.callback.bind(null, null, info))
- },
+ return info
+ }
- fail: function fail () {
+ fail () {
if (this.configMsvsVersion && this.envVcInstallDir) {
this.errorLog.push(
'msvs_version does not match this VS Command Prompt or the',
@@ -119,17 +110,16 @@ VisualStudioFinder.prototype = {
].join('\n')
this.log.error(`\n${errorLog}\n\n${infoLog}\n`)
- process.nextTick(this.callback.bind(null, new Error(
- 'Could not find any Visual Studio installation to use')))
- },
+ throw new Error('Could not find any Visual Studio installation to use')
+ }
// Invoke the PowerShell script to get information about Visual Studio 2017
// or newer installations
- findVisualStudio2017OrNewer: function findVisualStudio2017OrNewer (cb) {
- var ps = path.join(process.env.SystemRoot, 'System32',
+ async findVisualStudio2017OrNewer () {
+ const ps = path.join(process.env.SystemRoot, 'System32',
'WindowsPowerShell', 'v1.0', 'powershell.exe')
- var csFile = path.join(__dirname, 'Find-VisualStudio.cs')
- var psArgs = [
+ const csFile = path.join(__dirname, 'Find-VisualStudio.cs')
+ const psArgs = [
'-ExecutionPolicy',
'Unrestricted',
'-NoProfile',
@@ -138,22 +128,19 @@ VisualStudioFinder.prototype = {
]
this.log.silly('Running', ps, psArgs)
- var child = execFile(ps, psArgs, { encoding: 'utf8' },
- (err, stdout, stderr) => {
- this.parseData(err, stdout, stderr, cb)
- })
- child.stdin.end()
- },
+ const [err, stdout, stderr] = await execFile(ps, psArgs, { encoding: 'utf8' })
+ return this.parseData(err, stdout, stderr)
+ }
// Parse the output of the PowerShell script and look for an installation
// of Visual Studio 2017 or newer to use
- parseData: function parseData (err, stdout, stderr, cb) {
+ parseData (err, stdout, stderr) {
this.log.silly('PS stderr = %j', stderr)
const failPowershell = () => {
this.addLog(
'could not use PowerShell to find Visual Studio 2017 or newer, try re-running with \'--loglevel silly\' for more details')
- cb(null)
+ return null
}
if (err) {
@@ -161,7 +148,7 @@ VisualStudioFinder.prototype = {
return failPowershell()
}
- var vsInfo
+ let vsInfo
try {
vsInfo = JSON.parse(stdout)
} catch (e) {
@@ -178,7 +165,7 @@ VisualStudioFinder.prototype = {
vsInfo = vsInfo.map((info) => {
this.log.silly(`processing installation: "${info.path}"`)
info.path = path.resolve(info.path)
- var ret = this.getVersionInfo(info)
+ const ret = this.getVersionInfo(info)
ret.path = info.path
ret.msBuild = this.getMSBuild(info, ret.versionYear)
ret.toolset = this.getToolset(info, ret.versionYear)
@@ -199,7 +186,7 @@ VisualStudioFinder.prototype = {
// Sort to place newer versions first
vsInfo.sort((a, b) => b.versionYear - a.versionYear)
- for (var i = 0; i < vsInfo.length; ++i) {
+ for (let i = 0; i < vsInfo.length; ++i) {
const info = vsInfo[i]
this.addLog(`checking VS${info.versionYear} (${info.version}) found ` +
`at:\n"${info.path}"`)
@@ -229,23 +216,23 @@ VisualStudioFinder.prototype = {
continue
}
- return cb(info)
+ return info
}
this.addLog(
'could not find a version of Visual Studio 2017 or newer to use')
- cb(null)
- },
+ return null
+ }
// Helper - process version information
- getVersionInfo: function getVersionInfo (info) {
+ getVersionInfo (info) {
const match = /^(\d+)\.(\d+)\..*/.exec(info.version)
if (!match) {
this.log.silly('- failed to parse version:', info.version)
return {}
}
this.log.silly('- version match = %j', match)
- var ret = {
+ const ret = {
version: info.version,
versionMajor: parseInt(match[1], 10),
versionMinor: parseInt(match[2], 10)
@@ -264,14 +251,14 @@ VisualStudioFinder.prototype = {
}
this.log.silly('- unsupported version:', ret.versionMajor)
return {}
- },
+ }
- msBuildPathExists: function msBuildPathExists (path) {
- return fs.existsSync(path)
- },
+ msBuildPathExists (path) {
+ return existsSync(path)
+ }
// Helper - process MSBuild information
- getMSBuild: function getMSBuild (info, versionYear) {
+ getMSBuild (info, versionYear) {
const pkg = 'Microsoft.VisualStudio.VC.MSBuild.Base'
const msbuildPath = path.join(info.path, 'MSBuild', 'Current', 'Bin', 'MSBuild.exe')
const msbuildPathArm64 = path.join(info.path, 'MSBuild', 'Current', 'Bin', 'arm64', 'MSBuild.exe')
@@ -295,10 +282,10 @@ VisualStudioFinder.prototype = {
return msbuildPath
}
return null
- },
+ }
// Helper - process toolset information
- getToolset: function getToolset (info, versionYear) {
+ getToolset (info, versionYear) {
const pkg = 'Microsoft.VisualStudio.Component.VC.Tools.x86.x64'
const express = 'Microsoft.VisualStudio.WDExpress'
@@ -319,15 +306,15 @@ VisualStudioFinder.prototype = {
}
this.log.silly('- invalid versionYear:', versionYear)
return null
- },
+ }
// Helper - process Windows SDK information
- getSDK: function getSDK (info) {
+ getSDK (info) {
const win8SDK = 'Microsoft.VisualStudio.Component.Windows81SDK'
const win10SDKPrefix = 'Microsoft.VisualStudio.Component.Windows10SDK.'
const win11SDKPrefix = 'Microsoft.VisualStudio.Component.Windows11SDK.'
- var Win10or11SDKVer = 0
+ let Win10or11SDKVer = 0
info.packages.forEach((pkg) => {
if (!pkg.startsWith(win10SDKPrefix) && !pkg.startsWith(win11SDKPrefix)) {
return
@@ -354,14 +341,14 @@ VisualStudioFinder.prototype = {
return '8.1'
}
return null
- },
+ }
// Find an installation of Visual Studio 2015 to use
- findVisualStudio2015: function findVisualStudio2015 (cb) {
+ async findVisualStudio2015 () {
if (this.nodeSemver.major >= 19) {
this.addLog(
'not looking for VS2015 as it is only supported up to Node.js 18')
- return cb(null)
+ return null
}
return this.findOldVS({
version: '14.0',
@@ -369,15 +356,15 @@ VisualStudioFinder.prototype = {
versionMinor: 0,
versionYear: 2015,
toolset: 'v140'
- }, cb)
- },
+ })
+ }
// Find an installation of Visual Studio 2013 to use
- findVisualStudio2013: function findVisualStudio2013 (cb) {
+ async findVisualStudio2013 () {
if (this.nodeSemver.major >= 9) {
this.addLog(
'not looking for VS2013 as it is only supported up to Node.js 8')
- return cb(null)
+ return null
}
return this.findOldVS({
version: '12.0',
@@ -385,55 +372,52 @@ VisualStudioFinder.prototype = {
versionMinor: 0,
versionYear: 2013,
toolset: 'v120'
- }, cb)
- },
+ })
+ }
// Helper - common code for VS2013 and VS2015
- findOldVS: function findOldVS (info, cb) {
+ async findOldVS (info) {
const regVC7 = ['HKLM\\Software\\Microsoft\\VisualStudio\\SxS\\VC7',
'HKLM\\Software\\Wow6432Node\\Microsoft\\VisualStudio\\SxS\\VC7']
const regMSBuild = 'HKLM\\Software\\Microsoft\\MSBuild\\ToolsVersions'
this.addLog(`looking for Visual Studio ${info.versionYear}`)
- this.regSearchKeys(regVC7, info.version, [], (err, res) => {
- if (err) {
- this.addLog('- not found')
- return cb(null)
- }
-
+ try {
+ let res = await this.regSearchKeys(regVC7, info.version, [])
const vsPath = path.resolve(res, '..')
this.addLog(`- found in "${vsPath}"`)
-
const msBuildRegOpts = process.arch === 'ia32' ? [] : ['/reg:32']
- this.regSearchKeys([`${regMSBuild}\\${info.version}`],
- 'MSBuildToolsPath', msBuildRegOpts, (err, res) => {
- if (err) {
- this.addLog(
- '- could not find MSBuild in registry for this version')
- return cb(null)
- }
-
- const msBuild = path.join(res, 'MSBuild.exe')
- this.addLog(`- MSBuild in "${msBuild}"`)
-
- if (!this.checkConfigVersion(info.versionYear, vsPath)) {
- return cb(null)
- }
-
- info.path = vsPath
- info.msBuild = msBuild
- info.sdk = null
- cb(info)
- })
- })
- },
+
+ try {
+ res = await this.regSearchKeys([`${regMSBuild}\\${info.version}`], 'MSBuildToolsPath', msBuildRegOpts)
+ } catch (err) {
+ this.addLog('- could not find MSBuild in registry for this version')
+ return null
+ }
+
+ const msBuild = path.join(res, 'MSBuild.exe')
+ this.addLog(`- MSBuild in "${msBuild}"`)
+
+ if (!this.checkConfigVersion(info.versionYear, vsPath)) {
+ return null
+ }
+
+ info.path = vsPath
+ info.msBuild = msBuild
+ info.sdk = null
+ return info
+ } catch (err) {
+ this.addLog('- not found')
+ return null
+ }
+ }
// After finding a usable version of Visual Studio:
// - add it to validVersions to be displayed at the end if a specific
// version was requested and not found;
// - check if this is the version that was requested.
// - check if this matches the Visual Studio Command Prompt
- checkConfigVersion: function checkConfigVersion (versionYear, vsPath) {
+ checkConfigVersion (versionYear, vsPath) {
this.validVersions.push(versionYear)
this.validVersions.push(vsPath)
@@ -456,8 +440,4 @@ VisualStudioFinder.prototype = {
}
}
-module.exports = findVisualStudio
-module.exports.test = {
- VisualStudioFinder: VisualStudioFinder,
- findVisualStudio: findVisualStudio
-}
+module.exports = VisualStudioFinder
diff --git a/deps/npm/node_modules/node-gyp/lib/install.js b/deps/npm/node_modules/node-gyp/lib/install.js
index 1eb9f14c6742aa..7196a316296fb8 100644
--- a/deps/npm/node_modules/node-gyp/lib/install.js
+++ b/deps/npm/node_modules/node-gyp/lib/install.js
@@ -1,26 +1,21 @@
'use strict'
-const fs = require('graceful-fs')
+const { createWriteStream, promises: fs } = require('graceful-fs')
const os = require('os')
const { backOff } = require('exponential-backoff')
-const rm = require('rimraf')
const tar = require('tar')
const path = require('path')
-const util = require('util')
-const stream = require('stream')
+const { Transform, promises: { pipeline } } = require('stream')
const crypto = require('crypto')
-const log = require('npmlog')
+const log = require('./log')
const semver = require('semver')
-const fetch = require('make-fetch-happen')
+const { download } = require('./download')
const processRelease = require('./process-release')
-const win = process.platform === 'win32'
-const streamPipeline = util.promisify(stream.pipeline)
-/**
- * @param {typeof import('graceful-fs')} fs
- */
+const win = process.platform === 'win32'
-async function install (fs, gyp, argv) {
+async function install (gyp, argv) {
+ log.stdout()
const release = processRelease(argv, gyp, process.version, process.release)
// Detecting target_arch based on logic from create-cnfig-gyp.js. Used on Windows only.
const arch = win ? (gyp.opts.target_arch || gyp.opts.arch || process.arch || 'ia32') : ''
@@ -60,7 +55,7 @@ async function install (fs, gyp, argv) {
if (gyp.opts.ensure) {
log.verbose('install', '--ensure was passed, so won\'t reinstall if already installed')
try {
- await fs.promises.stat(devDir)
+ await fs.stat(devDir)
} catch (err) {
if (err.code === 'ENOENT') {
log.verbose('install', 'version not already installed, continuing with install', release.version)
@@ -78,7 +73,7 @@ async function install (fs, gyp, argv) {
const installVersionFile = path.resolve(devDir, 'installVersion')
let installVersion = 0
try {
- const ver = await fs.promises.readFile(installVersionFile, 'ascii')
+ const ver = await fs.readFile(installVersionFile, 'ascii')
installVersion = parseInt(ver, 10) || 0
} catch (err) {
if (err.code !== 'ENOENT') {
@@ -100,7 +95,7 @@ async function install (fs, gyp, argv) {
log.verbose('on Windows; need to check node.lib')
const nodeLibPath = path.resolve(devDir, arch, 'node.lib')
try {
- await fs.promises.stat(nodeLibPath)
+ await fs.stat(nodeLibPath)
} catch (err) {
if (err.code === 'ENOENT') {
log.verbose('install', `version not already installed for ${arch}, continuing with install`, release.version)
@@ -126,12 +121,12 @@ async function install (fs, gyp, argv) {
async function copyDirectory (src, dest) {
try {
- await fs.promises.stat(src)
+ await fs.stat(src)
} catch {
throw new Error(`Missing source directory for copy: ${src}`)
}
- await fs.promises.mkdir(dest, { recursive: true })
- const entries = await fs.promises.readdir(src, { withFileTypes: true })
+ await fs.mkdir(dest, { recursive: true })
+ const entries = await fs.readdir(src, { withFileTypes: true })
for (const entry of entries) {
if (entry.isDirectory()) {
await copyDirectory(path.join(src, entry.name), path.join(dest, entry.name))
@@ -140,12 +135,12 @@ async function install (fs, gyp, argv) {
// Windows so use an exponential backoff to resolve collisions
await backOff(async () => {
try {
- await fs.promises.copyFile(path.join(src, entry.name), path.join(dest, entry.name))
+ await fs.copyFile(path.join(src, entry.name), path.join(dest, entry.name))
} catch (err) {
// if ensure, check if file already exists and that's good enough
if (gyp.opts.ensure && err.code === 'EBUSY') {
try {
- await fs.promises.stat(path.join(dest, entry.name))
+ await fs.stat(path.join(dest, entry.name))
return
} catch {}
}
@@ -163,7 +158,7 @@ async function install (fs, gyp, argv) {
// first create the dir for the node dev files
try {
- const created = await fs.promises.mkdir(devDir, { recursive: true })
+ const created = await fs.mkdir(devDir, { recursive: true })
if (created) {
log.verbose('created devDir', created)
@@ -208,7 +203,7 @@ async function install (fs, gyp, argv) {
// on Windows there can be file errors from tar if parallel installs
// are happening (not uncommon with multiple native modules) so
// extract the tarball to a temp directory first and then copy over
- const tarExtractDir = win ? await fs.promises.mkdtemp(path.join(os.tmpdir(), 'node-gyp-tmp-')) : devDir
+ const tarExtractDir = win ? await fs.mkdtemp(path.join(os.tmpdir(), 'node-gyp-tmp-')) : devDir
try {
if (shouldDownloadTarball) {
@@ -228,7 +223,7 @@ async function install (fs, gyp, argv) {
throw new Error(`${res.status} response downloading ${release.tarballUrl}`)
}
- await streamPipeline(
+ await pipeline(
res.body,
// content checksum
new ShaSum((_, checksum) => {
@@ -267,7 +262,7 @@ async function install (fs, gyp, argv) {
// need to download node.lib
...(win ? [downloadNodeLib()] : []),
// write the "installVersion" file
- fs.promises.writeFile(installVersionPath, gyp.package.installVersion + '\n'),
+ fs.writeFile(installVersionPath, gyp.package.installVersion + '\n'),
// Only download SHASUMS.txt if we downloaded something in need of SHA verification
...(!tarPath || win ? [downloadShasums()] : [])
])
@@ -289,7 +284,7 @@ async function install (fs, gyp, argv) {
if (tarExtractDir !== devDir) {
try {
// try to cleanup temp dir
- await util.promisify(rm)(tarExtractDir)
+ await fs.rm(tarExtractDir, { recursive: true })
} catch {
log.warn('failed to clean up temp tarball extract directory')
}
@@ -329,7 +324,7 @@ async function install (fs, gyp, argv) {
log.verbose(name, 'dir', dir)
log.verbose(name, 'url', libUrl)
- await fs.promises.mkdir(dir, { recursive: true })
+ await fs.mkdir(dir, { recursive: true })
log.verbose('streaming', name, 'to:', targetLibPath)
const res = await download(gyp, libUrl)
@@ -339,13 +334,13 @@ async function install (fs, gyp, argv) {
throw new Error(`${res.status} status code downloading ${name}`)
}
- return streamPipeline(
+ return pipeline(
res.body,
new ShaSum((_, checksum) => {
contentShasums[libPath] = checksum
log.verbose('content checksum', libPath, checksum)
}),
- fs.createWriteStream(targetLibPath)
+ createWriteStream(targetLibPath)
)
} // downloadNodeLib()
} // go()
@@ -363,7 +358,7 @@ async function install (fs, gyp, argv) {
async function rollback (err) {
log.warn('install', 'got an error, rolling back install')
// roll-back the install if anything went wrong
- await util.promisify(gyp.commands.remove)([release.versionDir])
+ await gyp.commands.remove([release.versionDir])
throw err
}
@@ -394,11 +389,11 @@ async function install (fs, gyp, argv) {
log.verbose('tmpdir == cwd', 'automatically will remove dev files after to save disk space')
gyp.todo.push({ name: 'remove', args: argv })
}
- return util.promisify(gyp.commands.install)([noretry].concat(argv))
+ return gyp.commands.install([noretry].concat(argv))
}
}
-class ShaSum extends stream.Transform {
+class ShaSum extends Transform {
constructor (callback) {
super()
this._callback = callback
@@ -416,43 +411,5 @@ class ShaSum extends stream.Transform {
}
}
-async function download (gyp, url) {
- log.http('GET', url)
-
- const requestOpts = {
- headers: {
- 'User-Agent': `node-gyp v${gyp.version} (node ${process.version})`,
- Connection: 'keep-alive'
- },
- proxy: gyp.opts.proxy,
- noProxy: gyp.opts.noproxy
- }
-
- const cafile = gyp.opts.cafile
- if (cafile) {
- requestOpts.ca = await readCAFile(cafile)
- }
-
- const res = await fetch(url, requestOpts)
- log.http(res.status, res.url)
-
- return res
-}
-
-async function readCAFile (filename) {
- // The CA file can contain multiple certificates so split on certificate
- // boundaries. [\S\s]*? is used to match everything including newlines.
- const ca = await fs.promises.readFile(filename, 'utf8')
- const re = /(-----BEGIN CERTIFICATE-----[\S\s]*?-----END CERTIFICATE-----)/g
- return ca.match(re)
-}
-
-module.exports = function (gyp, argv, callback) {
- install(fs, gyp, argv).then(callback.bind(undefined, null), callback)
-}
-module.exports.test = {
- download,
- install,
- readCAFile
-}
+module.exports = install
module.exports.usage = 'Install node development files for the specified node version.'
diff --git a/deps/npm/node_modules/node-gyp/lib/list.js b/deps/npm/node_modules/node-gyp/lib/list.js
index 405ebc0d889590..36889ad4f71e27 100644
--- a/deps/npm/node_modules/node-gyp/lib/list.js
+++ b/deps/npm/node_modules/node-gyp/lib/list.js
@@ -1,26 +1,25 @@
'use strict'
-const fs = require('graceful-fs')
-const log = require('npmlog')
+const fs = require('graceful-fs').promises
+const log = require('./log')
-function list (gyp, args, callback) {
- var devDir = gyp.devDir
+async function list (gyp, args) {
+ const devDir = gyp.devDir
log.verbose('list', 'using node-gyp dir:', devDir)
- fs.readdir(devDir, onreaddir)
-
- function onreaddir (err, versions) {
- if (err && err.code !== 'ENOENT') {
- return callback(err)
+ let versions = []
+ try {
+ const dir = await fs.readdir(devDir)
+ if (Array.isArray(dir)) {
+ versions = dir.filter((v) => v !== 'current')
}
-
- if (Array.isArray(versions)) {
- versions = versions.filter(function (v) { return v !== 'current' })
- } else {
- versions = []
+ } catch (err) {
+ if (err && err.code !== 'ENOENT') {
+ throw err
}
- callback(null, versions)
}
+
+ return versions
}
module.exports = list
diff --git a/deps/npm/node_modules/node-gyp/lib/log.js b/deps/npm/node_modules/node-gyp/lib/log.js
new file mode 100644
index 00000000000000..6841719abab5a9
--- /dev/null
+++ b/deps/npm/node_modules/node-gyp/lib/log.js
@@ -0,0 +1,169 @@
+'use strict'
+
+const procLog = require('proc-log')
+const { format } = require('util')
+
+// helper to emit log messages with a predefined prefix
+const logLevels = Object.keys(procLog).filter((k) => typeof procLog[k] === 'function')
+const withPrefix = (prefix) => logLevels.reduce((acc, level) => {
+ acc[level] = (...args) => procLog[level](prefix, ...args)
+ return acc
+}, {})
+
+// very basic ansi color generator
+const COLORS = {
+ wrap: (str, colors) => {
+ const codes = colors.filter(c => typeof c === 'number')
+ return `\x1b[${codes.join(';')}m${str}\x1b[0m`
+ },
+ inverse: 7,
+ fg: {
+ black: 30,
+ red: 31,
+ green: 32,
+ yellow: 33,
+ blue: 34,
+ magenta: 35,
+ cyan: 36,
+ white: 37
+ },
+ bg: {
+ black: 40,
+ red: 41,
+ green: 42,
+ yellow: 43,
+ blue: 44,
+ magenta: 45,
+ cyan: 46,
+ white: 47
+ }
+}
+
+class Logger {
+ #buffer = []
+ #paused = null
+ #level = null
+ #stream = null
+
+ // ordered from loudest to quietest
+ #levels = [{
+ id: 'silly',
+ display: 'sill',
+ style: { inverse: true }
+ }, {
+ id: 'verbose',
+ display: 'verb',
+ style: { fg: 'cyan', bg: 'black' }
+ }, {
+ id: 'info',
+ style: { fg: 'green' }
+ }, {
+ id: 'http',
+ style: { fg: 'green', bg: 'black' }
+ }, {
+ id: 'notice',
+ style: { fg: 'cyan', bg: 'black' }
+ }, {
+ id: 'warn',
+ display: 'WARN',
+ style: { fg: 'black', bg: 'yellow' }
+ }, {
+ id: 'error',
+ display: 'ERR!',
+ style: { fg: 'red', bg: 'black' }
+ }]
+
+ constructor (stream) {
+ process.on('log', (...args) => this.#onLog(...args))
+ this.#levels = new Map(this.#levels.map((level, index) => [level.id, { ...level, index }]))
+ this.level = 'info'
+ this.stream = stream
+ procLog.pause()
+ }
+
+ get stream () {
+ return this.#stream
+ }
+
+ set stream (stream) {
+ this.#stream = stream
+ }
+
+ get level () {
+ return this.#levels.get(this.#level) ?? null
+ }
+
+ set level (level) {
+ this.#level = this.#levels.get(level)?.id ?? null
+ }
+
+ isVisible (level) {
+ return this.level?.index <= this.#levels.get(level)?.index ?? -1
+ }
+
+ #onLog (...args) {
+ const [level] = args
+
+ if (level === 'pause') {
+ this.#paused = true
+ return
+ }
+
+ if (level === 'resume') {
+ this.#paused = false
+ this.#buffer.forEach((b) => this.#log(...b))
+ this.#buffer.length = 0
+ return
+ }
+
+ if (this.#paused) {
+ this.#buffer.push(args)
+ return
+ }
+
+ this.#log(...args)
+ }
+
+ #color (str, { fg, bg, inverse }) {
+ if (!this.#stream?.isTTY) {
+ return str
+ }
+
+ return COLORS.wrap(str, [
+ COLORS.fg[fg],
+ COLORS.bg[bg],
+ inverse && COLORS.inverse
+ ])
+ }
+
+ #log (levelId, msgPrefix, ...args) {
+ if (!this.isVisible(levelId) || typeof this.#stream?.write !== 'function') {
+ return
+ }
+
+ const level = this.#levels.get(levelId)
+
+ const prefixParts = [
+ this.#color('gyp', { fg: 'white', bg: 'black' }),
+ this.#color(level.display ?? level.id, level.style)
+ ]
+ if (msgPrefix) {
+ prefixParts.push(this.#color(msgPrefix, { fg: 'magenta' }))
+ }
+
+ const prefix = prefixParts.join(' ').trim() + ' '
+ const lines = format(...args).split(/\r?\n/).map(l => prefix + l.trim())
+
+ this.#stream.write(lines.join('\n') + '\n')
+ }
+}
+
+// used to suppress logs in tests
+const NULL_LOGGER = !!process.env.NODE_GYP_NULL_LOGGER
+
+module.exports = {
+ logger: new Logger(NULL_LOGGER ? null : process.stderr),
+ stdout: NULL_LOGGER ? () => {} : (...args) => console.log(...args),
+ withPrefix,
+ ...procLog
+}
diff --git a/deps/npm/node_modules/node-gyp/lib/node-gyp.js b/deps/npm/node_modules/node-gyp/lib/node-gyp.js
index e492ec1026d9d3..5e25bf996f8b22 100644
--- a/deps/npm/node_modules/node-gyp/lib/node-gyp.js
+++ b/deps/npm/node_modules/node-gyp/lib/node-gyp.js
@@ -2,10 +2,10 @@
const path = require('path')
const nopt = require('nopt')
-const log = require('npmlog')
+const log = require('./log')
const childProcess = require('child_process')
-const EE = require('events').EventEmitter
-const inherits = require('util').inherits
+const { EventEmitter } = require('events')
+
const commands = [
// Module build commands
'build',
@@ -17,199 +17,172 @@ const commands = [
'list',
'remove'
]
-const aliases = {
- ls: 'list',
- rm: 'remove'
-}
-
-// differentiate node-gyp's logs from npm's
-log.heading = 'gyp'
-
-function gyp () {
- return new Gyp()
-}
-function Gyp () {
- var self = this
+class Gyp extends EventEmitter {
+ /**
+ * Export the contents of the package.json.
+ */
+ package = require('../package.json')
+
+ /**
+ * nopt configuration definitions
+ */
+ configDefs = {
+ help: Boolean, // everywhere
+ arch: String, // 'configure'
+ cafile: String, // 'install'
+ debug: Boolean, // 'build'
+ directory: String, // bin
+ make: String, // 'build'
+ 'msvs-version': String, // 'configure'
+ ensure: Boolean, // 'install'
+ solution: String, // 'build' (windows only)
+ proxy: String, // 'install'
+ noproxy: String, // 'install'
+ devdir: String, // everywhere
+ nodedir: String, // 'configure'
+ loglevel: String, // everywhere
+ python: String, // 'configure'
+ 'dist-url': String, // 'install'
+ tarball: String, // 'install'
+ jobs: String, // 'build'
+ thin: String, // 'configure'
+ 'force-process-config': Boolean // 'configure'
+ }
- this.devDir = ''
- this.commands = {}
+ /**
+ * nopt shorthands
+ */
+ shorthands = {
+ release: '--no-debug',
+ C: '--directory',
+ debug: '--debug',
+ j: '--jobs',
+ silly: '--loglevel=silly',
+ verbose: '--loglevel=verbose',
+ silent: '--loglevel=silent'
+ }
- commands.forEach(function (command) {
- self.commands[command] = function (argv, callback) {
- log.verbose('command', command, argv)
- return require('./' + command)(self, argv, callback)
- }
- })
-}
-inherits(Gyp, EE)
-exports.Gyp = Gyp
-var proto = Gyp.prototype
-
-/**
- * Export the contents of the package.json.
- */
-
-proto.package = require('../package.json')
-
-/**
- * nopt configuration definitions
- */
-
-proto.configDefs = {
- help: Boolean, // everywhere
- arch: String, // 'configure'
- cafile: String, // 'install'
- debug: Boolean, // 'build'
- directory: String, // bin
- make: String, // 'build'
- msvs_version: String, // 'configure'
- ensure: Boolean, // 'install'
- solution: String, // 'build' (windows only)
- proxy: String, // 'install'
- noproxy: String, // 'install'
- devdir: String, // everywhere
- nodedir: String, // 'configure'
- loglevel: String, // everywhere
- python: String, // 'configure'
- 'dist-url': String, // 'install'
- tarball: String, // 'install'
- jobs: String, // 'build'
- thin: String, // 'configure'
- 'force-process-config': Boolean // 'configure'
-}
+ /**
+ * expose the command aliases for the bin file to use.
+ */
+ aliases = {
+ ls: 'list',
+ rm: 'remove'
+ }
-/**
- * nopt shorthands
- */
-
-proto.shorthands = {
- release: '--no-debug',
- C: '--directory',
- debug: '--debug',
- j: '--jobs',
- silly: '--loglevel=silly',
- verbose: '--loglevel=verbose',
- silent: '--loglevel=silent'
-}
+ constructor (...args) {
+ super(...args)
-/**
- * expose the command aliases for the bin file to use.
- */
+ this.devDir = ''
-proto.aliases = aliases
+ this.commands = commands.reduce((acc, command) => {
+ acc[command] = (argv) => require('./' + command)(this, argv)
+ return acc
+ }, {})
-/**
- * Parses the given argv array and sets the 'opts',
- * 'argv' and 'command' properties.
- */
+ Object.defineProperty(this, 'version', {
+ enumerable: true,
+ get: function () { return this.package.version }
+ })
+ }
-proto.parseArgv = function parseOpts (argv) {
- this.opts = nopt(this.configDefs, this.shorthands, argv)
- this.argv = this.opts.argv.remain.slice()
+ /**
+ * Parses the given argv array and sets the 'opts',
+ * 'argv' and 'command' properties.
+ */
+ parseArgv (argv) {
+ this.opts = nopt(this.configDefs, this.shorthands, argv)
+ this.argv = this.opts.argv.remain.slice()
- var commands = this.todo = []
+ const commands = this.todo = []
- // create a copy of the argv array with aliases mapped
- argv = this.argv.map(function (arg) {
+ // create a copy of the argv array with aliases mapped
+ argv = this.argv.map((arg) => {
// is this an alias?
- if (arg in this.aliases) {
- arg = this.aliases[arg]
- }
- return arg
- }, this)
-
- // process the mapped args into "command" objects ("name" and "args" props)
- argv.slice().forEach(function (arg) {
- if (arg in this.commands) {
- var args = argv.splice(0, argv.indexOf(arg))
- argv.shift()
- if (commands.length > 0) {
- commands[commands.length - 1].args = args
+ if (arg in this.aliases) {
+ arg = this.aliases[arg]
+ }
+ return arg
+ })
+
+ // process the mapped args into "command" objects ("name" and "args" props)
+ argv.slice().forEach((arg) => {
+ if (arg in this.commands) {
+ const args = argv.splice(0, argv.indexOf(arg))
+ argv.shift()
+ if (commands.length > 0) {
+ commands[commands.length - 1].args = args
+ }
+ commands.push({ name: arg, args: [] })
}
- commands.push({ name: arg, args: [] })
+ })
+ if (commands.length > 0) {
+ commands[commands.length - 1].args = argv.splice(0)
}
- }, this)
- if (commands.length > 0) {
- commands[commands.length - 1].args = argv.splice(0)
- }
- // support for inheriting config env variables from npm
- var npmConfigPrefix = 'npm_config_'
- Object.keys(process.env).forEach(function (name) {
- if (name.indexOf(npmConfigPrefix) !== 0) {
- return
- }
- var val = process.env[name]
- if (name === npmConfigPrefix + 'loglevel') {
- log.level = val
- } else {
+ // support for inheriting config env variables from npm
+ const npmConfigPrefix = 'npm_config_'
+ Object.keys(process.env).forEach((name) => {
+ if (name.indexOf(npmConfigPrefix) !== 0) {
+ return
+ }
+ const val = process.env[name]
+ if (name === npmConfigPrefix + 'loglevel') {
+ log.logger.level = val
+ } else {
// add the user-defined options to the config
- name = name.substring(npmConfigPrefix.length)
- // gyp@741b7f1 enters an infinite loop when it encounters
- // zero-length options so ensure those don't get through.
- if (name) {
+ name = name.substring(npmConfigPrefix.length)
+ // gyp@741b7f1 enters an infinite loop when it encounters
+ // zero-length options so ensure those don't get through.
+ if (name) {
// convert names like force_process_config to force-process-config
- if (name.includes('_')) {
- name = name.replace(/_/g, '-')
+ if (name.includes('_')) {
+ name = name.replace(/_/g, '-')
+ }
+ this.opts[name] = val
}
- this.opts[name] = val
}
- }
- }, this)
+ })
- if (this.opts.loglevel) {
- log.level = this.opts.loglevel
+ if (this.opts.loglevel) {
+ log.logger.level = this.opts.loglevel
+ }
+ log.resume()
}
- log.resume()
-}
-
-/**
- * Spawns a child process and emits a 'spawn' event.
- */
-proto.spawn = function spawn (command, args, opts) {
- if (!opts) {
- opts = {}
- }
- if (!opts.silent && !opts.stdio) {
- opts.stdio = [0, 1, 2]
+ /**
+ * Spawns a child process and emits a 'spawn' event.
+ */
+ spawn (command, args, opts) {
+ if (!opts) {
+ opts = {}
+ }
+ if (!opts.silent && !opts.stdio) {
+ opts.stdio = [0, 1, 2]
+ }
+ const cp = childProcess.spawn(command, args, opts)
+ log.info('spawn', command)
+ log.info('spawn args', args)
+ return cp
}
- var cp = childProcess.spawn(command, args, opts)
- log.info('spawn', command)
- log.info('spawn args', args)
- return cp
-}
-/**
- * Returns the usage instructions for node-gyp.
- */
-
-proto.usage = function usage () {
- var str = [
- '',
- ' Usage: node-gyp [options]',
- '',
- ' where is one of:',
- commands.map(function (c) {
- return ' - ' + c + ' - ' + require('./' + c).usage
- }).join('\n'),
- '',
- 'node-gyp@' + this.version + ' ' + path.resolve(__dirname, '..'),
- 'node@' + process.versions.node
- ].join('\n')
- return str
+ /**
+ * Returns the usage instructions for node-gyp.
+ */
+ usage () {
+ return [
+ '',
+ ' Usage: node-gyp [options]',
+ '',
+ ' where is one of:',
+ commands.map((c) => ' - ' + c + ' - ' + require('./' + c).usage).join('\n'),
+ '',
+ 'node-gyp@' + this.version + ' ' + path.resolve(__dirname, '..'),
+ 'node@' + process.versions.node
+ ].join('\n')
+ }
}
-/**
- * Version number getter.
- */
-
-Object.defineProperty(proto, 'version', {
- get: function () {
- return this.package.version
- },
- enumerable: true
-})
-
-module.exports = exports = gyp
+module.exports = () => new Gyp()
+module.exports.Gyp = Gyp
diff --git a/deps/npm/node_modules/node-gyp/lib/process-release.js b/deps/npm/node_modules/node-gyp/lib/process-release.js
index 95b55e4426dee7..c9a319dfadd2bc 100644
--- a/deps/npm/node_modules/node-gyp/lib/process-release.js
+++ b/deps/npm/node_modules/node-gyp/lib/process-release.js
@@ -1,11 +1,11 @@
-/* eslint-disable node/no-deprecated-api */
+/* eslint-disable n/no-deprecated-api */
'use strict'
const semver = require('semver')
const url = require('url')
const path = require('path')
-const log = require('npmlog')
+const log = require('./log')
// versions where -headers.tar.gz started shipping
const headersTarballRange = '>= 3.0.0 || ~0.12.10 || ~0.10.42'
@@ -17,29 +17,28 @@ const bitsreV3 = /\/win-(x86|ia32|x64)\// // io.js v3.x.x shipped with "ia32" bu
// file names. Inputs come from command-line switches (--target, --dist-url),
// `process.version` and `process.release` where it exists.
function processRelease (argv, gyp, defaultVersion, defaultRelease) {
- var version = (semver.valid(argv[0]) && argv[0]) || gyp.opts.target || defaultVersion
- var versionSemver = semver.parse(version)
- var overrideDistUrl = gyp.opts['dist-url'] || gyp.opts.disturl
- var isDefaultVersion
- var isNamedForLegacyIojs
- var name
- var distBaseUrl
- var baseUrl
- var libUrl32
- var libUrl64
- var libUrlArm64
- var tarballUrl
- var canGetHeaders
+ let version = (semver.valid(argv[0]) && argv[0]) || gyp.opts.target || defaultVersion
+ const versionSemver = semver.parse(version)
+ let overrideDistUrl = gyp.opts['dist-url'] || gyp.opts.disturl
+ let isNamedForLegacyIojs
+ let name
+ let distBaseUrl
+ let baseUrl
+ let libUrl32
+ let libUrl64
+ let libUrlArm64
+ let tarballUrl
+ let canGetHeaders
if (!versionSemver) {
// not a valid semver string, nothing we can do
- return { version: version }
+ return { version }
}
// flatten version into String
version = versionSemver.version
// defaultVersion should come from process.version so ought to be valid semver
- isDefaultVersion = version === semver.parse(defaultVersion).version
+ const isDefaultVersion = version === semver.parse(defaultVersion).version
// can't use process.release if we're using --target=x.y.z
if (!isDefaultVersion) {
@@ -101,11 +100,11 @@ function processRelease (argv, gyp, defaultVersion, defaultRelease) {
}
return {
- version: version,
+ version,
semver: versionSemver,
- name: name,
- baseUrl: baseUrl,
- tarballUrl: tarballUrl,
+ name,
+ baseUrl,
+ tarballUrl,
shasumsUrl: url.resolve(baseUrl, 'SHASUMS256.txt'),
versionDir: (name !== 'node' ? name + '-' : '') + version,
ia32: {
@@ -128,8 +127,8 @@ function normalizePath (p) {
}
function resolveLibUrl (name, defaultUrl, arch, versionMajor) {
- var base = url.resolve(defaultUrl, './')
- var hasLibUrl = bitsre.test(defaultUrl) || (versionMajor === 3 && bitsreV3.test(defaultUrl))
+ const base = url.resolve(defaultUrl, './')
+ const hasLibUrl = bitsre.test(defaultUrl) || (versionMajor === 3 && bitsreV3.test(defaultUrl))
if (!hasLibUrl) {
// let's assume it's a baseUrl then
diff --git a/deps/npm/node_modules/node-gyp/lib/rebuild.js b/deps/npm/node_modules/node-gyp/lib/rebuild.js
index a1c5b27cbe56a5..609817665e2dba 100644
--- a/deps/npm/node_modules/node-gyp/lib/rebuild.js
+++ b/deps/npm/node_modules/node-gyp/lib/rebuild.js
@@ -1,12 +1,11 @@
'use strict'
-function rebuild (gyp, argv, callback) {
+async function rebuild (gyp, argv) {
gyp.todo.push(
{ name: 'clean', args: [] }
, { name: 'configure', args: argv }
, { name: 'build', args: [] }
)
- process.nextTick(callback)
}
module.exports = rebuild
diff --git a/deps/npm/node_modules/node-gyp/lib/remove.js b/deps/npm/node_modules/node-gyp/lib/remove.js
index 8c945e5659001c..7efdb01a662e76 100644
--- a/deps/npm/node_modules/node-gyp/lib/remove.js
+++ b/deps/npm/node_modules/node-gyp/lib/remove.js
@@ -1,46 +1,43 @@
'use strict'
-const fs = require('fs')
-const rm = require('rimraf')
+const fs = require('graceful-fs').promises
const path = require('path')
-const log = require('npmlog')
+const log = require('./log')
const semver = require('semver')
-function remove (gyp, argv, callback) {
- var devDir = gyp.devDir
+async function remove (gyp, argv) {
+ const devDir = gyp.devDir
log.verbose('remove', 'using node-gyp dir:', devDir)
// get the user-specified version to remove
- var version = argv[0] || gyp.opts.target
+ let version = argv[0] || gyp.opts.target
log.verbose('remove', 'removing target version:', version)
if (!version) {
- return callback(new Error('You must specify a version number to remove. Ex: "' + process.version + '"'))
+ throw new Error('You must specify a version number to remove. Ex: "' + process.version + '"')
}
- var versionSemver = semver.parse(version)
+ const versionSemver = semver.parse(version)
if (versionSemver) {
// flatten the version Array into a String
version = versionSemver.version
}
- var versionPath = path.resolve(gyp.devDir, version)
+ const versionPath = path.resolve(gyp.devDir, version)
log.verbose('remove', 'removing development files for version:', version)
// first check if its even installed
- fs.stat(versionPath, function (err) {
- if (err) {
- if (err.code === 'ENOENT') {
- callback(null, 'version was already uninstalled: ' + version)
- } else {
- callback(err)
- }
- return
+ try {
+ await fs.stat(versionPath)
+ } catch (err) {
+ if (err.code === 'ENOENT') {
+ return 'version was already uninstalled: ' + version
}
- // Go ahead and delete the dir
- rm(versionPath, callback)
- })
+ throw err
+ }
+
+ await fs.rm(versionPath, { recursive: true, force: true })
}
-module.exports = exports = remove
+module.exports = remove
module.exports.usage = 'Removes the node development files for the specified version'
diff --git a/deps/npm/node_modules/node-gyp/lib/util.js b/deps/npm/node_modules/node-gyp/lib/util.js
index 3e23c628e6ad71..3f6aeeb7dcb436 100644
--- a/deps/npm/node_modules/node-gyp/lib/util.js
+++ b/deps/npm/node_modules/node-gyp/lib/util.js
@@ -1,64 +1,81 @@
'use strict'
-const log = require('npmlog')
-const execFile = require('child_process').execFile
+const cp = require('child_process')
const path = require('path')
+const { openSync, closeSync } = require('graceful-fs')
+const log = require('./log')
-function logWithPrefix (log, prefix) {
- function setPrefix (logFunction) {
- return (...args) => logFunction.apply(null, [ prefix, ...args ]) // eslint-disable-line
- }
- return {
- silly: setPrefix(log.silly),
- verbose: setPrefix(log.verbose),
- info: setPrefix(log.info),
- warn: setPrefix(log.warn),
- error: setPrefix(log.error)
- }
-}
+const execFile = async (...args) => new Promise((resolve) => {
+ const child = cp.execFile(...args, (...a) => resolve(a))
+ child.stdin.end()
+})
-function regGetValue (key, value, addOpts, cb) {
+async function regGetValue (key, value, addOpts) {
const outReValue = value.replace(/\W/g, '.')
const outRe = new RegExp(`^\\s+${outReValue}\\s+REG_\\w+\\s+(\\S.*)$`, 'im')
const reg = path.join(process.env.SystemRoot, 'System32', 'reg.exe')
const regArgs = ['query', key, '/v', value].concat(addOpts)
log.silly('reg', 'running', reg, regArgs)
- const child = execFile(reg, regArgs, { encoding: 'utf8' },
- function (err, stdout, stderr) {
- log.silly('reg', 'reg.exe stdout = %j', stdout)
- if (err || stderr.trim() !== '') {
- log.silly('reg', 'reg.exe err = %j', err && (err.stack || err))
- log.silly('reg', 'reg.exe stderr = %j', stderr)
- return cb(err, stderr)
- }
+ const [err, stdout, stderr] = await execFile(reg, regArgs, { encoding: 'utf8' })
- const result = outRe.exec(stdout)
- if (!result) {
- log.silly('reg', 'error parsing stdout')
- return cb(new Error('Could not parse output of reg.exe'))
- }
- log.silly('reg', 'found: %j', result[1])
- cb(null, result[1])
- })
- child.stdin.end()
+ log.silly('reg', 'reg.exe stdout = %j', stdout)
+ if (err || stderr.trim() !== '') {
+ log.silly('reg', 'reg.exe err = %j', err && (err.stack || err))
+ log.silly('reg', 'reg.exe stderr = %j', stderr)
+ if (err) {
+ throw err
+ }
+ throw new Error(stderr)
+ }
+
+ const result = outRe.exec(stdout)
+ if (!result) {
+ log.silly('reg', 'error parsing stdout')
+ throw new Error('Could not parse output of reg.exe')
+ }
+
+ log.silly('reg', 'found: %j', result[1])
+ return result[1]
+}
+
+async function regSearchKeys (keys, value, addOpts) {
+ for (const key of keys) {
+ try {
+ return await regGetValue(key, value, addOpts)
+ } catch {
+ continue
+ }
+ }
}
-function regSearchKeys (keys, value, addOpts, cb) {
- var i = 0
- const search = () => {
- log.silly('reg-search', 'looking for %j in %j', value, keys[i])
- regGetValue(keys[i], value, addOpts, (err, res) => {
- ++i
- if (err && i < keys.length) { return search() }
- cb(err, res)
- })
+/**
+ * Returns the first file or directory from an array of candidates that is
+ * readable by the current user, or undefined if none of the candidates are
+ * readable.
+ */
+function findAccessibleSync (logprefix, dir, candidates) {
+ for (let next = 0; next < candidates.length; next++) {
+ const candidate = path.resolve(dir, candidates[next])
+ let fd
+ try {
+ fd = openSync(candidate, 'r')
+ } catch (e) {
+ // this candidate was not found or not readable, do nothing
+ log.silly(logprefix, 'Could not open %s: %s', candidate, e.message)
+ continue
+ }
+ closeSync(fd)
+ log.silly(logprefix, 'Found readable %s', candidate)
+ return candidate
}
- search()
+
+ return undefined
}
module.exports = {
- logWithPrefix: logWithPrefix,
- regGetValue: regGetValue,
- regSearchKeys: regSearchKeys
+ execFile,
+ regGetValue,
+ regSearchKeys,
+ findAccessibleSync
}
diff --git a/deps/npm/node_modules/node-gyp/macOS_Catalina.md b/deps/npm/node_modules/node-gyp/macOS_Catalina.md
deleted file mode 100644
index dde5fe3f7d4fbf..00000000000000
--- a/deps/npm/node_modules/node-gyp/macOS_Catalina.md
+++ /dev/null
@@ -1,104 +0,0 @@
-# Installation notes for macOS Catalina (v10.15)
-
-_This document specifically refers to upgrades from previous versions of macOS to Catalina (10.15). It should be removed from the source repository when Catalina ceases to be the latest macOS version or when future Catalina versions no longer raise these issues._
-
-**Both upgrading to macOS Catalina and running a Software Update in Catalina may cause normal `node-gyp` installations to fail. This might manifest as the following error during `npm install`:**
-
-```console
-gyp: No Xcode or CLT version detected!
-```
-
-## node-gyp v7
-
-The newest release of `node-gyp` should solve this problem. If you are using `node-gyp` directly then you should be able to install v7 and use it as-is.
-
-If you need to use `node-gyp` from within `npm` (e.g. through `npm install`), you will have to install `node-gyp` (either globally with `-g` or to a predictable location) and tell `npm` where the new version is. Either use:
-
-* `npm config set node_gyp `; or
-* run `npm` with an environment variable prefix: `npm_config_node_gyp= npm install`
-
-Where "path to node-gyp" is to the `node-gyp` executable which may be a symlink in your global bin directory (e.g. `/usr/local/bin/node-gyp`), or a path to the `node-gyp` installation directory and the `bin/node-gyp.js` file within it (e.g. `/usr/local/lib/node_modules/node-gyp/bin/node-gyp.js`).
-
-**If you use `npm config set` to change your global `node_gyp` you are responsible for keeping it up to date and can't rely on `npm` to give you a newer version when available.** Use `npm config delete node_gyp` to unset this configuration option.
-
-## Fixing Catalina for older versions of `node-gyp`
-
-### Is my Mac running macOS Catalina?
-Let's first make sure that your Mac is running Catalina:
-```
-% sw_vers
- ProductName: Mac OS X
- ProductVersion: 10.15
- BuildVersion: 19A602
-```
-If `ProductVersion` is less then `10.15` then this document is not for you. Normal install docs for `node-gyp` on macOS can be found at https://github.com/nodejs/node-gyp#on-macos
-
-
-### The acid test
-To see if `Xcode Command Line Tools` is installed in a way that will work with `node-gyp`, run:
-```
-curl -sL https://github.com/nodejs/node-gyp/raw/main/macOS_Catalina_acid_test.sh | bash
-```
-
-If test succeeded, _you are done_! You should be ready to [install](https://github.com/nodejs/node-gyp#installation) `node-gyp`.
-
-If test failed, there is a problem with your Xcode Command Line Tools installation. [Continue to Solutions](#Solutions).
-
-### Solutions
-There are three ways to install the Xcode libraries `node-gyp` needs on macOS. People running Catalina have had success with some but not others in a way that has been unpredictable.
-
-1. With the full Xcode (~7.6 GB download) from the `App Store` app.
-2. With the _much_ smaller Xcode Command Line Tools via `xcode-select --install`
-3. With the _much_ smaller Xcode Command Line Tools via manual download. **For people running the latest version of Catalina (10.15.2 at the time of this writing), this has worked when the other two solutions haven't.**
-
-### Installing `node-gyp` using the full Xcode
-1. `xcodebuild -version` should show `Xcode 11.1` or later.
- * If not, then install/upgrade Xcode from the App Store app.
-2. Open the Xcode app and...
- * Under __Preferences > Locations__ select the tools if their location is empty.
- * Allow Xcode app to do an essential install of the most recent compiler tools.
-3. Once all installations are _complete_, quit out of Xcode.
-4. `sudo xcodebuild -license accept` # If you agree with the licensing terms.
-5. `softwareupdate -l` # No listing is a good sign.
- * If Xcode or Tools upgrades are listed, use "Software Upgrade" to install them.
-6. `xcode-select -version` # Should return `xcode-select version 2370` or later.
-7. `xcode-select -print-path` # Should return `/Applications/Xcode.app/Contents/Developer`
-8. Try the [_acid test_ steps above](#The-acid-test) to see if your Mac is ready.
-9. If the _acid test_ does _not_ pass then...
-10. `sudo xcode-select --reset` # Enter root password. No output is normal.
-11. Repeat step 7 above. Is the path different this time? Repeat the _acid test_.
-
-### Installing `node-gyp` using the Xcode Command Line Tools via `xcode-select --install`
-1. If the _acid test_ has not succeeded, then try `xcode-select --install`
-2. If the installation command returns `xcode-select: error: command line tools are already installed, use "Software Update" to install updates`, continue to [remove and reinstall](#i-did-all-that-and-the-acid-test-still-does-not-pass--)
-3. Wait until the install process is _complete_.
-4. `softwareupdate -l` # No listing is a good sign.
- * If Xcode or Tools upgrades are listed, use "Software Update" to install them.
-5. `xcode-select -version` # Should return `xcode-select version 2370` or later.
-6. `xcode-select -print-path` # Should return `/Library/Developer/CommandLineTools`
-7. Try the [_acid test_ steps above](#The-acid-test) to see if your Mac is ready.
-8. If the _acid test_ does _not_ pass then...
-9. `sudo xcode-select --reset` # Enter root password. No output is normal.
-10. Repeat step 5 above. Is the path different this time? Repeat the _acid test_.
-
-### Installing `node-gyp` using the Xcode Command Line Tools via manual download
-1. Download the appropriate version of the "Command Line Tools for Xcode" for your version of Catalina from . As of MacOS 10.15.5, that's [Command_Line_Tools_for_Xcode_11.5.dmg](https://download.developer.apple.com/Developer_Tools/Command_Line_Tools_for_Xcode_11.5/Command_Line_Tools_for_Xcode_11.5.dmg)
-2. Install the package.
-3. Run the [_acid test_ steps above](#The-acid-test).
-
-### I did all that and the acid test still does not pass :-(
-1. `sudo rm -rf $(xcode-select -print-path)` # Enter root password. No output is normal.
-2. `sudo rm -rf /Library/Developer/CommandLineTools` # Enter root password.
-3. `sudo xcode-select --reset`
-4. `xcode-select --install`
-5. If the [_acid test_ steps above](#The-acid-test) still does _not_ pass then...
-6. `npm explore npm -g -- npm install node-gyp@latest`
-7. `npm explore npm -g -- npm explore npm-lifecycle -- npm install node-gyp@latest`
-8. If the _acid test_ still does _not_ pass then...
-9. Add a comment to https://github.com/nodejs/node-gyp/issues/1927 so we can improve.
-
-Lessons learned from:
-* https://github.com/nodejs/node-gyp/issues/1779
-* https://github.com/nodejs/node-gyp/issues/1861
-* https://github.com/nodejs/node-gyp/issues/1927 and elsewhere
-* Thanks to @rrrix for discovering Solution 3
diff --git a/deps/npm/node_modules/node-gyp/node_modules/abbrev/LICENSE b/deps/npm/node_modules/node-gyp/node_modules/abbrev/LICENSE
deleted file mode 100644
index 9bcfa9d7d8d26e..00000000000000
--- a/deps/npm/node_modules/node-gyp/node_modules/abbrev/LICENSE
+++ /dev/null
@@ -1,46 +0,0 @@
-This software is dual-licensed under the ISC and MIT licenses.
-You may use this software under EITHER of the following licenses.
-
-----------
-
-The ISC License
-
-Copyright (c) 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.
-
-----------
-
-Copyright Isaac Z. Schlueter and Contributors
-All rights reserved.
-
-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:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
diff --git a/deps/npm/node_modules/node-gyp/node_modules/abbrev/abbrev.js b/deps/npm/node_modules/node-gyp/node_modules/abbrev/abbrev.js
deleted file mode 100644
index 7b1dc5d67694a2..00000000000000
--- a/deps/npm/node_modules/node-gyp/node_modules/abbrev/abbrev.js
+++ /dev/null
@@ -1,61 +0,0 @@
-module.exports = exports = abbrev.abbrev = abbrev
-
-abbrev.monkeyPatch = monkeyPatch
-
-function monkeyPatch () {
- Object.defineProperty(Array.prototype, 'abbrev', {
- value: function () { return abbrev(this) },
- enumerable: false, configurable: true, writable: true
- })
-
- Object.defineProperty(Object.prototype, 'abbrev', {
- value: function () { return abbrev(Object.keys(this)) },
- enumerable: false, configurable: true, writable: true
- })
-}
-
-function abbrev (list) {
- if (arguments.length !== 1 || !Array.isArray(list)) {
- list = Array.prototype.slice.call(arguments, 0)
- }
- for (var i = 0, l = list.length, args = [] ; i < l ; i ++) {
- args[i] = typeof list[i] === "string" ? list[i] : String(list[i])
- }
-
- // sort them lexicographically, so that they're next to their nearest kin
- args = args.sort(lexSort)
-
- // walk through each, seeing how much it has in common with the next and previous
- var abbrevs = {}
- , prev = ""
- for (var i = 0, l = args.length ; i < l ; i ++) {
- var current = args[i]
- , next = args[i + 1] || ""
- , nextMatches = true
- , prevMatches = true
- if (current === next) continue
- for (var j = 0, cl = current.length ; j < cl ; j ++) {
- var curChar = current.charAt(j)
- nextMatches = nextMatches && curChar === next.charAt(j)
- prevMatches = prevMatches && curChar === prev.charAt(j)
- if (!nextMatches && !prevMatches) {
- j ++
- break
- }
- }
- prev = current
- if (j === cl) {
- abbrevs[current] = current
- continue
- }
- for (var a = current.substr(0, j) ; j <= cl ; j ++) {
- abbrevs[a] = current
- a += current.charAt(j)
- }
- }
- return abbrevs
-}
-
-function lexSort (a, b) {
- return a === b ? 0 : a > b ? 1 : -1
-}
diff --git a/deps/npm/node_modules/node-gyp/node_modules/abbrev/package.json b/deps/npm/node_modules/node-gyp/node_modules/abbrev/package.json
deleted file mode 100644
index bf4e8015bba9d5..00000000000000
--- a/deps/npm/node_modules/node-gyp/node_modules/abbrev/package.json
+++ /dev/null
@@ -1,21 +0,0 @@
-{
- "name": "abbrev",
- "version": "1.1.1",
- "description": "Like ruby's abbrev module, but in js",
- "author": "Isaac Z. Schlueter ",
- "main": "abbrev.js",
- "scripts": {
- "test": "tap test.js --100",
- "preversion": "npm test",
- "postversion": "npm publish",
- "postpublish": "git push origin --all; git push origin --tags"
- },
- "repository": "http://github.com/isaacs/abbrev-js",
- "license": "ISC",
- "devDependencies": {
- "tap": "^10.1"
- },
- "files": [
- "abbrev.js"
- ]
-}
diff --git a/deps/npm/node_modules/node-gyp/node_modules/are-we-there-yet/LICENSE.md b/deps/npm/node_modules/node-gyp/node_modules/are-we-there-yet/LICENSE.md
deleted file mode 100644
index 845be76f64e789..00000000000000
--- a/deps/npm/node_modules/node-gyp/node_modules/are-we-there-yet/LICENSE.md
+++ /dev/null
@@ -1,18 +0,0 @@
-ISC License
-
-Copyright npm, Inc.
-
-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 NPM DISCLAIMS ALL
-WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO
-EVENT SHALL NPM 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.
diff --git a/deps/npm/node_modules/node-gyp/node_modules/are-we-there-yet/lib/index.js b/deps/npm/node_modules/node-gyp/node_modules/are-we-there-yet/lib/index.js
deleted file mode 100644
index 57d8743fdad177..00000000000000
--- a/deps/npm/node_modules/node-gyp/node_modules/are-we-there-yet/lib/index.js
+++ /dev/null
@@ -1,4 +0,0 @@
-'use strict'
-exports.TrackerGroup = require('./tracker-group.js')
-exports.Tracker = require('./tracker.js')
-exports.TrackerStream = require('./tracker-stream.js')
diff --git a/deps/npm/node_modules/node-gyp/node_modules/are-we-there-yet/lib/tracker-base.js b/deps/npm/node_modules/node-gyp/node_modules/are-we-there-yet/lib/tracker-base.js
deleted file mode 100644
index 6f436875578a7a..00000000000000
--- a/deps/npm/node_modules/node-gyp/node_modules/are-we-there-yet/lib/tracker-base.js
+++ /dev/null
@@ -1,11 +0,0 @@
-'use strict'
-var EventEmitter = require('events').EventEmitter
-var util = require('util')
-
-var trackerId = 0
-var TrackerBase = module.exports = function (name) {
- EventEmitter.call(this)
- this.id = ++trackerId
- this.name = name
-}
-util.inherits(TrackerBase, EventEmitter)
diff --git a/deps/npm/node_modules/node-gyp/node_modules/are-we-there-yet/lib/tracker-group.js b/deps/npm/node_modules/node-gyp/node_modules/are-we-there-yet/lib/tracker-group.js
deleted file mode 100644
index a3c7af804c4d3b..00000000000000
--- a/deps/npm/node_modules/node-gyp/node_modules/are-we-there-yet/lib/tracker-group.js
+++ /dev/null
@@ -1,116 +0,0 @@
-'use strict'
-var util = require('util')
-var TrackerBase = require('./tracker-base.js')
-var Tracker = require('./tracker.js')
-var TrackerStream = require('./tracker-stream.js')
-
-var TrackerGroup = module.exports = function (name) {
- TrackerBase.call(this, name)
- this.parentGroup = null
- this.trackers = []
- this.completion = {}
- this.weight = {}
- this.totalWeight = 0
- this.finished = false
- this.bubbleChange = bubbleChange(this)
-}
-util.inherits(TrackerGroup, TrackerBase)
-
-function bubbleChange (trackerGroup) {
- return function (name, completed, tracker) {
- trackerGroup.completion[tracker.id] = completed
- if (trackerGroup.finished) {
- return
- }
- trackerGroup.emit('change', name || trackerGroup.name, trackerGroup.completed(), trackerGroup)
- }
-}
-
-TrackerGroup.prototype.nameInTree = function () {
- var names = []
- var from = this
- while (from) {
- names.unshift(from.name)
- from = from.parentGroup
- }
- return names.join('/')
-}
-
-TrackerGroup.prototype.addUnit = function (unit, weight) {
- if (unit.addUnit) {
- var toTest = this
- while (toTest) {
- if (unit === toTest) {
- throw new Error(
- 'Attempted to add tracker group ' +
- unit.name + ' to tree that already includes it ' +
- this.nameInTree(this))
- }
- toTest = toTest.parentGroup
- }
- unit.parentGroup = this
- }
- this.weight[unit.id] = weight || 1
- this.totalWeight += this.weight[unit.id]
- this.trackers.push(unit)
- this.completion[unit.id] = unit.completed()
- unit.on('change', this.bubbleChange)
- if (!this.finished) {
- this.emit('change', unit.name, this.completion[unit.id], unit)
- }
- return unit
-}
-
-TrackerGroup.prototype.completed = function () {
- if (this.trackers.length === 0) {
- return 0
- }
- var valPerWeight = 1 / this.totalWeight
- var completed = 0
- for (var ii = 0; ii < this.trackers.length; ii++) {
- var trackerId = this.trackers[ii].id
- completed +=
- valPerWeight * this.weight[trackerId] * this.completion[trackerId]
- }
- return completed
-}
-
-TrackerGroup.prototype.newGroup = function (name, weight) {
- return this.addUnit(new TrackerGroup(name), weight)
-}
-
-TrackerGroup.prototype.newItem = function (name, todo, weight) {
- return this.addUnit(new Tracker(name, todo), weight)
-}
-
-TrackerGroup.prototype.newStream = function (name, todo, weight) {
- return this.addUnit(new TrackerStream(name, todo), weight)
-}
-
-TrackerGroup.prototype.finish = function () {
- this.finished = true
- if (!this.trackers.length) {
- this.addUnit(new Tracker(), 1, true)
- }
- for (var ii = 0; ii < this.trackers.length; ii++) {
- var tracker = this.trackers[ii]
- tracker.finish()
- tracker.removeListener('change', this.bubbleChange)
- }
- this.emit('change', this.name, 1, this)
-}
-
-var buffer = ' '
-TrackerGroup.prototype.debug = function (depth) {
- depth = depth || 0
- var indent = depth ? buffer.slice(0, depth) : ''
- var output = indent + (this.name || 'top') + ': ' + this.completed() + '\n'
- this.trackers.forEach(function (tracker) {
- if (tracker instanceof TrackerGroup) {
- output += tracker.debug(depth + 1)
- } else {
- output += indent + ' ' + tracker.name + ': ' + tracker.completed() + '\n'
- }
- })
- return output
-}
diff --git a/deps/npm/node_modules/node-gyp/node_modules/are-we-there-yet/lib/tracker-stream.js b/deps/npm/node_modules/node-gyp/node_modules/are-we-there-yet/lib/tracker-stream.js
deleted file mode 100644
index e1cf85055702a7..00000000000000
--- a/deps/npm/node_modules/node-gyp/node_modules/are-we-there-yet/lib/tracker-stream.js
+++ /dev/null
@@ -1,36 +0,0 @@
-'use strict'
-var util = require('util')
-var stream = require('readable-stream')
-var delegate = require('delegates')
-var Tracker = require('./tracker.js')
-
-var TrackerStream = module.exports = function (name, size, options) {
- stream.Transform.call(this, options)
- this.tracker = new Tracker(name, size)
- this.name = name
- this.id = this.tracker.id
- this.tracker.on('change', delegateChange(this))
-}
-util.inherits(TrackerStream, stream.Transform)
-
-function delegateChange (trackerStream) {
- return function (name, completion, tracker) {
- trackerStream.emit('change', name, completion, trackerStream)
- }
-}
-
-TrackerStream.prototype._transform = function (data, encoding, cb) {
- this.tracker.completeWork(data.length ? data.length : 1)
- this.push(data)
- cb()
-}
-
-TrackerStream.prototype._flush = function (cb) {
- this.tracker.finish()
- cb()
-}
-
-delegate(TrackerStream.prototype, 'tracker')
- .method('completed')
- .method('addWork')
- .method('finish')
diff --git a/deps/npm/node_modules/node-gyp/node_modules/are-we-there-yet/lib/tracker.js b/deps/npm/node_modules/node-gyp/node_modules/are-we-there-yet/lib/tracker.js
deleted file mode 100644
index a8f8b3ba013915..00000000000000
--- a/deps/npm/node_modules/node-gyp/node_modules/are-we-there-yet/lib/tracker.js
+++ /dev/null
@@ -1,32 +0,0 @@
-'use strict'
-var util = require('util')
-var TrackerBase = require('./tracker-base.js')
-
-var Tracker = module.exports = function (name, todo) {
- TrackerBase.call(this, name)
- this.workDone = 0
- this.workTodo = todo || 0
-}
-util.inherits(Tracker, TrackerBase)
-
-Tracker.prototype.completed = function () {
- return this.workTodo === 0 ? 0 : this.workDone / this.workTodo
-}
-
-Tracker.prototype.addWork = function (work) {
- this.workTodo += work
- this.emit('change', this.name, this.completed(), this)
-}
-
-Tracker.prototype.completeWork = function (work) {
- this.workDone += work
- if (this.workDone > this.workTodo) {
- this.workDone = this.workTodo
- }
- this.emit('change', this.name, this.completed(), this)
-}
-
-Tracker.prototype.finish = function () {
- this.workTodo = this.workDone = 1
- this.emit('change', this.name, 1, this)
-}
diff --git a/deps/npm/node_modules/node-gyp/node_modules/are-we-there-yet/package.json b/deps/npm/node_modules/node-gyp/node_modules/are-we-there-yet/package.json
deleted file mode 100644
index cc3d7504299fa2..00000000000000
--- a/deps/npm/node_modules/node-gyp/node_modules/are-we-there-yet/package.json
+++ /dev/null
@@ -1,56 +0,0 @@
-{
- "name": "are-we-there-yet",
- "version": "3.0.1",
- "description": "Keep track of the overall completion of many disparate processes",
- "main": "lib/index.js",
- "scripts": {
- "test": "tap",
- "npmclilint": "npmcli-lint",
- "lint": "eslint \"**/*.js\"",
- "lintfix": "npm run lint -- --fix",
- "posttest": "npm run lint",
- "postsnap": "npm run lintfix --",
- "preversion": "npm test",
- "postversion": "npm publish",
- "prepublishOnly": "git push origin --follow-tags",
- "snap": "tap",
- "postlint": "template-oss-check",
- "template-oss-apply": "template-oss-apply --force"
- },
- "repository": {
- "type": "git",
- "url": "https://github.com/npm/are-we-there-yet.git"
- },
- "author": "GitHub Inc.",
- "license": "ISC",
- "bugs": {
- "url": "https://github.com/npm/are-we-there-yet/issues"
- },
- "homepage": "https://github.com/npm/are-we-there-yet",
- "devDependencies": {
- "@npmcli/eslint-config": "^3.0.1",
- "@npmcli/template-oss": "3.5.0",
- "tap": "^16.0.1"
- },
- "dependencies": {
- "delegates": "^1.0.0",
- "readable-stream": "^3.6.0"
- },
- "files": [
- "bin/",
- "lib/"
- ],
- "engines": {
- "node": "^12.13.0 || ^14.15.0 || >=16.0.0"
- },
- "tap": {
- "branches": 68,
- "statements": 92,
- "functions": 86,
- "lines": 92
- },
- "templateOSS": {
- "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
- "version": "3.5.0"
- }
-}
diff --git a/deps/npm/node_modules/node-gyp/node_modules/brace-expansion/LICENSE b/deps/npm/node_modules/node-gyp/node_modules/brace-expansion/LICENSE
deleted file mode 100644
index de3226673c3874..00000000000000
--- a/deps/npm/node_modules/node-gyp/node_modules/brace-expansion/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-MIT License
-
-Copyright (c) 2013 Julian Gruber
-
-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:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
diff --git a/deps/npm/node_modules/node-gyp/node_modules/brace-expansion/index.js b/deps/npm/node_modules/node-gyp/node_modules/brace-expansion/index.js
deleted file mode 100644
index 2b6f4f85c951fc..00000000000000
--- a/deps/npm/node_modules/node-gyp/node_modules/brace-expansion/index.js
+++ /dev/null
@@ -1,200 +0,0 @@
-var concatMap = require('concat-map');
-var balanced = require('balanced-match');
-
-module.exports = expandTop;
-
-var escSlash = '\0SLASH'+Math.random()+'\0';
-var escOpen = '\0OPEN'+Math.random()+'\0';
-var escClose = '\0CLOSE'+Math.random()+'\0';
-var escComma = '\0COMMA'+Math.random()+'\0';
-var escPeriod = '\0PERIOD'+Math.random()+'\0';
-
-function numeric(str) {
- return parseInt(str, 10) == str
- ? parseInt(str, 10)
- : str.charCodeAt(0);
-}
-
-function escapeBraces(str) {
- return str.split('\\\\').join(escSlash)
- .split('\\{').join(escOpen)
- .split('\\}').join(escClose)
- .split('\\,').join(escComma)
- .split('\\.').join(escPeriod);
-}
-
-function unescapeBraces(str) {
- return str.split(escSlash).join('\\')
- .split(escOpen).join('{')
- .split(escClose).join('}')
- .split(escComma).join(',')
- .split(escPeriod).join('.');
-}
-
-
-// Basically just str.split(","), but handling cases
-// where we have nested braced sections, which should be
-// treated as individual members, like {a,{b,c},d}
-function parseCommaParts(str) {
- if (!str)
- return [''];
-
- var parts = [];
- var m = balanced('{', '}', str);
-
- if (!m)
- return str.split(',');
-
- var pre = m.pre;
- var body = m.body;
- var post = m.post;
- var p = pre.split(',');
-
- p[p.length-1] += '{' + body + '}';
- var postParts = parseCommaParts(post);
- if (post.length) {
- p[p.length-1] += postParts.shift();
- p.push.apply(p, postParts);
- }
-
- parts.push.apply(parts, p);
-
- return parts;
-}
-
-function expandTop(str) {
- if (!str)
- return [];
-
- // I don't know why Bash 4.3 does this, but it does.
- // Anything starting with {} will have the first two bytes preserved
- // but *only* at the top level, so {},a}b will not expand to anything,
- // but a{},b}c will be expanded to [a}c,abc].
- // One could argue that this is a bug in Bash, but since the goal of
- // this module is to match Bash's rules, we escape a leading {}
- if (str.substr(0, 2) === '{}') {
- str = '\\{\\}' + str.substr(2);
- }
-
- return expand(escapeBraces(str), true).map(unescapeBraces);
-}
-
-function identity(e) {
- return e;
-}
-
-function embrace(str) {
- return '{' + str + '}';
-}
-function isPadded(el) {
- return /^-?0\d/.test(el);
-}
-
-function lte(i, y) {
- return i <= y;
-}
-function gte(i, y) {
- return i >= y;
-}
-
-function expand(str, isTop) {
- var expansions = [];
-
- var m = balanced('{', '}', str);
- if (!m || /\$$/.test(m.pre)) return [str];
-
- var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body);
- var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body);
- var isSequence = isNumericSequence || isAlphaSequence;
- var isOptions = m.body.indexOf(',') >= 0;
- if (!isSequence && !isOptions) {
- // {a},b}
- if (m.post.match(/,.*\}/)) {
- str = m.pre + '{' + m.body + escClose + m.post;
- return expand(str);
- }
- return [str];
- }
-
- var n;
- if (isSequence) {
- n = m.body.split(/\.\./);
- } else {
- n = parseCommaParts(m.body);
- if (n.length === 1) {
- // x{{a,b}}y ==> x{a}y x{b}y
- n = expand(n[0], false).map(embrace);
- if (n.length === 1) {
- var post = m.post.length
- ? expand(m.post, false)
- : [''];
- return post.map(function(p) {
- return m.pre + n[0] + p;
- });
- }
- }
- }
-
- // at this point, n is the parts, and we know it's not a comma set
- // with a single entry.
-
- // no need to expand pre, since it is guaranteed to be free of brace-sets
- var pre = m.pre;
- var post = m.post.length
- ? expand(m.post, false)
- : [''];
-
- var N;
-
- if (isSequence) {
- var x = numeric(n[0]);
- var y = numeric(n[1]);
- var width = Math.max(n[0].length, n[1].length)
- var incr = n.length == 3
- ? Math.abs(numeric(n[2]))
- : 1;
- var test = lte;
- var reverse = y < x;
- if (reverse) {
- incr *= -1;
- test = gte;
- }
- var pad = n.some(isPadded);
-
- N = [];
-
- for (var i = x; test(i, y); i += incr) {
- var c;
- if (isAlphaSequence) {
- c = String.fromCharCode(i);
- if (c === '\\')
- c = '';
- } else {
- c = String(i);
- if (pad) {
- var need = width - c.length;
- if (need > 0) {
- var z = new Array(need + 1).join('0');
- if (i < 0)
- c = '-' + z + c.slice(1);
- else
- c = z + c;
- }
- }
- }
- N.push(c);
- }
- } else {
- N = concatMap(n, function(el) { return expand(el, false) });
- }
-
- for (var j = 0; j < N.length; j++) {
- for (var k = 0; k < post.length; k++) {
- var expansion = pre + N[j] + post[k];
- if (!isTop || isSequence || expansion)
- expansions.push(expansion);
- }
- }
-
- return expansions;
-}
diff --git a/deps/npm/node_modules/node-gyp/node_modules/brace-expansion/package.json b/deps/npm/node_modules/node-gyp/node_modules/brace-expansion/package.json
deleted file mode 100644
index a18faa8fd67b82..00000000000000
--- a/deps/npm/node_modules/node-gyp/node_modules/brace-expansion/package.json
+++ /dev/null
@@ -1,47 +0,0 @@
-{
- "name": "brace-expansion",
- "description": "Brace expansion as known from sh/bash",
- "version": "1.1.11",
- "repository": {
- "type": "git",
- "url": "git://github.com/juliangruber/brace-expansion.git"
- },
- "homepage": "https://github.com/juliangruber/brace-expansion",
- "main": "index.js",
- "scripts": {
- "test": "tape test/*.js",
- "gentest": "bash test/generate.sh",
- "bench": "matcha test/perf/bench.js"
- },
- "dependencies": {
- "balanced-match": "^1.0.0",
- "concat-map": "0.0.1"
- },
- "devDependencies": {
- "matcha": "^0.7.0",
- "tape": "^4.6.0"
- },
- "keywords": [],
- "author": {
- "name": "Julian Gruber",
- "email": "mail@juliangruber.com",
- "url": "http://juliangruber.com"
- },
- "license": "MIT",
- "testling": {
- "files": "test/*.js",
- "browsers": [
- "ie/8..latest",
- "firefox/20..latest",
- "firefox/nightly",
- "chrome/25..latest",
- "chrome/canary",
- "opera/12..latest",
- "opera/next",
- "safari/5.1..latest",
- "ipad/6.0..latest",
- "iphone/6.0..latest",
- "android-browser/4.2..latest"
- ]
- }
-}
diff --git a/deps/npm/node_modules/node-gyp/node_modules/cacache/LICENSE.md b/deps/npm/node_modules/node-gyp/node_modules/cacache/LICENSE.md
deleted file mode 100644
index 8d28acf866d932..00000000000000
--- a/deps/npm/node_modules/node-gyp/node_modules/cacache/LICENSE.md
+++ /dev/null
@@ -1,16 +0,0 @@
-ISC License
-
-Copyright (c) npm, Inc.
-
-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 COPYRIGHT HOLDER DISCLAIMS
-ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
-COPYRIGHT HOLDER 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.
diff --git a/deps/npm/node_modules/node-gyp/node_modules/cacache/lib/content/path.js b/deps/npm/node_modules/node-gyp/node_modules/cacache/lib/content/path.js
deleted file mode 100644
index ad5a76a4f73f26..00000000000000
--- a/deps/npm/node_modules/node-gyp/node_modules/cacache/lib/content/path.js
+++ /dev/null
@@ -1,29 +0,0 @@
-'use strict'
-
-const contentVer = require('../../package.json')['cache-version'].content
-const hashToSegments = require('../util/hash-to-segments')
-const path = require('path')
-const ssri = require('ssri')
-
-// Current format of content file path:
-//
-// sha512-BaSE64Hex= ->
-// ~/.my-cache/content-v2/sha512/ba/da/55deadbeefc0ffee
-//
-module.exports = contentPath
-
-function contentPath (cache, integrity) {
- const sri = ssri.parse(integrity, { single: true })
- // contentPath is the *strongest* algo given
- return path.join(
- contentDir(cache),
- sri.algorithm,
- ...hashToSegments(sri.hexDigest())
- )
-}
-
-module.exports.contentDir = contentDir
-
-function contentDir (cache) {
- return path.join(cache, `content-v${contentVer}`)
-}
diff --git a/deps/npm/node_modules/node-gyp/node_modules/cacache/lib/content/read.js b/deps/npm/node_modules/node-gyp/node_modules/cacache/lib/content/read.js
deleted file mode 100644
index f41b539df65dce..00000000000000
--- a/deps/npm/node_modules/node-gyp/node_modules/cacache/lib/content/read.js
+++ /dev/null
@@ -1,166 +0,0 @@
-'use strict'
-
-const fs = require('fs/promises')
-const fsm = require('fs-minipass')
-const ssri = require('ssri')
-const contentPath = require('./path')
-const Pipeline = require('minipass-pipeline')
-
-module.exports = read
-
-const MAX_SINGLE_READ_SIZE = 64 * 1024 * 1024
-async function read (cache, integrity, opts = {}) {
- const { size } = opts
- const { stat, cpath, sri } = await withContentSri(cache, integrity, async (cpath, sri) => {
- // get size
- const stat = await fs.stat(cpath)
- return { stat, cpath, sri }
- })
- if (typeof size === 'number' && stat.size !== size) {
- throw sizeError(size, stat.size)
- }
-
- if (stat.size > MAX_SINGLE_READ_SIZE) {
- return readPipeline(cpath, stat.size, sri, new Pipeline()).concat()
- }
-
- const data = await fs.readFile(cpath, { encoding: null })
- if (!ssri.checkData(data, sri)) {
- throw integrityError(sri, cpath)
- }
-
- return data
-}
-
-const readPipeline = (cpath, size, sri, stream) => {
- stream.push(
- new fsm.ReadStream(cpath, {
- size,
- readSize: MAX_SINGLE_READ_SIZE,
- }),
- ssri.integrityStream({
- integrity: sri,
- size,
- })
- )
- return stream
-}
-
-module.exports.stream = readStream
-module.exports.readStream = readStream
-
-function readStream (cache, integrity, opts = {}) {
- const { size } = opts
- const stream = new Pipeline()
- // Set all this up to run on the stream and then just return the stream
- Promise.resolve().then(async () => {
- const { stat, cpath, sri } = await withContentSri(cache, integrity, async (cpath, sri) => {
- // just stat to ensure it exists
- const stat = await fs.stat(cpath)
- return { stat, cpath, sri }
- })
- if (typeof size === 'number' && size !== stat.size) {
- return stream.emit('error', sizeError(size, stat.size))
- }
-
- return readPipeline(cpath, stat.size, sri, stream)
- }).catch(err => stream.emit('error', err))
-
- return stream
-}
-
-module.exports.copy = copy
-
-function copy (cache, integrity, dest) {
- return withContentSri(cache, integrity, (cpath, sri) => {
- return fs.copyFile(cpath, dest)
- })
-}
-
-module.exports.hasContent = hasContent
-
-async function hasContent (cache, integrity) {
- if (!integrity) {
- return false
- }
-
- try {
- return await withContentSri(cache, integrity, async (cpath, sri) => {
- const stat = await fs.stat(cpath)
- return { size: stat.size, sri, stat }
- })
- } catch (err) {
- if (err.code === 'ENOENT') {
- return false
- }
-
- if (err.code === 'EPERM') {
- /* istanbul ignore else */
- if (process.platform !== 'win32') {
- throw err
- } else {
- return false
- }
- }
- }
-}
-
-async function withContentSri (cache, integrity, fn) {
- const sri = ssri.parse(integrity)
- // If `integrity` has multiple entries, pick the first digest
- // with available local data.
- const algo = sri.pickAlgorithm()
- const digests = sri[algo]
-
- if (digests.length <= 1) {
- const cpath = contentPath(cache, digests[0])
- return fn(cpath, digests[0])
- } else {
- // Can't use race here because a generic error can happen before
- // a ENOENT error, and can happen before a valid result
- const results = await Promise.all(digests.map(async (meta) => {
- try {
- return await withContentSri(cache, meta, fn)
- } catch (err) {
- if (err.code === 'ENOENT') {
- return Object.assign(
- new Error('No matching content found for ' + sri.toString()),
- { code: 'ENOENT' }
- )
- }
- return err
- }
- }))
- // Return the first non error if it is found
- const result = results.find((r) => !(r instanceof Error))
- if (result) {
- return result
- }
-
- // Throw the No matching content found error
- const enoentError = results.find((r) => r.code === 'ENOENT')
- if (enoentError) {
- throw enoentError
- }
-
- // Throw generic error
- throw results.find((r) => r instanceof Error)
- }
-}
-
-function sizeError (expected, found) {
- /* eslint-disable-next-line max-len */
- const err = new Error(`Bad data size: expected inserted data to be ${expected} bytes, but got ${found} instead`)
- err.expected = expected
- err.found = found
- err.code = 'EBADSIZE'
- return err
-}
-
-function integrityError (sri, path) {
- const err = new Error(`Integrity verification failed for ${sri} (${path})`)
- err.code = 'EINTEGRITY'
- err.sri = sri
- err.path = path
- return err
-}
diff --git a/deps/npm/node_modules/node-gyp/node_modules/cacache/lib/content/rm.js b/deps/npm/node_modules/node-gyp/node_modules/cacache/lib/content/rm.js
deleted file mode 100644
index ce58d679e4cb25..00000000000000
--- a/deps/npm/node_modules/node-gyp/node_modules/cacache/lib/content/rm.js
+++ /dev/null
@@ -1,18 +0,0 @@
-'use strict'
-
-const fs = require('fs/promises')
-const contentPath = require('./path')
-const { hasContent } = require('./read')
-
-module.exports = rm
-
-async function rm (cache, integrity) {
- const content = await hasContent(cache, integrity)
- // ~pretty~ sure we can't end up with a content lacking sri, but be safe
- if (content && content.sri) {
- await fs.rm(contentPath(cache, content.sri), { recursive: true, force: true })
- return true
- } else {
- return false
- }
-}
diff --git a/deps/npm/node_modules/node-gyp/node_modules/cacache/lib/content/write.js b/deps/npm/node_modules/node-gyp/node_modules/cacache/lib/content/write.js
deleted file mode 100644
index 71461465812878..00000000000000
--- a/deps/npm/node_modules/node-gyp/node_modules/cacache/lib/content/write.js
+++ /dev/null
@@ -1,205 +0,0 @@
-'use strict'
-
-const events = require('events')
-
-const contentPath = require('./path')
-const fs = require('fs/promises')
-const { moveFile } = require('@npmcli/fs')
-const { Minipass } = require('minipass')
-const Pipeline = require('minipass-pipeline')
-const Flush = require('minipass-flush')
-const path = require('path')
-const ssri = require('ssri')
-const uniqueFilename = require('unique-filename')
-const fsm = require('fs-minipass')
-
-module.exports = write
-
-// Cache of move operations in process so we don't duplicate
-const moveOperations = new Map()
-
-async function write (cache, data, opts = {}) {
- const { algorithms, size, integrity } = opts
-
- if (typeof size === 'number' && data.length !== size) {
- throw sizeError(size, data.length)
- }
-
- const sri = ssri.fromData(data, algorithms ? { algorithms } : {})
- if (integrity && !ssri.checkData(data, integrity, opts)) {
- throw checksumError(integrity, sri)
- }
-
- for (const algo in sri) {
- const tmp = await makeTmp(cache, opts)
- const hash = sri[algo].toString()
- try {
- await fs.writeFile(tmp.target, data, { flag: 'wx' })
- await moveToDestination(tmp, cache, hash, opts)
- } finally {
- if (!tmp.moved) {
- await fs.rm(tmp.target, { recursive: true, force: true })
- }
- }
- }
- return { integrity: sri, size: data.length }
-}
-
-module.exports.stream = writeStream
-
-// writes proxied to the 'inputStream' that is passed to the Promise
-// 'end' is deferred until content is handled.
-class CacacheWriteStream extends Flush {
- constructor (cache, opts) {
- super()
- this.opts = opts
- this.cache = cache
- this.inputStream = new Minipass()
- this.inputStream.on('error', er => this.emit('error', er))
- this.inputStream.on('drain', () => this.emit('drain'))
- this.handleContentP = null
- }
-
- write (chunk, encoding, cb) {
- if (!this.handleContentP) {
- this.handleContentP = handleContent(
- this.inputStream,
- this.cache,
- this.opts
- )
- }
- return this.inputStream.write(chunk, encoding, cb)
- }
-
- flush (cb) {
- this.inputStream.end(() => {
- if (!this.handleContentP) {
- const e = new Error('Cache input stream was empty')
- e.code = 'ENODATA'
- // empty streams are probably emitting end right away.
- // defer this one tick by rejecting a promise on it.
- return Promise.reject(e).catch(cb)
- }
- // eslint-disable-next-line promise/catch-or-return
- this.handleContentP.then(
- (res) => {
- res.integrity && this.emit('integrity', res.integrity)
- // eslint-disable-next-line promise/always-return
- res.size !== null && this.emit('size', res.size)
- cb()
- },
- (er) => cb(er)
- )
- })
- }
-}
-
-function writeStream (cache, opts = {}) {
- return new CacacheWriteStream(cache, opts)
-}
-
-async function handleContent (inputStream, cache, opts) {
- const tmp = await makeTmp(cache, opts)
- try {
- const res = await pipeToTmp(inputStream, cache, tmp.target, opts)
- await moveToDestination(
- tmp,
- cache,
- res.integrity,
- opts
- )
- return res
- } finally {
- if (!tmp.moved) {
- await fs.rm(tmp.target, { recursive: true, force: true })
- }
- }
-}
-
-async function pipeToTmp (inputStream, cache, tmpTarget, opts) {
- const outStream = new fsm.WriteStream(tmpTarget, {
- flags: 'wx',
- })
-
- if (opts.integrityEmitter) {
- // we need to create these all simultaneously since they can fire in any order
- const [integrity, size] = await Promise.all([
- events.once(opts.integrityEmitter, 'integrity').then(res => res[0]),
- events.once(opts.integrityEmitter, 'size').then(res => res[0]),
- new Pipeline(inputStream, outStream).promise(),
- ])
- return { integrity, size }
- }
-
- let integrity
- let size
- const hashStream = ssri.integrityStream({
- integrity: opts.integrity,
- algorithms: opts.algorithms,
- size: opts.size,
- })
- hashStream.on('integrity', i => {
- integrity = i
- })
- hashStream.on('size', s => {
- size = s
- })
-
- const pipeline = new Pipeline(inputStream, hashStream, outStream)
- await pipeline.promise()
- return { integrity, size }
-}
-
-async function makeTmp (cache, opts) {
- const tmpTarget = uniqueFilename(path.join(cache, 'tmp'), opts.tmpPrefix)
- await fs.mkdir(path.dirname(tmpTarget), { recursive: true })
- return {
- target: tmpTarget,
- moved: false,
- }
-}
-
-async function moveToDestination (tmp, cache, sri, opts) {
- const destination = contentPath(cache, sri)
- const destDir = path.dirname(destination)
- if (moveOperations.has(destination)) {
- return moveOperations.get(destination)
- }
- moveOperations.set(
- destination,
- fs.mkdir(destDir, { recursive: true })
- .then(async () => {
- await moveFile(tmp.target, destination, { overwrite: false })
- tmp.moved = true
- return tmp.moved
- })
- .catch(err => {
- if (!err.message.startsWith('The destination file exists')) {
- throw Object.assign(err, { code: 'EEXIST' })
- }
- }).finally(() => {
- moveOperations.delete(destination)
- })
-
- )
- return moveOperations.get(destination)
-}
-
-function sizeError (expected, found) {
- /* eslint-disable-next-line max-len */
- const err = new Error(`Bad data size: expected inserted data to be ${expected} bytes, but got ${found} instead`)
- err.expected = expected
- err.found = found
- err.code = 'EBADSIZE'
- return err
-}
-
-function checksumError (expected, found) {
- const err = new Error(`Integrity check failed:
- Wanted: ${expected}
- Found: ${found}`)
- err.code = 'EINTEGRITY'
- err.expected = expected
- err.found = found
- return err
-}
diff --git a/deps/npm/node_modules/node-gyp/node_modules/cacache/lib/entry-index.js b/deps/npm/node_modules/node-gyp/node_modules/cacache/lib/entry-index.js
deleted file mode 100644
index 722a37af5ce157..00000000000000
--- a/deps/npm/node_modules/node-gyp/node_modules/cacache/lib/entry-index.js
+++ /dev/null
@@ -1,330 +0,0 @@
-'use strict'
-
-const crypto = require('crypto')
-const {
- appendFile,
- mkdir,
- readFile,
- readdir,
- rm,
- writeFile,
-} = require('fs/promises')
-const { Minipass } = require('minipass')
-const path = require('path')
-const ssri = require('ssri')
-const uniqueFilename = require('unique-filename')
-
-const contentPath = require('./content/path')
-const hashToSegments = require('./util/hash-to-segments')
-const indexV = require('../package.json')['cache-version'].index
-const { moveFile } = require('@npmcli/fs')
-
-module.exports.NotFoundError = class NotFoundError extends Error {
- constructor (cache, key) {
- super(`No cache entry for ${key} found in ${cache}`)
- this.code = 'ENOENT'
- this.cache = cache
- this.key = key
- }
-}
-
-module.exports.compact = compact
-
-async function compact (cache, key, matchFn, opts = {}) {
- const bucket = bucketPath(cache, key)
- const entries = await bucketEntries(bucket)
- const newEntries = []
- // we loop backwards because the bottom-most result is the newest
- // since we add new entries with appendFile
- for (let i = entries.length - 1; i >= 0; --i) {
- const entry = entries[i]
- // a null integrity could mean either a delete was appended
- // or the user has simply stored an index that does not map
- // to any content. we determine if the user wants to keep the
- // null integrity based on the validateEntry function passed in options.
- // if the integrity is null and no validateEntry is provided, we break
- // as we consider the null integrity to be a deletion of everything
- // that came before it.
- if (entry.integrity === null && !opts.validateEntry) {
- break
- }
-
- // if this entry is valid, and it is either the first entry or
- // the newEntries array doesn't already include an entry that
- // matches this one based on the provided matchFn, then we add
- // it to the beginning of our list
- if ((!opts.validateEntry || opts.validateEntry(entry) === true) &&
- (newEntries.length === 0 ||
- !newEntries.find((oldEntry) => matchFn(oldEntry, entry)))) {
- newEntries.unshift(entry)
- }
- }
-
- const newIndex = '\n' + newEntries.map((entry) => {
- const stringified = JSON.stringify(entry)
- const hash = hashEntry(stringified)
- return `${hash}\t${stringified}`
- }).join('\n')
-
- const setup = async () => {
- const target = uniqueFilename(path.join(cache, 'tmp'), opts.tmpPrefix)
- await mkdir(path.dirname(target), { recursive: true })
- return {
- target,
- moved: false,
- }
- }
-
- const teardown = async (tmp) => {
- if (!tmp.moved) {
- return rm(tmp.target, { recursive: true, force: true })
- }
- }
-
- const write = async (tmp) => {
- await writeFile(tmp.target, newIndex, { flag: 'wx' })
- await mkdir(path.dirname(bucket), { recursive: true })
- // we use @npmcli/move-file directly here because we
- // want to overwrite the existing file
- await moveFile(tmp.target, bucket)
- tmp.moved = true
- }
-
- // write the file atomically
- const tmp = await setup()
- try {
- await write(tmp)
- } finally {
- await teardown(tmp)
- }
-
- // we reverse the list we generated such that the newest
- // entries come first in order to make looping through them easier
- // the true passed to formatEntry tells it to keep null
- // integrity values, if they made it this far it's because
- // validateEntry returned true, and as such we should return it
- return newEntries.reverse().map((entry) => formatEntry(cache, entry, true))
-}
-
-module.exports.insert = insert
-
-async function insert (cache, key, integrity, opts = {}) {
- const { metadata, size, time } = opts
- const bucket = bucketPath(cache, key)
- const entry = {
- key,
- integrity: integrity && ssri.stringify(integrity),
- time: time || Date.now(),
- size,
- metadata,
- }
- try {
- await mkdir(path.dirname(bucket), { recursive: true })
- const stringified = JSON.stringify(entry)
- // NOTE - Cleverness ahoy!
- //
- // This works because it's tremendously unlikely for an entry to corrupt
- // another while still preserving the string length of the JSON in
- // question. So, we just slap the length in there and verify it on read.
- //
- // Thanks to @isaacs for the whiteboarding session that ended up with
- // this.
- await appendFile(bucket, `\n${hashEntry(stringified)}\t${stringified}`)
- } catch (err) {
- if (err.code === 'ENOENT') {
- return undefined
- }
-
- throw err
- }
- return formatEntry(cache, entry)
-}
-
-module.exports.find = find
-
-async function find (cache, key) {
- const bucket = bucketPath(cache, key)
- try {
- const entries = await bucketEntries(bucket)
- return entries.reduce((latest, next) => {
- if (next && next.key === key) {
- return formatEntry(cache, next)
- } else {
- return latest
- }
- }, null)
- } catch (err) {
- if (err.code === 'ENOENT') {
- return null
- } else {
- throw err
- }
- }
-}
-
-module.exports.delete = del
-
-function del (cache, key, opts = {}) {
- if (!opts.removeFully) {
- return insert(cache, key, null, opts)
- }
-
- const bucket = bucketPath(cache, key)
- return rm(bucket, { recursive: true, force: true })
-}
-
-module.exports.lsStream = lsStream
-
-function lsStream (cache) {
- const indexDir = bucketDir(cache)
- const stream = new Minipass({ objectMode: true })
-
- // Set all this up to run on the stream and then just return the stream
- Promise.resolve().then(async () => {
- const buckets = await readdirOrEmpty(indexDir)
- await Promise.all(buckets.map(async (bucket) => {
- const bucketPath = path.join(indexDir, bucket)
- const subbuckets = await readdirOrEmpty(bucketPath)
- await Promise.all(subbuckets.map(async (subbucket) => {
- const subbucketPath = path.join(bucketPath, subbucket)
-
- // "/cachename//./*"
- const subbucketEntries = await readdirOrEmpty(subbucketPath)
- await Promise.all(subbucketEntries.map(async (entry) => {
- const entryPath = path.join(subbucketPath, entry)
- try {
- const entries = await bucketEntries(entryPath)
- // using a Map here prevents duplicate keys from showing up
- // twice, I guess?
- const reduced = entries.reduce((acc, entry) => {
- acc.set(entry.key, entry)
- return acc
- }, new Map())
- // reduced is a map of key => entry
- for (const entry of reduced.values()) {
- const formatted = formatEntry(cache, entry)
- if (formatted) {
- stream.write(formatted)
- }
- }
- } catch (err) {
- if (err.code === 'ENOENT') {
- return undefined
- }
- throw err
- }
- }))
- }))
- }))
- stream.end()
- return stream
- }).catch(err => stream.emit('error', err))
-
- return stream
-}
-
-module.exports.ls = ls
-
-async function ls (cache) {
- const entries = await lsStream(cache).collect()
- return entries.reduce((acc, xs) => {
- acc[xs.key] = xs
- return acc
- }, {})
-}
-
-module.exports.bucketEntries = bucketEntries
-
-async function bucketEntries (bucket, filter) {
- const data = await readFile(bucket, 'utf8')
- return _bucketEntries(data, filter)
-}
-
-function _bucketEntries (data, filter) {
- const entries = []
- data.split('\n').forEach((entry) => {
- if (!entry) {
- return
- }
-
- const pieces = entry.split('\t')
- if (!pieces[1] || hashEntry(pieces[1]) !== pieces[0]) {
- // Hash is no good! Corruption or malice? Doesn't matter!
- // EJECT EJECT
- return
- }
- let obj
- try {
- obj = JSON.parse(pieces[1])
- } catch (_) {
- // eslint-ignore-next-line no-empty-block
- }
- // coverage disabled here, no need to test with an entry that parses to something falsey
- // istanbul ignore else
- if (obj) {
- entries.push(obj)
- }
- })
- return entries
-}
-
-module.exports.bucketDir = bucketDir
-
-function bucketDir (cache) {
- return path.join(cache, `index-v${indexV}`)
-}
-
-module.exports.bucketPath = bucketPath
-
-function bucketPath (cache, key) {
- const hashed = hashKey(key)
- return path.join.apply(
- path,
- [bucketDir(cache)].concat(hashToSegments(hashed))
- )
-}
-
-module.exports.hashKey = hashKey
-
-function hashKey (key) {
- return hash(key, 'sha256')
-}
-
-module.exports.hashEntry = hashEntry
-
-function hashEntry (str) {
- return hash(str, 'sha1')
-}
-
-function hash (str, digest) {
- return crypto
- .createHash(digest)
- .update(str)
- .digest('hex')
-}
-
-function formatEntry (cache, entry, keepAll) {
- // Treat null digests as deletions. They'll shadow any previous entries.
- if (!entry.integrity && !keepAll) {
- return null
- }
-
- return {
- key: entry.key,
- integrity: entry.integrity,
- path: entry.integrity ? contentPath(cache, entry.integrity) : undefined,
- size: entry.size,
- time: entry.time,
- metadata: entry.metadata,
- }
-}
-
-function readdirOrEmpty (dir) {
- return readdir(dir).catch((err) => {
- if (err.code === 'ENOENT' || err.code === 'ENOTDIR') {
- return []
- }
-
- throw err
- })
-}
diff --git a/deps/npm/node_modules/node-gyp/node_modules/cacache/lib/get.js b/deps/npm/node_modules/node-gyp/node_modules/cacache/lib/get.js
deleted file mode 100644
index 80ec206c7ecaaa..00000000000000
--- a/deps/npm/node_modules/node-gyp/node_modules/cacache/lib/get.js
+++ /dev/null
@@ -1,170 +0,0 @@
-'use strict'
-
-const Collect = require('minipass-collect')
-const { Minipass } = require('minipass')
-const Pipeline = require('minipass-pipeline')
-
-const index = require('./entry-index')
-const memo = require('./memoization')
-const read = require('./content/read')
-
-async function getData (cache, key, opts = {}) {
- const { integrity, memoize, size } = opts
- const memoized = memo.get(cache, key, opts)
- if (memoized && memoize !== false) {
- return {
- metadata: memoized.entry.metadata,
- data: memoized.data,
- integrity: memoized.entry.integrity,
- size: memoized.entry.size,
- }
- }
-
- const entry = await index.find(cache, key, opts)
- if (!entry) {
- throw new index.NotFoundError(cache, key)
- }
- const data = await read(cache, entry.integrity, { integrity, size })
- if (memoize) {
- memo.put(cache, entry, data, opts)
- }
-
- return {
- data,
- metadata: entry.metadata,
- size: entry.size,
- integrity: entry.integrity,
- }
-}
-module.exports = getData
-
-async function getDataByDigest (cache, key, opts = {}) {
- const { integrity, memoize, size } = opts
- const memoized = memo.get.byDigest(cache, key, opts)
- if (memoized && memoize !== false) {
- return memoized
- }
-
- const res = await read(cache, key, { integrity, size })
- if (memoize) {
- memo.put.byDigest(cache, key, res, opts)
- }
- return res
-}
-module.exports.byDigest = getDataByDigest
-
-const getMemoizedStream = (memoized) => {
- const stream = new Minipass()
- stream.on('newListener', function (ev, cb) {
- ev === 'metadata' && cb(memoized.entry.metadata)
- ev === 'integrity' && cb(memoized.entry.integrity)
- ev === 'size' && cb(memoized.entry.size)
- })
- stream.end(memoized.data)
- return stream
-}
-
-function getStream (cache, key, opts = {}) {
- const { memoize, size } = opts
- const memoized = memo.get(cache, key, opts)
- if (memoized && memoize !== false) {
- return getMemoizedStream(memoized)
- }
-
- const stream = new Pipeline()
- // Set all this up to run on the stream and then just return the stream
- Promise.resolve().then(async () => {
- const entry = await index.find(cache, key)
- if (!entry) {
- throw new index.NotFoundError(cache, key)
- }
-
- stream.emit('metadata', entry.metadata)
- stream.emit('integrity', entry.integrity)
- stream.emit('size', entry.size)
- stream.on('newListener', function (ev, cb) {
- ev === 'metadata' && cb(entry.metadata)
- ev === 'integrity' && cb(entry.integrity)
- ev === 'size' && cb(entry.size)
- })
-
- const src = read.readStream(
- cache,
- entry.integrity,
- { ...opts, size: typeof size !== 'number' ? entry.size : size }
- )
-
- if (memoize) {
- const memoStream = new Collect.PassThrough()
- memoStream.on('collect', data => memo.put(cache, entry, data, opts))
- stream.unshift(memoStream)
- }
- stream.unshift(src)
- return stream
- }).catch((err) => stream.emit('error', err))
-
- return stream
-}
-
-module.exports.stream = getStream
-
-function getStreamDigest (cache, integrity, opts = {}) {
- const { memoize } = opts
- const memoized = memo.get.byDigest(cache, integrity, opts)
- if (memoized && memoize !== false) {
- const stream = new Minipass()
- stream.end(memoized)
- return stream
- } else {
- const stream = read.readStream(cache, integrity, opts)
- if (!memoize) {
- return stream
- }
-
- const memoStream = new Collect.PassThrough()
- memoStream.on('collect', data => memo.put.byDigest(
- cache,
- integrity,
- data,
- opts
- ))
- return new Pipeline(stream, memoStream)
- }
-}
-
-module.exports.stream.byDigest = getStreamDigest
-
-function info (cache, key, opts = {}) {
- const { memoize } = opts
- const memoized = memo.get(cache, key, opts)
- if (memoized && memoize !== false) {
- return Promise.resolve(memoized.entry)
- } else {
- return index.find(cache, key)
- }
-}
-module.exports.info = info
-
-async function copy (cache, key, dest, opts = {}) {
- const entry = await index.find(cache, key, opts)
- if (!entry) {
- throw new index.NotFoundError(cache, key)
- }
- await read.copy(cache, entry.integrity, dest, opts)
- return {
- metadata: entry.metadata,
- size: entry.size,
- integrity: entry.integrity,
- }
-}
-
-module.exports.copy = copy
-
-async function copyByDigest (cache, key, dest, opts = {}) {
- await read.copy(cache, key, dest, opts)
- return key
-}
-
-module.exports.copy.byDigest = copyByDigest
-
-module.exports.hasContent = read.hasContent
diff --git a/deps/npm/node_modules/node-gyp/node_modules/cacache/lib/index.js b/deps/npm/node_modules/node-gyp/node_modules/cacache/lib/index.js
deleted file mode 100644
index c9b0da5f3a271b..00000000000000
--- a/deps/npm/node_modules/node-gyp/node_modules/cacache/lib/index.js
+++ /dev/null
@@ -1,42 +0,0 @@
-'use strict'
-
-const get = require('./get.js')
-const put = require('./put.js')
-const rm = require('./rm.js')
-const verify = require('./verify.js')
-const { clearMemoized } = require('./memoization.js')
-const tmp = require('./util/tmp.js')
-const index = require('./entry-index.js')
-
-module.exports.index = {}
-module.exports.index.compact = index.compact
-module.exports.index.insert = index.insert
-
-module.exports.ls = index.ls
-module.exports.ls.stream = index.lsStream
-
-module.exports.get = get
-module.exports.get.byDigest = get.byDigest
-module.exports.get.stream = get.stream
-module.exports.get.stream.byDigest = get.stream.byDigest
-module.exports.get.copy = get.copy
-module.exports.get.copy.byDigest = get.copy.byDigest
-module.exports.get.info = get.info
-module.exports.get.hasContent = get.hasContent
-
-module.exports.put = put
-module.exports.put.stream = put.stream
-
-module.exports.rm = rm.entry
-module.exports.rm.all = rm.all
-module.exports.rm.entry = module.exports.rm
-module.exports.rm.content = rm.content
-
-module.exports.clearMemoized = clearMemoized
-
-module.exports.tmp = {}
-module.exports.tmp.mkdir = tmp.mkdir
-module.exports.tmp.withTmp = tmp.withTmp
-
-module.exports.verify = verify
-module.exports.verify.lastRun = verify.lastRun
diff --git a/deps/npm/node_modules/node-gyp/node_modules/cacache/lib/memoization.js b/deps/npm/node_modules/node-gyp/node_modules/cacache/lib/memoization.js
deleted file mode 100644
index 0ff604a479c9c1..00000000000000
--- a/deps/npm/node_modules/node-gyp/node_modules/cacache/lib/memoization.js
+++ /dev/null
@@ -1,72 +0,0 @@
-'use strict'
-
-const LRU = require('lru-cache')
-
-const MEMOIZED = new LRU({
- max: 500,
- maxSize: 50 * 1024 * 1024, // 50MB
- ttl: 3 * 60 * 1000, // 3 minutes
- sizeCalculation: (entry, key) => key.startsWith('key:') ? entry.data.length : entry.length,
-})
-
-module.exports.clearMemoized = clearMemoized
-
-function clearMemoized () {
- const old = {}
- MEMOIZED.forEach((v, k) => {
- old[k] = v
- })
- MEMOIZED.clear()
- return old
-}
-
-module.exports.put = put
-
-function put (cache, entry, data, opts) {
- pickMem(opts).set(`key:${cache}:${entry.key}`, { entry, data })
- putDigest(cache, entry.integrity, data, opts)
-}
-
-module.exports.put.byDigest = putDigest
-
-function putDigest (cache, integrity, data, opts) {
- pickMem(opts).set(`digest:${cache}:${integrity}`, data)
-}
-
-module.exports.get = get
-
-function get (cache, key, opts) {
- return pickMem(opts).get(`key:${cache}:${key}`)
-}
-
-module.exports.get.byDigest = getDigest
-
-function getDigest (cache, integrity, opts) {
- return pickMem(opts).get(`digest:${cache}:${integrity}`)
-}
-
-class ObjProxy {
- constructor (obj) {
- this.obj = obj
- }
-
- get (key) {
- return this.obj[key]
- }
-
- set (key, val) {
- this.obj[key] = val
- }
-}
-
-function pickMem (opts) {
- if (!opts || !opts.memoize) {
- return MEMOIZED
- } else if (opts.memoize.get && opts.memoize.set) {
- return opts.memoize
- } else if (typeof opts.memoize === 'object') {
- return new ObjProxy(opts.memoize)
- } else {
- return MEMOIZED
- }
-}
diff --git a/deps/npm/node_modules/node-gyp/node_modules/cacache/lib/put.js b/deps/npm/node_modules/node-gyp/node_modules/cacache/lib/put.js
deleted file mode 100644
index 9fc932d5f6dec5..00000000000000
--- a/deps/npm/node_modules/node-gyp/node_modules/cacache/lib/put.js
+++ /dev/null
@@ -1,80 +0,0 @@
-'use strict'
-
-const index = require('./entry-index')
-const memo = require('./memoization')
-const write = require('./content/write')
-const Flush = require('minipass-flush')
-const { PassThrough } = require('minipass-collect')
-const Pipeline = require('minipass-pipeline')
-
-const putOpts = (opts) => ({
- algorithms: ['sha512'],
- ...opts,
-})
-
-module.exports = putData
-
-async function putData (cache, key, data, opts = {}) {
- const { memoize } = opts
- opts = putOpts(opts)
- const res = await write(cache, data, opts)
- const entry = await index.insert(cache, key, res.integrity, { ...opts, size: res.size })
- if (memoize) {
- memo.put(cache, entry, data, opts)
- }
-
- return res.integrity
-}
-
-module.exports.stream = putStream
-
-function putStream (cache, key, opts = {}) {
- const { memoize } = opts
- opts = putOpts(opts)
- let integrity
- let size
- let error
-
- let memoData
- const pipeline = new Pipeline()
- // first item in the pipeline is the memoizer, because we need
- // that to end first and get the collected data.
- if (memoize) {
- const memoizer = new PassThrough().on('collect', data => {
- memoData = data
- })
- pipeline.push(memoizer)
- }
-
- // contentStream is a write-only, not a passthrough
- // no data comes out of it.
- const contentStream = write.stream(cache, opts)
- .on('integrity', (int) => {
- integrity = int
- })
- .on('size', (s) => {
- size = s
- })
- .on('error', (err) => {
- error = err
- })
-
- pipeline.push(contentStream)
-
- // last but not least, we write the index and emit hash and size,
- // and memoize if we're doing that
- pipeline.push(new Flush({
- async flush () {
- if (!error) {
- const entry = await index.insert(cache, key, integrity, { ...opts, size })
- if (memoize && memoData) {
- memo.put(cache, entry, memoData, opts)
- }
- pipeline.emit('integrity', integrity)
- pipeline.emit('size', size)
- }
- },
- }))
-
- return pipeline
-}
diff --git a/deps/npm/node_modules/node-gyp/node_modules/cacache/lib/rm.js b/deps/npm/node_modules/node-gyp/node_modules/cacache/lib/rm.js
deleted file mode 100644
index a94760c7cf2430..00000000000000
--- a/deps/npm/node_modules/node-gyp/node_modules/cacache/lib/rm.js
+++ /dev/null
@@ -1,31 +0,0 @@
-'use strict'
-
-const { rm } = require('fs/promises')
-const glob = require('./util/glob.js')
-const index = require('./entry-index')
-const memo = require('./memoization')
-const path = require('path')
-const rmContent = require('./content/rm')
-
-module.exports = entry
-module.exports.entry = entry
-
-function entry (cache, key, opts) {
- memo.clearMemoized()
- return index.delete(cache, key, opts)
-}
-
-module.exports.content = content
-
-function content (cache, integrity) {
- memo.clearMemoized()
- return rmContent(cache, integrity)
-}
-
-module.exports.all = all
-
-async function all (cache) {
- memo.clearMemoized()
- const paths = await glob(path.join(cache, '*(content-*|index-*)'), { silent: true, nosort: true })
- return Promise.all(paths.map((p) => rm(p, { recursive: true, force: true })))
-}
diff --git a/deps/npm/node_modules/node-gyp/node_modules/cacache/lib/util/glob.js b/deps/npm/node_modules/node-gyp/node_modules/cacache/lib/util/glob.js
deleted file mode 100644
index 8500c1c16a429f..00000000000000
--- a/deps/npm/node_modules/node-gyp/node_modules/cacache/lib/util/glob.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict'
-
-const { glob } = require('glob')
-const path = require('path')
-
-const globify = (pattern) => pattern.split(path.win32.sep).join(path.posix.sep)
-module.exports = (path, options) => glob(globify(path), options)
diff --git a/deps/npm/node_modules/node-gyp/node_modules/cacache/lib/util/hash-to-segments.js b/deps/npm/node_modules/node-gyp/node_modules/cacache/lib/util/hash-to-segments.js
deleted file mode 100644
index 445599b5038088..00000000000000
--- a/deps/npm/node_modules/node-gyp/node_modules/cacache/lib/util/hash-to-segments.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict'
-
-module.exports = hashToSegments
-
-function hashToSegments (hash) {
- return [hash.slice(0, 2), hash.slice(2, 4), hash.slice(4)]
-}
diff --git a/deps/npm/node_modules/node-gyp/node_modules/cacache/lib/util/tmp.js b/deps/npm/node_modules/node-gyp/node_modules/cacache/lib/util/tmp.js
deleted file mode 100644
index 0bf5302136ebeb..00000000000000
--- a/deps/npm/node_modules/node-gyp/node_modules/cacache/lib/util/tmp.js
+++ /dev/null
@@ -1,26 +0,0 @@
-'use strict'
-
-const { withTempDir } = require('@npmcli/fs')
-const fs = require('fs/promises')
-const path = require('path')
-
-module.exports.mkdir = mktmpdir
-
-async function mktmpdir (cache, opts = {}) {
- const { tmpPrefix } = opts
- const tmpDir = path.join(cache, 'tmp')
- await fs.mkdir(tmpDir, { recursive: true, owner: 'inherit' })
- // do not use path.join(), it drops the trailing / if tmpPrefix is unset
- const target = `${tmpDir}${path.sep}${tmpPrefix || ''}`
- return fs.mkdtemp(target, { owner: 'inherit' })
-}
-
-module.exports.withTmp = withTmp
-
-function withTmp (cache, opts, cb) {
- if (!cb) {
- cb = opts
- opts = {}
- }
- return withTempDir(path.join(cache, 'tmp'), cb, opts)
-}
diff --git a/deps/npm/node_modules/node-gyp/node_modules/cacache/lib/verify.js b/deps/npm/node_modules/node-gyp/node_modules/cacache/lib/verify.js
deleted file mode 100644
index 62e85c946490fc..00000000000000
--- a/deps/npm/node_modules/node-gyp/node_modules/cacache/lib/verify.js
+++ /dev/null
@@ -1,257 +0,0 @@
-'use strict'
-
-const {
- mkdir,
- readFile,
- rm,
- stat,
- truncate,
- writeFile,
-} = require('fs/promises')
-const pMap = require('p-map')
-const contentPath = require('./content/path')
-const fsm = require('fs-minipass')
-const glob = require('./util/glob.js')
-const index = require('./entry-index')
-const path = require('path')
-const ssri = require('ssri')
-
-const hasOwnProperty = (obj, key) =>
- Object.prototype.hasOwnProperty.call(obj, key)
-
-const verifyOpts = (opts) => ({
- concurrency: 20,
- log: { silly () {} },
- ...opts,
-})
-
-module.exports = verify
-
-async function verify (cache, opts) {
- opts = verifyOpts(opts)
- opts.log.silly('verify', 'verifying cache at', cache)
-
- const steps = [
- markStartTime,
- fixPerms,
- garbageCollect,
- rebuildIndex,
- cleanTmp,
- writeVerifile,
- markEndTime,
- ]
-
- const stats = {}
- for (const step of steps) {
- const label = step.name
- const start = new Date()
- const s = await step(cache, opts)
- if (s) {
- Object.keys(s).forEach((k) => {
- stats[k] = s[k]
- })
- }
- const end = new Date()
- if (!stats.runTime) {
- stats.runTime = {}
- }
- stats.runTime[label] = end - start
- }
- stats.runTime.total = stats.endTime - stats.startTime
- opts.log.silly(
- 'verify',
- 'verification finished for',
- cache,
- 'in',
- `${stats.runTime.total}ms`
- )
- return stats
-}
-
-async function markStartTime (cache, opts) {
- return { startTime: new Date() }
-}
-
-async function markEndTime (cache, opts) {
- return { endTime: new Date() }
-}
-
-async function fixPerms (cache, opts) {
- opts.log.silly('verify', 'fixing cache permissions')
- await mkdir(cache, { recursive: true })
- return null
-}
-
-// Implements a naive mark-and-sweep tracing garbage collector.
-//
-// The algorithm is basically as follows:
-// 1. Read (and filter) all index entries ("pointers")
-// 2. Mark each integrity value as "live"
-// 3. Read entire filesystem tree in `content-vX/` dir
-// 4. If content is live, verify its checksum and delete it if it fails
-// 5. If content is not marked as live, rm it.
-//
-async function garbageCollect (cache, opts) {
- opts.log.silly('verify', 'garbage collecting content')
- const indexStream = index.lsStream(cache)
- const liveContent = new Set()
- indexStream.on('data', (entry) => {
- if (opts.filter && !opts.filter(entry)) {
- return
- }
-
- // integrity is stringified, re-parse it so we can get each hash
- const integrity = ssri.parse(entry.integrity)
- for (const algo in integrity) {
- liveContent.add(integrity[algo].toString())
- }
- })
- await new Promise((resolve, reject) => {
- indexStream.on('end', resolve).on('error', reject)
- })
- const contentDir = contentPath.contentDir(cache)
- const files = await glob(path.join(contentDir, '**'), {
- follow: false,
- nodir: true,
- nosort: true,
- })
- const stats = {
- verifiedContent: 0,
- reclaimedCount: 0,
- reclaimedSize: 0,
- badContentCount: 0,
- keptSize: 0,
- }
- await pMap(
- files,
- async (f) => {
- const split = f.split(/[/\\]/)
- const digest = split.slice(split.length - 3).join('')
- const algo = split[split.length - 4]
- const integrity = ssri.fromHex(digest, algo)
- if (liveContent.has(integrity.toString())) {
- const info = await verifyContent(f, integrity)
- if (!info.valid) {
- stats.reclaimedCount++
- stats.badContentCount++
- stats.reclaimedSize += info.size
- } else {
- stats.verifiedContent++
- stats.keptSize += info.size
- }
- } else {
- // No entries refer to this content. We can delete.
- stats.reclaimedCount++
- const s = await stat(f)
- await rm(f, { recursive: true, force: true })
- stats.reclaimedSize += s.size
- }
- return stats
- },
- { concurrency: opts.concurrency }
- )
- return stats
-}
-
-async function verifyContent (filepath, sri) {
- const contentInfo = {}
- try {
- const { size } = await stat(filepath)
- contentInfo.size = size
- contentInfo.valid = true
- await ssri.checkStream(new fsm.ReadStream(filepath), sri)
- } catch (err) {
- if (err.code === 'ENOENT') {
- return { size: 0, valid: false }
- }
- if (err.code !== 'EINTEGRITY') {
- throw err
- }
-
- await rm(filepath, { recursive: true, force: true })
- contentInfo.valid = false
- }
- return contentInfo
-}
-
-async function rebuildIndex (cache, opts) {
- opts.log.silly('verify', 'rebuilding index')
- const entries = await index.ls(cache)
- const stats = {
- missingContent: 0,
- rejectedEntries: 0,
- totalEntries: 0,
- }
- const buckets = {}
- for (const k in entries) {
- /* istanbul ignore else */
- if (hasOwnProperty(entries, k)) {
- const hashed = index.hashKey(k)
- const entry = entries[k]
- const excluded = opts.filter && !opts.filter(entry)
- excluded && stats.rejectedEntries++
- if (buckets[hashed] && !excluded) {
- buckets[hashed].push(entry)
- } else if (buckets[hashed] && excluded) {
- // skip
- } else if (excluded) {
- buckets[hashed] = []
- buckets[hashed]._path = index.bucketPath(cache, k)
- } else {
- buckets[hashed] = [entry]
- buckets[hashed]._path = index.bucketPath(cache, k)
- }
- }
- }
- await pMap(
- Object.keys(buckets),
- (key) => {
- return rebuildBucket(cache, buckets[key], stats, opts)
- },
- { concurrency: opts.concurrency }
- )
- return stats
-}
-
-async function rebuildBucket (cache, bucket, stats, opts) {
- await truncate(bucket._path)
- // This needs to be serialized because cacache explicitly
- // lets very racy bucket conflicts clobber each other.
- for (const entry of bucket) {
- const content = contentPath(cache, entry.integrity)
- try {
- await stat(content)
- await index.insert(cache, entry.key, entry.integrity, {
- metadata: entry.metadata,
- size: entry.size,
- time: entry.time,
- })
- stats.totalEntries++
- } catch (err) {
- if (err.code === 'ENOENT') {
- stats.rejectedEntries++
- stats.missingContent++
- } else {
- throw err
- }
- }
- }
-}
-
-function cleanTmp (cache, opts) {
- opts.log.silly('verify', 'cleaning tmp directory')
- return rm(path.join(cache, 'tmp'), { recursive: true, force: true })
-}
-
-async function writeVerifile (cache, opts) {
- const verifile = path.join(cache, '_lastverified')
- opts.log.silly('verify', 'writing verifile to ' + verifile)
- return writeFile(verifile, `${Date.now()}`)
-}
-
-module.exports.lastRun = lastRun
-
-async function lastRun (cache) {
- const data = await readFile(path.join(cache, '_lastverified'), { encoding: 'utf8' })
- return new Date(+data)
-}
diff --git a/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/brace-expansion/LICENSE b/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/brace-expansion/LICENSE
deleted file mode 100644
index de3226673c3874..00000000000000
--- a/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/brace-expansion/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-MIT License
-
-Copyright (c) 2013 Julian Gruber
-
-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:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
diff --git a/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/brace-expansion/index.js b/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/brace-expansion/index.js
deleted file mode 100644
index 668fb1cb9d45a4..00000000000000
--- a/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/brace-expansion/index.js
+++ /dev/null
@@ -1,202 +0,0 @@
-var balanced = require('balanced-match');
-
-module.exports = expandTop;
-
-var escSlash = '\0SLASH'+Math.random()+'\0';
-var escOpen = '\0OPEN'+Math.random()+'\0';
-var escClose = '\0CLOSE'+Math.random()+'\0';
-var escComma = '\0COMMA'+Math.random()+'\0';
-var escPeriod = '\0PERIOD'+Math.random()+'\0';
-
-function numeric(str) {
- return parseInt(str, 10) == str
- ? parseInt(str, 10)
- : str.charCodeAt(0);
-}
-
-function escapeBraces(str) {
- return str.split('\\\\').join(escSlash)
- .split('\\{').join(escOpen)
- .split('\\}').join(escClose)
- .split('\\,').join(escComma)
- .split('\\.').join(escPeriod);
-}
-
-function unescapeBraces(str) {
- return str.split(escSlash).join('\\')
- .split(escOpen).join('{')
- .split(escClose).join('}')
- .split(escComma).join(',')
- .split(escPeriod).join('.');
-}
-
-
-// Basically just str.split(","), but handling cases
-// where we have nested braced sections, which should be
-// treated as individual members, like {a,{b,c},d}
-function parseCommaParts(str) {
- if (!str)
- return [''];
-
- var parts = [];
- var m = balanced('{', '}', str);
-
- if (!m)
- return str.split(',');
-
- var pre = m.pre;
- var body = m.body;
- var post = m.post;
- var p = pre.split(',');
-
- p[p.length-1] += '{' + body + '}';
- var postParts = parseCommaParts(post);
- if (post.length) {
- p[p.length-1] += postParts.shift();
- p.push.apply(p, postParts);
- }
-
- parts.push.apply(parts, p);
-
- return parts;
-}
-
-function expandTop(str) {
- if (!str)
- return [];
-
- // I don't know why Bash 4.3 does this, but it does.
- // Anything starting with {} will have the first two bytes preserved
- // but *only* at the top level, so {},a}b will not expand to anything,
- // but a{},b}c will be expanded to [a}c,abc].
- // One could argue that this is a bug in Bash, but since the goal of
- // this module is to match Bash's rules, we escape a leading {}
- if (str.substr(0, 2) === '{}') {
- str = '\\{\\}' + str.substr(2);
- }
-
- return expand(escapeBraces(str), true).map(unescapeBraces);
-}
-
-function embrace(str) {
- return '{' + str + '}';
-}
-function isPadded(el) {
- return /^-?0\d/.test(el);
-}
-
-function lte(i, y) {
- return i <= y;
-}
-function gte(i, y) {
- return i >= y;
-}
-
-function expand(str, isTop) {
- var expansions = [];
-
- var m = balanced('{', '}', str);
- if (!m) return [str];
-
- // no need to expand pre, since it is guaranteed to be free of brace-sets
- var pre = m.pre;
- var post = m.post.length
- ? expand(m.post, false)
- : [''];
-
- if (/\$$/.test(m.pre)) {
- for (var k = 0; k < post.length; k++) {
- var expansion = pre+ '{' + m.body + '}' + post[k];
- expansions.push(expansion);
- }
- } else {
- var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body);
- var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body);
- var isSequence = isNumericSequence || isAlphaSequence;
- var isOptions = m.body.indexOf(',') >= 0;
- if (!isSequence && !isOptions) {
- // {a},b}
- if (m.post.match(/,.*\}/)) {
- str = m.pre + '{' + m.body + escClose + m.post;
- return expand(str);
- }
- return [str];
- }
-
- var n;
- if (isSequence) {
- n = m.body.split(/\.\./);
- } else {
- n = parseCommaParts(m.body);
- if (n.length === 1) {
- // x{{a,b}}y ==> x{a}y x{b}y
- n = expand(n[0], false).map(embrace);
- if (n.length === 1) {
- return post.map(function(p) {
- return m.pre + n[0] + p;
- });
- }
- }
- }
-
- // at this point, n is the parts, and we know it's not a comma set
- // with a single entry.
- var N;
-
- if (isSequence) {
- var x = numeric(n[0]);
- var y = numeric(n[1]);
- var width = Math.max(n[0].length, n[1].length)
- var incr = n.length == 3
- ? Math.abs(numeric(n[2]))
- : 1;
- var test = lte;
- var reverse = y < x;
- if (reverse) {
- incr *= -1;
- test = gte;
- }
- var pad = n.some(isPadded);
-
- N = [];
-
- for (var i = x; test(i, y); i += incr) {
- var c;
- if (isAlphaSequence) {
- c = String.fromCharCode(i);
- if (c === '\\')
- c = '';
- } else {
- c = String(i);
- if (pad) {
- var need = width - c.length;
- if (need > 0) {
- var z = new Array(need + 1).join('0');
- if (i < 0)
- c = '-' + z + c.slice(1);
- else
- c = z + c;
- }
- }
- }
- N.push(c);
- }
- } else {
- N = [];
-
- for (var j = 0; j < n.length; j++) {
- N.push.apply(N, expand(n[j], false));
- }
- }
-
- for (var j = 0; j < N.length; j++) {
- for (var k = 0; k < post.length; k++) {
- var expansion = pre + N[j] + post[k];
- if (!isTop || isSequence || expansion)
- expansions.push(expansion);
- }
- }
- }
-
- return expansions;
-}
diff --git a/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/brace-expansion/package.json b/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/brace-expansion/package.json
deleted file mode 100644
index 7097d41e39de5d..00000000000000
--- a/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/brace-expansion/package.json
+++ /dev/null
@@ -1,46 +0,0 @@
-{
- "name": "brace-expansion",
- "description": "Brace expansion as known from sh/bash",
- "version": "2.0.1",
- "repository": {
- "type": "git",
- "url": "git://github.com/juliangruber/brace-expansion.git"
- },
- "homepage": "https://github.com/juliangruber/brace-expansion",
- "main": "index.js",
- "scripts": {
- "test": "tape test/*.js",
- "gentest": "bash test/generate.sh",
- "bench": "matcha test/perf/bench.js"
- },
- "dependencies": {
- "balanced-match": "^1.0.0"
- },
- "devDependencies": {
- "@c4312/matcha": "^1.3.1",
- "tape": "^4.6.0"
- },
- "keywords": [],
- "author": {
- "name": "Julian Gruber",
- "email": "mail@juliangruber.com",
- "url": "http://juliangruber.com"
- },
- "license": "MIT",
- "testling": {
- "files": "test/*.js",
- "browsers": [
- "ie/8..latest",
- "firefox/20..latest",
- "firefox/nightly",
- "chrome/25..latest",
- "chrome/canary",
- "opera/12..latest",
- "opera/next",
- "safari/5.1..latest",
- "ipad/6.0..latest",
- "iphone/6.0..latest",
- "android-browser/4.2..latest"
- ]
- }
-}
diff --git a/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob/LICENSE b/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob/LICENSE
deleted file mode 100644
index ec7df93329abf3..00000000000000
--- a/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob/LICENSE
+++ /dev/null
@@ -1,15 +0,0 @@
-The ISC License
-
-Copyright (c) 2009-2023 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.
diff --git a/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob/README.md b/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob/README.md
deleted file mode 100644
index 1bde1494664d4d..00000000000000
--- a/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob/README.md
+++ /dev/null
@@ -1,1214 +0,0 @@
-# Glob
-
-Match files using the patterns the shell uses.
-
-The most correct and second fastest glob implementation in
-JavaScript. (See **Comparison to Other JavaScript Glob
-Implementations** at the bottom of this readme.)
-
-![a fun cartoon logo made of glob characters](https://github.com/isaacs/node-glob/raw/main/logo/glob.png)
-
-## Usage
-
-Install with npm
-
-```
-npm i glob
-```
-
-**Note** the npm package name is _not_ `node-glob` that's a
-different thing that was abandoned years ago. Just `glob`.
-
-```js
-// load using import
-import { glob, globSync, globStream, globStreamSync, Glob } from 'glob'
-// or using commonjs, that's fine, too
-const {
- glob,
- globSync,
- globStream,
- globStreamSync,
- Glob,
-} = require('glob')
-
-// the main glob() and globSync() resolve/return array of filenames
-
-// all js files, but don't look in node_modules
-const jsfiles = await glob('**/*.js', { ignore: 'node_modules/**' })
-
-// pass in a signal to cancel the glob walk
-const stopAfter100ms = await glob('**/*.css', {
- signal: AbortSignal.timeout(100),
-})
-
-// multiple patterns supported as well
-const images = await glob(['css/*.{png,jpeg}', 'public/*.{png,jpeg}'])
-
-// but of course you can do that with the glob pattern also
-// the sync function is the same, just returns a string[] instead
-// of Promise
-const imagesAlt = globSync('{css,public}/*.{png,jpeg}')
-
-// you can also stream them, this is a Minipass stream
-const filesStream = globStream(['**/*.dat', 'logs/**/*.log'])
-
-// construct a Glob object if you wanna do it that way, which
-// allows for much faster walks if you have to look in the same
-// folder multiple times.
-const g = new Glob('**/foo', {})
-// glob objects are async iterators, can also do globIterate() or
-// g.iterate(), same deal
-for await (const file of g) {
- console.log('found a foo file:', file)
-}
-// pass a glob as the glob options to reuse its settings and caches
-const g2 = new Glob('**/bar', g)
-// sync iteration works as well
-for (const file of g2) {
- console.log('found a bar file:', file)
-}
-
-// you can also pass withFileTypes: true to get Path objects
-// these are like a Dirent, but with some more added powers
-// check out http://npm.im/path-scurry for more info on their API
-const g3 = new Glob('**/baz/**', { withFileTypes: true })
-g3.stream().on('data', path => {
- console.log(
- 'got a path object',
- path.fullpath(),
- path.isDirectory(),
- path.readdirSync().map(e => e.name)
- )
-})
-
-// if you use stat:true and withFileTypes, you can sort results
-// by things like modified time, filter by permission mode, etc.
-// All Stats fields will be available in that case. Slightly
-// slower, though.
-// For example:
-const results = await glob('**', { stat: true, withFileTypes: true })
-
-const timeSortedFiles = results
- .sort((a, b) => a.mtimeMS - b.mtimeMS)
- .map(path => path.fullpath())
-
-const groupReadableFiles = results
- .filter(path => path.mode & 0o040)
- .map(path => path.fullpath())
-
-// custom ignores can be done like this, for example by saying
-// you'll ignore all markdown files, and all folders named 'docs'
-const customIgnoreResults = await glob('**', {
- ignore: {
- ignored: p => /\.md$/.test(p.name),
- childrenIgnored: p => p.isNamed('docs'),
- },
-})
-
-// another fun use case, only return files with the same name as
-// their parent folder, plus either `.ts` or `.js`
-const folderNamedModules = await glob('**/*.{ts,js}', {
- ignore: {
- ignored: p => {
- const pp = p.parent
- return !(p.isNamed(pp.name + '.ts') || p.isNamed(pp.name + '.js'))
- },
- },
-})
-
-// find all files edited in the last hour, to do this, we ignore
-// all of them that are more than an hour old
-const newFiles = await glob('**', {
- // need stat so we have mtime
- stat: true,
- // only want the files, not the dirs
- nodir: true,
- ignore: {
- ignored: p => {
- return new Date() - p.mtime > 60 * 60 * 1000
- },
- // could add similar childrenIgnored here as well, but
- // directory mtime is inconsistent across platforms, so
- // probably better not to, unless you know the system
- // tracks this reliably.
- },
-})
-```
-
-**Note** Glob patterns should always use `/` as a path separator,
-even on Windows systems, as `\` is used to escape glob
-characters. If you wish to use `\` as a path separator _instead
-of_ using it as an escape character on Windows platforms, you may
-set `windowsPathsNoEscape:true` in the options. In this mode,
-special glob characters cannot be escaped, making it impossible
-to match a literal `*` `?` and so on in filenames.
-
-## Command Line Interface
-
-```
-$ glob -h
-
-Usage:
- glob [options] [ [ ...]]
-
-Expand the positional glob expression arguments into any matching file system
-paths found.
-
- -c --cmd=
- Run the command provided, passing the glob expression
- matches as arguments.
-
- -A --all By default, the glob cli command will not expand any
- arguments that are an exact match to a file on disk.
-
- This prevents double-expanding, in case the shell
- expands an argument whose filename is a glob
- expression.
-
- For example, if 'app/*.ts' would match 'app/[id].ts',
- then on Windows powershell or cmd.exe, 'glob app/*.ts'
- will expand to 'app/[id].ts', as expected. However, in
- posix shells such as bash or zsh, the shell will first
- expand 'app/*.ts' to a list of filenames. Then glob
- will look for a file matching 'app/[id].ts' (ie,
- 'app/i.ts' or 'app/d.ts'), which is unexpected.
-
- Setting '--all' prevents this behavior, causing glob to
- treat ALL patterns as glob expressions to be expanded,
- even if they are an exact match to a file on disk.
-
- When setting this option, be sure to enquote arguments
- so that the shell will not expand them prior to passing
- them to the glob command process.
-
- -a --absolute Expand to absolute paths
- -d --dot-relative Prepend './' on relative matches
- -m --mark Append a / on any directories matched
- -x --posix Always resolve to posix style paths, using '/' as the
- directory separator, even on Windows. Drive letter
- absolute matches on Windows will be expanded to their
- full resolved UNC maths, eg instead of 'C:\foo\bar', it
- will expand to '//?/C:/foo/bar'.
-
- -f --follow Follow symlinked directories when expanding '**'
- -R --realpath Call 'fs.realpath' on all of the results. In the case
- of an entry that cannot be resolved, the entry is
- omitted. This incurs a slight performance penalty, of
- course, because of the added system calls.
-
- -s --stat Call 'fs.lstat' on all entries, whether required or not
- to determine if it's a valid match.
-
- -b --match-base Perform a basename-only match if the pattern does not
- contain any slash characters. That is, '*.js' would be
- treated as equivalent to '**/*.js', matching js files
- in all directories.
-
- --dot Allow patterns to match files/directories that start
- with '.', even if the pattern does not start with '.'
-
- --nobrace Do not expand {...} patterns
- --nocase Perform a case-insensitive match. This defaults to
- 'true' on macOS and Windows platforms, and false on all
- others.
-
- Note: 'nocase' should only be explicitly set when it is
- known that the filesystem's case sensitivity differs
- from the platform default. If set 'true' on
- case-insensitive file systems, then the walk may return
- more or less results than expected.
-
- --nodir Do not match directories, only files.
-
- Note: to *only* match directories, append a '/' at the
- end of the pattern.
-
- --noext Do not expand extglob patterns, such as '+(a|b)'
- --noglobstar Do not expand '**' against multiple path portions. Ie,
- treat it as a normal '*' instead.
-
- --windows-path-no-escape
- Use '\' as a path separator *only*, and *never* as an
- escape character. If set, all '\' characters are
- replaced with '/' in the pattern.
-
- -D --max-depth= Maximum depth to traverse from the current working
- directory
-
- -C --cwd= Current working directory to execute/match in
- -r --root= A string path resolved against the 'cwd', which is used
- as the starting point for absolute patterns that start
- with '/' (but not drive letters or UNC paths on
- Windows).
-
- Note that this *doesn't* necessarily limit the walk to
- the 'root' directory, and doesn't affect the cwd
- starting point for non-absolute patterns. A pattern
- containing '..' will still be able to traverse out of
- the root directory, if it is not an actual root
- directory on the filesystem, and any non-absolute
- patterns will still be matched in the 'cwd'.
-
- To start absolute and non-absolute patterns in the same
- path, you can use '--root=' to set it to the empty
- string. However, be aware that on Windows systems, a
- pattern like 'x:/*' or '//host/share/*' will *always*
- start in the 'x:/' or '//host/share/' directory,
- regardless of the --root setting.
-
- --platform= Defaults to the value of 'process.platform' if
- available, or 'linux' if not. Setting --platform=win32
- on non-Windows systems may cause strange behavior!
-
- -i --ignore=
- Glob patterns to ignore Can be set multiple times
- -v --debug Output a huge amount of noisy debug information about
- patterns as they are parsed and used to match files.
-
- -h --help Show this usage information
-```
-
-## `glob(pattern: string | string[], options?: GlobOptions) => Promise`
-
-Perform an asynchronous glob search for the pattern(s) specified.
-Returns
-[Path](https://isaacs.github.io/path-scurry/classes/PathBase)
-objects if the `withFileTypes` option is set to `true`. See below
-for full options field desciptions.
-
-## `globSync(pattern: string | string[], options?: GlobOptions) => string[] | Path[]`
-
-Synchronous form of `glob()`.
-
-Alias: `glob.sync()`
-
-## `globIterate(pattern: string | string[], options?: GlobOptions) => AsyncGenerator`
-
-Return an async iterator for walking glob pattern matches.
-
-Alias: `glob.iterate()`
-
-## `globIterateSync(pattern: string | string[], options?: GlobOptions) => Generator`
-
-Return a sync iterator for walking glob pattern matches.
-
-Alias: `glob.iterate.sync()`, `glob.sync.iterate()`
-
-## `globStream(pattern: string | string[], options?: GlobOptions) => Minipass`
-
-Return a stream that emits all the strings or `Path` objects and
-then emits `end` when completed.
-
-Alias: `glob.stream()`
-
-## `globStreamSync(pattern: string | string[], options?: GlobOptions) => Minipass`
-
-Syncronous form of `globStream()`. Will read all the matches as
-fast as you consume them, even all in a single tick if you
-consume them immediately, but will still respond to backpressure
-if they're not consumed immediately.
-
-Alias: `glob.stream.sync()`, `glob.sync.stream()`
-
-## `hasMagic(pattern: string | string[], options?: GlobOptions) => boolean`
-
-Returns `true` if the provided pattern contains any "magic" glob
-characters, given the options provided.
-
-Brace expansion is not considered "magic" unless the
-`magicalBraces` option is set, as brace expansion just turns one
-string into an array of strings. So a pattern like `'x{a,b}y'`
-would return `false`, because `'xay'` and `'xby'` both do not
-contain any magic glob characters, and it's treated the same as
-if you had called it on `['xay', 'xby']`. When
-`magicalBraces:true` is in the options, brace expansion _is_
-treated as a pattern having magic.
-
-## `escape(pattern: string, options?: GlobOptions) => string`
-
-Escape all magic characters in a glob pattern, so that it will
-only ever match literal strings
-
-If the `windowsPathsNoEscape` option is used, then characters are
-escaped by wrapping in `[]`, because a magic character wrapped in
-a character class can only be satisfied by that exact character.
-
-Slashes (and backslashes in `windowsPathsNoEscape` mode) cannot
-be escaped or unescaped.
-
-## `unescape(pattern: string, options?: GlobOptions) => string`
-
-Un-escape a glob string that may contain some escaped characters.
-
-If the `windowsPathsNoEscape` option is used, then square-brace
-escapes are removed, but not backslash escapes. For example, it
-will turn the string `'[*]'` into `*`, but it will not turn
-`'\\*'` into `'*'`, because `\` is a path separator in
-`windowsPathsNoEscape` mode.
-
-When `windowsPathsNoEscape` is not set, then both brace escapes
-and backslash escapes are removed.
-
-Slashes (and backslashes in `windowsPathsNoEscape` mode) cannot
-be escaped or unescaped.
-
-## Class `Glob`
-
-An object that can perform glob pattern traversals.
-
-### `const g = new Glob(pattern: string | string[], options: GlobOptions)`
-
-Options object is required.
-
-See full options descriptions below.
-
-Note that a previous `Glob` object can be passed as the
-`GlobOptions` to another `Glob` instantiation to re-use settings
-and caches with a new pattern.
-
-Traversal functions can be called multiple times to run the walk
-again.
-
-### `g.stream()`
-
-Stream results asynchronously,
-
-### `g.streamSync()`
-
-Stream results synchronously.
-
-### `g.iterate()`
-
-Default async iteration function. Returns an AsyncGenerator that
-iterates over the results.
-
-### `g.iterateSync()`
-
-Default sync iteration function. Returns a Generator that
-iterates over the results.
-
-### `g.walk()`
-
-Returns a Promise that resolves to the results array.
-
-### `g.walkSync()`
-
-Returns a results array.
-
-### Properties
-
-All options are stored as properties on the `Glob` object.
-
-- `opts` The options provided to the constructor.
-- `patterns` An array of parsed immutable `Pattern` objects.
-
-## Options
-
-Exported as `GlobOptions` TypeScript interface. A `GlobOptions`
-object may be provided to any of the exported methods, and must
-be provided to the `Glob` constructor.
-
-All options are optional, boolean, and false by default, unless
-otherwise noted.
-
-All resolved options are added to the Glob object as properties.
-
-If you are running many `glob` operations, you can pass a Glob
-object as the `options` argument to a subsequent operation to
-share the previously loaded cache.
-
-- `cwd` String path or `file://` string or URL object. The
- current working directory in which to search. Defaults to
- `process.cwd()`. See also: "Windows, CWDs, Drive Letters, and
- UNC Paths", below.
-
- This option may be eiher a string path or a `file://` URL
- object or string.
-
-- `root` A string path resolved against the `cwd` option, which
- is used as the starting point for absolute patterns that start
- with `/`, (but not drive letters or UNC paths on Windows).
-
- Note that this _doesn't_ necessarily limit the walk to the
- `root` directory, and doesn't affect the cwd starting point for
- non-absolute patterns. A pattern containing `..` will still be
- able to traverse out of the root directory, if it is not an
- actual root directory on the filesystem, and any non-absolute
- patterns will be matched in the `cwd`. For example, the
- pattern `/../*` with `{root:'/some/path'}` will return all
- files in `/some`, not all files in `/some/path`. The pattern
- `*` with `{root:'/some/path'}` will return all the entries in
- the cwd, not the entries in `/some/path`.
-
- To start absolute and non-absolute patterns in the same
- path, you can use `{root:''}`. However, be aware that on
- Windows systems, a pattern like `x:/*` or `//host/share/*` will
- _always_ start in the `x:/` or `//host/share` directory,
- regardless of the `root` setting.
-
-- `windowsPathsNoEscape` Use `\\` as a path separator _only_, and
- _never_ as an escape character. If set, all `\\` characters are
- replaced with `/` in the pattern.
-
- Note that this makes it **impossible** to match against paths
- containing literal glob pattern characters, but allows matching
- with patterns constructed using `path.join()` and
- `path.resolve()` on Windows platforms, mimicking the (buggy!)
- behavior of Glob v7 and before on Windows. Please use with
- caution, and be mindful of [the caveat below about Windows
- paths](#windows). (For legacy reasons, this is also set if
- `allowWindowsEscape` is set to the exact value `false`.)
-
-- `dot` Include `.dot` files in normal matches and `globstar`
- matches. Note that an explicit dot in a portion of the pattern
- will always match dot files.
-
-- `magicalBraces` Treat brace expansion like `{a,b}` as a "magic"
- pattern. Has no effect if {@link nobrace} is set.
-
- Only has effect on the {@link hasMagic} function, no effect on
- glob pattern matching itself.
-
-- `dotRelative` Prepend all relative path strings with `./` (or
- `.\` on Windows).
-
- Without this option, returned relative paths are "bare", so
- instead of returning `'./foo/bar'`, they are returned as
- `'foo/bar'`.
-
- Relative patterns starting with `'../'` are not prepended with
- `./`, even if this option is set.
-
-- `mark` Add a `/` character to directory matches. Note that this
- requires additional stat calls.
-
-- `nobrace` Do not expand `{a,b}` and `{1..3}` brace sets.
-
-- `noglobstar` Do not match `**` against multiple filenames. (Ie,
- treat it as a normal `*` instead.)
-
-- `noext` Do not match "extglob" patterns such as `+(a|b)`.
-
-- `nocase` Perform a case-insensitive match. This defaults to
- `true` on macOS and Windows systems, and `false` on all others.
-
- **Note** `nocase` should only be explicitly set when it is
- known that the filesystem's case sensitivity differs from the
- platform default. If set `true` on case-sensitive file
- systems, or `false` on case-insensitive file systems, then the
- walk may return more or less results than expected.
-
-- `maxDepth` Specify a number to limit the depth of the directory
- traversal to this many levels below the `cwd`.
-
-- `matchBase` Perform a basename-only match if the pattern does
- not contain any slash characters. That is, `*.js` would be
- treated as equivalent to `**/*.js`, matching all js files in
- all directories.
-
-- `nodir` Do not match directories, only files. (Note: to match
- _only_ directories, put a `/` at the end of the pattern.)
-
-- `stat` Call `lstat()` on all entries, whether required or not
- to determine whether it's a valid match. When used with
- `withFileTypes`, this means that matches will include data such
- as modified time, permissions, and so on. Note that this will
- incur a performance cost due to the added system calls.
-
-- `ignore` string or string[], or an object with `ignore` and
- `ignoreChildren` methods.
-
- If a string or string[] is provided, then this is treated as a
- glob pattern or array of glob patterns to exclude from matches.
- To ignore all children within a directory, as well as the entry
- itself, append `'/**'` to the ignore pattern.
-
- **Note** `ignore` patterns are _always_ in `dot:true` mode,
- regardless of any other settings.
-
- If an object is provided that has `ignored(path)` and/or
- `childrenIgnored(path)` methods, then these methods will be
- called to determine whether any Path is a match or if its
- children should be traversed, respectively.
-
-- `follow` Follow symlinked directories when expanding `**`
- patterns. This can result in a lot of duplicate references in
- the presence of cyclic links, and make performance quite bad.
-
- By default, a `**` in a pattern will follow 1 symbolic link if
- it is not the first item in the pattern, or none if it is the
- first item in the pattern, following the same behavior as Bash.
-
-- `realpath` Set to true to call `fs.realpath` on all of the
- results. In the case of an entry that cannot be resolved, the
- entry is omitted. This incurs a slight performance penalty, of
- course, because of the added system calls.
-
-- `absolute` Set to true to always receive absolute paths for
- matched files. Set to `false` to always receive relative paths
- for matched files.
-
- By default, when this option is not set, absolute paths are
- returned for patterns that are absolute, and otherwise paths
- are returned that are relative to the `cwd` setting.
-
- This does _not_ make an extra system call to get the realpath,
- it only does string path resolution.
-
- `absolute` may not be used along with `withFileTypes`.
-
-- `posix` Set to true to use `/` as the path separator in
- returned results. On posix systems, this has no effect. On
- Windows systems, this will return `/` delimited path results,
- and absolute paths will be returned in their full resolved UNC
- path form, eg insted of `'C:\\foo\\bar'`, it will return
- `//?/C:/foo/bar`.
-
-- `platform` Defaults to value of `process.platform` if
- available, or `'linux'` if not. Setting `platform:'win32'` on
- non-Windows systems may cause strange behavior.
-
-- `withFileTypes` Return [PathScurry](http://npm.im/path-scurry)
- `Path` objects instead of strings. These are similar to a
- NodeJS `Dirent` object, but with additional methods and
- properties.
-
- `withFileTypes` may not be used along with `absolute`.
-
-- `signal` An AbortSignal which will cancel the Glob walk when
- triggered.
-
-- `fs` An override object to pass in custom filesystem methods.
- See [PathScurry docs](http://npm.im/path-scurry) for what can
- be overridden.
-
-- `scurry` A [PathScurry](http://npm.im/path-scurry) object used
- to traverse the file system. If the `nocase` option is set
- explicitly, then any provided `scurry` object must match this
- setting.
-
-## Glob Primer
-
-Much more information about glob pattern expansion can be found
-by running `man bash` and searching for `Pattern Matching`.
-
-"Globs" are the patterns you type when you do stuff like `ls
-*.js` on the command line, or put `build/*` in a `.gitignore`
-file.
-
-Before parsing the path part patterns, braced sections are
-expanded into a set. Braced sections start with `{` and end with
-`}`, with 2 or more comma-delimited sections within. Braced
-sections may contain slash characters, so `a{/b/c,bcd}` would
-expand into `a/b/c` and `abcd`.
-
-The following characters have special magic meaning when used in
-a path portion. With the exception of `**`, none of these match
-path separators (ie, `/` on all platforms, and `\` on Windows).
-
-- `*` Matches 0 or more characters in a single path portion.
- When alone in a path portion, it must match at least 1
- character. If `dot:true` is not specified, then `*` will not
- match against a `.` character at the start of a path portion.
-- `?` Matches 1 character. If `dot:true` is not specified, then
- `?` will not match against a `.` character at the start of a
- path portion.
-- `[...]` Matches a range of characters, similar to a RegExp
- range. If the first character of the range is `!` or `^` then
- it matches any character not in the range. If the first
- character is `]`, then it will be considered the same as `\]`,
- rather than the end of the character class.
-- `!(pattern|pattern|pattern)` Matches anything that does not
- match any of the patterns provided. May _not_ contain `/`
- characters. Similar to `*`, if alone in a path portion, then
- the path portion must have at least one character.
-- `?(pattern|pattern|pattern)` Matches zero or one occurrence of
- the patterns provided. May _not_ contain `/` characters.
-- `+(pattern|pattern|pattern)` Matches one or more occurrences of
- the patterns provided. May _not_ contain `/` characters.
-- `*(a|b|c)` Matches zero or more occurrences of the patterns
- provided. May _not_ contain `/` characters.
-- `@(pattern|pat*|pat?erN)` Matches exactly one of the patterns
- provided. May _not_ contain `/` characters.
-- `**` If a "globstar" is alone in a path portion, then it
- matches zero or more directories and subdirectories searching
- for matches. It does not crawl symlinked directories, unless
- `{follow:true}` is passed in the options object. A pattern
- like `a/b/**` will only match `a/b` if it is a directory.
- Follows 1 symbolic link if not the first item in the pattern,
- or 0 if it is the first item, unless `follow:true` is set, in
- which case it follows all symbolic links.
-
-`[:class:]` patterns are supported by this implementation, but
-`[=c=]` and `[.symbol.]` style class patterns are not.
-
-### Dots
-
-If a file or directory path portion has a `.` as the first
-character, then it will not match any glob pattern unless that
-pattern's corresponding path part also has a `.` as its first
-character.
-
-For example, the pattern `a/.*/c` would match the file at
-`a/.b/c`. However the pattern `a/*/c` would not, because `*` does
-not start with a dot character.
-
-You can make glob treat dots as normal characters by setting
-`dot:true` in the options.
-
-### Basename Matching
-
-If you set `matchBase:true` in the options, and the pattern has
-no slashes in it, then it will seek for any file anywhere in the
-tree with a matching basename. For example, `*.js` would match
-`test/simple/basic.js`.
-
-### Empty Sets
-
-If no matching files are found, then an empty array is returned.
-This differs from the shell, where the pattern itself is
-returned. For example:
-
-```sh
-$ echo a*s*d*f
-a*s*d*f
-```
-
-## Comparisons to other fnmatch/glob implementations
-
-While strict compliance with the existing standards is a
-worthwhile goal, some discrepancies exist between node-glob and
-other implementations, and are intentional.
-
-The double-star character `**` is supported by default, unless
-the `noglobstar` flag is set. This is supported in the manner of
-bsdglob and bash 5, where `**` only has special significance if
-it is the only thing in a path part. That is, `a/**/b` will match
-`a/x/y/b`, but `a/**b` will not.
-
-Note that symlinked directories are not traversed as part of a
-`**`, though their contents may match against subsequent portions
-of the pattern. This prevents infinite loops and duplicates and
-the like. You can force glob to traverse symlinks with `**` by
-setting `{follow:true}` in the options.
-
-There is no equivalent of the `nonull` option. A pattern that
-does not find any matches simply resolves to nothing. (An empty
-array, immediately ended stream, etc.)
-
-If brace expansion is not disabled, then it is performed before
-any other interpretation of the glob pattern. Thus, a pattern
-like `+(a|{b),c)}`, which would not be valid in bash or zsh, is
-expanded **first** into the set of `+(a|b)` and `+(a|c)`, and
-those patterns are checked for validity. Since those two are
-valid, matching proceeds.
-
-The character class patterns `[:class:]` (posix standard named
-classes) style class patterns are supported and unicode-aware,
-but `[=c=]` (locale-specific character collation weight), and
-`[.symbol.]` (collating symbol), are not.
-
-### Repeated Slashes
-
-Unlike Bash and zsh, repeated `/` are always coalesced into a
-single path separator.
-
-### Comments and Negation
-
-Previously, this module let you mark a pattern as a "comment" if
-it started with a `#` character, or a "negated" pattern if it
-started with a `!` character.
-
-These options were deprecated in version 5, and removed in
-version 6.
-
-To specify things that should not match, use the `ignore` option.
-
-## Windows
-
-**Please only use forward-slashes in glob expressions.**
-
-Though windows uses either `/` or `\` as its path separator, only
-`/` characters are used by this glob implementation. You must use
-forward-slashes **only** in glob expressions. Back-slashes will
-always be interpreted as escape characters, not path separators.
-
-Results from absolute patterns such as `/foo/*` are mounted onto
-the root setting using `path.join`. On windows, this will by
-default result in `/foo/*` matching `C:\foo\bar.txt`.
-
-To automatically coerce all `\` characters to `/` in pattern
-strings, **thus making it impossible to escape literal glob
-characters**, you may set the `windowsPathsNoEscape` option to
-`true`.
-
-### Windows, CWDs, Drive Letters, and UNC Paths
-
-On posix systems, when a pattern starts with `/`, any `cwd`
-option is ignored, and the traversal starts at `/`, plus any
-non-magic path portions specified in the pattern.
-
-On Windows systems, the behavior is similar, but the concept of
-an "absolute path" is somewhat more involved.
-
-#### UNC Paths
-
-A UNC path may be used as the start of a pattern on Windows
-platforms. For example, a pattern like: `//?/x:/*` will return
-all file entries in the root of the `x:` drive. A pattern like
-`//ComputerName/Share/*` will return all files in the associated
-share.
-
-UNC path roots are always compared case insensitively.
-
-#### Drive Letters
-
-A pattern starting with a drive letter, like `c:/*`, will search
-in that drive, regardless of any `cwd` option provided.
-
-If the pattern starts with `/`, and is not a UNC path, and there
-is an explicit `cwd` option set with a drive letter, then the
-drive letter in the `cwd` is used as the root of the directory
-traversal.
-
-For example, `glob('/tmp', { cwd: 'c:/any/thing' })` will return
-`['c:/tmp']` as the result.
-
-If an explicit `cwd` option is not provided, and the pattern
-starts with `/`, then the traversal will run on the root of the
-drive provided as the `cwd` option. (That is, it is the result of
-`path.resolve('/')`.)
-
-## Race Conditions
-
-Glob searching, by its very nature, is susceptible to race
-conditions, since it relies on directory walking.
-
-As a result, it is possible that a file that exists when glob
-looks for it may have been deleted or modified by the time it
-returns the result.
-
-By design, this implementation caches all readdir calls that it
-makes, in order to cut down on system overhead. However, this
-also makes it even more susceptible to races, especially if the
-cache object is reused between glob calls.
-
-Users are thus advised not to use a glob result as a guarantee of
-filesystem state in the face of rapid changes. For the vast
-majority of operations, this is never a problem.
-
-### See Also:
-
-- `man sh`
-- `man bash` [Pattern
- Matching](https://www.gnu.org/software/bash/manual/html_node/Pattern-Matching.html)
-- `man 3 fnmatch`
-- `man 5 gitignore`
-- [minimatch documentation](https://github.com/isaacs/minimatch)
-
-## Glob Logo
-
-Glob's logo was created by [Tanya
-Brassie](http://tanyabrassie.com/). Logo files can be found
-[here](https://github.com/isaacs/node-glob/tree/master/logo).
-
-The logo is licensed under a [Creative Commons
-Attribution-ShareAlike 4.0 International
-License](https://creativecommons.org/licenses/by-sa/4.0/).
-
-## Contributing
-
-Any change to behavior (including bugfixes) must come with a
-test.
-
-Patches that fail tests or reduce performance will be rejected.
-
-```sh
-# to run tests
-npm test
-
-# to re-generate test fixtures
-npm run test-regen
-
-# run the benchmarks
-npm run bench
-
-# to profile javascript
-npm run prof
-```
-
-## Comparison to Other JavaScript Glob Implementations
-
-**tl;dr**
-
-- If you want glob matching that is as faithful as possible to
- Bash pattern expansion semantics, and as fast as possible
- within that constraint, _use this module_.
-- If you are reasonably sure that the patterns you will encounter
- are relatively simple, and want the absolutely fastest glob
- matcher out there, _use [fast-glob](http://npm.im/fast-glob)_.
-- If you are reasonably sure that the patterns you will encounter
- are relatively simple, and want the convenience of
- automatically respecting `.gitignore` files, _use
- [globby](http://npm.im/globby)_.
-
-There are some other glob matcher libraries on npm, but these
-three are (in my opinion, as of 2023) the best.
-
----
-
-**full explanation**
-
-Every library reflects a set of opinions and priorities in the
-trade-offs it makes. Other than this library, I can personally
-recommend both [globby](http://npm.im/globby) and
-[fast-glob](http://npm.im/fast-glob), though they differ in their
-benefits and drawbacks.
-
-Both have very nice APIs and are reasonably fast.
-
-`fast-glob` is, as far as I am aware, the fastest glob
-implementation in JavaScript today. However, there are many
-cases where the choices that `fast-glob` makes in pursuit of
-speed mean that its results differ from the results returned by
-Bash and other sh-like shells, which may be surprising.
-
-In my testing, `fast-glob` is around 10-20% faster than this
-module when walking over 200k files nested 4 directories
-deep[1](#fn-webscale). However, there are some inconsistencies
-with Bash matching behavior that this module does not suffer
-from:
-
-- `**` only matches files, not directories
-- `..` path portions are not handled unless they appear at the
- start of the pattern
-- `./!()` will not match any files that _start_ with
- ``, even if they do not match ``. For
- example, `!(9).txt` will not match `9999.txt`.
-- Some brace patterns in the middle of a pattern will result in
- failing to find certain matches.
-- Extglob patterns are allowed to contain `/` characters.
-
-Globby exhibits all of the same pattern semantics as fast-glob,
-(as it is a wrapper around fast-glob) and is slightly slower than
-node-glob (by about 10-20% in the benchmark test set, or in other
-words, anywhere from 20-50% slower than fast-glob). However, it
-adds some API conveniences that may be worth the costs.
-
-- Support for `.gitignore` and other ignore files.
-- Support for negated globs (ie, patterns starting with `!`
- rather than using a separate `ignore` option).
-
-The priority of this module is "correctness" in the sense of
-performing a glob pattern expansion as faithfully as possible to
-the behavior of Bash and other sh-like shells, with as much speed
-as possible.
-
-Note that prior versions of `node-glob` are _not_ on this list.
-Former versions of this module are far too slow for any cases
-where performance matters at all, and were designed with APIs
-that are extremely dated by current JavaScript standards.
-
----
-
-[1]: In the cases where this module
-returns results and `fast-glob` doesn't, it's even faster, of
-course.
-
-![lumpy space princess saying 'oh my GLOB'](https://github.com/isaacs/node-glob/raw/main/oh-my-glob.gif)
-
-### Benchmark Results
-
-First number is time, smaller is better.
-
-Second number is the count of results returned.
-
-```
---- pattern: '**' ---
-~~ sync ~~
-node fast-glob sync 0m0.598s 200364
-node globby sync 0m0.765s 200364
-node current globSync mjs 0m0.683s 222656
-node current glob syncStream 0m0.649s 222656
-~~ async ~~
-node fast-glob async 0m0.350s 200364
-node globby async 0m0.509s 200364
-node current glob async mjs 0m0.463s 222656
-node current glob stream 0m0.411s 222656
-
---- pattern: '**/..' ---
-~~ sync ~~
-node fast-glob sync 0m0.486s 0
-node globby sync 0m0.769s 200364
-node current globSync mjs 0m0.564s 2242
-node current glob syncStream 0m0.583s 2242
-~~ async ~~
-node fast-glob async 0m0.283s 0
-node globby async 0m0.512s 200364
-node current glob async mjs 0m0.299s 2242
-node current glob stream 0m0.312s 2242
-
---- pattern: './**/0/**/0/**/0/**/0/**/*.txt' ---
-~~ sync ~~
-node fast-glob sync 0m0.490s 10
-node globby sync 0m0.517s 10
-node current globSync mjs 0m0.540s 10
-node current glob syncStream 0m0.550s 10
-~~ async ~~
-node fast-glob async 0m0.290s 10
-node globby async 0m0.296s 10
-node current glob async mjs 0m0.278s 10
-node current glob stream 0m0.302s 10
-
---- pattern: './**/[01]/**/[12]/**/[23]/**/[45]/**/*.txt' ---
-~~ sync ~~
-node fast-glob sync 0m0.500s 160
-node globby sync 0m0.528s 160
-node current globSync mjs 0m0.556s 160
-node current glob syncStream 0m0.573s 160
-~~ async ~~
-node fast-glob async 0m0.283s 160
-node globby async 0m0.301s 160
-node current glob async mjs 0m0.306s 160
-node current glob stream 0m0.322s 160
-
---- pattern: './**/0/**/0/**/*.txt' ---
-~~ sync ~~
-node fast-glob sync 0m0.502s 5230
-node globby sync 0m0.527s 5230
-node current globSync mjs 0m0.544s 5230
-node current glob syncStream 0m0.557s 5230
-~~ async ~~
-node fast-glob async 0m0.285s 5230
-node globby async 0m0.305s 5230
-node current glob async mjs 0m0.304s 5230
-node current glob stream 0m0.310s 5230
-
---- pattern: '**/*.txt' ---
-~~ sync ~~
-node fast-glob sync 0m0.580s 200023
-node globby sync 0m0.771s 200023
-node current globSync mjs 0m0.685s 200023
-node current glob syncStream 0m0.649s 200023
-~~ async ~~
-node fast-glob async 0m0.349s 200023
-node globby async 0m0.509s 200023
-node current glob async mjs 0m0.427s 200023
-node current glob stream 0m0.388s 200023
-
---- pattern: '{**/*.txt,**/?/**/*.txt,**/?/**/?/**/*.txt,**/?/**/?/**/?/**/*.txt,**/?/**/?/**/?/**/?/**/*.txt}' ---
-~~ sync ~~
-node fast-glob sync 0m0.589s 200023
-node globby sync 0m0.771s 200023
-node current globSync mjs 0m0.716s 200023
-node current glob syncStream 0m0.684s 200023
-~~ async ~~
-node fast-glob async 0m0.351s 200023
-node globby async 0m0.518s 200023
-node current glob async mjs 0m0.462s 200023
-node current glob stream 0m0.468s 200023
-
---- pattern: '**/5555/0000/*.txt' ---
-~~ sync ~~
-node fast-glob sync 0m0.496s 1000
-node globby sync 0m0.519s 1000
-node current globSync mjs 0m0.539s 1000
-node current glob syncStream 0m0.567s 1000
-~~ async ~~
-node fast-glob async 0m0.285s 1000
-node globby async 0m0.299s 1000
-node current glob async mjs 0m0.305s 1000
-node current glob stream 0m0.301s 1000
-
---- pattern: './**/0/**/../[01]/**/0/../**/0/*.txt' ---
-~~ sync ~~
-node fast-glob sync 0m0.484s 0
-node globby sync 0m0.507s 0
-node current globSync mjs 0m0.577s 4880
-node current glob syncStream 0m0.586s 4880
-~~ async ~~
-node fast-glob async 0m0.280s 0
-node globby async 0m0.298s 0
-node current glob async mjs 0m0.327s 4880
-node current glob stream 0m0.324s 4880
-
---- pattern: '**/????/????/????/????/*.txt' ---
-~~ sync ~~
-node fast-glob sync 0m0.547s 100000
-node globby sync 0m0.673s 100000
-node current globSync mjs 0m0.626s 100000
-node current glob syncStream 0m0.618s 100000
-~~ async ~~
-node fast-glob async 0m0.315s 100000
-node globby async 0m0.414s 100000
-node current glob async mjs 0m0.366s 100000
-node current glob stream 0m0.345s 100000
-
---- pattern: './{**/?{/**/?{/**/?{/**/?,,,,},,,,},,,,},,,}/**/*.txt' ---
-~~ sync ~~
-node fast-glob sync 0m0.588s 100000
-node globby sync 0m0.670s 100000
-node current globSync mjs 0m0.717s 200023
-node current glob syncStream 0m0.687s 200023
-~~ async ~~
-node fast-glob async 0m0.343s 100000
-node globby async 0m0.418s 100000
-node current glob async mjs 0m0.519s 200023
-node current glob stream 0m0.451s 200023
-
---- pattern: '**/!(0|9).txt' ---
-~~ sync ~~
-node fast-glob sync 0m0.573s 160023
-node globby sync 0m0.731s 160023
-node current globSync mjs 0m0.680s 180023
-node current glob syncStream 0m0.659s 180023
-~~ async ~~
-node fast-glob async 0m0.345s 160023
-node globby async 0m0.476s 160023
-node current glob async mjs 0m0.427s 180023
-node current glob stream 0m0.388s 180023
-
---- pattern: './{*/**/../{*/**/../{*/**/../{*/**/../{*/**,,,,},,,,},,,,},,,,},,,,}/*.txt' ---
-~~ sync ~~
-node fast-glob sync 0m0.483s 0
-node globby sync 0m0.512s 0
-node current globSync mjs 0m0.811s 200023
-node current glob syncStream 0m0.773s 200023
-~~ async ~~
-node fast-glob async 0m0.280s 0
-node globby async 0m0.299s 0
-node current glob async mjs 0m0.617s 200023
-node current glob stream 0m0.568s 200023
-
---- pattern: './*/**/../*/**/../*/**/../*/**/../*/**/../*/**/../*/**/../*/**/*.txt' ---
-~~ sync ~~
-node fast-glob sync 0m0.485s 0
-node globby sync 0m0.507s 0
-node current globSync mjs 0m0.759s 200023
-node current glob syncStream 0m0.740s 200023
-~~ async ~~
-node fast-glob async 0m0.281s 0
-node globby async 0m0.297s 0
-node current glob async mjs 0m0.544s 200023
-node current glob stream 0m0.464s 200023
-
---- pattern: './*/**/../*/**/../*/**/../*/**/../*/**/*.txt' ---
-~~ sync ~~
-node fast-glob sync 0m0.486s 0
-node globby sync 0m0.513s 0
-node current globSync mjs 0m0.734s 200023
-node current glob syncStream 0m0.696s 200023
-~~ async ~~
-node fast-glob async 0m0.286s 0
-node globby async 0m0.296s 0
-node current glob async mjs 0m0.506s 200023
-node current glob stream 0m0.483s 200023
-
---- pattern: './0/**/../1/**/../2/**/../3/**/../4/**/../5/**/../6/**/../7/**/*.txt' ---
-~~ sync ~~
-node fast-glob sync 0m0.060s 0
-node globby sync 0m0.074s 0
-node current globSync mjs 0m0.067s 0
-node current glob syncStream 0m0.066s 0
-~~ async ~~
-node fast-glob async 0m0.060s 0
-node globby async 0m0.075s 0
-node current glob async mjs 0m0.066s 0
-node current glob stream 0m0.067s 0
-
---- pattern: './**/?/**/?/**/?/**/?/**/*.txt' ---
-~~ sync ~~
-node fast-glob sync 0m0.568s 100000
-node globby sync 0m0.651s 100000
-node current globSync mjs 0m0.619s 100000
-node current glob syncStream 0m0.617s 100000
-~~ async ~~
-node fast-glob async 0m0.332s 100000
-node globby async 0m0.409s 100000
-node current glob async mjs 0m0.372s 100000
-node current glob stream 0m0.351s 100000
-
---- pattern: '**/*/**/*/**/*/**/*/**' ---
-~~ sync ~~
-node fast-glob sync 0m0.603s 200113
-node globby sync 0m0.798s 200113
-node current globSync mjs 0m0.730s 222137
-node current glob syncStream 0m0.693s 222137
-~~ async ~~
-node fast-glob async 0m0.356s 200113
-node globby async 0m0.525s 200113
-node current glob async mjs 0m0.508s 222137
-node current glob stream 0m0.455s 222137
-
---- pattern: './**/*/**/*/**/*/**/*/**/*.txt' ---
-~~ sync ~~
-node fast-glob sync 0m0.622s 200000
-node globby sync 0m0.792s 200000
-node current globSync mjs 0m0.722s 200000
-node current glob syncStream 0m0.695s 200000
-~~ async ~~
-node fast-glob async 0m0.369s 200000
-node globby async 0m0.527s 200000
-node current glob async mjs 0m0.502s 200000
-node current glob stream 0m0.481s 200000
-
---- pattern: '**/*.txt' ---
-~~ sync ~~
-node fast-glob sync 0m0.588s 200023
-node globby sync 0m0.771s 200023
-node current globSync mjs 0m0.684s 200023
-node current glob syncStream 0m0.658s 200023
-~~ async ~~
-node fast-glob async 0m0.352s 200023
-node globby async 0m0.516s 200023
-node current glob async mjs 0m0.432s 200023
-node current glob stream 0m0.384s 200023
-
---- pattern: './**/**/**/**/**/**/**/**/*.txt' ---
-~~ sync ~~
-node fast-glob sync 0m0.589s 200023
-node globby sync 0m0.766s 200023
-node current globSync mjs 0m0.682s 200023
-node current glob syncStream 0m0.652s 200023
-~~ async ~~
-node fast-glob async 0m0.352s 200023
-node globby async 0m0.523s 200023
-node current glob async mjs 0m0.436s 200023
-node current glob stream 0m0.380s 200023
-
---- pattern: '**/*/*.txt' ---
-~~ sync ~~
-node fast-glob sync 0m0.592s 200023
-node globby sync 0m0.776s 200023
-node current globSync mjs 0m0.691s 200023
-node current glob syncStream 0m0.659s 200023
-~~ async ~~
-node fast-glob async 0m0.357s 200023
-node globby async 0m0.513s 200023
-node current glob async mjs 0m0.471s 200023
-node current glob stream 0m0.424s 200023
-
---- pattern: '**/*/**/*.txt' ---
-~~ sync ~~
-node fast-glob sync 0m0.585s 200023
-node globby sync 0m0.766s 200023
-node current globSync mjs 0m0.694s 200023
-node current glob syncStream 0m0.664s 200023
-~~ async ~~
-node fast-glob async 0m0.350s 200023
-node globby async 0m0.514s 200023
-node current glob async mjs 0m0.472s 200023
-node current glob stream 0m0.424s 200023
-
---- pattern: '**/[0-9]/**/*.txt' ---
-~~ sync ~~
-node fast-glob sync 0m0.544s 100000
-node globby sync 0m0.636s 100000
-node current globSync mjs 0m0.626s 100000
-node current glob syncStream 0m0.621s 100000
-~~ async ~~
-node fast-glob async 0m0.322s 100000
-node globby async 0m0.404s 100000
-node current glob async mjs 0m0.360s 100000
-node current glob stream 0m0.352s 100000
-```
diff --git a/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob/dist/cjs/package.json b/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob/dist/cjs/package.json
deleted file mode 100644
index c15df94a3582bf..00000000000000
--- a/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob/dist/cjs/package.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "version": "10.3.3",
- "type": "commonjs"
-}
diff --git a/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob/dist/cjs/src/bin.d.ts b/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob/dist/cjs/src/bin.d.ts
deleted file mode 100644
index 34e005228653c8..00000000000000
--- a/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob/dist/cjs/src/bin.d.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/env node
-export {};
-//# sourceMappingURL=bin.d.ts.map
\ No newline at end of file
diff --git a/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob/dist/cjs/src/bin.d.ts.map b/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob/dist/cjs/src/bin.d.ts.map
deleted file mode 100644
index c10c656ec75109..00000000000000
--- a/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob/dist/cjs/src/bin.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"bin.d.ts","sourceRoot":"","sources":["../../../src/bin.ts"],"names":[],"mappings":""}
\ No newline at end of file
diff --git a/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob/dist/cjs/src/bin.js b/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob/dist/cjs/src/bin.js
deleted file mode 100755
index 4a8a88f2734d2e..00000000000000
--- a/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob/dist/cjs/src/bin.js
+++ /dev/null
@@ -1,270 +0,0 @@
-#!/usr/bin/env node
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-const foreground_child_1 = require("foreground-child");
-const fs_1 = require("fs");
-const jackspeak_1 = require("jackspeak");
-const package_json_1 = require("../package.json");
-const index_js_1 = require("./index.js");
-const j = (0, jackspeak_1.jack)({
- usage: 'glob [options] [ [ ...]]',
-})
- .description(`
- Glob v${package_json_1.version}
-
- Expand the positional glob expression arguments into any matching file
- system paths found.
- `)
- .opt({
- cmd: {
- short: 'c',
- hint: 'command',
- description: `Run the command provided, passing the glob expression
- matches as arguments.`,
- },
-})
- .opt({
- default: {
- short: 'p',
- hint: 'pattern',
- description: `If no positional arguments are provided, glob will use
- this pattern`,
- },
-})
- .flag({
- all: {
- short: 'A',
- description: `By default, the glob cli command will not expand any
- arguments that are an exact match to a file on disk.
-
- This prevents double-expanding, in case the shell expands
- an argument whose filename is a glob expression.
-
- For example, if 'app/*.ts' would match 'app/[id].ts', then
- on Windows powershell or cmd.exe, 'glob app/*.ts' will
- expand to 'app/[id].ts', as expected. However, in posix
- shells such as bash or zsh, the shell will first expand
- 'app/*.ts' to a list of filenames. Then glob will look
- for a file matching 'app/[id].ts' (ie, 'app/i.ts' or
- 'app/d.ts'), which is unexpected.
-
- Setting '--all' prevents this behavior, causing glob
- to treat ALL patterns as glob expressions to be expanded,
- even if they are an exact match to a file on disk.
-
- When setting this option, be sure to enquote arguments
- so that the shell will not expand them prior to passing
- them to the glob command process.
- `,
- },
- absolute: {
- short: 'a',
- description: 'Expand to absolute paths',
- },
- 'dot-relative': {
- short: 'd',
- description: `Prepend './' on relative matches`,
- },
- mark: {
- short: 'm',
- description: `Append a / on any directories matched`,
- },
- posix: {
- short: 'x',
- description: `Always resolve to posix style paths, using '/' as the
- directory separator, even on Windows. Drive letter
- absolute matches on Windows will be expanded to their
- full resolved UNC maths, eg instead of 'C:\\foo\\bar',
- it will expand to '//?/C:/foo/bar'.
- `,
- },
- follow: {
- short: 'f',
- description: `Follow symlinked directories when expanding '**'`,
- },
- realpath: {
- short: 'R',
- description: `Call 'fs.realpath' on all of the results. In the case
- of an entry that cannot be resolved, the entry is
- omitted. This incurs a slight performance penalty, of
- course, because of the added system calls.`,
- },
- stat: {
- short: 's',
- description: `Call 'fs.lstat' on all entries, whether required or not
- to determine if it's a valid match.`,
- },
- 'match-base': {
- short: 'b',
- description: `Perform a basename-only match if the pattern does not
- contain any slash characters. That is, '*.js' would be
- treated as equivalent to '**/*.js', matching js files
- in all directories.
- `,
- },
- dot: {
- description: `Allow patterns to match files/directories that start
- with '.', even if the pattern does not start with '.'
- `,
- },
- nobrace: {
- description: 'Do not expand {...} patterns',
- },
- nocase: {
- description: `Perform a case-insensitive match. This defaults to
- 'true' on macOS and Windows platforms, and false on
- all others.
-
- Note: 'nocase' should only be explicitly set when it is
- known that the filesystem's case sensitivity differs
- from the platform default. If set 'true' on
- case-insensitive file systems, then the walk may return
- more or less results than expected.
- `,
- },
- nodir: {
- description: `Do not match directories, only files.
-
- Note: to *only* match directories, append a '/' at the
- end of the pattern.
- `,
- },
- noext: {
- description: `Do not expand extglob patterns, such as '+(a|b)'`,
- },
- noglobstar: {
- description: `Do not expand '**' against multiple path portions.
- Ie, treat it as a normal '*' instead.`,
- },
- 'windows-path-no-escape': {
- description: `Use '\\' as a path separator *only*, and *never* as an
- escape character. If set, all '\\' characters are
- replaced with '/' in the pattern.`,
- },
-})
- .num({
- 'max-depth': {
- short: 'D',
- description: `Maximum depth to traverse from the current
- working directory`,
- },
-})
- .opt({
- cwd: {
- short: 'C',
- description: 'Current working directory to execute/match in',
- default: process.cwd(),
- },
- root: {
- short: 'r',
- description: `A string path resolved against the 'cwd', which is
- used as the starting point for absolute patterns that
- start with '/' (but not drive letters or UNC paths
- on Windows).
-
- Note that this *doesn't* necessarily limit the walk to
- the 'root' directory, and doesn't affect the cwd
- starting point for non-absolute patterns. A pattern
- containing '..' will still be able to traverse out of
- the root directory, if it is not an actual root directory
- on the filesystem, and any non-absolute patterns will
- still be matched in the 'cwd'.
-
- To start absolute and non-absolute patterns in the same
- path, you can use '--root=' to set it to the empty
- string. However, be aware that on Windows systems, a
- pattern like 'x:/*' or '//host/share/*' will *always*
- start in the 'x:/' or '//host/share/' directory,
- regardless of the --root setting.
- `,
- },
- platform: {
- description: `Defaults to the value of 'process.platform' if
- available, or 'linux' if not. Setting --platform=win32
- on non-Windows systems may cause strange behavior!`,
- validate: v => new Set([
- 'aix',
- 'android',
- 'darwin',
- 'freebsd',
- 'haiku',
- 'linux',
- 'openbsd',
- 'sunos',
- 'win32',
- 'cygwin',
- 'netbsd',
- ]).has(v),
- },
-})
- .optList({
- ignore: {
- short: 'i',
- description: `Glob patterns to ignore`,
- },
-})
- .flag({
- debug: {
- short: 'v',
- description: `Output a huge amount of noisy debug information about
- patterns as they are parsed and used to match files.`,
- },
-})
- .flag({
- help: {
- short: 'h',
- description: 'Show this usage information',
- },
-});
-try {
- const { positionals, values } = j.parse();
- if (values.help) {
- console.log(j.usage());
- process.exit(0);
- }
- if (positionals.length === 0 && !values.default)
- throw 'No patterns provided';
- if (positionals.length === 0 && values.default)
- positionals.push(values.default);
- const patterns = values.all
- ? positionals
- : positionals.filter(p => !(0, fs_1.existsSync)(p));
- const matches = values.all ? [] : positionals.filter(p => (0, fs_1.existsSync)(p));
- const stream = (0, index_js_1.globStream)(patterns, {
- absolute: values.absolute,
- cwd: values.cwd,
- dot: values.dot,
- dotRelative: values['dot-relative'],
- follow: values.follow,
- ignore: values.ignore,
- mark: values.mark,
- matchBase: values['match-base'],
- maxDepth: values['max-depth'],
- nobrace: values.nobrace,
- nocase: values.nocase,
- nodir: values.nodir,
- noext: values.noext,
- noglobstar: values.noglobstar,
- platform: values.platform,
- realpath: values.realpath,
- root: values.root,
- stat: values.stat,
- debug: values.debug,
- posix: values.posix,
- });
- const cmd = values.cmd;
- if (!cmd) {
- matches.forEach(m => console.log(m));
- stream.on('data', f => console.log(f));
- }
- else {
- stream.on('data', f => matches.push(f));
- stream.on('end', () => (0, foreground_child_1.foregroundChild)(cmd, matches, { shell: true }));
- }
-}
-catch (e) {
- console.error(j.usage());
- console.error(e instanceof Error ? e.message : String(e));
- process.exit(1);
-}
-//# sourceMappingURL=bin.js.map
\ No newline at end of file
diff --git a/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob/dist/cjs/src/bin.js.map b/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob/dist/cjs/src/bin.js.map
deleted file mode 100644
index e189acfd01b1a7..00000000000000
--- a/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob/dist/cjs/src/bin.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"bin.js","sourceRoot":"","sources":["../../../src/bin.ts"],"names":[],"mappings":"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","sourcesContent":["#!/usr/bin/env node\nimport { foregroundChild } from 'foreground-child'\nimport { existsSync } from 'fs'\nimport { jack } from 'jackspeak'\nimport { version } from '../package.json'\nimport { globStream } from './index.js'\n\nconst j = jack({\n usage: 'glob [options] [ [ ...]]',\n})\n .description(\n `\n Glob v${version}\n\n Expand the positional glob expression arguments into any matching file\n system paths found.\n `\n )\n .opt({\n cmd: {\n short: 'c',\n hint: 'command',\n description: `Run the command provided, passing the glob expression\n matches as arguments.`,\n },\n })\n .opt({\n default: {\n short: 'p',\n hint: 'pattern',\n description: `If no positional arguments are provided, glob will use\n this pattern`,\n },\n })\n .flag({\n all: {\n short: 'A',\n description: `By default, the glob cli command will not expand any\n arguments that are an exact match to a file on disk.\n\n This prevents double-expanding, in case the shell expands\n an argument whose filename is a glob expression.\n\n For example, if 'app/*.ts' would match 'app/[id].ts', then\n on Windows powershell or cmd.exe, 'glob app/*.ts' will\n expand to 'app/[id].ts', as expected. However, in posix\n shells such as bash or zsh, the shell will first expand\n 'app/*.ts' to a list of filenames. Then glob will look\n for a file matching 'app/[id].ts' (ie, 'app/i.ts' or\n 'app/d.ts'), which is unexpected.\n\n Setting '--all' prevents this behavior, causing glob\n to treat ALL patterns as glob expressions to be expanded,\n even if they are an exact match to a file on disk.\n\n When setting this option, be sure to enquote arguments\n so that the shell will not expand them prior to passing\n them to the glob command process.\n `,\n },\n absolute: {\n short: 'a',\n description: 'Expand to absolute paths',\n },\n 'dot-relative': {\n short: 'd',\n description: `Prepend './' on relative matches`,\n },\n mark: {\n short: 'm',\n description: `Append a / on any directories matched`,\n },\n posix: {\n short: 'x',\n description: `Always resolve to posix style paths, using '/' as the\n directory separator, even on Windows. Drive letter\n absolute matches on Windows will be expanded to their\n full resolved UNC maths, eg instead of 'C:\\\\foo\\\\bar',\n it will expand to '//?/C:/foo/bar'.\n `,\n },\n\n follow: {\n short: 'f',\n description: `Follow symlinked directories when expanding '**'`,\n },\n realpath: {\n short: 'R',\n description: `Call 'fs.realpath' on all of the results. In the case\n of an entry that cannot be resolved, the entry is\n omitted. This incurs a slight performance penalty, of\n course, because of the added system calls.`,\n },\n stat: {\n short: 's',\n description: `Call 'fs.lstat' on all entries, whether required or not\n to determine if it's a valid match.`,\n },\n 'match-base': {\n short: 'b',\n description: `Perform a basename-only match if the pattern does not\n contain any slash characters. That is, '*.js' would be\n treated as equivalent to '**/*.js', matching js files\n in all directories.\n `,\n },\n\n dot: {\n description: `Allow patterns to match files/directories that start\n with '.', even if the pattern does not start with '.'\n `,\n },\n nobrace: {\n description: 'Do not expand {...} patterns',\n },\n nocase: {\n description: `Perform a case-insensitive match. This defaults to\n 'true' on macOS and Windows platforms, and false on\n all others.\n\n Note: 'nocase' should only be explicitly set when it is\n known that the filesystem's case sensitivity differs\n from the platform default. If set 'true' on\n case-insensitive file systems, then the walk may return\n more or less results than expected.\n `,\n },\n nodir: {\n description: `Do not match directories, only files.\n\n Note: to *only* match directories, append a '/' at the\n end of the pattern.\n `,\n },\n noext: {\n description: `Do not expand extglob patterns, such as '+(a|b)'`,\n },\n noglobstar: {\n description: `Do not expand '**' against multiple path portions.\n Ie, treat it as a normal '*' instead.`,\n },\n 'windows-path-no-escape': {\n description: `Use '\\\\' as a path separator *only*, and *never* as an\n escape character. If set, all '\\\\' characters are\n replaced with '/' in the pattern.`,\n },\n })\n .num({\n 'max-depth': {\n short: 'D',\n description: `Maximum depth to traverse from the current\n working directory`,\n },\n })\n .opt({\n cwd: {\n short: 'C',\n description: 'Current working directory to execute/match in',\n default: process.cwd(),\n },\n root: {\n short: 'r',\n description: `A string path resolved against the 'cwd', which is\n used as the starting point for absolute patterns that\n start with '/' (but not drive letters or UNC paths\n on Windows).\n\n Note that this *doesn't* necessarily limit the walk to\n the 'root' directory, and doesn't affect the cwd\n starting point for non-absolute patterns. A pattern\n containing '..' will still be able to traverse out of\n the root directory, if it is not an actual root directory\n on the filesystem, and any non-absolute patterns will\n still be matched in the 'cwd'.\n\n To start absolute and non-absolute patterns in the same\n path, you can use '--root=' to set it to the empty\n string. However, be aware that on Windows systems, a\n pattern like 'x:/*' or '//host/share/*' will *always*\n start in the 'x:/' or '//host/share/' directory,\n regardless of the --root setting.\n `,\n },\n platform: {\n description: `Defaults to the value of 'process.platform' if\n available, or 'linux' if not. Setting --platform=win32\n on non-Windows systems may cause strange behavior!`,\n validate: v =>\n new Set([\n 'aix',\n 'android',\n 'darwin',\n 'freebsd',\n 'haiku',\n 'linux',\n 'openbsd',\n 'sunos',\n 'win32',\n 'cygwin',\n 'netbsd',\n ]).has(v),\n },\n })\n .optList({\n ignore: {\n short: 'i',\n description: `Glob patterns to ignore`,\n },\n })\n .flag({\n debug: {\n short: 'v',\n description: `Output a huge amount of noisy debug information about\n patterns as they are parsed and used to match files.`,\n },\n })\n .flag({\n help: {\n short: 'h',\n description: 'Show this usage information',\n },\n })\n\ntry {\n const { positionals, values } = j.parse()\n if (values.help) {\n console.log(j.usage())\n process.exit(0)\n }\n if (positionals.length === 0 && !values.default)\n throw 'No patterns provided'\n if (positionals.length === 0 && values.default)\n positionals.push(values.default)\n const patterns = values.all\n ? positionals\n : positionals.filter(p => !existsSync(p))\n const matches = values.all ? [] : positionals.filter(p => existsSync(p))\n const stream = globStream(patterns, {\n absolute: values.absolute,\n cwd: values.cwd,\n dot: values.dot,\n dotRelative: values['dot-relative'],\n follow: values.follow,\n ignore: values.ignore,\n mark: values.mark,\n matchBase: values['match-base'],\n maxDepth: values['max-depth'],\n nobrace: values.nobrace,\n nocase: values.nocase,\n nodir: values.nodir,\n noext: values.noext,\n noglobstar: values.noglobstar,\n platform: values.platform as undefined | NodeJS.Platform,\n realpath: values.realpath,\n root: values.root,\n stat: values.stat,\n debug: values.debug,\n posix: values.posix,\n })\n\n const cmd = values.cmd\n if (!cmd) {\n matches.forEach(m => console.log(m))\n stream.on('data', f => console.log(f))\n } else {\n stream.on('data', f => matches.push(f))\n stream.on('end', () => foregroundChild(cmd, matches, { shell: true }))\n }\n} catch (e) {\n console.error(j.usage())\n console.error(e instanceof Error ? e.message : String(e))\n process.exit(1)\n}\n"]}
\ No newline at end of file
diff --git a/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob/dist/cjs/src/glob.d.ts b/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob/dist/cjs/src/glob.d.ts
deleted file mode 100644
index a8b3da7722b652..00000000000000
--- a/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob/dist/cjs/src/glob.d.ts
+++ /dev/null
@@ -1,344 +0,0 @@
-///
-import { Minimatch } from 'minimatch';
-import { Minipass } from 'minipass';
-import { FSOption, Path, PathScurry } from 'path-scurry';
-import { IgnoreLike } from './ignore.js';
-import { Pattern } from './pattern.js';
-export type MatchSet = Minimatch['set'];
-export type GlobParts = Exclude;
-/**
- * A `GlobOptions` object may be provided to any of the exported methods, and
- * must be provided to the `Glob` constructor.
- *
- * All options are optional, boolean, and false by default, unless otherwise
- * noted.
- *
- * All resolved options are added to the Glob object as properties.
- *
- * If you are running many `glob` operations, you can pass a Glob object as the
- * `options` argument to a subsequent operation to share the previously loaded
- * cache.
- */
-export interface GlobOptions {
- /**
- * Set to `true` to always receive absolute paths for
- * matched files. Set to `false` to always return relative paths.
- *
- * When this option is not set, absolute paths are returned for patterns
- * that are absolute, and otherwise paths are returned that are relative
- * to the `cwd` setting.
- *
- * This does _not_ make an extra system call to get
- * the realpath, it only does string path resolution.
- *
- * Conflicts with {@link withFileTypes}
- */
- absolute?: boolean;
- /**
- * Set to false to enable {@link windowsPathsNoEscape}
- *
- * @deprecated
- */
- allowWindowsEscape?: boolean;
- /**
- * The current working directory in which to search. Defaults to
- * `process.cwd()`.
- *
- * May be eiher a string path or a `file://` URL object or string.
- */
- cwd?: string | URL;
- /**
- * Include `.dot` files in normal matches and `globstar`
- * matches. Note that an explicit dot in a portion of the pattern
- * will always match dot files.
- */
- dot?: boolean;
- /**
- * Prepend all relative path strings with `./` (or `.\` on Windows).
- *
- * Without this option, returned relative paths are "bare", so instead of
- * returning `'./foo/bar'`, they are returned as `'foo/bar'`.
- *
- * Relative patterns starting with `'../'` are not prepended with `./`, even
- * if this option is set.
- */
- dotRelative?: boolean;
- /**
- * Follow symlinked directories when expanding `**`
- * patterns. This can result in a lot of duplicate references in
- * the presence of cyclic links, and make performance quite bad.
- *
- * By default, a `**` in a pattern will follow 1 symbolic link if
- * it is not the first item in the pattern, or none if it is the
- * first item in the pattern, following the same behavior as Bash.
- */
- follow?: boolean;
- /**
- * string or string[], or an object with `ignore` and `ignoreChildren`
- * methods.
- *
- * If a string or string[] is provided, then this is treated as a glob
- * pattern or array of glob patterns to exclude from matches. To ignore all
- * children within a directory, as well as the entry itself, append `'/**'`
- * to the ignore pattern.
- *
- * **Note** `ignore` patterns are _always_ in `dot:true` mode, regardless of
- * any other settings.
- *
- * If an object is provided that has `ignored(path)` and/or
- * `childrenIgnored(path)` methods, then these methods will be called to
- * determine whether any Path is a match or if its children should be
- * traversed, respectively.
- */
- ignore?: string | string[] | IgnoreLike;
- /**
- * Treat brace expansion like `{a,b}` as a "magic" pattern. Has no
- * effect if {@link nobrace} is set.
- *
- * Only has effect on the {@link hasMagic} function.
- */
- magicalBraces?: boolean;
- /**
- * Add a `/` character to directory matches. Note that this requires
- * additional stat calls in some cases.
- */
- mark?: boolean;
- /**
- * Perform a basename-only match if the pattern does not contain any slash
- * characters. That is, `*.js` would be treated as equivalent to
- * `**\/*.js`, matching all js files in all directories.
- */
- matchBase?: boolean;
- /**
- * Limit the directory traversal to a given depth below the cwd.
- * Note that this does NOT prevent traversal to sibling folders,
- * root patterns, and so on. It only limits the maximum folder depth
- * that the walk will descend, relative to the cwd.
- */
- maxDepth?: number;
- /**
- * Do not expand `{a,b}` and `{1..3}` brace sets.
- */
- nobrace?: boolean;
- /**
- * Perform a case-insensitive match. This defaults to `true` on macOS and
- * Windows systems, and `false` on all others.
- *
- * **Note** `nocase` should only be explicitly set when it is
- * known that the filesystem's case sensitivity differs from the
- * platform default. If set `true` on case-sensitive file
- * systems, or `false` on case-insensitive file systems, then the
- * walk may return more or less results than expected.
- */
- nocase?: boolean;
- /**
- * Do not match directories, only files. (Note: to match
- * _only_ directories, put a `/` at the end of the pattern.)
- */
- nodir?: boolean;
- /**
- * Do not match "extglob" patterns such as `+(a|b)`.
- */
- noext?: boolean;
- /**
- * Do not match `**` against multiple filenames. (Ie, treat it as a normal
- * `*` instead.)
- *
- * Conflicts with {@link matchBase}
- */
- noglobstar?: boolean;
- /**
- * Defaults to value of `process.platform` if available, or `'linux'` if
- * not. Setting `platform:'win32'` on non-Windows systems may cause strange
- * behavior.
- */
- platform?: NodeJS.Platform;
- /**
- * Set to true to call `fs.realpath` on all of the
- * results. In the case of an entry that cannot be resolved, the
- * entry is omitted. This incurs a slight performance penalty, of
- * course, because of the added system calls.
- */
- realpath?: boolean;
- /**
- *
- * A string path resolved against the `cwd` option, which
- * is used as the starting point for absolute patterns that start
- * with `/`, (but not drive letters or UNC paths on Windows).
- *
- * Note that this _doesn't_ necessarily limit the walk to the
- * `root` directory, and doesn't affect the cwd starting point for
- * non-absolute patterns. A pattern containing `..` will still be
- * able to traverse out of the root directory, if it is not an
- * actual root directory on the filesystem, and any non-absolute
- * patterns will be matched in the `cwd`. For example, the
- * pattern `/../*` with `{root:'/some/path'}` will return all
- * files in `/some`, not all files in `/some/path`. The pattern
- * `*` with `{root:'/some/path'}` will return all the entries in
- * the cwd, not the entries in `/some/path`.
- *
- * To start absolute and non-absolute patterns in the same
- * path, you can use `{root:''}`. However, be aware that on
- * Windows systems, a pattern like `x:/*` or `//host/share/*` will
- * _always_ start in the `x:/` or `//host/share` directory,
- * regardless of the `root` setting.
- */
- root?: string;
- /**
- * A [PathScurry](http://npm.im/path-scurry) object used
- * to traverse the file system. If the `nocase` option is set
- * explicitly, then any provided `scurry` object must match this
- * setting.
- */
- scurry?: PathScurry;
- /**
- * Call `lstat()` on all entries, whether required or not to determine
- * if it's a valid match. When used with {@link withFileTypes}, this means
- * that matches will include data such as modified time, permissions, and
- * so on. Note that this will incur a performance cost due to the added
- * system calls.
- */
- stat?: boolean;
- /**
- * An AbortSignal which will cancel the Glob walk when
- * triggered.
- */
- signal?: AbortSignal;
- /**
- * Use `\\` as a path separator _only_, and
- * _never_ as an escape character. If set, all `\\` characters are
- * replaced with `/` in the pattern.
- *
- * Note that this makes it **impossible** to match against paths
- * containing literal glob pattern characters, but allows matching
- * with patterns constructed using `path.join()` and
- * `path.resolve()` on Windows platforms, mimicking the (buggy!)
- * behavior of Glob v7 and before on Windows. Please use with
- * caution, and be mindful of [the caveat below about Windows
- * paths](#windows). (For legacy reasons, this is also set if
- * `allowWindowsEscape` is set to the exact value `false`.)
- */
- windowsPathsNoEscape?: boolean;
- /**
- * Return [PathScurry](http://npm.im/path-scurry)
- * `Path` objects instead of strings. These are similar to a
- * NodeJS `Dirent` object, but with additional methods and
- * properties.
- *
- * Conflicts with {@link absolute}
- */
- withFileTypes?: boolean;
- /**
- * An fs implementation to override some or all of the defaults. See
- * http://npm.im/path-scurry for details about what can be overridden.
- */
- fs?: FSOption;
- /**
- * Just passed along to Minimatch. Note that this makes all pattern
- * matching operations slower and *extremely* noisy.
- */
- debug?: boolean;
- /**
- * Return `/` delimited paths, even on Windows.
- *
- * On posix systems, this has no effect. But, on Windows, it means that
- * paths will be `/` delimited, and absolute paths will be their full
- * resolved UNC forms, eg instead of `'C:\\foo\\bar'`, it would return
- * `'//?/C:/foo/bar'`
- */
- posix?: boolean;
-}
-export type GlobOptionsWithFileTypesTrue = GlobOptions & {
- withFileTypes: true;
- absolute?: undefined;
- mark?: undefined;
- posix?: undefined;
-};
-export type GlobOptionsWithFileTypesFalse = GlobOptions & {
- withFileTypes?: false;
-};
-export type GlobOptionsWithFileTypesUnset = GlobOptions & {
- withFileTypes?: undefined;
-};
-export type Result = Opts extends GlobOptionsWithFileTypesTrue ? Path : Opts extends GlobOptionsWithFileTypesFalse ? string : Opts extends GlobOptionsWithFileTypesUnset ? string : string | Path;
-export type Results = Result[];
-export type FileTypes = Opts extends GlobOptionsWithFileTypesTrue ? true : Opts extends GlobOptionsWithFileTypesFalse ? false : Opts extends GlobOptionsWithFileTypesUnset ? false : boolean;
-/**
- * An object that can perform glob pattern traversals.
- */
-export declare class Glob implements GlobOptions {
- absolute?: boolean;
- cwd: string;
- root?: string;
- dot: boolean;
- dotRelative: boolean;
- follow: boolean;
- ignore?: string | string[] | IgnoreLike;
- magicalBraces: boolean;
- mark?: boolean;
- matchBase: boolean;
- maxDepth: number;
- nobrace: boolean;
- nocase: boolean;
- nodir: boolean;
- noext: boolean;
- noglobstar: boolean;
- pattern: string[];
- platform: NodeJS.Platform;
- realpath: boolean;
- scurry: PathScurry;
- stat: boolean;
- signal?: AbortSignal;
- windowsPathsNoEscape: boolean;
- withFileTypes: FileTypes;
- /**
- * The options provided to the constructor.
- */
- opts: Opts;
- /**
- * An array of parsed immutable {@link Pattern} objects.
- */
- patterns: Pattern[];
- /**
- * All options are stored as properties on the `Glob` object.
- *
- * See {@link GlobOptions} for full options descriptions.
- *
- * Note that a previous `Glob` object can be passed as the
- * `GlobOptions` to another `Glob` instantiation to re-use settings
- * and caches with a new pattern.
- *
- * Traversal functions can be called multiple times to run the walk
- * again.
- */
- constructor(pattern: string | string[], opts: Opts);
- /**
- * Returns a Promise that resolves to the results array.
- */
- walk(): Promise>;
- /**
- * synchronous {@link Glob.walk}
- */
- walkSync(): Results;
- /**
- * Stream results asynchronously.
- */
- stream(): Minipass, Result>;
- /**
- * Stream results synchronously.
- */
- streamSync(): Minipass, Result>;
- /**
- * Default sync iteration function. Returns a Generator that
- * iterates over the results.
- */
- iterateSync(): Generator, void, void>;
- [Symbol.iterator](): Generator, void, void>;
- /**
- * Default async iteration function. Returns an AsyncGenerator that
- * iterates over the results.
- */
- iterate(): AsyncGenerator, void, void>;
- [Symbol.asyncIterator](): AsyncGenerator, void, void>;
-}
-//# sourceMappingURL=glob.d.ts.map
\ No newline at end of file
diff --git a/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob/dist/cjs/src/glob.d.ts.map b/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob/dist/cjs/src/glob.d.ts.map
deleted file mode 100644
index 6353d8b3c47126..00000000000000
--- a/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob/dist/cjs/src/glob.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"glob.d.ts","sourceRoot":"","sources":["../../../src/glob.ts"],"names":[],"mappings":"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"}
\ No newline at end of file
diff --git a/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob/dist/cjs/src/glob.js b/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob/dist/cjs/src/glob.js
deleted file mode 100644
index eb37c6b9a6601e..00000000000000
--- a/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob/dist/cjs/src/glob.js
+++ /dev/null
@@ -1,238 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.Glob = void 0;
-const minimatch_1 = require("minimatch");
-const path_scurry_1 = require("path-scurry");
-const url_1 = require("url");
-const pattern_js_1 = require("./pattern.js");
-const walker_js_1 = require("./walker.js");
-// if no process global, just call it linux.
-// so we default to case-sensitive, / separators
-const defaultPlatform = typeof process === 'object' &&
- process &&
- typeof process.platform === 'string'
- ? process.platform
- : 'linux';
-/**
- * An object that can perform glob pattern traversals.
- */
-class Glob {
- absolute;
- cwd;
- root;
- dot;
- dotRelative;
- follow;
- ignore;
- magicalBraces;
- mark;
- matchBase;
- maxDepth;
- nobrace;
- nocase;
- nodir;
- noext;
- noglobstar;
- pattern;
- platform;
- realpath;
- scurry;
- stat;
- signal;
- windowsPathsNoEscape;
- withFileTypes;
- /**
- * The options provided to the constructor.
- */
- opts;
- /**
- * An array of parsed immutable {@link Pattern} objects.
- */
- patterns;
- /**
- * All options are stored as properties on the `Glob` object.
- *
- * See {@link GlobOptions} for full options descriptions.
- *
- * Note that a previous `Glob` object can be passed as the
- * `GlobOptions` to another `Glob` instantiation to re-use settings
- * and caches with a new pattern.
- *
- * Traversal functions can be called multiple times to run the walk
- * again.
- */
- constructor(pattern, opts) {
- /* c8 ignore start */
- if (!opts)
- throw new TypeError('glob options required');
- /* c8 ignore stop */
- this.withFileTypes = !!opts.withFileTypes;
- this.signal = opts.signal;
- this.follow = !!opts.follow;
- this.dot = !!opts.dot;
- this.dotRelative = !!opts.dotRelative;
- this.nodir = !!opts.nodir;
- this.mark = !!opts.mark;
- if (!opts.cwd) {
- this.cwd = '';
- }
- else if (opts.cwd instanceof URL || opts.cwd.startsWith('file://')) {
- opts.cwd = (0, url_1.fileURLToPath)(opts.cwd);
- }
- this.cwd = opts.cwd || '';
- this.root = opts.root;
- this.magicalBraces = !!opts.magicalBraces;
- this.nobrace = !!opts.nobrace;
- this.noext = !!opts.noext;
- this.realpath = !!opts.realpath;
- this.absolute = opts.absolute;
- this.noglobstar = !!opts.noglobstar;
- this.matchBase = !!opts.matchBase;
- this.maxDepth =
- typeof opts.maxDepth === 'number' ? opts.maxDepth : Infinity;
- this.stat = !!opts.stat;
- this.ignore = opts.ignore;
- if (this.withFileTypes && this.absolute !== undefined) {
- throw new Error('cannot set absolute and withFileTypes:true');
- }
- if (typeof pattern === 'string') {
- pattern = [pattern];
- }
- this.windowsPathsNoEscape =
- !!opts.windowsPathsNoEscape ||
- opts.allowWindowsEscape === false;
- if (this.windowsPathsNoEscape) {
- pattern = pattern.map(p => p.replace(/\\/g, '/'));
- }
- if (this.matchBase) {
- if (opts.noglobstar) {
- throw new TypeError('base matching requires globstar');
- }
- pattern = pattern.map(p => (p.includes('/') ? p : `./**/${p}`));
- }
- this.pattern = pattern;
- this.platform = opts.platform || defaultPlatform;
- this.opts = { ...opts, platform: this.platform };
- if (opts.scurry) {
- this.scurry = opts.scurry;
- if (opts.nocase !== undefined &&
- opts.nocase !== opts.scurry.nocase) {
- throw new Error('nocase option contradicts provided scurry option');
- }
- }
- else {
- const Scurry = opts.platform === 'win32'
- ? path_scurry_1.PathScurryWin32
- : opts.platform === 'darwin'
- ? path_scurry_1.PathScurryDarwin
- : opts.platform
- ? path_scurry_1.PathScurryPosix
- : path_scurry_1.PathScurry;
- this.scurry = new Scurry(this.cwd, {
- nocase: opts.nocase,
- fs: opts.fs,
- });
- }
- this.nocase = this.scurry.nocase;
- // If you do nocase:true on a case-sensitive file system, then
- // we need to use regexps instead of strings for non-magic
- // path portions, because statting `aBc` won't return results
- // for the file `AbC` for example.
- const nocaseMagicOnly = this.platform === 'darwin' || this.platform === 'win32';
- const mmo = {
- // default nocase based on platform
- ...opts,
- dot: this.dot,
- matchBase: this.matchBase,
- nobrace: this.nobrace,
- nocase: this.nocase,
- nocaseMagicOnly,
- nocomment: true,
- noext: this.noext,
- nonegate: true,
- optimizationLevel: 2,
- platform: this.platform,
- windowsPathsNoEscape: this.windowsPathsNoEscape,
- debug: !!this.opts.debug,
- };
- const mms = this.pattern.map(p => new minimatch_1.Minimatch(p, mmo));
- const [matchSet, globParts] = mms.reduce((set, m) => {
- set[0].push(...m.set);
- set[1].push(...m.globParts);
- return set;
- }, [[], []]);
- this.patterns = matchSet.map((set, i) => {
- return new pattern_js_1.Pattern(set, globParts[i], 0, this.platform);
- });
- }
- async walk() {
- // Walkers always return array of Path objects, so we just have to
- // coerce them into the right shape. It will have already called
- // realpath() if the option was set to do so, so we know that's cached.
- // start out knowing the cwd, at least
- return [
- ...(await new walker_js_1.GlobWalker(this.patterns, this.scurry.cwd, {
- ...this.opts,
- maxDepth: this.maxDepth !== Infinity
- ? this.maxDepth + this.scurry.cwd.depth()
- : Infinity,
- platform: this.platform,
- nocase: this.nocase,
- }).walk()),
- ];
- }
- walkSync() {
- return [
- ...new walker_js_1.GlobWalker(this.patterns, this.scurry.cwd, {
- ...this.opts,
- maxDepth: this.maxDepth !== Infinity
- ? this.maxDepth + this.scurry.cwd.depth()
- : Infinity,
- platform: this.platform,
- nocase: this.nocase,
- }).walkSync(),
- ];
- }
- stream() {
- return new walker_js_1.GlobStream(this.patterns, this.scurry.cwd, {
- ...this.opts,
- maxDepth: this.maxDepth !== Infinity
- ? this.maxDepth + this.scurry.cwd.depth()
- : Infinity,
- platform: this.platform,
- nocase: this.nocase,
- }).stream();
- }
- streamSync() {
- return new walker_js_1.GlobStream(this.patterns, this.scurry.cwd, {
- ...this.opts,
- maxDepth: this.maxDepth !== Infinity
- ? this.maxDepth + this.scurry.cwd.depth()
- : Infinity,
- platform: this.platform,
- nocase: this.nocase,
- }).streamSync();
- }
- /**
- * Default sync iteration function. Returns a Generator that
- * iterates over the results.
- */
- iterateSync() {
- return this.streamSync()[Symbol.iterator]();
- }
- [Symbol.iterator]() {
- return this.iterateSync();
- }
- /**
- * Default async iteration function. Returns an AsyncGenerator that
- * iterates over the results.
- */
- iterate() {
- return this.stream()[Symbol.asyncIterator]();
- }
- [Symbol.asyncIterator]() {
- return this.iterate();
- }
-}
-exports.Glob = Glob;
-//# sourceMappingURL=glob.js.map
\ No newline at end of file
diff --git a/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob/dist/cjs/src/glob.js.map b/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob/dist/cjs/src/glob.js.map
deleted file mode 100644
index 7a7a9b28627480..00000000000000
--- a/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob/dist/cjs/src/glob.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"glob.js","sourceRoot":"","sources":["../../../src/glob.ts"],"names":[],"mappings":"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","sourcesContent":["import { Minimatch, MinimatchOptions } from 'minimatch'\nimport { Minipass } from 'minipass'\nimport {\n FSOption,\n Path,\n PathScurry,\n PathScurryDarwin,\n PathScurryPosix,\n PathScurryWin32,\n} from 'path-scurry'\nimport { fileURLToPath } from 'url'\nimport { IgnoreLike } from './ignore.js'\nimport { Pattern } from './pattern.js'\nimport { GlobStream, GlobWalker } from './walker.js'\n\nexport type MatchSet = Minimatch['set']\nexport type GlobParts = Exclude\n\n// if no process global, just call it linux.\n// so we default to case-sensitive, / separators\nconst defaultPlatform: NodeJS.Platform =\n typeof process === 'object' &&\n process &&\n typeof process.platform === 'string'\n ? process.platform\n : 'linux'\n\n/**\n * A `GlobOptions` object may be provided to any of the exported methods, and\n * must be provided to the `Glob` constructor.\n *\n * All options are optional, boolean, and false by default, unless otherwise\n * noted.\n *\n * All resolved options are added to the Glob object as properties.\n *\n * If you are running many `glob` operations, you can pass a Glob object as the\n * `options` argument to a subsequent operation to share the previously loaded\n * cache.\n */\nexport interface GlobOptions {\n /**\n * Set to `true` to always receive absolute paths for\n * matched files. Set to `false` to always return relative paths.\n *\n * When this option is not set, absolute paths are returned for patterns\n * that are absolute, and otherwise paths are returned that are relative\n * to the `cwd` setting.\n *\n * This does _not_ make an extra system call to get\n * the realpath, it only does string path resolution.\n *\n * Conflicts with {@link withFileTypes}\n */\n absolute?: boolean\n\n /**\n * Set to false to enable {@link windowsPathsNoEscape}\n *\n * @deprecated\n */\n allowWindowsEscape?: boolean\n\n /**\n * The current working directory in which to search. Defaults to\n * `process.cwd()`.\n *\n * May be eiher a string path or a `file://` URL object or string.\n */\n cwd?: string | URL\n\n /**\n * Include `.dot` files in normal matches and `globstar`\n * matches. Note that an explicit dot in a portion of the pattern\n * will always match dot files.\n */\n dot?: boolean\n\n /**\n * Prepend all relative path strings with `./` (or `.\\` on Windows).\n *\n * Without this option, returned relative paths are \"bare\", so instead of\n * returning `'./foo/bar'`, they are returned as `'foo/bar'`.\n *\n * Relative patterns starting with `'../'` are not prepended with `./`, even\n * if this option is set.\n */\n dotRelative?: boolean\n\n /**\n * Follow symlinked directories when expanding `**`\n * patterns. This can result in a lot of duplicate references in\n * the presence of cyclic links, and make performance quite bad.\n *\n * By default, a `**` in a pattern will follow 1 symbolic link if\n * it is not the first item in the pattern, or none if it is the\n * first item in the pattern, following the same behavior as Bash.\n */\n follow?: boolean\n\n /**\n * string or string[], or an object with `ignore` and `ignoreChildren`\n * methods.\n *\n * If a string or string[] is provided, then this is treated as a glob\n * pattern or array of glob patterns to exclude from matches. To ignore all\n * children within a directory, as well as the entry itself, append `'/**'`\n * to the ignore pattern.\n *\n * **Note** `ignore` patterns are _always_ in `dot:true` mode, regardless of\n * any other settings.\n *\n * If an object is provided that has `ignored(path)` and/or\n * `childrenIgnored(path)` methods, then these methods will be called to\n * determine whether any Path is a match or if its children should be\n * traversed, respectively.\n */\n ignore?: string | string[] | IgnoreLike\n\n /**\n * Treat brace expansion like `{a,b}` as a \"magic\" pattern. Has no\n * effect if {@link nobrace} is set.\n *\n * Only has effect on the {@link hasMagic} function.\n */\n magicalBraces?: boolean\n\n /**\n * Add a `/` character to directory matches. Note that this requires\n * additional stat calls in some cases.\n */\n mark?: boolean\n\n /**\n * Perform a basename-only match if the pattern does not contain any slash\n * characters. That is, `*.js` would be treated as equivalent to\n * `**\\/*.js`, matching all js files in all directories.\n */\n matchBase?: boolean\n\n /**\n * Limit the directory traversal to a given depth below the cwd.\n * Note that this does NOT prevent traversal to sibling folders,\n * root patterns, and so on. It only limits the maximum folder depth\n * that the walk will descend, relative to the cwd.\n */\n maxDepth?: number\n\n /**\n * Do not expand `{a,b}` and `{1..3}` brace sets.\n */\n nobrace?: boolean\n\n /**\n * Perform a case-insensitive match. This defaults to `true` on macOS and\n * Windows systems, and `false` on all others.\n *\n * **Note** `nocase` should only be explicitly set when it is\n * known that the filesystem's case sensitivity differs from the\n * platform default. If set `true` on case-sensitive file\n * systems, or `false` on case-insensitive file systems, then the\n * walk may return more or less results than expected.\n */\n nocase?: boolean\n\n /**\n * Do not match directories, only files. (Note: to match\n * _only_ directories, put a `/` at the end of the pattern.)\n */\n nodir?: boolean\n\n /**\n * Do not match \"extglob\" patterns such as `+(a|b)`.\n */\n noext?: boolean\n\n /**\n * Do not match `**` against multiple filenames. (Ie, treat it as a normal\n * `*` instead.)\n *\n * Conflicts with {@link matchBase}\n */\n noglobstar?: boolean\n\n /**\n * Defaults to value of `process.platform` if available, or `'linux'` if\n * not. Setting `platform:'win32'` on non-Windows systems may cause strange\n * behavior.\n */\n platform?: NodeJS.Platform\n\n /**\n * Set to true to call `fs.realpath` on all of the\n * results. In the case of an entry that cannot be resolved, the\n * entry is omitted. This incurs a slight performance penalty, of\n * course, because of the added system calls.\n */\n realpath?: boolean\n\n /**\n *\n * A string path resolved against the `cwd` option, which\n * is used as the starting point for absolute patterns that start\n * with `/`, (but not drive letters or UNC paths on Windows).\n *\n * Note that this _doesn't_ necessarily limit the walk to the\n * `root` directory, and doesn't affect the cwd starting point for\n * non-absolute patterns. A pattern containing `..` will still be\n * able to traverse out of the root directory, if it is not an\n * actual root directory on the filesystem, and any non-absolute\n * patterns will be matched in the `cwd`. For example, the\n * pattern `/../*` with `{root:'/some/path'}` will return all\n * files in `/some`, not all files in `/some/path`. The pattern\n * `*` with `{root:'/some/path'}` will return all the entries in\n * the cwd, not the entries in `/some/path`.\n *\n * To start absolute and non-absolute patterns in the same\n * path, you can use `{root:''}`. However, be aware that on\n * Windows systems, a pattern like `x:/*` or `//host/share/*` will\n * _always_ start in the `x:/` or `//host/share` directory,\n * regardless of the `root` setting.\n */\n root?: string\n\n /**\n * A [PathScurry](http://npm.im/path-scurry) object used\n * to traverse the file system. If the `nocase` option is set\n * explicitly, then any provided `scurry` object must match this\n * setting.\n */\n scurry?: PathScurry\n\n /**\n * Call `lstat()` on all entries, whether required or not to determine\n * if it's a valid match. When used with {@link withFileTypes}, this means\n * that matches will include data such as modified time, permissions, and\n * so on. Note that this will incur a performance cost due to the added\n * system calls.\n */\n stat?: boolean\n\n /**\n * An AbortSignal which will cancel the Glob walk when\n * triggered.\n */\n signal?: AbortSignal\n\n /**\n * Use `\\\\` as a path separator _only_, and\n * _never_ as an escape character. If set, all `\\\\` characters are\n * replaced with `/` in the pattern.\n *\n * Note that this makes it **impossible** to match against paths\n * containing literal glob pattern characters, but allows matching\n * with patterns constructed using `path.join()` and\n * `path.resolve()` on Windows platforms, mimicking the (buggy!)\n * behavior of Glob v7 and before on Windows. Please use with\n * caution, and be mindful of [the caveat below about Windows\n * paths](#windows). (For legacy reasons, this is also set if\n * `allowWindowsEscape` is set to the exact value `false`.)\n */\n windowsPathsNoEscape?: boolean\n\n /**\n * Return [PathScurry](http://npm.im/path-scurry)\n * `Path` objects instead of strings. These are similar to a\n * NodeJS `Dirent` object, but with additional methods and\n * properties.\n *\n * Conflicts with {@link absolute}\n */\n withFileTypes?: boolean\n\n /**\n * An fs implementation to override some or all of the defaults. See\n * http://npm.im/path-scurry for details about what can be overridden.\n */\n fs?: FSOption\n\n /**\n * Just passed along to Minimatch. Note that this makes all pattern\n * matching operations slower and *extremely* noisy.\n */\n debug?: boolean\n\n /**\n * Return `/` delimited paths, even on Windows.\n *\n * On posix systems, this has no effect. But, on Windows, it means that\n * paths will be `/` delimited, and absolute paths will be their full\n * resolved UNC forms, eg instead of `'C:\\\\foo\\\\bar'`, it would return\n * `'//?/C:/foo/bar'`\n */\n posix?: boolean\n}\n\nexport type GlobOptionsWithFileTypesTrue = GlobOptions & {\n withFileTypes: true\n // string options not relevant if returning Path objects.\n absolute?: undefined\n mark?: undefined\n posix?: undefined\n}\n\nexport type GlobOptionsWithFileTypesFalse = GlobOptions & {\n withFileTypes?: false\n}\n\nexport type GlobOptionsWithFileTypesUnset = GlobOptions & {\n withFileTypes?: undefined\n}\n\nexport type Result = Opts extends GlobOptionsWithFileTypesTrue\n ? Path\n : Opts extends GlobOptionsWithFileTypesFalse\n ? string\n : Opts extends GlobOptionsWithFileTypesUnset\n ? string\n : string | Path\nexport type Results = Result[]\n\nexport type FileTypes = Opts extends GlobOptionsWithFileTypesTrue\n ? true\n : Opts extends GlobOptionsWithFileTypesFalse\n ? false\n : Opts extends GlobOptionsWithFileTypesUnset\n ? false\n : boolean\n\n/**\n * An object that can perform glob pattern traversals.\n */\nexport class Glob implements GlobOptions {\n absolute?: boolean\n cwd: string\n root?: string\n dot: boolean\n dotRelative: boolean\n follow: boolean\n ignore?: string | string[] | IgnoreLike\n magicalBraces: boolean\n mark?: boolean\n matchBase: boolean\n maxDepth: number\n nobrace: boolean\n nocase: boolean\n nodir: boolean\n noext: boolean\n noglobstar: boolean\n pattern: string[]\n platform: NodeJS.Platform\n realpath: boolean\n scurry: PathScurry\n stat: boolean\n signal?: AbortSignal\n windowsPathsNoEscape: boolean\n withFileTypes: FileTypes\n\n /**\n * The options provided to the constructor.\n */\n opts: Opts\n\n /**\n * An array of parsed immutable {@link Pattern} objects.\n */\n patterns: Pattern[]\n\n /**\n * All options are stored as properties on the `Glob` object.\n *\n * See {@link GlobOptions} for full options descriptions.\n *\n * Note that a previous `Glob` object can be passed as the\n * `GlobOptions` to another `Glob` instantiation to re-use settings\n * and caches with a new pattern.\n *\n * Traversal functions can be called multiple times to run the walk\n * again.\n */\n constructor(pattern: string | string[], opts: Opts) {\n /* c8 ignore start */\n if (!opts) throw new TypeError('glob options required')\n /* c8 ignore stop */\n this.withFileTypes = !!opts.withFileTypes as FileTypes\n this.signal = opts.signal\n this.follow = !!opts.follow\n this.dot = !!opts.dot\n this.dotRelative = !!opts.dotRelative\n this.nodir = !!opts.nodir\n this.mark = !!opts.mark\n if (!opts.cwd) {\n this.cwd = ''\n } else if (opts.cwd instanceof URL || opts.cwd.startsWith('file://')) {\n opts.cwd = fileURLToPath(opts.cwd)\n }\n this.cwd = opts.cwd || ''\n this.root = opts.root\n this.magicalBraces = !!opts.magicalBraces\n this.nobrace = !!opts.nobrace\n this.noext = !!opts.noext\n this.realpath = !!opts.realpath\n this.absolute = opts.absolute\n\n this.noglobstar = !!opts.noglobstar\n this.matchBase = !!opts.matchBase\n this.maxDepth =\n typeof opts.maxDepth === 'number' ? opts.maxDepth : Infinity\n this.stat = !!opts.stat\n this.ignore = opts.ignore\n\n if (this.withFileTypes && this.absolute !== undefined) {\n throw new Error('cannot set absolute and withFileTypes:true')\n }\n\n if (typeof pattern === 'string') {\n pattern = [pattern]\n }\n\n this.windowsPathsNoEscape =\n !!opts.windowsPathsNoEscape ||\n (opts as GlobOptions).allowWindowsEscape === false\n\n if (this.windowsPathsNoEscape) {\n pattern = pattern.map(p => p.replace(/\\\\/g, '/'))\n }\n\n if (this.matchBase) {\n if (opts.noglobstar) {\n throw new TypeError('base matching requires globstar')\n }\n pattern = pattern.map(p => (p.includes('/') ? p : `./**/${p}`))\n }\n\n this.pattern = pattern\n\n this.platform = opts.platform || defaultPlatform\n this.opts = { ...opts, platform: this.platform }\n if (opts.scurry) {\n this.scurry = opts.scurry\n if (\n opts.nocase !== undefined &&\n opts.nocase !== opts.scurry.nocase\n ) {\n throw new Error('nocase option contradicts provided scurry option')\n }\n } else {\n const Scurry =\n opts.platform === 'win32'\n ? PathScurryWin32\n : opts.platform === 'darwin'\n ? PathScurryDarwin\n : opts.platform\n ? PathScurryPosix\n : PathScurry\n this.scurry = new Scurry(this.cwd, {\n nocase: opts.nocase,\n fs: opts.fs,\n })\n }\n this.nocase = this.scurry.nocase\n\n // If you do nocase:true on a case-sensitive file system, then\n // we need to use regexps instead of strings for non-magic\n // path portions, because statting `aBc` won't return results\n // for the file `AbC` for example.\n const nocaseMagicOnly =\n this.platform === 'darwin' || this.platform === 'win32'\n\n const mmo: MinimatchOptions = {\n // default nocase based on platform\n ...opts,\n dot: this.dot,\n matchBase: this.matchBase,\n nobrace: this.nobrace,\n nocase: this.nocase,\n nocaseMagicOnly,\n nocomment: true,\n noext: this.noext,\n nonegate: true,\n optimizationLevel: 2,\n platform: this.platform,\n windowsPathsNoEscape: this.windowsPathsNoEscape,\n debug: !!this.opts.debug,\n }\n\n const mms = this.pattern.map(p => new Minimatch(p, mmo))\n const [matchSet, globParts] = mms.reduce(\n (set: [MatchSet, GlobParts], m) => {\n set[0].push(...m.set)\n set[1].push(...m.globParts)\n return set\n },\n [[], []]\n )\n this.patterns = matchSet.map((set, i) => {\n return new Pattern(set, globParts[i], 0, this.platform)\n })\n }\n\n /**\n * Returns a Promise that resolves to the results array.\n */\n async walk(): Promise>\n async walk(): Promise<(string | Path)[]> {\n // Walkers always return array of Path objects, so we just have to\n // coerce them into the right shape. It will have already called\n // realpath() if the option was set to do so, so we know that's cached.\n // start out knowing the cwd, at least\n return [\n ...(await new GlobWalker(this.patterns, this.scurry.cwd, {\n ...this.opts,\n maxDepth:\n this.maxDepth !== Infinity\n ? this.maxDepth + this.scurry.cwd.depth()\n : Infinity,\n platform: this.platform,\n nocase: this.nocase,\n }).walk()),\n ]\n }\n\n /**\n * synchronous {@link Glob.walk}\n */\n walkSync(): Results\n walkSync(): (string | Path)[] {\n return [\n ...new GlobWalker(this.patterns, this.scurry.cwd, {\n ...this.opts,\n maxDepth:\n this.maxDepth !== Infinity\n ? this.maxDepth + this.scurry.cwd.depth()\n : Infinity,\n platform: this.platform,\n nocase: this.nocase,\n }).walkSync(),\n ]\n }\n\n /**\n * Stream results asynchronously.\n */\n stream(): Minipass, Result>\n stream(): Minipass {\n return new GlobStream(this.patterns, this.scurry.cwd, {\n ...this.opts,\n maxDepth:\n this.maxDepth !== Infinity\n ? this.maxDepth + this.scurry.cwd.depth()\n : Infinity,\n platform: this.platform,\n nocase: this.nocase,\n }).stream()\n }\n\n /**\n * Stream results synchronously.\n */\n streamSync(): Minipass, Result>\n streamSync(): Minipass {\n return new GlobStream(this.patterns, this.scurry.cwd, {\n ...this.opts,\n maxDepth:\n this.maxDepth !== Infinity\n ? this.maxDepth + this.scurry.cwd.depth()\n : Infinity,\n platform: this.platform,\n nocase: this.nocase,\n }).streamSync()\n }\n\n /**\n * Default sync iteration function. Returns a Generator that\n * iterates over the results.\n */\n iterateSync(): Generator, void, void> {\n return this.streamSync()[Symbol.iterator]()\n }\n [Symbol.iterator]() {\n return this.iterateSync()\n }\n\n /**\n * Default async iteration function. Returns an AsyncGenerator that\n * iterates over the results.\n */\n iterate(): AsyncGenerator, void, void> {\n return this.stream()[Symbol.asyncIterator]()\n }\n [Symbol.asyncIterator]() {\n return this.iterate()\n }\n}\n"]}
\ No newline at end of file
diff --git a/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob/dist/cjs/src/has-magic.d.ts b/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob/dist/cjs/src/has-magic.d.ts
deleted file mode 100644
index 8aec3bd9725175..00000000000000
--- a/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob/dist/cjs/src/has-magic.d.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-import { GlobOptions } from './glob.js';
-/**
- * Return true if the patterns provided contain any magic glob characters,
- * given the options provided.
- *
- * Brace expansion is not considered "magic" unless the `magicalBraces` option
- * is set, as brace expansion just turns one string into an array of strings.
- * So a pattern like `'x{a,b}y'` would return `false`, because `'xay'` and
- * `'xby'` both do not contain any magic glob characters, and it's treated the
- * same as if you had called it on `['xay', 'xby']`. When `magicalBraces:true`
- * is in the options, brace expansion _is_ treated as a pattern having magic.
- */
-export declare const hasMagic: (pattern: string | string[], options?: GlobOptions) => boolean;
-//# sourceMappingURL=has-magic.d.ts.map
\ No newline at end of file
diff --git a/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob/dist/cjs/src/has-magic.d.ts.map b/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob/dist/cjs/src/has-magic.d.ts.map
deleted file mode 100644
index dd5053f80b44c3..00000000000000
--- a/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob/dist/cjs/src/has-magic.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"has-magic.d.ts","sourceRoot":"","sources":["../../../src/has-magic.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AAEvC;;;;;;;;;;GAUG;AACH,eAAO,MAAM,QAAQ,YACV,MAAM,GAAG,MAAM,EAAE,YACjB,WAAW,KACnB,OAQF,CAAA"}
\ No newline at end of file
diff --git a/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob/dist/cjs/src/has-magic.js b/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob/dist/cjs/src/has-magic.js
deleted file mode 100644
index 0918bd57e0f1c2..00000000000000
--- a/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob/dist/cjs/src/has-magic.js
+++ /dev/null
@@ -1,27 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.hasMagic = void 0;
-const minimatch_1 = require("minimatch");
-/**
- * Return true if the patterns provided contain any magic glob characters,
- * given the options provided.
- *
- * Brace expansion is not considered "magic" unless the `magicalBraces` option
- * is set, as brace expansion just turns one string into an array of strings.
- * So a pattern like `'x{a,b}y'` would return `false`, because `'xay'` and
- * `'xby'` both do not contain any magic glob characters, and it's treated the
- * same as if you had called it on `['xay', 'xby']`. When `magicalBraces:true`
- * is in the options, brace expansion _is_ treated as a pattern having magic.
- */
-const hasMagic = (pattern, options = {}) => {
- if (!Array.isArray(pattern)) {
- pattern = [pattern];
- }
- for (const p of pattern) {
- if (new minimatch_1.Minimatch(p, options).hasMagic())
- return true;
- }
- return false;
-};
-exports.hasMagic = hasMagic;
-//# sourceMappingURL=has-magic.js.map
\ No newline at end of file
diff --git a/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob/dist/cjs/src/has-magic.js.map b/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob/dist/cjs/src/has-magic.js.map
deleted file mode 100644
index 9b73cfad7d05e4..00000000000000
--- a/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob/dist/cjs/src/has-magic.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"has-magic.js","sourceRoot":"","sources":["../../../src/has-magic.ts"],"names":[],"mappings":";;;AAAA,yCAAqC;AAGrC;;;;;;;;;;GAUG;AACI,MAAM,QAAQ,GAAG,CACtB,OAA0B,EAC1B,UAAuB,EAAE,EAChB,EAAE;IACX,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE;QAC3B,OAAO,GAAG,CAAC,OAAO,CAAC,CAAA;KACpB;IACD,KAAK,MAAM,CAAC,IAAI,OAAO,EAAE;QACvB,IAAI,IAAI,qBAAS,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,QAAQ,EAAE;YAAE,OAAO,IAAI,CAAA;KACtD;IACD,OAAO,KAAK,CAAA;AACd,CAAC,CAAA;AAXY,QAAA,QAAQ,YAWpB","sourcesContent":["import { Minimatch } from 'minimatch'\nimport { GlobOptions } from './glob.js'\n\n/**\n * Return true if the patterns provided contain any magic glob characters,\n * given the options provided.\n *\n * Brace expansion is not considered \"magic\" unless the `magicalBraces` option\n * is set, as brace expansion just turns one string into an array of strings.\n * So a pattern like `'x{a,b}y'` would return `false`, because `'xay'` and\n * `'xby'` both do not contain any magic glob characters, and it's treated the\n * same as if you had called it on `['xay', 'xby']`. When `magicalBraces:true`\n * is in the options, brace expansion _is_ treated as a pattern having magic.\n */\nexport const hasMagic = (\n pattern: string | string[],\n options: GlobOptions = {}\n): boolean => {\n if (!Array.isArray(pattern)) {\n pattern = [pattern]\n }\n for (const p of pattern) {\n if (new Minimatch(p, options).hasMagic()) return true\n }\n return false\n}\n"]}
\ No newline at end of file
diff --git a/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob/dist/cjs/src/ignore.d.ts b/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob/dist/cjs/src/ignore.d.ts
deleted file mode 100644
index e9d74f3b5e1291..00000000000000
--- a/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob/dist/cjs/src/ignore.d.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-import { Minimatch } from 'minimatch';
-import { Path } from 'path-scurry';
-import { GlobWalkerOpts } from './walker.js';
-export interface IgnoreLike {
- ignored?: (p: Path) => boolean;
- childrenIgnored?: (p: Path) => boolean;
-}
-/**
- * Class used to process ignored patterns
- */
-export declare class Ignore implements IgnoreLike {
- relative: Minimatch[];
- relativeChildren: Minimatch[];
- absolute: Minimatch[];
- absoluteChildren: Minimatch[];
- constructor(ignored: string[], { nobrace, nocase, noext, noglobstar, platform, }: GlobWalkerOpts);
- ignored(p: Path): boolean;
- childrenIgnored(p: Path): boolean;
-}
-//# sourceMappingURL=ignore.d.ts.map
\ No newline at end of file
diff --git a/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob/dist/cjs/src/ignore.d.ts.map b/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob/dist/cjs/src/ignore.d.ts.map
deleted file mode 100644
index 3d604838d1eed2..00000000000000
--- a/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob/dist/cjs/src/ignore.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"ignore.d.ts","sourceRoot":"","sources":["../../../src/ignore.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAElC,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAE5C,MAAM,WAAW,UAAU;IACzB,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,KAAK,OAAO,CAAA;IAC9B,eAAe,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,KAAK,OAAO,CAAA;CACvC;AASD;;GAEG;AACH,qBAAa,MAAO,YAAW,UAAU;IACvC,QAAQ,EAAE,SAAS,EAAE,CAAA;IACrB,gBAAgB,EAAE,SAAS,EAAE,CAAA;IAC7B,QAAQ,EAAE,SAAS,EAAE,CAAA;IACrB,gBAAgB,EAAE,SAAS,EAAE,CAAA;gBAG3B,OAAO,EAAE,MAAM,EAAE,EACjB,EACE,OAAO,EACP,MAAM,EACN,KAAK,EACL,UAAU,EACV,QAA0B,GAC3B,EAAE,cAAc;IAiDnB,OAAO,CAAC,CAAC,EAAE,IAAI,GAAG,OAAO;IAczB,eAAe,CAAC,CAAC,EAAE,IAAI,GAAG,OAAO;CAWlC"}
\ No newline at end of file
diff --git a/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob/dist/cjs/src/ignore.js b/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob/dist/cjs/src/ignore.js
deleted file mode 100644
index 0cbcca335e1cca..00000000000000
--- a/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob/dist/cjs/src/ignore.js
+++ /dev/null
@@ -1,103 +0,0 @@
-"use strict";
-// give it a pattern, and it'll be able to tell you if
-// a given path should be ignored.
-// Ignoring a path ignores its children if the pattern ends in /**
-// Ignores are always parsed in dot:true mode
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.Ignore = void 0;
-const minimatch_1 = require("minimatch");
-const pattern_js_1 = require("./pattern.js");
-const defaultPlatform = typeof process === 'object' &&
- process &&
- typeof process.platform === 'string'
- ? process.platform
- : 'linux';
-/**
- * Class used to process ignored patterns
- */
-class Ignore {
- relative;
- relativeChildren;
- absolute;
- absoluteChildren;
- constructor(ignored, { nobrace, nocase, noext, noglobstar, platform = defaultPlatform, }) {
- this.relative = [];
- this.absolute = [];
- this.relativeChildren = [];
- this.absoluteChildren = [];
- const mmopts = {
- dot: true,
- nobrace,
- nocase,
- noext,
- noglobstar,
- optimizationLevel: 2,
- platform,
- nocomment: true,
- nonegate: true,
- };
- // this is a little weird, but it gives us a clean set of optimized
- // minimatch matchers, without getting tripped up if one of them
- // ends in /** inside a brace section, and it's only inefficient at
- // the start of the walk, not along it.
- // It'd be nice if the Pattern class just had a .test() method, but
- // handling globstars is a bit of a pita, and that code already lives
- // in minimatch anyway.
- // Another way would be if maybe Minimatch could take its set/globParts
- // as an option, and then we could at least just use Pattern to test
- // for absolute-ness.
- // Yet another way, Minimatch could take an array of glob strings, and
- // a cwd option, and do the right thing.
- for (const ign of ignored) {
- const mm = new minimatch_1.Minimatch(ign, mmopts);
- for (let i = 0; i < mm.set.length; i++) {
- const parsed = mm.set[i];
- const globParts = mm.globParts[i];
- const p = new pattern_js_1.Pattern(parsed, globParts, 0, platform);
- const m = new minimatch_1.Minimatch(p.globString(), mmopts);
- const children = globParts[globParts.length - 1] === '**';
- const absolute = p.isAbsolute();
- if (absolute)
- this.absolute.push(m);
- else
- this.relative.push(m);
- if (children) {
- if (absolute)
- this.absoluteChildren.push(m);
- else
- this.relativeChildren.push(m);
- }
- }
- }
- }
- ignored(p) {
- const fullpath = p.fullpath();
- const fullpaths = `${fullpath}/`;
- const relative = p.relative() || '.';
- const relatives = `${relative}/`;
- for (const m of this.relative) {
- if (m.match(relative) || m.match(relatives))
- return true;
- }
- for (const m of this.absolute) {
- if (m.match(fullpath) || m.match(fullpaths))
- return true;
- }
- return false;
- }
- childrenIgnored(p) {
- const fullpath = p.fullpath() + '/';
- const relative = (p.relative() || '.') + '/';
- for (const m of this.relativeChildren) {
- if (m.match(relative))
- return true;
- }
- for (const m of this.absoluteChildren) {
- if (m.match(fullpath))
- true;
- }
- return false;
- }
-}
-exports.Ignore = Ignore;
-//# sourceMappingURL=ignore.js.map
\ No newline at end of file
diff --git a/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob/dist/cjs/src/ignore.js.map b/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob/dist/cjs/src/ignore.js.map
deleted file mode 100644
index 7595b4c68f79ed..00000000000000
--- a/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob/dist/cjs/src/ignore.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"ignore.js","sourceRoot":"","sources":["../../../src/ignore.ts"],"names":[],"mappings":"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","sourcesContent":["// give it a pattern, and it'll be able to tell you if\n// a given path should be ignored.\n// Ignoring a path ignores its children if the pattern ends in /**\n// Ignores are always parsed in dot:true mode\n\nimport { Minimatch } from 'minimatch'\nimport { Path } from 'path-scurry'\nimport { Pattern } from './pattern.js'\nimport { GlobWalkerOpts } from './walker.js'\n\nexport interface IgnoreLike {\n ignored?: (p: Path) => boolean\n childrenIgnored?: (p: Path) => boolean\n}\n\nconst defaultPlatform: NodeJS.Platform =\n typeof process === 'object' &&\n process &&\n typeof process.platform === 'string'\n ? process.platform\n : 'linux'\n\n/**\n * Class used to process ignored patterns\n */\nexport class Ignore implements IgnoreLike {\n relative: Minimatch[]\n relativeChildren: Minimatch[]\n absolute: Minimatch[]\n absoluteChildren: Minimatch[]\n\n constructor(\n ignored: string[],\n {\n nobrace,\n nocase,\n noext,\n noglobstar,\n platform = defaultPlatform,\n }: GlobWalkerOpts\n ) {\n this.relative = []\n this.absolute = []\n this.relativeChildren = []\n this.absoluteChildren = []\n const mmopts = {\n dot: true,\n nobrace,\n nocase,\n noext,\n noglobstar,\n optimizationLevel: 2,\n platform,\n nocomment: true,\n nonegate: true,\n }\n\n // this is a little weird, but it gives us a clean set of optimized\n // minimatch matchers, without getting tripped up if one of them\n // ends in /** inside a brace section, and it's only inefficient at\n // the start of the walk, not along it.\n // It'd be nice if the Pattern class just had a .test() method, but\n // handling globstars is a bit of a pita, and that code already lives\n // in minimatch anyway.\n // Another way would be if maybe Minimatch could take its set/globParts\n // as an option, and then we could at least just use Pattern to test\n // for absolute-ness.\n // Yet another way, Minimatch could take an array of glob strings, and\n // a cwd option, and do the right thing.\n for (const ign of ignored) {\n const mm = new Minimatch(ign, mmopts)\n for (let i = 0; i < mm.set.length; i++) {\n const parsed = mm.set[i]\n const globParts = mm.globParts[i]\n const p = new Pattern(parsed, globParts, 0, platform)\n const m = new Minimatch(p.globString(), mmopts)\n const children = globParts[globParts.length - 1] === '**'\n const absolute = p.isAbsolute()\n if (absolute) this.absolute.push(m)\n else this.relative.push(m)\n if (children) {\n if (absolute) this.absoluteChildren.push(m)\n else this.relativeChildren.push(m)\n }\n }\n }\n }\n\n ignored(p: Path): boolean {\n const fullpath = p.fullpath()\n const fullpaths = `${fullpath}/`\n const relative = p.relative() || '.'\n const relatives = `${relative}/`\n for (const m of this.relative) {\n if (m.match(relative) || m.match(relatives)) return true\n }\n for (const m of this.absolute) {\n if (m.match(fullpath) || m.match(fullpaths)) return true\n }\n return false\n }\n\n childrenIgnored(p: Path): boolean {\n const fullpath = p.fullpath() + '/'\n const relative = (p.relative() || '.') + '/'\n for (const m of this.relativeChildren) {\n if (m.match(relative)) return true\n }\n for (const m of this.absoluteChildren) {\n if (m.match(fullpath)) true\n }\n return false\n }\n}\n"]}
\ No newline at end of file
diff --git a/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob/dist/cjs/src/index.d.ts b/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob/dist/cjs/src/index.d.ts
deleted file mode 100644
index 669bf12e6d5916..00000000000000
--- a/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob/dist/cjs/src/index.d.ts
+++ /dev/null
@@ -1,95 +0,0 @@
-import { Minipass } from 'minipass';
-import { Path } from 'path-scurry';
-import type { GlobOptions, GlobOptionsWithFileTypesFalse, GlobOptionsWithFileTypesTrue, GlobOptionsWithFileTypesUnset } from './glob.js';
-import { Glob } from './glob.js';
-/**
- * Syncronous form of {@link globStream}. Will read all the matches as fast as
- * you consume them, even all in a single tick if you consume them immediately,
- * but will still respond to backpressure if they're not consumed immediately.
- */
-export declare function globStreamSync(pattern: string | string[], options: GlobOptionsWithFileTypesTrue): Minipass;
-export declare function globStreamSync(pattern: string | string[], options: GlobOptionsWithFileTypesFalse): Minipass;
-export declare function globStreamSync(pattern: string | string[], options: GlobOptionsWithFileTypesUnset): Minipass;
-export declare function globStreamSync(pattern: string | string[], options: GlobOptions): Minipass | Minipass;
-/**
- * Return a stream that emits all the strings or `Path` objects and
- * then emits `end` when completed.
- */
-export declare function globStream(pattern: string | string[], options: GlobOptionsWithFileTypesFalse): Minipass;
-export declare function globStream(pattern: string | string[], options: GlobOptionsWithFileTypesTrue): Minipass;
-export declare function globStream(pattern: string | string[], options?: GlobOptionsWithFileTypesUnset | undefined): Minipass;
-export declare function globStream(pattern: string | string[], options: GlobOptions): Minipass | Minipass;
-/**
- * Synchronous form of {@link glob}
- */
-export declare function globSync(pattern: string | string[], options: GlobOptionsWithFileTypesFalse): string[];
-export declare function globSync(pattern: string | string[], options: GlobOptionsWithFileTypesTrue): Path[];
-export declare function globSync(pattern: string | string[], options?: GlobOptionsWithFileTypesUnset | undefined): string[];
-export declare function globSync(pattern: string | string[], options: GlobOptions): Path[] | string[];
-/**
- * Perform an asynchronous glob search for the pattern(s) specified. Returns
- * [Path](https://isaacs.github.io/path-scurry/classes/PathBase) objects if the
- * {@link withFileTypes} option is set to `true`. See {@link GlobOptions} for
- * full option descriptions.
- */
-declare function glob_(pattern: string | string[], options?: GlobOptionsWithFileTypesUnset | undefined): Promise;
-declare function glob_(pattern: string | string[], options: GlobOptionsWithFileTypesTrue): Promise;
-declare function glob_(pattern: string | string[], options: GlobOptionsWithFileTypesFalse): Promise;
-declare function glob_(pattern: string | string[], options: GlobOptions): Promise;
-/**
- * Return a sync iterator for walking glob pattern matches.
- */
-export declare function globIterateSync(pattern: string | string[], options?: GlobOptionsWithFileTypesUnset | undefined): Generator;
-export declare function globIterateSync(pattern: string | string[], options: GlobOptionsWithFileTypesTrue): Generator;
-export declare function globIterateSync(pattern: string | string[], options: GlobOptionsWithFileTypesFalse): Generator;
-export declare function globIterateSync(pattern: string | string[], options: GlobOptions): Generator | Generator;
-/**
- * Return an async iterator for walking glob pattern matches.
- */
-export declare function globIterate(pattern: string | string[], options?: GlobOptionsWithFileTypesUnset | undefined): AsyncGenerator;
-export declare function globIterate(pattern: string | string[], options: GlobOptionsWithFileTypesTrue): AsyncGenerator;
-export declare function globIterate(pattern: string | string[], options: GlobOptionsWithFileTypesFalse): AsyncGenerator;
-export declare function globIterate(pattern: string | string[], options: GlobOptions): AsyncGenerator | AsyncGenerator;
-export declare const streamSync: typeof globStreamSync;
-export declare const stream: typeof globStream & {
- sync: typeof globStreamSync;
-};
-export declare const iterateSync: typeof globIterateSync;
-export declare const iterate: typeof globIterate & {
- sync: typeof globIterateSync;
-};
-export declare const sync: typeof globSync & {
- stream: typeof globStreamSync;
- iterate: typeof globIterateSync;
-};
-export { escape, unescape } from 'minimatch';
-export { Glob } from './glob.js';
-export type { GlobOptions, GlobOptionsWithFileTypesFalse, GlobOptionsWithFileTypesTrue, GlobOptionsWithFileTypesUnset, } from './glob.js';
-export { hasMagic } from './has-magic.js';
-export type { IgnoreLike } from './ignore.js';
-export type { MatchStream } from './walker.js';
-export declare const glob: typeof glob_ & {
- glob: typeof glob_;
- globSync: typeof globSync;
- sync: typeof globSync & {
- stream: typeof globStreamSync;
- iterate: typeof globIterateSync;
- };
- globStream: typeof globStream;
- stream: typeof globStream & {
- sync: typeof globStreamSync;
- };
- globStreamSync: typeof globStreamSync;
- streamSync: typeof globStreamSync;
- globIterate: typeof globIterate;
- iterate: typeof globIterate & {
- sync: typeof globIterateSync;
- };
- globIterateSync: typeof globIterateSync;
- iterateSync: typeof globIterateSync;
- Glob: typeof Glob;
- hasMagic: (pattern: string | string[], options?: GlobOptions) => boolean;
- escape: (s: string, { windowsPathsNoEscape, }?: Pick | undefined) => string;
- unescape: (s: string, { windowsPathsNoEscape, }?: Pick | undefined) => string;
-};
-//# sourceMappingURL=index.d.ts.map
\ No newline at end of file
diff --git a/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob/dist/cjs/src/index.d.ts.map b/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob/dist/cjs/src/index.d.ts.map
deleted file mode 100644
index 4e9ba085ce45b2..00000000000000
--- a/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob/dist/cjs/src/index.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"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"}
\ No newline at end of file
diff --git a/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob/dist/cjs/src/index.js b/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob/dist/cjs/src/index.js
deleted file mode 100644
index 71c31c03dd339b..00000000000000
--- a/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob/dist/cjs/src/index.js
+++ /dev/null
@@ -1,68 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.glob = exports.hasMagic = exports.Glob = exports.unescape = exports.escape = exports.sync = exports.iterate = exports.iterateSync = exports.stream = exports.streamSync = exports.globIterate = exports.globIterateSync = exports.globSync = exports.globStream = exports.globStreamSync = void 0;
-const minimatch_1 = require("minimatch");
-const glob_js_1 = require("./glob.js");
-const has_magic_js_1 = require("./has-magic.js");
-function globStreamSync(pattern, options = {}) {
- return new glob_js_1.Glob(pattern, options).streamSync();
-}
-exports.globStreamSync = globStreamSync;
-function globStream(pattern, options = {}) {
- return new glob_js_1.Glob(pattern, options).stream();
-}
-exports.globStream = globStream;
-function globSync(pattern, options = {}) {
- return new glob_js_1.Glob(pattern, options).walkSync();
-}
-exports.globSync = globSync;
-async function glob_(pattern, options = {}) {
- return new glob_js_1.Glob(pattern, options).walk();
-}
-function globIterateSync(pattern, options = {}) {
- return new glob_js_1.Glob(pattern, options).iterateSync();
-}
-exports.globIterateSync = globIterateSync;
-function globIterate(pattern, options = {}) {
- return new glob_js_1.Glob(pattern, options).iterate();
-}
-exports.globIterate = globIterate;
-// aliases: glob.sync.stream() glob.stream.sync() glob.sync() etc
-exports.streamSync = globStreamSync;
-exports.stream = Object.assign(globStream, { sync: globStreamSync });
-exports.iterateSync = globIterateSync;
-exports.iterate = Object.assign(globIterate, {
- sync: globIterateSync,
-});
-exports.sync = Object.assign(globSync, {
- stream: globStreamSync,
- iterate: globIterateSync,
-});
-/* c8 ignore start */
-var minimatch_2 = require("minimatch");
-Object.defineProperty(exports, "escape", { enumerable: true, get: function () { return minimatch_2.escape; } });
-Object.defineProperty(exports, "unescape", { enumerable: true, get: function () { return minimatch_2.unescape; } });
-var glob_js_2 = require("./glob.js");
-Object.defineProperty(exports, "Glob", { enumerable: true, get: function () { return glob_js_2.Glob; } });
-var has_magic_js_2 = require("./has-magic.js");
-Object.defineProperty(exports, "hasMagic", { enumerable: true, get: function () { return has_magic_js_2.hasMagic; } });
-/* c8 ignore stop */
-exports.glob = Object.assign(glob_, {
- glob: glob_,
- globSync,
- sync: exports.sync,
- globStream,
- stream: exports.stream,
- globStreamSync,
- streamSync: exports.streamSync,
- globIterate,
- iterate: exports.iterate,
- globIterateSync,
- iterateSync: exports.iterateSync,
- Glob: glob_js_1.Glob,
- hasMagic: has_magic_js_1.hasMagic,
- escape: minimatch_1.escape,
- unescape: minimatch_1.unescape,
-});
-exports.glob.glob = exports.glob;
-//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob/dist/cjs/src/index.js.map b/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob/dist/cjs/src/index.js.map
deleted file mode 100644
index 060338fbd1b94b..00000000000000
--- a/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob/dist/cjs/src/index.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":";;;AAAA,yCAA4C;AAS5C,uCAAgC;AAChC,iDAAyC;AAuBzC,SAAgB,cAAc,CAC5B,OAA0B,EAC1B,UAAuB,EAAE;IAEzB,OAAO,IAAI,cAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,UAAU,EAAE,CAAA;AAChD,CAAC;AALD,wCAKC;AAsBD,SAAgB,UAAU,CACxB,OAA0B,EAC1B,UAAuB,EAAE;IAEzB,OAAO,IAAI,cAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,MAAM,EAAE,CAAA;AAC5C,CAAC;AALD,gCAKC;AAqBD,SAAgB,QAAQ,CACtB,OAA0B,EAC1B,UAAuB,EAAE;IAEzB,OAAO,IAAI,cAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,QAAQ,EAAE,CAAA;AAC9C,CAAC;AALD,4BAKC;AAwBD,KAAK,UAAU,KAAK,CAClB,OAA0B,EAC1B,UAAuB,EAAE;IAEzB,OAAO,IAAI,cAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,IAAI,EAAE,CAAA;AAC1C,CAAC;AAqBD,SAAgB,eAAe,CAC7B,OAA0B,EAC1B,UAAuB,EAAE;IAEzB,OAAO,IAAI,cAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,WAAW,EAAE,CAAA;AACjD,CAAC;AALD,0CAKC;AAqBD,SAAgB,WAAW,CACzB,OAA0B,EAC1B,UAAuB,EAAE;IAEzB,OAAO,IAAI,cAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,OAAO,EAAE,CAAA;AAC7C,CAAC;AALD,kCAKC;AAED,iEAAiE;AACpD,QAAA,UAAU,GAAG,cAAc,CAAA;AAC3B,QAAA,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,UAAU,EAAE,EAAE,IAAI,EAAE,cAAc,EAAE,CAAC,CAAA;AAC5D,QAAA,WAAW,GAAG,eAAe,CAAA;AAC7B,QAAA,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,WAAW,EAAE;IAChD,IAAI,EAAE,eAAe;CACtB,CAAC,CAAA;AACW,QAAA,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE;IAC1C,MAAM,EAAE,cAAc;IACtB,OAAO,EAAE,eAAe;CACzB,CAAC,CAAA;AAEF,qBAAqB;AACrB,uCAA4C;AAAnC,mGAAA,MAAM,OAAA;AAAE,qGAAA,QAAQ,OAAA;AACzB,qCAAgC;AAAvB,+FAAA,IAAI,OAAA;AAOb,+CAAyC;AAAhC,wGAAA,QAAQ,OAAA;AAGjB,oBAAoB;AAEP,QAAA,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE;IACvC,IAAI,EAAE,KAAK;IACX,QAAQ;IACR,IAAI,EAAJ,YAAI;IACJ,UAAU;IACV,MAAM,EAAN,cAAM;IACN,cAAc;IACd,UAAU,EAAV,kBAAU;IACV,WAAW;IACX,OAAO,EAAP,eAAO;IACP,eAAe;IACf,WAAW,EAAX,mBAAW;IACX,IAAI,EAAJ,cAAI;IACJ,QAAQ,EAAR,uBAAQ;IACR,MAAM,EAAN,kBAAM;IACN,QAAQ,EAAR,oBAAQ;CACT,CAAC,CAAA;AACF,YAAI,CAAC,IAAI,GAAG,YAAI,CAAA","sourcesContent":["import { escape, unescape } from 'minimatch'\nimport { Minipass } from 'minipass'\nimport { Path } from 'path-scurry'\nimport type {\n GlobOptions,\n GlobOptionsWithFileTypesFalse,\n GlobOptionsWithFileTypesTrue,\n GlobOptionsWithFileTypesUnset,\n} from './glob.js'\nimport { Glob } from './glob.js'\nimport { hasMagic } from './has-magic.js'\n\n/**\n * Syncronous form of {@link globStream}. Will read all the matches as fast as\n * you consume them, even all in a single tick if you consume them immediately,\n * but will still respond to backpressure if they're not consumed immediately.\n */\nexport function globStreamSync(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesTrue\n): Minipass\nexport function globStreamSync(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesFalse\n): Minipass\nexport function globStreamSync(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesUnset\n): Minipass\nexport function globStreamSync(\n pattern: string | string[],\n options: GlobOptions\n): Minipass | Minipass\nexport function globStreamSync(\n pattern: string | string[],\n options: GlobOptions = {}\n) {\n return new Glob(pattern, options).streamSync()\n}\n\n/**\n * Return a stream that emits all the strings or `Path` objects and\n * then emits `end` when completed.\n */\nexport function globStream(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesFalse\n): Minipass\nexport function globStream(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesTrue\n): Minipass\nexport function globStream(\n pattern: string | string[],\n options?: GlobOptionsWithFileTypesUnset | undefined\n): Minipass\nexport function globStream(\n pattern: string | string[],\n options: GlobOptions\n): Minipass | Minipass\nexport function globStream(\n pattern: string | string[],\n options: GlobOptions = {}\n) {\n return new Glob(pattern, options).stream()\n}\n\n/**\n * Synchronous form of {@link glob}\n */\nexport function globSync(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesFalse\n): string[]\nexport function globSync(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesTrue\n): Path[]\nexport function globSync(\n pattern: string | string[],\n options?: GlobOptionsWithFileTypesUnset | undefined\n): string[]\nexport function globSync(\n pattern: string | string[],\n options: GlobOptions\n): Path[] | string[]\nexport function globSync(\n pattern: string | string[],\n options: GlobOptions = {}\n) {\n return new Glob(pattern, options).walkSync()\n}\n\n/**\n * Perform an asynchronous glob search for the pattern(s) specified. Returns\n * [Path](https://isaacs.github.io/path-scurry/classes/PathBase) objects if the\n * {@link withFileTypes} option is set to `true`. See {@link GlobOptions} for\n * full option descriptions.\n */\nasync function glob_(\n pattern: string | string[],\n options?: GlobOptionsWithFileTypesUnset | undefined\n): Promise\nasync function glob_(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesTrue\n): Promise\nasync function glob_(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesFalse\n): Promise\nasync function glob_(\n pattern: string | string[],\n options: GlobOptions\n): Promise\nasync function glob_(\n pattern: string | string[],\n options: GlobOptions = {}\n) {\n return new Glob(pattern, options).walk()\n}\n\n/**\n * Return a sync iterator for walking glob pattern matches.\n */\nexport function globIterateSync(\n pattern: string | string[],\n options?: GlobOptionsWithFileTypesUnset | undefined\n): Generator\nexport function globIterateSync(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesTrue\n): Generator\nexport function globIterateSync(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesFalse\n): Generator\nexport function globIterateSync(\n pattern: string | string[],\n options: GlobOptions\n): Generator | Generator\nexport function globIterateSync(\n pattern: string | string[],\n options: GlobOptions = {}\n) {\n return new Glob(pattern, options).iterateSync()\n}\n\n/**\n * Return an async iterator for walking glob pattern matches.\n */\nexport function globIterate(\n pattern: string | string[],\n options?: GlobOptionsWithFileTypesUnset | undefined\n): AsyncGenerator\nexport function globIterate(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesTrue\n): AsyncGenerator\nexport function globIterate(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesFalse\n): AsyncGenerator\nexport function globIterate(\n pattern: string | string[],\n options: GlobOptions\n): AsyncGenerator | AsyncGenerator\nexport function globIterate(\n pattern: string | string[],\n options: GlobOptions = {}\n) {\n return new Glob(pattern, options).iterate()\n}\n\n// aliases: glob.sync.stream() glob.stream.sync() glob.sync() etc\nexport const streamSync = globStreamSync\nexport const stream = Object.assign(globStream, { sync: globStreamSync })\nexport const iterateSync = globIterateSync\nexport const iterate = Object.assign(globIterate, {\n sync: globIterateSync,\n})\nexport const sync = Object.assign(globSync, {\n stream: globStreamSync,\n iterate: globIterateSync,\n})\n\n/* c8 ignore start */\nexport { escape, unescape } from 'minimatch'\nexport { Glob } from './glob.js'\nexport type {\n GlobOptions,\n GlobOptionsWithFileTypesFalse,\n GlobOptionsWithFileTypesTrue,\n GlobOptionsWithFileTypesUnset,\n} from './glob.js'\nexport { hasMagic } from './has-magic.js'\nexport type { IgnoreLike } from './ignore.js'\nexport type { MatchStream } from './walker.js'\n/* c8 ignore stop */\n\nexport const glob = Object.assign(glob_, {\n glob: glob_,\n globSync,\n sync,\n globStream,\n stream,\n globStreamSync,\n streamSync,\n globIterate,\n iterate,\n globIterateSync,\n iterateSync,\n Glob,\n hasMagic,\n escape,\n unescape,\n})\nglob.glob = glob\n"]}
\ No newline at end of file
diff --git a/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob/dist/cjs/src/pattern.d.ts b/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob/dist/cjs/src/pattern.d.ts
deleted file mode 100644
index 109cc4e7a5dae3..00000000000000
--- a/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob/dist/cjs/src/pattern.d.ts
+++ /dev/null
@@ -1,77 +0,0 @@
-///
-import { GLOBSTAR } from 'minimatch';
-export type MMPattern = string | RegExp | typeof GLOBSTAR;
-export type PatternList = [p: MMPattern, ...rest: MMPattern[]];
-export type UNCPatternList = [
- p0: '',
- p1: '',
- p2: string,
- p3: string,
- ...rest: MMPattern[]
-];
-export type DrivePatternList = [p0: string, ...rest: MMPattern[]];
-export type AbsolutePatternList = [p0: '', ...rest: MMPattern[]];
-export type GlobList = [p: string, ...rest: string[]];
-/**
- * An immutable-ish view on an array of glob parts and their parsed
- * results
- */
-export declare class Pattern {
- #private;
- readonly length: number;
- constructor(patternList: MMPattern[], globList: string[], index: number, platform: NodeJS.Platform);
- /**
- * The first entry in the parsed list of patterns
- */
- pattern(): MMPattern;
- /**
- * true of if pattern() returns a string
- */
- isString(): boolean;
- /**
- * true of if pattern() returns GLOBSTAR
- */
- isGlobstar(): boolean;
- /**
- * true if pattern() returns a regexp
- */
- isRegExp(): boolean;
- /**
- * The /-joined set of glob parts that make up this pattern
- */
- globString(): string;
- /**
- * true if there are more pattern parts after this one
- */
- hasMore(): boolean;
- /**
- * The rest of the pattern after this part, or null if this is the end
- */
- rest(): Pattern | null;
- /**
- * true if the pattern represents a //unc/path/ on windows
- */
- isUNC(): boolean;
- /**
- * True if the pattern starts with a drive letter on Windows
- */
- isDrive(): boolean;
- /**
- * True if the pattern is rooted on an absolute path
- */
- isAbsolute(): boolean;
- /**
- * consume the root of the pattern, and return it
- */
- root(): string;
- /**
- * Check to see if the current globstar pattern is allowed to follow
- * a symbolic link.
- */
- checkFollowGlobstar(): boolean;
- /**
- * Mark that the current globstar pattern is following a symbolic link
- */
- markFollowGlobstar(): boolean;
-}
-//# sourceMappingURL=pattern.d.ts.map
\ No newline at end of file
diff --git a/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob/dist/cjs/src/pattern.d.ts.map b/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob/dist/cjs/src/pattern.d.ts.map
deleted file mode 100644
index 48430f63db0947..00000000000000
--- a/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob/dist/cjs/src/pattern.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"pattern.d.ts","sourceRoot":"","sources":["../../../src/pattern.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AACpC,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,QAAQ,CAAA;AAGzD,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,SAAS,EAAE,CAAC,CAAA;AAC9D,MAAM,MAAM,cAAc,GAAG;IAC3B,EAAE,EAAE,EAAE;IACN,EAAE,EAAE,EAAE;IACN,EAAE,EAAE,MAAM;IACV,EAAE,EAAE,MAAM;IACV,GAAG,IAAI,EAAE,SAAS,EAAE;CACrB,CAAA;AACD,MAAM,MAAM,gBAAgB,GAAG,CAAC,EAAE,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,SAAS,EAAE,CAAC,CAAA;AACjE,MAAM,MAAM,mBAAmB,GAAG,CAAC,EAAE,EAAE,EAAE,EAAE,GAAG,IAAI,EAAE,SAAS,EAAE,CAAC,CAAA;AAChE,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,MAAM,EAAE,CAAC,CAAA;AAMrD;;;GAGG;AACH,qBAAa,OAAO;;IAIlB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;gBAUrB,WAAW,EAAE,SAAS,EAAE,EACxB,QAAQ,EAAE,MAAM,EAAE,EAClB,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,MAAM,CAAC,QAAQ;IA6D3B;;OAEG;IACH,OAAO,IAAI,SAAS;IAIpB;;OAEG;IACH,QAAQ,IAAI,OAAO;IAGnB;;OAEG;IACH,UAAU,IAAI,OAAO;IAGrB;;OAEG;IACH,QAAQ,IAAI,OAAO;IAInB;;OAEG;IACH,UAAU,IAAI,MAAM;IAUpB;;OAEG;IACH,OAAO,IAAI,OAAO;IAIlB;;OAEG;IACH,IAAI,IAAI,OAAO,GAAG,IAAI;IAetB;;OAEG;IACH,KAAK,IAAI,OAAO;IAoBhB;;OAEG;IACH,OAAO,IAAI,OAAO;IAelB;;OAEG;IACH,UAAU,IAAI,OAAO;IAUrB;;OAEG;IACH,IAAI,IAAI,MAAM;IAOd;;;OAGG;IACH,mBAAmB,IAAI,OAAO;IAQ9B;;OAEG;IACH,kBAAkB,IAAI,OAAO;CAM9B"}
\ No newline at end of file
diff --git a/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob/dist/cjs/src/pattern.js b/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob/dist/cjs/src/pattern.js
deleted file mode 100644
index 181371293d8605..00000000000000
--- a/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob/dist/cjs/src/pattern.js
+++ /dev/null
@@ -1,219 +0,0 @@
-"use strict";
-// this is just a very light wrapper around 2 arrays with an offset index
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.Pattern = void 0;
-const minimatch_1 = require("minimatch");
-const isPatternList = (pl) => pl.length >= 1;
-const isGlobList = (gl) => gl.length >= 1;
-/**
- * An immutable-ish view on an array of glob parts and their parsed
- * results
- */
-class Pattern {
- #patternList;
- #globList;
- #index;
- length;
- #platform;
- #rest;
- #globString;
- #isDrive;
- #isUNC;
- #isAbsolute;
- #followGlobstar = true;
- constructor(patternList, globList, index, platform) {
- if (!isPatternList(patternList)) {
- throw new TypeError('empty pattern list');
- }
- if (!isGlobList(globList)) {
- throw new TypeError('empty glob list');
- }
- if (globList.length !== patternList.length) {
- throw new TypeError('mismatched pattern list and glob list lengths');
- }
- this.length = patternList.length;
- if (index < 0 || index >= this.length) {
- throw new TypeError('index out of range');
- }
- this.#patternList = patternList;
- this.#globList = globList;
- this.#index = index;
- this.#platform = platform;
- // normalize root entries of absolute patterns on initial creation.
- if (this.#index === 0) {
- // c: => ['c:/']
- // C:/ => ['C:/']
- // C:/x => ['C:/', 'x']
- // //host/share => ['//host/share/']
- // //host/share/ => ['//host/share/']
- // //host/share/x => ['//host/share/', 'x']
- // /etc => ['/', 'etc']
- // / => ['/']
- if (this.isUNC()) {
- // '' / '' / 'host' / 'share'
- const [p0, p1, p2, p3, ...prest] = this.#patternList;
- const [g0, g1, g2, g3, ...grest] = this.#globList;
- if (prest[0] === '') {
- // ends in /
- prest.shift();
- grest.shift();
- }
- const p = [p0, p1, p2, p3, ''].join('/');
- const g = [g0, g1, g2, g3, ''].join('/');
- this.#patternList = [p, ...prest];
- this.#globList = [g, ...grest];
- this.length = this.#patternList.length;
- }
- else if (this.isDrive() || this.isAbsolute()) {
- const [p1, ...prest] = this.#patternList;
- const [g1, ...grest] = this.#globList;
- if (prest[0] === '') {
- // ends in /
- prest.shift();
- grest.shift();
- }
- const p = p1 + '/';
- const g = g1 + '/';
- this.#patternList = [p, ...prest];
- this.#globList = [g, ...grest];
- this.length = this.#patternList.length;
- }
- }
- }
- /**
- * The first entry in the parsed list of patterns
- */
- pattern() {
- return this.#patternList[this.#index];
- }
- /**
- * true of if pattern() returns a string
- */
- isString() {
- return typeof this.#patternList[this.#index] === 'string';
- }
- /**
- * true of if pattern() returns GLOBSTAR
- */
- isGlobstar() {
- return this.#patternList[this.#index] === minimatch_1.GLOBSTAR;
- }
- /**
- * true if pattern() returns a regexp
- */
- isRegExp() {
- return this.#patternList[this.#index] instanceof RegExp;
- }
- /**
- * The /-joined set of glob parts that make up this pattern
- */
- globString() {
- return (this.#globString =
- this.#globString ||
- (this.#index === 0
- ? this.isAbsolute()
- ? this.#globList[0] + this.#globList.slice(1).join('/')
- : this.#globList.join('/')
- : this.#globList.slice(this.#index).join('/')));
- }
- /**
- * true if there are more pattern parts after this one
- */
- hasMore() {
- return this.length > this.#index + 1;
- }
- /**
- * The rest of the pattern after this part, or null if this is the end
- */
- rest() {
- if (this.#rest !== undefined)
- return this.#rest;
- if (!this.hasMore())
- return (this.#rest = null);
- this.#rest = new Pattern(this.#patternList, this.#globList, this.#index + 1, this.#platform);
- this.#rest.#isAbsolute = this.#isAbsolute;
- this.#rest.#isUNC = this.#isUNC;
- this.#rest.#isDrive = this.#isDrive;
- return this.#rest;
- }
- /**
- * true if the pattern represents a //unc/path/ on windows
- */
- isUNC() {
- const pl = this.#patternList;
- return this.#isUNC !== undefined
- ? this.#isUNC
- : (this.#isUNC =
- this.#platform === 'win32' &&
- this.#index === 0 &&
- pl[0] === '' &&
- pl[1] === '' &&
- typeof pl[2] === 'string' &&
- !!pl[2] &&
- typeof pl[3] === 'string' &&
- !!pl[3]);
- }
- // pattern like C:/...
- // split = ['C:', ...]
- // XXX: would be nice to handle patterns like `c:*` to test the cwd
- // in c: for *, but I don't know of a way to even figure out what that
- // cwd is without actually chdir'ing into it?
- /**
- * True if the pattern starts with a drive letter on Windows
- */
- isDrive() {
- const pl = this.#patternList;
- return this.#isDrive !== undefined
- ? this.#isDrive
- : (this.#isDrive =
- this.#platform === 'win32' &&
- this.#index === 0 &&
- this.length > 1 &&
- typeof pl[0] === 'string' &&
- /^[a-z]:$/i.test(pl[0]));
- }
- // pattern = '/' or '/...' or '/x/...'
- // split = ['', ''] or ['', ...] or ['', 'x', ...]
- // Drive and UNC both considered absolute on windows
- /**
- * True if the pattern is rooted on an absolute path
- */
- isAbsolute() {
- const pl = this.#patternList;
- return this.#isAbsolute !== undefined
- ? this.#isAbsolute
- : (this.#isAbsolute =
- (pl[0] === '' && pl.length > 1) ||
- this.isDrive() ||
- this.isUNC());
- }
- /**
- * consume the root of the pattern, and return it
- */
- root() {
- const p = this.#patternList[0];
- return typeof p === 'string' && this.isAbsolute() && this.#index === 0
- ? p
- : '';
- }
- /**
- * Check to see if the current globstar pattern is allowed to follow
- * a symbolic link.
- */
- checkFollowGlobstar() {
- return !(this.#index === 0 ||
- !this.isGlobstar() ||
- !this.#followGlobstar);
- }
- /**
- * Mark that the current globstar pattern is following a symbolic link
- */
- markFollowGlobstar() {
- if (this.#index === 0 || !this.isGlobstar() || !this.#followGlobstar)
- return false;
- this.#followGlobstar = false;
- return true;
- }
-}
-exports.Pattern = Pattern;
-//# sourceMappingURL=pattern.js.map
\ No newline at end of file
diff --git a/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob/dist/cjs/src/pattern.js.map b/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob/dist/cjs/src/pattern.js.map
deleted file mode 100644
index ba5293ff9f2489..00000000000000
--- a/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob/dist/cjs/src/pattern.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"pattern.js","sourceRoot":"","sources":["../../../src/pattern.ts"],"names":[],"mappings":"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","sourcesContent":["// this is just a very light wrapper around 2 arrays with an offset index\n\nimport { GLOBSTAR } from 'minimatch'\nexport type MMPattern = string | RegExp | typeof GLOBSTAR\n\n// an array of length >= 1\nexport type PatternList = [p: MMPattern, ...rest: MMPattern[]]\nexport type UNCPatternList = [\n p0: '',\n p1: '',\n p2: string,\n p3: string,\n ...rest: MMPattern[]\n]\nexport type DrivePatternList = [p0: string, ...rest: MMPattern[]]\nexport type AbsolutePatternList = [p0: '', ...rest: MMPattern[]]\nexport type GlobList = [p: string, ...rest: string[]]\n\nconst isPatternList = (pl: MMPattern[]): pl is PatternList =>\n pl.length >= 1\nconst isGlobList = (gl: string[]): gl is GlobList => gl.length >= 1\n\n/**\n * An immutable-ish view on an array of glob parts and their parsed\n * results\n */\nexport class Pattern {\n readonly #patternList: PatternList\n readonly #globList: GlobList\n readonly #index: number\n readonly length: number\n readonly #platform: NodeJS.Platform\n #rest?: Pattern | null\n #globString?: string\n #isDrive?: boolean\n #isUNC?: boolean\n #isAbsolute?: boolean\n #followGlobstar: boolean = true\n\n constructor(\n patternList: MMPattern[],\n globList: string[],\n index: number,\n platform: NodeJS.Platform\n ) {\n if (!isPatternList(patternList)) {\n throw new TypeError('empty pattern list')\n }\n if (!isGlobList(globList)) {\n throw new TypeError('empty glob list')\n }\n if (globList.length !== patternList.length) {\n throw new TypeError('mismatched pattern list and glob list lengths')\n }\n this.length = patternList.length\n if (index < 0 || index >= this.length) {\n throw new TypeError('index out of range')\n }\n this.#patternList = patternList\n this.#globList = globList\n this.#index = index\n this.#platform = platform\n\n // normalize root entries of absolute patterns on initial creation.\n if (this.#index === 0) {\n // c: => ['c:/']\n // C:/ => ['C:/']\n // C:/x => ['C:/', 'x']\n // //host/share => ['//host/share/']\n // //host/share/ => ['//host/share/']\n // //host/share/x => ['//host/share/', 'x']\n // /etc => ['/', 'etc']\n // / => ['/']\n if (this.isUNC()) {\n // '' / '' / 'host' / 'share'\n const [p0, p1, p2, p3, ...prest] = this.#patternList\n const [g0, g1, g2, g3, ...grest] = this.#globList\n if (prest[0] === '') {\n // ends in /\n prest.shift()\n grest.shift()\n }\n const p = [p0, p1, p2, p3, ''].join('/')\n const g = [g0, g1, g2, g3, ''].join('/')\n this.#patternList = [p, ...prest]\n this.#globList = [g, ...grest]\n this.length = this.#patternList.length\n } else if (this.isDrive() || this.isAbsolute()) {\n const [p1, ...prest] = this.#patternList\n const [g1, ...grest] = this.#globList\n if (prest[0] === '') {\n // ends in /\n prest.shift()\n grest.shift()\n }\n const p = (p1 as string) + '/'\n const g = g1 + '/'\n this.#patternList = [p, ...prest]\n this.#globList = [g, ...grest]\n this.length = this.#patternList.length\n }\n }\n }\n\n /**\n * The first entry in the parsed list of patterns\n */\n pattern(): MMPattern {\n return this.#patternList[this.#index]\n }\n\n /**\n * true of if pattern() returns a string\n */\n isString(): boolean {\n return typeof this.#patternList[this.#index] === 'string'\n }\n /**\n * true of if pattern() returns GLOBSTAR\n */\n isGlobstar(): boolean {\n return this.#patternList[this.#index] === GLOBSTAR\n }\n /**\n * true if pattern() returns a regexp\n */\n isRegExp(): boolean {\n return this.#patternList[this.#index] instanceof RegExp\n }\n\n /**\n * The /-joined set of glob parts that make up this pattern\n */\n globString(): string {\n return (this.#globString =\n this.#globString ||\n (this.#index === 0\n ? this.isAbsolute()\n ? this.#globList[0] + this.#globList.slice(1).join('/')\n : this.#globList.join('/')\n : this.#globList.slice(this.#index).join('/')))\n }\n\n /**\n * true if there are more pattern parts after this one\n */\n hasMore(): boolean {\n return this.length > this.#index + 1\n }\n\n /**\n * The rest of the pattern after this part, or null if this is the end\n */\n rest(): Pattern | null {\n if (this.#rest !== undefined) return this.#rest\n if (!this.hasMore()) return (this.#rest = null)\n this.#rest = new Pattern(\n this.#patternList,\n this.#globList,\n this.#index + 1,\n this.#platform\n )\n this.#rest.#isAbsolute = this.#isAbsolute\n this.#rest.#isUNC = this.#isUNC\n this.#rest.#isDrive = this.#isDrive\n return this.#rest\n }\n\n /**\n * true if the pattern represents a //unc/path/ on windows\n */\n isUNC(): boolean {\n const pl = this.#patternList\n return this.#isUNC !== undefined\n ? this.#isUNC\n : (this.#isUNC =\n this.#platform === 'win32' &&\n this.#index === 0 &&\n pl[0] === '' &&\n pl[1] === '' &&\n typeof pl[2] === 'string' &&\n !!pl[2] &&\n typeof pl[3] === 'string' &&\n !!pl[3])\n }\n\n // pattern like C:/...\n // split = ['C:', ...]\n // XXX: would be nice to handle patterns like `c:*` to test the cwd\n // in c: for *, but I don't know of a way to even figure out what that\n // cwd is without actually chdir'ing into it?\n /**\n * True if the pattern starts with a drive letter on Windows\n */\n isDrive(): boolean {\n const pl = this.#patternList\n return this.#isDrive !== undefined\n ? this.#isDrive\n : (this.#isDrive =\n this.#platform === 'win32' &&\n this.#index === 0 &&\n this.length > 1 &&\n typeof pl[0] === 'string' &&\n /^[a-z]:$/i.test(pl[0]))\n }\n\n // pattern = '/' or '/...' or '/x/...'\n // split = ['', ''] or ['', ...] or ['', 'x', ...]\n // Drive and UNC both considered absolute on windows\n /**\n * True if the pattern is rooted on an absolute path\n */\n isAbsolute(): boolean {\n const pl = this.#patternList\n return this.#isAbsolute !== undefined\n ? this.#isAbsolute\n : (this.#isAbsolute =\n (pl[0] === '' && pl.length > 1) ||\n this.isDrive() ||\n this.isUNC())\n }\n\n /**\n * consume the root of the pattern, and return it\n */\n root(): string {\n const p = this.#patternList[0]\n return typeof p === 'string' && this.isAbsolute() && this.#index === 0\n ? p\n : ''\n }\n\n /**\n * Check to see if the current globstar pattern is allowed to follow\n * a symbolic link.\n */\n checkFollowGlobstar(): boolean {\n return !(\n this.#index === 0 ||\n !this.isGlobstar() ||\n !this.#followGlobstar\n )\n }\n\n /**\n * Mark that the current globstar pattern is following a symbolic link\n */\n markFollowGlobstar(): boolean {\n if (this.#index === 0 || !this.isGlobstar() || !this.#followGlobstar)\n return false\n this.#followGlobstar = false\n return true\n }\n}\n"]}
\ No newline at end of file
diff --git a/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob/dist/cjs/src/processor.d.ts b/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob/dist/cjs/src/processor.d.ts
deleted file mode 100644
index ccedfbf2820f7d..00000000000000
--- a/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob/dist/cjs/src/processor.d.ts
+++ /dev/null
@@ -1,59 +0,0 @@
-import { MMRegExp } from 'minimatch';
-import { Path } from 'path-scurry';
-import { Pattern } from './pattern.js';
-import { GlobWalkerOpts } from './walker.js';
-/**
- * A cache of which patterns have been processed for a given Path
- */
-export declare class HasWalkedCache {
- store: Map>;
- constructor(store?: Map>);
- copy(): HasWalkedCache;
- hasWalked(target: Path, pattern: Pattern): boolean | undefined;
- storeWalked(target: Path, pattern: Pattern): void;
-}
-/**
- * A record of which paths have been matched in a given walk step,
- * and whether they only are considered a match if they are a directory,
- * and whether their absolute or relative path should be returned.
- */
-export declare class MatchRecord {
- store: Map;
- add(target: Path, absolute: boolean, ifDir: boolean): void;
- entries(): [Path, boolean, boolean][];
-}
-/**
- * A collection of patterns that must be processed in a subsequent step
- * for a given path.
- */
-export declare class SubWalks {
- store: Map;
- add(target: Path, pattern: Pattern): void;
- get(target: Path): Pattern[];
- entries(): [Path, Pattern[]][];
- keys(): Path[];
-}
-/**
- * The class that processes patterns for a given path.
- *
- * Handles child entry filtering, and determining whether a path's
- * directory contents must be read.
- */
-export declare class Processor {
- hasWalkedCache: HasWalkedCache;
- matches: MatchRecord;
- subwalks: SubWalks;
- patterns?: Pattern[];
- follow: boolean;
- dot: boolean;
- opts: GlobWalkerOpts;
- constructor(opts: GlobWalkerOpts, hasWalkedCache?: HasWalkedCache);
- processPatterns(target: Path, patterns: Pattern[]): this;
- subwalkTargets(): Path[];
- child(): Processor;
- filterEntries(parent: Path, entries: Path[]): Processor;
- testGlobstar(e: Path, pattern: Pattern, rest: Pattern | null, absolute: boolean): void;
- testRegExp(e: Path, p: MMRegExp, rest: Pattern | null, absolute: boolean): void;
- testString(e: Path, p: string, rest: Pattern | null, absolute: boolean): void;
-}
-//# sourceMappingURL=processor.d.ts.map
\ No newline at end of file
diff --git a/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob/dist/cjs/src/processor.d.ts.map b/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob/dist/cjs/src/processor.d.ts.map
deleted file mode 100644
index ca6c63ca264b27..00000000000000
--- a/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob/dist/cjs/src/processor.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"processor.d.ts","sourceRoot":"","sources":["../../../src/processor.ts"],"names":[],"mappings":"AAEA,OAAO,EAAY,QAAQ,EAAE,MAAM,WAAW,CAAA;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAClC,OAAO,EAAa,OAAO,EAAE,MAAM,cAAc,CAAA;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAE5C;;GAEG;AACH,qBAAa,cAAc;IACzB,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC,CAAA;gBACnB,KAAK,GAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,CAAa;IAGvD,IAAI;IAGJ,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO;IAGxC,WAAW,CAAC,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO;CAM3C;AAED;;;;GAIG;AACH,qBAAa,WAAW;IACtB,KAAK,EAAE,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC,CAAY;IACpC,GAAG,CAAC,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO;IAMnD,OAAO,IAAI,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE;CAOtC;AAED;;;GAGG;AACH,qBAAa,QAAQ;IACnB,KAAK,EAAE,GAAG,CAAC,IAAI,EAAE,OAAO,EAAE,CAAC,CAAY;IACvC,GAAG,CAAC,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO;IAWlC,GAAG,CAAC,MAAM,EAAE,IAAI,GAAG,OAAO,EAAE;IAS5B,OAAO,IAAI,CAAC,IAAI,EAAE,OAAO,EAAE,CAAC,EAAE;IAG9B,IAAI,IAAI,IAAI,EAAE;CAGf;AAED;;;;;GAKG;AACH,qBAAa,SAAS;IACpB,cAAc,EAAE,cAAc,CAAA;IAC9B,OAAO,cAAoB;IAC3B,QAAQ,WAAiB;IACzB,QAAQ,CAAC,EAAE,OAAO,EAAE,CAAA;IACpB,MAAM,EAAE,OAAO,CAAA;IACf,GAAG,EAAE,OAAO,CAAA;IACZ,IAAI,EAAE,cAAc,CAAA;gBAER,IAAI,EAAE,cAAc,EAAE,cAAc,CAAC,EAAE,cAAc;IASjE,eAAe,CAAC,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE;IAwGjD,cAAc,IAAI,IAAI,EAAE;IAIxB,KAAK;IAQL,aAAa,CAAC,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,SAAS;IAqBvD,YAAY,CACV,CAAC,EAAE,IAAI,EACP,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,OAAO,GAAG,IAAI,EACpB,QAAQ,EAAE,OAAO;IA8CnB,UAAU,CACR,CAAC,EAAE,IAAI,EACP,CAAC,EAAE,QAAQ,EACX,IAAI,EAAE,OAAO,GAAG,IAAI,EACpB,QAAQ,EAAE,OAAO;IAUnB,UAAU,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,IAAI,EAAE,QAAQ,EAAE,OAAO;CASvE"}
\ No newline at end of file
diff --git a/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob/dist/cjs/src/processor.js b/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob/dist/cjs/src/processor.js
deleted file mode 100644
index bd067e9b9033dc..00000000000000
--- a/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob/dist/cjs/src/processor.js
+++ /dev/null
@@ -1,309 +0,0 @@
-"use strict";
-// synchronous utility for filtering entries and calculating subwalks
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.Processor = exports.SubWalks = exports.MatchRecord = exports.HasWalkedCache = void 0;
-const minimatch_1 = require("minimatch");
-/**
- * A cache of which patterns have been processed for a given Path
- */
-class HasWalkedCache {
- store;
- constructor(store = new Map()) {
- this.store = store;
- }
- copy() {
- return new HasWalkedCache(new Map(this.store));
- }
- hasWalked(target, pattern) {
- return this.store.get(target.fullpath())?.has(pattern.globString());
- }
- storeWalked(target, pattern) {
- const fullpath = target.fullpath();
- const cached = this.store.get(fullpath);
- if (cached)
- cached.add(pattern.globString());
- else
- this.store.set(fullpath, new Set([pattern.globString()]));
- }
-}
-exports.HasWalkedCache = HasWalkedCache;
-/**
- * A record of which paths have been matched in a given walk step,
- * and whether they only are considered a match if they are a directory,
- * and whether their absolute or relative path should be returned.
- */
-class MatchRecord {
- store = new Map();
- add(target, absolute, ifDir) {
- const n = (absolute ? 2 : 0) | (ifDir ? 1 : 0);
- const current = this.store.get(target);
- this.store.set(target, current === undefined ? n : n & current);
- }
- // match, absolute, ifdir
- entries() {
- return [...this.store.entries()].map(([path, n]) => [
- path,
- !!(n & 2),
- !!(n & 1),
- ]);
- }
-}
-exports.MatchRecord = MatchRecord;
-/**
- * A collection of patterns that must be processed in a subsequent step
- * for a given path.
- */
-class SubWalks {
- store = new Map();
- add(target, pattern) {
- if (!target.canReaddir()) {
- return;
- }
- const subs = this.store.get(target);
- if (subs) {
- if (!subs.find(p => p.globString() === pattern.globString())) {
- subs.push(pattern);
- }
- }
- else
- this.store.set(target, [pattern]);
- }
- get(target) {
- const subs = this.store.get(target);
- /* c8 ignore start */
- if (!subs) {
- throw new Error('attempting to walk unknown path');
- }
- /* c8 ignore stop */
- return subs;
- }
- entries() {
- return this.keys().map(k => [k, this.store.get(k)]);
- }
- keys() {
- return [...this.store.keys()].filter(t => t.canReaddir());
- }
-}
-exports.SubWalks = SubWalks;
-/**
- * The class that processes patterns for a given path.
- *
- * Handles child entry filtering, and determining whether a path's
- * directory contents must be read.
- */
-class Processor {
- hasWalkedCache;
- matches = new MatchRecord();
- subwalks = new SubWalks();
- patterns;
- follow;
- dot;
- opts;
- constructor(opts, hasWalkedCache) {
- this.opts = opts;
- this.follow = !!opts.follow;
- this.dot = !!opts.dot;
- this.hasWalkedCache = hasWalkedCache
- ? hasWalkedCache.copy()
- : new HasWalkedCache();
- }
- processPatterns(target, patterns) {
- this.patterns = patterns;
- const processingSet = patterns.map(p => [target, p]);
- // map of paths to the magic-starting subwalks they need to walk
- // first item in patterns is the filter
- for (let [t, pattern] of processingSet) {
- this.hasWalkedCache.storeWalked(t, pattern);
- const root = pattern.root();
- const absolute = pattern.isAbsolute() && this.opts.absolute !== false;
- // start absolute patterns at root
- if (root) {
- t = t.resolve(root === '/' && this.opts.root !== undefined
- ? this.opts.root
- : root);
- const rest = pattern.rest();
- if (!rest) {
- this.matches.add(t, true, false);
- continue;
- }
- else {
- pattern = rest;
- }
- }
- if (t.isENOENT())
- continue;
- let p;
- let rest;
- let changed = false;
- while (typeof (p = pattern.pattern()) === 'string' &&
- (rest = pattern.rest())) {
- const c = t.resolve(p);
- // we can be reasonably sure that .. is a readable dir
- if (c.isUnknown() && p !== '..')
- break;
- t = c;
- pattern = rest;
- changed = true;
- }
- p = pattern.pattern();
- rest = pattern.rest();
- if (changed) {
- if (this.hasWalkedCache.hasWalked(t, pattern))
- continue;
- this.hasWalkedCache.storeWalked(t, pattern);
- }
- // now we have either a final string for a known entry,
- // more strings for an unknown entry,
- // or a pattern starting with magic, mounted on t.
- if (typeof p === 'string') {
- // must be final entry
- if (!rest) {
- const ifDir = p === '..' || p === '' || p === '.';
- this.matches.add(t.resolve(p), absolute, ifDir);
- }
- else {
- this.subwalks.add(t, pattern);
- }
- continue;
- }
- else if (p === minimatch_1.GLOBSTAR) {
- // if no rest, match and subwalk pattern
- // if rest, process rest and subwalk pattern
- // if it's a symlink, but we didn't get here by way of a
- // globstar match (meaning it's the first time THIS globstar
- // has traversed a symlink), then we follow it. Otherwise, stop.
- if (!t.isSymbolicLink() ||
- this.follow ||
- pattern.checkFollowGlobstar()) {
- this.subwalks.add(t, pattern);
- }
- const rp = rest?.pattern();
- const rrest = rest?.rest();
- if (!rest || ((rp === '' || rp === '.') && !rrest)) {
- // only HAS to be a dir if it ends in **/ or **/.
- // but ending in ** will match files as well.
- this.matches.add(t, absolute, rp === '' || rp === '.');
- }
- else {
- if (rp === '..') {
- // this would mean you're matching **/.. at the fs root,
- // and no thanks, I'm not gonna test that specific case.
- /* c8 ignore start */
- const tp = t.parent || t;
- /* c8 ignore stop */
- if (!rrest)
- this.matches.add(tp, absolute, true);
- else if (!this.hasWalkedCache.hasWalked(tp, rrest)) {
- this.subwalks.add(tp, rrest);
- }
- }
- }
- }
- else if (p instanceof RegExp) {
- this.subwalks.add(t, pattern);
- }
- }
- return this;
- }
- subwalkTargets() {
- return this.subwalks.keys();
- }
- child() {
- return new Processor(this.opts, this.hasWalkedCache);
- }
- // return a new Processor containing the subwalks for each
- // child entry, and a set of matches, and
- // a hasWalkedCache that's a copy of this one
- // then we're going to call
- filterEntries(parent, entries) {
- const patterns = this.subwalks.get(parent);
- // put matches and entry walks into the results processor
- const results = this.child();
- for (const e of entries) {
- for (const pattern of patterns) {
- const absolute = pattern.isAbsolute();
- const p = pattern.pattern();
- const rest = pattern.rest();
- if (p === minimatch_1.GLOBSTAR) {
- results.testGlobstar(e, pattern, rest, absolute);
- }
- else if (p instanceof RegExp) {
- results.testRegExp(e, p, rest, absolute);
- }
- else {
- results.testString(e, p, rest, absolute);
- }
- }
- }
- return results;
- }
- testGlobstar(e, pattern, rest, absolute) {
- if (this.dot || !e.name.startsWith('.')) {
- if (!pattern.hasMore()) {
- this.matches.add(e, absolute, false);
- }
- if (e.canReaddir()) {
- // if we're in follow mode or it's not a symlink, just keep
- // testing the same pattern. If there's more after the globstar,
- // then this symlink consumes the globstar. If not, then we can
- // follow at most ONE symlink along the way, so we mark it, which
- // also checks to ensure that it wasn't already marked.
- if (this.follow || !e.isSymbolicLink()) {
- this.subwalks.add(e, pattern);
- }
- else if (e.isSymbolicLink()) {
- if (rest && pattern.checkFollowGlobstar()) {
- this.subwalks.add(e, rest);
- }
- else if (pattern.markFollowGlobstar()) {
- this.subwalks.add(e, pattern);
- }
- }
- }
- }
- // if the NEXT thing matches this entry, then also add
- // the rest.
- if (rest) {
- const rp = rest.pattern();
- if (typeof rp === 'string' &&
- // dots and empty were handled already
- rp !== '..' &&
- rp !== '' &&
- rp !== '.') {
- this.testString(e, rp, rest.rest(), absolute);
- }
- else if (rp === '..') {
- /* c8 ignore start */
- const ep = e.parent || e;
- /* c8 ignore stop */
- this.subwalks.add(ep, rest);
- }
- else if (rp instanceof RegExp) {
- this.testRegExp(e, rp, rest.rest(), absolute);
- }
- }
- }
- testRegExp(e, p, rest, absolute) {
- if (!p.test(e.name))
- return;
- if (!rest) {
- this.matches.add(e, absolute, false);
- }
- else {
- this.subwalks.add(e, rest);
- }
- }
- testString(e, p, rest, absolute) {
- // should never happen?
- if (!e.isNamed(p))
- return;
- if (!rest) {
- this.matches.add(e, absolute, false);
- }
- else {
- this.subwalks.add(e, rest);
- }
- }
-}
-exports.Processor = Processor;
-//# sourceMappingURL=processor.js.map
\ No newline at end of file
diff --git a/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob/dist/cjs/src/processor.js.map b/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob/dist/cjs/src/processor.js.map
deleted file mode 100644
index bcbac1f723f983..00000000000000
--- a/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob/dist/cjs/src/processor.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"processor.js","sourceRoot":"","sources":["../../../src/processor.ts"],"names":[],"mappings":"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","sourcesContent":["// synchronous utility for filtering entries and calculating subwalks\n\nimport { GLOBSTAR, MMRegExp } from 'minimatch'\nimport { Path } from 'path-scurry'\nimport { MMPattern, Pattern } from './pattern.js'\nimport { GlobWalkerOpts } from './walker.js'\n\n/**\n * A cache of which patterns have been processed for a given Path\n */\nexport class HasWalkedCache {\n store: Map>\n constructor(store: Map> = new Map()) {\n this.store = store\n }\n copy() {\n return new HasWalkedCache(new Map(this.store))\n }\n hasWalked(target: Path, pattern: Pattern) {\n return this.store.get(target.fullpath())?.has(pattern.globString())\n }\n storeWalked(target: Path, pattern: Pattern) {\n const fullpath = target.fullpath()\n const cached = this.store.get(fullpath)\n if (cached) cached.add(pattern.globString())\n else this.store.set(fullpath, new Set([pattern.globString()]))\n }\n}\n\n/**\n * A record of which paths have been matched in a given walk step,\n * and whether they only are considered a match if they are a directory,\n * and whether their absolute or relative path should be returned.\n */\nexport class MatchRecord {\n store: Map = new Map()\n add(target: Path, absolute: boolean, ifDir: boolean) {\n const n = (absolute ? 2 : 0) | (ifDir ? 1 : 0)\n const current = this.store.get(target)\n this.store.set(target, current === undefined ? n : n & current)\n }\n // match, absolute, ifdir\n entries(): [Path, boolean, boolean][] {\n return [...this.store.entries()].map(([path, n]) => [\n path,\n !!(n & 2),\n !!(n & 1),\n ])\n }\n}\n\n/**\n * A collection of patterns that must be processed in a subsequent step\n * for a given path.\n */\nexport class SubWalks {\n store: Map = new Map()\n add(target: Path, pattern: Pattern) {\n if (!target.canReaddir()) {\n return\n }\n const subs = this.store.get(target)\n if (subs) {\n if (!subs.find(p => p.globString() === pattern.globString())) {\n subs.push(pattern)\n }\n } else this.store.set(target, [pattern])\n }\n get(target: Path): Pattern[] {\n const subs = this.store.get(target)\n /* c8 ignore start */\n if (!subs) {\n throw new Error('attempting to walk unknown path')\n }\n /* c8 ignore stop */\n return subs\n }\n entries(): [Path, Pattern[]][] {\n return this.keys().map(k => [k, this.store.get(k) as Pattern[]])\n }\n keys(): Path[] {\n return [...this.store.keys()].filter(t => t.canReaddir())\n }\n}\n\n/**\n * The class that processes patterns for a given path.\n *\n * Handles child entry filtering, and determining whether a path's\n * directory contents must be read.\n */\nexport class Processor {\n hasWalkedCache: HasWalkedCache\n matches = new MatchRecord()\n subwalks = new SubWalks()\n patterns?: Pattern[]\n follow: boolean\n dot: boolean\n opts: GlobWalkerOpts\n\n constructor(opts: GlobWalkerOpts, hasWalkedCache?: HasWalkedCache) {\n this.opts = opts\n this.follow = !!opts.follow\n this.dot = !!opts.dot\n this.hasWalkedCache = hasWalkedCache\n ? hasWalkedCache.copy()\n : new HasWalkedCache()\n }\n\n processPatterns(target: Path, patterns: Pattern[]) {\n this.patterns = patterns\n const processingSet: [Path, Pattern][] = patterns.map(p => [target, p])\n\n // map of paths to the magic-starting subwalks they need to walk\n // first item in patterns is the filter\n\n for (let [t, pattern] of processingSet) {\n this.hasWalkedCache.storeWalked(t, pattern)\n\n const root = pattern.root()\n const absolute = pattern.isAbsolute() && this.opts.absolute !== false\n\n // start absolute patterns at root\n if (root) {\n t = t.resolve(\n root === '/' && this.opts.root !== undefined\n ? this.opts.root\n : root\n )\n const rest = pattern.rest()\n if (!rest) {\n this.matches.add(t, true, false)\n continue\n } else {\n pattern = rest\n }\n }\n\n if (t.isENOENT()) continue\n\n let p: MMPattern\n let rest: Pattern | null\n let changed = false\n while (\n typeof (p = pattern.pattern()) === 'string' &&\n (rest = pattern.rest())\n ) {\n const c = t.resolve(p)\n // we can be reasonably sure that .. is a readable dir\n if (c.isUnknown() && p !== '..') break\n t = c\n pattern = rest\n changed = true\n }\n p = pattern.pattern()\n rest = pattern.rest()\n if (changed) {\n if (this.hasWalkedCache.hasWalked(t, pattern)) continue\n this.hasWalkedCache.storeWalked(t, pattern)\n }\n\n // now we have either a final string for a known entry,\n // more strings for an unknown entry,\n // or a pattern starting with magic, mounted on t.\n if (typeof p === 'string') {\n // must be final entry\n if (!rest) {\n const ifDir = p === '..' || p === '' || p === '.'\n this.matches.add(t.resolve(p), absolute, ifDir)\n } else {\n this.subwalks.add(t, pattern)\n }\n continue\n } else if (p === GLOBSTAR) {\n // if no rest, match and subwalk pattern\n // if rest, process rest and subwalk pattern\n // if it's a symlink, but we didn't get here by way of a\n // globstar match (meaning it's the first time THIS globstar\n // has traversed a symlink), then we follow it. Otherwise, stop.\n if (\n !t.isSymbolicLink() ||\n this.follow ||\n pattern.checkFollowGlobstar()\n ) {\n this.subwalks.add(t, pattern)\n }\n const rp = rest?.pattern()\n const rrest = rest?.rest()\n if (!rest || ((rp === '' || rp === '.') && !rrest)) {\n // only HAS to be a dir if it ends in **/ or **/.\n // but ending in ** will match files as well.\n this.matches.add(t, absolute, rp === '' || rp === '.')\n } else {\n if (rp === '..') {\n // this would mean you're matching **/.. at the fs root,\n // and no thanks, I'm not gonna test that specific case.\n /* c8 ignore start */\n const tp = t.parent || t\n /* c8 ignore stop */\n if (!rrest) this.matches.add(tp, absolute, true)\n else if (!this.hasWalkedCache.hasWalked(tp, rrest)) {\n this.subwalks.add(tp, rrest)\n }\n }\n }\n } else if (p instanceof RegExp) {\n this.subwalks.add(t, pattern)\n }\n }\n\n return this\n }\n\n subwalkTargets(): Path[] {\n return this.subwalks.keys()\n }\n\n child() {\n return new Processor(this.opts, this.hasWalkedCache)\n }\n\n // return a new Processor containing the subwalks for each\n // child entry, and a set of matches, and\n // a hasWalkedCache that's a copy of this one\n // then we're going to call\n filterEntries(parent: Path, entries: Path[]): Processor {\n const patterns = this.subwalks.get(parent)\n // put matches and entry walks into the results processor\n const results = this.child()\n for (const e of entries) {\n for (const pattern of patterns) {\n const absolute = pattern.isAbsolute()\n const p = pattern.pattern()\n const rest = pattern.rest()\n if (p === GLOBSTAR) {\n results.testGlobstar(e, pattern, rest, absolute)\n } else if (p instanceof RegExp) {\n results.testRegExp(e, p, rest, absolute)\n } else {\n results.testString(e, p, rest, absolute)\n }\n }\n }\n return results\n }\n\n testGlobstar(\n e: Path,\n pattern: Pattern,\n rest: Pattern | null,\n absolute: boolean\n ) {\n if (this.dot || !e.name.startsWith('.')) {\n if (!pattern.hasMore()) {\n this.matches.add(e, absolute, false)\n }\n if (e.canReaddir()) {\n // if we're in follow mode or it's not a symlink, just keep\n // testing the same pattern. If there's more after the globstar,\n // then this symlink consumes the globstar. If not, then we can\n // follow at most ONE symlink along the way, so we mark it, which\n // also checks to ensure that it wasn't already marked.\n if (this.follow || !e.isSymbolicLink()) {\n this.subwalks.add(e, pattern)\n } else if (e.isSymbolicLink()) {\n if (rest && pattern.checkFollowGlobstar()) {\n this.subwalks.add(e, rest)\n } else if (pattern.markFollowGlobstar()) {\n this.subwalks.add(e, pattern)\n }\n }\n }\n }\n // if the NEXT thing matches this entry, then also add\n // the rest.\n if (rest) {\n const rp = rest.pattern()\n if (\n typeof rp === 'string' &&\n // dots and empty were handled already\n rp !== '..' &&\n rp !== '' &&\n rp !== '.'\n ) {\n this.testString(e, rp, rest.rest(), absolute)\n } else if (rp === '..') {\n /* c8 ignore start */\n const ep = e.parent || e\n /* c8 ignore stop */\n this.subwalks.add(ep, rest)\n } else if (rp instanceof RegExp) {\n this.testRegExp(e, rp, rest.rest(), absolute)\n }\n }\n }\n\n testRegExp(\n e: Path,\n p: MMRegExp,\n rest: Pattern | null,\n absolute: boolean\n ) {\n if (!p.test(e.name)) return\n if (!rest) {\n this.matches.add(e, absolute, false)\n } else {\n this.subwalks.add(e, rest)\n }\n }\n\n testString(e: Path, p: string, rest: Pattern | null, absolute: boolean) {\n // should never happen?\n if (!e.isNamed(p)) return\n if (!rest) {\n this.matches.add(e, absolute, false)\n } else {\n this.subwalks.add(e, rest)\n }\n }\n}\n"]}
\ No newline at end of file
diff --git a/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob/dist/cjs/src/walker.d.ts b/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob/dist/cjs/src/walker.d.ts
deleted file mode 100644
index 5c1a0414971b3a..00000000000000
--- a/deps/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob/dist/cjs/src/walker.d.ts
+++ /dev/null
@@ -1,96 +0,0 @@
-///
-/**
- * Single-use utility classes to provide functionality to the {@link Glob}
- * methods.
- *
- * @module
- */
-import { Minipass } from 'minipass';
-import { Path } from 'path-scurry';
-import { IgnoreLike } from './ignore.js';
-import { Pattern } from './pattern.js';
-import { Processor } from './processor.js';
-export interface GlobWalkerOpts {
- absolute?: boolean;
- allowWindowsEscape?: boolean;
- cwd?: string | URL;
- dot?: boolean;
- dotRelative?: boolean;
- follow?: boolean;
- ignore?: string | string[] | IgnoreLike;
- mark?: boolean;
- matchBase?: boolean;
- maxDepth?: number;
- nobrace?: boolean;
- nocase?: boolean;
- nodir?: boolean;
- noext?: boolean;
- noglobstar?: boolean;
- platform?: NodeJS.Platform;
- posix?: boolean;
- realpath?: boolean;
- root?: string;
- stat?: boolean;
- signal?: AbortSignal;
- windowsPathsNoEscape?: boolean;
- withFileTypes?: boolean;
-}
-export type GWOFileTypesTrue = GlobWalkerOpts & {
- withFileTypes: true;
-};
-export type GWOFileTypesFalse = GlobWalkerOpts & {
- withFileTypes: false;
-};
-export type GWOFileTypesUnset = GlobWalkerOpts & {
- withFileTypes?: undefined;
-};
-export type Result = O extends GWOFileTypesTrue ? Path : O extends GWOFileTypesFalse ? string : O extends GWOFileTypesUnset ? string : Path | string;
-export type Matches = O extends GWOFileTypesTrue ? Set : O extends GWOFileTypesFalse ? Set : O extends GWOFileTypesUnset ? Set : Set;
-export type MatchStream = O extends GWOFileTypesTrue ? Minipass : O extends GWOFileTypesFalse ? Minipass : O extends GWOFileTypesUnset ? Minipass : Minipass;
-/**
- * basic walking utilities that all the glob walker types use
- */
-export declare abstract class GlobUtil {
- #private;
- path: Path;
- patterns: Pattern[];
- opts: O;
- seen: Set;
- paused: boolean;
- aborted: boolean;
- signal?: AbortSignal;
- maxDepth: number;
- constructor(patterns: Pattern[], path: Path, opts: O);
- pause(): void;
- resume(): void;
- onResume(fn: () => any): void;
- matchCheck(e: Path, ifDir: boolean): Promise;
- matchCheckTest(e: Path | undefined, ifDir: boolean): Path | undefined;
- matchCheckSync(e: Path, ifDir: boolean): Path | undefined;
- abstract matchEmit(p: Result): void;
- abstract matchEmit(p: string | Path): void;
- matchFinish(e: Path, absolute: boolean): void;
- match(e: Path, absolute: boolean, ifDir: boolean): Promise;
- matchSync(e: Path, absolute: boolean, ifDir: boolean): void;
- walkCB(target: Path, patterns: Pattern[], cb: () => any): void;
- walkCB2(target: Path, patterns: Pattern[], processor: Processor, cb: () => any): any;
- walkCB3(target: Path, entries: Path[], processor: Processor, cb: () => any): void;
- walkCBSync(target: Path, patterns: Pattern[], cb: () => any): void;
- walkCB2Sync(target: Path, patterns: Pattern[], processor: Processor, cb: () => any): any;
- walkCB3Sync(target: Path, entries: Path[], processor: Processor, cb: () => any): void;
-}
-export declare class GlobWalker extends GlobUtil {
- matches: O extends GWOFileTypesTrue ? Set : O extends GWOFileTypesFalse ? Set : O extends GWOFileTypesUnset ? Set : Set;
- constructor(patterns: Pattern[], path: Path, opts: O);
- matchEmit(e: Result): void;
- walk(): Promise>;
- walkSync(): Matches;
-}
-export declare class GlobStream extends GlobUtil {
- results: O extends GWOFileTypesTrue ? Minipass : O extends GWOFileTypesFalse ? Minipass : O extends GWOFileTypesUnset ? Minipass