From 03f67d6d6d0ddf06cc5d87ac80d9171ab065ad3e Mon Sep 17 00:00:00 2001
From: npm CLI robot
Date: Fri, 19 May 2023 06:45:02 -0700
Subject: [PATCH] deps: upgrade npm to 9.6.7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
PR-URL: https://github.com/nodejs/node/pull/48062
Reviewed-By: Luke Karrys
Reviewed-By: Michaël Zasso
Reviewed-By: Marco Ippolito
Reviewed-By: Jiawen Geng
Reviewed-By: Luigi Pinca
---
deps/npm/docs/content/commands/npm-ls.md | 2 +-
deps/npm/docs/content/commands/npm.md | 2 +-
.../content/configuring-npm/package-json.md | 2 +-
deps/npm/docs/content/using-npm/config.md | 22 +-
deps/npm/docs/output/commands/npm-ls.html | 2 +-
deps/npm/docs/output/commands/npm.html | 2 +-
.../output/configuring-npm/package-json.html | 2 +-
deps/npm/docs/output/using-npm/config.html | 22 +-
deps/npm/lib/commands/cache.js | 3 +-
deps/npm/lib/utils/config/definitions.js | 3 +
deps/npm/lib/utils/exit-handler.js | 4 +-
deps/npm/man/man1/npm-ls.1 | 2 +-
deps/npm/man/man1/npm.1 | 2 +-
deps/npm/man/man5/npm-json.5 | 2 +-
deps/npm/man/man5/package-json.5 | 2 +-
deps/npm/man/man7/config.7 | 22 +-
.../node_modules/@npmcli/config/lib/index.js | 25 +-
.../node_modules/@npmcli/config/package.json | 2 +-
.../@npmcli/package-json/lib/index.js | 157 ++++++++--
.../@npmcli/package-json/lib/normalize.js | 284 ++++++++++++++++++
.../@npmcli/package-json/package.json | 14 +-
.../@npmcli/run-script/lib/run-script-pkg.js | 4 +
.../@npmcli/run-script/lib/signal-manager.js | 14 +-
.../@npmcli/run-script/package.json | 6 +-
.../node_modules/cacache/lib/content/write.js | 32 +-
deps/npm/node_modules/cacache/package.json | 6 +-
.../node_modules/glob/dist/cjs/package.json | 4 +-
.../glob/dist/cjs/src/glob.d.ts.map | 2 +-
.../node_modules/glob/dist/cjs/src/glob.js | 7 +-
.../glob/dist/cjs/src/glob.js.map | 2 +-
.../node_modules/glob/dist/mjs/glob.d.ts.map | 2 +-
deps/npm/node_modules/glob/dist/mjs/glob.js | 7 +-
.../node_modules/glob/dist/mjs/glob.js.map | 2 +-
.../node_modules/glob/dist/mjs/package.json | 2 +-
deps/npm/node_modules/glob/package.json | 4 +-
.../node_modules/libnpmpublish/lib/publish.js | 53 +++-
.../node_modules/libnpmpublish/package.json | 2 +-
.../path-scurry/dist/cjs/index.js | 49 ++-
.../path-scurry/dist/mjs/index.js | 49 ++-
.../npm/node_modules/path-scurry/package.json | 8 +-
.../postcss-selector-parser/API.md | 7 +-
.../postcss-selector-parser/dist/parser.js | 4 +
.../postcss-selector-parser/package.json | 2 +-
.../lib/internal/streams/add-abort-signal.js | 30 +-
.../lib/internal/streams/compose.js | 143 ++++++---
.../lib/internal/streams/destroy.js | 19 +-
.../lib/internal/streams/duplexify.js | 2 -
.../lib/internal/streams/end-of-stream.js | 81 ++++-
.../lib/internal/streams/operators.js | 25 +-
.../lib/internal/streams/pipeline.js | 113 ++++++-
.../lib/internal/streams/utils.js | 30 +-
.../lib/internal/validators.js | 119 +++++++-
.../readable-stream/lib/ours/primordials.js | 1 +
.../readable-stream/lib/stream/promises.js | 11 +-
.../node_modules/readable-stream/package.json | 2 +-
.../npm/node_modules/semver/classes/semver.js | 2 +-
deps/npm/node_modules/semver/package.json | 6 +-
.../signal-exit/dist/cjs/index.js | 1 -
.../signal-exit/dist/mjs/index.js | 1 -
.../npm/node_modules/signal-exit/package.json | 2 +-
deps/npm/node_modules/sigstore/README.md | 78 ++---
.../node_modules/sigstore/dist/ca/index.d.ts | 5 +-
.../node_modules/sigstore/dist/ca/index.js | 19 +-
.../sigstore/dist/ca/verify/chain.d.ts | 2 +-
.../sigstore/dist/ca/verify/chain.js | 11 +-
.../sigstore/dist/ca/verify/index.js | 5 +-
.../node_modules/sigstore/dist/config.d.ts | 24 +-
deps/npm/node_modules/sigstore/dist/config.js | 19 +-
.../npm/node_modules/sigstore/dist/error.d.ts | 2 +-
.../sigstore/dist/external/fulcio.d.ts | 13 +-
.../sigstore/dist/external/fulcio.js | 4 +-
.../sigstore/dist/external/index.d.ts | 1 +
.../sigstore/dist/external/index.js | 4 +-
.../sigstore/dist/external/rekor.d.ts | 5 +-
.../sigstore/dist/external/rekor.js | 4 +-
.../sigstore/dist/external/tsa.d.ts | 18 ++
.../sigstore/dist/external/tsa.js | 47 +++
deps/npm/node_modules/sigstore/dist/sign.d.ts | 17 +-
deps/npm/node_modules/sigstore/dist/sign.js | 53 +++-
.../sigstore/dist/sigstore-utils.js | 7 +-
.../node_modules/sigstore/dist/sigstore.d.ts | 3 +
.../node_modules/sigstore/dist/sigstore.js | 19 +-
.../sigstore/dist/tlog/index.d.ts | 16 +-
.../node_modules/sigstore/dist/tlog/index.js | 13 +-
.../node_modules/sigstore/dist/tsa/index.d.ts | 13 +
.../node_modules/sigstore/dist/tsa/index.js | 47 +++
.../node_modules/sigstore/dist/tuf/index.d.ts | 13 +-
.../node_modules/sigstore/dist/tuf/index.js | 49 ++-
.../node_modules/sigstore/dist/tuf/target.js | 2 +-
.../sigstore/dist/types/fetch.d.ts | 6 +
.../node_modules/sigstore/dist/types/fetch.js | 2 +
.../sigstore/dist/types/sigstore/index.d.ts | 20 +-
.../sigstore/dist/types/sigstore/index.js | 48 ++-
deps/npm/node_modules/sigstore/dist/verify.js | 4 +-
.../sigstore/dist/x509/verify.d.ts | 2 +-
.../node_modules/sigstore/dist/x509/verify.js | 36 ++-
deps/npm/node_modules/sigstore/package.json | 44 +--
.../store/public-good-instance-root.json | 157 +---------
deps/npm/node_modules/tuf-js/dist/fetcher.js | 3 +
deps/npm/node_modules/tuf-js/dist/updater.js | 8 +
deps/npm/node_modules/tuf-js/package.json | 10 +-
deps/npm/package.json | 16 +-
.../tap-snapshots/test/lib/docs.js.test.cjs | 22 +-
103 files changed, 1702 insertions(+), 623 deletions(-)
create mode 100644 deps/npm/node_modules/@npmcli/package-json/lib/normalize.js
create mode 100644 deps/npm/node_modules/sigstore/dist/external/tsa.d.ts
create mode 100644 deps/npm/node_modules/sigstore/dist/external/tsa.js
create mode 100644 deps/npm/node_modules/sigstore/dist/tsa/index.d.ts
create mode 100644 deps/npm/node_modules/sigstore/dist/tsa/index.js
create mode 100644 deps/npm/node_modules/sigstore/dist/types/fetch.d.ts
create mode 100644 deps/npm/node_modules/sigstore/dist/types/fetch.js
diff --git a/deps/npm/docs/content/commands/npm-ls.md b/deps/npm/docs/content/commands/npm-ls.md
index b712738b3dd294..1ba7a4b73d5000 100644
--- a/deps/npm/docs/content/commands/npm-ls.md
+++ b/deps/npm/docs/content/commands/npm-ls.md
@@ -27,7 +27,7 @@ packages will *also* show the paths to the specified packages. For
example, running `npm ls promzard` in npm's source tree will show:
```bash
-npm@9.6.6 /path/to/npm
+npm@9.6.7 /path/to/npm
└─┬ init-package-json@0.0.4
└── promzard@0.1.5
```
diff --git a/deps/npm/docs/content/commands/npm.md b/deps/npm/docs/content/commands/npm.md
index 91356999e3a8d7..347e7d40993c88 100644
--- a/deps/npm/docs/content/commands/npm.md
+++ b/deps/npm/docs/content/commands/npm.md
@@ -14,7 +14,7 @@ Note: This command is unaware of workspaces.
### Version
-9.6.6
+9.6.7
### Description
diff --git a/deps/npm/docs/content/configuring-npm/package-json.md b/deps/npm/docs/content/configuring-npm/package-json.md
index ac5a5740ed3bfd..ff06a872d38c5d 100644
--- a/deps/npm/docs/content/configuring-npm/package-json.md
+++ b/deps/npm/docs/content/configuring-npm/package-json.md
@@ -323,7 +323,7 @@ This should be a module relative to the root of your package folder.
For most modules, it makes the most sense to have a main script and often
not much else.
-If `main` is not set it defaults to `index.js` in the package's root folder.
+If `main` is not set, it defaults to `index.js` in the package's root folder.
### browser
diff --git a/deps/npm/docs/content/using-npm/config.md b/deps/npm/docs/content/using-npm/config.md
index ae46b1eb438e2f..51983cbbe16718 100644
--- a/deps/npm/docs/content/using-npm/config.md
+++ b/deps/npm/docs/content/using-npm/config.md
@@ -289,16 +289,6 @@ npm exec --package yo --package generator-node --call "yo node"
```
-#### `ci-name`
-
-* Default: The name of the current CI system, or `null` when not on a known CI
- platform.
-* Type: null or String
-
-The name of a continuous integration system. If not set explicitly, npm will
-detect the current CI environment using the
-[`ci-info`](http://npm.im/ci-info) module.
-
#### `cidr`
* Default: null
@@ -1514,6 +1504,18 @@ It is _not_ the path to a certificate file, though you can set a
registry-scoped "certfile" path like
"//other-registry.tld/:certfile=/path/to/cert.pem".
+#### `ci-name`
+
+* Default: The name of the current CI system, or `null` when not on a known CI
+ platform.
+* Type: null or String
+* DEPRECATED: This config is deprecated and will not be changeable in future
+ version of npm.
+
+The name of a continuous integration system. If not set explicitly, npm will
+detect the current CI environment using the
+[`ci-info`](http://npm.im/ci-info) module.
+
#### `dev`
* Default: false
diff --git a/deps/npm/docs/output/commands/npm-ls.html b/deps/npm/docs/output/commands/npm-ls.html
index 5fa3e0c1cc9430..4aeaf0cb69c526 100644
--- a/deps/npm/docs/output/commands/npm-ls.html
+++ b/deps/npm/docs/output/commands/npm-ls.html
@@ -160,7 +160,7 @@
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 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-json.html b/deps/npm/docs/output/configuring-npm/package-json.html
index 22255659969e8f..2e1bd00abda30d 100644
--- a/deps/npm/docs/output/configuring-npm/package-json.html
+++ b/deps/npm/docs/output/configuring-npm/package-json.html
@@ -391,7 +391,7 @@
main
This should be a module relative to the root of your package folder.
For most modules, it makes the most sense to have a main script and often
not much else.
-
If main is not set it defaults to index.js in the package's root folder.
+
If main is not set, it defaults to index.js in the package's root folder.
browser
If your module is meant to be used client-side the browser field should be
used instead of the main field. This is helpful to hint users that it might
diff --git a/deps/npm/docs/output/using-npm/config.html b/deps/npm/docs/output/using-npm/config.html
index 5d62af0a4c8384..ba718decd27ed1 100644
--- a/deps/npm/docs/output/using-npm/config.html
+++ b/deps/npm/docs/output/using-npm/config.html
@@ -142,7 +142,7 @@
custom command to be run along with the installed packages.
npm exec --package yo --package generator-node --call "yo node"
-
ci-name
-
-
Default: The name of the current CI system, or null when not on a known CI
-platform.
-
Type: null or String
-
-
The name of a continuous integration system. If not set explicitly, npm will
-detect the current CI environment using the
-ci-info module.
cidr
Default: null
@@ -1413,6 +1404,17 @@
cert
It is not the path to a certificate file, though you can set a
registry-scoped "certfile" path like
"//other-registry.tld/:certfile=/path/to/cert.pem".
+
ci-name
+
+
Default: The name of the current CI system, or null when not on a known CI
+platform.
+
Type: null or String
+
DEPRECATED: This config is deprecated and will not be changeable in future
+version of npm.
+
+
The name of a continuous integration system. If not set explicitly, npm will
+detect the current CI environment using the
+ci-info module.
dev
Default: false
diff --git a/deps/npm/lib/commands/cache.js b/deps/npm/lib/commands/cache.js
index 9965f7085d9ad6..66b432dfc13a66 100644
--- a/deps/npm/lib/commands/cache.js
+++ b/deps/npm/lib/commands/cache.js
@@ -76,7 +76,7 @@ class Cache extends BaseCommand {
async completion (opts) {
const argv = opts.conf.argv.remain
if (argv.length === 2) {
- return ['add', 'clean', 'verify', 'ls', 'delete']
+ return ['add', 'clean', 'verify', 'ls']
}
// TODO - eventually...
@@ -85,7 +85,6 @@ class Cache extends BaseCommand {
case 'clean':
case 'add':
case 'ls':
- case 'delete':
return []
}
}
diff --git a/deps/npm/lib/utils/config/definitions.js b/deps/npm/lib/utils/config/definitions.js
index 373989dbea0d5f..78c341eabeffa7 100644
--- a/deps/npm/lib/utils/config/definitions.js
+++ b/deps/npm/lib/utils/config/definitions.js
@@ -439,6 +439,9 @@ define('ci-name', {
platform.
`,
type: [null, String],
+ deprecated: `
+ This config is deprecated and will not be changeable in future version of npm.
+ `,
description: `
The name of a continuous integration system. If not set explicitly, npm
will detect the current CI environment using the
diff --git a/deps/npm/lib/utils/exit-handler.js b/deps/npm/lib/utils/exit-handler.js
index b5d6cd030fb5c3..25cecd170a584c 100644
--- a/deps/npm/lib/utils/exit-handler.js
+++ b/deps/npm/lib/utils/exit-handler.js
@@ -131,8 +131,8 @@ const exitHandler = err => {
log.level = level
}
- let exitCode
- let noLogMessage
+ let exitCode = process.exitCode || 0
+ let noLogMessage = exitCode !== 0
let jsonError
if (err) {
diff --git a/deps/npm/man/man1/npm-ls.1 b/deps/npm/man/man1/npm-ls.1
index 07e8c22eeb5e4b..fe605158b7aaa9 100644
--- a/deps/npm/man/man1/npm-ls.1
+++ b/deps/npm/man/man1/npm-ls.1
@@ -20,7 +20,7 @@ Positional arguments are \fBname@version-range\fR identifiers, which will limit
.P
.RS 2
.nf
-npm@9.6.6 /path/to/npm
+npm@9.6.7 /path/to/npm
└─┬ init-package-json@0.0.4
└── promzard@0.1.5
.fi
diff --git a/deps/npm/man/man1/npm.1 b/deps/npm/man/man1/npm.1
index 9dcf8d2caa05ad..1fcb52d7b3952b 100644
--- a/deps/npm/man/man1/npm.1
+++ b/deps/npm/man/man1/npm.1
@@ -12,7 +12,7 @@ npm
Note: This command is unaware of workspaces.
.SS "Version"
.P
-9.6.6
+9.6.7
.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/man5/npm-json.5 b/deps/npm/man/man5/npm-json.5
index 290a10e369c57c..c646afa88dfedc 100644
--- a/deps/npm/man/man5/npm-json.5
+++ b/deps/npm/man/man5/npm-json.5
@@ -303,7 +303,7 @@ This should be a module relative to the root of your package folder.
.P
For most modules, it makes the most sense to have a main script and often not much else.
.P
-If \fBmain\fR is not set it defaults to \fBindex.js\fR in the package's root folder.
+If \fBmain\fR is not set, it defaults to \fBindex.js\fR in the package's root folder.
.SS "browser"
.P
If your module is meant to be used client-side the browser field should be used instead of the main field. This is helpful to hint users that it might rely on primitives that aren't available in Node.js modules. (e.g. \fBwindow\fR)
diff --git a/deps/npm/man/man5/package-json.5 b/deps/npm/man/man5/package-json.5
index 290a10e369c57c..c646afa88dfedc 100644
--- a/deps/npm/man/man5/package-json.5
+++ b/deps/npm/man/man5/package-json.5
@@ -303,7 +303,7 @@ This should be a module relative to the root of your package folder.
.P
For most modules, it makes the most sense to have a main script and often not much else.
.P
-If \fBmain\fR is not set it defaults to \fBindex.js\fR in the package's root folder.
+If \fBmain\fR is not set, it defaults to \fBindex.js\fR in the package's root folder.
.SS "browser"
.P
If your module is meant to be used client-side the browser field should be used instead of the main field. This is helpful to hint users that it might rely on primitives that aren't available in Node.js modules. (e.g. \fBwindow\fR)
diff --git a/deps/npm/man/man7/config.7 b/deps/npm/man/man7/config.7
index 471e2d9a9a82c9..e20d300946a863 100644
--- a/deps/npm/man/man7/config.7
+++ b/deps/npm/man/man7/config.7
@@ -320,16 +320,6 @@ Optional companion option for \fBnpm exec\fR, \fBnpx\fR that allows for specifyi
npm exec --package yo --package generator-node --call "yo node"
.fi
.RE
-.SS "\fBci-name\fR"
-.RS 0
-.IP \(bu 4
-Default: The name of the current CI system, or \fBnull\fR when not on a known CI platform.
-.IP \(bu 4
-Type: null or String
-.RE 0
-
-.P
-The name of a continuous integration system. If not set explicitly, npm will detect the current CI environment using the \fB\fBci-info\fR\fR \fI\(lahttp://npm.im/ci-info\(ra\fR module.
.SS "\fBcidr\fR"
.RS 0
.IP \(bu 4
@@ -1757,6 +1747,18 @@ cert="-----BEGIN CERTIFICATE-----\[rs]nXXXX\[rs]nXXXX\[rs]n-----END CERTIFICATE-
.RE
.P
It is \fInot\fR the path to a certificate file, though you can set a registry-scoped "certfile" path like "//other-registry.tld/:certfile=/path/to/cert.pem".
+.SS "\fBci-name\fR"
+.RS 0
+.IP \(bu 4
+Default: The name of the current CI system, or \fBnull\fR when not on a known CI platform.
+.IP \(bu 4
+Type: null or String
+.IP \(bu 4
+DEPRECATED: This config is deprecated and will not be changeable in future version of npm.
+.RE 0
+
+.P
+The name of a continuous integration system. If not set explicitly, npm will detect the current CI environment using the \fB\fBci-info\fR\fR \fI\(lahttp://npm.im/ci-info\(ra\fR module.
.SS "\fBdev\fR"
.RS 0
.IP \(bu 4
diff --git a/deps/npm/node_modules/@npmcli/config/lib/index.js b/deps/npm/node_modules/@npmcli/config/lib/index.js
index 9bba1d6977ae39..b7b848dea151c8 100644
--- a/deps/npm/node_modules/@npmcli/config/lib/index.js
+++ b/deps/npm/node_modules/@npmcli/config/lib/index.js
@@ -524,21 +524,28 @@ class Config {
}
const typeDesc = typeDescription(type)
- const oneOrMore = typeDesc.indexOf(Array) !== -1
const mustBe = typeDesc
.filter(m => m !== undefined && m !== Array)
- const oneOf = mustBe.length === 1 && oneOrMore ? ' one or more'
- : mustBe.length > 1 && oneOrMore ? ' one or more of:'
- : mustBe.length > 1 ? ' one of:'
- : ''
- const msg = 'Must be' + oneOf
+ const msg = 'Must be' + this.#getOneOfKeywords(mustBe, typeDesc)
const desc = mustBe.length === 1 ? mustBe[0]
- : mustBe.filter(m => m !== Array)
- .map(n => typeof n === 'string' ? n : JSON.stringify(n))
- .join(', ')
+ : [...new Set(mustBe.map(n => typeof n === 'string' ? n : JSON.stringify(n)))].join(', ')
log.warn('invalid config', msg, desc)
}
+ #getOneOfKeywords (mustBe, typeDesc) {
+ let keyword
+ if (mustBe.length === 1 && typeDesc.includes(Array)) {
+ keyword = ' one or more'
+ } else if (mustBe.length > 1 && typeDesc.includes(Array)) {
+ keyword = ' one or more of:'
+ } else if (mustBe.length > 1) {
+ keyword = ' one of:'
+ } else {
+ keyword = ''
+ }
+ return keyword
+ }
+
#loadObject (obj, where, source, er = null) {
// obj is the raw data read from the file
const conf = this.data.get(where)
diff --git a/deps/npm/node_modules/@npmcli/config/package.json b/deps/npm/node_modules/@npmcli/config/package.json
index f34d20f1e4dd83..e68d5166901451 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": "6.1.6",
+ "version": "6.1.7",
"files": [
"bin/",
"lib/"
diff --git a/deps/npm/node_modules/@npmcli/package-json/lib/index.js b/deps/npm/node_modules/@npmcli/package-json/lib/index.js
index e98308f3d3b843..34e415b45d49fe 100644
--- a/deps/npm/node_modules/@npmcli/package-json/lib/index.js
+++ b/deps/npm/node_modules/@npmcli/package-json/lib/index.js
@@ -1,18 +1,12 @@
-const fs = require('fs')
-const promisify = require('util').promisify
-const readFile = promisify(fs.readFile)
-const writeFile = promisify(fs.writeFile)
+const { readFile, writeFile } = require('fs/promises')
const { resolve } = require('path')
const updateDeps = require('./update-dependencies.js')
const updateScripts = require('./update-scripts.js')
const updateWorkspaces = require('./update-workspaces.js')
+const normalize = require('./normalize.js')
const parseJSON = require('json-parse-even-better-errors')
-const _filename = Symbol('filename')
-const _manifest = Symbol('manifest')
-const _readFileContent = Symbol('readFileContent')
-
// a list of handy specialized helper functions that take
// care of special cases that are handled by the npm cli
const knownSteps = new Set([
@@ -29,42 +23,111 @@ const knownKeys = new Set([
])
class PackageJson {
+ static normalizeSteps = Object.freeze([
+ '_id',
+ '_attributes',
+ 'bundledDependencies',
+ 'bundleDependencies',
+ 'optionalDedupe',
+ 'scripts',
+ 'funding',
+ 'bin',
+ ])
+
+ static prepareSteps = Object.freeze([
+ '_attributes',
+ 'bundledDependencies',
+ 'bundleDependencies',
+ 'gypfile',
+ 'serverjs',
+ 'scriptpath',
+ 'authors',
+ 'readme',
+ 'mans',
+ 'binDir',
+ 'gitHead',
+ 'fillTypes',
+ 'normalizeData',
+ 'binRefs',
+ ])
+
+ // default behavior, just loads and parses
static async load (path) {
return await new PackageJson(path).load()
}
+ // read-package-json compatible behavior
+ static async prepare (path, opts) {
+ return await new PackageJson(path).prepare(opts)
+ }
+
+ // read-package-json-fast compatible behavior
+ static async normalize (path, opts) {
+ return await new PackageJson(path).normalize(opts)
+ }
+
+ #filename
+ #path
+ #manifest = {}
+ #readFileContent = ''
+ #fromIndex = false
+
constructor (path) {
- this[_filename] = resolve(path, 'package.json')
- this[_manifest] = {}
- this[_readFileContent] = ''
+ this.#path = path
+ this.#filename = resolve(path, 'package.json')
}
- async load () {
+ async load (parseIndex) {
+ let parseErr
try {
- this[_readFileContent] =
- await readFile(this[_filename], 'utf8')
+ this.#readFileContent =
+ await readFile(this.#filename, 'utf8')
} catch (err) {
- throw new Error('package.json not found')
+ err.message = `Could not read package.json: ${err}`
+ if (!parseIndex) {
+ throw err
+ }
+ parseErr = err
+ }
+
+ if (parseErr) {
+ const indexFile = resolve(this.#path, 'index.js')
+ let indexFileContent
+ try {
+ indexFileContent = await readFile(indexFile, 'utf8')
+ } catch (err) {
+ throw parseErr
+ }
+ try {
+ this.#manifest = fromComment(indexFileContent)
+ } catch (err) {
+ throw parseErr
+ }
+ this.#fromIndex = true
+ return this
}
try {
- this[_manifest] =
- parseJSON(this[_readFileContent])
+ this.#manifest = parseJSON(this.#readFileContent)
} catch (err) {
- throw new Error(`Invalid package.json: ${err}`)
+ err.message = `Invalid package.json: ${err}`
+ throw err
}
-
return this
}
get content () {
- return this[_manifest]
+ return this.#manifest
+ }
+
+ get path () {
+ return this.#path
}
update (content) {
// validates both current manifest and content param
const invalidContent =
- typeof this[_manifest] !== 'object'
+ typeof this.#manifest !== 'object'
|| typeof content !== 'object'
if (invalidContent) {
throw Object.assign(
@@ -74,13 +137,13 @@ class PackageJson {
}
for (const step of knownSteps) {
- this[_manifest] = step({ content, originalContent: this[_manifest] })
+ this.#manifest = step({ content, originalContent: this.#manifest })
}
// unknown properties will just be overwitten
for (const [key, value] of Object.entries(content)) {
if (!knownKeys.has(key)) {
- this[_manifest][key] = value
+ this.#manifest[key] = value
}
}
@@ -88,22 +151,62 @@ class PackageJson {
}
async save () {
+ if (this.#fromIndex) {
+ throw new Error('No package.json to save to')
+ }
const {
[Symbol.for('indent')]: indent,
[Symbol.for('newline')]: newline,
- } = this[_manifest]
+ } = this.#manifest
const format = indent === undefined ? ' ' : indent
const eol = newline === undefined ? '\n' : newline
const fileContent = `${
- JSON.stringify(this[_manifest], null, format)
+ JSON.stringify(this.#manifest, null, format)
}\n`
.replace(/\n/g, eol)
- if (fileContent.trim() !== this[_readFileContent].trim()) {
- return await writeFile(this[_filename], fileContent)
+ if (fileContent.trim() !== this.#readFileContent.trim()) {
+ return await writeFile(this.#filename, fileContent)
}
}
+
+ async normalize (opts = {}) {
+ if (!opts.steps) {
+ opts.steps = this.constructor.normalizeSteps
+ }
+ await this.load()
+ await normalize(this, opts)
+ return this
+ }
+
+ async prepare (opts = {}) {
+ if (!opts.steps) {
+ opts.steps = this.constructor.prepareSteps
+ }
+ await this.load(true)
+ await normalize(this, opts)
+ return this
+ }
+}
+
+// /**package { "name": "foo", "version": "1.2.3", ... } **/
+function fromComment (data) {
+ data = data.split(/^\/\*\*package(?:\s|$)/m)
+
+ if (data.length < 2) {
+ throw new Error('File has no package in comments')
+ }
+ data = data[1]
+ data = data.split(/\*\*\/$/m)
+
+ if (data.length < 2) {
+ throw new Error('File has no package in comments')
+ }
+ data = data[0]
+ data = data.replace(/^\s*\*/mg, '')
+
+ return parseJSON(data)
}
module.exports = PackageJson
diff --git a/deps/npm/node_modules/@npmcli/package-json/lib/normalize.js b/deps/npm/node_modules/@npmcli/package-json/lib/normalize.js
new file mode 100644
index 00000000000000..bc101cd4fde1b0
--- /dev/null
+++ b/deps/npm/node_modules/@npmcli/package-json/lib/normalize.js
@@ -0,0 +1,284 @@
+const fs = require('fs/promises')
+const { glob } = require('glob')
+const normalizePackageBin = require('npm-normalize-package-bin')
+const normalizePackageData = require('normalize-package-data')
+const path = require('path')
+
+const normalize = async (pkg, { strict, steps }) => {
+ const data = pkg.content
+ const scripts = data.scripts || {}
+
+ // remove attributes that start with "_"
+ if (steps.includes('_attributes')) {
+ for (const key in data) {
+ if (key.startsWith('_')) {
+ delete pkg.content[key]
+ }
+ }
+ }
+
+ // build the "_id" attribute
+ if (steps.includes('_id')) {
+ if (data.name && data.version) {
+ data._id = `${data.name}@${data.version}`
+ }
+ }
+
+ // fix bundledDependencies typo
+ if (steps.includes('bundledDependencies')) {
+ if (data.bundleDependencies === undefined && data.bundledDependencies !== undefined) {
+ data.bundleDependencies = data.bundledDependencies
+ }
+ delete data.bundledDependencies
+ }
+ // expand "bundleDependencies: true or translate from object"
+ if (steps.includes('bundleDependencies')) {
+ const bd = data.bundleDependencies
+ if (bd === true) {
+ data.bundleDependencies = Object.keys(data.dependencies || {})
+ } else if (bd && typeof bd === 'object') {
+ if (!Array.isArray(bd)) {
+ data.bundleDependencies = Object.keys(bd)
+ }
+ } else {
+ delete data.bundleDependencies
+ }
+ }
+
+ // it was once common practice to list deps both in optionalDependencies and
+ // in dependencies, to support npm versions that did not know about
+ // optionalDependencies. This is no longer a relevant need, so duplicating
+ // the deps in two places is unnecessary and excessive.
+ if (steps.includes('optionalDedupe')) {
+ if (data.dependencies &&
+ data.optionalDependencies && typeof data.optionalDependencies === 'object') {
+ for (const name in data.optionalDependencies) {
+ delete data.dependencies[name]
+ }
+ if (!Object.keys(data.dependencies).length) {
+ delete data.dependencies
+ }
+ }
+ }
+
+ // add "install" attribute if any "*.gyp" files exist
+ if (steps.includes('gypfile')) {
+ if (!scripts.install && !scripts.preinstall && data.gypfile !== false) {
+ const files = await glob('*.gyp', { cwd: pkg.path })
+ if (files.length) {
+ scripts.install = 'node-gyp rebuild'
+ data.scripts = scripts
+ data.gypfile = true
+ }
+ }
+ }
+
+ // add "start" attribute if "server.js" exists
+ if (steps.includes('serverjs') && !scripts.start) {
+ try {
+ await fs.access(path.join(pkg.path, 'server.js'))
+ scripts.start = 'node server.js'
+ data.scripts = scripts
+ } catch {
+ // do nothing
+ }
+ }
+
+ // strip "node_modules/.bin" from scripts entries
+ if (steps.includes('scripts') || steps.includes('scriptpath')) {
+ const spre = /^(\.[/\\])?node_modules[/\\].bin[\\/]/
+ if (typeof data.scripts === 'object') {
+ for (const name in data.scripts) {
+ if (typeof data.scripts[name] !== 'string') {
+ delete data.scripts[name]
+ } else if (steps.includes('scriptpath')) {
+ data.scripts[name] = data.scripts[name].replace(spre, '')
+ }
+ }
+ } else {
+ delete data.scripts
+ }
+ }
+
+ if (steps.includes('funding')) {
+ if (data.funding && typeof data.funding === 'string') {
+ data.funding = { url: data.funding }
+ }
+ }
+
+ // populate "authors" attribute
+ if (steps.includes('authors') && !data.contributors) {
+ try {
+ const authorData = await fs.readFile(path.join(pkg.path, 'AUTHORS'), 'utf8')
+ const authors = authorData.split(/\r?\n/g)
+ .map(line => line.replace(/^\s*#.*$/, '').trim())
+ .filter(line => line)
+ data.contributors = authors
+ } catch {
+ // do nothing
+ }
+ }
+
+ // populate "readme" attribute
+ if (steps.includes('readme') && !data.readme) {
+ const mdre = /\.m?a?r?k?d?o?w?n?$/i
+ const files = await glob('{README,README.*}', { cwd: pkg.path, nocase: true, mark: true })
+ let readmeFile
+ for (const file of files) {
+ // don't accept directories.
+ if (!file.endsWith(path.sep)) {
+ if (file.match(mdre)) {
+ readmeFile = file
+ break
+ }
+ if (file.endsWith('README')) {
+ readmeFile = file
+ }
+ }
+ }
+ if (readmeFile) {
+ const readmeData = await fs.readFile(path.join(pkg.path, readmeFile), 'utf8')
+ data.readme = readmeData
+ data.readmeFilename = readmeFile
+ }
+ }
+
+ // expand directories.man
+ if (steps.includes('mans') && !data.man && data.directories?.man) {
+ const manDir = data.directories.man
+ const cwd = path.resolve(pkg.path, manDir)
+ const files = await glob('**/*.[0-9]', { cwd })
+ data.man = files.map(man =>
+ path.relative(pkg.path, path.join(cwd, man)).split(path.sep).join('/')
+ )
+ }
+
+ if (steps.includes('bin') || steps.includes('binDir') || steps.includes('binRefs')) {
+ normalizePackageBin(data)
+ }
+
+ // expand "directories.bin"
+ if (steps.includes('binDir') && data.directories?.bin) {
+ const binsDir = path.resolve(pkg.path, path.join('.', path.join('/', data.directories.bin)))
+ const bins = await glob('**', { cwd: binsDir })
+ data.bin = bins.reduce((acc, binFile) => {
+ if (binFile && !binFile.startsWith('.')) {
+ const binName = path.basename(binFile)
+ acc[binName] = path.join(data.directories.bin, binFile)
+ }
+ return acc
+ }, {})
+ // *sigh*
+ normalizePackageBin(data)
+ }
+
+ // populate "gitHead" attribute
+ if (steps.includes('gitHead') && !data.gitHead) {
+ let head
+ try {
+ head = await fs.readFile(path.resolve(pkg.path, '.git/HEAD'), 'utf8')
+ } catch (err) {
+ // do nothing
+ }
+ let headData
+ if (head) {
+ if (head.startsWith('ref: ')) {
+ const headRef = head.replace(/^ref: /, '').trim()
+ const headFile = path.resolve(pkg.path, '.git', headRef)
+ try {
+ headData = await fs.readFile(headFile, 'utf8')
+ headData = headData.replace(/^ref: /, '').trim()
+ } catch (err) {
+ // do nothing
+ }
+ if (!headData) {
+ const packFile = path.resolve(pkg.path, '.git/packed-refs')
+ try {
+ let refs = await fs.readFile(packFile, 'utf8')
+ if (refs) {
+ refs = refs.split('\n')
+ for (let i = 0; i < refs.length; i++) {
+ const match = refs[i].match(/^([0-9a-f]{40}) (.+)$/)
+ if (match && match[2].trim() === headRef) {
+ headData = match[1]
+ break
+ }
+ }
+ }
+ } catch {
+ // do nothing
+ }
+ }
+ } else {
+ headData = head.trim()
+ }
+ }
+ if (headData) {
+ data.gitHead = headData
+ }
+ }
+
+ // populate "types" attribute
+ if (steps.includes('fillTypes')) {
+ const index = data.main || 'index.js'
+
+ if (typeof index !== 'string') {
+ throw new TypeError('The "main" attribute must be of type string.')
+ }
+
+ // TODO exports is much more complicated than this in verbose format
+ // We need to support for instance
+
+ // "exports": {
+ // ".": [
+ // {
+ // "default": "./lib/npm.js"
+ // },
+ // "./lib/npm.js"
+ // ],
+ // "./package.json": "./package.json"
+ // },
+ // as well as conditional exports
+
+ // if (data.exports && typeof data.exports === 'string') {
+ // index = data.exports
+ // }
+
+ // if (data.exports && data.exports['.']) {
+ // index = data.exports['.']
+ // if (typeof index !== 'string') {
+ // }
+ // }
+ const extless = path.join(path.dirname(index), path.basename(index, path.extname(index)))
+ const dts = `./${extless}.d.ts`
+ const hasDTSFields = 'types' in data || 'typings' in data
+ if (!hasDTSFields) {
+ try {
+ await fs.access(path.join(pkg.path, dts))
+ data.types = dts.split(path.sep).join('/')
+ } catch {
+ // do nothing
+ }
+ }
+ }
+
+ // "normalizeData" from read-package-json
+ if (steps.includes('normalizeData')) {
+ normalizePackageData(data, strict)
+ }
+
+ // Warn if the bin references don't point to anything. This might be better
+ // in normalize-package-data if it had access to the file path.
+ if (steps.includes('binRefs') && data.bin instanceof Object) {
+ for (const key in data.bin) {
+ const binPath = path.resolve(pkg.path, data.bin[key])
+ try {
+ await fs.access(binPath)
+ } catch {
+ delete data.bin[key]
+ }
+ }
+ }
+}
+
+module.exports = normalize
diff --git a/deps/npm/node_modules/@npmcli/package-json/package.json b/deps/npm/node_modules/@npmcli/package-json/package.json
index faae7891a1e728..61607c5bb6ae70 100644
--- a/deps/npm/node_modules/@npmcli/package-json/package.json
+++ b/deps/npm/node_modules/@npmcli/package-json/package.json
@@ -1,6 +1,6 @@
{
"name": "@npmcli/package-json",
- "version": "3.0.0",
+ "version": "3.1.0",
"description": "Programmatic API to update package.json",
"main": "lib/index.js",
"files": [
@@ -24,12 +24,15 @@
"author": "GitHub Inc.",
"license": "ISC",
"devDependencies": {
- "@npmcli/eslint-config": "^3.0.1",
- "@npmcli/template-oss": "4.5.1",
+ "@npmcli/eslint-config": "^4.0.0",
+ "@npmcli/template-oss": "4.15.1",
"tap": "^16.0.1"
},
"dependencies": {
- "json-parse-even-better-errors": "^3.0.0"
+ "glob": "^10.2.2",
+ "json-parse-even-better-errors": "^3.0.0",
+ "normalize-package-data": "^5.0.0",
+ "npm-normalize-package-bin": "^3.0.1"
},
"repository": {
"type": "git",
@@ -40,7 +43,8 @@
},
"templateOSS": {
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
- "version": "4.5.1"
+ "version": "4.15.1",
+ "publish": "true"
},
"tap": {
"nyc-arg": [
diff --git a/deps/npm/node_modules/@npmcli/run-script/lib/run-script-pkg.js b/deps/npm/node_modules/@npmcli/run-script/lib/run-script-pkg.js
index cbb0a0b3a5e733..a5518285d1af1b 100644
--- a/deps/npm/node_modules/@npmcli/run-script/lib/run-script-pkg.js
+++ b/deps/npm/node_modules/@npmcli/run-script/lib/run-script-pkg.js
@@ -94,7 +94,11 @@ const runScriptPkg = async options => {
return p.catch(er => {
const { signal } = er
if (stdio === 'inherit' && signal) {
+ // by the time we reach here, the child has already exited. we send the
+ // signal back to ourselves again so that npm will exit with the same
+ // status as the child
process.kill(process.pid, signal)
+
// just in case we don't die, reject after 500ms
// this also keeps the node process open long enough to actually
// get the signal, rather than terminating gracefully.
diff --git a/deps/npm/node_modules/@npmcli/run-script/lib/signal-manager.js b/deps/npm/node_modules/@npmcli/run-script/lib/signal-manager.js
index 7e10f859e0a689..efc00b488063ff 100644
--- a/deps/npm/node_modules/@npmcli/run-script/lib/signal-manager.js
+++ b/deps/npm/node_modules/@npmcli/run-script/lib/signal-manager.js
@@ -1,17 +1,19 @@
const runningProcs = new Set()
let handlersInstalled = false
+// NOTE: these signals aren't actually forwarded anywhere. they're trapped and
+// ignored until all child processes have exited. in our next breaking change
+// we should rename this
const forwardedSignals = [
'SIGINT',
'SIGTERM',
]
-const handleSignal = signal => {
- for (const proc of runningProcs) {
- proc.kill(signal)
- }
-}
-
+// no-op, this is so receiving the signal doesn't cause us to exit immediately
+// instead, we exit after all children have exited when we re-send the signal
+// to ourselves. see the catch handler at the bottom of run-script-pkg.js
+// istanbul ignore next - this function does nothing
+const handleSignal = () => {}
const setupListeners = () => {
for (const signal of forwardedSignals) {
process.on(signal, handleSignal)
diff --git a/deps/npm/node_modules/@npmcli/run-script/package.json b/deps/npm/node_modules/@npmcli/run-script/package.json
index cdcf6fb0fcf823..38f6f72fa6ad90 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": "6.0.1",
+ "version": "6.0.2",
"description": "Run a lifecycle script for a package (descendant of npm-lifecycle)",
"author": "GitHub Inc.",
"license": "ISC",
@@ -16,7 +16,7 @@
},
"devDependencies": {
"@npmcli/eslint-config": "^4.0.0",
- "@npmcli/template-oss": "4.14.1",
+ "@npmcli/template-oss": "4.15.1",
"require-inject": "^1.4.4",
"tap": "^16.0.1"
},
@@ -41,7 +41,7 @@
},
"templateOSS": {
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
- "version": "4.14.1",
+ "version": "4.15.1",
"publish": "true"
},
"tap": {
diff --git a/deps/npm/node_modules/cacache/lib/content/write.js b/deps/npm/node_modules/cacache/lib/content/write.js
index b6f5c5623b58b4..71461465812878 100644
--- a/deps/npm/node_modules/cacache/lib/content/write.js
+++ b/deps/npm/node_modules/cacache/lib/content/write.js
@@ -15,6 +15,9 @@ 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
@@ -159,16 +162,27 @@ async function makeTmp (cache, opts) {
async function moveToDestination (tmp, cache, sri, opts) {
const destination = contentPath(cache, sri)
const destDir = path.dirname(destination)
-
- await fs.mkdir(destDir, { recursive: true })
- try {
- await moveFile(tmp.target, destination, { overwrite: false })
- tmp.moved = true
- } catch (err) {
- if (!err.message.startsWith('The destination file exists')) {
- throw Object.assign(err, { code: 'EEXIST' })
- }
+ 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) {
diff --git a/deps/npm/node_modules/cacache/package.json b/deps/npm/node_modules/cacache/package.json
index b8ee783388d847..db17e3a41bc5e4 100644
--- a/deps/npm/node_modules/cacache/package.json
+++ b/deps/npm/node_modules/cacache/package.json
@@ -1,6 +1,6 @@
{
"name": "cacache",
- "version": "17.1.0",
+ "version": "17.1.2",
"cache-version": {
"content": "2",
"index": "5"
@@ -60,7 +60,7 @@
},
"devDependencies": {
"@npmcli/eslint-config": "^4.0.0",
- "@npmcli/template-oss": "4.14.1",
+ "@npmcli/template-oss": "4.15.1",
"tap": "^16.0.0"
},
"engines": {
@@ -69,7 +69,7 @@
"templateOSS": {
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
"windowsCI": false,
- "version": "4.14.1",
+ "version": "4.15.1",
"publish": "true"
},
"author": "GitHub Inc.",
diff --git a/deps/npm/node_modules/glob/dist/cjs/package.json b/deps/npm/node_modules/glob/dist/cjs/package.json
index e225638de741d7..8762de67dc4d55 100644
--- a/deps/npm/node_modules/glob/dist/cjs/package.json
+++ b/deps/npm/node_modules/glob/dist/cjs/package.json
@@ -2,7 +2,7 @@
"author": "Isaac Z. Schlueter (http://blog.izs.me/)",
"name": "glob",
"description": "the most correct and second fastest glob implementation in JavaScript",
- "version": "10.2.2",
+ "version": "10.2.4",
"bin": "./dist/cjs/src/bin.js",
"repository": {
"type": "git",
@@ -63,7 +63,7 @@
"foreground-child": "^3.1.0",
"jackspeak": "^2.0.3",
"minimatch": "^9.0.0",
- "minipass": "^5.0.0",
+ "minipass": "^5.0.0 || ^6.0.0",
"path-scurry": "^1.7.0"
},
"devDependencies": {
diff --git a/deps/npm/node_modules/glob/dist/cjs/src/glob.d.ts.map b/deps/npm/node_modules/glob/dist/cjs/src/glob.d.ts.map
index bd44bbf49d5949..b0ea3b71e222ad 100644
--- a/deps/npm/node_modules/glob/dist/cjs/src/glob.d.ts.map
+++ b/deps/npm/node_modules/glob/dist/cjs/src/glob.d.ts.map
@@ -1 +1 @@
-{"version":3,"file":"glob.d.ts","sourceRoot":"","sources":["../../../src/glob.ts"],"names":[],"mappings":";AAA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MAAM,IAAI,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC;IAa9C;;OAEG;IACH,UAAU,IAAI,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC;IAalD;;;OAGG;IACH,WAAW,IAAI,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC;IAGlD,CAAC,MAAM,CAAC,QAAQ,CAAC;IAIjB;;;OAGG;IACH,OAAO,IAAI,cAAc,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC;IAGnD,CAAC,MAAM,CAAC,aAAa,CAAC;CAGvB"}
\ No newline at end of file
diff --git a/deps/npm/node_modules/glob/dist/cjs/src/glob.js b/deps/npm/node_modules/glob/dist/cjs/src/glob.js
index a05d9f0eb39637..e7ad4deb980d30 100644
--- a/deps/npm/node_modules/glob/dist/cjs/src/glob.js
+++ b/deps/npm/node_modules/glob/dist/cjs/src/glob.js
@@ -130,6 +130,11 @@ class Glob {
});
}
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,
@@ -137,7 +142,7 @@ class Glob {
matchBase: this.matchBase,
nobrace: this.nobrace,
nocase: this.nocase,
- nocaseMagicOnly: true,
+ nocaseMagicOnly,
nocomment: true,
noext: this.noext,
nonegate: true,
diff --git a/deps/npm/node_modules/glob/dist/cjs/src/glob.js.map b/deps/npm/node_modules/glob/dist/cjs/src/glob.js.map
index aae70b0e4479f3..bf6fb4d0f0b724 100644
--- a/deps/npm/node_modules/glob/dist/cjs/src/glob.js.map
+++ b/deps/npm/node_modules/glob/dist/cjs/src/glob.js.map
@@ -1 +1 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,IAAI,CAAC,UAAU,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAA;IAC7C,CAAC;IACD,CAAC,MAAM,CAAC,QAAQ,CAAC;QACf,OAAO,IAAI,CAAC,WAAW,EAAE,CAAA;IAC3B,CAAC;IAED;;;OAGG;IACH,OAAO;QACL,OAAO,IAAI,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE,CAAA;IAC9C,CAAC;IACD,CAAC,MAAM,CAAC,aAAa,CAAC;QACpB,OAAO,IAAI,CAAC,OAAO,EAAE,CAAA;IACvB,CAAC;CACF;AA3PD,oBA2PC","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 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 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: true,\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
+{"version":3,"file":"glob.js","sourceRoot":"","sources":["../../../src/glob.ts"],"names":[],"mappings":";;;AAAA,yCAAuD;AAEvD,6CAOoB;AACpB,6BAAmC;AAEnC,6CAAsC;AACtC,2CAAoD;AAKpD,4CAA4C;AAC5C,gDAAgD;AAChD,MAAM,eAAe,GACnB,OAAO,OAAO,KAAK,QAAQ;IAC3B,OAAO;IACP,OAAO,OAAO,CAAC,QAAQ,KAAK,QAAQ;IAClC,CAAC,CAAC,OAAO,CAAC,QAAQ;IAClB,CAAC,CAAC,OAAO,CAAA;AAgTb;;GAEG;AACH,MAAa,IAAI;IACf,QAAQ,CAAU;IAClB,GAAG,CAAQ;IACX,IAAI,CAAS;IACb,GAAG,CAAS;IACZ,WAAW,CAAS;IACpB,MAAM,CAAS;IACf,MAAM,CAAiC;IACvC,aAAa,CAAS;IACtB,IAAI,CAAU;IACd,SAAS,CAAS;IAClB,QAAQ,CAAQ;IAChB,OAAO,CAAS;IAChB,MAAM,CAAS;IACf,KAAK,CAAS;IACd,KAAK,CAAS;IACd,UAAU,CAAS;IACnB,OAAO,CAAU;IACjB,QAAQ,CAAiB;IACzB,QAAQ,CAAS;IACjB,MAAM,CAAY;IAClB,IAAI,CAAS;IACb,MAAM,CAAc;IACpB,oB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CAAC,CAAC,QAAQ;YACd,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,MAAM,EAAE,IAAI,CAAC,MAAM;SACpB,CAAC,CAAC,MAAM,EAAE,CAAA;IACb,CAAC;IAMD,UAAU;QACR,OAAO,IAAI,sBAAU,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG,EAAE;YACpD,GAAG,IAAI,CAAC,IAAI;YACZ,QAAQ,EACN,IAAI,CAAC,QAAQ,KAAK,QAAQ;gBACxB,CAAC,CAAC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,EAAE;gBACzC,CAAC,CAAC,QAAQ;YACd,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,MAAM,EAAE,IAAI,CAAC,MAAM;SACpB,CAAC,CAAC,UAAU,EAAE,CAAA;IACjB,CAAC;IAED;;;OAGG;IACH,WAAW;QACT,OAAO,IAAI,CAAC,UAAU,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAA;IAC7C,CAAC;IACD,CAAC,MAAM,CAAC,QAAQ,CAAC;QACf,OAAO,IAAI,CAAC,WAAW,EAAE,CAAA;IAC3B,CAAC;IAED;;;OAGG;IACH,OAAO;QACL,OAAO,IAAI,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE,CAAA;IAC9C,CAAC;IACD,CAAC,MAAM,CAAC,aAAa,CAAC;QACpB,OAAO,IAAI,CAAC,OAAO,EAAE,CAAA;IACvB,CAAC;CACF;AAlQD,oBAkQC","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 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/glob/dist/mjs/glob.d.ts.map b/deps/npm/node_modules/glob/dist/mjs/glob.d.ts.map
index e5423682233478..b06e4633443c87 100644
--- a/deps/npm/node_modules/glob/dist/mjs/glob.d.ts.map
+++ b/deps/npm/node_modules/glob/dist/mjs/glob.d.ts.map
@@ -1 +1 @@
-{"version":3,"file":"glob.d.ts","sourceRoot":"","sources":["../../src/glob.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAoB,MAAM,WAAW,CAAA;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AACnC,OAAO,EACL,QAAQ,EACR,IAAI,EACJ,UAAU,EAIX,MAAM,aAAa,CAAA;AAEpB,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAGtC,MAAM,MAAM,QAAQ,GAAG,SAAS,CAAC,KAAK,CAAC,CAAA;AACvC,MAAM,MAAM,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC,WAAW,CAAC,EAAE,SAAS,CAAC,CAAA;AAWlE;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,WAAW;IAC1B;;;;;;;;;;;;OAYG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAE5B;;;;;OAKG;IACH,GAAG,CAAC,EAAE,MAAM,GAAG,GAAG,CAAA;IAElB;;;;OAIG;IACH,GAAG,CAAC,EAAE,OAAO,CAAA;IAEb;;;;;;;;OAQG;IACH,WAAW,CAAC,EAAE,OAAO,CAAA;IAErB;;;;;;;;OAQG;IACH,MAAM,CAAC,EAAE,OAAO,CAAA;IAEhB;;;;;;;;;;;;;;;;OAgBG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,UAAU,CAAA;IAEvC;;;;;OAKG;IACH,aAAa,CAAC,EAAE,OAAO,CAAA;IAEvB;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO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;;;;;;OAWG;gBACS,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,IAAI,EAAE,IAAI;IAqHlD;;OAEG;IACG,IAAI,IAAI,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAmBpC;;OAEG;IACH,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAezB;;OAEG;IACH,MAAM,IAAI,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC;IAa9C;;OAEG;IACH,UAAU,IAAI,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC;IAalD;;;OAGG;IACH,WAAW,IAAI,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC;IAGlD,CAAC,MAAM,CAAC,QAAQ,CAAC;IAIjB;;;OAGG;IACH,OAAO,IAAI,cAAc,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC;IAGnD,CAAC,MAAM,CAAC,aAAa,CAAC;CAGvB"}
\ No newline at end of file
diff --git a/deps/npm/node_modules/glob/dist/mjs/glob.js b/deps/npm/node_modules/glob/dist/mjs/glob.js
index a246019cd35f95..f158065746e586 100644
--- a/deps/npm/node_modules/glob/dist/mjs/glob.js
+++ b/deps/npm/node_modules/glob/dist/mjs/glob.js
@@ -127,6 +127,11 @@ export class Glob {
});
}
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,
@@ -134,7 +139,7 @@ export class Glob {
matchBase: this.matchBase,
nobrace: this.nobrace,
nocase: this.nocase,
- nocaseMagicOnly: true,
+ nocaseMagicOnly,
nocomment: true,
noext: this.noext,
nonegate: true,
diff --git a/deps/npm/node_modules/glob/dist/mjs/glob.js.map b/deps/npm/node_modules/glob/dist/mjs/glob.js.map
index 8917735ad9296f..93eb61df16f5ca 100644
--- a/deps/npm/node_modules/glob/dist/mjs/glob.js.map
+++ b/deps/npm/node_modules/glob/dist/mjs/glob.js.map
@@ -1 +1 @@
-{"version":3,"file":"glob.js","sourceRoot":"","sources":["../../src/glob.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAoB,MAAM,WAAW,CAAA;AAEvD,OAAO,EAGL,UAAU,EACV,gBAAgB,EAChB,eAAe,EACf,eAAe,GAChB,MAAM,aAAa,CAAA;AACpB,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAA;AAEnC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AACtC,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAKpD,4CAA4C;AAC5C,gDAAgD;AAChD,MAAM,eAAe,GACnB,OAAO,OAAO,KAAK,QAAQ;IAC3B,OAAO;IACP,OAAO,OAAO,CAAC,QAAQ,KAAK,QAAQ;IAClC,CAAC,CAAC,OAAO,CAAC,QAAQ;IAClB,CAAC,CAAC,OAAO,CAAA;AAgTb;;GAEG;AACH,MAAM,OAAO,IAAI;IACf,QAAQ,CAAU;IAClB,GAAG,CAAQ;IACX,IAAI,CAAS;IACb,GAAG,CAAS;IACZ,WAAW,CAAS;IACpB,MAAM,CAAS;IACf,MAAM,CAAiC;IACvC,aAAa,CAAS;IACtB,IAAI,CAAU;IACd,SAAS,CAAS;IAClB,QAAQ,CAAQ;IAChB,OAAO,CAAS;IAChB,MAAM,CAAS;IACf,KAAK,CAAS;IACd,KAAK,CAAS;IACd,UAAU,CAAS;IACnB,OAAO,CAAU;IACjB,QAAQ,CAAiB;IACzB,QAAQ,CAAS;IACjB,MAAM,CAAY;IAClB,IAAI,CAAS;IACb,MAAM,CAAc;IACpB,oBAAoB,CAAS;IAC7B,aAAa,C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QAAQ,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG,EAAE;YACpD,GAAG,IAAI,CAAC,IAAI;YACZ,QAAQ,EACN,IAAI,CAAC,QAAQ,KAAK,QAAQ;gBACxB,CAAC,CAAC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,EAAE;gBACzC,CAAC,CAAC,QAAQ;YACd,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,MAAM,EAAE,IAAI,CAAC,MAAM;SACpB,CAAC,CAAC,UAAU,EAAE,CAAA;IACjB,CAAC;IAED;;;OAGG;IACH,WAAW;QACT,OAAO,IAAI,CAAC,UAAU,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAA;IAC7C,CAAC;IACD,CAAC,MAAM,CAAC,QAAQ,CAAC;QACf,OAAO,IAAI,CAAC,WAAW,EAAE,CAAA;IAC3B,CAAC;IAED;;;OAGG;IACH,OAAO;QACL,OAAO,IAAI,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE,CAAA;IAC9C,CAAC;IACD,CAAC,MAAM,CAAC,aAAa,CAAC;QACpB,OAAO,IAAI,CAAC,OAAO,EAAE,CAAA;IACvB,CAAC;CACF","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 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 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: true,\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
+{"version":3,"file":"glob.js","sourceRoot":"","sources":["../../src/glob.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAoB,MAAM,WAAW,CAAA;AAEvD,OAAO,EAGL,UAAU,EACV,gBAAgB,EAChB,eAAe,EACf,eAAe,GAChB,MAAM,aAAa,CAAA;AACpB,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAA;AAEnC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AACtC,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAKpD,4CAA4C;AAC5C,gDAAgD;AAChD,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QAAQ,CAAC,EAAE,CAAA;IAC7C,CAAC;IACD,CAAC,MAAM,CAAC,QAAQ,CAAC;QACf,OAAO,IAAI,CAAC,WAAW,EAAE,CAAA;IAC3B,CAAC;IAED;;;OAGG;IACH,OAAO;QACL,OAAO,IAAI,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE,CAAA;IAC9C,CAAC;IACD,CAAC,MAAM,CAAC,aAAa,CAAC;QACpB,OAAO,IAAI,CAAC,OAAO,EAAE,CAAA;IACvB,CAAC;CACF","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 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/glob/dist/mjs/package.json b/deps/npm/node_modules/glob/dist/mjs/package.json
index ff3441b45957b2..e066bfabfb543c 100644
--- a/deps/npm/node_modules/glob/dist/mjs/package.json
+++ b/deps/npm/node_modules/glob/dist/mjs/package.json
@@ -1,4 +1,4 @@
{
- "version": "10.2.1",
+ "version": "10.2.3",
"type": "module"
}
diff --git a/deps/npm/node_modules/glob/package.json b/deps/npm/node_modules/glob/package.json
index b04d087e28d898..e11e8e33025795 100644
--- a/deps/npm/node_modules/glob/package.json
+++ b/deps/npm/node_modules/glob/package.json
@@ -2,7 +2,7 @@
"author": "Isaac Z. Schlueter (http://blog.izs.me/)",
"name": "glob",
"description": "the most correct and second fastest glob implementation in JavaScript",
- "version": "10.2.2",
+ "version": "10.2.4",
"bin": "./dist/cjs/src/bin.js",
"repository": {
"type": "git",
@@ -63,7 +63,7 @@
"foreground-child": "^3.1.0",
"jackspeak": "^2.0.3",
"minimatch": "^9.0.0",
- "minipass": "^5.0.0",
+ "minipass": "^5.0.0 || ^6.0.0",
"path-scurry": "^1.7.0"
},
"devDependencies": {
diff --git a/deps/npm/node_modules/libnpmpublish/lib/publish.js b/deps/npm/node_modules/libnpmpublish/lib/publish.js
index 89ca01662cdb57..79c00eb68ad0c8 100644
--- a/deps/npm/node_modules/libnpmpublish/lib/publish.js
+++ b/deps/npm/node_modules/libnpmpublish/lib/publish.js
@@ -42,15 +42,25 @@ Remove the 'private' field from the package.json to publish it.`),
)
}
- const metadata = await buildMetadata(reg, pubManifest, tarballData, spec, opts)
+ const { metadata, transparencyLogUrl } = await buildMetadata(
+ reg,
+ pubManifest,
+ tarballData,
+ spec,
+ opts
+ )
try {
- return await npmFetch(spec.escapedName, {
+ const res = await npmFetch(spec.escapedName, {
...opts,
method: 'PUT',
body: metadata,
ignoreBody: true,
})
+ if (transparencyLogUrl) {
+ res.transparencyLogUrl = transparencyLogUrl
+ }
+ return res
} catch (err) {
if (err.code !== 'E409') {
throw err
@@ -64,12 +74,17 @@ Remove the 'private' field from the package.json to publish it.`),
query: { write: true },
})
const newMetadata = patchMetadata(current, metadata)
- return npmFetch(spec.escapedName, {
+ const res = await npmFetch(spec.escapedName, {
...opts,
method: 'PUT',
body: newMetadata,
ignoreBody: true,
})
+ /* istanbul ignore next */
+ if (transparencyLogUrl) {
+ res.transparencyLogUrl = transparencyLogUrl
+ }
+ return res
}
}
@@ -138,6 +153,7 @@ const buildMetadata = async (registry, manifest, tarballData, spec, opts) => {
}
// Handle case where --provenance flag was set to true
+ let transparencyLogUrl
if (provenance === true) {
const subject = {
name: npa.toPurl(spec),
@@ -161,8 +177,23 @@ const buildMetadata = async (registry, manifest, tarballData, spec, opts) => {
)
}
- const visibility =
- await npmFetch.json(`${registry}/-/package/${spec.escapedName}/visibility`, opts)
+ // Some registries (e.g. GH packages) require auth to check visibility,
+ // and always return 404 when no auth is supplied. In this case we assume
+ // the package is always private and require `--access public` to publish
+ // with provenance.
+ let visibility = { public: false }
+ if (opts.provenance === true && opts.access !== 'public') {
+ try {
+ const res = await npmFetch
+ .json(`${registry}/-/package/${spec.escapedName}/visibility`, opts)
+ visibility = res
+ } catch (err) {
+ if (err.code !== 'E404') {
+ throw err
+ }
+ }
+ }
+
if (!visibility.public && opts.provenance === true && opts.access !== 'public') {
throw Object.assign(
/* eslint-disable-next-line max-len */
@@ -178,8 +209,11 @@ const buildMetadata = async (registry, manifest, tarballData, spec, opts) => {
const tlogEntry = provenanceBundle?.verificationMaterial?.tlogEntries[0]
/* istanbul ignore else */
if (tlogEntry) {
- const logUrl = `${TLOG_BASE_URL}?logIndex=${tlogEntry.logIndex}`
- log.notice('publish', `Provenance statement published to transparency log: ${logUrl}`)
+ transparencyLogUrl = `${TLOG_BASE_URL}?logIndex=${tlogEntry.logIndex}`
+ log.notice(
+ 'publish',
+ `Provenance statement published to transparency log: ${transparencyLogUrl}`
+ )
}
const serializedBundle = JSON.stringify(provenanceBundle)
@@ -190,7 +224,10 @@ const buildMetadata = async (registry, manifest, tarballData, spec, opts) => {
}
}
- return root
+ return {
+ metadata: root,
+ transparencyLogUrl,
+ }
}
const patchMetadata = (current, newData) => {
diff --git a/deps/npm/node_modules/libnpmpublish/package.json b/deps/npm/node_modules/libnpmpublish/package.json
index 2034ef85e47390..a4adbe2a50f154 100644
--- a/deps/npm/node_modules/libnpmpublish/package.json
+++ b/deps/npm/node_modules/libnpmpublish/package.json
@@ -1,6 +1,6 @@
{
"name": "libnpmpublish",
- "version": "7.1.4",
+ "version": "7.2.0",
"description": "Programmatic API for the bits behind npm publish and unpublish",
"author": "GitHub Inc.",
"main": "lib/index.js",
diff --git a/deps/npm/node_modules/path-scurry/dist/cjs/index.js b/deps/npm/node_modules/path-scurry/dist/cjs/index.js
index d209f0e8330492..8044c7e581d2e4 100644
--- a/deps/npm/node_modules/path-scurry/dist/cjs/index.js
+++ b/deps/npm/node_modules/path-scurry/dist/cjs/index.js
@@ -159,6 +159,7 @@ class ChildrenCache extends lru_cache_1.LRUCache {
}
}
exports.ChildrenCache = ChildrenCache;
+const setAsCwd = Symbol('PathScurry setAsCwd');
/**
* Path objects are sort of like a super-powered
* {@link https://nodejs.org/docs/latest/api/fs.html#class-fsdirent fs.Dirent}
@@ -291,6 +292,16 @@ class PathBase {
#children;
#linkTarget;
#realpath;
+ /**
+ * This property is for compatibility with the Dirent class as of
+ * Node v20, where Dirent['path'] refers to the path of the directory
+ * that was passed to readdir. So, somewhat counterintuitively, this
+ * property refers to the *parent* path, not the path object itself.
+ * For root entries, it's the path to the entry itself.
+ */
+ get path() {
+ return (this.parent || this).fullpath();
+ }
/**
* Do not create new Path objects directly. They should always be accessed
* via the PathScurry class or other methods on the Path class.
@@ -438,8 +449,7 @@ class PathBase {
return (this.#relative = this.name);
}
const pv = p.relative();
- const rp = pv + (!pv || !p.parent ? '' : this.sep) + name;
- return (this.#relative = rp);
+ return pv + (!pv || !p.parent ? '' : this.sep) + name;
}
/**
* The relative path from the cwd, using / as the path separator.
@@ -458,8 +468,7 @@ class PathBase {
return (this.#relativePosix = this.fullpathPosix());
}
const pv = p.relativePosix();
- const rp = pv + (!pv || !p.parent ? '' : '/') + name;
- return (this.#relativePosix = rp);
+ return pv + (!pv || !p.parent ? '' : '/') + name;
}
/**
* The fully resolved path string for this Path entry
@@ -1111,6 +1120,33 @@ class PathBase {
this.#markENOREALPATH();
}
}
+ /**
+ * Internal method to mark this Path object as the scurry cwd,
+ * called by {@link PathScurry#chdir}
+ *
+ * @internal
+ */
+ [setAsCwd](oldCwd) {
+ if (oldCwd === this)
+ return;
+ const changed = new Set([]);
+ let rp = [];
+ let p = this;
+ while (p && p.parent) {
+ changed.add(p);
+ p.#relative = rp.join(this.sep);
+ p.#relativePosix = rp.join('/');
+ p = p.parent;
+ rp.push('..');
+ }
+ // now un-memoize parents of old cwd
+ p = oldCwd;
+ while (p && p.parent && !changed.has(p)) {
+ p.#relative = undefined;
+ p.#relativePosix = undefined;
+ p = p.parent;
+ }
+ }
}
exports.PathBase = PathBase;
/**
@@ -1838,6 +1874,11 @@ class PathScurryBase {
process();
return results;
}
+ chdir(path = this.cwd) {
+ const oldCwd = this.cwd;
+ this.cwd = typeof path === 'string' ? this.cwd.resolve(path) : path;
+ this.cwd[setAsCwd](oldCwd);
+ }
}
exports.PathScurryBase = PathScurryBase;
/**
diff --git a/deps/npm/node_modules/path-scurry/dist/mjs/index.js b/deps/npm/node_modules/path-scurry/dist/mjs/index.js
index 8490cf73124f3b..957f087c865147 100644
--- a/deps/npm/node_modules/path-scurry/dist/mjs/index.js
+++ b/deps/npm/node_modules/path-scurry/dist/mjs/index.js
@@ -131,6 +131,7 @@ export class ChildrenCache extends LRUCache {
});
}
}
+const setAsCwd = Symbol('PathScurry setAsCwd');
/**
* Path objects are sort of like a super-powered
* {@link https://nodejs.org/docs/latest/api/fs.html#class-fsdirent fs.Dirent}
@@ -263,6 +264,16 @@ export class PathBase {
#children;
#linkTarget;
#realpath;
+ /**
+ * This property is for compatibility with the Dirent class as of
+ * Node v20, where Dirent['path'] refers to the path of the directory
+ * that was passed to readdir. So, somewhat counterintuitively, this
+ * property refers to the *parent* path, not the path object itself.
+ * For root entries, it's the path to the entry itself.
+ */
+ get path() {
+ return (this.parent || this).fullpath();
+ }
/**
* Do not create new Path objects directly. They should always be accessed
* via the PathScurry class or other methods on the Path class.
@@ -410,8 +421,7 @@ export class PathBase {
return (this.#relative = this.name);
}
const pv = p.relative();
- const rp = pv + (!pv || !p.parent ? '' : this.sep) + name;
- return (this.#relative = rp);
+ return pv + (!pv || !p.parent ? '' : this.sep) + name;
}
/**
* The relative path from the cwd, using / as the path separator.
@@ -430,8 +440,7 @@ export class PathBase {
return (this.#relativePosix = this.fullpathPosix());
}
const pv = p.relativePosix();
- const rp = pv + (!pv || !p.parent ? '' : '/') + name;
- return (this.#relativePosix = rp);
+ return pv + (!pv || !p.parent ? '' : '/') + name;
}
/**
* The fully resolved path string for this Path entry
@@ -1083,6 +1092,33 @@ export class PathBase {
this.#markENOREALPATH();
}
}
+ /**
+ * Internal method to mark this Path object as the scurry cwd,
+ * called by {@link PathScurry#chdir}
+ *
+ * @internal
+ */
+ [setAsCwd](oldCwd) {
+ if (oldCwd === this)
+ return;
+ const changed = new Set([]);
+ let rp = [];
+ let p = this;
+ while (p && p.parent) {
+ changed.add(p);
+ p.#relative = rp.join(this.sep);
+ p.#relativePosix = rp.join('/');
+ p = p.parent;
+ rp.push('..');
+ }
+ // now un-memoize parents of old cwd
+ p = oldCwd;
+ while (p && p.parent && !changed.has(p)) {
+ p.#relative = undefined;
+ p.#relativePosix = undefined;
+ p = p.parent;
+ }
+ }
}
/**
* Path class used on win32 systems
@@ -1807,6 +1843,11 @@ export class PathScurryBase {
process();
return results;
}
+ chdir(path = this.cwd) {
+ const oldCwd = this.cwd;
+ this.cwd = typeof path === 'string' ? this.cwd.resolve(path) : path;
+ this.cwd[setAsCwd](oldCwd);
+ }
}
/**
* Windows implementation of {@link PathScurryBase}
diff --git a/deps/npm/node_modules/path-scurry/package.json b/deps/npm/node_modules/path-scurry/package.json
index bb282b966c53c1..677bf1ce9b6e58 100644
--- a/deps/npm/node_modules/path-scurry/package.json
+++ b/deps/npm/node_modules/path-scurry/package.json
@@ -1,6 +1,6 @@
{
"name": "path-scurry",
- "version": "1.7.0",
+ "version": "1.9.1",
"description": "walk paths fast and efficiently",
"author": "Isaac Z. Schlueter (https://blog.izs.me)",
"main": "./dist/cjs/index.js",
@@ -58,7 +58,7 @@
},
"devDependencies": {
"@nodelib/fs.walk": "^1.2.8",
- "@types/node": "^18.11.18",
+ "@types/node": "^20.1.4",
"@types/tap": "^15.0.7",
"c8": "^7.12.0",
"eslint-config-prettier": "^8.6.0",
@@ -81,7 +81,7 @@
"url": "git+https://github.com/isaacs/path-walker"
},
"dependencies": {
- "lru-cache": "^9.0.0",
- "minipass": "^5.0.0"
+ "lru-cache": "^9.1.1",
+ "minipass": "^5.0.0 || ^6.0.0"
}
}
diff --git a/deps/npm/node_modules/postcss-selector-parser/API.md b/deps/npm/node_modules/postcss-selector-parser/API.md
index 36c7298fc9753c..64459e3376fba3 100644
--- a/deps/npm/node_modules/postcss-selector-parser/API.md
+++ b/deps/npm/node_modules/postcss-selector-parser/API.md
@@ -278,16 +278,13 @@ if (node.type === 'id') {
}
```
-### `node.clone()`
+### `node.clone([opts])`
Returns a copy of a node, detached from any parent containers that the
original might have had.
```js
-const cloned = parser.id({value: 'search'});
-String(cloned);
-
-// => #search
+const cloned = node.clone();
```
### `node.isAtPosition(line, column)`
diff --git a/deps/npm/node_modules/postcss-selector-parser/dist/parser.js b/deps/npm/node_modules/postcss-selector-parser/dist/parser.js
index 2a1e72c6c6c009..b4c75e3edc3fe6 100644
--- a/deps/npm/node_modules/postcss-selector-parser/dist/parser.js
+++ b/deps/npm/node_modules/postcss-selector-parser/dist/parser.js
@@ -609,6 +609,9 @@ var Parser = /*#__PURE__*/function () {
_proto.unexpected = function unexpected() {
return this.error("Unexpected '" + this.content() + "'. Escaping special characters with \\ may help.", this.currToken[_tokenize.FIELDS.START_POS]);
};
+ _proto.unexpectedPipe = function unexpectedPipe() {
+ return this.error("Unexpected '|'.", this.currToken[_tokenize.FIELDS.START_POS]);
+ };
_proto.namespace = function namespace() {
var before = this.prevToken && this.content(this.prevToken) || true;
if (this.nextToken[_tokenize.FIELDS.TYPE] === tokens.word) {
@@ -618,6 +621,7 @@ var Parser = /*#__PURE__*/function () {
this.position++;
return this.universal(before);
}
+ this.unexpectedPipe();
};
_proto.nesting = function nesting() {
if (this.nextToken) {
diff --git a/deps/npm/node_modules/postcss-selector-parser/package.json b/deps/npm/node_modules/postcss-selector-parser/package.json
index ff9c40960f737a..dce071cdcb2b3a 100644
--- a/deps/npm/node_modules/postcss-selector-parser/package.json
+++ b/deps/npm/node_modules/postcss-selector-parser/package.json
@@ -1,6 +1,6 @@
{
"name": "postcss-selector-parser",
- "version": "6.0.12",
+ "version": "6.0.13",
"devDependencies": {
"@babel/cli": "^7.11.6",
"@babel/core": "^7.11.6",
diff --git a/deps/npm/node_modules/readable-stream/lib/internal/streams/add-abort-signal.js b/deps/npm/node_modules/readable-stream/lib/internal/streams/add-abort-signal.js
index c6ba8b9c298f18..3a26a1d3e6d76d 100644
--- a/deps/npm/node_modules/readable-stream/lib/internal/streams/add-abort-signal.js
+++ b/deps/npm/node_modules/readable-stream/lib/internal/streams/add-abort-signal.js
@@ -1,6 +1,7 @@
'use strict'
const { AbortError, codes } = require('../../ours/errors')
+const { isNodeStream, isWebStream, kControllerErrorFunction } = require('./utils')
const eos = require('./end-of-stream')
const { ERR_INVALID_ARG_TYPE } = codes
@@ -12,13 +13,10 @@ const validateAbortSignal = (signal, name) => {
throw new ERR_INVALID_ARG_TYPE(name, 'AbortSignal', signal)
}
}
-function isNodeStream(obj) {
- return !!(obj && typeof obj.pipe === 'function')
-}
module.exports.addAbortSignal = function addAbortSignal(signal, stream) {
validateAbortSignal(signal, 'signal')
- if (!isNodeStream(stream)) {
- throw new ERR_INVALID_ARG_TYPE('stream', 'stream.Stream', stream)
+ if (!isNodeStream(stream) && !isWebStream(stream)) {
+ throw new ERR_INVALID_ARG_TYPE('stream', ['ReadableStream', 'WritableStream', 'Stream'], stream)
}
return module.exports.addAbortSignalNoValidate(signal, stream)
}
@@ -26,13 +24,21 @@ module.exports.addAbortSignalNoValidate = function (signal, stream) {
if (typeof signal !== 'object' || !('aborted' in signal)) {
return stream
}
- const onAbort = () => {
- stream.destroy(
- new AbortError(undefined, {
- cause: signal.reason
- })
- )
- }
+ const onAbort = isNodeStream(stream)
+ ? () => {
+ stream.destroy(
+ new AbortError(undefined, {
+ cause: signal.reason
+ })
+ )
+ }
+ : () => {
+ stream[kControllerErrorFunction](
+ new AbortError(undefined, {
+ cause: signal.reason
+ })
+ )
+ }
if (signal.aborted) {
onAbort()
} else {
diff --git a/deps/npm/node_modules/readable-stream/lib/internal/streams/compose.js b/deps/npm/node_modules/readable-stream/lib/internal/streams/compose.js
index 4a00aead883c2f..f565c12ef3620c 100644
--- a/deps/npm/node_modules/readable-stream/lib/internal/streams/compose.js
+++ b/deps/npm/node_modules/readable-stream/lib/internal/streams/compose.js
@@ -3,11 +3,20 @@
const { pipeline } = require('./pipeline')
const Duplex = require('./duplex')
const { destroyer } = require('./destroy')
-const { isNodeStream, isReadable, isWritable } = require('./utils')
+const {
+ isNodeStream,
+ isReadable,
+ isWritable,
+ isWebStream,
+ isTransformStream,
+ isWritableStream,
+ isReadableStream
+} = require('./utils')
const {
AbortError,
codes: { ERR_INVALID_ARG_VALUE, ERR_MISSING_ARGS }
} = require('../../ours/errors')
+const eos = require('./end-of-stream')
module.exports = function compose(...streams) {
if (streams.length === 0) {
throw new ERR_MISSING_ARGS('streams')
@@ -24,14 +33,17 @@ module.exports = function compose(...streams) {
streams[idx] = Duplex.from(streams[idx])
}
for (let n = 0; n < streams.length; ++n) {
- if (!isNodeStream(streams[n])) {
+ if (!isNodeStream(streams[n]) && !isWebStream(streams[n])) {
// TODO(ronag): Add checks for non streams.
continue
}
- if (n < streams.length - 1 && !isReadable(streams[n])) {
+ if (
+ n < streams.length - 1 &&
+ !(isReadable(streams[n]) || isReadableStream(streams[n]) || isTransformStream(streams[n]))
+ ) {
throw new ERR_INVALID_ARG_VALUE(`streams[${n}]`, orgStreams[n], 'must be readable')
}
- if (n > 0 && !isWritable(streams[n])) {
+ if (n > 0 && !(isWritable(streams[n]) || isWritableStream(streams[n]) || isTransformStream(streams[n]))) {
throw new ERR_INVALID_ARG_VALUE(`streams[${n}]`, orgStreams[n], 'must be writable')
}
}
@@ -53,8 +65,8 @@ module.exports = function compose(...streams) {
}
const head = streams[0]
const tail = pipeline(streams, onfinished)
- const writable = !!isWritable(head)
- const readable = !!isReadable(tail)
+ const writable = !!(isWritable(head) || isWritableStream(head) || isTransformStream(head))
+ const readable = !!(isReadable(tail) || isReadableStream(tail) || isTransformStream(tail))
// TODO(ronag): Avoid double buffering.
// Implement Writable/Readable/Duplex traits.
@@ -67,25 +79,49 @@ module.exports = function compose(...streams) {
readable
})
if (writable) {
- d._write = function (chunk, encoding, callback) {
- if (head.write(chunk, encoding)) {
- callback()
- } else {
- ondrain = callback
+ if (isNodeStream(head)) {
+ d._write = function (chunk, encoding, callback) {
+ if (head.write(chunk, encoding)) {
+ callback()
+ } else {
+ ondrain = callback
+ }
}
- }
- d._final = function (callback) {
- head.end()
- onfinish = callback
- }
- head.on('drain', function () {
- if (ondrain) {
- const cb = ondrain
- ondrain = null
- cb()
+ d._final = function (callback) {
+ head.end()
+ onfinish = callback
}
- })
- tail.on('finish', function () {
+ head.on('drain', function () {
+ if (ondrain) {
+ const cb = ondrain
+ ondrain = null
+ cb()
+ }
+ })
+ } else if (isWebStream(head)) {
+ const writable = isTransformStream(head) ? head.writable : head
+ const writer = writable.getWriter()
+ d._write = async function (chunk, encoding, callback) {
+ try {
+ await writer.ready
+ writer.write(chunk).catch(() => {})
+ callback()
+ } catch (err) {
+ callback(err)
+ }
+ }
+ d._final = async function (callback) {
+ try {
+ await writer.ready
+ writer.close().catch(() => {})
+ onfinish = callback
+ } catch (err) {
+ callback(err)
+ }
+ }
+ }
+ const toRead = isTransformStream(tail) ? tail.readable : tail
+ eos(toRead, () => {
if (onfinish) {
const cb = onfinish
onfinish = null
@@ -94,25 +130,46 @@ module.exports = function compose(...streams) {
})
}
if (readable) {
- tail.on('readable', function () {
- if (onreadable) {
- const cb = onreadable
- onreadable = null
- cb()
- }
- })
- tail.on('end', function () {
- d.push(null)
- })
- d._read = function () {
- while (true) {
- const buf = tail.read()
- if (buf === null) {
- onreadable = d._read
- return
+ if (isNodeStream(tail)) {
+ tail.on('readable', function () {
+ if (onreadable) {
+ const cb = onreadable
+ onreadable = null
+ cb()
+ }
+ })
+ tail.on('end', function () {
+ d.push(null)
+ })
+ d._read = function () {
+ while (true) {
+ const buf = tail.read()
+ if (buf === null) {
+ onreadable = d._read
+ return
+ }
+ if (!d.push(buf)) {
+ return
+ }
}
- if (!d.push(buf)) {
- return
+ }
+ } else if (isWebStream(tail)) {
+ const readable = isTransformStream(tail) ? tail.readable : tail
+ const reader = readable.getReader()
+ d._read = async function () {
+ while (true) {
+ try {
+ const { value, done } = await reader.read()
+ if (!d.push(value)) {
+ return
+ }
+ if (done) {
+ d.push(null)
+ return
+ }
+ } catch {
+ return
+ }
}
}
}
@@ -128,7 +185,9 @@ module.exports = function compose(...streams) {
callback(err)
} else {
onclose = callback
- destroyer(tail, err)
+ if (isNodeStream(tail)) {
+ destroyer(tail, err)
+ }
}
}
return d
diff --git a/deps/npm/node_modules/readable-stream/lib/internal/streams/destroy.js b/deps/npm/node_modules/readable-stream/lib/internal/streams/destroy.js
index 768f2d79d3a893..db76c29f94bab0 100644
--- a/deps/npm/node_modules/readable-stream/lib/internal/streams/destroy.js
+++ b/deps/npm/node_modules/readable-stream/lib/internal/streams/destroy.js
@@ -36,7 +36,7 @@ function destroy(err, cb) {
const w = this._writableState
// With duplex streams we use the writable side for state.
const s = w || r
- if ((w && w.destroyed) || (r && r.destroyed)) {
+ if ((w !== null && w !== undefined && w.destroyed) || (r !== null && r !== undefined && r.destroyed)) {
if (typeof cb === 'function') {
cb()
}
@@ -107,14 +107,14 @@ function emitCloseNT(self) {
if (r) {
r.closeEmitted = true
}
- if ((w && w.emitClose) || (r && r.emitClose)) {
+ if ((w !== null && w !== undefined && w.emitClose) || (r !== null && r !== undefined && r.emitClose)) {
self.emit('close')
}
}
function emitErrorNT(self, err) {
const r = self._readableState
const w = self._writableState
- if ((w && w.errorEmitted) || (r && r.errorEmitted)) {
+ if ((w !== null && w !== undefined && w.errorEmitted) || (r !== null && r !== undefined && r.errorEmitted)) {
return
}
if (w) {
@@ -162,10 +162,11 @@ function errorOrDestroy(stream, err, sync) {
const r = stream._readableState
const w = stream._writableState
- if ((w && w.destroyed) || (r && r.destroyed)) {
+ if ((w !== null && w !== undefined && w.destroyed) || (r !== null && r !== undefined && r.destroyed)) {
return this
}
- if ((r && r.autoDestroy) || (w && w.autoDestroy)) stream.destroy(err)
+ if ((r !== null && r !== undefined && r.autoDestroy) || (w !== null && w !== undefined && w.autoDestroy))
+ stream.destroy(err)
else if (err) {
// Avoid V8 leak, https://github.com/nodejs/node/pull/34103#issuecomment-652002364
err.stack // eslint-disable-line no-unused-expressions
@@ -228,16 +229,18 @@ function constructNT(stream) {
}
}
try {
- stream._construct(onConstruct)
+ stream._construct((err) => {
+ process.nextTick(onConstruct, err)
+ })
} catch (err) {
- onConstruct(err)
+ process.nextTick(onConstruct, err)
}
}
function emitConstructNT(stream) {
stream.emit(kConstruct)
}
function isRequest(stream) {
- return stream && stream.setHeader && typeof stream.abort === 'function'
+ return (stream === null || stream === undefined ? undefined : stream.setHeader) && typeof stream.abort === 'function'
}
function emitCloseLegacy(stream) {
stream.emit('close')
diff --git a/deps/npm/node_modules/readable-stream/lib/internal/streams/duplexify.js b/deps/npm/node_modules/readable-stream/lib/internal/streams/duplexify.js
index 43300ddc8a45bc..599fb47ab53c2e 100644
--- a/deps/npm/node_modules/readable-stream/lib/internal/streams/duplexify.js
+++ b/deps/npm/node_modules/readable-stream/lib/internal/streams/duplexify.js
@@ -282,8 +282,6 @@ function _duplexify(pair) {
cb(err)
} else if (err) {
d.destroy(err)
- } else if (!readable && !writable) {
- d.destroy()
}
}
diff --git a/deps/npm/node_modules/readable-stream/lib/internal/streams/end-of-stream.js b/deps/npm/node_modules/readable-stream/lib/internal/streams/end-of-stream.js
index 57dbaa48a3ca5a..043c9c4bdac518 100644
--- a/deps/npm/node_modules/readable-stream/lib/internal/streams/end-of-stream.js
+++ b/deps/npm/node_modules/readable-stream/lib/internal/streams/end-of-stream.js
@@ -10,20 +10,23 @@ const process = require('process/')
const { AbortError, codes } = require('../../ours/errors')
const { ERR_INVALID_ARG_TYPE, ERR_STREAM_PREMATURE_CLOSE } = codes
const { kEmptyObject, once } = require('../../ours/util')
-const { validateAbortSignal, validateFunction, validateObject } = require('../validators')
-const { Promise } = require('../../ours/primordials')
+const { validateAbortSignal, validateFunction, validateObject, validateBoolean } = require('../validators')
+const { Promise, PromisePrototypeThen } = require('../../ours/primordials')
const {
isClosed,
isReadable,
isReadableNodeStream,
+ isReadableStream,
isReadableFinished,
isReadableErrored,
isWritable,
isWritableNodeStream,
+ isWritableStream,
isWritableFinished,
isWritableErrored,
isNodeStream,
- willEmitClose: _willEmitClose
+ willEmitClose: _willEmitClose,
+ kIsClosedPromise
} = require('./utils')
function isRequest(stream) {
return stream.setHeader && typeof stream.abort === 'function'
@@ -42,6 +45,12 @@ function eos(stream, options, callback) {
validateFunction(callback, 'callback')
validateAbortSignal(options.signal, 'options.signal')
callback = once(callback)
+ if (isReadableStream(stream) || isWritableStream(stream)) {
+ return eosWeb(stream, options, callback)
+ }
+ if (!isNodeStream(stream)) {
+ throw new ERR_INVALID_ARG_TYPE('stream', ['ReadableStream', 'WritableStream', 'Stream'], stream)
+ }
const readable =
(_options$readable = options.readable) !== null && _options$readable !== undefined
? _options$readable
@@ -50,10 +59,6 @@ function eos(stream, options, callback) {
(_options$writable = options.writable) !== null && _options$writable !== undefined
? _options$writable
: isWritableNodeStream(stream)
- if (!isNodeStream(stream)) {
- // TODO: Webstreams.
- throw new ERR_INVALID_ARG_TYPE('stream', 'Stream', stream)
- }
const wState = stream._writableState
const rState = stream._readableState
const onlegacyfinish = () => {
@@ -117,6 +122,14 @@ function eos(stream, options, callback) {
}
callback.call(stream)
}
+ const onclosed = () => {
+ closed = true
+ const errored = isWritableErrored(stream) || isReadableErrored(stream)
+ if (errored && typeof errored !== 'boolean') {
+ return callback.call(stream, errored)
+ }
+ callback.call(stream)
+ }
const onrequest = () => {
stream.req.on('finish', onfinish)
}
@@ -153,22 +166,22 @@ function eos(stream, options, callback) {
(rState !== null && rState !== undefined && rState.errorEmitted)
) {
if (!willEmitClose) {
- process.nextTick(onclose)
+ process.nextTick(onclosed)
}
} else if (
!readable &&
(!willEmitClose || isReadable(stream)) &&
(writableFinished || isWritable(stream) === false)
) {
- process.nextTick(onclose)
+ process.nextTick(onclosed)
} else if (
!writable &&
(!willEmitClose || isWritable(stream)) &&
(readableFinished || isReadable(stream) === false)
) {
- process.nextTick(onclose)
+ process.nextTick(onclosed)
} else if (rState && stream.req && stream.aborted) {
- process.nextTick(onclose)
+ process.nextTick(onclosed)
}
const cleanup = () => {
callback = nop
@@ -209,9 +222,53 @@ function eos(stream, options, callback) {
}
return cleanup
}
+function eosWeb(stream, options, callback) {
+ let isAborted = false
+ let abort = nop
+ if (options.signal) {
+ abort = () => {
+ isAborted = true
+ callback.call(
+ stream,
+ new AbortError(undefined, {
+ cause: options.signal.reason
+ })
+ )
+ }
+ if (options.signal.aborted) {
+ process.nextTick(abort)
+ } else {
+ const originalCallback = callback
+ callback = once((...args) => {
+ options.signal.removeEventListener('abort', abort)
+ originalCallback.apply(stream, args)
+ })
+ options.signal.addEventListener('abort', abort)
+ }
+ }
+ const resolverFn = (...args) => {
+ if (!isAborted) {
+ process.nextTick(() => callback.apply(stream, args))
+ }
+ }
+ PromisePrototypeThen(stream[kIsClosedPromise].promise, resolverFn, resolverFn)
+ return nop
+}
function finished(stream, opts) {
+ var _opts
+ let autoCleanup = false
+ if (opts === null) {
+ opts = kEmptyObject
+ }
+ if ((_opts = opts) !== null && _opts !== undefined && _opts.cleanup) {
+ validateBoolean(opts.cleanup, 'cleanup')
+ autoCleanup = opts.cleanup
+ }
return new Promise((resolve, reject) => {
- eos(stream, opts, (err) => {
+ const cleanup = eos(stream, opts, (err) => {
+ if (autoCleanup) {
+ cleanup()
+ }
if (err) {
reject(err)
} else {
diff --git a/deps/npm/node_modules/readable-stream/lib/internal/streams/operators.js b/deps/npm/node_modules/readable-stream/lib/internal/streams/operators.js
index 323a74a17c32e9..869cacb39faca9 100644
--- a/deps/npm/node_modules/readable-stream/lib/internal/streams/operators.js
+++ b/deps/npm/node_modules/readable-stream/lib/internal/streams/operators.js
@@ -2,12 +2,15 @@
const AbortController = globalThis.AbortController || require('abort-controller').AbortController
const {
- codes: { ERR_INVALID_ARG_TYPE, ERR_MISSING_ARGS, ERR_OUT_OF_RANGE },
+ codes: { ERR_INVALID_ARG_VALUE, ERR_INVALID_ARG_TYPE, ERR_MISSING_ARGS, ERR_OUT_OF_RANGE },
AbortError
} = require('../../ours/errors')
const { validateAbortSignal, validateInteger, validateObject } = require('../validators')
const kWeakHandler = require('../../ours/primordials').Symbol('kWeak')
const { finished } = require('./end-of-stream')
+const staticCompose = require('./compose')
+const { addAbortSignalNoValidate } = require('./add-abort-signal')
+const { isWritable, isNodeStream } = require('./utils')
const {
ArrayPrototypePush,
MathFloor,
@@ -20,6 +23,23 @@ const {
} = require('../../ours/primordials')
const kEmpty = Symbol('kEmpty')
const kEof = Symbol('kEof')
+function compose(stream, options) {
+ if (options != null) {
+ validateObject(options, 'options')
+ }
+ if ((options === null || options === undefined ? undefined : options.signal) != null) {
+ validateAbortSignal(options.signal, 'options.signal')
+ }
+ if (isNodeStream(stream) && !isWritable(stream)) {
+ throw new ERR_INVALID_ARG_VALUE('stream', stream, 'must be writable')
+ }
+ const composedStream = staticCompose(this, stream)
+ if (options !== null && options !== undefined && options.signal) {
+ // Not validating as we already validated before
+ addAbortSignalNoValidate(options.signal, composedStream)
+ }
+ return composedStream
+}
function map(fn, options) {
if (typeof fn !== 'function') {
throw new ERR_INVALID_ARG_TYPE('fn', ['Function', 'AsyncFunction'], fn)
@@ -424,7 +444,8 @@ module.exports.streamReturningOperators = {
filter,
flatMap,
map,
- take
+ take,
+ compose
}
module.exports.promiseReturningOperators = {
every,
diff --git a/deps/npm/node_modules/readable-stream/lib/internal/streams/pipeline.js b/deps/npm/node_modules/readable-stream/lib/internal/streams/pipeline.js
index 016e96ee6ff247..8393ba5146991b 100644
--- a/deps/npm/node_modules/readable-stream/lib/internal/streams/pipeline.js
+++ b/deps/npm/node_modules/readable-stream/lib/internal/streams/pipeline.js
@@ -24,7 +24,16 @@ const {
AbortError
} = require('../../ours/errors')
const { validateFunction, validateAbortSignal } = require('../validators')
-const { isIterable, isReadable, isReadableNodeStream, isNodeStream } = require('./utils')
+const {
+ isIterable,
+ isReadable,
+ isReadableNodeStream,
+ isNodeStream,
+ isTransformStream,
+ isWebStream,
+ isReadableStream,
+ isReadableEnded
+} = require('./utils')
const AbortController = globalThis.AbortController || require('abort-controller').AbortController
let PassThrough
let Readable
@@ -74,7 +83,7 @@ async function* fromReadable(val) {
}
yield* Readable.prototype[SymbolAsyncIterator].call(val)
}
-async function pump(iterable, writable, finish, { end }) {
+async function pumpToNode(iterable, writable, finish, { end }) {
let error
let onresolve = null
const resume = (err) => {
@@ -130,6 +139,31 @@ async function pump(iterable, writable, finish, { end }) {
writable.off('drain', resume)
}
}
+async function pumpToWeb(readable, writable, finish, { end }) {
+ if (isTransformStream(writable)) {
+ writable = writable.writable
+ }
+ // https://streams.spec.whatwg.org/#example-manual-write-with-backpressure
+ const writer = writable.getWriter()
+ try {
+ for await (const chunk of readable) {
+ await writer.ready
+ writer.write(chunk).catch(() => {})
+ }
+ await writer.ready
+ if (end) {
+ await writer.close()
+ }
+ finish()
+ } catch (err) {
+ try {
+ await writer.abort(err)
+ finish(err)
+ } catch (err) {
+ finish(err)
+ }
+ }
+}
function pipeline(...streams) {
return pipelineImpl(streams, once(popCallback(streams)))
}
@@ -215,13 +249,18 @@ function pipelineImpl(streams, callback, opts) {
if (!isIterable(ret)) {
throw new ERR_INVALID_RETURN_VALUE('Iterable, AsyncIterable or Stream', 'source', ret)
}
- } else if (isIterable(stream) || isReadableNodeStream(stream)) {
+ } else if (isIterable(stream) || isReadableNodeStream(stream) || isTransformStream(stream)) {
ret = stream
} else {
ret = Duplex.from(stream)
}
} else if (typeof stream === 'function') {
- ret = makeAsyncIterable(ret)
+ if (isTransformStream(ret)) {
+ var _ret
+ ret = makeAsyncIterable((_ret = ret) === null || _ret === undefined ? undefined : _ret.readable)
+ } else {
+ ret = makeAsyncIterable(ret)
+ }
ret = stream(ret, {
signal
})
@@ -230,7 +269,7 @@ function pipelineImpl(streams, callback, opts) {
throw new ERR_INVALID_RETURN_VALUE('AsyncIterable', `transform[${i - 1}]`, ret)
}
} else {
- var _ret
+ var _ret2
if (!PassThrough) {
PassThrough = require('./passthrough')
}
@@ -246,7 +285,7 @@ function pipelineImpl(streams, callback, opts) {
// Handle Promises/A+ spec, `then` could be a getter that throws on
// second use.
- const then = (_ret = ret) === null || _ret === undefined ? undefined : _ret.then
+ const then = (_ret2 = ret) === null || _ret2 === undefined ? undefined : _ret2.then
if (typeof then === 'function') {
finishCount++
then.call(
@@ -268,7 +307,13 @@ function pipelineImpl(streams, callback, opts) {
)
} else if (isIterable(ret, true)) {
finishCount++
- pump(ret, pt, finish, {
+ pumpToNode(ret, pt, finish, {
+ end
+ })
+ } else if (isReadableStream(ret) || isTransformStream(ret)) {
+ const toRead = ret.readable || ret
+ finishCount++
+ pumpToNode(toRead, pt, finish, {
end
})
} else {
@@ -290,13 +335,47 @@ function pipelineImpl(streams, callback, opts) {
if (isReadable(stream) && isLastStream) {
lastStreamCleanup.push(cleanup)
}
+ } else if (isTransformStream(ret) || isReadableStream(ret)) {
+ const toRead = ret.readable || ret
+ finishCount++
+ pumpToNode(toRead, stream, finish, {
+ end
+ })
} else if (isIterable(ret)) {
finishCount++
- pump(ret, stream, finish, {
+ pumpToNode(ret, stream, finish, {
end
})
} else {
- throw new ERR_INVALID_ARG_TYPE('val', ['Readable', 'Iterable', 'AsyncIterable'], ret)
+ throw new ERR_INVALID_ARG_TYPE(
+ 'val',
+ ['Readable', 'Iterable', 'AsyncIterable', 'ReadableStream', 'TransformStream'],
+ ret
+ )
+ }
+ ret = stream
+ } else if (isWebStream(stream)) {
+ if (isReadableNodeStream(ret)) {
+ finishCount++
+ pumpToWeb(makeAsyncIterable(ret), stream, finish, {
+ end
+ })
+ } else if (isReadableStream(ret) || isIterable(ret)) {
+ finishCount++
+ pumpToWeb(ret, stream, finish, {
+ end
+ })
+ } else if (isTransformStream(ret)) {
+ finishCount++
+ pumpToWeb(ret.readable, stream, finish, {
+ end
+ })
+ } else {
+ throw new ERR_INVALID_ARG_TYPE(
+ 'val',
+ ['Readable', 'Iterable', 'AsyncIterable', 'ReadableStream', 'TransformStream'],
+ ret
+ )
}
ret = stream
} else {
@@ -320,16 +399,24 @@ function pipe(src, dst, finish, { end }) {
}
})
src.pipe(dst, {
- end
- })
+ end: false
+ }) // If end is true we already will have a listener to end dst.
+
if (end) {
// Compat. Before node v10.12.0 stdio used to throw an error so
// pipe() did/does not end() stdio destinations.
// Now they allow it but "secretly" don't close the underlying fd.
- src.once('end', () => {
+
+ function endFn() {
ended = true
dst.end()
- })
+ }
+ if (isReadableEnded(src)) {
+ // End the destination if the source has already ended.
+ process.nextTick(endFn)
+ } else {
+ src.once('end', endFn)
+ }
} else {
finish()
}
diff --git a/deps/npm/node_modules/readable-stream/lib/internal/streams/utils.js b/deps/npm/node_modules/readable-stream/lib/internal/streams/utils.js
index f87e9fe68e6a82..e589ad96c6924e 100644
--- a/deps/npm/node_modules/readable-stream/lib/internal/streams/utils.js
+++ b/deps/npm/node_modules/readable-stream/lib/internal/streams/utils.js
@@ -1,10 +1,12 @@
'use strict'
-const { Symbol, SymbolAsyncIterator, SymbolIterator } = require('../../ours/primordials')
+const { Symbol, SymbolAsyncIterator, SymbolIterator, SymbolFor } = require('../../ours/primordials')
const kDestroyed = Symbol('kDestroyed')
const kIsErrored = Symbol('kIsErrored')
const kIsReadable = Symbol('kIsReadable')
const kIsDisturbed = Symbol('kIsDisturbed')
+const kIsClosedPromise = SymbolFor('nodejs.webstream.isClosedPromise')
+const kControllerErrorFunction = SymbolFor('nodejs.webstream.controllerErrorFunction')
function isReadableNodeStream(obj, strict = false) {
var _obj$_readableState
return !!(
@@ -56,6 +58,24 @@ function isNodeStream(obj) {
(typeof obj.pipe === 'function' && typeof obj.on === 'function'))
)
}
+function isReadableStream(obj) {
+ return !!(
+ obj &&
+ !isNodeStream(obj) &&
+ typeof obj.pipeThrough === 'function' &&
+ typeof obj.getReader === 'function' &&
+ typeof obj.cancel === 'function'
+ )
+}
+function isWritableStream(obj) {
+ return !!(obj && !isNodeStream(obj) && typeof obj.getWriter === 'function' && typeof obj.abort === 'function')
+}
+function isTransformStream(obj) {
+ return !!(obj && !isNodeStream(obj) && typeof obj.readable === 'object' && typeof obj.writable === 'object')
+}
+function isWebStream(obj) {
+ return isReadableStream(obj) || isWritableStream(obj) || isTransformStream(obj)
+}
function isIterable(obj, isAsync) {
if (obj == null) return false
if (isAsync === true) return typeof obj[SymbolAsyncIterator] === 'function'
@@ -274,22 +294,28 @@ module.exports = {
kIsErrored,
isReadable,
kIsReadable,
+ kIsClosedPromise,
+ kControllerErrorFunction,
isClosed,
isDestroyed,
isDuplexNodeStream,
isFinished,
isIterable,
isReadableNodeStream,
+ isReadableStream,
isReadableEnded,
isReadableFinished,
isReadableErrored,
isNodeStream,
+ isWebStream,
isWritable,
isWritableNodeStream,
+ isWritableStream,
isWritableEnded,
isWritableFinished,
isWritableErrored,
isServerRequest,
isServerResponse,
- willEmitClose
+ willEmitClose,
+ isTransformStream
}
diff --git a/deps/npm/node_modules/readable-stream/lib/internal/validators.js b/deps/npm/node_modules/readable-stream/lib/internal/validators.js
index f9e6e555971a1b..85b2e9cd593d9b 100644
--- a/deps/npm/node_modules/readable-stream/lib/internal/validators.js
+++ b/deps/npm/node_modules/readable-stream/lib/internal/validators.js
@@ -1,3 +1,5 @@
+/* eslint jsdoc/require-jsdoc: "error" */
+
'use strict'
const {
@@ -199,6 +201,13 @@ const validateOneOf = hideStackFrames((value, name, oneOf) => {
function validateBoolean(value, name) {
if (typeof value !== 'boolean') throw new ERR_INVALID_ARG_TYPE(name, 'boolean', value)
}
+
+/**
+ * @param {any} options
+ * @param {string} key
+ * @param {boolean} defaultValue
+ * @returns {boolean}
+ */
function getOwnPropertyValueOrDefault(options, key, defaultValue) {
return options == null || !ObjectPrototypeHasOwnProperty(options, key) ? defaultValue : options[key]
}
@@ -228,6 +237,24 @@ const validateObject = hideStackFrames((value, name, options = null) => {
}
})
+/**
+ * @callback validateDictionary - We are using the Web IDL Standard definition
+ * of "dictionary" here, which means any value
+ * whose Type is either Undefined, Null, or
+ * Object (which includes functions).
+ * @param {*} value
+ * @param {string} name
+ * @see https://webidl.spec.whatwg.org/#es-dictionary
+ * @see https://tc39.es/ecma262/#table-typeof-operator-results
+ */
+
+/** @type {validateDictionary} */
+const validateDictionary = hideStackFrames((value, name) => {
+ if (value != null && typeof value !== 'object' && typeof value !== 'function') {
+ throw new ERR_INVALID_ARG_TYPE(name, 'a dictionary', value)
+ }
+})
+
/**
* @callback validateArray
* @param {*} value
@@ -247,7 +274,36 @@ const validateArray = hideStackFrames((value, name, minLength = 0) => {
}
})
-// eslint-disable-next-line jsdoc/require-returns-check
+/**
+ * @callback validateStringArray
+ * @param {*} value
+ * @param {string} name
+ * @returns {asserts value is string[]}
+ */
+
+/** @type {validateStringArray} */
+function validateStringArray(value, name) {
+ validateArray(value, name)
+ for (let i = 0; i < value.length; i++) {
+ validateString(value[i], `${name}[${i}]`)
+ }
+}
+
+/**
+ * @callback validateBooleanArray
+ * @param {*} value
+ * @param {string} name
+ * @returns {asserts value is boolean[]}
+ */
+
+/** @type {validateBooleanArray} */
+function validateBooleanArray(value, name) {
+ validateArray(value, name)
+ for (let i = 0; i < value.length; i++) {
+ validateBoolean(value[i], `${name}[${i}]`)
+ }
+}
+
/**
* @param {*} signal
* @param {string} [name='signal']
@@ -370,13 +426,71 @@ function validateUnion(value, name, union) {
throw new ERR_INVALID_ARG_TYPE(name, `('${ArrayPrototypeJoin(union, '|')}')`, value)
}
}
+
+/*
+ The rules for the Link header field are described here:
+ https://www.rfc-editor.org/rfc/rfc8288.html#section-3
+
+ This regex validates any string surrounded by angle brackets
+ (not necessarily a valid URI reference) followed by zero or more
+ link-params separated by semicolons.
+*/
+const linkValueRegExp = /^(?:<[^>]*>)(?:\s*;\s*[^;"\s]+(?:=(")?[^;"\s]*\1)?)*$/
+
+/**
+ * @param {any} value
+ * @param {string} name
+ */
+function validateLinkHeaderFormat(value, name) {
+ if (typeof value === 'undefined' || !RegExpPrototypeExec(linkValueRegExp, value)) {
+ throw new ERR_INVALID_ARG_VALUE(
+ name,
+ value,
+ 'must be an array or string of format "; rel=preload; as=style"'
+ )
+ }
+}
+
+/**
+ * @param {any} hints
+ * @return {string}
+ */
+function validateLinkHeaderValue(hints) {
+ if (typeof hints === 'string') {
+ validateLinkHeaderFormat(hints, 'hints')
+ return hints
+ } else if (ArrayIsArray(hints)) {
+ const hintsLength = hints.length
+ let result = ''
+ if (hintsLength === 0) {
+ return result
+ }
+ for (let i = 0; i < hintsLength; i++) {
+ const link = hints[i]
+ validateLinkHeaderFormat(link, 'hints')
+ result += link
+ if (i !== hintsLength - 1) {
+ result += ', '
+ }
+ }
+ return result
+ }
+ throw new ERR_INVALID_ARG_VALUE(
+ 'hints',
+ hints,
+ 'must be an array or string of format "; rel=preload; as=style"'
+ )
+}
module.exports = {
isInt32,
isUint32,
parseFileMode,
validateArray,
+ validateStringArray,
+ validateBooleanArray,
validateBoolean,
validateBuffer,
+ validateDictionary,
validateEncoding,
validateFunction,
validateInt32,
@@ -391,5 +505,6 @@ module.exports = {
validateUint32,
validateUndefined,
validateUnion,
- validateAbortSignal
+ validateAbortSignal,
+ validateLinkHeaderValue
}
diff --git a/deps/npm/node_modules/readable-stream/lib/ours/primordials.js b/deps/npm/node_modules/readable-stream/lib/ours/primordials.js
index 6a98b01681caf0..9464cc7fea6a12 100644
--- a/deps/npm/node_modules/readable-stream/lib/ours/primordials.js
+++ b/deps/npm/node_modules/readable-stream/lib/ours/primordials.js
@@ -90,6 +90,7 @@ module.exports = {
return self.trim()
},
Symbol,
+ SymbolFor: Symbol.for,
SymbolAsyncIterator: Symbol.asyncIterator,
SymbolHasInstance: Symbol.hasInstance,
SymbolIterator: Symbol.iterator,
diff --git a/deps/npm/node_modules/readable-stream/lib/stream/promises.js b/deps/npm/node_modules/readable-stream/lib/stream/promises.js
index d44dd8ad0e0f3f..b85c51f47f1ce1 100644
--- a/deps/npm/node_modules/readable-stream/lib/stream/promises.js
+++ b/deps/npm/node_modules/readable-stream/lib/stream/promises.js
@@ -1,15 +1,22 @@
'use strict'
const { ArrayPrototypePop, Promise } = require('../ours/primordials')
-const { isIterable, isNodeStream } = require('../internal/streams/utils')
+const { isIterable, isNodeStream, isWebStream } = require('../internal/streams/utils')
const { pipelineImpl: pl } = require('../internal/streams/pipeline')
const { finished } = require('../internal/streams/end-of-stream')
+require('stream')
function pipeline(...streams) {
return new Promise((resolve, reject) => {
let signal
let end
const lastArg = streams[streams.length - 1]
- if (lastArg && typeof lastArg === 'object' && !isNodeStream(lastArg) && !isIterable(lastArg)) {
+ if (
+ lastArg &&
+ typeof lastArg === 'object' &&
+ !isNodeStream(lastArg) &&
+ !isIterable(lastArg) &&
+ !isWebStream(lastArg)
+ ) {
const options = ArrayPrototypePop(streams)
signal = options.signal
end = options.end
diff --git a/deps/npm/node_modules/readable-stream/package.json b/deps/npm/node_modules/readable-stream/package.json
index 7df83d9eb990a9..c4f6504cc7cc66 100644
--- a/deps/npm/node_modules/readable-stream/package.json
+++ b/deps/npm/node_modules/readable-stream/package.json
@@ -1,6 +1,6 @@
{
"name": "readable-stream",
- "version": "4.3.0",
+ "version": "4.4.0",
"description": "Node.js Streams, a user-land copy of the stream library from Node.js",
"homepage": "https://github.com/nodejs/readable-stream",
"license": "MIT",
diff --git a/deps/npm/node_modules/semver/classes/semver.js b/deps/npm/node_modules/semver/classes/semver.js
index 25ee889d1492af..99dbe82db4dc59 100644
--- a/deps/npm/node_modules/semver/classes/semver.js
+++ b/deps/npm/node_modules/semver/classes/semver.js
@@ -16,7 +16,7 @@ class SemVer {
version = version.version
}
} else if (typeof version !== 'string') {
- throw new TypeError(`Invalid Version: ${require('util').inspect(version)}`)
+ throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version}".`)
}
if (version.length > MAX_LENGTH) {
diff --git a/deps/npm/node_modules/semver/package.json b/deps/npm/node_modules/semver/package.json
index 0a6095b8900a62..592404a3c9d1c0 100644
--- a/deps/npm/node_modules/semver/package.json
+++ b/deps/npm/node_modules/semver/package.json
@@ -1,6 +1,6 @@
{
"name": "semver",
- "version": "7.5.0",
+ "version": "7.5.1",
"description": "The semantic version parser used by npm.",
"main": "index.js",
"scripts": {
@@ -14,7 +14,7 @@
},
"devDependencies": {
"@npmcli/eslint-config": "^4.0.0",
- "@npmcli/template-oss": "4.13.0",
+ "@npmcli/template-oss": "4.14.1",
"tap": "^16.0.0"
},
"license": "ISC",
@@ -53,7 +53,7 @@
"author": "GitHub Inc.",
"templateOSS": {
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
- "version": "4.13.0",
+ "version": "4.14.1",
"engines": ">=10",
"ciVersions": [
"10.0.0",
diff --git a/deps/npm/node_modules/signal-exit/dist/cjs/index.js b/deps/npm/node_modules/signal-exit/dist/cjs/index.js
index 5a9ea081d7a5f5..2e6c18316b9a5d 100644
--- a/deps/npm/node_modules/signal-exit/dist/cjs/index.js
+++ b/deps/npm/node_modules/signal-exit/dist/cjs/index.js
@@ -34,7 +34,6 @@ class Emitter {
id = Math.random();
constructor() {
if (global[kExitEmitter]) {
- console.error('reusing global emitter');
return global[kExitEmitter];
}
ObjectDefineProperty(global, kExitEmitter, {
diff --git a/deps/npm/node_modules/signal-exit/dist/mjs/index.js b/deps/npm/node_modules/signal-exit/dist/mjs/index.js
index cc86788031646a..1e8dea6d4930b6 100644
--- a/deps/npm/node_modules/signal-exit/dist/mjs/index.js
+++ b/deps/npm/node_modules/signal-exit/dist/mjs/index.js
@@ -30,7 +30,6 @@ class Emitter {
id = Math.random();
constructor() {
if (global[kExitEmitter]) {
- console.error('reusing global emitter');
return global[kExitEmitter];
}
ObjectDefineProperty(global, kExitEmitter, {
diff --git a/deps/npm/node_modules/signal-exit/package.json b/deps/npm/node_modules/signal-exit/package.json
index 5e7e3a74d95d87..455452f96a0b3f 100644
--- a/deps/npm/node_modules/signal-exit/package.json
+++ b/deps/npm/node_modules/signal-exit/package.json
@@ -1,6 +1,6 @@
{
"name": "signal-exit",
- "version": "4.0.1",
+ "version": "4.0.2",
"description": "when you want to fire an event no matter how a process exits.",
"main": "./dist/cjs/index.js",
"module": "./dist/mjs/index.js",
diff --git a/deps/npm/node_modules/sigstore/README.md b/deps/npm/node_modules/sigstore/README.md
index 0f015c580b6663..fd9260fb107ef4 100644
--- a/deps/npm/node_modules/sigstore/README.md
+++ b/deps/npm/node_modules/sigstore/README.md
@@ -1,4 +1,4 @@
-# sigstore-js · [](https://www.npmjs.com/package/sigstore) [](https://github.com/sigstore/sigstore-js/actions/workflows/ci.yml) [](https://github.com/sigstore/sigstore-js/actions/workflows/smoke-test.yml)
+# sigstore · [](https://www.npmjs.com/package/sigstore) [](https://github.com/sigstore/sigstore-js/actions/workflows/ci.yml) [](https://github.com/sigstore/sigstore-js/actions/workflows/smoke-test.yml)
A JavaScript library for generating and verifying Sigstore signatures. One of
the intended uses is to sign and verify npm packages but it can be used to sign
@@ -40,6 +40,8 @@ necessary to verify the signature.
* `options` `