From 6894a26509df75e6400653e514efda5b3a47c0f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mert=20Can=20Alt=C4=B1n?= Date: Sun, 7 May 2023 17:13:05 +0300 Subject: [PATCH] doc: mark global object as legacy --- .github/CODEOWNERS | 4 +- .github/workflows/auto-start-ci.yml | 2 +- .github/workflows/build-tarball.yml | 8 +- .github/workflows/build-windows.yml | 4 +- .github/workflows/commit-lint.yml | 2 +- .github/workflows/commit-queue.yml | 2 +- .../workflows/coverage-linux-without-intl.yml | 6 +- .github/workflows/coverage-linux.yml | 6 +- .github/workflows/coverage-windows.yml | 6 +- .github/workflows/daily-wpt-fyi.yml | 8 +- .github/workflows/daily.yml | 2 +- .github/workflows/doc.yml | 2 +- .../workflows/find-inactive-collaborators.yml | 2 +- .github/workflows/find-inactive-tsc.yml | 4 +- .github/workflows/license-builder.yml | 2 +- .github/workflows/linters.yml | 26 +- .github/workflows/notify-on-push.yml | 2 +- .github/workflows/scorecard.yml | 6 +- .github/workflows/test-asan.yml | 4 +- .github/workflows/test-internet.yml | 4 +- .github/workflows/test-linux.yml | 4 +- .github/workflows/test-macos.yml | 4 +- .github/workflows/timezone-update.yml | 4 +- .github/workflows/tools.yml | 2 +- .github/workflows/update-openssl.yml | 2 +- .github/workflows/update-v8.yml | 2 +- BUILDING.md | 7 +- CHANGELOG.md | 3 +- README.md | 8 +- common.gypi | 2 +- configure.py | 110 +- deps/ada/ada.cpp | 56 +- deps/ada/ada.h | 16 +- deps/npm/docs/content/commands/npm-ci.md | 34 + deps/npm/docs/content/commands/npm-config.md | 2 +- .../content/commands/npm-install-ci-test.md | 34 + deps/npm/docs/content/commands/npm-ls.md | 2 +- deps/npm/docs/content/commands/npm-publish.md | 3 +- deps/npm/docs/content/commands/npm.md | 2 +- .../docs/content/configuring-npm/folders.md | 2 +- deps/npm/docs/content/using-npm/config.md | 3 +- deps/npm/docs/output/commands/npm-ci.html | 32 +- deps/npm/docs/output/commands/npm-config.html | 2 +- .../output/commands/npm-install-ci-test.html | 32 +- deps/npm/docs/output/commands/npm-ls.html | 2 +- .../npm/docs/output/commands/npm-publish.html | 3 +- deps/npm/docs/output/commands/npm.html | 2 +- .../docs/output/configuring-npm/folders.html | 2 +- deps/npm/docs/output/using-npm/config.html | 3 +- deps/npm/lib/commands/audit.js | 3 +- deps/npm/lib/commands/cache.js | 3 +- deps/npm/lib/commands/ci.js | 20 +- deps/npm/lib/commands/config.js | 8 +- deps/npm/lib/commands/dedupe.js | 2 +- deps/npm/lib/commands/diff.js | 3 +- deps/npm/lib/commands/explain.js | 4 +- deps/npm/lib/commands/fund.js | 5 +- deps/npm/lib/commands/help-search.js | 2 +- deps/npm/lib/commands/help.js | 2 +- deps/npm/lib/commands/install.js | 3 +- deps/npm/lib/commands/link.js | 5 +- deps/npm/lib/commands/ls.js | 6 +- deps/npm/lib/commands/outdated.js | 3 +- deps/npm/lib/commands/prune.js | 2 +- deps/npm/lib/commands/query.js | 3 +- deps/npm/lib/commands/rebuild.js | 4 +- deps/npm/lib/commands/search.js | 2 +- deps/npm/lib/commands/shrinkwrap.js | 2 +- deps/npm/lib/commands/uninstall.js | 2 +- deps/npm/lib/commands/update.js | 4 +- deps/npm/lib/npm.js | 5 + deps/npm/lib/package-url-cmd.js | 2 + .../lib/utils/completion/installed-deep.js | 2 +- deps/npm/lib/utils/config/definitions.js | 3 +- deps/npm/lib/utils/format-search-stream.js | 2 +- deps/npm/lib/utils/log-file.js | 8 +- deps/npm/lib/utils/update-notifier.js | 88 +- deps/npm/lib/workspaces/get-workspaces.js | 2 +- deps/npm/lib/workspaces/update-workspaces.js | 2 +- deps/npm/man/man1/npm-access.1 | 2 +- deps/npm/man/man1/npm-adduser.1 | 2 +- deps/npm/man/man1/npm-audit.1 | 2 +- deps/npm/man/man1/npm-bugs.1 | 2 +- deps/npm/man/man1/npm-cache.1 | 2 +- deps/npm/man/man1/npm-ci.1 | 45 +- deps/npm/man/man1/npm-completion.1 | 2 +- deps/npm/man/man1/npm-config.1 | 4 +- deps/npm/man/man1/npm-dedupe.1 | 2 +- deps/npm/man/man1/npm-deprecate.1 | 2 +- deps/npm/man/man1/npm-diff.1 | 2 +- deps/npm/man/man1/npm-dist-tag.1 | 2 +- deps/npm/man/man1/npm-docs.1 | 2 +- deps/npm/man/man1/npm-doctor.1 | 2 +- deps/npm/man/man1/npm-edit.1 | 2 +- deps/npm/man/man1/npm-exec.1 | 2 +- deps/npm/man/man1/npm-explain.1 | 2 +- deps/npm/man/man1/npm-explore.1 | 2 +- deps/npm/man/man1/npm-find-dupes.1 | 2 +- deps/npm/man/man1/npm-fund.1 | 2 +- deps/npm/man/man1/npm-help-search.1 | 2 +- deps/npm/man/man1/npm-help.1 | 2 +- deps/npm/man/man1/npm-hook.1 | 2 +- deps/npm/man/man1/npm-init.1 | 2 +- deps/npm/man/man1/npm-install-ci-test.1 | 45 +- deps/npm/man/man1/npm-install-test.1 | 2 +- deps/npm/man/man1/npm-install.1 | 2 +- deps/npm/man/man1/npm-link.1 | 2 +- deps/npm/man/man1/npm-login.1 | 2 +- deps/npm/man/man1/npm-logout.1 | 2 +- deps/npm/man/man1/npm-ls.1 | 4 +- deps/npm/man/man1/npm-org.1 | 2 +- deps/npm/man/man1/npm-outdated.1 | 2 +- deps/npm/man/man1/npm-owner.1 | 2 +- deps/npm/man/man1/npm-pack.1 | 2 +- deps/npm/man/man1/npm-ping.1 | 2 +- deps/npm/man/man1/npm-pkg.1 | 2 +- deps/npm/man/man1/npm-prefix.1 | 2 +- deps/npm/man/man1/npm-profile.1 | 2 +- deps/npm/man/man1/npm-prune.1 | 2 +- deps/npm/man/man1/npm-publish.1 | 4 +- deps/npm/man/man1/npm-query.1 | 2 +- deps/npm/man/man1/npm-rebuild.1 | 2 +- deps/npm/man/man1/npm-repo.1 | 2 +- deps/npm/man/man1/npm-restart.1 | 2 +- deps/npm/man/man1/npm-root.1 | 2 +- deps/npm/man/man1/npm-run-script.1 | 2 +- deps/npm/man/man1/npm-search.1 | 2 +- deps/npm/man/man1/npm-shrinkwrap.1 | 2 +- deps/npm/man/man1/npm-star.1 | 2 +- deps/npm/man/man1/npm-stars.1 | 2 +- deps/npm/man/man1/npm-start.1 | 2 +- deps/npm/man/man1/npm-stop.1 | 2 +- deps/npm/man/man1/npm-team.1 | 2 +- deps/npm/man/man1/npm-test.1 | 2 +- deps/npm/man/man1/npm-token.1 | 2 +- deps/npm/man/man1/npm-uninstall.1 | 2 +- deps/npm/man/man1/npm-unpublish.1 | 2 +- deps/npm/man/man1/npm-unstar.1 | 2 +- deps/npm/man/man1/npm-update.1 | 2 +- deps/npm/man/man1/npm-version.1 | 2 +- deps/npm/man/man1/npm-view.1 | 2 +- deps/npm/man/man1/npm-whoami.1 | 2 +- deps/npm/man/man1/npm.1 | 4 +- deps/npm/man/man1/npx.1 | 2 +- deps/npm/man/man5/folders.5 | 4 +- deps/npm/man/man5/install.5 | 2 +- deps/npm/man/man5/npm-global.5 | 4 +- deps/npm/man/man5/npm-json.5 | 2 +- deps/npm/man/man5/npm-shrinkwrap-json.5 | 2 +- deps/npm/man/man5/npmrc.5 | 2 +- deps/npm/man/man5/package-json.5 | 2 +- deps/npm/man/man5/package-lock-json.5 | 2 +- deps/npm/man/man7/config.7 | 4 +- deps/npm/man/man7/dependency-selectors.7 | 2 +- deps/npm/man/man7/developers.7 | 2 +- deps/npm/man/man7/logging.7 | 2 +- deps/npm/man/man7/orgs.7 | 2 +- deps/npm/man/man7/package-spec.7 | 2 +- deps/npm/man/man7/registry.7 | 2 +- deps/npm/man/man7/removal.7 | 2 +- deps/npm/man/man7/scope.7 | 2 +- deps/npm/man/man7/scripts.7 | 2 +- deps/npm/man/man7/workspaces.7 | 2 +- .../node_modules/@isaacs/cliui/LICENSE.txt | 14 - .../@isaacs/cliui/build/index.cjs | 317 ---- .../@isaacs/cliui/build/index.d.cts | 43 - .../@isaacs/cliui/build/lib/index.js | 302 ---- deps/npm/node_modules/@isaacs/cliui/index.mjs | 14 - .../cliui/node_modules/ansi-regex/index.js | 8 - .../cliui/node_modules/ansi-regex/license | 9 - .../node_modules/ansi-regex/package.json | 58 - .../node_modules/emoji-regex/LICENSE-MIT.txt | 20 - .../node_modules/emoji-regex/RGI_Emoji.js | 6 - .../emoji-regex/es2015/RGI_Emoji.js | 6 - .../node_modules/emoji-regex/es2015/index.js | 6 - .../node_modules/emoji-regex/es2015/text.js | 6 - .../cliui/node_modules/emoji-regex/index.js | 6 - .../node_modules/emoji-regex/package.json | 52 - .../cliui/node_modules/emoji-regex/text.js | 6 - .../cliui/node_modules/string-width/index.js | 54 - .../cliui/node_modules/string-width/license | 9 - .../node_modules/string-width/package.json | 59 - .../cliui/node_modules/strip-ansi/index.js | 9 - .../cliui/node_modules/strip-ansi/license | 9 - .../node_modules/strip-ansi/package.json | 57 - .../node_modules/@isaacs/cliui/package.json | 86 - .../arborist/lib/arborist/build-ideal-tree.js | 540 ++++--- .../@npmcli/arborist/lib/arborist/index.js | 3 +- .../arborist/lib/arborist/load-actual.js | 213 +-- .../arborist/lib/arborist/load-virtual.js | 136 +- .../{set-workspaces.js => load-workspaces.js} | 4 +- .../@npmcli/arborist/lib/arborist/reify.js | 3 +- .../@npmcli/arborist/lib/calc-dep-flags.js | 24 +- .../@npmcli/arborist/lib/dep-valid.js | 24 +- .../node_modules/@npmcli/arborist/lib/edge.js | 329 ++-- .../@npmcli/arborist/lib/from-path.js | 36 +- .../@npmcli/arborist/lib/inventory.js | 123 +- .../node_modules/@npmcli/arborist/lib/node.js | 149 +- .../arborist/lib/query-selector-all.js | 2 +- .../@npmcli/arborist/package.json | 10 +- .../node_modules/@npmcli/config/lib/index.js | 137 +- .../node_modules/@npmcli/config/package.json | 10 +- .../@npmcli/map-workspaces/lib/index.js | 4 +- .../@npmcli/map-workspaces/package.json | 11 +- .../metavuln-calculator/lib/advisory.js | 4 +- .../@npmcli/metavuln-calculator/package.json | 9 +- .../@npmcli/run-script/package.json | 8 +- .../npm/node_modules/@pkgjs/parseargs/LICENSE | 201 --- .../parseargs/examples/is-default-value.js | 25 - .../parseargs/examples/limit-long-syntax.js | 35 - .../@pkgjs/parseargs/examples/negate.js | 43 - .../parseargs/examples/no-repeated-options.js | 31 - .../parseargs/examples/ordered-options.mjs | 41 - .../parseargs/examples/simple-hard-coded.js | 26 - .../node_modules/@pkgjs/parseargs/index.js | 396 ----- .../@pkgjs/parseargs/internal/errors.js | 47 - .../@pkgjs/parseargs/internal/primordials.js | 393 ----- .../@pkgjs/parseargs/internal/util.js | 14 - .../@pkgjs/parseargs/internal/validators.js | 89 -- .../@pkgjs/parseargs/package.json | 36 - .../node_modules/@pkgjs/parseargs/utils.js | 198 --- .../@tufjs/canonical-json/LICENSE | 21 - .../@tufjs/canonical-json/lib/index.js | 64 - .../@tufjs/canonical-json/package.json | 39 - .../@tufjs/models/dist/metadata.js | 4 +- .../node_modules/@tufjs/models/dist/role.js | 4 +- .../@tufjs/models/dist/utils/json.js | 62 + .../@tufjs/models/dist/utils/verify.js | 4 +- .../node_modules/@tufjs/models/package.json | 10 +- .../node_modules/cacache/lib/content/write.js | 36 +- .../node_modules/cacache/lib/entry-index.js | 6 +- deps/npm/node_modules/cacache/lib/get.js | 2 +- .../npm/node_modules/cacache/lib/util/glob.js | 2 +- .../cacache/lib/util/move-file.js | 56 + deps/npm/node_modules/cacache/lib/verify.js | 7 +- deps/npm/node_modules/cacache/package.json | 12 +- deps/npm/node_modules/cross-spawn/LICENSE | 21 - deps/npm/node_modules/cross-spawn/index.js | 39 - .../node_modules/cross-spawn/lib/enoent.js | 59 - .../npm/node_modules/cross-spawn/lib/parse.js | 91 -- .../cross-spawn/lib/util/escape.js | 45 - .../cross-spawn/lib/util/readShebang.js | 23 - .../cross-spawn/lib/util/resolveCommand.js | 52 - .../cross-spawn/node_modules/which/LICENSE | 15 - .../cross-spawn/node_modules/which/README.md | 54 - .../node_modules/which/bin/node-which | 52 - .../node_modules/which/package.json | 43 - .../cross-spawn/node_modules/which/which.js | 125 -- .../npm/node_modules/cross-spawn/package.json | 73 - .../eastasianwidth/eastasianwidth.js | 311 ---- .../node_modules/eastasianwidth/package.json | 18 - .../npm/node_modules/foreground-child/LICENSE | 15 - .../foreground-child/dist/cjs/all-signals.js | 58 - .../foreground-child/dist/cjs/index.js | 154 -- .../foreground-child/dist/cjs/package.json | 3 - .../foreground-child/dist/cjs/watchdog.js | 43 - .../foreground-child/dist/mjs/all-signals.js | 52 - .../foreground-child/dist/mjs/index.js | 146 -- .../foreground-child/dist/mjs/package.json | 3 - .../foreground-child/dist/mjs/watchdog.js | 39 - .../foreground-child/package.json | 83 - .../npm/node_modules/fs-minipass/lib/index.js | 4 +- .../npm/node_modules/fs-minipass/package.json | 9 +- deps/npm/node_modules/gauge/lib/index.js | 2 +- deps/npm/node_modules/gauge/package.json | 11 +- deps/npm/node_modules/glob/README.md | 1212 -------------- .../glob/dist/cjs/{src => }/glob.js | 1 - .../glob/dist/cjs/{src => }/has-magic.js | 0 .../glob/dist/cjs/{src => }/ignore.js | 0 .../node_modules/glob/dist/cjs/index-cjs.js | 7 + .../glob/dist/cjs/{src => }/index.js | 10 +- .../node_modules/glob/dist/cjs/package.json | 98 +- .../glob/dist/cjs/{src => }/pattern.js | 0 .../glob/dist/cjs/{src => }/processor.js | 0 .../node_modules/glob/dist/cjs/src/bin.d.ts | 3 - .../glob/dist/cjs/src/bin.d.ts.map | 1 - .../npm/node_modules/glob/dist/cjs/src/bin.js | 260 --- .../node_modules/glob/dist/cjs/src/bin.js.map | 1 - .../node_modules/glob/dist/cjs/src/glob.d.ts | 344 ---- .../glob/dist/cjs/src/glob.d.ts.map | 1 - .../glob/dist/cjs/src/glob.js.map | 1 - .../glob/dist/cjs/src/has-magic.d.ts | 14 - .../glob/dist/cjs/src/has-magic.d.ts.map | 1 - .../glob/dist/cjs/src/has-magic.js.map | 1 - .../glob/dist/cjs/src/ignore.d.ts | 20 - .../glob/dist/cjs/src/ignore.d.ts.map | 1 - .../glob/dist/cjs/src/ignore.js.map | 1 - .../node_modules/glob/dist/cjs/src/index.d.ts | 95 -- .../glob/dist/cjs/src/index.d.ts.map | 1 - .../glob/dist/cjs/src/index.js.map | 1 - .../glob/dist/cjs/src/pattern.d.ts | 77 - .../glob/dist/cjs/src/pattern.d.ts.map | 1 - .../glob/dist/cjs/src/pattern.js.map | 1 - .../glob/dist/cjs/src/processor.d.ts | 59 - .../glob/dist/cjs/src/processor.d.ts.map | 1 - .../glob/dist/cjs/src/processor.js.map | 1 - .../glob/dist/cjs/src/walker.d.ts | 96 -- .../glob/dist/cjs/src/walker.d.ts.map | 1 - .../glob/dist/cjs/src/walker.js.map | 1 - .../glob/dist/cjs/{src => }/walker.js | 16 +- deps/npm/node_modules/glob/dist/mjs/glob.d.ts | 344 ---- .../node_modules/glob/dist/mjs/glob.d.ts.map | 1 - deps/npm/node_modules/glob/dist/mjs/glob.js | 1 - .../node_modules/glob/dist/mjs/glob.js.map | 1 - .../node_modules/glob/dist/mjs/has-magic.d.ts | 14 - .../glob/dist/mjs/has-magic.d.ts.map | 1 - .../glob/dist/mjs/has-magic.js.map | 1 - .../node_modules/glob/dist/mjs/ignore.d.ts | 20 - .../glob/dist/mjs/ignore.d.ts.map | 1 - .../node_modules/glob/dist/mjs/ignore.js.map | 1 - .../npm/node_modules/glob/dist/mjs/index.d.ts | 95 -- .../node_modules/glob/dist/mjs/index.d.ts.map | 1 - deps/npm/node_modules/glob/dist/mjs/index.js | 7 +- .../node_modules/glob/dist/mjs/index.js.map | 1 - .../node_modules/glob/dist/mjs/package.json | 1 - .../node_modules/glob/dist/mjs/pattern.d.ts | 77 - .../glob/dist/mjs/pattern.d.ts.map | 1 - .../node_modules/glob/dist/mjs/pattern.js.map | 1 - .../node_modules/glob/dist/mjs/processor.d.ts | 59 - .../glob/dist/mjs/processor.d.ts.map | 1 - .../glob/dist/mjs/processor.js.map | 1 - .../node_modules/glob/dist/mjs/walker.d.ts | 96 -- .../glob/dist/mjs/walker.d.ts.map | 1 - deps/npm/node_modules/glob/dist/mjs/walker.js | 11 +- .../node_modules/glob/dist/mjs/walker.js.map | 1 - deps/npm/node_modules/glob/package.json | 18 +- .../npm/node_modules/ignore-walk/package.json | 11 +- deps/npm/node_modules/ini/lib/ini.js | 115 +- deps/npm/node_modules/ini/package.json | 20 +- .../npm/node_modules/is-core-module/core.json | 5 +- .../node_modules/is-core-module/package.json | 9 +- deps/npm/node_modules/jackspeak/LICENSE.md | 55 - .../node_modules/jackspeak/dist/cjs/index.js | 723 --------- .../jackspeak/dist/cjs/package.json | 3 - .../jackspeak/dist/cjs/parse-args.js | 42 - .../node_modules/jackspeak/dist/mjs/index.js | 713 --------- .../jackspeak/dist/mjs/package.json | 3 - .../jackspeak/dist/mjs/parse-args.js | 19 - deps/npm/node_modules/jackspeak/package.json | 98 -- .../node_modules/libnpmaccess/package.json | 4 +- deps/npm/node_modules/libnpmdiff/lib/untar.js | 2 +- deps/npm/node_modules/libnpmdiff/package.json | 10 +- .../libnpmexec/lib/file-exists.js | 2 +- deps/npm/node_modules/libnpmexec/lib/index.js | 20 +- deps/npm/node_modules/libnpmexec/package.json | 10 +- deps/npm/node_modules/libnpmfund/package.json | 8 +- deps/npm/node_modules/libnpmhook/package.json | 4 +- deps/npm/node_modules/libnpmorg/package.json | 8 +- deps/npm/node_modules/libnpmpack/package.json | 8 +- .../node_modules/libnpmpublish/package.json | 8 +- .../node_modules/libnpmsearch/package.json | 4 +- deps/npm/node_modules/libnpmteam/package.json | 4 +- .../node_modules/libnpmversion/package.json | 4 +- .../make-fetch-happen/lib/cache/entry.js | 27 +- .../make-fetch-happen/lib/options.js | 2 - .../make-fetch-happen/lib/remote.js | 2 +- .../make-fetch-happen/package.json | 9 +- .../node_modules/minimatch/dist/cjs/_parse.js | 300 ++++ .../node_modules/minimatch/dist/cjs/ast.js | 566 ------- .../minimatch/dist/cjs/extglob.js | 4 + .../minimatch/dist/cjs/index-cjs.js | 7 + .../node_modules/minimatch/dist/cjs/index.js | 369 ++++- .../node_modules/minimatch/dist/cjs/parse.js | 650 ++++++++ .../node_modules/minimatch/dist/mjs/_parse.js | 296 ++++ .../node_modules/minimatch/dist/mjs/ast.js | 562 ------- .../minimatch/dist/mjs/extglob.js | 3 + .../node_modules/minimatch/dist/mjs/index.js | 358 ++++- .../node_modules/minimatch/dist/mjs/parse.js | 646 ++++++++ deps/npm/node_modules/minimatch/package.json | 10 +- .../node_modules/minipass-fetch/lib/blob.js | 2 +- .../node_modules/minipass-fetch/lib/body.js | 2 +- .../node_modules/minipass-fetch/lib/index.js | 18 +- .../minipass-fetch/lib/request.js | 3 +- .../node_modules/minipass-fetch/package.json | 9 +- deps/npm/node_modules/minipass/index.js | 2 +- deps/npm/node_modules/minipass/index.mjs | 3 +- deps/npm/node_modules/minipass/package.json | 2 +- .../node_modules/signal-exit/LICENSE.txt | 16 - .../node_modules/signal-exit/package.json | 38 - .../npm-install-checks/lib/index.js | 2 +- .../npm-install-checks/package.json | 7 +- .../npm-normalize-package-bin/lib/index.js | 2 +- .../npm-normalize-package-bin/package.json | 9 +- .../npm-registry-fetch/lib/clean-url.js | 3 +- .../npm-registry-fetch/lib/index.js | 2 +- .../npm-registry-fetch/package.json | 11 +- deps/npm/node_modules/pacote/README.md | 7 +- deps/npm/node_modules/pacote/lib/dir.js | 2 +- deps/npm/node_modules/pacote/lib/fetcher.js | 2 +- deps/npm/node_modules/pacote/lib/git.js | 2 +- deps/npm/node_modules/pacote/lib/remote.js | 2 +- deps/npm/node_modules/pacote/package.json | 13 +- deps/npm/node_modules/path-key/index.js | 16 - deps/npm/node_modules/path-key/license | 9 - deps/npm/node_modules/path-key/package.json | 39 - .../path-scurry/dist/cjs/index.js | 113 +- .../path-scurry/dist/mjs/index.js | 102 +- .../node_modules/lru-cache/LICENSE | 15 - .../node_modules/lru-cache/dist/cjs/index.js | 1395 ----------------- .../lru-cache/dist/cjs/index.min.js | 2 - .../lru-cache/dist/cjs/package.json | 3 - .../node_modules/lru-cache/dist/mjs/index.js | 1391 ---------------- .../lru-cache/dist/mjs/index.min.js | 2 - .../lru-cache/dist/mjs/package.json | 3 - .../node_modules/lru-cache/package.json | 109 -- .../npm/node_modules/path-scurry/package.json | 10 +- .../postcss-selector-parser/dist/index.js | 11 +- .../postcss-selector-parser/dist/parser.js | 297 +++- .../postcss-selector-parser/dist/processor.js | 60 +- .../dist/selectors/attribute.js | 142 +- .../dist/selectors/className.js | 23 +- .../dist/selectors/combinator.js | 12 +- .../dist/selectors/comment.js | 12 +- .../dist/selectors/constructors.js | 37 + .../dist/selectors/container.js | 101 +- .../dist/selectors/guards.js | 22 +- .../dist/selectors/id.js | 14 +- .../dist/selectors/index.js | 6 + .../dist/selectors/namespace.js | 25 +- .../dist/selectors/nesting.js | 12 +- .../dist/selectors/node.js | 65 +- .../dist/selectors/pseudo.js | 14 +- .../dist/selectors/root.js | 20 +- .../dist/selectors/selector.js | 12 +- .../dist/selectors/string.js | 12 +- .../dist/selectors/tag.js | 12 +- .../dist/selectors/types.js | 2 +- .../dist/selectors/universal.js | 12 +- .../dist/sortAscending.js | 2 + .../dist/tokenTypes.js | 33 +- .../postcss-selector-parser/dist/tokenize.js | 90 +- .../dist/util/ensureObject.js | 5 + .../dist/util/getProp.js | 6 + .../dist/util/index.js | 11 +- .../dist/util/stripComments.js | 6 + .../dist/util/unesc.js | 41 +- .../postcss-selector-parser/package.json | 17 +- .../read-package-json/lib/read-json.js | 11 +- .../read-package-json/package.json | 9 +- deps/npm/node_modules/read/lib/read.js | 6 +- deps/npm/node_modules/read/package.json | 7 +- deps/npm/node_modules/semver/README.md | 66 - deps/npm/node_modules/semver/bin/semver.js | 18 +- .../node_modules/semver/classes/comparator.js | 70 +- deps/npm/node_modules/semver/classes/range.js | 8 +- .../npm/node_modules/semver/classes/semver.js | 41 +- .../npm/node_modules/semver/functions/diff.js | 65 +- deps/npm/node_modules/semver/functions/inc.js | 5 +- .../node_modules/semver/functions/parse.js | 27 +- deps/npm/node_modules/semver/index.js | 1 - .../node_modules/semver/internal/constants.js | 17 +- .../semver/internal/parse-options.js | 24 +- deps/npm/node_modules/semver/package.json | 13 +- .../node_modules/semver/ranges/intersects.js | 2 +- deps/npm/node_modules/semver/ranges/subset.js | 9 +- .../npm/node_modules/shebang-command/index.js | 19 - deps/npm/node_modules/shebang-command/license | 9 - .../node_modules/shebang-command/package.json | 34 - deps/npm/node_modules/shebang-regex/index.js | 2 - deps/npm/node_modules/shebang-regex/license | 9 - .../node_modules/shebang-regex/package.json | 35 - deps/npm/node_modules/signal-exit/LICENSE.txt | 2 +- .../signal-exit/dist/cjs/browser.js | 10 - .../signal-exit/dist/cjs/index.js | 273 ---- .../signal-exit/dist/cjs/package.json | 3 - .../signal-exit/dist/cjs/signals.js | 42 - .../signal-exit/dist/mjs/browser.js | 4 - .../signal-exit/dist/mjs/index.js | 269 ---- .../signal-exit/dist/mjs/package.json | 3 - .../signal-exit/dist/mjs/signals.js | 39 - .../node_modules => }/signal-exit/index.js | 0 .../npm/node_modules/signal-exit/package.json | 106 +- .../node_modules => }/signal-exit/signals.js | 0 deps/npm/node_modules/sigstore/README.md | 36 - .../node_modules/sigstore/dist/ca/format.d.ts | 2 +- .../node_modules/sigstore/dist/ca/index.js | 10 +- .../sigstore/dist/ca/verify/signer.js | 14 +- .../node_modules/sigstore/dist/cli/index.js | 19 +- .../dist/{external => client}/error.d.ts | 0 .../dist/{external => client}/error.js | 0 .../dist/{external => client}/fulcio.d.ts | 0 .../dist/{external => client}/fulcio.js | 0 .../dist/{external => client}/index.d.ts | 1 - .../dist/{external => client}/index.js | 4 +- .../dist/{external => client}/rekor.d.ts | 0 .../dist/{external => client}/rekor.js | 0 .../node_modules/sigstore/dist/config.d.ts | 44 - deps/npm/node_modules/sigstore/dist/config.js | 145 -- .../npm/node_modules/sigstore/dist/error.d.ts | 11 +- deps/npm/node_modules/sigstore/dist/error.js | 12 +- .../node_modules/sigstore/dist/identity/ci.js | 12 +- .../sigstore/dist/sigstore-utils.d.ts | 7 +- .../sigstore/dist/sigstore-utils.js | 41 +- .../node_modules/sigstore/dist/sigstore.d.ts | 41 +- .../node_modules/sigstore/dist/sigstore.js | 140 +- .../node_modules/sigstore/dist/tlog/index.js | 21 +- .../node_modules/sigstore/dist/tuf/index.d.ts | 4 +- .../node_modules/sigstore/dist/tuf/index.js | 19 +- .../sigstore/dist/tuf/target.d.ts | 2 +- .../node_modules/sigstore/dist/tuf/target.js | 48 +- .../sigstore/dist/types/sigstore/index.d.ts | 3 + .../sigstore/dist/types/sigstore/index.js | 5 +- .../node_modules/sigstore/dist/x509/ext.d.ts | 1 - .../node_modules/sigstore/dist/x509/ext.js | 3 - deps/npm/node_modules/sigstore/package.json | 6 +- deps/npm/node_modules/ssri/lib/index.js | 86 +- deps/npm/node_modules/ssri/package.json | 8 +- .../node_modules/string-width-cjs/index.js | 47 - .../npm/node_modules/string-width-cjs/license | 9 - .../string-width-cjs/package.json | 56 - deps/npm/node_modules/strip-ansi-cjs/index.js | 4 - deps/npm/node_modules/strip-ansi-cjs/license | 9 - .../node_modules/strip-ansi-cjs/package.json | 54 - deps/npm/node_modules/tar/lib/pack.js | 4 +- deps/npm/node_modules/tar/lib/read-entry.js | 4 +- deps/npm/node_modules/tar/lib/write-entry.js | 6 +- deps/npm/node_modules/tar/package.json | 10 +- deps/npm/node_modules/tuf-js/dist/updater.js | 30 +- .../npm/node_modules/tuf-js/dist/utils/url.js | 14 - deps/npm/node_modules/tuf-js/package.json | 14 +- .../walk-up-path/dist/cjs/index.js | 18 - .../walk-up-path/dist/cjs/package.json | 3 - .../walk-up-path/dist/mjs/index.js | 14 - .../walk-up-path/dist/mjs/package.json | 3 - deps/npm/node_modules/walk-up-path/index.js | 11 + .../node_modules/walk-up-path/package.json | 60 +- deps/npm/node_modules/which/README.md | 7 +- deps/npm/node_modules/which/lib/index.js | 9 +- deps/npm/node_modules/which/package.json | 7 +- deps/npm/node_modules/wrap-ansi-cjs/index.js | 216 --- deps/npm/node_modules/wrap-ansi-cjs/license | 9 - .../node_modules/wrap-ansi-cjs/package.json | 62 - deps/npm/node_modules/wrap-ansi/index.js | 214 --- deps/npm/node_modules/wrap-ansi/license | 9 - .../node_modules/ansi-regex/index.js | 8 - .../wrap-ansi/node_modules/ansi-regex/license | 9 - .../node_modules/ansi-regex/package.json | 58 - .../node_modules/ansi-styles/index.js | 223 --- .../node_modules/ansi-styles/license | 9 - .../node_modules/ansi-styles/package.json | 54 - .../node_modules/emoji-regex/LICENSE-MIT.txt | 20 - .../node_modules/emoji-regex/RGI_Emoji.js | 6 - .../emoji-regex/es2015/RGI_Emoji.js | 6 - .../node_modules/emoji-regex/es2015/index.js | 6 - .../node_modules/emoji-regex/es2015/text.js | 6 - .../node_modules/emoji-regex/index.js | 6 - .../node_modules/emoji-regex/package.json | 52 - .../node_modules/emoji-regex/text.js | 6 - .../node_modules/string-width/index.js | 54 - .../node_modules/string-width/license | 9 - .../node_modules/string-width/package.json | 59 - .../node_modules/strip-ansi/index.js | 9 - .../wrap-ansi/node_modules/strip-ansi/license | 9 - .../node_modules/strip-ansi/package.json | 57 - deps/npm/node_modules/wrap-ansi/package.json | 69 - .../write-file-atomic/lib/index.js | 2 +- .../write-file-atomic/package.json | 13 +- deps/npm/package.json | 60 +- .../tap-snapshots/test/lib/docs.js.test.cjs | 13 +- .../test/lib/utils/error-message.js.test.cjs | 2 +- deps/npm/test/lib/cli.js | 2 +- deps/npm/test/lib/commands/config.js | 4 +- .../lib/utils/completion/installed-deep.js | 1 - deps/npm/test/lib/utils/exit-handler.js | 2 +- deps/npm/test/lib/utils/log-file.js | 4 +- deps/npm/test/lib/utils/replace-info.js | 6 +- .../codegen/riscv/macro-assembler-riscv.cc | 8 +- .../riscv/regexp-macro-assembler-riscv.cc | 10 +- .../riscv/regexp-macro-assembler-riscv.h | 8 +- doc/api/assert.md | 8 +- doc/api/cli.md | 4 +- doc/api/deprecations.md | 2 +- doc/api/dns.md | 4 +- doc/api/errors.md | 7 - doc/api/fs.md | 20 +- doc/api/globals.md | 3 + doc/api/http.md | 2 +- doc/api/n-api.md | 61 +- doc/api/net.md | 2 +- doc/api/permissions.md | 2 +- doc/api/process.md | 4 +- doc/api/single-executable-applications.md | 3 +- doc/api/stream.md | 6 +- doc/api/test.md | 6 +- doc/api/v8.md | 85 +- doc/api/wasi.md | 2 +- doc/api/worker_threads.md | 44 +- doc/changelogs/CHANGELOG_V20.md | 171 +- .../investigating-native-memory-leaks.md | 103 -- .../{maintaining => }/maintaining-V8.md | 0 doc/contributing/maintaining-acorn.md | 47 + doc/contributing/maintaining-brotli.md | 25 + doc/contributing/maintaining-c-ares.md | 58 + .../maintaining-cjs-module-lexer.md | 6 +- doc/contributing/maintaining-dependencies.md | 106 ++ .../{maintaining => }/maintaining-http.md | 45 +- .../{maintaining => }/maintaining-icu.md | 0 doc/contributing/maintaining-nghttp2.md | 39 + doc/contributing/maintaining-ngtpc2.md | 62 + doc/contributing/maintaining-npm.md | 51 + .../{maintaining => }/maintaining-openssl.md | 5 +- doc/contributing/maintaining-postject.md | 26 + .../maintaining-root-certs.md | 0 .../maintaining-shared-library-support.md | 0 ...g-single-executable-application-support.md | 0 .../maintaining-the-build-files.md | 2 +- .../maintaining-types-for-nodejs.md | 0 doc/contributing/maintaining-undici.md | 25 + .../maintaining-web-assembly.md | 9 + doc/contributing/maintaining-zlib.md | 36 + .../maintaining/maintaining-dependencies.md | 344 ---- doc/contributing/security-release-process.md | 4 +- lib/_http_server.js | 5 +- lib/internal/bootstrap/realm.js | 15 - lib/internal/buffer.js | 10 - lib/internal/crypto/pbkdf2.js | 10 +- lib/internal/crypto/webcrypto.js | 29 +- lib/internal/errors.js | 2 - lib/internal/main/embedding.js | 4 +- lib/internal/main/mksnapshot.js | 13 +- lib/internal/modules/esm/worker.js | 16 +- lib/internal/util/embedding.js | 11 +- lib/path.js | 5 +- lib/worker_threads.js | 2 - src/api/environment.cc | 30 +- src/async_wrap.cc | 42 +- src/async_wrap.h | 10 +- src/cares_wrap.cc | 2 +- src/crypto/crypto_context.cc | 3 +- src/crypto/crypto_tls.cc | 3 +- src/dataqueue/queue.cc | 4 +- src/encoding_binding.cc | 37 +- src/encoding_binding.h | 10 +- src/env.cc | 15 +- src/env_properties.h | 6 +- src/handle_wrap.cc | 17 +- src/handle_wrap.h | 2 - src/inspector_socket.cc | 5 +- src/inspector_socket_server.cc | 2 +- src/js_native_api_v8.cc | 31 +- src/js_native_api_v8.h | 9 +- src/json_parser.cc | 38 +- src/json_parser.h | 3 +- src/node.cc | 4 +- src/node.h | 11 +- src/node_api.cc | 76 +- src/node_api.h | 10 - src/node_api_internals.h | 3 +- src/node_binding.cc | 13 +- src/node_binding.h | 25 +- src/node_blob.cc | 37 +- src/node_blob.h | 11 +- src/node_builtins.cc | 16 +- src/node_contextify.cc | 85 +- src/node_contextify.h | 9 +- src/node_file.cc | 162 +- src/node_http2.cc | 10 +- src/node_http2.h | 10 +- src/node_messaging.cc | 16 +- src/node_process.h | 3 +- src/node_process_methods.cc | 88 +- src/node_realm-inl.h | 12 +- src/node_report.cc | 2 +- src/node_sea.cc | 91 +- src/node_snapshotable.cc | 4 +- src/node_stat_watcher.cc | 13 +- src/node_stat_watcher.h | 3 +- src/node_url.cc | 40 +- src/node_url.h | 10 +- src/node_version.h | 6 +- src/node_worker.cc | 16 +- src/permission/child_process_permission.cc | 2 +- src/permission/child_process_permission.h | 2 +- src/permission/fs_permission.h | 2 +- src/permission/permission.h | 2 +- src/permission/permission_base.h | 2 +- src/permission/worker_permission.cc | 2 +- src/permission/worker_permission.h | 2 +- src/quic/data.h | 2 +- src/stream_base.cc | 35 +- src/stream_base.h | 4 +- src/string_bytes.cc | 2 +- src/timers.cc | 43 +- src/timers.h | 10 +- src/util.cc | 59 +- src/util.h | 19 +- test/abort/test-signal-handler.js | 9 +- test/addons/worker-buffer-callback/test.js | 5 +- test/cctest/test_inspector_socket.cc | 8 +- test/cctest/test_linked_binding.cc | 94 +- test/cctest/test_node_api.cc | 3 +- test/common/README.md | 16 - test/common/assertSnapshot.js | 18 +- test/common/sea.js | 92 -- test/common/wpt.js | 12 +- test/fixtures/sea.js | 33 +- .../snapshot/v8-startup-snapshot-api.js | 86 +- .../output/default_output.snapshot | 57 - test/js-native-api/test_reference/test.js | 14 - .../binding.gyp | 14 - .../test.js | 124 -- .../test_reference_by_node_api_version.c | 180 --- .../test_worker_buffer_callback/test.js | 5 +- test/parallel/test-blob-file-backed.js | 17 - .../test-buffer-pool-untransferable.js | 5 +- .../test-http-server-response-standalone.js | 6 - test/parallel/test-node-output-console.mjs | 9 +- test/parallel/test-node-output-errors.mjs | 8 +- test/parallel/test-node-output-sourcemaps.mjs | 2 +- test/parallel/test-node-output-vm.mjs | 2 +- test/parallel/test-runner-import-no-scheme.js | 51 +- test/parallel/test-runner-output.mjs | 13 +- .../test-single-executable-application.js | 124 ++ ...st-single-executable-blob-config-errors.js | 24 - .../test-single-executable-blob-config.js | 65 - test/parallel/test-snapshot-api.js | 20 +- .../test-timers-immediate-promisified.js | 4 +- .../test-timers-interval-promisified.js | 10 +- .../test-timers-timeout-promisified.js | 4 +- .../test-webcrypto-export-import-cfrg.js | 20 +- .../test-webcrypto-export-import-ec.js | 18 - .../test-webcrypto-export-import-rsa.js | 18 - test/parallel/test-webcrypto-export-import.js | 24 - .../test-webcrypto-sign-verify-ecdsa.js | 13 + .../test-webcrypto-sign-verify-eddsa.js | 13 + .../test-webcrypto-sign-verify-hmac.js | 2 +- .../test-webcrypto-sign-verify-rsa.js | 13 + test/parallel/test-webcrypto-wrap-unwrap.js | 6 +- .../test-worker-message-port-arraybuffer.js | 7 - ...est-worker-message-port-transfer-native.js | 2 +- ...ge-transfer-port-mark-as-untransferable.js | 34 +- .../pseudo-tty/pty_helper.py | 2 - .../test_runner_default_reporter.js} | 2 +- .../test_runner_default_reporter.out | 57 + test/pseudo-tty/testcfg.py | 2 +- ...cation-disable-experimental-sea-warning.js | 60 - .../test-single-executable-application.js | 59 - test/wpt/test-timers.js | 2 +- test/wpt/testcfg.py | 2 +- tools/icu/README.md | 2 +- 740 files changed, 7298 insertions(+), 21508 deletions(-) delete mode 100644 deps/npm/node_modules/@isaacs/cliui/LICENSE.txt delete mode 100644 deps/npm/node_modules/@isaacs/cliui/build/index.cjs delete mode 100644 deps/npm/node_modules/@isaacs/cliui/build/index.d.cts delete mode 100644 deps/npm/node_modules/@isaacs/cliui/build/lib/index.js delete mode 100644 deps/npm/node_modules/@isaacs/cliui/index.mjs delete mode 100644 deps/npm/node_modules/@isaacs/cliui/node_modules/ansi-regex/index.js delete mode 100644 deps/npm/node_modules/@isaacs/cliui/node_modules/ansi-regex/license delete mode 100644 deps/npm/node_modules/@isaacs/cliui/node_modules/ansi-regex/package.json delete mode 100644 deps/npm/node_modules/@isaacs/cliui/node_modules/emoji-regex/LICENSE-MIT.txt delete mode 100644 deps/npm/node_modules/@isaacs/cliui/node_modules/emoji-regex/RGI_Emoji.js delete mode 100644 deps/npm/node_modules/@isaacs/cliui/node_modules/emoji-regex/es2015/RGI_Emoji.js delete mode 100644 deps/npm/node_modules/@isaacs/cliui/node_modules/emoji-regex/es2015/index.js delete mode 100644 deps/npm/node_modules/@isaacs/cliui/node_modules/emoji-regex/es2015/text.js delete mode 100644 deps/npm/node_modules/@isaacs/cliui/node_modules/emoji-regex/index.js delete mode 100644 deps/npm/node_modules/@isaacs/cliui/node_modules/emoji-regex/package.json delete mode 100644 deps/npm/node_modules/@isaacs/cliui/node_modules/emoji-regex/text.js delete mode 100644 deps/npm/node_modules/@isaacs/cliui/node_modules/string-width/index.js delete mode 100644 deps/npm/node_modules/@isaacs/cliui/node_modules/string-width/license delete mode 100644 deps/npm/node_modules/@isaacs/cliui/node_modules/string-width/package.json delete mode 100644 deps/npm/node_modules/@isaacs/cliui/node_modules/strip-ansi/index.js delete mode 100644 deps/npm/node_modules/@isaacs/cliui/node_modules/strip-ansi/license delete mode 100644 deps/npm/node_modules/@isaacs/cliui/node_modules/strip-ansi/package.json delete mode 100644 deps/npm/node_modules/@isaacs/cliui/package.json rename deps/npm/node_modules/@npmcli/arborist/lib/arborist/{set-workspaces.js => load-workspaces.js} (80%) delete mode 100644 deps/npm/node_modules/@pkgjs/parseargs/LICENSE delete mode 100644 deps/npm/node_modules/@pkgjs/parseargs/examples/is-default-value.js delete mode 100644 deps/npm/node_modules/@pkgjs/parseargs/examples/limit-long-syntax.js delete mode 100644 deps/npm/node_modules/@pkgjs/parseargs/examples/negate.js delete mode 100644 deps/npm/node_modules/@pkgjs/parseargs/examples/no-repeated-options.js delete mode 100644 deps/npm/node_modules/@pkgjs/parseargs/examples/ordered-options.mjs delete mode 100644 deps/npm/node_modules/@pkgjs/parseargs/examples/simple-hard-coded.js delete mode 100644 deps/npm/node_modules/@pkgjs/parseargs/index.js delete mode 100644 deps/npm/node_modules/@pkgjs/parseargs/internal/errors.js delete mode 100644 deps/npm/node_modules/@pkgjs/parseargs/internal/primordials.js delete mode 100644 deps/npm/node_modules/@pkgjs/parseargs/internal/util.js delete mode 100644 deps/npm/node_modules/@pkgjs/parseargs/internal/validators.js delete mode 100644 deps/npm/node_modules/@pkgjs/parseargs/package.json delete mode 100644 deps/npm/node_modules/@pkgjs/parseargs/utils.js delete mode 100644 deps/npm/node_modules/@tufjs/canonical-json/LICENSE delete mode 100644 deps/npm/node_modules/@tufjs/canonical-json/lib/index.js delete mode 100644 deps/npm/node_modules/@tufjs/canonical-json/package.json create mode 100644 deps/npm/node_modules/@tufjs/models/dist/utils/json.js create mode 100644 deps/npm/node_modules/cacache/lib/util/move-file.js delete mode 100644 deps/npm/node_modules/cross-spawn/LICENSE delete mode 100644 deps/npm/node_modules/cross-spawn/index.js delete mode 100644 deps/npm/node_modules/cross-spawn/lib/enoent.js delete mode 100644 deps/npm/node_modules/cross-spawn/lib/parse.js delete mode 100644 deps/npm/node_modules/cross-spawn/lib/util/escape.js delete mode 100644 deps/npm/node_modules/cross-spawn/lib/util/readShebang.js delete mode 100644 deps/npm/node_modules/cross-spawn/lib/util/resolveCommand.js delete mode 100644 deps/npm/node_modules/cross-spawn/node_modules/which/LICENSE delete mode 100644 deps/npm/node_modules/cross-spawn/node_modules/which/README.md delete mode 100755 deps/npm/node_modules/cross-spawn/node_modules/which/bin/node-which delete mode 100644 deps/npm/node_modules/cross-spawn/node_modules/which/package.json delete mode 100644 deps/npm/node_modules/cross-spawn/node_modules/which/which.js delete mode 100644 deps/npm/node_modules/cross-spawn/package.json delete mode 100644 deps/npm/node_modules/eastasianwidth/eastasianwidth.js delete mode 100644 deps/npm/node_modules/eastasianwidth/package.json delete mode 100644 deps/npm/node_modules/foreground-child/LICENSE delete mode 100644 deps/npm/node_modules/foreground-child/dist/cjs/all-signals.js delete mode 100644 deps/npm/node_modules/foreground-child/dist/cjs/index.js delete mode 100644 deps/npm/node_modules/foreground-child/dist/cjs/package.json delete mode 100644 deps/npm/node_modules/foreground-child/dist/cjs/watchdog.js delete mode 100644 deps/npm/node_modules/foreground-child/dist/mjs/all-signals.js delete mode 100644 deps/npm/node_modules/foreground-child/dist/mjs/index.js delete mode 100644 deps/npm/node_modules/foreground-child/dist/mjs/package.json delete mode 100644 deps/npm/node_modules/foreground-child/dist/mjs/watchdog.js delete mode 100644 deps/npm/node_modules/foreground-child/package.json delete mode 100644 deps/npm/node_modules/glob/README.md rename deps/npm/node_modules/glob/dist/cjs/{src => }/glob.js (99%) rename deps/npm/node_modules/glob/dist/cjs/{src => }/has-magic.js (100%) rename deps/npm/node_modules/glob/dist/cjs/{src => }/ignore.js (100%) create mode 100644 deps/npm/node_modules/glob/dist/cjs/index-cjs.js rename deps/npm/node_modules/glob/dist/cjs/{src => }/index.js (86%) rename deps/npm/node_modules/glob/dist/cjs/{src => }/pattern.js (100%) rename deps/npm/node_modules/glob/dist/cjs/{src => }/processor.js (100%) delete mode 100644 deps/npm/node_modules/glob/dist/cjs/src/bin.d.ts delete mode 100644 deps/npm/node_modules/glob/dist/cjs/src/bin.d.ts.map delete mode 100755 deps/npm/node_modules/glob/dist/cjs/src/bin.js delete mode 100644 deps/npm/node_modules/glob/dist/cjs/src/bin.js.map delete mode 100644 deps/npm/node_modules/glob/dist/cjs/src/glob.d.ts delete mode 100644 deps/npm/node_modules/glob/dist/cjs/src/glob.d.ts.map delete mode 100644 deps/npm/node_modules/glob/dist/cjs/src/glob.js.map delete mode 100644 deps/npm/node_modules/glob/dist/cjs/src/has-magic.d.ts delete mode 100644 deps/npm/node_modules/glob/dist/cjs/src/has-magic.d.ts.map delete mode 100644 deps/npm/node_modules/glob/dist/cjs/src/has-magic.js.map delete mode 100644 deps/npm/node_modules/glob/dist/cjs/src/ignore.d.ts delete mode 100644 deps/npm/node_modules/glob/dist/cjs/src/ignore.d.ts.map delete mode 100644 deps/npm/node_modules/glob/dist/cjs/src/ignore.js.map delete mode 100644 deps/npm/node_modules/glob/dist/cjs/src/index.d.ts delete mode 100644 deps/npm/node_modules/glob/dist/cjs/src/index.d.ts.map delete mode 100644 deps/npm/node_modules/glob/dist/cjs/src/index.js.map delete mode 100644 deps/npm/node_modules/glob/dist/cjs/src/pattern.d.ts delete mode 100644 deps/npm/node_modules/glob/dist/cjs/src/pattern.d.ts.map delete mode 100644 deps/npm/node_modules/glob/dist/cjs/src/pattern.js.map delete mode 100644 deps/npm/node_modules/glob/dist/cjs/src/processor.d.ts delete mode 100644 deps/npm/node_modules/glob/dist/cjs/src/processor.d.ts.map delete mode 100644 deps/npm/node_modules/glob/dist/cjs/src/processor.js.map delete mode 100644 deps/npm/node_modules/glob/dist/cjs/src/walker.d.ts delete mode 100644 deps/npm/node_modules/glob/dist/cjs/src/walker.d.ts.map delete mode 100644 deps/npm/node_modules/glob/dist/cjs/src/walker.js.map rename deps/npm/node_modules/glob/dist/cjs/{src => }/walker.js (95%) delete mode 100644 deps/npm/node_modules/glob/dist/mjs/glob.d.ts delete mode 100644 deps/npm/node_modules/glob/dist/mjs/glob.d.ts.map delete mode 100644 deps/npm/node_modules/glob/dist/mjs/glob.js.map delete mode 100644 deps/npm/node_modules/glob/dist/mjs/has-magic.d.ts delete mode 100644 deps/npm/node_modules/glob/dist/mjs/has-magic.d.ts.map delete mode 100644 deps/npm/node_modules/glob/dist/mjs/has-magic.js.map delete mode 100644 deps/npm/node_modules/glob/dist/mjs/ignore.d.ts delete mode 100644 deps/npm/node_modules/glob/dist/mjs/ignore.d.ts.map delete mode 100644 deps/npm/node_modules/glob/dist/mjs/ignore.js.map delete mode 100644 deps/npm/node_modules/glob/dist/mjs/index.d.ts delete mode 100644 deps/npm/node_modules/glob/dist/mjs/index.d.ts.map delete mode 100644 deps/npm/node_modules/glob/dist/mjs/index.js.map delete mode 100644 deps/npm/node_modules/glob/dist/mjs/pattern.d.ts delete mode 100644 deps/npm/node_modules/glob/dist/mjs/pattern.d.ts.map delete mode 100644 deps/npm/node_modules/glob/dist/mjs/pattern.js.map delete mode 100644 deps/npm/node_modules/glob/dist/mjs/processor.d.ts delete mode 100644 deps/npm/node_modules/glob/dist/mjs/processor.d.ts.map delete mode 100644 deps/npm/node_modules/glob/dist/mjs/processor.js.map delete mode 100644 deps/npm/node_modules/glob/dist/mjs/walker.d.ts delete mode 100644 deps/npm/node_modules/glob/dist/mjs/walker.d.ts.map delete mode 100644 deps/npm/node_modules/glob/dist/mjs/walker.js.map delete mode 100644 deps/npm/node_modules/jackspeak/LICENSE.md delete mode 100644 deps/npm/node_modules/jackspeak/dist/cjs/index.js delete mode 100644 deps/npm/node_modules/jackspeak/dist/cjs/package.json delete mode 100644 deps/npm/node_modules/jackspeak/dist/cjs/parse-args.js delete mode 100644 deps/npm/node_modules/jackspeak/dist/mjs/index.js delete mode 100644 deps/npm/node_modules/jackspeak/dist/mjs/package.json delete mode 100644 deps/npm/node_modules/jackspeak/dist/mjs/parse-args.js delete mode 100644 deps/npm/node_modules/jackspeak/package.json create mode 100644 deps/npm/node_modules/minimatch/dist/cjs/_parse.js delete mode 100644 deps/npm/node_modules/minimatch/dist/cjs/ast.js create mode 100644 deps/npm/node_modules/minimatch/dist/cjs/extglob.js create mode 100644 deps/npm/node_modules/minimatch/dist/cjs/index-cjs.js create mode 100644 deps/npm/node_modules/minimatch/dist/cjs/parse.js create mode 100644 deps/npm/node_modules/minimatch/dist/mjs/_parse.js delete mode 100644 deps/npm/node_modules/minimatch/dist/mjs/ast.js create mode 100644 deps/npm/node_modules/minimatch/dist/mjs/extglob.js create mode 100644 deps/npm/node_modules/minimatch/dist/mjs/parse.js delete mode 100644 deps/npm/node_modules/node-gyp/node_modules/signal-exit/LICENSE.txt delete mode 100644 deps/npm/node_modules/node-gyp/node_modules/signal-exit/package.json delete mode 100644 deps/npm/node_modules/path-key/index.js delete mode 100644 deps/npm/node_modules/path-key/license delete mode 100644 deps/npm/node_modules/path-key/package.json delete mode 100644 deps/npm/node_modules/path-scurry/node_modules/lru-cache/LICENSE delete mode 100644 deps/npm/node_modules/path-scurry/node_modules/lru-cache/dist/cjs/index.js delete mode 100644 deps/npm/node_modules/path-scurry/node_modules/lru-cache/dist/cjs/index.min.js delete mode 100644 deps/npm/node_modules/path-scurry/node_modules/lru-cache/dist/cjs/package.json delete mode 100644 deps/npm/node_modules/path-scurry/node_modules/lru-cache/dist/mjs/index.js delete mode 100644 deps/npm/node_modules/path-scurry/node_modules/lru-cache/dist/mjs/index.min.js delete mode 100644 deps/npm/node_modules/path-scurry/node_modules/lru-cache/dist/mjs/package.json delete mode 100644 deps/npm/node_modules/path-scurry/node_modules/lru-cache/package.json delete mode 100644 deps/npm/node_modules/shebang-command/index.js delete mode 100644 deps/npm/node_modules/shebang-command/license delete mode 100644 deps/npm/node_modules/shebang-command/package.json delete mode 100644 deps/npm/node_modules/shebang-regex/index.js delete mode 100644 deps/npm/node_modules/shebang-regex/license delete mode 100644 deps/npm/node_modules/shebang-regex/package.json delete mode 100644 deps/npm/node_modules/signal-exit/dist/cjs/browser.js delete mode 100644 deps/npm/node_modules/signal-exit/dist/cjs/index.js delete mode 100644 deps/npm/node_modules/signal-exit/dist/cjs/package.json delete mode 100644 deps/npm/node_modules/signal-exit/dist/cjs/signals.js delete mode 100644 deps/npm/node_modules/signal-exit/dist/mjs/browser.js delete mode 100644 deps/npm/node_modules/signal-exit/dist/mjs/index.js delete mode 100644 deps/npm/node_modules/signal-exit/dist/mjs/package.json delete mode 100644 deps/npm/node_modules/signal-exit/dist/mjs/signals.js rename deps/npm/node_modules/{node-gyp/node_modules => }/signal-exit/index.js (100%) rename deps/npm/node_modules/{node-gyp/node_modules => }/signal-exit/signals.js (100%) rename deps/npm/node_modules/sigstore/dist/{external => client}/error.d.ts (100%) rename deps/npm/node_modules/sigstore/dist/{external => client}/error.js (100%) rename deps/npm/node_modules/sigstore/dist/{external => client}/fulcio.d.ts (100%) rename deps/npm/node_modules/sigstore/dist/{external => client}/fulcio.js (100%) rename deps/npm/node_modules/sigstore/dist/{external => client}/index.d.ts (64%) rename deps/npm/node_modules/sigstore/dist/{external => client}/index.js (81%) rename deps/npm/node_modules/sigstore/dist/{external => client}/rekor.d.ts (100%) rename deps/npm/node_modules/sigstore/dist/{external => client}/rekor.js (100%) delete mode 100644 deps/npm/node_modules/sigstore/dist/config.d.ts delete mode 100644 deps/npm/node_modules/sigstore/dist/config.js delete mode 100644 deps/npm/node_modules/string-width-cjs/index.js delete mode 100644 deps/npm/node_modules/string-width-cjs/license delete mode 100644 deps/npm/node_modules/string-width-cjs/package.json delete mode 100644 deps/npm/node_modules/strip-ansi-cjs/index.js delete mode 100644 deps/npm/node_modules/strip-ansi-cjs/license delete mode 100644 deps/npm/node_modules/strip-ansi-cjs/package.json delete mode 100644 deps/npm/node_modules/tuf-js/dist/utils/url.js delete mode 100644 deps/npm/node_modules/walk-up-path/dist/cjs/index.js delete mode 100644 deps/npm/node_modules/walk-up-path/dist/cjs/package.json delete mode 100644 deps/npm/node_modules/walk-up-path/dist/mjs/index.js delete mode 100644 deps/npm/node_modules/walk-up-path/dist/mjs/package.json create mode 100644 deps/npm/node_modules/walk-up-path/index.js delete mode 100755 deps/npm/node_modules/wrap-ansi-cjs/index.js delete mode 100644 deps/npm/node_modules/wrap-ansi-cjs/license delete mode 100644 deps/npm/node_modules/wrap-ansi-cjs/package.json delete mode 100755 deps/npm/node_modules/wrap-ansi/index.js delete mode 100644 deps/npm/node_modules/wrap-ansi/license delete mode 100644 deps/npm/node_modules/wrap-ansi/node_modules/ansi-regex/index.js delete mode 100644 deps/npm/node_modules/wrap-ansi/node_modules/ansi-regex/license delete mode 100644 deps/npm/node_modules/wrap-ansi/node_modules/ansi-regex/package.json delete mode 100644 deps/npm/node_modules/wrap-ansi/node_modules/ansi-styles/index.js delete mode 100644 deps/npm/node_modules/wrap-ansi/node_modules/ansi-styles/license delete mode 100644 deps/npm/node_modules/wrap-ansi/node_modules/ansi-styles/package.json delete mode 100644 deps/npm/node_modules/wrap-ansi/node_modules/emoji-regex/LICENSE-MIT.txt delete mode 100644 deps/npm/node_modules/wrap-ansi/node_modules/emoji-regex/RGI_Emoji.js delete mode 100644 deps/npm/node_modules/wrap-ansi/node_modules/emoji-regex/es2015/RGI_Emoji.js delete mode 100644 deps/npm/node_modules/wrap-ansi/node_modules/emoji-regex/es2015/index.js delete mode 100644 deps/npm/node_modules/wrap-ansi/node_modules/emoji-regex/es2015/text.js delete mode 100644 deps/npm/node_modules/wrap-ansi/node_modules/emoji-regex/index.js delete mode 100644 deps/npm/node_modules/wrap-ansi/node_modules/emoji-regex/package.json delete mode 100644 deps/npm/node_modules/wrap-ansi/node_modules/emoji-regex/text.js delete mode 100644 deps/npm/node_modules/wrap-ansi/node_modules/string-width/index.js delete mode 100644 deps/npm/node_modules/wrap-ansi/node_modules/string-width/license delete mode 100644 deps/npm/node_modules/wrap-ansi/node_modules/string-width/package.json delete mode 100644 deps/npm/node_modules/wrap-ansi/node_modules/strip-ansi/index.js delete mode 100644 deps/npm/node_modules/wrap-ansi/node_modules/strip-ansi/license delete mode 100644 deps/npm/node_modules/wrap-ansi/node_modules/strip-ansi/package.json delete mode 100644 deps/npm/node_modules/wrap-ansi/package.json rename doc/contributing/{maintaining => }/maintaining-V8.md (100%) create mode 100644 doc/contributing/maintaining-acorn.md create mode 100644 doc/contributing/maintaining-brotli.md create mode 100644 doc/contributing/maintaining-c-ares.md rename doc/contributing/{maintaining => }/maintaining-cjs-module-lexer.md (96%) create mode 100644 doc/contributing/maintaining-dependencies.md rename doc/contributing/{maintaining => }/maintaining-http.md (79%) rename doc/contributing/{maintaining => }/maintaining-icu.md (100%) create mode 100644 doc/contributing/maintaining-nghttp2.md create mode 100644 doc/contributing/maintaining-ngtpc2.md create mode 100644 doc/contributing/maintaining-npm.md rename doc/contributing/{maintaining => }/maintaining-openssl.md (94%) create mode 100644 doc/contributing/maintaining-postject.md rename doc/contributing/{maintaining => }/maintaining-root-certs.md (100%) rename doc/contributing/{maintaining => }/maintaining-shared-library-support.md (100%) rename doc/contributing/{maintaining => }/maintaining-single-executable-application-support.md (100%) rename doc/contributing/{maintaining => }/maintaining-the-build-files.md (96%) rename doc/contributing/{maintaining => }/maintaining-types-for-nodejs.md (100%) create mode 100644 doc/contributing/maintaining-undici.md rename doc/contributing/{maintaining => }/maintaining-web-assembly.md (95%) create mode 100644 doc/contributing/maintaining-zlib.md delete mode 100644 doc/contributing/maintaining/maintaining-dependencies.md delete mode 100644 test/common/sea.js delete mode 100644 test/fixtures/test-runner/output/default_output.snapshot delete mode 100644 test/node-api/test_reference_by_node_api_version/binding.gyp delete mode 100644 test/node-api/test_reference_by_node_api_version/test.js delete mode 100644 test/node-api/test_reference_by_node_api_version/test_reference_by_node_api_version.c create mode 100644 test/parallel/test-single-executable-application.js rename tools/pseudo-tty.py => test/pseudo-tty/pty_helper.py (98%) mode change 100755 => 100644 rename test/{fixtures/test-runner/output/default_output.js => pseudo-tty/test_runner_default_reporter.js} (93%) create mode 100644 test/pseudo-tty/test_runner_default_reporter.out delete mode 100644 test/sequential/test-single-executable-application-disable-experimental-sea-warning.js delete mode 100644 test/sequential/test-single-executable-application.js diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index ebedf0077f5627..06a40903132642 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -146,11 +146,11 @@ # Single Executable Applications /deps/postject @nodejs/single-executable /doc/api/single-executable-applications.md @nodejs/single-executable -/doc/contributing/maintaining/maintaining-single-executable-application-support.md @nodejs/single-executable +/doc/contributing/maintaining-postject.md @nodejs/single-executable +/doc/contributing/maintaining-single-executable-application-support.md @nodejs/single-executable /src/node_sea* @nodejs/single-executable /test/fixtures/postject-copy @nodejs/single-executable /test/parallel/test-single-executable-* @nodejs/single-executable -/test/sequential/test-single-executable-* @nodejs/single-executable /tools/dep_updaters/update-postject.sh @nodejs/single-executable # Permission Model diff --git a/.github/workflows/auto-start-ci.yml b/.github/workflows/auto-start-ci.yml index ad4c83e4d139d0..4cb5d49fe77324 100644 --- a/.github/workflows/auto-start-ci.yml +++ b/.github/workflows/auto-start-ci.yml @@ -46,7 +46,7 @@ jobs: if: needs.get-prs-for-ci.outputs.numbers != '' runs-on: ubuntu-latest steps: - - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 with: persist-credentials: false diff --git a/.github/workflows/build-tarball.yml b/.github/workflows/build-tarball.yml index 6611f96c1f5dae..235a48fa5343c9 100644 --- a/.github/workflows/build-tarball.yml +++ b/.github/workflows/build-tarball.yml @@ -39,11 +39,11 @@ jobs: if: github.event.pull_request.draft == false runs-on: ubuntu-latest steps: - - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 with: persist-credentials: false - name: Set up Python ${{ env.PYTHON_VERSION }} - uses: actions/setup-python@57ded4d7d5e986d7296eab16560982c6dd7c923b # v4.6.0 + uses: actions/setup-python@d27e3f3d7c64b4bbf8e4abfb9b63b83e846e0435 # v4.5.0 with: python-version: ${{ env.PYTHON_VERSION }} - name: Environment Information @@ -65,11 +65,11 @@ jobs: needs: build-tarball runs-on: ubuntu-latest steps: - - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 with: persist-credentials: false - name: Set up Python ${{ env.PYTHON_VERSION }} - uses: actions/setup-python@57ded4d7d5e986d7296eab16560982c6dd7c923b # v4.6.0 + uses: actions/setup-python@d27e3f3d7c64b4bbf8e4abfb9b63b83e846e0435 # v4.5.0 with: python-version: ${{ env.PYTHON_VERSION }} - name: Environment Information diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml index 80e08205f04a97..32025677b7f112 100644 --- a/.github/workflows/build-windows.yml +++ b/.github/workflows/build-windows.yml @@ -38,11 +38,11 @@ jobs: fail-fast: false runs-on: ${{ matrix.windows }} steps: - - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 with: persist-credentials: false - name: Set up Python ${{ env.PYTHON_VERSION }} - uses: actions/setup-python@57ded4d7d5e986d7296eab16560982c6dd7c923b # v4.6.0 + uses: actions/setup-python@d27e3f3d7c64b4bbf8e4abfb9b63b83e846e0435 # v4.5.0 with: python-version: ${{ env.PYTHON_VERSION }} - name: Install deps diff --git a/.github/workflows/commit-lint.yml b/.github/workflows/commit-lint.yml index 7fbd9a2a0cc562..1dcc459b24687b 100644 --- a/.github/workflows/commit-lint.yml +++ b/.github/workflows/commit-lint.yml @@ -17,7 +17,7 @@ jobs: run: | echo "plusOne=$((${{ github.event.pull_request.commits }} + 1))" >> $GITHUB_OUTPUT echo "minusOne=$((${{ github.event.pull_request.commits }} - 1))" >> $GITHUB_OUTPUT - - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 with: fetch-depth: ${{ steps.nb-of-commits.outputs.plusOne }} persist-credentials: false diff --git a/.github/workflows/commit-queue.yml b/.github/workflows/commit-queue.yml index 009a1719f76069..c469c8810daada 100644 --- a/.github/workflows/commit-queue.yml +++ b/.github/workflows/commit-queue.yml @@ -58,7 +58,7 @@ jobs: if: needs.get_mergeable_prs.outputs.numbers != '' runs-on: ubuntu-latest steps: - - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 with: # Needs the whole git history for ncu to work # See https://github.com/nodejs/node-core-utils/pull/486 diff --git a/.github/workflows/coverage-linux-without-intl.yml b/.github/workflows/coverage-linux-without-intl.yml index aca32133511030..88c1338028a4f3 100644 --- a/.github/workflows/coverage-linux-without-intl.yml +++ b/.github/workflows/coverage-linux-without-intl.yml @@ -37,11 +37,11 @@ jobs: if: github.event.pull_request.draft == false runs-on: ubuntu-latest steps: - - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 with: persist-credentials: false - name: Set up Python ${{ env.PYTHON_VERSION }} - uses: actions/setup-python@57ded4d7d5e986d7296eab16560982c6dd7c923b # v4.6.0 + uses: actions/setup-python@d27e3f3d7c64b4bbf8e4abfb9b63b83e846e0435 # v4.5.0 with: python-version: ${{ env.PYTHON_VERSION }} - name: Environment Information @@ -64,6 +64,6 @@ jobs: - name: Clean tmp run: rm -rf coverage/tmp && rm -rf out - name: Upload - uses: codecov/codecov-action@894ff025c7b54547a9a2a1e9f228beae737ad3c2 # v3.1.3 + uses: codecov/codecov-action@d9f34f8cd5cb3b3eb79b3e4b5dae3a16df499a70 # v3.1.1 with: directory: ./coverage diff --git a/.github/workflows/coverage-linux.yml b/.github/workflows/coverage-linux.yml index 45520bf605b55a..6e95c17fc1b94e 100644 --- a/.github/workflows/coverage-linux.yml +++ b/.github/workflows/coverage-linux.yml @@ -37,11 +37,11 @@ jobs: if: github.event.pull_request.draft == false runs-on: ubuntu-latest steps: - - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 with: persist-credentials: false - name: Set up Python ${{ env.PYTHON_VERSION }} - uses: actions/setup-python@57ded4d7d5e986d7296eab16560982c6dd7c923b # v4.6.0 + uses: actions/setup-python@d27e3f3d7c64b4bbf8e4abfb9b63b83e846e0435 # v4.5.0 with: python-version: ${{ env.PYTHON_VERSION }} - name: Environment Information @@ -64,6 +64,6 @@ jobs: - name: Clean tmp run: rm -rf coverage/tmp && rm -rf out - name: Upload - uses: codecov/codecov-action@894ff025c7b54547a9a2a1e9f228beae737ad3c2 # v3.1.3 + uses: codecov/codecov-action@d9f34f8cd5cb3b3eb79b3e4b5dae3a16df499a70 # v3.1.1 with: directory: ./coverage diff --git a/.github/workflows/coverage-windows.yml b/.github/workflows/coverage-windows.yml index 6869b2f37fedae..04ff310d2f0216 100644 --- a/.github/workflows/coverage-windows.yml +++ b/.github/workflows/coverage-windows.yml @@ -39,11 +39,11 @@ jobs: if: github.event.pull_request.draft == false runs-on: windows-2022 steps: - - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 with: persist-credentials: false - name: Set up Python ${{ env.PYTHON_VERSION }} - uses: actions/setup-python@57ded4d7d5e986d7296eab16560982c6dd7c923b # v4.6.0 + uses: actions/setup-python@d27e3f3d7c64b4bbf8e4abfb9b63b83e846e0435 # v4.5.0 with: python-version: ${{ env.PYTHON_VERSION }} - name: Install deps @@ -65,6 +65,6 @@ jobs: - name: Clean tmp run: npx rimraf ./coverage/tmp - name: Upload - uses: codecov/codecov-action@894ff025c7b54547a9a2a1e9f228beae737ad3c2 # v3.1.3 + uses: codecov/codecov-action@d9f34f8cd5cb3b3eb79b3e4b5dae3a16df499a70 # v3.1.1 with: directory: ./coverage diff --git a/.github/workflows/daily-wpt-fyi.yml b/.github/workflows/daily-wpt-fyi.yml index 58554e98facaab..4c575b76ae2bb8 100644 --- a/.github/workflows/daily-wpt-fyi.yml +++ b/.github/workflows/daily-wpt-fyi.yml @@ -33,7 +33,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Set up Python ${{ env.PYTHON_VERSION }} - uses: actions/setup-python@57ded4d7d5e986d7296eab16560982c6dd7c923b # v4.6.0 + uses: actions/setup-python@d27e3f3d7c64b4bbf8e4abfb9b63b83e846e0435 # v4.5.0 with: python-version: ${{ env.PYTHON_VERSION }} - name: Environment Information @@ -57,7 +57,7 @@ jobs: SHORT_SHA=$(node -p 'process.version.split(/-nightly\d{8}/)[1]') echo "NIGHTLY_REF=$(gh api /repos/nodejs/node/commits/$SHORT_SHA --jq '.sha')" >> $GITHUB_ENV - name: Checkout ${{ steps.setup-node.outputs.node-version }} - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 with: persist-credentials: false ref: ${{ env.NIGHTLY_REF || steps.setup-node.outputs.node-version }} @@ -73,7 +73,7 @@ jobs: run: rm -rf wpt working-directory: test/fixtures - name: Checkout epochs/daily WPT - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 with: repository: web-platform-tests/wpt persist-credentials: false @@ -98,7 +98,7 @@ jobs: run: rm -rf deps/undici - name: Checkout undici if: ${{ env.WPT_REPORT != '' }} - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 with: repository: nodejs/undici persist-credentials: false diff --git a/.github/workflows/daily.yml b/.github/workflows/daily.yml index 7523e4dbc0e760..0c23505bf0ac07 100644 --- a/.github/workflows/daily.yml +++ b/.github/workflows/daily.yml @@ -17,7 +17,7 @@ jobs: # not working on gcc-8 and gcc-9 see https://github.com/nodejs/node/issues/38570 container: gcc:11 steps: - - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 with: persist-credentials: false - name: Use Node.js ${{ env.NODE_VERSION }} diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml index 81467691293c35..0c24159658c620 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml @@ -24,7 +24,7 @@ jobs: if: github.event.pull_request.draft == false runs-on: ubuntu-latest steps: - - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 with: persist-credentials: false - name: Use Node.js ${{ env.NODE_VERSION }} diff --git a/.github/workflows/find-inactive-collaborators.yml b/.github/workflows/find-inactive-collaborators.yml index 30a2f1b02fa528..d03e994c2a487f 100644 --- a/.github/workflows/find-inactive-collaborators.yml +++ b/.github/workflows/find-inactive-collaborators.yml @@ -19,7 +19,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 with: fetch-depth: 0 persist-credentials: false diff --git a/.github/workflows/find-inactive-tsc.yml b/.github/workflows/find-inactive-tsc.yml index e81a8b2a157c69..eb53619209b52d 100644 --- a/.github/workflows/find-inactive-tsc.yml +++ b/.github/workflows/find-inactive-tsc.yml @@ -20,13 +20,13 @@ jobs: steps: - name: Checkout the repo - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 with: fetch-depth: 0 persist-credentials: false - name: Clone nodejs/TSC repository - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 with: fetch-depth: 0 path: .tmp diff --git a/.github/workflows/license-builder.yml b/.github/workflows/license-builder.yml index 7d6c2bb3463bde..830865ac3d0e85 100644 --- a/.github/workflows/license-builder.yml +++ b/.github/workflows/license-builder.yml @@ -17,7 +17,7 @@ jobs: if: github.repository == 'nodejs/node' runs-on: ubuntu-latest steps: - - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 with: persist-credentials: false - run: ./tools/license-builder.sh # Run the license builder tool diff --git a/.github/workflows/linters.yml b/.github/workflows/linters.yml index a481e5be4e310a..e9b2f776de26a5 100644 --- a/.github/workflows/linters.yml +++ b/.github/workflows/linters.yml @@ -25,7 +25,7 @@ jobs: if: github.event.pull_request.draft == false runs-on: ubuntu-latest steps: - - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 with: persist-credentials: false - name: Use Node.js ${{ env.NODE_VERSION }} @@ -40,11 +40,11 @@ jobs: if: github.event.pull_request.draft == false runs-on: ubuntu-latest steps: - - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 with: persist-credentials: false - name: Set up Python ${{ env.PYTHON_VERSION }} - uses: actions/setup-python@57ded4d7d5e986d7296eab16560982c6dd7c923b # v4.6.0 + uses: actions/setup-python@d27e3f3d7c64b4bbf8e4abfb9b63b83e846e0435 # v4.5.0 with: python-version: ${{ env.PYTHON_VERSION }} - name: Environment Information @@ -55,7 +55,7 @@ jobs: if: ${{ github.event.pull_request && github.event.pull_request.draft == false && github.base_ref == github.event.repository.default_branch }} runs-on: ubuntu-latest steps: - - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 with: fetch-depth: 0 persist-credentials: false @@ -64,7 +64,7 @@ jobs: with: node-version: ${{ env.NODE_VERSION }} - name: Set up Python ${{ env.PYTHON_VERSION }} - uses: actions/setup-python@57ded4d7d5e986d7296eab16560982c6dd7c923b # v4.6.0 + uses: actions/setup-python@d27e3f3d7c64b4bbf8e4abfb9b63b83e846e0435 # v4.5.0 with: python-version: ${{ env.PYTHON_VERSION }} - name: Environment Information @@ -93,7 +93,7 @@ jobs: if: github.event.pull_request.draft == false runs-on: ubuntu-latest steps: - - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 with: persist-credentials: false - name: Use Node.js ${{ env.NODE_VERSION }} @@ -118,11 +118,11 @@ jobs: if: github.event.pull_request.draft == false runs-on: ubuntu-latest steps: - - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 with: persist-credentials: false - name: Set up Python ${{ env.PYTHON_VERSION }} - uses: actions/setup-python@57ded4d7d5e986d7296eab16560982c6dd7c923b # v4.6.0 + uses: actions/setup-python@d27e3f3d7c64b4bbf8e4abfb9b63b83e846e0435 # v4.5.0 with: python-version: ${{ env.PYTHON_VERSION }} - name: Environment Information @@ -135,11 +135,11 @@ jobs: if: github.event.pull_request.draft == false runs-on: ubuntu-latest steps: - - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 with: persist-credentials: false - name: Use Python ${{ env.PYTHON_VERSION }} - uses: actions/setup-python@57ded4d7d5e986d7296eab16560982c6dd7c923b # v4.6.0 + uses: actions/setup-python@d27e3f3d7c64b4bbf8e4abfb9b63b83e846e0435 # v4.5.0 with: python-version: ${{ env.PYTHON_VERSION }} - name: Environment Information @@ -153,7 +153,7 @@ jobs: if: github.event.pull_request.draft == false runs-on: ubuntu-latest steps: - - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 with: persist-credentials: false - run: shellcheck -V @@ -163,7 +163,7 @@ jobs: if: github.event.pull_request.draft == false runs-on: ubuntu-latest steps: - - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 with: persist-credentials: false - uses: mszostok/codeowners-validator@7f3f5e28c6d7b8dfae5731e54ce2272ca384592f @@ -173,7 +173,7 @@ jobs: if: ${{ github.event.pull_request }} runs-on: ubuntu-latest steps: - - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 with: fetch-depth: 2 persist-credentials: false diff --git a/.github/workflows/notify-on-push.yml b/.github/workflows/notify-on-push.yml index 2d421cc2c529c8..5be0bd7c7fde64 100644 --- a/.github/workflows/notify-on-push.yml +++ b/.github/workflows/notify-on-push.yml @@ -34,7 +34,7 @@ jobs: permissions: pull-requests: write steps: - - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 with: persist-credentials: false - name: Check commit message diff --git a/.github/workflows/scorecard.yml b/.github/workflows/scorecard.yml index df4db9aff4dec1..c758c9a491bb41 100644 --- a/.github/workflows/scorecard.yml +++ b/.github/workflows/scorecard.yml @@ -33,12 +33,12 @@ jobs: steps: - name: Harden Runner - uses: step-security/harden-runner@6b3083af2869dc3314a0257a42f4af696cc79ba3 # v2.3.1 + uses: step-security/harden-runner@1f99358870fe1c846a3ccba386cc2b2246836776 # v2.2.1 with: egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs - name: Checkout code - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0 with: persist-credentials: false @@ -73,6 +73,6 @@ jobs: # Upload the results to GitHub's code scanning dashboard. - name: Upload to code-scanning - uses: github/codeql-action/upload-sarif@f3feb00acb00f31a6f60280e6ace9ca31d91c76a # v2.3.2 + uses: github/codeql-action/upload-sarif@04df1262e6247151b5ac09cd2c303ac36ad3f62b # v2.2.9 with: sarif_file: results.sarif diff --git a/.github/workflows/test-asan.yml b/.github/workflows/test-asan.yml index b574479cc063d3..892bcff481a52f 100644 --- a/.github/workflows/test-asan.yml +++ b/.github/workflows/test-asan.yml @@ -47,11 +47,11 @@ jobs: CONFIG_FLAGS: --enable-asan ASAN: true steps: - - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 with: persist-credentials: false - name: Set up Python ${{ env.PYTHON_VERSION }} - uses: actions/setup-python@57ded4d7d5e986d7296eab16560982c6dd7c923b # v4.6.0 + uses: actions/setup-python@d27e3f3d7c64b4bbf8e4abfb9b63b83e846e0435 # v4.5.0 with: python-version: ${{ env.PYTHON_VERSION }} - name: Environment Information diff --git a/.github/workflows/test-internet.yml b/.github/workflows/test-internet.yml index a803f6aacb5ed1..3ecbc5442547da 100644 --- a/.github/workflows/test-internet.yml +++ b/.github/workflows/test-internet.yml @@ -32,11 +32,11 @@ jobs: if: github.repository == 'nodejs/node' || github.event_name != 'schedule' runs-on: ubuntu-latest steps: - - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 with: persist-credentials: false - name: Set up Python ${{ env.PYTHON_VERSION }} - uses: actions/setup-python@57ded4d7d5e986d7296eab16560982c6dd7c923b # v4.6.0 + uses: actions/setup-python@d27e3f3d7c64b4bbf8e4abfb9b63b83e846e0435 # v4.5.0 with: python-version: ${{ env.PYTHON_VERSION }} - name: Environment Information diff --git a/.github/workflows/test-linux.yml b/.github/workflows/test-linux.yml index efa821a4ee09e7..4c8c0787bf4b0f 100644 --- a/.github/workflows/test-linux.yml +++ b/.github/workflows/test-linux.yml @@ -34,11 +34,11 @@ jobs: if: github.event.pull_request.draft == false runs-on: ubuntu-latest steps: - - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 with: persist-credentials: false - name: Set up Python ${{ env.PYTHON_VERSION }} - uses: actions/setup-python@57ded4d7d5e986d7296eab16560982c6dd7c923b # v4.6.0 + uses: actions/setup-python@d27e3f3d7c64b4bbf8e4abfb9b63b83e846e0435 # v4.5.0 with: python-version: ${{ env.PYTHON_VERSION }} - name: Environment Information diff --git a/.github/workflows/test-macos.yml b/.github/workflows/test-macos.yml index b9a44445608ae9..9e9bb3e1b45475 100644 --- a/.github/workflows/test-macos.yml +++ b/.github/workflows/test-macos.yml @@ -40,11 +40,11 @@ jobs: if: github.event.pull_request.draft == false runs-on: macos-latest steps: - - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 with: persist-credentials: false - name: Set up Python ${{ env.PYTHON_VERSION }} - uses: actions/setup-python@57ded4d7d5e986d7296eab16560982c6dd7c923b # v4.6.0 + uses: actions/setup-python@d27e3f3d7c64b4bbf8e4abfb9b63b83e846e0435 # v4.5.0 with: python-version: ${{ env.PYTHON_VERSION }} - name: Environment Information diff --git a/.github/workflows/timezone-update.yml b/.github/workflows/timezone-update.yml index 7846a66d265acd..e3e4b7323f4743 100644 --- a/.github/workflows/timezone-update.yml +++ b/.github/workflows/timezone-update.yml @@ -20,12 +20,12 @@ jobs: steps: - name: Checkout nodejs/node - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 with: persist-credentials: false - name: Checkout unicode-org/icu-data - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 with: path: icu-data persist-credentials: false diff --git a/.github/workflows/tools.yml b/.github/workflows/tools.yml index fdb85b2757fcec..30f9b4fcebceb8 100644 --- a/.github/workflows/tools.yml +++ b/.github/workflows/tools.yml @@ -253,7 +253,7 @@ jobs: tail -n1 temp-output | grep "NEW_VERSION=" >> "$GITHUB_ENV" || true rm temp-output steps: - - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 if: github.event_name == 'schedule' || inputs.id == 'all' || inputs.id == matrix.id with: persist-credentials: false diff --git a/.github/workflows/update-openssl.yml b/.github/workflows/update-openssl.yml index 681629fd00e019..00060b5fdf7dd6 100644 --- a/.github/workflows/update-openssl.yml +++ b/.github/workflows/update-openssl.yml @@ -14,7 +14,7 @@ jobs: if: github.repository == 'nodejs/node' runs-on: ubuntu-latest steps: - - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 with: persist-credentials: false - name: Check if update branch already exists diff --git a/.github/workflows/update-v8.yml b/.github/workflows/update-v8.yml index 8731869b2c136a..5b7e11303e0edc 100644 --- a/.github/workflows/update-v8.yml +++ b/.github/workflows/update-v8.yml @@ -16,7 +16,7 @@ jobs: if: github.repository == 'nodejs/node' runs-on: ubuntu-latest steps: - - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 with: persist-credentials: false - name: Cache node modules and update-v8 diff --git a/BUILDING.md b/BUILDING.md index f5a646eade3973..6a6bf24194ce88 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -118,7 +118,7 @@ platforms. This is true regardless of entries in the table below. | macOS | arm64 | >= 11 | Tier 1 | | | SmartOS | x64 | >= 18 | Tier 2 | | | AIX | ppc64be >=power8 | >= 7.2 TL04 | Tier 2 | | -| FreeBSD | x64 | >= 12.4 | Experimental | | +| FreeBSD | x64 | >= 12.2 | Experimental | | [^1]: Older kernel versions may work. However official Node.js release binaries are [built on RHEL 8 systems](#official-binary-platforms-and-toolchains) @@ -213,9 +213,10 @@ Supported platforms and toolchains change with each major version of Node.js. This document is only valid for the current major version of Node.js. Consult previous versions of this document for older versions of Node.js: -* [Node.js 19](https://github.com/nodejs/node/blob/v19.x/BUILDING.md) -* [Node.js 18](https://github.com/nodejs/node/blob/v18.x/BUILDING.md) +* [Node.js 17](https://github.com/nodejs/node/blob/v17.x/BUILDING.md) * [Node.js 16](https://github.com/nodejs/node/blob/v16.x/BUILDING.md) +* [Node.js 14](https://github.com/nodejs/node/blob/v14.x/BUILDING.md) +* [Node.js 12](https://github.com/nodejs/node/blob/v12.x/BUILDING.md) ## Building Node.js on supported platforms diff --git a/CHANGELOG.md b/CHANGELOG.md index 33c8c048927ec9..76044836ad39f0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -37,8 +37,7 @@ release. -20.1.0
-20.0.0
+20.0.0
19.9.0
diff --git a/README.md b/README.md index 809d1f0c157ce6..9d4f7b69577fd8 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ Looking for help? Check out the * **Current**: Under active development. Code for the Current release is in the branch for its major version number (for example, - [v19.x](https://github.com/nodejs/node/tree/v19.x)). Node.js releases a new + [v15.x](https://github.com/nodejs/node/tree/v15.x)). Node.js releases a new major version every 6 months, allowing for breaking changes. This happens in April and October every year. Releases appearing each October have a support life of 8 months. Releases appearing each April convert to LTS (see below) @@ -74,8 +74,8 @@ Binaries, installers, and source tarballs are available at The [latest](https://nodejs.org/download/release/latest/) directory is an alias for the latest Current release. The latest-_codename_ directory is an alias for the latest release from an LTS line. For example, the -[latest-hydrogen](https://nodejs.org/download/release/latest-hydrogen/) -directory contains the latest Hydrogen (Node.js 18) release. +[latest-fermium](https://nodejs.org/download/release/latest-fermium/) directory +contains the latest Fermium (Node.js 14) release. #### Nightly releases @@ -411,8 +411,6 @@ For information about the governance of the Node.js project, see **Brian White** <> * [MylesBorins](https://github.com/MylesBorins) - **Myles Borins** <> (he/him) -* [ovflowd](https://github.com/ovflowd) - - **Claudio Wunder** <> (he/they) * [oyyd](https://github.com/oyyd) - **Ouyang Yadong** <> (he/him) * [panva](https://github.com/panva) - diff --git a/common.gypi b/common.gypi index a94b35dbdd2a27..2104bba30e2ebb 100644 --- a/common.gypi +++ b/common.gypi @@ -36,7 +36,7 @@ # Reset this number to 0 on major V8 upgrades. # Increment by one for each non-official patch applied to deps/v8. - 'v8_embedder_string': '-node.7', + 'v8_embedder_string': '-node.6', ##### V8 defaults for Node.js ##### diff --git a/configure.py b/configure.py index 83a6faead7613d..5a4066524cd488 100755 --- a/configure.py +++ b/configure.py @@ -12,12 +12,11 @@ import shutil import bz2 import io -from pathlib import Path from distutils.version import StrictVersion # If not run from node/, cd to node/. -os.chdir(Path(__file__).parent) +os.chdir(os.path.dirname(__file__) or '.') original_argv = sys.argv[1:] @@ -26,13 +25,11 @@ CC = os.environ.get('CC', 'cc' if sys.platform == 'darwin' else 'gcc') CXX = os.environ.get('CXX', 'c++' if sys.platform == 'darwin' else 'g++') -tools_path = Path('tools') - -sys.path.insert(0, str(tools_path / 'gyp' / 'pylib')) +sys.path.insert(0, os.path.join('tools', 'gyp', 'pylib')) from gyp.common import GetFlavor # imports in tools/configure.d -sys.path.insert(0, str(tools_path / 'configure.d')) +sys.path.insert(0, os.path.join('tools', 'configure.d')) import nodedownload # imports in tools/ @@ -56,7 +53,8 @@ valid_mips_fpu = ('fp32', 'fp64', 'fpxx') valid_mips_float_abi = ('soft', 'hard') valid_intl_modes = ('none', 'small-icu', 'full-icu', 'system-icu') -icu_versions = json.loads((tools_path / 'icu' / 'icu_versions.json').read_text(encoding='utf-8')) +with open('tools/icu/icu_versions.json', encoding='utf-8') as f: + icu_versions = json.load(f) shareable_builtins = {'cjs_module_lexer/lexer': 'deps/cjs-module-lexer/lexer.js', 'cjs_module_lexer/dist/lexer': 'deps/cjs-module-lexer/dist/lexer.js', @@ -841,7 +839,7 @@ (options, args) = parser.parse_known_args() # Expand ~ in the install prefix now, it gets written to multiple files. -options.prefix = str(Path(options.prefix or '').expanduser()) +options.prefix = os.path.expanduser(options.prefix or '') # set up auto-download list auto_downloads = nodedownload.parse(options.download_list) @@ -1201,7 +1199,7 @@ def configure_zos(o): o['variables']['node_static_zoslib'] = b(True) if options.static_zoslib_gyp: # Apply to all Node.js components for now - o['variables']['zoslib_include_dir'] = Path(options.static_zoslib_gyp).parent + '/include' + o['variables']['zoslib_include_dir'] = os.path.dirname(options.static_zoslib_gyp) + '/include' o['include_dirs'] += [o['variables']['zoslib_include_dir']] else: raise Exception('--static-zoslib-gyp= is required.') @@ -1605,7 +1603,7 @@ def configure_static(o): def write(filename, data): print_verbose(f'creating {filename}') - with Path(filename).open(mode='w+', encoding='utf-8') as f: + with open(filename, 'w+', encoding='utf-8') as f: f.write(data) do_not_edit = '# Do not edit. Generated by the configure script.\n' @@ -1621,8 +1619,8 @@ def glob_to_var(dir_base, dir_sub, patch_dir): # srcfile uses "slash" as dir separator as its output is consumed by gyp srcfile = f'{dir_sub}/{file}' if patch_dir: - patchfile = Path(dir_base, patch_dir, file) - if patchfile.is_file(): + patchfile = f'{dir_base}{patch_dir}{file}' + if os.path.isfile(patchfile): srcfile = f'{patch_dir}/{file}' info(f'Using floating patch "{patchfile}" from "{dir_base}"') file_list.append(srcfile) @@ -1631,8 +1629,9 @@ def glob_to_var(dir_base, dir_sub, patch_dir): def configure_intl(o): def icu_download(path): - depFile = tools_path / 'icu' / 'current_ver.dep' - icus = json.loads(depFile.read_text(encoding='utf-8')) + depFile = 'tools/icu/current_ver.dep' + with open(depFile, encoding='utf-8') as f: + icus = json.load(f) # download ICU, if needed if not os.access(options.download_path, os.W_OK): error('''Cannot write to desired download path. @@ -1647,13 +1646,13 @@ def icu_download(path): For the entry {url}, Expected one of these keys: {' '.join(allAlgos)}''') local = url.split('/')[-1] - targetfile = Path(options.download_path, local) - if not targetfile.is_file(): + targetfile = os.path.join(options.download_path, local) + if not os.path.isfile(targetfile): if attemptdownload: nodedownload.retrievefile(url, targetfile) else: print(f'Re-using existing {targetfile}') - if targetfile.is_file(): + if os.path.isfile(targetfile): print(f'Checking file integrity with {hashAlgo}:\r') gotHash = nodedownload.checkHash(targetfile, hashAlgo) print(f'{hashAlgo}: {gotHash} {targetfile}') @@ -1740,15 +1739,14 @@ def icu_download(path): icu_full_path = icu_deps_path # icu-tmp is used to download and unpack the ICU tarball. - icu_tmp_path = Path(icu_parent_path, 'icu-tmp') + icu_tmp_path = os.path.join(icu_parent_path, 'icu-tmp') # canned ICU. see tools/icu/README.md to update. canned_icu_dir = 'deps/icu-small' # use the README to verify what the canned ICU is - canned_icu_path = Path(canned_icu_dir) - canned_is_full = (canned_icu_path / 'README-FULL-ICU.txt').is_file() - canned_is_small = (canned_icu_path / 'README-SMALL-ICU.txt').is_file() + canned_is_full = os.path.isfile(os.path.join(canned_icu_dir, 'README-FULL-ICU.txt')) + canned_is_small = os.path.isfile(os.path.join(canned_icu_dir, 'README-SMALL-ICU.txt')) if canned_is_small: warn(f'Ignoring {canned_icu_dir} - in-repo small icu is no longer supported.') @@ -1768,39 +1766,39 @@ def icu_download(path): icu_config['variables']['icu_full_canned'] = 1 # --with-icu-source processing # now, check that they didn't pass --with-icu-source=deps/icu - elif with_icu_source and Path(icu_full_path).resolve() == Path(with_icu_source).resolve(): + elif with_icu_source and os.path.abspath(icu_full_path) == os.path.abspath(with_icu_source): warn(f'Ignoring redundant --with-icu-source={with_icu_source}') with_icu_source = None # if with_icu_source is still set, try to use it. if with_icu_source: - if Path(icu_full_path).is_dir(): + if os.path.isdir(icu_full_path): print(f'Deleting old ICU source: {icu_full_path}') shutil.rmtree(icu_full_path) # now, what path was given? - if Path(with_icu_source).is_dir(): + if os.path.isdir(with_icu_source): # it's a path. Copy it. print(f'{with_icu_source} -> {icu_full_path}') shutil.copytree(with_icu_source, icu_full_path) else: # could be file or URL. # Set up temporary area - if Path(icu_tmp_path).is_dir(): + if os.path.isdir(icu_tmp_path): shutil.rmtree(icu_tmp_path) - icu_tmp_path.mkdir() + os.mkdir(icu_tmp_path) icu_tarball = None - if Path(with_icu_source).is_file(): + if os.path.isfile(with_icu_source): # it's a file. Try to unpack it. icu_tarball = with_icu_source else: # Can we download it? - local = icu_tmp_path / with_icu_source.split('/')[-1] # local part + local = os.path.join(icu_tmp_path, with_icu_source.split('/')[-1]) # local part icu_tarball = nodedownload.retrievefile(with_icu_source, local) # continue with "icu_tarball" nodedownload.unpack(icu_tarball, icu_tmp_path) # Did it unpack correctly? Should contain 'icu' - tmp_icu = icu_tmp_path / 'icu' - if tmp_icu.is_dir(): - tmp_icu.rename(icu_full_path) + tmp_icu = os.path.join(icu_tmp_path, 'icu') + if os.path.isdir(tmp_icu): + os.rename(tmp_icu, icu_full_path) shutil.rmtree(icu_tmp_path) else: shutil.rmtree(icu_tmp_path) @@ -1810,22 +1808,22 @@ def icu_download(path): o['variables']['icu_gyp_path'] = 'tools/icu/icu-generic.gyp' # ICU source dir relative to tools/icu (for .gyp file) o['variables']['icu_path'] = icu_full_path - if not Path(icu_full_path).is_dir(): + if not os.path.isdir(icu_full_path): # can we download (or find) a zipfile? localzip = icu_download(icu_full_path) if localzip: nodedownload.unpack(localzip, icu_parent_path) else: - warn(f"* ECMA-402 (Intl) support didn't find ICU in {icu_full_path}..") - if not Path(icu_full_path).is_dir(): + warn("* ECMA-402 (Intl) support didn't find ICU in {icu_full_path}..") + if not os.path.isdir(icu_full_path): error(f'''Cannot build Intl without ICU in {icu_full_path}. Fix, or disable with "--with-intl=none"''') else: print_verbose(f'* Using ICU in {icu_full_path}') # Now, what version of ICU is it? We just need the "major", such as 54. # uvernum.h contains it as a #define. - uvernum_h = Path(icu_full_path, 'source', 'common', 'unicode', 'uvernum.h') - if not uvernum_h.is_file(): + uvernum_h = os.path.join(icu_full_path, 'source/common/unicode/uvernum.h') + if not os.path.isfile(uvernum_h): error(f'Could not load {uvernum_h} - is ICU installed?') icu_ver_major = None matchVerExp = r'^\s*#define\s+U_ICU_VERSION_SHORT\s+"([^"]*)".*' @@ -1845,15 +1843,17 @@ def icu_download(path): icu_data_file_l = f'icudt{icu_ver_major}l.dat' # LE filename icu_data_file = f'icudt{icu_ver_major}{icu_endianness}.dat' # relative to configure - icu_data_path = Path(icu_full_path, 'source', 'data', 'in', icu_data_file_l) # LE + icu_data_path = os.path.join(icu_full_path, + 'source/data/in', + icu_data_file_l) # LE compressed_data = f'{icu_data_path}.bz2' - if not icu_data_path.is_file() and Path(compressed_data).is_file(): + if not os.path.isfile(icu_data_path) and os.path.isfile(compressed_data): # unpack. deps/icu is a temporary path - if icu_tmp_path.is_dir(): + if os.path.isdir(icu_tmp_path): shutil.rmtree(icu_tmp_path) - icu_tmp_path.mkdir() - icu_data_path = icu_tmp_path / icu_data_file_l - with icu_data_path.open(mode='wb') as outf: + os.mkdir(icu_tmp_path) + icu_data_path = os.path.join(icu_tmp_path, icu_data_file_l) + with open(icu_data_path, 'wb') as outf: inf = bz2.BZ2File(compressed_data, 'rb') try: shutil.copyfileobj(inf, outf) @@ -1862,18 +1862,20 @@ def icu_download(path): # Now, proceed.. # relative to dep.. - icu_data_in = Path('..', '..', icu_data_path) - if not icu_data_path.is_file() and icu_endianness != 'l': + icu_data_in = os.path.join('..', '..', icu_data_path) + if not os.path.isfile(icu_data_path) and icu_endianness != 'l': # use host endianness - icu_data_path = Path(icu_full_path, 'source', 'data', 'in', icu_data_file) # will be generated - if not icu_data_path.is_file(): + icu_data_path = os.path.join(icu_full_path, + 'source/data/in', + icu_data_file) # will be generated + if not os.path.isfile(icu_data_path): # .. and we're not about to build it from .gyp! error(f'''ICU prebuilt data file {icu_data_path} does not exist. See the README.md.''') # this is the input '.dat' file to use .. icudt*.dat # may be little-endian if from a icu-project.org tarball - o['variables']['icu_data_in'] = str(icu_data_in) + o['variables']['icu_data_in'] = icu_data_in # map from variable name to subdirs icu_src = { @@ -1971,16 +1973,16 @@ def make_bin_override(): os.path.realpath(which_python) == os.path.realpath(sys.executable)): return - bin_override = Path('out', 'tools', 'bin').resolve() + bin_override = os.path.abspath('out/tools/bin') try: - bin_override.mkdir(parents=True) + os.makedirs(bin_override) except OSError as e: if e.errno != errno.EEXIST: raise e - python_link = bin_override / 'python' + python_link = os.path.join(bin_override, 'python') try: - python_link.unlink() + os.unlink(python_link) except OSError as e: if e.errno != errno.ENOENT: raise e @@ -1989,7 +1991,7 @@ def make_bin_override(): # We need to set the environment right now so that when gyp (in run_gyp) # shells out, it finds the right python (specifically at # https://github.com/nodejs/node/blob/d82e107/deps/v8/gypfiles/toolchain.gypi#L43) - os.environ['PATH'] = str(bin_override) + ':' + os.environ['PATH'] + os.environ['PATH'] = bin_override + ':' + os.environ['PATH'] return bin_override @@ -2068,7 +2070,7 @@ def make_bin_override(): write('config.status', '#!/bin/sh\nset -x\nexec ./configure ' + ' '.join([shlex.quote(arg) for arg in original_argv]) + '\n') -Path('config.status').chmod(0o775) +os.chmod('config.status', 0o775) config = { @@ -2098,7 +2100,7 @@ def make_bin_override(): # On Windows there's no reason to search for a different python binary. bin_override = None if sys.platform == 'win32' else make_bin_override() if bin_override: - config_str = 'export PATH:=' + str(bin_override) + ':$(PATH)\n' + config_str + config_str = 'export PATH:=' + bin_override + ':$(PATH)\n' + config_str write('config.mk', do_not_edit + config_str) diff --git a/deps/ada/ada.cpp b/deps/ada/ada.cpp index 7a46eda81c715e..dc090542e3e1a5 100644 --- a/deps/ada/ada.cpp +++ b/deps/ada/ada.cpp @@ -1,4 +1,4 @@ -/* auto-generated on 2023-05-05 22:58:51 -0400. Do not edit! */ +/* auto-generated on 2023-04-26 16:43:37 -0400. Do not edit! */ /* begin file src/ada.cpp */ #include "ada.h" /* begin file src/checkers.cpp */ @@ -10410,19 +10410,6 @@ std::string href_from_file(std::string_view input) { return "file://" + path; } -bool can_parse(std::string_view input, std::string_view* base_input = nullptr) { - ada::result base; - ada::url_aggregator* base_pointer = nullptr; - if (base_input != nullptr) { - base = ada::parse(*base_input); - if (!base) { - return false; - } - base_pointer = &base.value(); - } - return ada::parse(input, base_pointer).has_value(); -} - ada_warn_unused std::string to_string(ada::encoding_type type) { switch (type) { case ada::encoding_type::UTF8: @@ -10549,9 +10536,8 @@ ada_really_inline bool shorten_path(std::string& path, } // Remove path’s last item, if any. - size_t last_delimiter = path.rfind('/'); - if (last_delimiter != std::string::npos) { - path.erase(last_delimiter); + if (!path.empty()) { + path.erase(path.rfind('/')); return true; } @@ -10578,8 +10564,8 @@ ada_really_inline bool shorten_path(std::string_view& path, size_t slash_loc = path.rfind('/'); if (slash_loc != std::string_view::npos) { path.remove_suffix(path.size() - slash_loc); - return true; } + return true; } return false; @@ -10943,9 +10929,8 @@ ada_really_inline void parse_prepared_path(std::string_view input, input.substr(previous_location, new_location - previous_location); previous_location = new_location + 1; if (path_view == "..") { - size_t last_delimiter = path.rfind('/'); - if (last_delimiter != std::string::npos) { - path.erase(last_delimiter); + if (!path.empty()) { + path.erase(path.rfind('/')); } } else if (path_view != ".") { path += '/'; @@ -10976,8 +10961,8 @@ ada_really_inline void parse_prepared_path(std::string_view input, ? path_buffer_tmp : path_view; if (unicode::is_double_dot_path_segment(path_buffer)) { - if ((helpers::shorten_path(path, type) || special) && - location == std::string_view::npos) { + helpers::shorten_path(path, type); + if (location == std::string_view::npos) { path += '/'; } } else if (unicode::is_single_dot_path_segment(path_buffer) && @@ -12088,9 +12073,9 @@ result_type parse_url(std::string_view user_input, std::string_view::size_type(std::numeric_limits::max)) { url.is_valid = false; } - // Going forward, user_input.size() is in [0, - // std::numeric_limits::max). If we are provided with an invalid - // base, or the optional_url was invalid, we must return. + + // If we are provided with an invalid base, or the optional_url was invalid, + // we must return. if (base_url != nullptr) { url.is_valid &= base_url->is_valid; } @@ -12107,11 +12092,8 @@ result_type parse_url(std::string_view user_input, // it may not matter, but in other instances, it could. //// // This rounds up to the next power of two. - // We know that user_input.size() is in [0, - // std::numeric_limits::max). uint32_t reserve_capacity = - (0xFFFFFFFF >> - helpers::leading_zeroes(uint32_t(1 | user_input.size()))) + + (0xFFFFFFFF >> helpers::leading_zeroes(uint32_t(user_input.size()))) + 1; url.reserve(reserve_capacity); // @@ -12469,8 +12451,6 @@ result_type parse_url(std::string_view user_input, url.password = base_url->password; url.host = base_url->host; url.port = base_url->port; - // cloning the base path includes cloning the has_opaque_path flag - url.has_opaque_path = base_url->has_opaque_path; url.path = base_url->path; url.query = base_url->query; } else { @@ -12480,8 +12460,6 @@ result_type parse_url(std::string_view user_input, // update_base_hostname url.set_hostname(base_url->get_hostname()); url.update_base_port(base_url->retrieve_base_port()); - // cloning the base path includes cloning the has_opaque_path flag - url.has_opaque_path = base_url->has_opaque_path; url.update_base_pathname(base_url->get_pathname()); url.update_base_search(base_url->get_search()); } @@ -12913,6 +12891,7 @@ result_type parse_url(std::string_view user_input, else if (input_position != input_size) { // Set url’s query to null. url.clear_search(); + // If the code point substring from pointer to the end of input does // not start with a Windows drive letter, then shorten url’s path. if (!checkers::is_windows_drive_letter(file_view)) { @@ -14735,9 +14714,8 @@ inline void url_aggregator::consume_prepared_path(std::string_view input) { input.substr(previous_location, new_location - previous_location); previous_location = new_location + 1; if (path_view == "..") { - size_t last_delimiter = path.rfind('/'); - if (last_delimiter != std::string::npos) { - path.erase(last_delimiter); + if (!path.empty()) { + path.erase(path.rfind('/')); } } else if (path_view != ".") { path += '/'; @@ -14768,8 +14746,8 @@ inline void url_aggregator::consume_prepared_path(std::string_view input) { ? path_buffer_tmp : path_view; if (unicode::is_double_dot_path_segment(path_buffer)) { - if ((helpers::shorten_path(path, type) || special) && - location == std::string_view::npos) { + helpers::shorten_path(path, type); + if (location == std::string_view::npos) { path += '/'; } } else if (unicode::is_single_dot_path_segment(path_buffer) && diff --git a/deps/ada/ada.h b/deps/ada/ada.h index 7aba19de4ab9e0..296547569f9b44 100644 --- a/deps/ada/ada.h +++ b/deps/ada/ada.h @@ -1,4 +1,4 @@ -/* auto-generated on 2023-05-05 22:58:51 -0400. Do not edit! */ +/* auto-generated on 2023-04-26 16:43:37 -0400. Do not edit! */ /* begin file include/ada.h */ /** * @file ada.h @@ -5398,7 +5398,9 @@ size_t url::get_pathname_length() const noexcept { return path.size(); } out.pathname_start = uint32_t(running_index); - running_index += path.size(); + if (!path.empty()) { + running_index += path.size(); + } if (query.has_value()) { out.search_start = uint32_t(running_index); @@ -6473,14 +6475,14 @@ inline std::ostream &operator<<(std::ostream &out, #ifndef ADA_ADA_VERSION_H #define ADA_ADA_VERSION_H -#define ADA_VERSION "2.3.1" +#define ADA_VERSION "2.3.0" namespace ada { enum { ADA_VERSION_MAJOR = 2, ADA_VERSION_MINOR = 3, - ADA_VERSION_REVISION = 1, + ADA_VERSION_REVISION = 0, }; } // namespace ada @@ -6524,12 +6526,6 @@ extern template ada::result parse(std::string_view input, extern template ada::result parse( std::string_view input, const url_aggregator* base_url); -/** - * @see https://url.spec.whatwg.org/#dom-url-canparse - * @return If URL can be parsed or not. - */ -bool can_parse(std::string_view input, std::string_view* base_input); - /** * Computes a href string from a file path. * @return a href string (starts with file:://) diff --git a/deps/npm/docs/content/commands/npm-ci.md b/deps/npm/docs/content/commands/npm-ci.md index 5757bf1b29431c..48c018e0502b87 100644 --- a/deps/npm/docs/content/commands/npm-ci.md +++ b/deps/npm/docs/content/commands/npm-ci.md @@ -72,6 +72,40 @@ cache: ### Configuration +#### `save` + +* Default: `true` unless when using `npm update` where it defaults to `false` +* Type: Boolean + +Save installed packages to a `package.json` file as dependencies. + +When used with the `npm rm` command, removes the dependency from +`package.json`. + +Will also prevent writing to `package-lock.json` if set to `false`. + +#### `save-exact` + +* Default: false +* Type: Boolean + +Dependencies saved to package.json will be configured with an exact version +rather than using npm's default semver range operator. + +#### `global` + +* Default: false +* Type: Boolean + +Operates in "global" mode, so that packages are installed into the `prefix` +folder instead of the current working directory. See +[folders](/configuring-npm/folders) for more on the differences in behavior. + +* packages are installed into the `{prefix}/lib/node_modules` folder, instead + of the current working directory. +* bin files are linked to `{prefix}/bin` +* man pages are linked to `{prefix}/share/man` + #### `install-strategy` * Default: "hoisted" diff --git a/deps/npm/docs/content/commands/npm-config.md b/deps/npm/docs/content/commands/npm-config.md index 69370fd5deba2d..fe87abac903e8a 100644 --- a/deps/npm/docs/content/commands/npm-config.md +++ b/deps/npm/docs/content/commands/npm-config.md @@ -46,7 +46,7 @@ npm set key=value [key=value...] Sets each of the config keys to the value provided. -If value is omitted, the key will be removed from your config file entirely. +If value is omitted, then it sets it to an empty string. Note: for backwards compatibility, `npm config set key value` is supported as an alias for `npm config set key=value`. diff --git a/deps/npm/docs/content/commands/npm-install-ci-test.md b/deps/npm/docs/content/commands/npm-install-ci-test.md index c5fe98be705fcc..5a8095787a1708 100644 --- a/deps/npm/docs/content/commands/npm-install-ci-test.md +++ b/deps/npm/docs/content/commands/npm-install-ci-test.md @@ -18,6 +18,40 @@ This command runs `npm ci` followed immediately by `npm test`. ### Configuration +#### `save` + +* Default: `true` unless when using `npm update` where it defaults to `false` +* Type: Boolean + +Save installed packages to a `package.json` file as dependencies. + +When used with the `npm rm` command, removes the dependency from +`package.json`. + +Will also prevent writing to `package-lock.json` if set to `false`. + +#### `save-exact` + +* Default: false +* Type: Boolean + +Dependencies saved to package.json will be configured with an exact version +rather than using npm's default semver range operator. + +#### `global` + +* Default: false +* Type: Boolean + +Operates in "global" mode, so that packages are installed into the `prefix` +folder instead of the current working directory. See +[folders](/configuring-npm/folders) for more on the differences in behavior. + +* packages are installed into the `{prefix}/lib/node_modules` folder, instead + of the current working directory. +* bin files are linked to `{prefix}/bin` +* man pages are linked to `{prefix}/share/man` + #### `install-strategy` * Default: "hoisted" diff --git a/deps/npm/docs/content/commands/npm-ls.md b/deps/npm/docs/content/commands/npm-ls.md index b712738b3dd294..5fd8b033c91182 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.4 /path/to/npm └─┬ init-package-json@0.0.4 └── promzard@0.1.5 ``` diff --git a/deps/npm/docs/content/commands/npm-publish.md b/deps/npm/docs/content/commands/npm-publish.md index 334209490b2492..ec1cf3755b7360 100644 --- a/deps/npm/docs/content/commands/npm-publish.md +++ b/deps/npm/docs/content/commands/npm-publish.md @@ -199,8 +199,7 @@ This value is not exported to the environment for child processes. * Default: false * Type: Boolean -When publishing from a supported cloud CI/CD system, the package will be -publicly linked to where it was built and published from. +Indicates that a provenance statement should be generated. ### See Also diff --git a/deps/npm/docs/content/commands/npm.md b/deps/npm/docs/content/commands/npm.md index 91356999e3a8d7..579b7771c01b5a 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.4 ### Description diff --git a/deps/npm/docs/content/configuring-npm/folders.md b/deps/npm/docs/content/configuring-npm/folders.md index b15a5a94210027..6f230539ddd961 100644 --- a/deps/npm/docs/content/configuring-npm/folders.md +++ b/deps/npm/docs/content/configuring-npm/folders.md @@ -72,7 +72,7 @@ Man pages are not installed on Windows systems. #### Cache See [`npm cache`](/commands/npm-cache). Cache files are stored in `~/.npm` on Posix, or -`%LocalAppData%/npm-cache` on Windows. +`%AppData%/npm-cache` on Windows. This is controlled by the [`cache` config](/using-npm/config#cache) param. diff --git a/deps/npm/docs/content/using-npm/config.md b/deps/npm/docs/content/using-npm/config.md index ae46b1eb438e2f..9352491221e705 100644 --- a/deps/npm/docs/content/using-npm/config.md +++ b/deps/npm/docs/content/using-npm/config.md @@ -1010,8 +1010,7 @@ Set to `false` to suppress the progress bar. * Default: false * Type: Boolean -When publishing from a supported cloud CI/CD system, the package will be -publicly linked to where it was built and published from. +Indicates that a provenance statement should be generated. #### `proxy` diff --git a/deps/npm/docs/output/commands/npm-ci.html b/deps/npm/docs/output/commands/npm-ci.html index 12dc2c58a75632..cd2c21a3c215b6 100644 --- a/deps/npm/docs/output/commands/npm-ci.html +++ b/deps/npm/docs/output/commands/npm-ci.html @@ -142,7 +142,7 @@

npm-ci

Table of contents

- +

Synopsis

@@ -196,6 +196,36 @@

Example

- "$HOME/.npm"

Configuration

+

save

+
    +
  • Default: true unless when using npm update where it defaults to false
  • +
  • Type: Boolean
  • +
+

Save installed packages to a package.json file as dependencies.

+

When used with the npm rm command, removes the dependency from +package.json.

+

Will also prevent writing to package-lock.json if set to false.

+

save-exact

+
    +
  • Default: false
  • +
  • Type: Boolean
  • +
+

Dependencies saved to package.json will be configured with an exact version +rather than using npm's default semver range operator.

+

global

+
    +
  • Default: false
  • +
  • Type: Boolean
  • +
+

Operates in "global" mode, so that packages are installed into the prefix +folder instead of the current working directory. See +folders for more on the differences in behavior.

+
    +
  • packages are installed into the {prefix}/lib/node_modules folder, instead +of the current working directory.
  • +
  • bin files are linked to {prefix}/bin
  • +
  • man pages are linked to {prefix}/share/man
  • +

install-strategy

  • Default: "hoisted"
  • diff --git a/deps/npm/docs/output/commands/npm-config.html b/deps/npm/docs/output/commands/npm-config.html index d4c8bb541a7751..33195d8d035b39 100644 --- a/deps/npm/docs/output/commands/npm-config.html +++ b/deps/npm/docs/output/commands/npm-config.html @@ -172,7 +172,7 @@

    set

    npm set key=value [key=value...]

    Sets each of the config keys to the value provided.

    -

    If value is omitted, the key will be removed from your config file entirely.

    +

    If value is omitted, then it sets it to an empty string.

    Note: for backwards compatibility, npm config set key value is supported as an alias for npm config set key=value.

    get

    diff --git a/deps/npm/docs/output/commands/npm-install-ci-test.html b/deps/npm/docs/output/commands/npm-install-ci-test.html index 1afa069a3dc259..20b001f4e856b6 100644 --- a/deps/npm/docs/output/commands/npm-install-ci-test.html +++ b/deps/npm/docs/output/commands/npm-install-ci-test.html @@ -142,7 +142,7 @@

    npm-install-ci-test

    Table of contents

    - +

    Synopsis

    @@ -153,6 +153,36 @@

    Table of contents

    Description

    This command runs npm ci followed immediately by npm test.

    Configuration

    +

    save

    +
      +
    • Default: true unless when using npm update where it defaults to false
    • +
    • Type: Boolean
    • +
    +

    Save installed packages to a package.json file as dependencies.

    +

    When used with the npm rm command, removes the dependency from +package.json.

    +

    Will also prevent writing to package-lock.json if set to false.

    +

    save-exact

    +
      +
    • Default: false
    • +
    • Type: Boolean
    • +
    +

    Dependencies saved to package.json will be configured with an exact version +rather than using npm's default semver range operator.

    +

    global

    +
      +
    • Default: false
    • +
    • Type: Boolean
    • +
    +

    Operates in "global" mode, so that packages are installed into the prefix +folder instead of the current working directory. See +folders for more on the differences in behavior.

    +
      +
    • packages are installed into the {prefix}/lib/node_modules folder, instead +of the current working directory.
    • +
    • bin files are linked to {prefix}/bin
    • +
    • man pages are linked to {prefix}/share/man
    • +

    install-strategy

    • Default: "hoisted"
    • diff --git a/deps/npm/docs/output/commands/npm-ls.html b/deps/npm/docs/output/commands/npm-ls.html index 5fa3e0c1cc9430..fc3101558f5097 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@9.6.6 /path/to/npm
      +
      npm@9.6.4 /path/to/npm
       └─┬ init-package-json@0.0.4
         └── promzard@0.1.5
       
      diff --git a/deps/npm/docs/output/commands/npm-publish.html b/deps/npm/docs/output/commands/npm-publish.html index 6ebc39d6274a1d..000fc787123007 100644 --- a/deps/npm/docs/output/commands/npm-publish.html +++ b/deps/npm/docs/output/commands/npm-publish.html @@ -311,8 +311,7 @@

      provenance

    • Default: false
    • Type: Boolean
    -

    When publishing from a supported cloud CI/CD system, the package will be -publicly linked to where it was built and published from.

    +

    Indicates that a provenance statement should be generated.

    See Also

    • package spec
    • diff --git a/deps/npm/docs/output/commands/npm.html b/deps/npm/docs/output/commands/npm.html index 18c1361e596677..72218f072d68ae 100644 --- a/deps/npm/docs/output/commands/npm.html +++ b/deps/npm/docs/output/commands/npm.html @@ -150,7 +150,7 @@

      Table of contents

      Note: This command is unaware of workspaces.

      Version

      -

      9.6.6

      +

      9.6.4

      Description

      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/folders.html b/deps/npm/docs/output/configuring-npm/folders.html index cb97ac6ad25326..e0ebcb5cc08453 100644 --- a/deps/npm/docs/output/configuring-npm/folders.html +++ b/deps/npm/docs/output/configuring-npm/folders.html @@ -194,7 +194,7 @@

      Man Pages

      Man pages are not installed on Windows systems.

      Cache

      See npm cache. Cache files are stored in ~/.npm on Posix, or -%LocalAppData%/npm-cache on Windows.

      +%AppData%/npm-cache on Windows.

      This is controlled by the cache config param.

      Temp Files

      Temporary files are stored by default in the folder specified by the diff --git a/deps/npm/docs/output/using-npm/config.html b/deps/npm/docs/output/using-npm/config.html index 5d62af0a4c8384..3887fe1a564e4f 100644 --- a/deps/npm/docs/output/using-npm/config.html +++ b/deps/npm/docs/output/using-npm/config.html @@ -994,8 +994,7 @@

      provenance

    • Default: false
    • Type: Boolean
    -

    When publishing from a supported cloud CI/CD system, the package will be -publicly linked to where it was built and published from.

    +

    Indicates that a provenance statement should be generated.

    proxy

    • Default: null
    • diff --git a/deps/npm/lib/commands/audit.js b/deps/npm/lib/commands/audit.js index 7b75ecbf2e0243..dab871669eba59 100644 --- a/deps/npm/lib/commands/audit.js +++ b/deps/npm/lib/commands/audit.js @@ -1,3 +1,4 @@ +const Arborist = require('@npmcli/arborist') const auditReport = require('npm-audit-report') const fetch = require('npm-registry-fetch') const localeCompare = require('@isaacs/string-locale-compare')('en') @@ -412,7 +413,6 @@ class Audit extends ArboristWorkspaceCmd { async auditAdvisories (args) { const reporter = this.npm.config.get('json') ? 'json' : 'detail' - const Arborist = require('@npmcli/arborist') const opts = { ...this.npm.flatOptions, audit: true, @@ -445,7 +445,6 @@ class Audit extends ArboristWorkspaceCmd { } log.verbose('loading installed dependencies') - const Arborist = require('@npmcli/arborist') const opts = { ...this.npm.flatOptions, path: this.npm.prefix, diff --git a/deps/npm/lib/commands/cache.js b/deps/npm/lib/commands/cache.js index 9965f7085d9ad6..0ab40b9ed44a9f 100644 --- a/deps/npm/lib/commands/cache.js +++ b/deps/npm/lib/commands/cache.js @@ -1,4 +1,5 @@ const cacache = require('cacache') +const Arborist = require('@npmcli/arborist') const pacote = require('pacote') const fs = require('fs/promises') const { join } = require('path') @@ -161,7 +162,7 @@ class Cache extends BaseCommand { return pacote.tarball.stream(spec, stream => { stream.resume() return stream.promise() - }, { ...this.npm.flatOptions }) + }, { ...this.npm.flatOptions, Arborist }) })) } diff --git a/deps/npm/lib/commands/ci.js b/deps/npm/lib/commands/ci.js index 97c292e8c53896..4dd7898dc6182a 100644 --- a/deps/npm/lib/commands/ci.js +++ b/deps/npm/lib/commands/ci.js @@ -1,3 +1,4 @@ +const Arborist = require('@npmcli/arborist') const reifyFinish = require('../utils/reify-finish.js') const runScript = require('@npmcli/run-script') const fs = require('fs/promises') @@ -5,27 +6,13 @@ const log = require('../utils/log-shim.js') const validateLockfile = require('../utils/validate-lockfile.js') const ArboristWorkspaceCmd = require('../arborist-cmd.js') +const Install = require('./install.js') class CI extends ArboristWorkspaceCmd { static description = 'Clean install a project' static name = 'ci' - // These are in the order they will show up in when running "-h" - static params = [ - 'install-strategy', - 'legacy-bundling', - 'global-style', - 'omit', - 'strict-peer-deps', - 'package-lock', - 'foreground-scripts', - 'ignore-scripts', - 'audit', - 'bin-links', - 'fund', - 'dry-run', - ...super.params, - ] + static params = Install.params async exec () { if (this.npm.global) { @@ -35,7 +22,6 @@ class CI extends ArboristWorkspaceCmd { } const where = this.npm.prefix - const Arborist = require('@npmcli/arborist') const opts = { ...this.npm.flatOptions, packageLock: true, // npm ci should never skip lock files diff --git a/deps/npm/lib/commands/config.js b/deps/npm/lib/commands/config.js index dfd44015cd0432..ac5a74d01f7de2 100644 --- a/deps/npm/lib/commands/config.js +++ b/deps/npm/lib/commands/config.js @@ -163,13 +163,7 @@ class Config extends BaseCommand { `The \`${baseKey}\` option is deprecated, and can not be set in this way${deprecated}` ) } - - if (val === '') { - this.npm.config.delete(key, where) - } else { - this.npm.config.set(key, val, where) - } - + this.npm.config.set(key, val || '', where) if (!this.npm.config.validate(where)) { log.warn('config', 'omitting invalid config values') } diff --git a/deps/npm/lib/commands/dedupe.js b/deps/npm/lib/commands/dedupe.js index d4e8d0e8c80c3c..0cc0e80709883d 100644 --- a/deps/npm/lib/commands/dedupe.js +++ b/deps/npm/lib/commands/dedupe.js @@ -1,4 +1,5 @@ // dedupe duplicated packages, or find them in the tree +const Arborist = require('@npmcli/arborist') const reifyFinish = require('../utils/reify-finish.js') const ArboristWorkspaceCmd = require('../arborist-cmd.js') @@ -30,7 +31,6 @@ class Dedupe extends ArboristWorkspaceCmd { const dryRun = this.npm.config.get('dry-run') const where = this.npm.prefix - const Arborist = require('@npmcli/arborist') const opts = { ...this.npm.flatOptions, path: where, diff --git a/deps/npm/lib/commands/diff.js b/deps/npm/lib/commands/diff.js index 3924166af0a886..1f4bfd3eb11512 100644 --- a/deps/npm/lib/commands/diff.js +++ b/deps/npm/lib/commands/diff.js @@ -2,6 +2,7 @@ const { resolve } = require('path') const semver = require('semver') const libnpmdiff = require('libnpmdiff') const npa = require('npm-package-arg') +const Arborist = require('@npmcli/arborist') const pacote = require('pacote') const pickManifest = require('npm-pick-manifest') const log = require('../utils/log-shim') @@ -145,7 +146,6 @@ class Diff extends BaseCommand { if (spec.registry) { let actualTree let node - const Arborist = require('@npmcli/arborist') try { const opts = { ...this.npm.flatOptions, @@ -257,7 +257,6 @@ class Diff extends BaseCommand { async findVersionsByPackageName (specs) { let actualTree - const Arborist = require('@npmcli/arborist') try { const opts = { ...this.npm.flatOptions, diff --git a/deps/npm/lib/commands/explain.js b/deps/npm/lib/commands/explain.js index a72514fb978055..44c32c0e5663a1 100644 --- a/deps/npm/lib/commands/explain.js +++ b/deps/npm/lib/commands/explain.js @@ -1,4 +1,6 @@ const { explainNode } = require('../utils/explain-dep.js') +const completion = require('../utils/completion/installed-deep.js') +const Arborist = require('@npmcli/arborist') const npa = require('npm-package-arg') const semver = require('semver') const { relative, resolve } = require('path') @@ -19,7 +21,6 @@ class Explain extends ArboristWorkspaceCmd { // TODO /* istanbul ignore next */ async completion (opts) { - const completion = require('../utils/completion/installed-deep.js') return completion(this.npm, opts) } @@ -28,7 +29,6 @@ class Explain extends ArboristWorkspaceCmd { throw this.usageError() } - const Arborist = require('@npmcli/arborist') const arb = new Arborist({ path: this.npm.prefix, ...this.npm.flatOptions }) const tree = await arb.loadActual() diff --git a/deps/npm/lib/commands/fund.js b/deps/npm/lib/commands/fund.js index 1e8981967fc327..479ff487ec8b01 100644 --- a/deps/npm/lib/commands/fund.js +++ b/deps/npm/lib/commands/fund.js @@ -1,10 +1,12 @@ const archy = require('archy') +const Arborist = require('@npmcli/arborist') const pacote = require('pacote') const semver = require('semver') const npa = require('npm-package-arg') const { depth } = require('treeverse') const { readTree: getFundingInfo, normalizeFunding, isValidFunding } = require('libnpmfund') +const completion = require('../utils/completion/installed-deep.js') const openUrl = require('../utils/open-url.js') const ArboristWorkspaceCmd = require('../arborist-cmd.js') @@ -37,7 +39,6 @@ class Fund extends ArboristWorkspaceCmd { // TODO /* istanbul ignore next */ async completion (opts) { - const completion = require('../utils/completion/installed-deep.js') return completion(this.npm, opts) } @@ -63,7 +64,6 @@ class Fund extends ArboristWorkspaceCmd { } const where = this.npm.prefix - const Arborist = require('@npmcli/arborist') const arb = new Arborist({ ...this.npm.flatOptions, path: where }) const tree = await arb.loadActual() @@ -80,7 +80,6 @@ class Fund extends ArboristWorkspaceCmd { // TODO: add !workspacesEnabled option handling to libnpmfund const fundingInfo = getFundingInfo(tree, { ...this.flatOptions, - Arborist, workspaces: this.workspaceNames, }) diff --git a/deps/npm/lib/commands/help-search.js b/deps/npm/lib/commands/help-search.js index 273807c7469af0..0a706be70a0675 100644 --- a/deps/npm/lib/commands/help-search.js +++ b/deps/npm/lib/commands/help-search.js @@ -1,6 +1,6 @@ const { readFile } = require('fs/promises') const path = require('path') -const { glob } = require('glob') +const glob = require('glob') const BaseCommand = require('../base-command.js') const globify = pattern => pattern.split('\\').join('/') diff --git a/deps/npm/lib/commands/help.js b/deps/npm/lib/commands/help.js index 4b40ef37afa2de..d89f3f64363480 100644 --- a/deps/npm/lib/commands/help.js +++ b/deps/npm/lib/commands/help.js @@ -1,7 +1,7 @@ const spawn = require('@npmcli/promise-spawn') const path = require('path') const openUrl = require('../utils/open-url.js') -const { glob } = require('glob') +const glob = require('glob') const localeCompare = require('@isaacs/string-locale-compare')('en') const globify = pattern => pattern.split('\\').join('/') diff --git a/deps/npm/lib/commands/install.js b/deps/npm/lib/commands/install.js index 99f5b326f7b2bf..246d7fdf8f02e0 100644 --- a/deps/npm/lib/commands/install.js +++ b/deps/npm/lib/commands/install.js @@ -5,6 +5,7 @@ const readdir = util.promisify(fs.readdir) const reifyFinish = require('../utils/reify-finish.js') const log = require('../utils/log-shim.js') const { resolve, join } = require('path') +const Arborist = require('@npmcli/arborist') const runScript = require('@npmcli/run-script') const pacote = require('pacote') const checks = require('npm-install-checks') @@ -15,7 +16,6 @@ class Install extends ArboristWorkspaceCmd { static name = 'install' // These are in the order they will show up in when running "-h" - // If adding to this list, consider adding also to ci.js static params = [ 'save', 'save-exact', @@ -135,7 +135,6 @@ class Install extends ArboristWorkspaceCmd { throw this.usageError() } - const Arborist = require('@npmcli/arborist') const opts = { ...this.npm.flatOptions, auditLevel: null, diff --git a/deps/npm/lib/commands/link.js b/deps/npm/lib/commands/link.js index 61ae5a98088684..6d8027f2b9cb68 100644 --- a/deps/npm/lib/commands/link.js +++ b/deps/npm/lib/commands/link.js @@ -3,6 +3,7 @@ const util = require('util') const readdir = util.promisify(fs.readdir) const { resolve } = require('path') +const Arborist = require('@npmcli/arborist') const npa = require('npm-package-arg') const rpj = require('read-package-json-fast') const semver = require('semver') @@ -66,10 +67,8 @@ class Link extends ArboristWorkspaceCmd { // load current packages from the global space, // and then add symlinks installs locally const globalTop = resolve(this.npm.globalDir, '..') - const Arborist = require('@npmcli/arborist') const globalOpts = { ...this.npm.flatOptions, - Arborist, path: globalTop, global: true, prune: false, @@ -139,10 +138,8 @@ class Link extends ArboristWorkspaceCmd { const paths = wsp && wsp.length ? wsp : [this.npm.prefix] const add = paths.map(path => `file:${path.replace(/#/g, '%23')}`) const globalTop = resolve(this.npm.globalDir, '..') - const Arborist = require('@npmcli/arborist') const arb = new Arborist({ ...this.npm.flatOptions, - Arborist, path: globalTop, global: true, }) diff --git a/deps/npm/lib/commands/ls.js b/deps/npm/lib/commands/ls.js index eb9114802d5e0a..a737f44b73b29f 100644 --- a/deps/npm/lib/commands/ls.js +++ b/deps/npm/lib/commands/ls.js @@ -3,9 +3,12 @@ const relativePrefix = `.${sep}` const { EOL } = require('os') const archy = require('archy') +const Arborist = require('@npmcli/arborist') const { breadth } = require('treeverse') const npa = require('npm-package-arg') +const completion = require('../utils/completion/installed-deep.js') + const _depth = Symbol('depth') const _dedupe = Symbol('dedupe') const _filteredBy = Symbol('filteredBy') @@ -41,7 +44,6 @@ class LS extends ArboristWorkspaceCmd { // TODO /* istanbul ignore next */ async completion (opts) { - const completion = require('../utils/completion/installed-deep.js') return completion(this.npm, opts) } @@ -61,8 +63,6 @@ class LS extends ArboristWorkspaceCmd { const path = global ? resolve(this.npm.globalDir, '..') : this.npm.prefix - const Arborist = require('@npmcli/arborist') - const arb = new Arborist({ global, ...this.npm.flatOptions, diff --git a/deps/npm/lib/commands/outdated.js b/deps/npm/lib/commands/outdated.js index 419fb5f5c76acb..49626ebd5e20ed 100644 --- a/deps/npm/lib/commands/outdated.js +++ b/deps/npm/lib/commands/outdated.js @@ -6,6 +6,8 @@ const npa = require('npm-package-arg') const pickManifest = require('npm-pick-manifest') const localeCompare = require('@isaacs/string-locale-compare')('en') +const Arborist = require('@npmcli/arborist') + const ansiTrim = require('../utils/ansi-trim.js') const ArboristWorkspaceCmd = require('../arborist-cmd.js') @@ -28,7 +30,6 @@ class Outdated extends ArboristWorkspaceCmd { ? global : this.npm.prefix - const Arborist = require('@npmcli/arborist') const arb = new Arborist({ ...this.npm.flatOptions, path: where, diff --git a/deps/npm/lib/commands/prune.js b/deps/npm/lib/commands/prune.js index 12136e20e4943a..ee2c30553f1c5a 100644 --- a/deps/npm/lib/commands/prune.js +++ b/deps/npm/lib/commands/prune.js @@ -1,4 +1,5 @@ // prune extraneous packages +const Arborist = require('@npmcli/arborist') const reifyFinish = require('../utils/reify-finish.js') const ArboristWorkspaceCmd = require('../arborist-cmd.js') @@ -18,7 +19,6 @@ class Prune extends ArboristWorkspaceCmd { async exec () { const where = this.npm.prefix - const Arborist = require('@npmcli/arborist') const opts = { ...this.npm.flatOptions, path: where, diff --git a/deps/npm/lib/commands/query.js b/deps/npm/lib/commands/query.js index ba39f004fae237..b5f4d8e57ddf5e 100644 --- a/deps/npm/lib/commands/query.js +++ b/deps/npm/lib/commands/query.js @@ -1,6 +1,7 @@ 'use strict' const { resolve } = require('path') +const Arborist = require('@npmcli/arborist') const BaseCommand = require('../base-command.js') class QuerySelectorItem { @@ -57,7 +58,6 @@ class Query extends BaseCommand { async exec (args) { // one dir up from wherever node_modules lives const where = resolve(this.npm.dir, '..') - const Arborist = require('@npmcli/arborist') const opts = { ...this.npm.flatOptions, path: where, @@ -73,7 +73,6 @@ class Query extends BaseCommand { async execWorkspaces (args) { await this.setWorkspaces() - const Arborist = require('@npmcli/arborist') const opts = { ...this.npm.flatOptions, path: this.npm.prefix, diff --git a/deps/npm/lib/commands/rebuild.js b/deps/npm/lib/commands/rebuild.js index 527447e4279175..df791106fdd21d 100644 --- a/deps/npm/lib/commands/rebuild.js +++ b/deps/npm/lib/commands/rebuild.js @@ -1,6 +1,8 @@ const { resolve } = require('path') +const Arborist = require('@npmcli/arborist') const npa = require('npm-package-arg') const semver = require('semver') +const completion = require('../utils/completion/installed-deep.js') const ArboristWorkspaceCmd = require('../arborist-cmd.js') class Rebuild extends ArboristWorkspaceCmd { @@ -19,14 +21,12 @@ class Rebuild extends ArboristWorkspaceCmd { // TODO /* istanbul ignore next */ async completion (opts) { - const completion = require('../utils/completion/installed-deep.js') return completion(this.npm, opts) } async exec (args) { const globalTop = resolve(this.npm.globalDir, '..') const where = this.npm.global ? globalTop : this.npm.prefix - const Arborist = require('@npmcli/arborist') const arb = new Arborist({ ...this.npm.flatOptions, path: where, diff --git a/deps/npm/lib/commands/search.js b/deps/npm/lib/commands/search.js index 5fb0a12bce1386..7419e974546888 100644 --- a/deps/npm/lib/commands/search.js +++ b/deps/npm/lib/commands/search.js @@ -1,4 +1,4 @@ -const { Minipass } = require('minipass') +const Minipass = require('minipass') const Pipeline = require('minipass-pipeline') const libSearch = require('libnpmsearch') const log = require('../utils/log-shim.js') diff --git a/deps/npm/lib/commands/shrinkwrap.js b/deps/npm/lib/commands/shrinkwrap.js index c6d817d4801423..a240f039356e74 100644 --- a/deps/npm/lib/commands/shrinkwrap.js +++ b/deps/npm/lib/commands/shrinkwrap.js @@ -1,5 +1,6 @@ const { resolve, basename } = require('path') const { unlink } = require('fs').promises +const Arborist = require('@npmcli/arborist') const log = require('../utils/log-shim') const BaseCommand = require('../base-command.js') class Shrinkwrap extends BaseCommand { @@ -20,7 +21,6 @@ class Shrinkwrap extends BaseCommand { throw er } - const Arborist = require('@npmcli/arborist') const path = this.npm.prefix const sw = resolve(path, 'npm-shrinkwrap.json') const arb = new Arborist({ ...this.npm.flatOptions, path }) diff --git a/deps/npm/lib/commands/uninstall.js b/deps/npm/lib/commands/uninstall.js index e5373119ec757a..8c44f2e32106c2 100644 --- a/deps/npm/lib/commands/uninstall.js +++ b/deps/npm/lib/commands/uninstall.js @@ -1,4 +1,5 @@ const { resolve } = require('path') +const Arborist = require('@npmcli/arborist') const rpj = require('read-package-json-fast') const reifyFinish = require('../utils/reify-finish.js') @@ -41,7 +42,6 @@ class Uninstall extends ArboristWorkspaceCmd { ? resolve(this.npm.globalDir, '..') : this.npm.localPrefix - const Arborist = require('@npmcli/arborist') const opts = { ...this.npm.flatOptions, path, diff --git a/deps/npm/lib/commands/update.js b/deps/npm/lib/commands/update.js index 26be5ad681983b..fd30bcb41e2b3f 100644 --- a/deps/npm/lib/commands/update.js +++ b/deps/npm/lib/commands/update.js @@ -1,8 +1,10 @@ const path = require('path') +const Arborist = require('@npmcli/arborist') const log = require('../utils/log-shim.js') const reifyFinish = require('../utils/reify-finish.js') +const completion = require('../utils/completion/installed-deep.js') const ArboristWorkspaceCmd = require('../arborist-cmd.js') class Update extends ArboristWorkspaceCmd { @@ -32,7 +34,6 @@ class Update extends ArboristWorkspaceCmd { // TODO /* istanbul ignore next */ async completion (opts) { - const completion = require('../utils/completion/installed-deep.js') return completion(this.npm, opts) } @@ -52,7 +53,6 @@ class Update extends ArboristWorkspaceCmd { 'https://github.com/npm/rfcs/blob/latest/implemented/0019-remove-update-depth-option.md') } - const Arborist = require('@npmcli/arborist') const opts = { ...this.npm.flatOptions, path: where, diff --git a/deps/npm/lib/npm.js b/deps/npm/lib/npm.js index eebb453dbbacb1..5a347a2fd69e8f 100644 --- a/deps/npm/lib/npm.js +++ b/deps/npm/lib/npm.js @@ -1,3 +1,4 @@ +const Arborist = require('@npmcli/arborist') const EventEmitter = require('events') const { resolve, dirname, join } = require('path') const Config = require('@npmcli/config') @@ -309,6 +310,10 @@ class Npm extends EventEmitter { get flatOptions () { const { flat } = this.config + // the Arborist constructor is used almost everywhere we call pacote, it's + // easiest to attach it to flatOptions so it goes everywhere without having + // to touch every call + flat.Arborist = Arborist flat.nodeVersion = process.version flat.npmVersion = pkg.version if (this.command) { diff --git a/deps/npm/lib/package-url-cmd.js b/deps/npm/lib/package-url-cmd.js index 250b46eeeddbe5..20e6a16fe15230 100644 --- a/deps/npm/lib/package-url-cmd.js +++ b/deps/npm/lib/package-url-cmd.js @@ -2,6 +2,7 @@ const pacote = require('pacote') const hostedGitInfo = require('hosted-git-info') +const Arborist = require('@npmcli/arborist') const openUrl = require('./utils/open-url.js') const log = require('./utils/log-shim') @@ -32,6 +33,7 @@ class PackageUrlCommand extends BaseCommand { ...this.npm.flatOptions, where: this.npm.localPrefix, fullMetadata: true, + Arborist, } const mani = await pacote.manifest(arg, opts) const url = this.getUrl(arg, mani) diff --git a/deps/npm/lib/utils/completion/installed-deep.js b/deps/npm/lib/utils/completion/installed-deep.js index 045708f74bd2a7..7098d81fe7b494 100644 --- a/deps/npm/lib/utils/completion/installed-deep.js +++ b/deps/npm/lib/utils/completion/installed-deep.js @@ -1,8 +1,8 @@ const { resolve } = require('path') +const Arborist = require('@npmcli/arborist') const localeCompare = require('@isaacs/string-locale-compare')('en') const installedDeep = async (npm) => { - const Arborist = require('@npmcli/arborist') const { depth, global, diff --git a/deps/npm/lib/utils/config/definitions.js b/deps/npm/lib/utils/config/definitions.js index 373989dbea0d5f..4b9eb1f64cbbd1 100644 --- a/deps/npm/lib/utils/config/definitions.js +++ b/deps/npm/lib/utils/config/definitions.js @@ -1624,8 +1624,7 @@ define('provenance', { default: false, type: Boolean, description: ` - When publishing from a supported cloud CI/CD system, the package will be - publicly linked to where it was built and published from. + Indicates that a provenance statement should be generated. `, flatten, }) diff --git a/deps/npm/lib/utils/format-search-stream.js b/deps/npm/lib/utils/format-search-stream.js index 21929cce7d056b..2a2dadd5c34342 100644 --- a/deps/npm/lib/utils/format-search-stream.js +++ b/deps/npm/lib/utils/format-search-stream.js @@ -1,4 +1,4 @@ -const { Minipass } = require('minipass') +const Minipass = require('minipass') const columnify = require('columnify') // This module consumes package data in the following format: diff --git a/deps/npm/lib/utils/log-file.js b/deps/npm/lib/utils/log-file.js index 84f86983639ce6..93114e94301f53 100644 --- a/deps/npm/lib/utils/log-file.js +++ b/deps/npm/lib/utils/log-file.js @@ -1,8 +1,8 @@ const os = require('os') const { join, dirname, basename } = require('path') const { format } = require('util') -const { glob } = require('glob') -const { Minipass } = require('minipass') +const glob = require('glob') +const MiniPass = require('minipass') const fsMiniPass = require('fs-minipass') const fs = require('fs/promises') const log = require('./log-shim') @@ -56,7 +56,7 @@ class LogFiles { } on () { - this.#logStream = new Minipass() + this.#logStream = new MiniPass() process.on('log', this.#logHandler) } @@ -103,7 +103,7 @@ class LogFiles { } get #isBuffered () { - return this.#logStream instanceof Minipass + return this.#logStream instanceof MiniPass } #endStream (output) { diff --git a/deps/npm/lib/utils/update-notifier.js b/deps/npm/lib/utils/update-notifier.js index 2c839bfeff8436..cb9184bcdb41d4 100644 --- a/deps/npm/lib/utils/update-notifier.js +++ b/deps/npm/lib/utils/update-notifier.js @@ -2,11 +2,20 @@ // but not in CI, and not if we're doing that already. // Check daily for betas, and weekly otherwise. +const pacote = require('pacote') const ciInfo = require('ci-info') const semver = require('semver') const { stat, writeFile } = require('fs/promises') const { resolve } = require('path') +const SKIP = Symbol('SKIP') + +const isGlobalNpmUpdate = npm => { + return npm.flatOptions.global && + ['install', 'update'].includes(npm.command) && + npm.argv.some(arg => /^npm(@|$)/.test(arg)) +} + // update check frequency const DAILY = 1000 * 60 * 60 * 24 const WEEKLY = DAILY * 7 @@ -15,10 +24,39 @@ const WEEKLY = DAILY * 7 const lastCheckedFile = npm => resolve(npm.flatOptions.cache, '../_update-notifier-last-checked') -// Actual check for updates. This is a separate function so that we only load -// this if we are doing the actual update -const updateCheck = async (npm, spec, version, current) => { - const pacote = require('pacote') +const checkTimeout = async (npm, duration) => { + const t = new Date(Date.now() - duration) + const f = lastCheckedFile(npm) + // if we don't have a file, then definitely check it. + const st = await stat(f).catch(() => ({ mtime: t - 1 })) + return t > st.mtime +} + +const updateNotifier = async (npm, spec = 'latest') => { + // never check for updates in CI, when updating npm already, or opted out + if (!npm.config.get('update-notifier') || + isGlobalNpmUpdate(npm) || + ciInfo.isCI) { + return SKIP + } + + // if we're on a prerelease train, then updates are coming fast + // check for a new one daily. otherwise, weekly. + const { version } = npm + const current = semver.parse(version) + + // if we're on a beta train, always get the next beta + if (current.prerelease.length) { + spec = `^${version}` + } + + // while on a beta train, get updates daily + const duration = spec !== 'latest' ? DAILY : WEEKLY + + // if we've already checked within the specified duration, don't check again + if (!(await checkTimeout(npm, duration))) { + return null + } const mani = await pacote.manifest(`npm@${spec}`, { // always prefer latest, even if doing --tag=whatever on the cmd @@ -74,49 +112,15 @@ const updateCheck = async (npm, spec, version, current) => { return message } -const updateNotifier = async (npm, spec = 'latest') => { - // if we're on a prerelease train, then updates are coming fast - // check for a new one daily. otherwise, weekly. - const { version } = npm - const current = semver.parse(version) - - // if we're on a beta train, always get the next beta - if (current.prerelease.length) { - spec = `^${version}` - } - - // while on a beta train, get updates daily - const duration = spec !== 'latest' ? DAILY : WEEKLY - - const t = new Date(Date.now() - duration) - // if we don't have a file, then definitely check it. - const st = await stat(lastCheckedFile(npm)).catch(() => ({ mtime: t - 1 })) - - // if we've already checked within the specified duration, don't check again - if (!(t > st.mtime)) { - return null - } - - return updateCheck(npm, spec, version, current) -} - // only update the notification timeout if we actually finished checking module.exports = async npm => { - if ( - // opted out - !npm.config.get('update-notifier') - // global npm update - || (npm.flatOptions.global && - ['install', 'update'].includes(npm.command) && - npm.argv.some(arg => /^npm(@|$)/.test(arg))) - // CI - || ciInfo.isCI - ) { + const notification = await updateNotifier(npm) + + // dont write the file if we skipped checking altogether + if (notification === SKIP) { return null } - const notification = await updateNotifier(npm) - // intentional. do not await this. it's a best-effort update. if this // fails, it's ok. might be using /dev/null as the cache or something weird // like that. diff --git a/deps/npm/lib/workspaces/get-workspaces.js b/deps/npm/lib/workspaces/get-workspaces.js index 7065533596000e..2ac043d5f3943d 100644 --- a/deps/npm/lib/workspaces/get-workspaces.js +++ b/deps/npm/lib/workspaces/get-workspaces.js @@ -1,6 +1,6 @@ const { resolve, relative } = require('path') const mapWorkspaces = require('@npmcli/map-workspaces') -const { minimatch } = require('minimatch') +const minimatch = require('minimatch') const rpj = require('read-package-json-fast') // minimatch wants forward slashes only for glob patterns diff --git a/deps/npm/lib/workspaces/update-workspaces.js b/deps/npm/lib/workspaces/update-workspaces.js index 892f366e9980a2..d22abda7c5b0be 100644 --- a/deps/npm/lib/workspaces/update-workspaces.js +++ b/deps/npm/lib/workspaces/update-workspaces.js @@ -1,5 +1,6 @@ 'use strict' +const Arborist = require('@npmcli/arborist') const reifyFinish = require('../utils/reify-finish.js') async function updateWorkspaces ({ @@ -30,7 +31,6 @@ async function updateWorkspaces ({ path: localPrefix, save, } - const Arborist = require('@npmcli/arborist') const arb = new Arborist(opts) await arb.reify({ ...opts, update: workspaces }) diff --git a/deps/npm/man/man1/npm-access.1 b/deps/npm/man/man1/npm-access.1 index 8b8d996a119970..ad44219bb7d222 100644 --- a/deps/npm/man/man1/npm-access.1 +++ b/deps/npm/man/man1/npm-access.1 @@ -1,4 +1,4 @@ -.TH "NPM-ACCESS" "1" "May 2023" "" "" +.TH "NPM-ACCESS" "1" "April 2023" "" "" .SH "NAME" \fBnpm-access\fR - Set access level on published packages .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-adduser.1 b/deps/npm/man/man1/npm-adduser.1 index 4653d85c7f8f8e..d1d05d721d18b6 100644 --- a/deps/npm/man/man1/npm-adduser.1 +++ b/deps/npm/man/man1/npm-adduser.1 @@ -1,4 +1,4 @@ -.TH "NPM-ADDUSER" "1" "May 2023" "" "" +.TH "NPM-ADDUSER" "1" "April 2023" "" "" .SH "NAME" \fBnpm-adduser\fR - Add a registry user account .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-audit.1 b/deps/npm/man/man1/npm-audit.1 index 270c517ef17fc5..a14786b54bfecf 100644 --- a/deps/npm/man/man1/npm-audit.1 +++ b/deps/npm/man/man1/npm-audit.1 @@ -1,4 +1,4 @@ -.TH "NPM-AUDIT" "1" "May 2023" "" "" +.TH "NPM-AUDIT" "1" "April 2023" "" "" .SH "NAME" \fBnpm-audit\fR - Run a security audit .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-bugs.1 b/deps/npm/man/man1/npm-bugs.1 index efd8922d66c65a..adcfcb3bc2b081 100644 --- a/deps/npm/man/man1/npm-bugs.1 +++ b/deps/npm/man/man1/npm-bugs.1 @@ -1,4 +1,4 @@ -.TH "NPM-BUGS" "1" "May 2023" "" "" +.TH "NPM-BUGS" "1" "April 2023" "" "" .SH "NAME" \fBnpm-bugs\fR - Report bugs for a package in a web browser .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-cache.1 b/deps/npm/man/man1/npm-cache.1 index 2757922d47b37f..358451123e84f4 100644 --- a/deps/npm/man/man1/npm-cache.1 +++ b/deps/npm/man/man1/npm-cache.1 @@ -1,4 +1,4 @@ -.TH "NPM-CACHE" "1" "May 2023" "" "" +.TH "NPM-CACHE" "1" "April 2023" "" "" .SH "NAME" \fBnpm-cache\fR - Manipulates packages cache .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-ci.1 b/deps/npm/man/man1/npm-ci.1 index 4728ef4cb9bf44..ee05baa60763cf 100644 --- a/deps/npm/man/man1/npm-ci.1 +++ b/deps/npm/man/man1/npm-ci.1 @@ -1,4 +1,4 @@ -.TH "NPM-CI" "1" "May 2023" "" "" +.TH "NPM-CI" "1" "April 2023" "" "" .SH "NAME" \fBnpm-ci\fR - Clean install a project .SS "Synopsis" @@ -66,6 +66,49 @@ cache: .fi .RE .SS "Configuration" +.SS "\fBsave\fR" +.RS 0 +.IP \(bu 4 +Default: \fBtrue\fR unless when using \fBnpm update\fR where it defaults to \fBfalse\fR +.IP \(bu 4 +Type: Boolean +.RE 0 + +.P +Save installed packages to a \fBpackage.json\fR file as dependencies. +.P +When used with the \fBnpm rm\fR command, removes the dependency from \fBpackage.json\fR. +.P +Will also prevent writing to \fBpackage-lock.json\fR if set to \fBfalse\fR. +.SS "\fBsave-exact\fR" +.RS 0 +.IP \(bu 4 +Default: false +.IP \(bu 4 +Type: Boolean +.RE 0 + +.P +Dependencies saved to package.json will be configured with an exact version rather than using npm's default semver range operator. +.SS "\fBglobal\fR" +.RS 0 +.IP \(bu 4 +Default: false +.IP \(bu 4 +Type: Boolean +.RE 0 + +.P +Operates in "global" mode, so that packages are installed into the \fBprefix\fR folder instead of the current working directory. See npm help folders for more on the differences in behavior. +.RS 0 +.IP \(bu 4 +packages are installed into the \fB{prefix}/lib/node_modules\fR folder, instead of the current working directory. +.IP \(bu 4 +bin files are linked to \fB{prefix}/bin\fR +.IP \(bu 4 +man pages are linked to \fB{prefix}/share/man\fR +.RE 0 + .SS "\fBinstall-strategy\fR" .RS 0 .IP \(bu 4 diff --git a/deps/npm/man/man1/npm-completion.1 b/deps/npm/man/man1/npm-completion.1 index 18a006978e39b0..15df619487b254 100644 --- a/deps/npm/man/man1/npm-completion.1 +++ b/deps/npm/man/man1/npm-completion.1 @@ -1,4 +1,4 @@ -.TH "NPM-COMPLETION" "1" "May 2023" "" "" +.TH "NPM-COMPLETION" "1" "April 2023" "" "" .SH "NAME" \fBnpm-completion\fR - Tab Completion for npm .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-config.1 b/deps/npm/man/man1/npm-config.1 index a860ea4a9533fc..4280f907442427 100644 --- a/deps/npm/man/man1/npm-config.1 +++ b/deps/npm/man/man1/npm-config.1 @@ -1,4 +1,4 @@ -.TH "NPM-CONFIG" "1" "May 2023" "" "" +.TH "NPM-CONFIG" "1" "April 2023" "" "" .SH "NAME" \fBnpm-config\fR - Manage the npm configuration files .SS "Synopsis" @@ -40,7 +40,7 @@ npm set key=value \[lB]key=value...\[rB] .P Sets each of the config keys to the value provided. .P -If value is omitted, the key will be removed from your config file entirely. +If value is omitted, then it sets it to an empty string. .P Note: for backwards compatibility, \fBnpm config set key value\fR is supported as an alias for \fBnpm config set key=value\fR. .SS "get" diff --git a/deps/npm/man/man1/npm-dedupe.1 b/deps/npm/man/man1/npm-dedupe.1 index 8cbe55011c070e..3e2596f766c7d2 100644 --- a/deps/npm/man/man1/npm-dedupe.1 +++ b/deps/npm/man/man1/npm-dedupe.1 @@ -1,4 +1,4 @@ -.TH "NPM-DEDUPE" "1" "May 2023" "" "" +.TH "NPM-DEDUPE" "1" "April 2023" "" "" .SH "NAME" \fBnpm-dedupe\fR - Reduce duplication in the package tree .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-deprecate.1 b/deps/npm/man/man1/npm-deprecate.1 index f4b4087a428007..1395f1d6006901 100644 --- a/deps/npm/man/man1/npm-deprecate.1 +++ b/deps/npm/man/man1/npm-deprecate.1 @@ -1,4 +1,4 @@ -.TH "NPM-DEPRECATE" "1" "May 2023" "" "" +.TH "NPM-DEPRECATE" "1" "April 2023" "" "" .SH "NAME" \fBnpm-deprecate\fR - Deprecate a version of a package .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-diff.1 b/deps/npm/man/man1/npm-diff.1 index 906e1776f5f028..a612fa58f41619 100644 --- a/deps/npm/man/man1/npm-diff.1 +++ b/deps/npm/man/man1/npm-diff.1 @@ -1,4 +1,4 @@ -.TH "NPM-DIFF" "1" "May 2023" "" "" +.TH "NPM-DIFF" "1" "April 2023" "" "" .SH "NAME" \fBnpm-diff\fR - The registry diff command .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-dist-tag.1 b/deps/npm/man/man1/npm-dist-tag.1 index 50dc8e3908041e..eaeeb0262b72f8 100644 --- a/deps/npm/man/man1/npm-dist-tag.1 +++ b/deps/npm/man/man1/npm-dist-tag.1 @@ -1,4 +1,4 @@ -.TH "NPM-DIST-TAG" "1" "May 2023" "" "" +.TH "NPM-DIST-TAG" "1" "April 2023" "" "" .SH "NAME" \fBnpm-dist-tag\fR - Modify package distribution tags .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-docs.1 b/deps/npm/man/man1/npm-docs.1 index be212b1f014cae..4dabed0f7a3456 100644 --- a/deps/npm/man/man1/npm-docs.1 +++ b/deps/npm/man/man1/npm-docs.1 @@ -1,4 +1,4 @@ -.TH "NPM-DOCS" "1" "May 2023" "" "" +.TH "NPM-DOCS" "1" "April 2023" "" "" .SH "NAME" \fBnpm-docs\fR - Open documentation for a package in a web browser .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-doctor.1 b/deps/npm/man/man1/npm-doctor.1 index 1592de0c32203b..5a16b939dbdcba 100644 --- a/deps/npm/man/man1/npm-doctor.1 +++ b/deps/npm/man/man1/npm-doctor.1 @@ -1,4 +1,4 @@ -.TH "NPM-DOCTOR" "1" "May 2023" "" "" +.TH "NPM-DOCTOR" "1" "April 2023" "" "" .SH "NAME" \fBnpm-doctor\fR - Check your npm environment .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-edit.1 b/deps/npm/man/man1/npm-edit.1 index 1c428d2c2a9f89..d2eefdd4837436 100644 --- a/deps/npm/man/man1/npm-edit.1 +++ b/deps/npm/man/man1/npm-edit.1 @@ -1,4 +1,4 @@ -.TH "NPM-EDIT" "1" "May 2023" "" "" +.TH "NPM-EDIT" "1" "April 2023" "" "" .SH "NAME" \fBnpm-edit\fR - Edit an installed package .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-exec.1 b/deps/npm/man/man1/npm-exec.1 index d1260e21844075..86e514ce33172a 100644 --- a/deps/npm/man/man1/npm-exec.1 +++ b/deps/npm/man/man1/npm-exec.1 @@ -1,4 +1,4 @@ -.TH "NPM-EXEC" "1" "May 2023" "" "" +.TH "NPM-EXEC" "1" "April 2023" "" "" .SH "NAME" \fBnpm-exec\fR - Run a command from a local or remote npm package .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-explain.1 b/deps/npm/man/man1/npm-explain.1 index d206176d92ba6a..852408d0e58276 100644 --- a/deps/npm/man/man1/npm-explain.1 +++ b/deps/npm/man/man1/npm-explain.1 @@ -1,4 +1,4 @@ -.TH "NPM-EXPLAIN" "1" "May 2023" "" "" +.TH "NPM-EXPLAIN" "1" "April 2023" "" "" .SH "NAME" \fBnpm-explain\fR - Explain installed packages .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-explore.1 b/deps/npm/man/man1/npm-explore.1 index 39fe060038a849..a70274d2f54c42 100644 --- a/deps/npm/man/man1/npm-explore.1 +++ b/deps/npm/man/man1/npm-explore.1 @@ -1,4 +1,4 @@ -.TH "NPM-EXPLORE" "1" "May 2023" "" "" +.TH "NPM-EXPLORE" "1" "April 2023" "" "" .SH "NAME" \fBnpm-explore\fR - Browse an installed package .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-find-dupes.1 b/deps/npm/man/man1/npm-find-dupes.1 index efb00a7eba7b88..f9e61d4e96ac6e 100644 --- a/deps/npm/man/man1/npm-find-dupes.1 +++ b/deps/npm/man/man1/npm-find-dupes.1 @@ -1,4 +1,4 @@ -.TH "NPM-FIND-DUPES" "1" "May 2023" "" "" +.TH "NPM-FIND-DUPES" "1" "April 2023" "" "" .SH "NAME" \fBnpm-find-dupes\fR - Find duplication in the package tree .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-fund.1 b/deps/npm/man/man1/npm-fund.1 index fe3adb8a7bca8f..790166b3e48187 100644 --- a/deps/npm/man/man1/npm-fund.1 +++ b/deps/npm/man/man1/npm-fund.1 @@ -1,4 +1,4 @@ -.TH "NPM-FUND" "1" "May 2023" "" "" +.TH "NPM-FUND" "1" "April 2023" "" "" .SH "NAME" \fBnpm-fund\fR - Retrieve funding information .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-help-search.1 b/deps/npm/man/man1/npm-help-search.1 index e46f4b3d2f89c5..88cb8e5c1d8ce7 100644 --- a/deps/npm/man/man1/npm-help-search.1 +++ b/deps/npm/man/man1/npm-help-search.1 @@ -1,4 +1,4 @@ -.TH "NPM-HELP-SEARCH" "1" "May 2023" "" "" +.TH "NPM-HELP-SEARCH" "1" "April 2023" "" "" .SH "NAME" \fBnpm-help-search\fR - Search npm help documentation .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-help.1 b/deps/npm/man/man1/npm-help.1 index b95a78b18bf959..12fb76cce06dca 100644 --- a/deps/npm/man/man1/npm-help.1 +++ b/deps/npm/man/man1/npm-help.1 @@ -1,4 +1,4 @@ -.TH "NPM-HELP" "1" "May 2023" "" "" +.TH "NPM-HELP" "1" "April 2023" "" "" .SH "NAME" \fBnpm-help\fR - Get help on npm .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-hook.1 b/deps/npm/man/man1/npm-hook.1 index 99cc0585ffda58..c1a484b7883222 100644 --- a/deps/npm/man/man1/npm-hook.1 +++ b/deps/npm/man/man1/npm-hook.1 @@ -1,4 +1,4 @@ -.TH "NPM-HOOK" "1" "May 2023" "" "" +.TH "NPM-HOOK" "1" "April 2023" "" "" .SH "NAME" \fBnpm-hook\fR - Manage registry hooks .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-init.1 b/deps/npm/man/man1/npm-init.1 index ec4f8c5c1e35fa..bb7c95eedbb68e 100644 --- a/deps/npm/man/man1/npm-init.1 +++ b/deps/npm/man/man1/npm-init.1 @@ -1,4 +1,4 @@ -.TH "NPM-INIT" "1" "May 2023" "" "" +.TH "NPM-INIT" "1" "April 2023" "" "" .SH "NAME" \fBnpm-init\fR - Create a package.json file .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-install-ci-test.1 b/deps/npm/man/man1/npm-install-ci-test.1 index 96b310cdf98766..abfe022914bb70 100644 --- a/deps/npm/man/man1/npm-install-ci-test.1 +++ b/deps/npm/man/man1/npm-install-ci-test.1 @@ -1,4 +1,4 @@ -.TH "NPM-INSTALL-CI-TEST" "1" "May 2023" "" "" +.TH "NPM-INSTALL-CI-TEST" "1" "April 2023" "" "" .SH "NAME" \fBnpm-install-ci-test\fR - Install a project with a clean slate and run tests .SS "Synopsis" @@ -14,6 +14,49 @@ aliases: cit, clean-install-test, sit .P This command runs \fBnpm ci\fR followed immediately by \fBnpm test\fR. .SS "Configuration" +.SS "\fBsave\fR" +.RS 0 +.IP \(bu 4 +Default: \fBtrue\fR unless when using \fBnpm update\fR where it defaults to \fBfalse\fR +.IP \(bu 4 +Type: Boolean +.RE 0 + +.P +Save installed packages to a \fBpackage.json\fR file as dependencies. +.P +When used with the \fBnpm rm\fR command, removes the dependency from \fBpackage.json\fR. +.P +Will also prevent writing to \fBpackage-lock.json\fR if set to \fBfalse\fR. +.SS "\fBsave-exact\fR" +.RS 0 +.IP \(bu 4 +Default: false +.IP \(bu 4 +Type: Boolean +.RE 0 + +.P +Dependencies saved to package.json will be configured with an exact version rather than using npm's default semver range operator. +.SS "\fBglobal\fR" +.RS 0 +.IP \(bu 4 +Default: false +.IP \(bu 4 +Type: Boolean +.RE 0 + +.P +Operates in "global" mode, so that packages are installed into the \fBprefix\fR folder instead of the current working directory. See npm help folders for more on the differences in behavior. +.RS 0 +.IP \(bu 4 +packages are installed into the \fB{prefix}/lib/node_modules\fR folder, instead of the current working directory. +.IP \(bu 4 +bin files are linked to \fB{prefix}/bin\fR +.IP \(bu 4 +man pages are linked to \fB{prefix}/share/man\fR +.RE 0 + .SS "\fBinstall-strategy\fR" .RS 0 .IP \(bu 4 diff --git a/deps/npm/man/man1/npm-install-test.1 b/deps/npm/man/man1/npm-install-test.1 index a403b55b15ba10..334ce2e88859e2 100644 --- a/deps/npm/man/man1/npm-install-test.1 +++ b/deps/npm/man/man1/npm-install-test.1 @@ -1,4 +1,4 @@ -.TH "NPM-INSTALL-TEST" "1" "May 2023" "" "" +.TH "NPM-INSTALL-TEST" "1" "April 2023" "" "" .SH "NAME" \fBnpm-install-test\fR - Install package(s) and run tests .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-install.1 b/deps/npm/man/man1/npm-install.1 index 8359b949f1644e..0f90d4870e7aa1 100644 --- a/deps/npm/man/man1/npm-install.1 +++ b/deps/npm/man/man1/npm-install.1 @@ -1,4 +1,4 @@ -.TH "NPM-INSTALL" "1" "May 2023" "" "" +.TH "NPM-INSTALL" "1" "April 2023" "" "" .SH "NAME" \fBnpm-install\fR - Install a package .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-link.1 b/deps/npm/man/man1/npm-link.1 index ebe0a7c70d7ae4..75abfdc34f6fb4 100644 --- a/deps/npm/man/man1/npm-link.1 +++ b/deps/npm/man/man1/npm-link.1 @@ -1,4 +1,4 @@ -.TH "NPM-LINK" "1" "May 2023" "" "" +.TH "NPM-LINK" "1" "April 2023" "" "" .SH "NAME" \fBnpm-link\fR - Symlink a package folder .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-login.1 b/deps/npm/man/man1/npm-login.1 index 61b9c2ae235dd7..889b203d579c05 100644 --- a/deps/npm/man/man1/npm-login.1 +++ b/deps/npm/man/man1/npm-login.1 @@ -1,4 +1,4 @@ -.TH "NPM-LOGIN" "1" "May 2023" "" "" +.TH "NPM-LOGIN" "1" "April 2023" "" "" .SH "NAME" \fBnpm-login\fR - Login to a registry user account .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-logout.1 b/deps/npm/man/man1/npm-logout.1 index 546a04044e4eeb..63f9da4118fb26 100644 --- a/deps/npm/man/man1/npm-logout.1 +++ b/deps/npm/man/man1/npm-logout.1 @@ -1,4 +1,4 @@ -.TH "NPM-LOGOUT" "1" "May 2023" "" "" +.TH "NPM-LOGOUT" "1" "April 2023" "" "" .SH "NAME" \fBnpm-logout\fR - Log out of the registry .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-ls.1 b/deps/npm/man/man1/npm-ls.1 index 07e8c22eeb5e4b..3c8ef9c5c98b62 100644 --- a/deps/npm/man/man1/npm-ls.1 +++ b/deps/npm/man/man1/npm-ls.1 @@ -1,4 +1,4 @@ -.TH "NPM-LS" "1" "May 2023" "" "" +.TH "NPM-LS" "1" "April 2023" "" "" .SH "NAME" \fBnpm-ls\fR - List installed packages .SS "Synopsis" @@ -20,7 +20,7 @@ Positional arguments are \fBname@version-range\fR identifiers, which will limit .P .RS 2 .nf -npm@9.6.6 /path/to/npm +npm@9.6.4 /path/to/npm └─┬ init-package-json@0.0.4 └── promzard@0.1.5 .fi diff --git a/deps/npm/man/man1/npm-org.1 b/deps/npm/man/man1/npm-org.1 index 8a69570f2da319..cf10076ece4f3f 100644 --- a/deps/npm/man/man1/npm-org.1 +++ b/deps/npm/man/man1/npm-org.1 @@ -1,4 +1,4 @@ -.TH "NPM-ORG" "1" "May 2023" "" "" +.TH "NPM-ORG" "1" "April 2023" "" "" .SH "NAME" \fBnpm-org\fR - Manage orgs .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-outdated.1 b/deps/npm/man/man1/npm-outdated.1 index 96527eec8bda05..3440ff7ac3e2b2 100644 --- a/deps/npm/man/man1/npm-outdated.1 +++ b/deps/npm/man/man1/npm-outdated.1 @@ -1,4 +1,4 @@ -.TH "NPM-OUTDATED" "1" "May 2023" "" "" +.TH "NPM-OUTDATED" "1" "April 2023" "" "" .SH "NAME" \fBnpm-outdated\fR - Check for outdated packages .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-owner.1 b/deps/npm/man/man1/npm-owner.1 index 68997c98c121b5..a9be47f4d46ac2 100644 --- a/deps/npm/man/man1/npm-owner.1 +++ b/deps/npm/man/man1/npm-owner.1 @@ -1,4 +1,4 @@ -.TH "NPM-OWNER" "1" "May 2023" "" "" +.TH "NPM-OWNER" "1" "April 2023" "" "" .SH "NAME" \fBnpm-owner\fR - Manage package owners .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-pack.1 b/deps/npm/man/man1/npm-pack.1 index 40e1ac2e382466..e1fb88fddbdee1 100644 --- a/deps/npm/man/man1/npm-pack.1 +++ b/deps/npm/man/man1/npm-pack.1 @@ -1,4 +1,4 @@ -.TH "NPM-PACK" "1" "May 2023" "" "" +.TH "NPM-PACK" "1" "April 2023" "" "" .SH "NAME" \fBnpm-pack\fR - Create a tarball from a package .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-ping.1 b/deps/npm/man/man1/npm-ping.1 index db6f0a79d6bb92..b8ebccbd5ad718 100644 --- a/deps/npm/man/man1/npm-ping.1 +++ b/deps/npm/man/man1/npm-ping.1 @@ -1,4 +1,4 @@ -.TH "NPM-PING" "1" "May 2023" "" "" +.TH "NPM-PING" "1" "April 2023" "" "" .SH "NAME" \fBnpm-ping\fR - Ping npm registry .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-pkg.1 b/deps/npm/man/man1/npm-pkg.1 index 42e6834e7e55c2..5cb8362e452544 100644 --- a/deps/npm/man/man1/npm-pkg.1 +++ b/deps/npm/man/man1/npm-pkg.1 @@ -1,4 +1,4 @@ -.TH "NPM-PKG" "1" "May 2023" "" "" +.TH "NPM-PKG" "1" "April 2023" "" "" .SH "NAME" \fBnpm-pkg\fR - Manages your package.json .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-prefix.1 b/deps/npm/man/man1/npm-prefix.1 index a1d4ee3dbc022b..840968f8ec28ca 100644 --- a/deps/npm/man/man1/npm-prefix.1 +++ b/deps/npm/man/man1/npm-prefix.1 @@ -1,4 +1,4 @@ -.TH "NPM-PREFIX" "1" "May 2023" "" "" +.TH "NPM-PREFIX" "1" "April 2023" "" "" .SH "NAME" \fBnpm-prefix\fR - Display prefix .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-profile.1 b/deps/npm/man/man1/npm-profile.1 index b4f3595ff6832f..749fcf86f1d73a 100644 --- a/deps/npm/man/man1/npm-profile.1 +++ b/deps/npm/man/man1/npm-profile.1 @@ -1,4 +1,4 @@ -.TH "NPM-PROFILE" "1" "May 2023" "" "" +.TH "NPM-PROFILE" "1" "April 2023" "" "" .SH "NAME" \fBnpm-profile\fR - Change settings on your registry profile .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-prune.1 b/deps/npm/man/man1/npm-prune.1 index 98d181fe627348..d7f19ddebc168a 100644 --- a/deps/npm/man/man1/npm-prune.1 +++ b/deps/npm/man/man1/npm-prune.1 @@ -1,4 +1,4 @@ -.TH "NPM-PRUNE" "1" "May 2023" "" "" +.TH "NPM-PRUNE" "1" "April 2023" "" "" .SH "NAME" \fBnpm-prune\fR - Remove extraneous packages .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-publish.1 b/deps/npm/man/man1/npm-publish.1 index 5f7ccce98d1180..b5b6aadc51652f 100644 --- a/deps/npm/man/man1/npm-publish.1 +++ b/deps/npm/man/man1/npm-publish.1 @@ -1,4 +1,4 @@ -.TH "NPM-PUBLISH" "1" "May 2023" "" "" +.TH "NPM-PUBLISH" "1" "April 2023" "" "" .SH "NAME" \fBnpm-publish\fR - Publish a package .SS "Synopsis" @@ -181,7 +181,7 @@ Type: Boolean .RE 0 .P -When publishing from a supported cloud CI/CD system, the package will be publicly linked to where it was built and published from. +Indicates that a provenance statement should be generated. .SS "See Also" .RS 0 .IP \(bu 4 diff --git a/deps/npm/man/man1/npm-query.1 b/deps/npm/man/man1/npm-query.1 index 0cd80c479cfe2b..cbf55b52ebe241 100644 --- a/deps/npm/man/man1/npm-query.1 +++ b/deps/npm/man/man1/npm-query.1 @@ -1,4 +1,4 @@ -.TH "NPM-QUERY" "1" "May 2023" "" "" +.TH "NPM-QUERY" "1" "April 2023" "" "" .SH "NAME" \fBnpm-query\fR - Dependency selector query .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-rebuild.1 b/deps/npm/man/man1/npm-rebuild.1 index 5153e2297755d1..bfd5e27663a6cd 100644 --- a/deps/npm/man/man1/npm-rebuild.1 +++ b/deps/npm/man/man1/npm-rebuild.1 @@ -1,4 +1,4 @@ -.TH "NPM-REBUILD" "1" "May 2023" "" "" +.TH "NPM-REBUILD" "1" "April 2023" "" "" .SH "NAME" \fBnpm-rebuild\fR - Rebuild a package .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-repo.1 b/deps/npm/man/man1/npm-repo.1 index 960699c6192f36..704a576ba0f9ca 100644 --- a/deps/npm/man/man1/npm-repo.1 +++ b/deps/npm/man/man1/npm-repo.1 @@ -1,4 +1,4 @@ -.TH "NPM-REPO" "1" "May 2023" "" "" +.TH "NPM-REPO" "1" "April 2023" "" "" .SH "NAME" \fBnpm-repo\fR - Open package repository page in the browser .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-restart.1 b/deps/npm/man/man1/npm-restart.1 index 21ae38d01ccb97..0226bb1e4553c0 100644 --- a/deps/npm/man/man1/npm-restart.1 +++ b/deps/npm/man/man1/npm-restart.1 @@ -1,4 +1,4 @@ -.TH "NPM-RESTART" "1" "May 2023" "" "" +.TH "NPM-RESTART" "1" "April 2023" "" "" .SH "NAME" \fBnpm-restart\fR - Restart a package .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-root.1 b/deps/npm/man/man1/npm-root.1 index 6a53d9e695a280..00df257f6eb244 100644 --- a/deps/npm/man/man1/npm-root.1 +++ b/deps/npm/man/man1/npm-root.1 @@ -1,4 +1,4 @@ -.TH "NPM-ROOT" "1" "May 2023" "" "" +.TH "NPM-ROOT" "1" "April 2023" "" "" .SH "NAME" \fBnpm-root\fR - Display npm root .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-run-script.1 b/deps/npm/man/man1/npm-run-script.1 index 0838720edb31d3..2001cd4e38b7af 100644 --- a/deps/npm/man/man1/npm-run-script.1 +++ b/deps/npm/man/man1/npm-run-script.1 @@ -1,4 +1,4 @@ -.TH "NPM-RUN-SCRIPT" "1" "May 2023" "" "" +.TH "NPM-RUN-SCRIPT" "1" "April 2023" "" "" .SH "NAME" \fBnpm-run-script\fR - Run arbitrary package scripts .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-search.1 b/deps/npm/man/man1/npm-search.1 index 18024e5e9cddbc..cae1242ed0f076 100644 --- a/deps/npm/man/man1/npm-search.1 +++ b/deps/npm/man/man1/npm-search.1 @@ -1,4 +1,4 @@ -.TH "NPM-SEARCH" "1" "May 2023" "" "" +.TH "NPM-SEARCH" "1" "April 2023" "" "" .SH "NAME" \fBnpm-search\fR - Search for packages .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-shrinkwrap.1 b/deps/npm/man/man1/npm-shrinkwrap.1 index 312c444488333d..53c1d66b3b1b03 100644 --- a/deps/npm/man/man1/npm-shrinkwrap.1 +++ b/deps/npm/man/man1/npm-shrinkwrap.1 @@ -1,4 +1,4 @@ -.TH "NPM-SHRINKWRAP" "1" "May 2023" "" "" +.TH "NPM-SHRINKWRAP" "1" "April 2023" "" "" .SH "NAME" \fBnpm-shrinkwrap\fR - Lock down dependency versions for publication .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-star.1 b/deps/npm/man/man1/npm-star.1 index f293aa8a346b9b..f82452e1d16578 100644 --- a/deps/npm/man/man1/npm-star.1 +++ b/deps/npm/man/man1/npm-star.1 @@ -1,4 +1,4 @@ -.TH "NPM-STAR" "1" "May 2023" "" "" +.TH "NPM-STAR" "1" "April 2023" "" "" .SH "NAME" \fBnpm-star\fR - Mark your favorite packages .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-stars.1 b/deps/npm/man/man1/npm-stars.1 index c7812e1e925aee..1b4544410bcd68 100644 --- a/deps/npm/man/man1/npm-stars.1 +++ b/deps/npm/man/man1/npm-stars.1 @@ -1,4 +1,4 @@ -.TH "NPM-STARS" "1" "May 2023" "" "" +.TH "NPM-STARS" "1" "April 2023" "" "" .SH "NAME" \fBnpm-stars\fR - View packages marked as favorites .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-start.1 b/deps/npm/man/man1/npm-start.1 index 06dbfc0142751f..889d41fc16eb02 100644 --- a/deps/npm/man/man1/npm-start.1 +++ b/deps/npm/man/man1/npm-start.1 @@ -1,4 +1,4 @@ -.TH "NPM-START" "1" "May 2023" "" "" +.TH "NPM-START" "1" "April 2023" "" "" .SH "NAME" \fBnpm-start\fR - Start a package .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-stop.1 b/deps/npm/man/man1/npm-stop.1 index cdc7d807cf6508..5f4dd7550d7cb9 100644 --- a/deps/npm/man/man1/npm-stop.1 +++ b/deps/npm/man/man1/npm-stop.1 @@ -1,4 +1,4 @@ -.TH "NPM-STOP" "1" "May 2023" "" "" +.TH "NPM-STOP" "1" "April 2023" "" "" .SH "NAME" \fBnpm-stop\fR - Stop a package .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-team.1 b/deps/npm/man/man1/npm-team.1 index 84b82d9a2cb92f..fe8372f0c40a68 100644 --- a/deps/npm/man/man1/npm-team.1 +++ b/deps/npm/man/man1/npm-team.1 @@ -1,4 +1,4 @@ -.TH "NPM-TEAM" "1" "May 2023" "" "" +.TH "NPM-TEAM" "1" "April 2023" "" "" .SH "NAME" \fBnpm-team\fR - Manage organization teams and team memberships .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-test.1 b/deps/npm/man/man1/npm-test.1 index 9832f0b5f01c08..0e1ca4e4eb6e02 100644 --- a/deps/npm/man/man1/npm-test.1 +++ b/deps/npm/man/man1/npm-test.1 @@ -1,4 +1,4 @@ -.TH "NPM-TEST" "1" "May 2023" "" "" +.TH "NPM-TEST" "1" "April 2023" "" "" .SH "NAME" \fBnpm-test\fR - Test a package .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-token.1 b/deps/npm/man/man1/npm-token.1 index d0593123ac8437..4cb66079926aa9 100644 --- a/deps/npm/man/man1/npm-token.1 +++ b/deps/npm/man/man1/npm-token.1 @@ -1,4 +1,4 @@ -.TH "NPM-TOKEN" "1" "May 2023" "" "" +.TH "NPM-TOKEN" "1" "April 2023" "" "" .SH "NAME" \fBnpm-token\fR - Manage your authentication tokens .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-uninstall.1 b/deps/npm/man/man1/npm-uninstall.1 index 7e0237c768a800..319be77e960e6f 100644 --- a/deps/npm/man/man1/npm-uninstall.1 +++ b/deps/npm/man/man1/npm-uninstall.1 @@ -1,4 +1,4 @@ -.TH "NPM-UNINSTALL" "1" "May 2023" "" "" +.TH "NPM-UNINSTALL" "1" "April 2023" "" "" .SH "NAME" \fBnpm-uninstall\fR - Remove a package .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-unpublish.1 b/deps/npm/man/man1/npm-unpublish.1 index 21ac3b07226c3a..2cfefbc36a094f 100644 --- a/deps/npm/man/man1/npm-unpublish.1 +++ b/deps/npm/man/man1/npm-unpublish.1 @@ -1,4 +1,4 @@ -.TH "NPM-UNPUBLISH" "1" "May 2023" "" "" +.TH "NPM-UNPUBLISH" "1" "April 2023" "" "" .SH "NAME" \fBnpm-unpublish\fR - Remove a package from the registry .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-unstar.1 b/deps/npm/man/man1/npm-unstar.1 index 70242ed19632c3..9c06517d5e4c5a 100644 --- a/deps/npm/man/man1/npm-unstar.1 +++ b/deps/npm/man/man1/npm-unstar.1 @@ -1,4 +1,4 @@ -.TH "NPM-UNSTAR" "1" "May 2023" "" "" +.TH "NPM-UNSTAR" "1" "April 2023" "" "" .SH "NAME" \fBnpm-unstar\fR - Remove an item from your favorite packages .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-update.1 b/deps/npm/man/man1/npm-update.1 index 82e3ff9b193d1d..f162153c75ff99 100644 --- a/deps/npm/man/man1/npm-update.1 +++ b/deps/npm/man/man1/npm-update.1 @@ -1,4 +1,4 @@ -.TH "NPM-UPDATE" "1" "May 2023" "" "" +.TH "NPM-UPDATE" "1" "April 2023" "" "" .SH "NAME" \fBnpm-update\fR - Update packages .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-version.1 b/deps/npm/man/man1/npm-version.1 index 620d6d56fe08fb..6c31270dcdef92 100644 --- a/deps/npm/man/man1/npm-version.1 +++ b/deps/npm/man/man1/npm-version.1 @@ -1,4 +1,4 @@ -.TH "NPM-VERSION" "1" "May 2023" "" "" +.TH "NPM-VERSION" "1" "April 2023" "" "" .SH "NAME" \fBnpm-version\fR - Bump a package version .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-view.1 b/deps/npm/man/man1/npm-view.1 index 5733d82cfcfd6d..4ca9436a8b1df8 100644 --- a/deps/npm/man/man1/npm-view.1 +++ b/deps/npm/man/man1/npm-view.1 @@ -1,4 +1,4 @@ -.TH "NPM-VIEW" "1" "May 2023" "" "" +.TH "NPM-VIEW" "1" "April 2023" "" "" .SH "NAME" \fBnpm-view\fR - View registry info .SS "Synopsis" diff --git a/deps/npm/man/man1/npm-whoami.1 b/deps/npm/man/man1/npm-whoami.1 index add5aac5a2689a..6a9790237e36ba 100644 --- a/deps/npm/man/man1/npm-whoami.1 +++ b/deps/npm/man/man1/npm-whoami.1 @@ -1,4 +1,4 @@ -.TH "NPM-WHOAMI" "1" "May 2023" "" "" +.TH "NPM-WHOAMI" "1" "April 2023" "" "" .SH "NAME" \fBnpm-whoami\fR - Display npm username .SS "Synopsis" diff --git a/deps/npm/man/man1/npm.1 b/deps/npm/man/man1/npm.1 index 9dcf8d2caa05ad..02023347f3cf07 100644 --- a/deps/npm/man/man1/npm.1 +++ b/deps/npm/man/man1/npm.1 @@ -1,4 +1,4 @@ -.TH "NPM" "1" "May 2023" "" "" +.TH "NPM" "1" "April 2023" "" "" .SH "NAME" \fBnpm\fR - javascript package manager .SS "Synopsis" @@ -12,7 +12,7 @@ npm Note: This command is unaware of workspaces. .SS "Version" .P -9.6.6 +9.6.4 .SS "Description" .P npm is the package manager for the Node JavaScript platform. It puts modules in place so that node can find them, and manages dependency conflicts intelligently. diff --git a/deps/npm/man/man1/npx.1 b/deps/npm/man/man1/npx.1 index c392079457ac1d..d461eac5579d9f 100644 --- a/deps/npm/man/man1/npx.1 +++ b/deps/npm/man/man1/npx.1 @@ -1,4 +1,4 @@ -.TH "NPX" "1" "May 2023" "" "" +.TH "NPX" "1" "April 2023" "" "" .SH "NAME" \fBnpx\fR - Run a command from a local or remote npm package .SS "Synopsis" diff --git a/deps/npm/man/man5/folders.5 b/deps/npm/man/man5/folders.5 index 934e3af20f757e..384c59dd085d82 100644 --- a/deps/npm/man/man5/folders.5 +++ b/deps/npm/man/man5/folders.5 @@ -1,4 +1,4 @@ -.TH "FOLDERS" "5" "May 2023" "" "" +.TH "FOLDERS" "5" "April 2023" "" "" .SH "NAME" \fBfolders\fR - Folder Structures Used by npm .SS "Description" @@ -48,7 +48,7 @@ When in local mode, man pages are not installed. Man pages are not installed on Windows systems. .SS "Cache" .P -See npm help cache. Cache files are stored in \fB~/.npm\fR on Posix, or \fB%LocalAppData%/npm-cache\fR on Windows. +See npm help cache. Cache files are stored in \fB~/.npm\fR on Posix, or \fB%AppData%/npm-cache\fR on Windows. .P This is controlled by the \fB\fBcache\fR config\fR \fI\(la/using-npm/config#cache\(ra\fR param. .SS "Temp Files" diff --git a/deps/npm/man/man5/install.5 b/deps/npm/man/man5/install.5 index de38edb1b1b4a5..8abb6970a3ee89 100644 --- a/deps/npm/man/man5/install.5 +++ b/deps/npm/man/man5/install.5 @@ -1,4 +1,4 @@ -.TH "INSTALL" "5" "May 2023" "" "" +.TH "INSTALL" "5" "April 2023" "" "" .SH "NAME" \fBinstall\fR - Download and install node and npm .SS "Description" diff --git a/deps/npm/man/man5/npm-global.5 b/deps/npm/man/man5/npm-global.5 index 934e3af20f757e..384c59dd085d82 100644 --- a/deps/npm/man/man5/npm-global.5 +++ b/deps/npm/man/man5/npm-global.5 @@ -1,4 +1,4 @@ -.TH "FOLDERS" "5" "May 2023" "" "" +.TH "FOLDERS" "5" "April 2023" "" "" .SH "NAME" \fBfolders\fR - Folder Structures Used by npm .SS "Description" @@ -48,7 +48,7 @@ When in local mode, man pages are not installed. Man pages are not installed on Windows systems. .SS "Cache" .P -See npm help cache. Cache files are stored in \fB~/.npm\fR on Posix, or \fB%LocalAppData%/npm-cache\fR on Windows. +See npm help cache. Cache files are stored in \fB~/.npm\fR on Posix, or \fB%AppData%/npm-cache\fR on Windows. .P This is controlled by the \fB\fBcache\fR config\fR \fI\(la/using-npm/config#cache\(ra\fR param. .SS "Temp Files" diff --git a/deps/npm/man/man5/npm-json.5 b/deps/npm/man/man5/npm-json.5 index 290a10e369c57c..a2a7d60a66ca54 100644 --- a/deps/npm/man/man5/npm-json.5 +++ b/deps/npm/man/man5/npm-json.5 @@ -1,4 +1,4 @@ -.TH "PACKAGE.JSON" "5" "May 2023" "" "" +.TH "PACKAGE.JSON" "5" "April 2023" "" "" .SH "NAME" \fBpackage.json\fR - Specifics of npm's package.json handling .SS "Description" diff --git a/deps/npm/man/man5/npm-shrinkwrap-json.5 b/deps/npm/man/man5/npm-shrinkwrap-json.5 index f3ab3eda6aa409..0d2ecc15b4d20d 100644 --- a/deps/npm/man/man5/npm-shrinkwrap-json.5 +++ b/deps/npm/man/man5/npm-shrinkwrap-json.5 @@ -1,4 +1,4 @@ -.TH "NPM-SHRINKWRAP.JSON" "5" "May 2023" "" "" +.TH "NPM-SHRINKWRAP.JSON" "5" "April 2023" "" "" .SH "NAME" \fBnpm-shrinkwrap.json\fR - A publishable lockfile .SS "Description" diff --git a/deps/npm/man/man5/npmrc.5 b/deps/npm/man/man5/npmrc.5 index c04212f9e21d96..82e3c704ed45c0 100644 --- a/deps/npm/man/man5/npmrc.5 +++ b/deps/npm/man/man5/npmrc.5 @@ -1,4 +1,4 @@ -.TH "NPMRC" "5" "May 2023" "" "" +.TH "NPMRC" "5" "April 2023" "" "" .SH "NAME" \fBnpmrc\fR - The npm config files .SS "Description" diff --git a/deps/npm/man/man5/package-json.5 b/deps/npm/man/man5/package-json.5 index 290a10e369c57c..a2a7d60a66ca54 100644 --- a/deps/npm/man/man5/package-json.5 +++ b/deps/npm/man/man5/package-json.5 @@ -1,4 +1,4 @@ -.TH "PACKAGE.JSON" "5" "May 2023" "" "" +.TH "PACKAGE.JSON" "5" "April 2023" "" "" .SH "NAME" \fBpackage.json\fR - Specifics of npm's package.json handling .SS "Description" diff --git a/deps/npm/man/man5/package-lock-json.5 b/deps/npm/man/man5/package-lock-json.5 index 0f529dc9bbc4ae..3406d41da78d38 100644 --- a/deps/npm/man/man5/package-lock-json.5 +++ b/deps/npm/man/man5/package-lock-json.5 @@ -1,4 +1,4 @@ -.TH "PACKAGE-LOCK.JSON" "5" "May 2023" "" "" +.TH "PACKAGE-LOCK.JSON" "5" "April 2023" "" "" .SH "NAME" \fBpackage-lock.json\fR - A manifestation of the manifest .SS "Description" diff --git a/deps/npm/man/man7/config.7 b/deps/npm/man/man7/config.7 index 471e2d9a9a82c9..421caf7e085c6d 100644 --- a/deps/npm/man/man7/config.7 +++ b/deps/npm/man/man7/config.7 @@ -1,4 +1,4 @@ -.TH "CONFIG" "7" "May 2023" "" "" +.TH "CONFIG" "7" "April 2023" "" "" .SH "NAME" \fBconfig\fR - More than you probably want to know about npm configuration .SS "Description" @@ -1177,7 +1177,7 @@ Type: Boolean .RE 0 .P -When publishing from a supported cloud CI/CD system, the package will be publicly linked to where it was built and published from. +Indicates that a provenance statement should be generated. .SS "\fBproxy\fR" .RS 0 .IP \(bu 4 diff --git a/deps/npm/man/man7/dependency-selectors.7 b/deps/npm/man/man7/dependency-selectors.7 index d84c647c93038f..2702ee7bae5120 100644 --- a/deps/npm/man/man7/dependency-selectors.7 +++ b/deps/npm/man/man7/dependency-selectors.7 @@ -1,4 +1,4 @@ -.TH "QUERYING" "7" "May 2023" "" "" +.TH "QUERYING" "7" "April 2023" "" "" .SH "NAME" \fBQuerying\fR - Dependency Selector Syntax & Querying .SS "Description" diff --git a/deps/npm/man/man7/developers.7 b/deps/npm/man/man7/developers.7 index 9d1c568bd7c437..db066422636f0d 100644 --- a/deps/npm/man/man7/developers.7 +++ b/deps/npm/man/man7/developers.7 @@ -1,4 +1,4 @@ -.TH "DEVELOPERS" "7" "May 2023" "" "" +.TH "DEVELOPERS" "7" "April 2023" "" "" .SH "NAME" \fBdevelopers\fR - Developer Guide .SS "Description" diff --git a/deps/npm/man/man7/logging.7 b/deps/npm/man/man7/logging.7 index f8f0e9a9e0d8ef..302edf742906bb 100644 --- a/deps/npm/man/man7/logging.7 +++ b/deps/npm/man/man7/logging.7 @@ -1,4 +1,4 @@ -.TH "LOGGING" "7" "May 2023" "" "" +.TH "LOGGING" "7" "April 2023" "" "" .SH "NAME" \fBLogging\fR - Why, What & How We Log .SS "Description" diff --git a/deps/npm/man/man7/orgs.7 b/deps/npm/man/man7/orgs.7 index 7e67161fb6830d..909ae76026ba68 100644 --- a/deps/npm/man/man7/orgs.7 +++ b/deps/npm/man/man7/orgs.7 @@ -1,4 +1,4 @@ -.TH "ORGS" "7" "May 2023" "" "" +.TH "ORGS" "7" "April 2023" "" "" .SH "NAME" \fBorgs\fR - Working with Teams & Orgs .SS "Description" diff --git a/deps/npm/man/man7/package-spec.7 b/deps/npm/man/man7/package-spec.7 index 21342529c51c1a..c5d8347458ae9e 100644 --- a/deps/npm/man/man7/package-spec.7 +++ b/deps/npm/man/man7/package-spec.7 @@ -1,4 +1,4 @@ -.TH "PACKAGE-SPEC" "7" "May 2023" "" "" +.TH "PACKAGE-SPEC" "7" "April 2023" "" "" .SH "NAME" \fBpackage-spec\fR - Package name specifier .SS "Description" diff --git a/deps/npm/man/man7/registry.7 b/deps/npm/man/man7/registry.7 index b27bdd40295099..fe1fe2d1c49867 100644 --- a/deps/npm/man/man7/registry.7 +++ b/deps/npm/man/man7/registry.7 @@ -1,4 +1,4 @@ -.TH "REGISTRY" "7" "May 2023" "" "" +.TH "REGISTRY" "7" "April 2023" "" "" .SH "NAME" \fBregistry\fR - The JavaScript Package Registry .SS "Description" diff --git a/deps/npm/man/man7/removal.7 b/deps/npm/man/man7/removal.7 index 1f9dfcf016aea4..60bc180f7ba7a3 100644 --- a/deps/npm/man/man7/removal.7 +++ b/deps/npm/man/man7/removal.7 @@ -1,4 +1,4 @@ -.TH "REMOVAL" "7" "May 2023" "" "" +.TH "REMOVAL" "7" "April 2023" "" "" .SH "NAME" \fBremoval\fR - Cleaning the Slate .SS "Synopsis" diff --git a/deps/npm/man/man7/scope.7 b/deps/npm/man/man7/scope.7 index 00f2240aedd385..8b7b1a48fffd83 100644 --- a/deps/npm/man/man7/scope.7 +++ b/deps/npm/man/man7/scope.7 @@ -1,4 +1,4 @@ -.TH "SCOPE" "7" "May 2023" "" "" +.TH "SCOPE" "7" "April 2023" "" "" .SH "NAME" \fBscope\fR - Scoped packages .SS "Description" diff --git a/deps/npm/man/man7/scripts.7 b/deps/npm/man/man7/scripts.7 index 00ae221f4b0901..7f6bdcdeb13794 100644 --- a/deps/npm/man/man7/scripts.7 +++ b/deps/npm/man/man7/scripts.7 @@ -1,4 +1,4 @@ -.TH "SCRIPTS" "7" "May 2023" "" "" +.TH "SCRIPTS" "7" "April 2023" "" "" .SH "NAME" \fBscripts\fR - How npm handles the "scripts" field .SS "Description" diff --git a/deps/npm/man/man7/workspaces.7 b/deps/npm/man/man7/workspaces.7 index 896e40c294c367..0b315f31e4a9f8 100644 --- a/deps/npm/man/man7/workspaces.7 +++ b/deps/npm/man/man7/workspaces.7 @@ -1,4 +1,4 @@ -.TH "WORKSPACES" "7" "May 2023" "" "" +.TH "WORKSPACES" "7" "April 2023" "" "" .SH "NAME" \fBworkspaces\fR - Working with workspaces .SS "Description" diff --git a/deps/npm/node_modules/@isaacs/cliui/LICENSE.txt b/deps/npm/node_modules/@isaacs/cliui/LICENSE.txt deleted file mode 100644 index c7e27478a3eff8..00000000000000 --- a/deps/npm/node_modules/@isaacs/cliui/LICENSE.txt +++ /dev/null @@ -1,14 +0,0 @@ -Copyright (c) 2015, Contributors - -Permission to use, copy, modify, and/or distribute this software -for any purpose with or without fee is hereby granted, provided -that the above copyright notice and this permission notice -appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE -LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES -OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/deps/npm/node_modules/@isaacs/cliui/build/index.cjs b/deps/npm/node_modules/@isaacs/cliui/build/index.cjs deleted file mode 100644 index aca2b8507ac0f3..00000000000000 --- a/deps/npm/node_modules/@isaacs/cliui/build/index.cjs +++ /dev/null @@ -1,317 +0,0 @@ -'use strict'; - -const align = { - right: alignRight, - center: alignCenter -}; -const top = 0; -const right = 1; -const bottom = 2; -const left = 3; -class UI { - constructor(opts) { - var _a; - this.width = opts.width; - /* c8 ignore start */ - this.wrap = (_a = opts.wrap) !== null && _a !== void 0 ? _a : true; - /* c8 ignore stop */ - this.rows = []; - } - span(...args) { - const cols = this.div(...args); - cols.span = true; - } - resetOutput() { - this.rows = []; - } - div(...args) { - if (args.length === 0) { - this.div(''); - } - if (this.wrap && this.shouldApplyLayoutDSL(...args) && typeof args[0] === 'string') { - return this.applyLayoutDSL(args[0]); - } - const cols = args.map(arg => { - if (typeof arg === 'string') { - return this.colFromString(arg); - } - return arg; - }); - this.rows.push(cols); - return cols; - } - shouldApplyLayoutDSL(...args) { - return args.length === 1 && typeof args[0] === 'string' && - /[\t\n]/.test(args[0]); - } - applyLayoutDSL(str) { - const rows = str.split('\n').map(row => row.split('\t')); - let leftColumnWidth = 0; - // simple heuristic for layout, make sure the - // second column lines up along the left-hand. - // don't allow the first column to take up more - // than 50% of the screen. - rows.forEach(columns => { - if (columns.length > 1 && mixin.stringWidth(columns[0]) > leftColumnWidth) { - leftColumnWidth = Math.min(Math.floor(this.width * 0.5), mixin.stringWidth(columns[0])); - } - }); - // generate a table: - // replacing ' ' with padding calculations. - // using the algorithmically generated width. - rows.forEach(columns => { - this.div(...columns.map((r, i) => { - return { - text: r.trim(), - padding: this.measurePadding(r), - width: (i === 0 && columns.length > 1) ? leftColumnWidth : undefined - }; - })); - }); - return this.rows[this.rows.length - 1]; - } - colFromString(text) { - return { - text, - padding: this.measurePadding(text) - }; - } - measurePadding(str) { - // measure padding without ansi escape codes - const noAnsi = mixin.stripAnsi(str); - return [0, noAnsi.match(/\s*$/)[0].length, 0, noAnsi.match(/^\s*/)[0].length]; - } - toString() { - const lines = []; - this.rows.forEach(row => { - this.rowToString(row, lines); - }); - // don't display any lines with the - // hidden flag set. - return lines - .filter(line => !line.hidden) - .map(line => line.text) - .join('\n'); - } - rowToString(row, lines) { - this.rasterize(row).forEach((rrow, r) => { - let str = ''; - rrow.forEach((col, c) => { - const { width } = row[c]; // the width with padding. - const wrapWidth = this.negatePadding(row[c]); // the width without padding. - let ts = col; // temporary string used during alignment/padding. - if (wrapWidth > mixin.stringWidth(col)) { - ts += ' '.repeat(wrapWidth - mixin.stringWidth(col)); - } - // align the string within its column. - if (row[c].align && row[c].align !== 'left' && this.wrap) { - const fn = align[row[c].align]; - ts = fn(ts, wrapWidth); - if (mixin.stringWidth(ts) < wrapWidth) { - /* c8 ignore start */ - const w = width || 0; - /* c8 ignore stop */ - ts += ' '.repeat(w - mixin.stringWidth(ts) - 1); - } - } - // apply border and padding to string. - const padding = row[c].padding || [0, 0, 0, 0]; - if (padding[left]) { - str += ' '.repeat(padding[left]); - } - str += addBorder(row[c], ts, '| '); - str += ts; - str += addBorder(row[c], ts, ' |'); - if (padding[right]) { - str += ' '.repeat(padding[right]); - } - // if prior row is span, try to render the - // current row on the prior line. - if (r === 0 && lines.length > 0) { - str = this.renderInline(str, lines[lines.length - 1]); - } - }); - // remove trailing whitespace. - lines.push({ - text: str.replace(/ +$/, ''), - span: row.span - }); - }); - return lines; - } - // if the full 'source' can render in - // the target line, do so. - renderInline(source, previousLine) { - const match = source.match(/^ */); - /* c8 ignore start */ - const leadingWhitespace = match ? match[0].length : 0; - /* c8 ignore stop */ - const target = previousLine.text; - const targetTextWidth = mixin.stringWidth(target.trimEnd()); - if (!previousLine.span) { - return source; - } - // if we're not applying wrapping logic, - // just always append to the span. - if (!this.wrap) { - previousLine.hidden = true; - return target + source; - } - if (leadingWhitespace < targetTextWidth) { - return source; - } - previousLine.hidden = true; - return target.trimEnd() + ' '.repeat(leadingWhitespace - targetTextWidth) + source.trimStart(); - } - rasterize(row) { - const rrows = []; - const widths = this.columnWidths(row); - let wrapped; - // word wrap all columns, and create - // a data-structure that is easy to rasterize. - row.forEach((col, c) => { - // leave room for left and right padding. - col.width = widths[c]; - if (this.wrap) { - wrapped = mixin.wrap(col.text, this.negatePadding(col), { hard: true }).split('\n'); - } - else { - wrapped = col.text.split('\n'); - } - if (col.border) { - wrapped.unshift('.' + '-'.repeat(this.negatePadding(col) + 2) + '.'); - wrapped.push("'" + '-'.repeat(this.negatePadding(col) + 2) + "'"); - } - // add top and bottom padding. - if (col.padding) { - wrapped.unshift(...new Array(col.padding[top] || 0).fill('')); - wrapped.push(...new Array(col.padding[bottom] || 0).fill('')); - } - wrapped.forEach((str, r) => { - if (!rrows[r]) { - rrows.push([]); - } - const rrow = rrows[r]; - for (let i = 0; i < c; i++) { - if (rrow[i] === undefined) { - rrow.push(''); - } - } - rrow.push(str); - }); - }); - return rrows; - } - negatePadding(col) { - /* c8 ignore start */ - let wrapWidth = col.width || 0; - /* c8 ignore stop */ - if (col.padding) { - wrapWidth -= (col.padding[left] || 0) + (col.padding[right] || 0); - } - if (col.border) { - wrapWidth -= 4; - } - return wrapWidth; - } - columnWidths(row) { - if (!this.wrap) { - return row.map(col => { - return col.width || mixin.stringWidth(col.text); - }); - } - let unset = row.length; - let remainingWidth = this.width; - // column widths can be set in config. - const widths = row.map(col => { - if (col.width) { - unset--; - remainingWidth -= col.width; - return col.width; - } - return undefined; - }); - // any unset widths should be calculated. - /* c8 ignore start */ - const unsetWidth = unset ? Math.floor(remainingWidth / unset) : 0; - /* c8 ignore stop */ - return widths.map((w, i) => { - if (w === undefined) { - return Math.max(unsetWidth, _minWidth(row[i])); - } - return w; - }); - } -} -function addBorder(col, ts, style) { - if (col.border) { - if (/[.']-+[.']/.test(ts)) { - return ''; - } - if (ts.trim().length !== 0) { - return style; - } - return ' '; - } - return ''; -} -// calculates the minimum width of -// a column, based on padding preferences. -function _minWidth(col) { - const padding = col.padding || []; - const minWidth = 1 + (padding[left] || 0) + (padding[right] || 0); - if (col.border) { - return minWidth + 4; - } - return minWidth; -} -function getWindowWidth() { - /* c8 ignore start */ - if (typeof process === 'object' && process.stdout && process.stdout.columns) { - return process.stdout.columns; - } - return 80; -} -/* c8 ignore stop */ -function alignRight(str, width) { - str = str.trim(); - const strWidth = mixin.stringWidth(str); - if (strWidth < width) { - return ' '.repeat(width - strWidth) + str; - } - return str; -} -function alignCenter(str, width) { - str = str.trim(); - const strWidth = mixin.stringWidth(str); - /* c8 ignore start */ - if (strWidth >= width) { - return str; - } - /* c8 ignore stop */ - return ' '.repeat((width - strWidth) >> 1) + str; -} -let mixin; -function cliui(opts, _mixin) { - mixin = _mixin; - return new UI({ - /* c8 ignore start */ - width: (opts === null || opts === void 0 ? void 0 : opts.width) || getWindowWidth(), - wrap: opts === null || opts === void 0 ? void 0 : opts.wrap - /* c8 ignore stop */ - }); -} - -// Bootstrap cliui with CommonJS dependencies: -const stringWidth = require('string-width-cjs'); -const stripAnsi = require('strip-ansi-cjs'); -const wrap = require('wrap-ansi-cjs'); -function ui(opts) { - return cliui(opts, { - stringWidth, - stripAnsi, - wrap - }); -} - -module.exports = ui; diff --git a/deps/npm/node_modules/@isaacs/cliui/build/index.d.cts b/deps/npm/node_modules/@isaacs/cliui/build/index.d.cts deleted file mode 100644 index 4567f945e81a73..00000000000000 --- a/deps/npm/node_modules/@isaacs/cliui/build/index.d.cts +++ /dev/null @@ -1,43 +0,0 @@ -interface UIOptions { - width: number; - wrap?: boolean; - rows?: string[]; -} -interface Column { - text: string; - width?: number; - align?: "right" | "left" | "center"; - padding: number[]; - border?: boolean; -} -interface ColumnArray extends Array { - span: boolean; -} -interface Line { - hidden?: boolean; - text: string; - span?: boolean; -} -declare class UI { - width: number; - wrap: boolean; - rows: ColumnArray[]; - constructor(opts: UIOptions); - span(...args: ColumnArray): void; - resetOutput(): void; - div(...args: (Column | string)[]): ColumnArray; - private shouldApplyLayoutDSL; - private applyLayoutDSL; - private colFromString; - private measurePadding; - toString(): string; - rowToString(row: ColumnArray, lines: Line[]): Line[]; - // if the full 'source' can render in - // the target line, do so. - private renderInline; - private rasterize; - private negatePadding; - private columnWidths; -} -declare function ui(opts: UIOptions): UI; -export { ui as default }; diff --git a/deps/npm/node_modules/@isaacs/cliui/build/lib/index.js b/deps/npm/node_modules/@isaacs/cliui/build/lib/index.js deleted file mode 100644 index 587b5ecd3e773b..00000000000000 --- a/deps/npm/node_modules/@isaacs/cliui/build/lib/index.js +++ /dev/null @@ -1,302 +0,0 @@ -'use strict'; -const align = { - right: alignRight, - center: alignCenter -}; -const top = 0; -const right = 1; -const bottom = 2; -const left = 3; -export class UI { - constructor(opts) { - var _a; - this.width = opts.width; - /* c8 ignore start */ - this.wrap = (_a = opts.wrap) !== null && _a !== void 0 ? _a : true; - /* c8 ignore stop */ - this.rows = []; - } - span(...args) { - const cols = this.div(...args); - cols.span = true; - } - resetOutput() { - this.rows = []; - } - div(...args) { - if (args.length === 0) { - this.div(''); - } - if (this.wrap && this.shouldApplyLayoutDSL(...args) && typeof args[0] === 'string') { - return this.applyLayoutDSL(args[0]); - } - const cols = args.map(arg => { - if (typeof arg === 'string') { - return this.colFromString(arg); - } - return arg; - }); - this.rows.push(cols); - return cols; - } - shouldApplyLayoutDSL(...args) { - return args.length === 1 && typeof args[0] === 'string' && - /[\t\n]/.test(args[0]); - } - applyLayoutDSL(str) { - const rows = str.split('\n').map(row => row.split('\t')); - let leftColumnWidth = 0; - // simple heuristic for layout, make sure the - // second column lines up along the left-hand. - // don't allow the first column to take up more - // than 50% of the screen. - rows.forEach(columns => { - if (columns.length > 1 && mixin.stringWidth(columns[0]) > leftColumnWidth) { - leftColumnWidth = Math.min(Math.floor(this.width * 0.5), mixin.stringWidth(columns[0])); - } - }); - // generate a table: - // replacing ' ' with padding calculations. - // using the algorithmically generated width. - rows.forEach(columns => { - this.div(...columns.map((r, i) => { - return { - text: r.trim(), - padding: this.measurePadding(r), - width: (i === 0 && columns.length > 1) ? leftColumnWidth : undefined - }; - })); - }); - return this.rows[this.rows.length - 1]; - } - colFromString(text) { - return { - text, - padding: this.measurePadding(text) - }; - } - measurePadding(str) { - // measure padding without ansi escape codes - const noAnsi = mixin.stripAnsi(str); - return [0, noAnsi.match(/\s*$/)[0].length, 0, noAnsi.match(/^\s*/)[0].length]; - } - toString() { - const lines = []; - this.rows.forEach(row => { - this.rowToString(row, lines); - }); - // don't display any lines with the - // hidden flag set. - return lines - .filter(line => !line.hidden) - .map(line => line.text) - .join('\n'); - } - rowToString(row, lines) { - this.rasterize(row).forEach((rrow, r) => { - let str = ''; - rrow.forEach((col, c) => { - const { width } = row[c]; // the width with padding. - const wrapWidth = this.negatePadding(row[c]); // the width without padding. - let ts = col; // temporary string used during alignment/padding. - if (wrapWidth > mixin.stringWidth(col)) { - ts += ' '.repeat(wrapWidth - mixin.stringWidth(col)); - } - // align the string within its column. - if (row[c].align && row[c].align !== 'left' && this.wrap) { - const fn = align[row[c].align]; - ts = fn(ts, wrapWidth); - if (mixin.stringWidth(ts) < wrapWidth) { - /* c8 ignore start */ - const w = width || 0; - /* c8 ignore stop */ - ts += ' '.repeat(w - mixin.stringWidth(ts) - 1); - } - } - // apply border and padding to string. - const padding = row[c].padding || [0, 0, 0, 0]; - if (padding[left]) { - str += ' '.repeat(padding[left]); - } - str += addBorder(row[c], ts, '| '); - str += ts; - str += addBorder(row[c], ts, ' |'); - if (padding[right]) { - str += ' '.repeat(padding[right]); - } - // if prior row is span, try to render the - // current row on the prior line. - if (r === 0 && lines.length > 0) { - str = this.renderInline(str, lines[lines.length - 1]); - } - }); - // remove trailing whitespace. - lines.push({ - text: str.replace(/ +$/, ''), - span: row.span - }); - }); - return lines; - } - // if the full 'source' can render in - // the target line, do so. - renderInline(source, previousLine) { - const match = source.match(/^ */); - /* c8 ignore start */ - const leadingWhitespace = match ? match[0].length : 0; - /* c8 ignore stop */ - const target = previousLine.text; - const targetTextWidth = mixin.stringWidth(target.trimEnd()); - if (!previousLine.span) { - return source; - } - // if we're not applying wrapping logic, - // just always append to the span. - if (!this.wrap) { - previousLine.hidden = true; - return target + source; - } - if (leadingWhitespace < targetTextWidth) { - return source; - } - previousLine.hidden = true; - return target.trimEnd() + ' '.repeat(leadingWhitespace - targetTextWidth) + source.trimStart(); - } - rasterize(row) { - const rrows = []; - const widths = this.columnWidths(row); - let wrapped; - // word wrap all columns, and create - // a data-structure that is easy to rasterize. - row.forEach((col, c) => { - // leave room for left and right padding. - col.width = widths[c]; - if (this.wrap) { - wrapped = mixin.wrap(col.text, this.negatePadding(col), { hard: true }).split('\n'); - } - else { - wrapped = col.text.split('\n'); - } - if (col.border) { - wrapped.unshift('.' + '-'.repeat(this.negatePadding(col) + 2) + '.'); - wrapped.push("'" + '-'.repeat(this.negatePadding(col) + 2) + "'"); - } - // add top and bottom padding. - if (col.padding) { - wrapped.unshift(...new Array(col.padding[top] || 0).fill('')); - wrapped.push(...new Array(col.padding[bottom] || 0).fill('')); - } - wrapped.forEach((str, r) => { - if (!rrows[r]) { - rrows.push([]); - } - const rrow = rrows[r]; - for (let i = 0; i < c; i++) { - if (rrow[i] === undefined) { - rrow.push(''); - } - } - rrow.push(str); - }); - }); - return rrows; - } - negatePadding(col) { - /* c8 ignore start */ - let wrapWidth = col.width || 0; - /* c8 ignore stop */ - if (col.padding) { - wrapWidth -= (col.padding[left] || 0) + (col.padding[right] || 0); - } - if (col.border) { - wrapWidth -= 4; - } - return wrapWidth; - } - columnWidths(row) { - if (!this.wrap) { - return row.map(col => { - return col.width || mixin.stringWidth(col.text); - }); - } - let unset = row.length; - let remainingWidth = this.width; - // column widths can be set in config. - const widths = row.map(col => { - if (col.width) { - unset--; - remainingWidth -= col.width; - return col.width; - } - return undefined; - }); - // any unset widths should be calculated. - /* c8 ignore start */ - const unsetWidth = unset ? Math.floor(remainingWidth / unset) : 0; - /* c8 ignore stop */ - return widths.map((w, i) => { - if (w === undefined) { - return Math.max(unsetWidth, _minWidth(row[i])); - } - return w; - }); - } -} -function addBorder(col, ts, style) { - if (col.border) { - if (/[.']-+[.']/.test(ts)) { - return ''; - } - if (ts.trim().length !== 0) { - return style; - } - return ' '; - } - return ''; -} -// calculates the minimum width of -// a column, based on padding preferences. -function _minWidth(col) { - const padding = col.padding || []; - const minWidth = 1 + (padding[left] || 0) + (padding[right] || 0); - if (col.border) { - return minWidth + 4; - } - return minWidth; -} -function getWindowWidth() { - /* c8 ignore start */ - if (typeof process === 'object' && process.stdout && process.stdout.columns) { - return process.stdout.columns; - } - return 80; -} -/* c8 ignore stop */ -function alignRight(str, width) { - str = str.trim(); - const strWidth = mixin.stringWidth(str); - if (strWidth < width) { - return ' '.repeat(width - strWidth) + str; - } - return str; -} -function alignCenter(str, width) { - str = str.trim(); - const strWidth = mixin.stringWidth(str); - /* c8 ignore start */ - if (strWidth >= width) { - return str; - } - /* c8 ignore stop */ - return ' '.repeat((width - strWidth) >> 1) + str; -} -let mixin; -export function cliui(opts, _mixin) { - mixin = _mixin; - return new UI({ - /* c8 ignore start */ - width: (opts === null || opts === void 0 ? void 0 : opts.width) || getWindowWidth(), - wrap: opts === null || opts === void 0 ? void 0 : opts.wrap - /* c8 ignore stop */ - }); -} diff --git a/deps/npm/node_modules/@isaacs/cliui/index.mjs b/deps/npm/node_modules/@isaacs/cliui/index.mjs deleted file mode 100644 index 5177519af37222..00000000000000 --- a/deps/npm/node_modules/@isaacs/cliui/index.mjs +++ /dev/null @@ -1,14 +0,0 @@ -// Bootstrap cliui with ESM dependencies: -import { cliui } from './build/lib/index.js' - -import stringWidth from 'string-width' -import stripAnsi from 'strip-ansi' -import wrap from 'wrap-ansi' - -export default function ui (opts) { - return cliui(opts, { - stringWidth, - stripAnsi, - wrap - }) -} diff --git a/deps/npm/node_modules/@isaacs/cliui/node_modules/ansi-regex/index.js b/deps/npm/node_modules/@isaacs/cliui/node_modules/ansi-regex/index.js deleted file mode 100644 index 130a0929b8ce8c..00000000000000 --- a/deps/npm/node_modules/@isaacs/cliui/node_modules/ansi-regex/index.js +++ /dev/null @@ -1,8 +0,0 @@ -export default function ansiRegex({onlyFirst = false} = {}) { - const pattern = [ - '[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)', - '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))' - ].join('|'); - - return new RegExp(pattern, onlyFirst ? undefined : 'g'); -} diff --git a/deps/npm/node_modules/@isaacs/cliui/node_modules/ansi-regex/license b/deps/npm/node_modules/@isaacs/cliui/node_modules/ansi-regex/license deleted file mode 100644 index fa7ceba3eb4a96..00000000000000 --- a/deps/npm/node_modules/@isaacs/cliui/node_modules/ansi-regex/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (https://sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/deps/npm/node_modules/@isaacs/cliui/node_modules/ansi-regex/package.json b/deps/npm/node_modules/@isaacs/cliui/node_modules/ansi-regex/package.json deleted file mode 100644 index 7bbb563bf2a70a..00000000000000 --- a/deps/npm/node_modules/@isaacs/cliui/node_modules/ansi-regex/package.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "name": "ansi-regex", - "version": "6.0.1", - "description": "Regular expression for matching ANSI escape codes", - "license": "MIT", - "repository": "chalk/ansi-regex", - "funding": "https://github.com/chalk/ansi-regex?sponsor=1", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "https://sindresorhus.com" - }, - "type": "module", - "exports": "./index.js", - "engines": { - "node": ">=12" - }, - "scripts": { - "test": "xo && ava && tsd", - "view-supported": "node fixtures/view-codes.js" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "keywords": [ - "ansi", - "styles", - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "string", - "tty", - "escape", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "command-line", - "text", - "regex", - "regexp", - "re", - "match", - "test", - "find", - "pattern" - ], - "devDependencies": { - "ava": "^3.15.0", - "tsd": "^0.14.0", - "xo": "^0.38.2" - } -} diff --git a/deps/npm/node_modules/@isaacs/cliui/node_modules/emoji-regex/LICENSE-MIT.txt b/deps/npm/node_modules/@isaacs/cliui/node_modules/emoji-regex/LICENSE-MIT.txt deleted file mode 100644 index a41e0a7ef970ec..00000000000000 --- a/deps/npm/node_modules/@isaacs/cliui/node_modules/emoji-regex/LICENSE-MIT.txt +++ /dev/null @@ -1,20 +0,0 @@ -Copyright Mathias Bynens - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/deps/npm/node_modules/@isaacs/cliui/node_modules/emoji-regex/RGI_Emoji.js b/deps/npm/node_modules/@isaacs/cliui/node_modules/emoji-regex/RGI_Emoji.js deleted file mode 100644 index 3fbe92410063f1..00000000000000 --- a/deps/npm/node_modules/@isaacs/cliui/node_modules/emoji-regex/RGI_Emoji.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; - -module.exports = function () { - // https://mths.be/emoji - return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\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uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uF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72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]/g; -}; diff --git a/deps/npm/node_modules/@isaacs/cliui/node_modules/emoji-regex/es2015/RGI_Emoji.js b/deps/npm/node_modules/@isaacs/cliui/node_modules/emoji-regex/es2015/RGI_Emoji.js deleted file mode 100644 index ecf32f177908c1..00000000000000 --- a/deps/npm/node_modules/@isaacs/cliui/node_modules/emoji-regex/es2015/RGI_Emoji.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; - -module.exports = () => { - // https://mths.be/emoji - return /\u{1F3F4}\u{E0067}\u{E0062}(?:\u{E0077}\u{E006C}\u{E0073}|\u{E0073}\u{E0063}\u{E0074}|\u{E0065}\u{E006E}\u{E0067})\u{E007F}|(?:\u{1F9D1}\u{1F3FF}\u200D\u2764\uFE0F\u200D(?:\u{1F48B}\u200D)?\u{1F9D1}|\u{1F469}\u{1F3FF}\u200D\u{1F91D}\u200D[\u{1F468}\u{1F469}])[\u{1F3FB}-\u{1F3FE}]|(?:\u{1F9D1}\u{1F3FE}\u200D\u2764\uFE0F\u200D(?:\u{1F48B}\u200D)?\u{1F9D1}|\u{1F469}\u{1F3FE}\u200D\u{1F91D}\u200D[\u{1F468}\u{1F469}])[\u{1F3FB}-\u{1F3FD}\u{1F3FF}]|(?:\u{1F9D1}\u{1F3FD}\u200D\u2764\uFE0F\u200D(?:\u{1F48B}\u200D)?\u{1F9D1}|\u{1F469}\u{1F3FD}\u200D\u{1F91D}\u200D[\u{1F468}\u{1F469}])[\u{1F3FB}\u{1F3FC}\u{1F3FE}\u{1F3FF}]|(?:\u{1F9D1}\u{1F3FC}\u200D\u2764\uFE0F\u200D(?:\u{1F48B}\u200D)?\u{1F9D1}|\u{1F469}\u{1F3FC}\u200D\u{1F91D}\u200D[\u{1F468}\u{1F469}])[\u{1F3FB}\u{1F3FD}-\u{1F3FF}]|(?:\u{1F9D1}\u{1F3FB}\u200D\u2764\uFE0F\u200D(?:\u{1F48B}\u200D)?\u{1F9D1}|\u{1F469}\u{1F3FB}\u200D\u{1F91D}\u200D[\u{1F468}\u{1F469}])[\u{1F3FC}-\u{1F3FF}]|\u{1F468}(?:\u{1F3FB}(?:\u200D(?:\u2764\uFE0F\u200D(?:\u{1F48B}\u200D\u{1F468}[\u{1F3FB}-\u{1F3FF}]|\u{1F468}[\u{1F3FB}-\u{1F3FF}])|\u{1F91D}\u200D\u{1F468}[\u{1F3FC}-\u{1F3FF}]|[\u2695\u2696\u2708]\uFE0F|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}]))?|[\u{1F3FC}-\u{1F3FF}]\u200D\u2764\uFE0F\u200D(?:\u{1F48B}\u200D\u{1F468}[\u{1F3FB}-\u{1F3FF}]|\u{1F468}[\u{1F3FB}-\u{1F3FF}])|\u200D(?:\u2764\uFE0F\u200D(?:\u{1F48B}\u200D)?\u{1F468}|[\u{1F468}\u{1F469}]\u200D(?:\u{1F466}\u200D\u{1F466}|\u{1F467}\u200D[\u{1F466}\u{1F467}])|\u{1F466}\u200D\u{1F466}|\u{1F467}\u200D[\u{1F466}\u{1F467}]|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FF}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}-\u{1F3FE}]|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FE}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}-\u{1F3FD}\u{1F3FF}]|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FD}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}\u{1F3FC}\u{1F3FE}\u{1F3FF}]|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FC}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}\u{1F3FD}-\u{1F3FF}]|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|(?:\u{1F3FF}\u200D[\u2695\u2696\u2708]|\u{1F3FE}\u200D[\u2695\u2696\u2708]|\u{1F3FD}\u200D[\u2695\u2696\u2708]|\u{1F3FC}\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:[\u{1F468}\u{1F469}]\u200D[\u{1F466}\u{1F467}]|[\u{1F466}\u{1F467}])|\u{1F3FF}|\u{1F3FE}|\u{1F3FD}|\u{1F3FC})?|(?:\u{1F469}(?:\u{1F3FB}\u200D\u2764\uFE0F\u200D(?:\u{1F48B}\u200D[\u{1F468}\u{1F469}]|[\u{1F468}\u{1F469}])|[\u{1F3FC}-\u{1F3FF}]\u200D\u2764\uFE0F\u200D(?:\u{1F48B}\u200D[\u{1F468}\u{1F469}]|[\u{1F468}\u{1F469}]))|\u{1F9D1}[\u{1F3FB}-\u{1F3FF}]\u200D\u{1F91D}\u200D\u{1F9D1})[\u{1F3FB}-\u{1F3FF}]|\u{1F469}\u200D\u{1F469}\u200D(?:\u{1F466}\u200D\u{1F466}|\u{1F467}\u200D[\u{1F466}\u{1F467}])|\u{1F469}(?:\u200D(?:\u2764\uFE0F\u200D(?:\u{1F48B}\u200D[\u{1F468}\u{1F469}]|[\u{1F468}\u{1F469}])|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FF}\u200D[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}]|\u{1F3FE}\u200D[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}]|\u{1F3FD}\u200D[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}]|\u{1F3FC}\u200D[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}]|\u{1F3FB}\u200D[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F9D1}(?:\u200D(?:\u{1F91D}\u200D\u{1F9D1}|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F384}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FF}\u200D[\u{1F33E}\u{1F373}\u{1F37C}\u{1F384}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}]|\u{1F3FE}\u200D[\u{1F33E}\u{1F373}\u{1F37C}\u{1F384}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}]|\u{1F3FD}\u200D[\u{1F33E}\u{1F373}\u{1F37C}\u{1F384}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}]|\u{1F3FC}\u200D[\u{1F33E}\u{1F373}\u{1F37C}\u{1F384}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}]|\u{1F3FB}\u200D[\u{1F33E}\u{1F373}\u{1F37C}\u{1F384}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F469}\u200D\u{1F466}\u200D\u{1F466}|\u{1F469}\u200D\u{1F469}\u200D[\u{1F466}\u{1F467}]|\u{1F469}\u200D\u{1F467}\u200D[\u{1F466}\u{1F467}]|(?:\u{1F441}\uFE0F\u200D\u{1F5E8}|\u{1F9D1}(?:\u{1F3FF}\u200D[\u2695\u2696\u2708]|\u{1F3FE}\u200D[\u2695\u2696\u2708]|\u{1F3FD}\u200D[\u2695\u2696\u2708]|\u{1F3FC}\u200D[\u2695\u2696\u2708]|\u{1F3FB}\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\u{1F469}(?:\u{1F3FF}\u200D[\u2695\u2696\u2708]|\u{1F3FE}\u200D[\u2695\u2696\u2708]|\u{1F3FD}\u200D[\u2695\u2696\u2708]|\u{1F3FC}\u200D[\u2695\u2696\u2708]|\u{1F3FB}\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\u{1F636}\u200D\u{1F32B}|\u{1F3F3}\uFE0F\u200D\u26A7|\u{1F43B}\u200D\u2744|(?:[\u{1F3C3}\u{1F3C4}\u{1F3CA}\u{1F46E}\u{1F470}\u{1F471}\u{1F473}\u{1F477}\u{1F481}\u{1F482}\u{1F486}\u{1F487}\u{1F645}-\u{1F647}\u{1F64B}\u{1F64D}\u{1F64E}\u{1F6A3}\u{1F6B4}-\u{1F6B6}\u{1F926}\u{1F935}\u{1F937}-\u{1F939}\u{1F93D}\u{1F93E}\u{1F9B8}\u{1F9B9}\u{1F9CD}-\u{1F9CF}\u{1F9D4}\u{1F9D6}-\u{1F9DD}][\u{1F3FB}-\u{1F3FF}]|[\u{1F46F}\u{1F93C}\u{1F9DE}\u{1F9DF}])\u200D[\u2640\u2642]|[\u26F9\u{1F3CB}\u{1F3CC}\u{1F575}][\uFE0F\u{1F3FB}-\u{1F3FF}]\u200D[\u2640\u2642]|\u{1F3F4}\u200D\u2620|[\u{1F3C3}\u{1F3C4}\u{1F3CA}\u{1F46E}\u{1F470}\u{1F471}\u{1F473}\u{1F477}\u{1F481}\u{1F482}\u{1F486}\u{1F487}\u{1F645}-\u{1F647}\u{1F64B}\u{1F64D}\u{1F64E}\u{1F6A3}\u{1F6B4}-\u{1F6B6}\u{1F926}\u{1F935}\u{1F937}-\u{1F939}\u{1F93D}\u{1F93E}\u{1F9B8}\u{1F9B9}\u{1F9CD}-\u{1F9CF}\u{1F9D4}\u{1F9D6}-\u{1F9DD}]\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299\u{1F170}\u{1F171}\u{1F17E}\u{1F17F}\u{1F202}\u{1F237}\u{1F321}\u{1F324}-\u{1F32C}\u{1F336}\u{1F37D}\u{1F396}\u{1F397}\u{1F399}-\u{1F39B}\u{1F39E}\u{1F39F}\u{1F3CD}\u{1F3CE}\u{1F3D4}-\u{1F3DF}\u{1F3F5}\u{1F3F7}\u{1F43F}\u{1F4FD}\u{1F549}\u{1F54A}\u{1F56F}\u{1F570}\u{1F573}\u{1F576}-\u{1F579}\u{1F587}\u{1F58A}-\u{1F58D}\u{1F5A5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{1F91C}\u{1F91E}\u{1F91F}\u{1F930}-\u{1F934}\u{1F936}\u{1F977}\u{1F9B5}\u{1F9B6}\u{1F9BB}\u{1F9D2}\u{1F9D3}\u{1F9D5}][\u{1F3FB}-\u{1F3FF}]|[\u261D\u270C\u270D\u{1F574}\u{1F590}][\uFE0F\u{1F3FB}-\u{1F3FF}]|[\u270A\u270B\u{1F385}\u{1F3C2}\u{1F3C7}\u{1F408}\u{1F415}\u{1F43B}\u{1F442}\u{1F443}\u{1F446}-\u{1F450}\u{1F466}\u{1F467}\u{1F46B}-\u{1F46D}\u{1F472}\u{1F474}-\u{1F476}\u{1F478}\u{1F47C}\u{1F483}\u{1F485}\u{1F48F}\u{1F491}\u{1F4AA}\u{1F57A}\u{1F595}\u{1F596}\u{1F62E}\u{1F635}\u{1F636}\u{1F64C}\u{1F64F}\u{1F6C0}\u{1F6CC}\u{1F90C}\u{1F90F}\u{1F918}-\u{1F91C}\u{1F91E}\u{1F91F}\u{1F930}-\u{1F934}\u{1F936}\u{1F977}\u{1F9B5}\u{1F9B6}\u{1F9BB}\u{1F9D2}\u{1F9D3}\u{1F9D5}]|[\u{1F3C3}\u{1F3C4}\u{1F3CA}\u{1F46E}\u{1F470}\u{1F471}\u{1F473}\u{1F477}\u{1F481}\u{1F482}\u{1F486}\u{1F487}\u{1F645}-\u{1F647}\u{1F64B}\u{1F64D}\u{1F64E}\u{1F6A3}\u{1F6B4}-\u{1F6B6}\u{1F926}\u{1F935}\u{1F937}-\u{1F939}\u{1F93D}\u{1F93E}\u{1F9B8}\u{1F9B9}\u{1F9CD}-\u{1F9CF}\u{1F9D4}\u{1F9D6}-\u{1F9DD}]|[\u{1F46F}\u{1F93C}\u{1F9DE}\u{1F9DF}]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55\u{1F004}\u{1F0CF}\u{1F18E}\u{1F191}-\u{1F19A}\u{1F201}\u{1F21A}\u{1F22F}\u{1F232}-\u{1F236}\u{1F238}-\u{1F23A}\u{1F250}\u{1F251}\u{1F300}-\u{1F320}\u{1F32D}-\u{1F335}\u{1F337}-\u{1F37C}\u{1F37E}-\u{1F384}\u{1F386}-\u{1F393}\u{1F3A0}-\u{1F3C1}\u{1F3C5}\u{1F3C6}\u{1F3C8}\u{1F3C9}\u{1F3CF}-\u{1F3D3}\u{1F3E0}-\u{1F3F0}\u{1F3F8}-\u{1F407}\u{1F409}-\u{1F414}\u{1F416}-\u{1F43A}\u{1F43C}-\u{1F43E}\u{1F440}\u{1F444}\u{1F445}\u{1F451}-\u{1F465}\u{1F46A}\u{1F479}-\u{1F47B}\u{1F47D}-\u{1F480}\u{1F484}\u{1F488}-\u{1F48E}\u{1F490}\u{1F492}-\u{1F4A9}\u{1F4AB}-\u{1F4FC}\u{1F4FF}-\u{1F53D}\u{1F54B}-\u{1F54E}\u{1F550}-\u{1F567}\u{1F5A4}\u{1F5FB}-\u{1F62D}\u{1F62F}-\u{1F634}\u{1F637}-\u{1F644}\u{1F648}-\u{1F64A}\u{1F680}-\u{1F6A2}\u{1F6A4}-\u{1F6B3}\u{1F6B7}-\u{1F6BF}\u{1F6C1}-\u{1F6C5}\u{1F6D0}-\u{1F6D2}\u{1F6D5}-\u{1F6D7}\u{1F6EB}\u{1F6EC}\u{1F6F4}-\u{1F6FC}\u{1F7E0}-\u{1F7EB}\u{1F90D}\u{1F90E}\u{1F910}-\u{1F917}\u{1F91D}\u{1F920}-\u{1F925}\u{1F927}-\u{1F92F}\u{1F93A}\u{1F93F}-\u{1F945}\u{1F947}-\u{1F976}\u{1F978}\u{1F97A}-\u{1F9B4}\u{1F9B7}\u{1F9BA}\u{1F9BC}-\u{1F9CB}\u{1F9D0}\u{1F9E0}-\u{1F9FF}\u{1FA70}-\u{1FA74}\u{1FA78}-\u{1FA7A}\u{1FA80}-\u{1FA86}\u{1FA90}-\u{1FAA8}\u{1FAB0}-\u{1FAB6}\u{1FAC0}-\u{1FAC2}\u{1FAD0}-\u{1FAD6}]/gu; -}; diff --git a/deps/npm/node_modules/@isaacs/cliui/node_modules/emoji-regex/es2015/index.js b/deps/npm/node_modules/@isaacs/cliui/node_modules/emoji-regex/es2015/index.js deleted file mode 100644 index 1a4fc8d0dcc322..00000000000000 --- a/deps/npm/node_modules/@isaacs/cliui/node_modules/emoji-regex/es2015/index.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; - -module.exports = () => { - // https://mths.be/emoji - return /\u{1F3F4}\u{E0067}\u{E0062}(?:\u{E0077}\u{E006C}\u{E0073}|\u{E0073}\u{E0063}\u{E0074}|\u{E0065}\u{E006E}\u{E0067})\u{E007F}|(?:\u{1F9D1}\u{1F3FF}\u200D\u2764\uFE0F\u200D(?:\u{1F48B}\u200D)?\u{1F9D1}|\u{1F469}\u{1F3FF}\u200D\u{1F91D}\u200D[\u{1F468}\u{1F469}])[\u{1F3FB}-\u{1F3FE}]|(?:\u{1F9D1}\u{1F3FE}\u200D\u2764\uFE0F\u200D(?:\u{1F48B}\u200D)?\u{1F9D1}|\u{1F469}\u{1F3FE}\u200D\u{1F91D}\u200D[\u{1F468}\u{1F469}])[\u{1F3FB}-\u{1F3FD}\u{1F3FF}]|(?:\u{1F9D1}\u{1F3FD}\u200D\u2764\uFE0F\u200D(?:\u{1F48B}\u200D)?\u{1F9D1}|\u{1F469}\u{1F3FD}\u200D\u{1F91D}\u200D[\u{1F468}\u{1F469}])[\u{1F3FB}\u{1F3FC}\u{1F3FE}\u{1F3FF}]|(?:\u{1F9D1}\u{1F3FC}\u200D\u2764\uFE0F\u200D(?:\u{1F48B}\u200D)?\u{1F9D1}|\u{1F469}\u{1F3FC}\u200D\u{1F91D}\u200D[\u{1F468}\u{1F469}])[\u{1F3FB}\u{1F3FD}-\u{1F3FF}]|(?:\u{1F9D1}\u{1F3FB}\u200D\u2764\uFE0F\u200D(?:\u{1F48B}\u200D)?\u{1F9D1}|\u{1F469}\u{1F3FB}\u200D\u{1F91D}\u200D[\u{1F468}\u{1F469}])[\u{1F3FC}-\u{1F3FF}]|\u{1F468}(?:\u{1F3FB}(?:\u200D(?:\u2764\uFE0F\u200D(?:\u{1F48B}\u200D\u{1F468}[\u{1F3FB}-\u{1F3FF}]|\u{1F468}[\u{1F3FB}-\u{1F3FF}])|\u{1F91D}\u200D\u{1F468}[\u{1F3FC}-\u{1F3FF}]|[\u2695\u2696\u2708]\uFE0F|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}]))?|[\u{1F3FC}-\u{1F3FF}]\u200D\u2764\uFE0F\u200D(?:\u{1F48B}\u200D\u{1F468}[\u{1F3FB}-\u{1F3FF}]|\u{1F468}[\u{1F3FB}-\u{1F3FF}])|\u200D(?:\u2764\uFE0F\u200D(?:\u{1F48B}\u200D)?\u{1F468}|[\u{1F468}\u{1F469}]\u200D(?:\u{1F466}\u200D\u{1F466}|\u{1F467}\u200D[\u{1F466}\u{1F467}])|\u{1F466}\u200D\u{1F466}|\u{1F467}\u200D[\u{1F466}\u{1F467}]|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FF}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}-\u{1F3FE}]|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FE}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}-\u{1F3FD}\u{1F3FF}]|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FD}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}\u{1F3FC}\u{1F3FE}\u{1F3FF}]|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FC}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}\u{1F3FD}-\u{1F3FF}]|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|(?:\u{1F3FF}\u200D[\u2695\u2696\u2708]|\u{1F3FE}\u200D[\u2695\u2696\u2708]|\u{1F3FD}\u200D[\u2695\u2696\u2708]|\u{1F3FC}\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:[\u{1F468}\u{1F469}]\u200D[\u{1F466}\u{1F467}]|[\u{1F466}\u{1F467}])|\u{1F3FF}|\u{1F3FE}|\u{1F3FD}|\u{1F3FC})?|(?:\u{1F469}(?:\u{1F3FB}\u200D\u2764\uFE0F\u200D(?:\u{1F48B}\u200D[\u{1F468}\u{1F469}]|[\u{1F468}\u{1F469}])|[\u{1F3FC}-\u{1F3FF}]\u200D\u2764\uFE0F\u200D(?:\u{1F48B}\u200D[\u{1F468}\u{1F469}]|[\u{1F468}\u{1F469}]))|\u{1F9D1}[\u{1F3FB}-\u{1F3FF}]\u200D\u{1F91D}\u200D\u{1F9D1})[\u{1F3FB}-\u{1F3FF}]|\u{1F469}\u200D\u{1F469}\u200D(?:\u{1F466}\u200D\u{1F466}|\u{1F467}\u200D[\u{1F466}\u{1F467}])|\u{1F469}(?:\u200D(?:\u2764\uFE0F\u200D(?:\u{1F48B}\u200D[\u{1F468}\u{1F469}]|[\u{1F468}\u{1F469}])|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FF}\u200D[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}]|\u{1F3FE}\u200D[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}]|\u{1F3FD}\u200D[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}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u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}]|\u{1F3FC}\u200D[\u{1F33E}\u{1F373}\u{1F37C}\u{1F384}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}]|\u{1F3FB}\u200D[\u{1F33E}\u{1F373}\u{1F37C}\u{1F384}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F469}\u200D\u{1F466}\u200D\u{1F466}|\u{1F469}\u200D\u{1F469}\u200D[\u{1F466}\u{1F467}]|\u{1F469}\u200D\u{1F467}\u200D[\u{1F466}\u{1F467}]|(?:\u{1F441}\uFE0F\u200D\u{1F5E8}|\u{1F9D1}(?:\u{1F3FF}\u200D[\u2695\u2696\u2708]|\u{1F3FE}\u200D[\u2695\u2696\u2708]|\u{1F3FD}\u200D[\u2695\u2696\u2708]|\u{1F3FC}\u200D[\u2695\u2696\u2708]|\u{1F3FB}\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\u{1F469}(?:\u{1F3FF}\u200D[\u2695\u2696\u2708]|\u{1F3FE}\u200D[\u2695\u2696\u2708]|\u{1F3FD}\u200D[\u2695\u2696\u2708]|\u{1F3FC}\u200D[\u2695\u2696\u2708]|\u{1F3FB}\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\u{1F636}\u200D\u{1F32B}|\u{1F3F3}\uFE0F\u200D\u26A7|\u{1F43B}\u200D\u2744|(?:[\u{1F3C3}\u{1F3C4}\u{1F3CA}\u{1F46E}\u{1F470}\u{1F471}\u{1F473}\u{1F477}\u{1F481}\u{1F482}\u{1F486}\u{1F487}\u{1F645}-\u{1F647}\u{1F64B}\u{1F64D}\u{1F64E}\u{1F6A3}\u{1F6B4}-\u{1F6B6}\u{1F926}\u{1F935}\u{1F937}-\u{1F939}\u{1F93D}\u{1F93E}\u{1F9B8}\u{1F9B9}\u{1F9CD}-\u{1F9CF}\u{1F9D4}\u{1F9D6}-\u{1F9DD}][\u{1F3FB}-\u{1F3FF}]|[\u{1F46F}\u{1F93C}\u{1F9DE}\u{1F9DF}])\u200D[\u2640\u2642]|[\u26F9\u{1F3CB}\u{1F3CC}\u{1F575}][\uFE0F\u{1F3FB}-\u{1F3FF}]\u200D[\u2640\u2642]|\u{1F3F4}\u200D\u2620|[\u{1F3C3}\u{1F3C4}\u{1F3CA}\u{1F46E}\u{1F470}\u{1F471}\u{1F473}\u{1F477}\u{1F481}\u{1F482}\u{1F486}\u{1F487}\u{1F645}-\u{1F647}\u{1F64B}\u{1F64D}\u{1F64E}\u{1F6A3}\u{1F6B4}-\u{1F6B6}\u{1F926}\u{1F935}\u{1F937}-\u{1F939}\u{1F93D}\u{1F93E}\u{1F9B8}\u{1F9B9}\u{1F9CD}-\u{1F9CF}\u{1F9D4}\u{1F9D6}-\u{1F9DD}]\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299\u{1F170}\u{1F171}\u{1F17E}\u{1F17F}\u{1F202}\u{1F237}\u{1F321}\u{1F324}-\u{1F32C}\u{1F336}\u{1F37D}\u{1F396}\u{1F397}\u{1F399}-\u{1F39B}\u{1F39E}\u{1F39F}\u{1F3CD}\u{1F3CE}\u{1F3D4}-\u{1F3DF}\u{1F3F5}\u{1F3F7}\u{1F43F}\u{1F4FD}\u{1F549}\u{1F54A}\u{1F56F}\u{1F570}\u{1F573}\u{1F576}-\u{1F579}\u{1F587}\u{1F58A}-\u{1F58D}\u{1F5A5}\u{1F5A8}\u{1F5B1}\u{1F5B2}\u{1F5BC}\u{1F5C2}-\u{1F5C4}\u{1F5D1}-\u{1F5D3}\u{1F5DC}-\u{1F5DE}\u{1F5E1}\u{1F5E3}\u{1F5E8}\u{1F5EF}\u{1F5F3}\u{1F5FA}\u{1F6CB}\u{1F6CD}-\u{1F6CF}\u{1F6E0}-\u{1F6E5}\u{1F6E9}\u{1F6F0}\u{1F6F3}])\uFE0F|\u{1F3F3}\uFE0F\u200D\u{1F308}|\u{1F469}\u200D\u{1F467}|\u{1F469}\u200D\u{1F466}|\u{1F635}\u200D\u{1F4AB}|\u{1F62E}\u200D\u{1F4A8}|\u{1F415}\u200D\u{1F9BA}|\u{1F9D1}(?:\u{1F3FF}|\u{1F3FE}|\u{1F3FD}|\u{1F3FC}|\u{1F3FB})?|\u{1F469}(?:\u{1F3FF}|\u{1F3FE}|\u{1F3FD}|\u{1F3FC}|\u{1F3FB})?|\u{1F1FD}\u{1F1F0}|\u{1F1F6}\u{1F1E6}|\u{1F1F4}\u{1F1F2}|\u{1F408}\u200D\u2B1B|\u2764\uFE0F\u200D[\u{1F525}\u{1FA79}]|\u{1F441}\uFE0F|\u{1F3F3}\uFE0F|\u{1F1FF}[\u{1F1E6}\u{1F1F2}\u{1F1FC}]|\u{1F1FE}[\u{1F1EA}\u{1F1F9}]|\u{1F1FC}[\u{1F1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\u26F9\u{1F3CB}\u{1F3CC}\u{1F575}][\uFE0F\u{1F3FB}-\u{1F3FF}]|\u{1F3F4}|[\u270A\u270B\u{1F385}\u{1F3C2}\u{1F3C7}\u{1F442}\u{1F443}\u{1F446}-\u{1F450}\u{1F466}\u{1F467}\u{1F46B}-\u{1F46D}\u{1F472}\u{1F474}-\u{1F476}\u{1F478}\u{1F47C}\u{1F483}\u{1F485}\u{1F48F}\u{1F491}\u{1F4AA}\u{1F57A}\u{1F595}\u{1F596}\u{1F64C}\u{1F64F}\u{1F6C0}\u{1F6CC}\u{1F90C}\u{1F90F}\u{1F918}-\u{1F91C}\u{1F91E}\u{1F91F}\u{1F930}-\u{1F934}\u{1F936}\u{1F977}\u{1F9B5}\u{1F9B6}\u{1F9BB}\u{1F9D2}\u{1F9D3}\u{1F9D5}][\u{1F3FB}-\u{1F3FF}]|[\u261D\u270C\u270D\u{1F574}\u{1F590}][\uFE0F\u{1F3FB}-\u{1F3FF}]|[\u270A\u270B\u{1F385}\u{1F3C2}\u{1F3C7}\u{1F408}\u{1F415}\u{1F43B}\u{1F442}\u{1F443}\u{1F446}-\u{1F450}\u{1F466}\u{1F467}\u{1F46B}-\u{1F46D}\u{1F472}\u{1F474}-\u{1F476}\u{1F478}\u{1F47C}\u{1F483}\u{1F485}\u{1F48F}\u{1F491}\u{1F4AA}\u{1F57A}\u{1F595}\u{1F596}\u{1F62E}\u{1F635}\u{1F636}\u{1F64C}\u{1F64F}\u{1F6C0}\u{1F6CC}\u{1F90C}\u{1F90F}\u{1F918}-\u{1F91C}\u{1F91E}\u{1F91F}\u{1F930}-\u{1F934}\u{1F936}\u{1F977}\u{1F9B5}\u{1F9B6}\u{1F9BB}\u{1F9D2}\u{1F9D3}\u{1F9D5}]|[\u{1F3C3}\u{1F3C4}\u{1F3CA}\u{1F46E}\u{1F470}\u{1F471}\u{1F473}\u{1F477}\u{1F481}\u{1F482}\u{1F486}\u{1F487}\u{1F645}-\u{1F647}\u{1F64B}\u{1F64D}\u{1F64E}\u{1F6A3}\u{1F6B4}-\u{1F6B6}\u{1F926}\u{1F935}\u{1F937}-\u{1F939}\u{1F93D}\u{1F93E}\u{1F9B8}\u{1F9B9}\u{1F9CD}-\u{1F9CF}\u{1F9D4}\u{1F9D6}-\u{1F9DD}]|[\u{1F46F}\u{1F93C}\u{1F9DE}\u{1F9DF}]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55\u{1F004}\u{1F0CF}\u{1F18E}\u{1F191}-\u{1F19A}\u{1F201}\u{1F21A}\u{1F22F}\u{1F232}-\u{1F236}\u{1F238}-\u{1F23A}\u{1F250}\u{1F251}\u{1F300}-\u{1F320}\u{1F32D}-\u{1F335}\u{1F337}-\u{1F37C}\u{1F37E}-\u{1F384}\u{1F386}-\u{1F393}\u{1F3A0}-\u{1F3C1}\u{1F3C5}\u{1F3C6}\u{1F3C8}\u{1F3C9}\u{1F3CF}-\u{1F3D3}\u{1F3E0}-\u{1F3F0}\u{1F3F8}-\u{1F407}\u{1F409}-\u{1F414}\u{1F416}-\u{1F43A}\u{1F43C}-\u{1F43E}\u{1F440}\u{1F444}\u{1F445}\u{1F451}-\u{1F465}\u{1F46A}\u{1F479}-\u{1F47B}\u{1F47D}-\u{1F480}\u{1F484}\u{1F488}-\u{1F48E}\u{1F490}\u{1F492}-\u{1F4A9}\u{1F4AB}-\u{1F4FC}\u{1F4FF}-\u{1F53D}\u{1F54B}-\u{1F54E}\u{1F550}-\u{1F567}\u{1F5A4}\u{1F5FB}-\u{1F62D}\u{1F62F}-\u{1F634}\u{1F637}-\u{1F644}\u{1F648}-\u{1F64A}\u{1F680}-\u{1F6A2}\u{1F6A4}-\u{1F6B3}\u{1F6B7}-\u{1F6BF}\u{1F6C1}-\u{1F6C5}\u{1F6D0}-\u{1F6D2}\u{1F6D5}-\u{1F6D7}\u{1F6EB}\u{1F6EC}\u{1F6F4}-\u{1F6FC}\u{1F7E0}-\u{1F7EB}\u{1F90D}\u{1F90E}\u{1F910}-\u{1F917}\u{1F91D}\u{1F920}-\u{1F925}\u{1F927}-\u{1F92F}\u{1F93A}\u{1F93F}-\u{1F945}\u{1F947}-\u{1F976}\u{1F978}\u{1F97A}-\u{1F9B4}\u{1F9B7}\u{1F9BA}\u{1F9BC}-\u{1F9CB}\u{1F9D0}\u{1F9E0}-\u{1F9FF}\u{1FA70}-\u{1FA74}\u{1FA78}-\u{1FA7A}\u{1FA80}-\u{1FA86}\u{1FA90}-\u{1FAA8}\u{1FAB0}-\u{1FAB6}\u{1FAC0}-\u{1FAC2}\u{1FAD0}-\u{1FAD6}]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55\u{1F004}\u{1F0CF}\u{1F18E}\u{1F191}-\u{1F19A}\u{1F1E6}-\u{1F1FF}\u{1F201}\u{1F21A}\u{1F22F}\u{1F232}-\u{1F236}\u{1F238}-\u{1F23A}\u{1F250}\u{1F251}\u{1F300}-\u{1F320}\u{1F32D}-\u{1F335}\u{1F337}-\u{1F37C}\u{1F37E}-\u{1F393}\u{1F3A0}-\u{1F3CA}\u{1F3CF}-\u{1F3D3}\u{1F3E0}-\u{1F3F0}\u{1F3F4}\u{1F3F8}-\u{1F43E}\u{1F440}\u{1F442}-\u{1F4FC}\u{1F4FF}-\u{1F53D}\u{1F54B}-\u{1F54E}\u{1F550}-\u{1F567}\u{1F57A}\u{1F595}\u{1F596}\u{1F5A4}\u{1F5FB}-\u{1F64F}\u{1F680}-\u{1F6C5}\u{1F6CC}\u{1F6D0}-\u{1F6D2}\u{1F6D5}-\u{1F6D7}\u{1F6EB}\u{1F6EC}\u{1F6F4}-\u{1F6FC}\u{1F7E0}-\u{1F7EB}\u{1F90C}-\u{1F93A}\u{1F93C}-\u{1F945}\u{1F947}-\u{1F978}\u{1F97A}-\u{1F9CB}\u{1F9CD}-\u{1F9FF}\u{1FA70}-\u{1FA74}\u{1FA78}-\u{1FA7A}\u{1FA80}-\u{1FA86}\u{1FA90}-\u{1FAA8}\u{1FAB0}-\u{1FAB6}\u{1FAC0}-\u{1FAC2}\u{1FAD0}-\u{1FAD6}]|[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299\u{1F004}\u{1F0CF}\u{1F170}\u{1F171}\u{1F17E}\u{1F17F}\u{1F18E}\u{1F191}-\u{1F19A}\u{1F1E6}-\u{1F1FF}\u{1F201}\u{1F202}\u{1F21A}\u{1F22F}\u{1F232}-\u{1F23A}\u{1F250}\u{1F251}\u{1F300}-\u{1F321}\u{1F324}-\u{1F393}\u{1F396}\u{1F397}\u{1F399}-\u{1F39B}\u{1F39E}-\u{1F3F0}\u{1F3F3}-\u{1F3F5}\u{1F3F7}-\u{1F4FD}\u{1F4FF}-\u{1F53D}\u{1F549}-\u{1F54E}\u{1F550}-\u{1F567}\u{1F56F}\u{1F570}\u{1F573}-\u{1F57A}\u{1F587}\u{1F58A}-\u{1F58D}\u{1F590}\u{1F595}\u{1F596}\u{1F5A4}\u{1F5A5}\u{1F5A8}\u{1F5B1}\u{1F5B2}\u{1F5BC}\u{1F5C2}-\u{1F5C4}\u{1F5D1}-\u{1F5D3}\u{1F5DC}-\u{1F5DE}\u{1F5E1}\u{1F5E3}\u{1F5E8}\u{1F5EF}\u{1F5F3}\u{1F5FA}-\u{1F64F}\u{1F680}-\u{1F6C5}\u{1F6CB}-\u{1F6D2}\u{1F6D5}-\u{1F6D7}\u{1F6E0}-\u{1F6E5}\u{1F6E9}\u{1F6EB}\u{1F6EC}\u{1F6F0}\u{1F6F3}-\u{1F6FC}\u{1F7E0}-\u{1F7EB}\u{1F90C}-\u{1F93A}\u{1F93C}-\u{1F945}\u{1F947}-\u{1F978}\u{1F97A}-\u{1F9CB}\u{1F9CD}-\u{1F9FF}\u{1FA70}-\u{1FA74}\u{1FA78}-\u{1FA7A}\u{1FA80}-\u{1FA86}\u{1FA90}-\u{1FAA8}\u{1FAB0}-\u{1FAB6}\u{1FAC0}-\u{1FAC2}\u{1FAD0}-\u{1FAD6}]\uFE0F|[\u261D\u26F9\u270A-\u270D\u{1F385}\u{1F3C2}-\u{1F3C4}\u{1F3C7}\u{1F3CA}-\u{1F3CC}\u{1F442}\u{1F443}\u{1F446}-\u{1F450}\u{1F466}-\u{1F478}\u{1F47C}\u{1F481}-\u{1F483}\u{1F485}-\u{1F487}\u{1F48F}\u{1F491}\u{1F4AA}\u{1F574}\u{1F575}\u{1F57A}\u{1F590}\u{1F595}\u{1F596}\u{1F645}-\u{1F647}\u{1F64B}-\u{1F64F}\u{1F6A3}\u{1F6B4}-\u{1F6B6}\u{1F6C0}\u{1F6CC}\u{1F90C}\u{1F90F}\u{1F918}-\u{1F91F}\u{1F926}\u{1F930}-\u{1F939}\u{1F93C}-\u{1F93E}\u{1F977}\u{1F9B5}\u{1F9B6}\u{1F9B8}\u{1F9B9}\u{1F9BB}\u{1F9CD}-\u{1F9CF}\u{1F9D1}-\u{1F9DD}]/gu; -}; diff --git a/deps/npm/node_modules/@isaacs/cliui/node_modules/emoji-regex/es2015/text.js b/deps/npm/node_modules/@isaacs/cliui/node_modules/emoji-regex/es2015/text.js deleted file mode 100644 index 8e9f9857583146..00000000000000 --- a/deps/npm/node_modules/@isaacs/cliui/node_modules/emoji-regex/es2015/text.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; - -module.exports = () => { - // https://mths.be/emoji - return /\u{1F3F4}\u{E0067}\u{E0062}(?:\u{E0077}\u{E006C}\u{E0073}|\u{E0073}\u{E0063}\u{E0074}|\u{E0065}\u{E006E}\u{E0067})\u{E007F}|(?:\u{1F9D1}\u{1F3FF}\u200D\u2764\uFE0F\u200D(?:\u{1F48B}\u200D)?\u{1F9D1}|\u{1F469}\u{1F3FF}\u200D\u{1F91D}\u200D[\u{1F468}\u{1F469}])[\u{1F3FB}-\u{1F3FE}]|(?:\u{1F9D1}\u{1F3FE}\u200D\u2764\uFE0F\u200D(?:\u{1F48B}\u200D)?\u{1F9D1}|\u{1F469}\u{1F3FE}\u200D\u{1F91D}\u200D[\u{1F468}\u{1F469}])[\u{1F3FB}-\u{1F3FD}\u{1F3FF}]|(?:\u{1F9D1}\u{1F3FD}\u200D\u2764\uFE0F\u200D(?:\u{1F48B}\u200D)?\u{1F9D1}|\u{1F469}\u{1F3FD}\u200D\u{1F91D}\u200D[\u{1F468}\u{1F469}])[\u{1F3FB}\u{1F3FC}\u{1F3FE}\u{1F3FF}]|(?:\u{1F9D1}\u{1F3FC}\u200D\u2764\uFE0F\u200D(?:\u{1F48B}\u200D)?\u{1F9D1}|\u{1F469}\u{1F3FC}\u200D\u{1F91D}\u200D[\u{1F468}\u{1F469}])[\u{1F3FB}\u{1F3FD}-\u{1F3FF}]|(?:\u{1F9D1}\u{1F3FB}\u200D\u2764\uFE0F\u200D(?:\u{1F48B}\u200D)?\u{1F9D1}|\u{1F469}\u{1F3FB}\u200D\u{1F91D}\u200D[\u{1F468}\u{1F469}])[\u{1F3FC}-\u{1F3FF}]|\u{1F468}(?:\u{1F3FB}(?:\u200D(?:\u2764\uFE0F\u200D(?:\u{1F48B}\u200D\u{1F468}[\u{1F3FB}-\u{1F3FF}]|\u{1F468}[\u{1F3FB}-\u{1F3FF}])|\u{1F91D}\u200D\u{1F468}[\u{1F3FC}-\u{1F3FF}]|[\u2695\u2696\u2708]\uFE0F|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}]))?|[\u{1F3FC}-\u{1F3FF}]\u200D\u2764\uFE0F\u200D(?:\u{1F48B}\u200D\u{1F468}[\u{1F3FB}-\u{1F3FF}]|\u{1F468}[\u{1F3FB}-\u{1F3FF}])|\u200D(?:\u2764\uFE0F\u200D(?:\u{1F48B}\u200D)?\u{1F468}|[\u{1F468}\u{1F469}]\u200D(?:\u{1F466}\u200D\u{1F466}|\u{1F467}\u200D[\u{1F466}\u{1F467}])|\u{1F466}\u200D\u{1F466}|\u{1F467}\u200D[\u{1F466}\u{1F467}]|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FF}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}-\u{1F3FE}]|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FE}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}-\u{1F3FD}\u{1F3FF}]|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FD}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}\u{1F3FC}\u{1F3FE}\u{1F3FF}]|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FC}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}\u{1F3FD}-\u{1F3FF}]|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|(?:\u{1F3FF}\u200D[\u2695\u2696\u2708]|\u{1F3FE}\u200D[\u2695\u2696\u2708]|\u{1F3FD}\u200D[\u2695\u2696\u2708]|\u{1F3FC}\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:[\u{1F468}\u{1F469}]\u200D[\u{1F466}\u{1F467}]|[\u{1F466}\u{1F467}])|\u{1F3FF}|\u{1F3FE}|\u{1F3FD}|\u{1F3FC})?|(?:\u{1F469}(?:\u{1F3FB}\u200D\u2764\uFE0F\u200D(?:\u{1F48B}\u200D[\u{1F468}\u{1F469}]|[\u{1F468}\u{1F469}])|[\u{1F3FC}-\u{1F3FF}]\u200D\u2764\uFE0F\u200D(?:\u{1F48B}\u200D[\u{1F468}\u{1F469}]|[\u{1F468}\u{1F469}]))|\u{1F9D1}[\u{1F3FB}-\u{1F3FF}]\u200D\u{1F91D}\u200D\u{1F9D1})[\u{1F3FB}-\u{1F3FF}]|\u{1F469}\u200D\u{1F469}\u200D(?:\u{1F466}\u200D\u{1F466}|\u{1F467}\u200D[\u{1F466}\u{1F467}])|\u{1F469}(?:\u200D(?:\u2764\uFE0F\u200D(?:\u{1F48B}\u200D[\u{1F468}\u{1F469}]|[\u{1F468}\u{1F469}])|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FF}\u200D[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}]|\u{1F3FE}\u200D[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B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1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}]|\u{1F3FD}\u200D[\u{1F33E}\u{1F373}\u{1F37C}\u{1F384}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}]|\u{1F3FC}\u200D[\u{1F33E}\u{1F373}\u{1F37C}\u{1F384}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}]|\u{1F3FB}\u200D[\u{1F33E}\u{1F373}\u{1F37C}\u{1F384}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F469}\u200D\u{1F466}\u200D\u{1F466}|\u{1F469}\u200D\u{1F469}\u200D[\u{1F466}\u{1F467}]|\u{1F469}\u200D\u{1F467}\u200D[\u{1F466}\u{1F467}]|(?:\u{1F441}\uFE0F\u200D\u{1F5E8}|\u{1F9D1}(?:\u{1F3FF}\u200D[\u2695\u2696\u2708]|\u{1F3FE}\u200D[\u2695\u2696\u2708]|\u{1F3FD}\u200D[\u2695\u2696\u2708]|\u{1F3FC}\u200D[\u2695\u2696\u2708]|\u{1F3FB}\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\u{1F469}(?:\u{1F3FF}\u200D[\u2695\u2696\u2708]|\u{1F3FE}\u200D[\u2695\u2696\u2708]|\u{1F3FD}\u200D[\u2695\u2696\u2708]|\u{1F3FC}\u200D[\u2695\u2696\u2708]|\u{1F3FB}\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\u{1F636}\u200D\u{1F32B}|\u{1F3F3}\uFE0F\u200D\u26A7|\u{1F43B}\u200D\u2744|(?:[\u{1F3C3}\u{1F3C4}\u{1F3CA}\u{1F46E}\u{1F470}\u{1F471}\u{1F473}\u{1F477}\u{1F481}\u{1F482}\u{1F486}\u{1F487}\u{1F645}-\u{1F647}\u{1F64B}\u{1F64D}\u{1F64E}\u{1F6A3}\u{1F6B4}-\u{1F6B6}\u{1F926}\u{1F935}\u{1F937}-\u{1F939}\u{1F93D}\u{1F93E}\u{1F9B8}\u{1F9B9}\u{1F9CD}-\u{1F9CF}\u{1F9D4}\u{1F9D6}-\u{1F9DD}][\u{1F3FB}-\u{1F3FF}]|[\u{1F46F}\u{1F93C}\u{1F9DE}\u{1F9DF}])\u200D[\u2640\u2642]|[\u26F9\u{1F3CB}\u{1F3CC}\u{1F575}][\uFE0F\u{1F3FB}-\u{1F3FF}]\u200D[\u2640\u2642]|\u{1F3F4}\u200D\u2620|[\u{1F3C3}\u{1F3C4}\u{1F3CA}\u{1F46E}\u{1F470}\u{1F471}\u{1F473}\u{1F477}\u{1F481}\u{1F482}\u{1F486}\u{1F487}\u{1F645}-\u{1F647}\u{1F64B}\u{1F64D}\u{1F64E}\u{1F6A3}\u{1F6B4}-\u{1F6B6}\u{1F926}\u{1F935}\u{1F937}-\u{1F939}\u{1F93D}\u{1F93E}\u{1F9B8}\u{1F9B9}\u{1F9CD}-\u{1F9CF}\u{1F9D4}\u{1F9D6}-\u{1F9DD}]\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299\u{1F170}\u{1F171}\u{1F17E}\u{1F17F}\u{1F202}\u{1F237}\u{1F321}\u{1F324}-\u{1F32C}\u{1F336}\u{1F37D}\u{1F396}\u{1F397}\u{1F399}-\u{1F39B}\u{1F39E}\u{1F39F}\u{1F3CD}\u{1F3CE}\u{1F3D4}-\u{1F3DF}\u{1F3F5}\u{1F3F7}\u{1F43F}\u{1F4FD}\u{1F549}\u{1F54A}\u{1F56F}\u{1F570}\u{1F573}\u{1F576}-\u{1F579}\u{1F587}\u{1F58A}-\u{1F58D}\u{1F5A5}\u{1F5A8}\u{1F5B1}\u{1F5B2}\u{1F5BC}\u{1F5C2}-\u{1F5C4}\u{1F5D1}-\u{1F5D3}\u{1F5DC}-\u{1F5DE}\u{1F5E1}\u{1F5E3}\u{1F5E8}\u{1F5EF}\u{1F5F3}\u{1F5FA}\u{1F6CB}\u{1F6CD}-\u{1F6CF}\u{1F6E0}-\u{1F6E5}\u{1F6E9}\u{1F6F0}\u{1F6F3}])\uFE0F|\u{1F3F3}\uFE0F\u200D\u{1F308}|\u{1F469}\u200D\u{1F467}|\u{1F469}\u200D\u{1F466}|\u{1F635}\u200D\u{1F4AB}|\u{1F62E}\u200D\u{1F4A8}|\u{1F415}\u200D\u{1F9BA}|\u{1F9D1}(?:\u{1F3FF}|\u{1F3FE}|\u{1F3FD}|\u{1F3FC}|\u{1F3FB})?|\u{1F469}(?:\u{1F3FF}|\u{1F3FE}|\u{1F3FD}|\u{1F3FC}|\u{1F3FB})?|\u{1F1FD}\u{1F1F0}|\u{1F1F6}\u{1F1E6}|\u{1F1F4}\u{1F1F2}|\u{1F408}\u200D\u2B1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1F6B4}-\u{1F6B6}\u{1F926}\u{1F935}\u{1F937}-\u{1F939}\u{1F93D}\u{1F93E}\u{1F9B8}\u{1F9B9}\u{1F9CD}-\u{1F9CF}\u{1F9D4}\u{1F9D6}-\u{1F9DD}][\u{1F3FB}-\u{1F3FF}]|[\u26F9\u{1F3CB}\u{1F3CC}\u{1F575}][\uFE0F\u{1F3FB}-\u{1F3FF}]|\u{1F3F4}|[\u270A\u270B\u{1F385}\u{1F3C2}\u{1F3C7}\u{1F442}\u{1F443}\u{1F446}-\u{1F450}\u{1F466}\u{1F467}\u{1F46B}-\u{1F46D}\u{1F472}\u{1F474}-\u{1F476}\u{1F478}\u{1F47C}\u{1F483}\u{1F485}\u{1F48F}\u{1F491}\u{1F4AA}\u{1F57A}\u{1F595}\u{1F596}\u{1F64C}\u{1F64F}\u{1F6C0}\u{1F6CC}\u{1F90C}\u{1F90F}\u{1F918}-\u{1F91C}\u{1F91E}\u{1F91F}\u{1F930}-\u{1F934}\u{1F936}\u{1F977}\u{1F9B5}\u{1F9B6}\u{1F9BB}\u{1F9D2}\u{1F9D3}\u{1F9D5}][\u{1F3FB}-\u{1F3FF}]|[\u261D\u270C\u270D\u{1F574}\u{1F590}][\uFE0F\u{1F3FB}-\u{1F3FF}]|[\u270A\u270B\u{1F385}\u{1F3C2}\u{1F3C7}\u{1F408}\u{1F415}\u{1F43B}\u{1F442}\u{1F443}\u{1F446}-\u{1F450}\u{1F466}\u{1F467}\u{1F46B}-\u{1F46D}\u{1F472}\u{1F474}-\u{1F476}\u{1F478}\u{1F47C}\u{1F483}\u{1F485}\u{1F48F}\u{1F491}\u{1F4AA}\u{1F57A}\u{1F595}\u{1F596}\u{1F62E}\u{1F635}\u{1F636}\u{1F64C}\u{1F64F}\u{1F6C0}\u{1F6CC}\u{1F90C}\u{1F90F}\u{1F918}-\u{1F91C}\u{1F91E}\u{1F91F}\u{1F930}-\u{1F934}\u{1F936}\u{1F977}\u{1F9B5}\u{1F9B6}\u{1F9BB}\u{1F9D2}\u{1F9D3}\u{1F9D5}]|[\u{1F3C3}\u{1F3C4}\u{1F3CA}\u{1F46E}\u{1F470}\u{1F471}\u{1F473}\u{1F477}\u{1F481}\u{1F482}\u{1F486}\u{1F487}\u{1F645}-\u{1F647}\u{1F64B}\u{1F64D}\u{1F64E}\u{1F6A3}\u{1F6B4}-\u{1F6B6}\u{1F926}\u{1F935}\u{1F937}-\u{1F939}\u{1F93D}\u{1F93E}\u{1F9B8}\u{1F9B9}\u{1F9CD}-\u{1F9CF}\u{1F9D4}\u{1F9D6}-\u{1F9DD}]|[\u{1F46F}\u{1F93C}\u{1F9DE}\u{1F9DF}]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55\u{1F004}\u{1F0CF}\u{1F18E}\u{1F191}-\u{1F19A}\u{1F201}\u{1F21A}\u{1F22F}\u{1F232}-\u{1F236}\u{1F238}-\u{1F23A}\u{1F250}\u{1F251}\u{1F300}-\u{1F320}\u{1F32D}-\u{1F335}\u{1F337}-\u{1F37C}\u{1F37E}-\u{1F384}\u{1F386}-\u{1F393}\u{1F3A0}-\u{1F3C1}\u{1F3C5}\u{1F3C6}\u{1F3C8}\u{1F3C9}\u{1F3CF}-\u{1F3D3}\u{1F3E0}-\u{1F3F0}\u{1F3F8}-\u{1F407}\u{1F409}-\u{1F414}\u{1F416}-\u{1F43A}\u{1F43C}-\u{1F43E}\u{1F440}\u{1F444}\u{1F445}\u{1F451}-\u{1F465}\u{1F46A}\u{1F479}-\u{1F47B}\u{1F47D}-\u{1F480}\u{1F484}\u{1F488}-\u{1F48E}\u{1F490}\u{1F492}-\u{1F4A9}\u{1F4AB}-\u{1F4FC}\u{1F4FF}-\u{1F53D}\u{1F54B}-\u{1F54E}\u{1F550}-\u{1F567}\u{1F5A4}\u{1F5FB}-\u{1F62D}\u{1F62F}-\u{1F634}\u{1F637}-\u{1F644}\u{1F648}-\u{1F64A}\u{1F680}-\u{1F6A2}\u{1F6A4}-\u{1F6B3}\u{1F6B7}-\u{1F6BF}\u{1F6C1}-\u{1F6C5}\u{1F6D0}-\u{1F6D2}\u{1F6D5}-\u{1F6D7}\u{1F6EB}\u{1F6EC}\u{1F6F4}-\u{1F6FC}\u{1F7E0}-\u{1F7EB}\u{1F90D}\u{1F90E}\u{1F910}-\u{1F917}\u{1F91D}\u{1F920}-\u{1F925}\u{1F927}-\u{1F92F}\u{1F93A}\u{1F93F}-\u{1F945}\u{1F947}-\u{1F976}\u{1F978}\u{1F97A}-\u{1F9B4}\u{1F9B7}\u{1F9BA}\u{1F9BC}-\u{1F9CB}\u{1F9D0}\u{1F9E0}-\u{1F9FF}\u{1FA70}-\u{1FA74}\u{1FA78}-\u{1FA7A}\u{1FA80}-\u{1FA86}\u{1FA90}-\u{1FAA8}\u{1FAB0}-\u{1FAB6}\u{1FAC0}-\u{1FAC2}\u{1FAD0}-\u{1FAD6}]|[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299\u{1F004}\u{1F0CF}\u{1F170}\u{1F171}\u{1F17E}\u{1F17F}\u{1F18E}\u{1F191}-\u{1F19A}\u{1F1E6}-\u{1F1FF}\u{1F201}\u{1F202}\u{1F21A}\u{1F22F}\u{1F232}-\u{1F23A}\u{1F250}\u{1F251}\u{1F300}-\u{1F321}\u{1F324}-\u{1F393}\u{1F396}\u{1F397}\u{1F399}-\u{1F39B}\u{1F39E}-\u{1F3F0}\u{1F3F3}-\u{1F3F5}\u{1F3F7}-\u{1F4FD}\u{1F4FF}-\u{1F53D}\u{1F549}-\u{1F54E}\u{1F550}-\u{1F567}\u{1F56F}\u{1F570}\u{1F573}-\u{1F57A}\u{1F587}\u{1F58A}-\u{1F58D}\u{1F590}\u{1F595}\u{1F596}\u{1F5A4}\u{1F5A5}\u{1F5A8}\u{1F5B1}\u{1F5B2}\u{1F5BC}\u{1F5C2}-\u{1F5C4}\u{1F5D1}-\u{1F5D3}\u{1F5DC}-\u{1F5DE}\u{1F5E1}\u{1F5E3}\u{1F5E8}\u{1F5EF}\u{1F5F3}\u{1F5FA}-\u{1F64F}\u{1F680}-\u{1F6C5}\u{1F6CB}-\u{1F6D2}\u{1F6D5}-\u{1F6D7}\u{1F6E0}-\u{1F6E5}\u{1F6E9}\u{1F6EB}\u{1F6EC}\u{1F6F0}\u{1F6F3}-\u{1F6FC}\u{1F7E0}-\u{1F7EB}\u{1F90C}-\u{1F93A}\u{1F93C}-\u{1F945}\u{1F947}-\u{1F978}\u{1F97A}-\u{1F9CB}\u{1F9CD}-\u{1F9FF}\u{1FA70}-\u{1FA74}\u{1FA78}-\u{1FA7A}\u{1FA80}-\u{1FA86}\u{1FA90}-\u{1FAA8}\u{1FAB0}-\u{1FAB6}\u{1FAC0}-\u{1FAC2}\u{1FAD0}-\u{1FAD6}]\uFE0F?/gu; -}; diff --git a/deps/npm/node_modules/@isaacs/cliui/node_modules/emoji-regex/index.js b/deps/npm/node_modules/@isaacs/cliui/node_modules/emoji-regex/index.js deleted file mode 100644 index c0490d4c95ac30..00000000000000 --- a/deps/npm/node_modules/@isaacs/cliui/node_modules/emoji-regex/index.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; - -module.exports = function () { - // https://mths.be/emoji - return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\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DFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCF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76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g; -}; diff --git a/deps/npm/node_modules/@isaacs/cliui/node_modules/emoji-regex/package.json b/deps/npm/node_modules/@isaacs/cliui/node_modules/emoji-regex/package.json deleted file mode 100644 index eac892a16a253b..00000000000000 --- a/deps/npm/node_modules/@isaacs/cliui/node_modules/emoji-regex/package.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "name": "emoji-regex", - "version": "9.2.2", - "description": "A regular expression to match all Emoji-only symbols as per the Unicode Standard.", - "homepage": "https://mths.be/emoji-regex", - "main": "index.js", - "types": "index.d.ts", - "keywords": [ - "unicode", - "regex", - "regexp", - "regular expressions", - "code points", - "symbols", - "characters", - "emoji" - ], - "license": "MIT", - "author": { - "name": "Mathias Bynens", - "url": "https://mathiasbynens.be/" - }, - "repository": { - "type": "git", - "url": "https://github.com/mathiasbynens/emoji-regex.git" - }, - "bugs": "https://github.com/mathiasbynens/emoji-regex/issues", - "files": [ - "LICENSE-MIT.txt", - "index.js", - "index.d.ts", - "RGI_Emoji.js", - "RGI_Emoji.d.ts", - "text.js", - "text.d.ts", - "es2015" - ], - "scripts": { - "build": "rm -rf -- es2015; babel src -d .; NODE_ENV=es2015 babel src es2015_types -D -d ./es2015; node script/inject-sequences.js", - "test": "mocha", - "test:watch": "npm run test -- --watch" - }, - "devDependencies": { - "@babel/cli": "^7.4.4", - "@babel/core": "^7.4.4", - "@babel/plugin-proposal-unicode-property-regex": "^7.4.4", - "@babel/preset-env": "^7.4.4", - "@unicode/unicode-13.0.0": "^1.0.3", - "mocha": "^6.1.4", - "regexgen": "^1.3.0" - } -} diff --git a/deps/npm/node_modules/@isaacs/cliui/node_modules/emoji-regex/text.js b/deps/npm/node_modules/@isaacs/cliui/node_modules/emoji-regex/text.js deleted file mode 100644 index 9bc63ce74753f9..00000000000000 --- a/deps/npm/node_modules/@isaacs/cliui/node_modules/emoji-regex/text.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; - -module.exports = function () { - // https://mths.be/emoji - return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA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\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C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]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F?/g; -}; diff --git a/deps/npm/node_modules/@isaacs/cliui/node_modules/string-width/index.js b/deps/npm/node_modules/@isaacs/cliui/node_modules/string-width/index.js deleted file mode 100644 index 9294488f884882..00000000000000 --- a/deps/npm/node_modules/@isaacs/cliui/node_modules/string-width/index.js +++ /dev/null @@ -1,54 +0,0 @@ -import stripAnsi from 'strip-ansi'; -import eastAsianWidth from 'eastasianwidth'; -import emojiRegex from 'emoji-regex'; - -export default function stringWidth(string, options = {}) { - if (typeof string !== 'string' || string.length === 0) { - return 0; - } - - options = { - ambiguousIsNarrow: true, - ...options - }; - - string = stripAnsi(string); - - if (string.length === 0) { - return 0; - } - - string = string.replace(emojiRegex(), ' '); - - const ambiguousCharacterWidth = options.ambiguousIsNarrow ? 1 : 2; - let width = 0; - - for (const character of string) { - const codePoint = character.codePointAt(0); - - // Ignore control characters - if (codePoint <= 0x1F || (codePoint >= 0x7F && codePoint <= 0x9F)) { - continue; - } - - // Ignore combining characters - if (codePoint >= 0x300 && codePoint <= 0x36F) { - continue; - } - - const code = eastAsianWidth.eastAsianWidth(character); - switch (code) { - case 'F': - case 'W': - width += 2; - break; - case 'A': - width += ambiguousCharacterWidth; - break; - default: - width += 1; - } - } - - return width; -} diff --git a/deps/npm/node_modules/@isaacs/cliui/node_modules/string-width/license b/deps/npm/node_modules/@isaacs/cliui/node_modules/string-width/license deleted file mode 100644 index fa7ceba3eb4a96..00000000000000 --- a/deps/npm/node_modules/@isaacs/cliui/node_modules/string-width/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (https://sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/deps/npm/node_modules/@isaacs/cliui/node_modules/string-width/package.json b/deps/npm/node_modules/@isaacs/cliui/node_modules/string-width/package.json deleted file mode 100644 index f46d6770f9ebb2..00000000000000 --- a/deps/npm/node_modules/@isaacs/cliui/node_modules/string-width/package.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "name": "string-width", - "version": "5.1.2", - "description": "Get the visual width of a string - the number of columns required to display it", - "license": "MIT", - "repository": "sindresorhus/string-width", - "funding": "https://github.com/sponsors/sindresorhus", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "https://sindresorhus.com" - }, - "type": "module", - "exports": "./index.js", - "engines": { - "node": ">=12" - }, - "scripts": { - "test": "xo && ava && tsd" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "keywords": [ - "string", - "character", - "unicode", - "width", - "visual", - "column", - "columns", - "fullwidth", - "full-width", - "full", - "ansi", - "escape", - "codes", - "cli", - "command-line", - "terminal", - "console", - "cjk", - "chinese", - "japanese", - "korean", - "fixed-width" - ], - "dependencies": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^9.2.2", - "strip-ansi": "^7.0.1" - }, - "devDependencies": { - "ava": "^3.15.0", - "tsd": "^0.14.0", - "xo": "^0.38.2" - } -} diff --git a/deps/npm/node_modules/@isaacs/cliui/node_modules/strip-ansi/index.js b/deps/npm/node_modules/@isaacs/cliui/node_modules/strip-ansi/index.js deleted file mode 100644 index ef3c095f5fd422..00000000000000 --- a/deps/npm/node_modules/@isaacs/cliui/node_modules/strip-ansi/index.js +++ /dev/null @@ -1,9 +0,0 @@ -import ansiRegex from 'ansi-regex'; - -export default function stripAnsi(string) { - if (typeof string !== 'string') { - throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``); - } - - return string.replace(ansiRegex(), ''); -} diff --git a/deps/npm/node_modules/@isaacs/cliui/node_modules/strip-ansi/license b/deps/npm/node_modules/@isaacs/cliui/node_modules/strip-ansi/license deleted file mode 100644 index fa7ceba3eb4a96..00000000000000 --- a/deps/npm/node_modules/@isaacs/cliui/node_modules/strip-ansi/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (https://sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/deps/npm/node_modules/@isaacs/cliui/node_modules/strip-ansi/package.json b/deps/npm/node_modules/@isaacs/cliui/node_modules/strip-ansi/package.json deleted file mode 100644 index 0de0586f7eef10..00000000000000 --- a/deps/npm/node_modules/@isaacs/cliui/node_modules/strip-ansi/package.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "name": "strip-ansi", - "version": "7.0.1", - "description": "Strip ANSI escape codes from a string", - "license": "MIT", - "repository": "chalk/strip-ansi", - "funding": "https://github.com/chalk/strip-ansi?sponsor=1", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "https://sindresorhus.com" - }, - "type": "module", - "exports": "./index.js", - "engines": { - "node": ">=12" - }, - "scripts": { - "test": "xo && ava && tsd" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "keywords": [ - "strip", - "trim", - "remove", - "ansi", - "styles", - "color", - "colour", - "colors", - "terminal", - "console", - "string", - "tty", - "escape", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "log", - "logging", - "command-line", - "text" - ], - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "devDependencies": { - "ava": "^3.15.0", - "tsd": "^0.17.0", - "xo": "^0.44.0" - } -} diff --git a/deps/npm/node_modules/@isaacs/cliui/package.json b/deps/npm/node_modules/@isaacs/cliui/package.json deleted file mode 100644 index 7a952532def5d4..00000000000000 --- a/deps/npm/node_modules/@isaacs/cliui/package.json +++ /dev/null @@ -1,86 +0,0 @@ -{ - "name": "@isaacs/cliui", - "version": "8.0.2", - "description": "easily create complex multi-column command-line-interfaces", - "main": "build/index.cjs", - "exports": { - ".": [ - { - "import": "./index.mjs", - "require": "./build/index.cjs" - }, - "./build/index.cjs" - ] - }, - "type": "module", - "module": "./index.mjs", - "scripts": { - "check": "standardx '**/*.ts' && standardx '**/*.js' && standardx '**/*.cjs'", - "fix": "standardx --fix '**/*.ts' && standardx --fix '**/*.js' && standardx --fix '**/*.cjs'", - "pretest": "rimraf build && tsc -p tsconfig.test.json && cross-env NODE_ENV=test npm run build:cjs", - "test": "c8 mocha ./test/*.cjs", - "test:esm": "c8 mocha ./test/**/*.mjs", - "postest": "check", - "coverage": "c8 report --check-coverage", - "precompile": "rimraf build", - "compile": "tsc", - "postcompile": "npm run build:cjs", - "build:cjs": "rollup -c", - "prepare": "npm run compile" - }, - "repository": "yargs/cliui", - "standard": { - "ignore": [ - "**/example/**" - ], - "globals": [ - "it" - ] - }, - "keywords": [ - "cli", - "command-line", - "layout", - "design", - "console", - "wrap", - "table" - ], - "author": "Ben Coe ", - "license": "ISC", - "dependencies": { - "string-width": "^5.1.2", - "string-width-cjs": "npm:string-width@^4.2.0", - "strip-ansi": "^7.0.1", - "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", - "wrap-ansi": "^8.1.0", - "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" - }, - "devDependencies": { - "@types/node": "^14.0.27", - "@typescript-eslint/eslint-plugin": "^4.0.0", - "@typescript-eslint/parser": "^4.0.0", - "c8": "^7.3.0", - "chai": "^4.2.0", - "chalk": "^4.1.0", - "cross-env": "^7.0.2", - "eslint": "^7.6.0", - "eslint-plugin-import": "^2.22.0", - "eslint-plugin-node": "^11.1.0", - "gts": "^3.0.0", - "mocha": "^10.0.0", - "rimraf": "^3.0.2", - "rollup": "^2.23.1", - "rollup-plugin-ts": "^3.0.2", - "standardx": "^7.0.0", - "typescript": "^4.0.0" - }, - "files": [ - "build", - "index.mjs", - "!*.d.ts" - ], - "engines": { - "node": ">=12" - } -} diff --git a/deps/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js b/deps/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js index d04ddf27b69650..0d936d8ef77689 100644 --- a/deps/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js +++ b/deps/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js @@ -31,75 +31,75 @@ const Link = require('../link.js') const addRmPkgDeps = require('../add-rm-pkg-deps.js') const optionalSet = require('../optional-set.js') const { checkEngine, checkPlatform } = require('npm-install-checks') + const relpath = require('../relpath.js') -const resetDepFlags = require('../reset-dep-flags.js') // note: some of these symbols are shared so we can hit // them with unit tests and reuse them across mixins +const _complete = Symbol('complete') +const _depsSeen = Symbol('depsSeen') +const _depsQueue = Symbol('depsQueue') +const _currentDep = Symbol('currentDep') const _updateAll = Symbol.for('updateAll') +const _mutateTree = Symbol('mutateTree') const _flagsSuspect = Symbol.for('flagsSuspect') const _workspaces = Symbol.for('workspaces') -const _setWorkspaces = Symbol.for('setWorkspaces') +const _prune = Symbol('prune') +const _preferDedupe = Symbol('preferDedupe') +const _parseSettings = Symbol('parseSettings') +const _initTree = Symbol('initTree') +const _applyUserRequests = Symbol('applyUserRequests') +const _applyUserRequestsToNode = Symbol('applyUserRequestsToNode') +const _inflateAncientLockfile = Symbol('inflateAncientLockfile') +const _buildDeps = Symbol('buildDeps') +const _buildDepStep = Symbol('buildDepStep') +const _nodeFromEdge = Symbol('nodeFromEdge') +const _nodeFromSpec = Symbol('nodeFromSpec') +const _fetchManifest = Symbol('fetchManifest') +const _problemEdges = Symbol('problemEdges') +const _manifests = Symbol('manifests') +const _loadWorkspaces = Symbol.for('loadWorkspaces') +const _linkFromSpec = Symbol('linkFromSpec') +const _loadPeerSet = Symbol('loadPeerSet') const _updateNames = Symbol.for('updateNames') +const _fixDepFlags = Symbol('fixDepFlags') +const _resolveLinks = Symbol('resolveLinks') +const _rootNodeFromPackage = Symbol('rootNodeFromPackage') +const _add = Symbol('add') const _resolvedAdd = Symbol.for('resolvedAdd') +const _queueNamedUpdates = Symbol('queueNamedUpdates') +const _queueVulnDependents = Symbol('queueVulnDependents') +const _avoidRange = Symbol('avoidRange') +const _shouldUpdateNode = Symbol('shouldUpdateNode') +const resetDepFlags = require('../reset-dep-flags.js') +const _loadFailures = Symbol('loadFailures') +const _pruneFailedOptional = Symbol('pruneFailedOptional') +const _linkNodes = Symbol('linkNodes') +const _follow = Symbol('follow') +const _installStrategy = Symbol('installStrategy') +const _globalRootNode = Symbol('globalRootNode') const _usePackageLock = Symbol.for('usePackageLock') const _rpcache = Symbol.for('realpathCache') const _stcache = Symbol.for('statCache') +const _strictPeerDeps = Symbol('strictPeerDeps') +const _checkEngineAndPlatform = Symbol('checkEngineAndPlatform') +const _virtualRoots = Symbol('virtualRoots') +const _virtualRoot = Symbol('virtualRoot') const _includeWorkspaceRoot = Symbol.for('includeWorkspaceRoot') +const _failPeerConflict = Symbol('failPeerConflict') +const _explainPeerConflict = Symbol('explainPeerConflict') +const _edgesOverridden = Symbol('edgesOverridden') // exposed symbol for unit testing the placeDep method directly const _peerSetSource = Symbol.for('peerSetSource') // used by Reify mixin const _force = Symbol.for('force') +const _explicitRequests = Symbol('explicitRequests') const _global = Symbol.for('global') const _idealTreePrune = Symbol.for('idealTreePrune') -// Push items in, pop them sorted by depth and then path -class DepsQueue { - #deps = [] - #sorted = true - - get length () { - return this.#deps.length - } - - push (item) { - if (!this.#deps.includes(item)) { - this.#sorted = false - this.#deps.push(item) - } - } - - pop () { - if (!this.#sorted) { - // sort physically shallower deps up to the front of the queue, because - // they'll affect things deeper in, then alphabetical - this.#deps.sort((a, b) => - (a.depth - b.depth) || localeCompare(a.path, b.path)) - this.#sorted = true - } - return this.#deps.shift() - } -} - module.exports = cls => class IdealTreeBuilder extends cls { - #complete - #currentDep = null - #depsQueue = new DepsQueue() - #depsSeen = new Set() - #explicitRequests = new Set() - #follow - #installStrategy - #linkNodes = new Set() - #loadFailures = new Set() - #manifests = new Map() - #mutateTree = false - #preferDedupe = false - #prune - #strictPeerDeps - #virtualRoots = new Map() - constructor (options) { super(options) @@ -123,7 +123,7 @@ module.exports = cls => class IdealTreeBuilder extends cls { this[_workspaces] = workspaces || [] this[_force] = !!force - this.#strictPeerDeps = !!strictPeerDeps + this[_strictPeerDeps] = !!strictPeerDeps this.idealTree = idealTree this.installLinks = installLinks @@ -131,27 +131,38 @@ module.exports = cls => class IdealTreeBuilder extends cls { this[_usePackageLock] = packageLock this[_global] = !!global - this.#installStrategy = global ? 'shallow' : installStrategy - this.#follow = !!follow + this[_installStrategy] = global ? 'shallow' : installStrategy + this[_follow] = !!follow if (this[_workspaces].length && this[_global]) { throw new Error('Cannot operate on workspaces in global mode') } - this[_updateAll] = false + this[_explicitRequests] = new Set() + this[_preferDedupe] = false + this[_depsSeen] = new Set() + this[_depsQueue] = [] + this[_currentDep] = null this[_updateNames] = [] + this[_updateAll] = false + this[_mutateTree] = false + this[_loadFailures] = new Set() + this[_linkNodes] = new Set() + this[_manifests] = new Map() + this[_edgesOverridden] = new Set() this[_resolvedAdd] = [] // a map of each module in a peer set to the thing that depended on // that set of peers in the first place. Use a WeakMap so that we // don't hold onto references for nodes that are garbage collected. this[_peerSetSource] = new WeakMap() + this[_virtualRoots] = new Map() this[_includeWorkspaceRoot] = includeWorkspaceRoot } get explicitRequests () { - return new Set(this.#explicitRequests) + return new Set(this[_explicitRequests]) } // public method @@ -184,19 +195,19 @@ module.exports = cls => class IdealTreeBuilder extends cls { // from there, we start adding nodes to it to satisfy the deps requested // by the package.json in the root. - this.#parseSettings(options) + this[_parseSettings](options) // start tracker block this.addTracker('idealTree') try { - await this.#initTree() - await this.#inflateAncientLockfile() - await this.#applyUserRequests(options) - await this.#buildDeps() - await this.#fixDepFlags() - await this.#pruneFailedOptional() - await this.#checkEngineAndPlatform() + await this[_initTree]() + await this[_inflateAncientLockfile]() + await this[_applyUserRequests](options) + await this[_buildDeps]() + await this[_fixDepFlags]() + await this[_pruneFailedOptional]() + await this[_checkEngineAndPlatform]() } finally { process.emit('timeEnd', 'idealTree') this.finishTracker('idealTree') @@ -205,7 +216,7 @@ module.exports = cls => class IdealTreeBuilder extends cls { return treeCheck(this.idealTree) } - async #checkEngineAndPlatform () { + async [_checkEngineAndPlatform] () { const { engineStrict, npmVersion, nodeVersion } = this.options for (const node of this.idealTree.inventory.values()) { if (!node.optional) { @@ -226,7 +237,7 @@ module.exports = cls => class IdealTreeBuilder extends cls { } } - #parseSettings (options) { + [_parseSettings] (options) { const update = options.update === true ? { all: true } : Array.isArray(options.update) ? { names: options.update } : options.update || {} @@ -235,8 +246,8 @@ module.exports = cls => class IdealTreeBuilder extends cls { update.names = [] } - this.#complete = !!options.complete - this.#preferDedupe = !!options.preferDedupe + this[_complete] = !!options.complete + this[_preferDedupe] = !!options.preferDedupe // validates list of update names, they must // be dep names only, no semver ranges are supported @@ -256,11 +267,11 @@ module.exports = cls => class IdealTreeBuilder extends cls { this[_updateAll] = update.all // we prune by default unless explicitly set to boolean false - this.#prune = options.prune !== false + this[_prune] = options.prune !== false // set if we add anything, but also set here if we know we'll make // changes and thus have to maybe prune later. - this.#mutateTree = !!( + this[_mutateTree] = !!( options.add || options.rm || update.all || @@ -270,23 +281,20 @@ module.exports = cls => class IdealTreeBuilder extends cls { // load the initial tree, either the virtualTree from a shrinkwrap, // or just the root node from a package.json - async #initTree () { + [_initTree] () { process.emit('time', 'idealTree:init') - let root - if (this[_global]) { - root = await this.#globalRootNode() - } else { - try { - const pkg = await rpj(this.path + '/package.json') - root = await this.#rootNodeFromPackage(pkg) - } catch (err) { - if (err.code === 'EJSONPARSE') { - throw err + return ( + this[_global] ? this[_globalRootNode]() + : rpj(this.path + '/package.json').then( + pkg => this[_rootNodeFromPackage](pkg), + er => { + if (er.code === 'EJSONPARSE') { + throw er + } + return this[_rootNodeFromPackage]({}) } - root = await this.#rootNodeFromPackage({}) - } - } - return this[_setWorkspaces](root) + )) + .then(root => this[_loadWorkspaces](root)) // ok to not have a virtual tree. probably initial install. // When updating all, we load the shrinkwrap, but don't bother // to build out the full virtual tree from it, since we'll be @@ -328,18 +336,12 @@ module.exports = cls => class IdealTreeBuilder extends cls { // the depsQueue so that we'll fix it later depth({ tree, - getChildren: (node) => { - const children = [] - for (const edge of node.edgesOut.values()) { - children.push(edge.to) - } - return children - }, + getChildren: (node) => [...node.edgesOut.values()].map(edge => edge.to), filter: node => node, visit: node => { for (const edge of node.edgesOut.values()) { if (!edge.valid) { - this.#depsQueue.push(node) + this[_depsQueue].push(node) break // no need to continue the loop after the first hit } } @@ -354,8 +356,8 @@ module.exports = cls => class IdealTreeBuilder extends cls { }) } - async #globalRootNode () { - const root = await this.#rootNodeFromPackage({ dependencies: {} }) + async [_globalRootNode] () { + const root = await this[_rootNodeFromPackage]({ dependencies: {} }) // this is a gross kludge to handle the fact that we don't save // metadata on the root node in global installs, because the "root" // node is something like /usr/local/lib. @@ -369,7 +371,7 @@ module.exports = cls => class IdealTreeBuilder extends cls { return root } - async #rootNodeFromPackage (pkg) { + async [_rootNodeFromPackage] (pkg) { // if the path doesn't exist, then we explode at this point. Note that // this is not a problem for reify(), since it creates the root path // before ever loading trees. @@ -412,19 +414,19 @@ module.exports = cls => class IdealTreeBuilder extends cls { // process the add/rm requests by modifying the root node, and the // update.names request by queueing nodes dependent on those named. - async #applyUserRequests (options) { + async [_applyUserRequests] (options) { process.emit('time', 'idealTree:userRequests') const tree = this.idealTree.target if (!this[_workspaces].length) { - await this.#applyUserRequestsToNode(tree, options) + await this[_applyUserRequestsToNode](tree, options) } else { const nodes = this.workspaceNodes(tree, this[_workspaces]) if (this[_includeWorkspaceRoot]) { nodes.push(tree) } const appliedRequests = nodes.map( - node => this.#applyUserRequestsToNode(node, options) + node => this[_applyUserRequestsToNode](node, options) ) await Promise.all(appliedRequests) } @@ -432,12 +434,12 @@ module.exports = cls => class IdealTreeBuilder extends cls { process.emit('timeEnd', 'idealTree:userRequests') } - async #applyUserRequestsToNode (tree, options) { + async [_applyUserRequestsToNode] (tree, options) { // If we have a list of package names to update, and we know it's // going to update them wherever they are, add any paths into those // named nodes to the buildIdealTree queue. if (!this[_global] && this[_updateNames].length) { - this.#queueNamedUpdates() + this[_queueNamedUpdates]() } // global updates only update the globalTop nodes, but we need to know @@ -446,8 +448,7 @@ module.exports = cls => class IdealTreeBuilder extends cls { if (this[_global] && (this[_updateAll] || this[_updateNames].length)) { const nm = resolve(this.path, 'node_modules') const paths = await readdirScoped(nm).catch(() => []) - for (const p of paths) { - const name = p.replace(/\\/g, '/') + for (const name of paths.map((p) => p.replace(/\\/g, '/'))) { tree.package.dependencies = tree.package.dependencies || {} const updateName = this[_updateNames].includes(name) if (this[_updateAll] || updateName) { @@ -469,7 +470,7 @@ module.exports = cls => class IdealTreeBuilder extends cls { } if (this.auditReport && this.auditReport.size > 0) { - await this.#queueVulnDependents(options) + await this[_queueVulnDependents](options) } const { add, rm } = options @@ -477,12 +478,12 @@ module.exports = cls => class IdealTreeBuilder extends cls { if (rm && rm.length) { addRmPkgDeps.rm(tree.package, rm) for (const name of rm) { - this.#explicitRequests.add({ from: tree, name, action: 'DELETE' }) + this[_explicitRequests].add({ from: tree, name, action: 'DELETE' }) } } if (add && add.length) { - await this.#add(tree, options) + await this[_add](tree, options) } // triggers a refresh of all edgesOut. this has to be done BEFORE @@ -494,19 +495,19 @@ module.exports = cls => class IdealTreeBuilder extends cls { for (const spec of this[_resolvedAdd]) { if (spec.tree === tree) { - this.#explicitRequests.add(tree.edgesOut.get(spec.name)) + this[_explicitRequests].add(tree.edgesOut.get(spec.name)) } } for (const name of globalExplicitUpdateNames) { - this.#explicitRequests.add(tree.edgesOut.get(name)) + this[_explicitRequests].add(tree.edgesOut.get(name)) } - this.#depsQueue.push(tree) + this[_depsQueue].push(tree) } // This returns a promise because we might not have the name yet, and need to // call pacote.manifest to find the name. - async #add (tree, { add, saveType = null, saveBundle = false }) { + async [_add] (tree, { add, saveType = null, saveBundle = false }) { // If we have a link it will need to be added relative to the target's path const path = tree.target.path @@ -563,7 +564,7 @@ module.exports = cls => class IdealTreeBuilder extends cls { // what's in the bundle at each published manifest. Without that, we // can't possibly fix bundled deps without breaking a ton of other stuff, // and leaving the user subject to getting it overwritten later anyway. - async #queueVulnDependents (options) { + async [_queueVulnDependents] (options) { for (const vuln of this.auditReport.values()) { for (const node of vuln.nodes) { const bundler = node.getBundler() @@ -583,7 +584,7 @@ module.exports = cls => class IdealTreeBuilder extends cls { for (const edge of node.edgesIn) { this.addTracker('idealTree', edge.from.name, edge.from.location) - this.#depsQueue.push(edge.from) + this[_depsQueue].push(edge.from) } } } @@ -628,7 +629,7 @@ module.exports = cls => class IdealTreeBuilder extends cls { log.warn('audit', `Updating ${fixName} to ${version}, ` + `which is ${breakingMessage}.`) - await this.#add(node, { add: [`${fixName}@${version}`] }) + await this[_add](node, { add: [`${fixName}@${version}`] }) nodesTouched.add(node) } } @@ -638,7 +639,7 @@ module.exports = cls => class IdealTreeBuilder extends cls { } } - #avoidRange (name) { + [_avoidRange] (name) { if (!this.auditReport) { return null } @@ -649,7 +650,7 @@ module.exports = cls => class IdealTreeBuilder extends cls { return vuln.range } - #queueNamedUpdates () { + [_queueNamedUpdates] () { // ignore top nodes, since they are not loaded the same way, and // probably have their own project associated with them. @@ -660,19 +661,25 @@ module.exports = cls => class IdealTreeBuilder extends cls { // XXX this could be faster by doing a series of inventory.query('name') // calls rather than walking over everything in the tree. - for (const node of this.idealTree.inventory.values()) { - // XXX add any invalid edgesOut to the queue - if (this[_updateNames].includes(node.name) && - !node.isTop && !node.inDepBundle && !node.inShrinkwrap) { - for (const edge of node.edgesIn) { - this.addTracker('idealTree', edge.from.name, edge.from.location) - this.#depsQueue.push(edge.from) - } + const set = this.idealTree.inventory + .filter(n => this[_shouldUpdateNode](n)) + // XXX add any invalid edgesOut to the queue + for (const node of set) { + for (const edge of node.edgesIn) { + this.addTracker('idealTree', edge.from.name, edge.from.location) + this[_depsQueue].push(edge.from) } } } - async #inflateAncientLockfile () { + [_shouldUpdateNode] (node) { + return this[_updateNames].includes(node.name) && + !node.isTop && + !node.inDepBundle && + !node.inShrinkwrap + } + + async [_inflateAncientLockfile] () { const { meta, inventory } = this.idealTree const ancient = meta.ancientLockfile const old = meta.loadedFromDisk && !(meta.originalLockfileVersion >= 2) @@ -757,33 +764,38 @@ This is a one-time fix-up, please be patient... // at this point we have a virtual tree with the actual root node's // package deps, which may be partly or entirely incomplete, invalid // or extraneous. - #buildDeps () { + [_buildDeps] () { process.emit('time', 'idealTree:buildDeps') const tree = this.idealTree.target tree.assertRootOverrides() - this.#depsQueue.push(tree) + this[_depsQueue].push(tree) // XXX also push anything that depends on a node with a name // in the override list log.silly('idealTree', 'buildDeps') this.addTracker('idealTree', tree.name, '') - return this.#buildDepStep() + return this[_buildDepStep]() .then(() => process.emit('timeEnd', 'idealTree:buildDeps')) } - async #buildDepStep () { + async [_buildDepStep] () { // removes tracker of previous dependency in the queue - if (this.#currentDep) { - const { location, name } = this.#currentDep + if (this[_currentDep]) { + const { location, name } = this[_currentDep] process.emit('timeEnd', `idealTree:${location || '#root'}`) this.finishTracker('idealTree', name, location) - this.#currentDep = null + this[_currentDep] = null } - if (!this.#depsQueue.length) { - return this.#resolveLinks() + if (!this[_depsQueue].length) { + return this[_resolveLinks]() } - const node = this.#depsQueue.pop() + // sort physically shallower deps up to the front of the queue, + // because they'll affect things deeper in, then alphabetical + this[_depsQueue].sort((a, b) => + (a.depth - b.depth) || localeCompare(a.path, b.path)) + + const node = this[_depsQueue].shift() const bd = node.package.bundleDependencies const hasBundle = bd && Array.isArray(bd) && bd.length const { hasShrinkwrap } = node @@ -792,14 +804,14 @@ This is a one-time fix-up, please be patient... // tree, skip over it and process the rest of the queue. If a node has // a shrinkwrap, also skip it, because it's going to get its deps // satisfied by whatever's in that file anyway. - if (this.#depsSeen.has(node) || + if (this[_depsSeen].has(node) || node.root !== this.idealTree || - hasShrinkwrap && !this.#complete) { - return this.#buildDepStep() + hasShrinkwrap && !this[_complete]) { + return this[_buildDepStep]() } - this.#depsSeen.add(node) - this.#currentDep = node + this[_depsSeen].add(node) + this[_currentDep] = node process.emit('time', `idealTree:${node.location || '#root'}`) // if we're loading a _complete_ ideal tree, for a --package-lock-only @@ -809,7 +821,7 @@ This is a one-time fix-up, please be patient... // ideal tree by reading bundles/shrinkwraps in place. // Don't bother if the node is from the actual tree and hasn't // been resolved, because we can't fetch it anyway, could be anything! - const crackOpen = this.#complete && + const crackOpen = this[_complete] && node !== this.idealTree && node.resolved && (hasBundle || hasShrinkwrap) @@ -879,7 +891,7 @@ This is a one-time fix-up, please be patient... const tasks = [] const peerSource = this[_peerSetSource].get(node) || node - for (const edge of this.#problemEdges(node)) { + for (const edge of this[_problemEdges](node)) { if (edge.peerConflicted) { continue } @@ -890,7 +902,7 @@ This is a one-time fix-up, please be patient... // so we VR the node itself if the edge is not a peer const source = edge.peer ? peerSource : node - const virtualRoot = this.#virtualRoot(source, true) + const virtualRoot = this[_virtualRoot](source, true) // reuse virtual root if we already have one, but don't // try to do the override ahead of time, since we MAY be able // to create a more correct tree than the virtual root could. @@ -914,7 +926,7 @@ This is a one-time fix-up, please be patient... const required = new Set([edge.from]) const parent = edge.peer ? virtualRoot : null const dep = vrDep && vrDep.satisfies(edge) ? vrDep - : await this.#nodeFromEdge(edge, parent, null, required) + : await this[_nodeFromEdge](edge, parent, null, required) /* istanbul ignore next */ debug(() => { @@ -926,24 +938,25 @@ This is a one-time fix-up, please be patient... tasks.push({ edge, dep }) } - const placeDeps = tasks.sort((a, b) => localeCompare(a.edge.name, b.edge.name)) - - const promises = [] - for (const { edge, dep } of placeDeps) { - const pd = new PlaceDep({ + const placeDeps = tasks + .sort((a, b) => localeCompare(a.edge.name, b.edge.name)) + .map(({ edge, dep }) => new PlaceDep({ edge, dep, auditReport: this.auditReport, - explicitRequest: this.#explicitRequests.has(edge), + explicitRequest: this[_explicitRequests].has(edge), force: this[_force], installLinks: this.installLinks, - installStrategy: this.#installStrategy, + installStrategy: this[_installStrategy], legacyPeerDeps: this.legacyPeerDeps, - preferDedupe: this.#preferDedupe, - strictPeerDeps: this.#strictPeerDeps, + preferDedupe: this[_preferDedupe], + strictPeerDeps: this[_strictPeerDeps], updateNames: this[_updateNames], - }) + })) + + const promises = [] + for (const pd of placeDeps) { // placing a dep is actually a tree of placing the dep itself // and all of its peer group that aren't already met by the tree depth({ @@ -958,18 +971,18 @@ This is a one-time fix-up, please be patient... // we placed something, that means we changed the tree if (placed.errors.length) { - this.#loadFailures.add(placed) + this[_loadFailures].add(placed) } - this.#mutateTree = true + this[_mutateTree] = true if (cpd.canPlaceSelf === OK) { for (const edgeIn of placed.edgesIn) { if (edgeIn === edge) { continue } const { from, valid, peerConflicted } = edgeIn - if (!peerConflicted && !valid && !this.#depsSeen.has(from)) { + if (!peerConflicted && !valid && !this[_depsSeen].has(from)) { this.addTracker('idealTree', from.name, from.location) - this.#depsQueue.push(edgeIn.from) + this[_depsQueue].push(edgeIn.from) } } } else { @@ -987,8 +1000,8 @@ This is a one-time fix-up, please be patient... if (!valid && !peerConflicted) { // if it's already been visited, we have to re-visit // otherwise, just enqueue normally. - this.#depsSeen.delete(edgeIn.from) - this.#depsQueue.push(edgeIn.from) + this[_depsSeen].delete(edgeIn.from) + this[_depsQueue].push(edgeIn.from) } } } @@ -1005,48 +1018,45 @@ This is a one-time fix-up, please be patient... // lastly, also check for the missing deps of the node we placed, // and any holes created by pruning out conflicted peer sets. - this.#depsQueue.push(placed) + this[_depsQueue].push(placed) for (const dep of pd.needEvaluation) { - this.#depsSeen.delete(dep) - this.#depsQueue.push(dep) + this[_depsSeen].delete(dep) + this[_depsQueue].push(dep) } // pre-fetch any problem edges, since we'll need these soon // if it fails at this point, though, dont' worry because it // may well be an optional dep that has gone missing. it'll // fail later anyway. - for (const e of this.#problemEdges(placed)) { - promises.push( - this.#fetchManifest(npa.resolve(e.name, e.spec, fromPath(placed, e))) - .catch(er => null) - ) - } + promises.push(...this[_problemEdges](placed).map(e => + this[_fetchManifest](npa.resolve(e.name, e.spec, fromPath(placed, e))) + .catch(er => null))) }, }) } for (const { to } of node.edgesOut.values()) { if (to && to.isLink && to.target) { - this.#linkNodes.add(to) + this[_linkNodes].add(to) } } await Promise.all(promises) - return this.#buildDepStep() + return this[_buildDepStep]() } // loads a node from an edge, and then loads its peer deps (and their // peer deps, on down the line) into a virtual root parent. - async #nodeFromEdge (edge, parent_, secondEdge, required) { + async [_nodeFromEdge] (edge, parent_, secondEdge, required) { // create a virtual root node with the same deps as the node that // is requesting this one, so that we can get all the peer deps in // a context where they're likely to be resolvable. // Note that the virtual root will also have virtual copies of the // targets of any child Links, so that they resolve appropriately. - const parent = parent_ || this.#virtualRoot(edge.from) + const parent = parent_ || this[_virtualRoot](edge.from) const spec = npa.resolve(edge.name, edge.spec, edge.from.path) - const first = await this.#nodeFromSpec(edge.name, spec, parent, edge) + const first = await this[_nodeFromSpec](edge.name, spec, parent, edge) // we might have a case where the parent has a peer dependency on // `foo@*` which resolves to v2, but another dep in the set has a @@ -1061,7 +1071,7 @@ This is a one-time fix-up, please be patient... secondEdge.from.path ) const second = secondEdge && !secondEdge.valid - ? await this.#nodeFromSpec(edge.name, spec2, parent, secondEdge) + ? await this[_nodeFromSpec](edge.name, spec2, parent, secondEdge) : null // pick the second one if they're both happy with that, otherwise first @@ -1088,12 +1098,12 @@ This is a one-time fix-up, please be patient... } // otherwise, we have to make sure that our peers can go along with us. - return this.#loadPeerSet(node, required) + return this[_loadPeerSet](node, required) } - #virtualRoot (node, reuse = false) { - if (reuse && this.#virtualRoots.has(node)) { - return this.#virtualRoots.get(node) + [_virtualRoot] (node, reuse = false) { + if (reuse && this[_virtualRoots].has(node)) { + return this[_virtualRoots].get(node) } const vr = new Node({ @@ -1116,11 +1126,11 @@ This is a one-time fix-up, please be patient... } } - this.#virtualRoots.set(node, vr) + this[_virtualRoots].set(node, vr) return vr } - #problemEdges (node) { + [_problemEdges] (node) { // skip over any bundled deps, they're not our problem. // Note that this WILL fetch bundled meta-deps which are also dependencies // but not listed as bundled deps. When reifying, we first unpack any @@ -1135,90 +1145,85 @@ This is a one-time fix-up, please be patient... : node.package.bundleDependencies const bundled = new Set(bd || []) - const problems = [] - for (const edge of node.edgesOut.values()) { - // If it's included in a bundle, we take whatever is specified. - if (bundled.has(edge.name)) { - continue - } + return [...node.edgesOut.values()] + .filter(edge => { + // If it's included in a bundle, we take whatever is specified. + if (bundled.has(edge.name)) { + return false + } - // If it's already been logged as a load failure, skip it. - if (edge.to && this.#loadFailures.has(edge.to)) { - continue - } + // If it's already been logged as a load failure, skip it. + if (edge.to && this[_loadFailures].has(edge.to)) { + return false + } - // If it's shrinkwrapped, we use what the shrinkwap wants. - if (edge.to && edge.to.inShrinkwrap) { - continue - } + // If it's shrinkwrapped, we use what the shrinkwap wants. + if (edge.to && edge.to.inShrinkwrap) { + return false + } - // If the edge has no destination, that's a problem, unless - // if it's peerOptional and not explicitly requested. - if (!edge.to) { - if (edge.type !== 'peerOptional' || - this.#explicitRequests.has(edge)) { - problems.push(edge) + // If the edge has no destination, that's a problem, unless + // if it's peerOptional and not explicitly requested. + if (!edge.to) { + return edge.type !== 'peerOptional' || + this[_explicitRequests].has(edge) } - continue - } - // If the edge has an error, there's a problem. - if (!edge.valid) { - problems.push(edge) - continue - } + // If the edge has an error, there's a problem. + if (!edge.valid) { + return true + } - // If the edge is a workspace, and it's valid, leave it alone - if (edge.to.isWorkspace) { - continue - } + // If the edge is a workspace, and it's valid, leave it alone + if (edge.to.isWorkspace) { + return false + } - // user explicitly asked to update this package by name, problem - if (this[_updateNames].includes(edge.name)) { - problems.push(edge) - continue - } + // user explicitly asked to update this package by name, problem + if (this[_updateNames].includes(edge.name)) { + return true + } - // fixing a security vulnerability with this package, problem - if (this.auditReport && this.auditReport.isVulnerable(edge.to)) { - problems.push(edge) - continue - } + // fixing a security vulnerability with this package, problem + if (this.auditReport && this.auditReport.isVulnerable(edge.to)) { + return true + } - // user has explicitly asked to install this package, problem - if (this.#explicitRequests.has(edge)) { - problems.push(edge) - continue - } - } - return problems + // user has explicitly asked to install this package, problem + if (this[_explicitRequests].has(edge)) { + return true + } + + // No problems! + return false + }) } - async #fetchManifest (spec) { + async [_fetchManifest] (spec) { const options = { ...this.options, - avoid: this.#avoidRange(spec.name), + avoid: this[_avoidRange](spec.name), } // get the intended spec and stored metadata from yarn.lock file, // if available and valid. spec = this.idealTree.meta.checkYarnLock(spec, options) - if (this.#manifests.has(spec.raw)) { - return this.#manifests.get(spec.raw) + if (this[_manifests].has(spec.raw)) { + return this[_manifests].get(spec.raw) } else { const cleanRawSpec = cleanUrl(spec.rawSpec) log.silly('fetch manifest', spec.raw.replace(spec.rawSpec, cleanRawSpec)) const p = pacote.manifest(spec, options) .then(mani => { - this.#manifests.set(spec.raw, mani) + this[_manifests].set(spec.raw, mani) return mani }) - this.#manifests.set(spec.raw, p) + this[_manifests].set(spec.raw, p) return p } } - #nodeFromSpec (name, spec, parent, edge) { + [_nodeFromSpec] (name, spec, parent, edge) { // pacote will slap integrity on its options, so we have to clone // the object so it doesn't get mutated. // Don't bother to load the manifest for link deps, because the target @@ -1229,7 +1234,7 @@ This is a one-time fix-up, please be patient... // spec is a directory, link it unless installLinks is set or it's a workspace // TODO post arborist refactor, will need to check for installStrategy=linked if (spec.type === 'directory' && (isWorkspace || !installLinks)) { - return this.#linkFromSpec(name, spec, parent, edge) + return this[_linkFromSpec](name, spec, parent, edge) } // if the spec matches a workspace name, then see if the workspace node will @@ -1244,7 +1249,7 @@ This is a one-time fix-up, please be patient... // spec isn't a directory, and either isn't a workspace or the workspace we have // doesn't satisfy the edge. try to fetch a manifest and build a node from that. - return this.#fetchManifest(spec) + return this[_fetchManifest](spec) .then(pkg => new Node({ name, pkg, parent, installLinks, legacyPeerDeps }), error => { error.requiredBy = edge.from.location || '.' @@ -1258,17 +1263,17 @@ This is a one-time fix-up, please be patient... installLinks, legacyPeerDeps, }) - this.#loadFailures.add(n) + this[_loadFailures].add(n) return n }) } - #linkFromSpec (name, spec, parent, edge) { + [_linkFromSpec] (name, spec, parent, edge) { const realpath = spec.fetchSpec const { installLinks, legacyPeerDeps } = this return rpj(realpath + '/package.json').catch(() => ({})).then(pkg => { const link = new Link({ name, parent, realpath, pkg, installLinks, legacyPeerDeps }) - this.#linkNodes.add(link) + this[_linkNodes].add(link) return link }) } @@ -1286,7 +1291,7 @@ This is a one-time fix-up, please be patient... // gets placed first. In non-strict mode, we behave strictly if the // virtual root is based on the root project, and allow non-peer parent // deps to override, but throw if no preference can be determined. - async #loadPeerSet (node, required) { + async [_loadPeerSet] (node, required) { const peerEdges = [...node.edgesOut.values()] // we typically only install non-optional peers, but we have to // factor them into the peerSet so that we can avoid conflicts @@ -1302,12 +1307,12 @@ This is a one-time fix-up, please be patient... const parentEdge = node.parent.edgesOut.get(edge.name) const { isProjectRoot, isWorkspace } = node.parent.sourceReference const isMine = isProjectRoot || isWorkspace - const conflictOK = this[_force] || !isMine && !this.#strictPeerDeps + const conflictOK = this[_force] || !isMine && !this[_strictPeerDeps] if (!edge.to) { if (!parentEdge) { // easy, just put the thing there - await this.#nodeFromEdge(edge, node.parent, null, required) + await this[_nodeFromEdge](edge, node.parent, null, required) continue } else { // if the parent's edge is very broad like >=1, and the edge in @@ -1318,7 +1323,7 @@ This is a one-time fix-up, please be patient... // a conflict. this is always a problem in strict mode, never // in force mode, and a problem in non-strict mode if this isn't // on behalf of our project. in all such cases, we warn at least. - const dep = await this.#nodeFromEdge( + const dep = await this[_nodeFromEdge]( parentEdge, node.parent, edge, @@ -1339,7 +1344,7 @@ This is a one-time fix-up, please be patient... } // problem - this.#failPeerConflict(edge, parentEdge) + this[_failPeerConflict](edge, parentEdge) } } @@ -1347,9 +1352,9 @@ This is a one-time fix-up, please be patient... // See if the thing we WOULD be happy with is also going to satisfy // the other dependents on the current node. const current = edge.to - const dep = await this.#nodeFromEdge(edge, null, null, required) + const dep = await this[_nodeFromEdge](edge, null, null, required) if (dep.canReplace(current)) { - await this.#nodeFromEdge(edge, node.parent, null, required) + await this[_nodeFromEdge](edge, node.parent, null, required) continue } @@ -1366,17 +1371,17 @@ This is a one-time fix-up, please be patient... } // ok, it's the root, or we're in unforced strict mode, so this is bad - this.#failPeerConflict(edge, parentEdge) + this[_failPeerConflict](edge, parentEdge) } return node } - #failPeerConflict (edge, currentEdge) { - const expl = this.#explainPeerConflict(edge, currentEdge) + [_failPeerConflict] (edge, currentEdge) { + const expl = this[_explainPeerConflict](edge, currentEdge) throw Object.assign(new Error('unable to resolve dependency tree'), expl) } - #explainPeerConflict (edge, currentEdge) { + [_explainPeerConflict] (edge, currentEdge) { const node = edge.from const curNode = node.resolve(edge.name) const current = curNode.explain() @@ -1388,12 +1393,12 @@ This is a one-time fix-up, please be patient... // the tree handling logic. currentEdge: currentEdge ? currentEdge.explain() : null, edge: edge.explain(), - strictPeerDeps: this.#strictPeerDeps, + strictPeerDeps: this[_strictPeerDeps], force: this[_force], } } - // go through all the links in the this.#linkNodes set + // go through all the links in the this[_linkNodes] set // for each one: // - if outside the root, ignore it, assume it's fine, it's not our problem // - if a node in the tree already, assign the target to that node. @@ -1401,9 +1406,9 @@ This is a one-time fix-up, please be patient... // and add it to the _depsQueue // // call buildDepStep if anything was added to the queue, otherwise we're done - #resolveLinks () { - for (const link of this.#linkNodes) { - this.#linkNodes.delete(link) + [_resolveLinks] () { + for (const link of this[_linkNodes]) { + this[_linkNodes].delete(link) // link we never ended up placing, skip it if (link.root !== this.idealTree) { @@ -1414,34 +1419,34 @@ This is a one-time fix-up, please be patient... const external = !link.target.isDescendantOf(tree) // outside the root, somebody else's problem, ignore it - if (external && !this.#follow) { + if (external && !this[_follow]) { continue } // didn't find a parent for it or it has not been seen yet // so go ahead and process it. const unseenLink = (link.target.parent || link.target.fsParent) && - !this.#depsSeen.has(link.target) + !this[_depsSeen].has(link.target) - if (this.#follow && + if (this[_follow] && !link.target.parent && !link.target.fsParent || unseenLink) { this.addTracker('idealTree', link.target.name, link.target.location) - this.#depsQueue.push(link.target) + this[_depsQueue].push(link.target) } } - if (this.#depsQueue.length) { - return this.#buildDepStep() + if (this[_depsQueue].length) { + return this[_buildDepStep]() } } - #fixDepFlags () { + [_fixDepFlags] () { process.emit('time', 'idealTree:fixDepFlags') const metaFromDisk = this.idealTree.meta.loadedFromDisk const flagsSuspect = this[_flagsSuspect] - const mutateTree = this.#mutateTree + const mutateTree = this[_mutateTree] // if the options set prune:false, then we don't prune, but we still // mark the extraneous items in the tree if we modified it at all. // If we did no modifications, we just iterate over the extraneous nodes. @@ -1476,28 +1481,21 @@ This is a one-time fix-up, please be patient... // then the tree is suspect. Prune what is marked as extraneous. // otherwise, don't bother. const needPrune = metaFromDisk && (mutateTree || flagsSuspect) - if (this.#prune && needPrune) { + if (this[_prune] && needPrune) { this[_idealTreePrune]() - for (const node of this.idealTree.inventory.values()) { - if (node.extraneous) { - node.parent = null - } - } } process.emit('timeEnd', 'idealTree:fixDepFlags') } [_idealTreePrune] () { - for (const node of this.idealTree.inventory.values()) { - if (node.extraneous) { - node.parent = null - } + for (const node of this.idealTree.inventory.filter(n => n.extraneous)) { + node.parent = null } } - #pruneFailedOptional () { - for (const node of this.#loadFailures) { + [_pruneFailedOptional] () { + for (const node of this[_loadFailures]) { if (!node.optional) { throw node.errors[0] } diff --git a/deps/npm/node_modules/@npmcli/arborist/lib/arborist/index.js b/deps/npm/node_modules/@npmcli/arborist/lib/arborist/index.js index ec25117c2a8744..afcc3ec27150b6 100644 --- a/deps/npm/node_modules/@npmcli/arborist/lib/arborist/index.js +++ b/deps/npm/node_modules/@npmcli/arborist/lib/arborist/index.js @@ -37,7 +37,7 @@ const mixins = [ require('./deduper.js'), require('./audit.js'), require('./build-ideal-tree.js'), - require('./set-workspaces.js'), + require('./load-workspaces.js'), require('./load-actual.js'), require('./load-virtual.js'), require('./rebuild.js'), @@ -71,7 +71,6 @@ class Arborist extends Base { this.options = { nodeVersion: process.version, ...options, - Arborist: this.constructor, path: options.path || '.', cache: options.cache || `${homedir()}/.npm/_cacache`, packumentCache: options.packumentCache || new Map(), diff --git a/deps/npm/node_modules/@npmcli/arborist/lib/arborist/load-actual.js b/deps/npm/node_modules/@npmcli/arborist/lib/arborist/load-actual.js index 8c4e148464d33a..6c3f917c6ac9d3 100644 --- a/deps/npm/node_modules/@npmcli/arborist/lib/arborist/load-actual.js +++ b/deps/npm/node_modules/@npmcli/arborist/lib/arborist/load-actual.js @@ -4,7 +4,7 @@ const { relative, dirname, resolve, join, normalize } = require('path') const rpj = require('read-package-json-fast') const { readdirScoped } = require('@npmcli/fs') -const { walkUp } = require('walk-up-path') +const walkUp = require('walk-up-path') const ancestorPath = require('common-ancestor-path') const treeCheck = require('../tree-check.js') @@ -17,31 +17,28 @@ const realpath = require('../realpath.js') // public symbols const _changePath = Symbol.for('_changePath') const _global = Symbol.for('global') -const _setWorkspaces = Symbol.for('setWorkspaces') +const _loadWorkspaces = Symbol.for('loadWorkspaces') const _rpcache = Symbol.for('realpathCache') const _stcache = Symbol.for('statCache') -module.exports = cls => class ActualLoader extends cls { - #actualTree - // ensure when walking the tree that we don't call loadTree on the same - // actual node more than one time. - #actualTreeLoaded = new Set() - #actualTreePromise - - // cache of nodes when loading the actualTree, so that we avoid loaded the - // same node multiple times when symlinks attack. - #cache = new Map() - #filter - - // cache of link targets for setting fsParent links - // We don't do fsParent as a magic getter/setter, because it'd be too costly - // to keep up to date along the walk. - // And, we know that it can ONLY be relevant when the node is a target of a - // link, otherwise it'd be in a node_modules folder, so take advantage of - // that to limit the scans later. - #topNodes = new Set() - #transplantFilter +// private symbols +const _actualTree = Symbol('actualTree') +const _actualTreeLoaded = Symbol('actualTreeLoaded') +const _actualTreePromise = Symbol('actualTreePromise') +const _cache = Symbol('nodeLoadingCache') +const _filter = Symbol('filter') +const _findMissingEdges = Symbol('findMissingEdges') +const _loadActual = Symbol('loadActual') +const _loadFSChildren = Symbol('loadFSChildren') +const _loadFSNode = Symbol('loadFSNode') +const _loadFSTree = Symbol('loadFSTree') +const _newLink = Symbol('newLink') +const _newNode = Symbol('newNode') +const _topNodes = Symbol('linkTargets') +const _transplant = Symbol('transplant') +const _transplantFilter = Symbol('transplantFilter') +module.exports = cls => class ActualLoader extends cls { constructor (options) { super(options) @@ -50,11 +47,27 @@ module.exports = cls => class ActualLoader extends cls { // the tree of nodes on disk this.actualTree = options.actualTree + // ensure when walking the tree that we don't call loadTree on the + // same actual node more than one time. + this[_actualTreeLoaded] = new Set() + // caches for cached realpath calls const cwd = process.cwd() // assume that the cwd is real enough for our purposes this[_rpcache] = new Map([[cwd, cwd]]) this[_stcache] = new Map() + + // cache of nodes when loading the actualTree, so that we avoid + // loaded the same node multiple times when symlinks attack. + this[_cache] = new Map() + + // cache of link targets for setting fsParent links + // We don't do fsParent as a magic getter/setter, because + // it'd be too costly to keep up to date along the walk. + // And, we know that it can ONLY be relevant when the node + // is a target of a link, otherwise it'd be in a node_modules + // folder, so take advantage of that to limit the scans later. + this[_topNodes] = new Set() } // public method @@ -68,12 +81,12 @@ module.exports = cls => class ActualLoader extends cls { if (this.actualTree) { return this.actualTree } - if (!this.#actualTreePromise) { + if (!this[_actualTreePromise]) { // allow the user to set options on the ctor as well. // XXX: deprecate separate method options objects. options = { ...this.options, ...options } - this.#actualTreePromise = this.#loadActual(options) + this[_actualTreePromise] = this[_loadActual](options) .then(tree => { // reset all deps to extraneous prior to recalc if (!options.root) { @@ -89,15 +102,14 @@ module.exports = cls => class ActualLoader extends cls { return this.actualTree }) } - return this.#actualTreePromise + return this[_actualTreePromise] } - // return the promise so that we don't ever have more than one going at the // same time. This is so that buildIdealTree can default to the actualTree // if no shrinkwrap present, but reify() can still call buildIdealTree and // loadActual in parallel safely. - async #loadActual (options) { + async [_loadActual] (options) { // mostly realpath to throw if the root doesn't exist const { global = false, @@ -107,8 +119,8 @@ module.exports = cls => class ActualLoader extends cls { ignoreMissing = false, forceActual = false, } = options - this.#filter = filter - this.#transplantFilter = transplantFilter + this[_filter] = filter + this[_transplantFilter] = transplantFilter if (global) { const real = await realpath(this.path, this[_rpcache], this[_stcache]) @@ -120,19 +132,19 @@ module.exports = cls => class ActualLoader extends cls { loadOverrides: true, } if (this.path === real) { - this.#actualTree = this.#newNode(params) + this[_actualTree] = this[_newNode](params) } else { - this.#actualTree = await this.#newLink(params) + this[_actualTree] = await this[_newLink](params) } } else { // not in global mode, hidden lockfile is allowed, load root pkg too - this.#actualTree = await this.#loadFSNode({ + this[_actualTree] = await this[_loadFSNode]({ path: this.path, real: await realpath(this.path, this[_rpcache], this[_stcache]), loadOverrides: true, }) - this.#actualTree.assertRootOverrides() + this[_actualTree].assertRootOverrides() // if forceActual is set, don't even try the hidden lockfile if (!forceActual) { @@ -140,48 +152,48 @@ module.exports = cls => class ActualLoader extends cls { // in the folder, or if any of the entries in the hidden lockfile are // missing. const meta = await Shrinkwrap.load({ - path: this.#actualTree.path, + path: this[_actualTree].path, hiddenLockfile: true, resolveOptions: this.options, }) if (meta.loadedFromDisk) { - this.#actualTree.meta = meta + this[_actualTree].meta = meta // have to load on a new Arborist object, so we don't assign // the virtualTree on this one! Also, the weird reference is because // we can't easily get a ref to Arborist in this module, without // creating a circular reference, since this class is a mixin used // to build up the Arborist class itself. await new this.constructor({ ...this.options }).loadVirtual({ - root: this.#actualTree, + root: this[_actualTree], }) - await this[_setWorkspaces](this.#actualTree) + await this[_loadWorkspaces](this[_actualTree]) - this.#transplant(root) - return this.#actualTree + this[_transplant](root) + return this[_actualTree] } } const meta = await Shrinkwrap.load({ - path: this.#actualTree.path, + path: this[_actualTree].path, lockfileVersion: this.options.lockfileVersion, resolveOptions: this.options, }) - this.#actualTree.meta = meta + this[_actualTree].meta = meta } - await this.#loadFSTree(this.#actualTree) - await this[_setWorkspaces](this.#actualTree) + await this[_loadFSTree](this[_actualTree]) + await this[_loadWorkspaces](this[_actualTree]) // if there are workspace targets without Link nodes created, load // the targets, so that we know what they are. - if (this.#actualTree.workspaces && this.#actualTree.workspaces.size) { + if (this[_actualTree].workspaces && this[_actualTree].workspaces.size) { const promises = [] - for (const path of this.#actualTree.workspaces.values()) { - if (!this.#cache.has(path)) { + for (const path of this[_actualTree].workspaces.values()) { + if (!this[_cache].has(path)) { // workspace overrides use the root overrides - const p = this.#loadFSNode({ path, root: this.#actualTree, useRootOverrides: true }) - .then(node => this.#loadFSTree(node)) + const p = this[_loadFSNode]({ path, root: this[_actualTree], useRootOverrides: true }) + .then(node => this[_loadFSTree](node)) promises.push(p) } } @@ -189,32 +201,32 @@ module.exports = cls => class ActualLoader extends cls { } if (!ignoreMissing) { - await this.#findMissingEdges() + await this[_findMissingEdges]() } // try to find a node that is the parent in a fs tree sense, but not a // node_modules tree sense, of any link targets. this allows us to // resolve deps that node will find, but a legacy npm view of the // world would not have noticed. - for (const path of this.#topNodes) { - const node = this.#cache.get(path) + for (const path of this[_topNodes]) { + const node = this[_cache].get(path) if (node && !node.parent && !node.fsParent) { for (const p of walkUp(dirname(path))) { - if (this.#cache.has(p)) { - node.fsParent = this.#cache.get(p) + if (this[_cache].has(p)) { + node.fsParent = this[_cache].get(p) break } } } } - this.#transplant(root) + this[_transplant](root) if (global) { // need to depend on the children, or else all of them // will end up being flagged as extraneous, since the // global root isn't a "real" project - const tree = this.#actualTree + const tree = this[_actualTree] const actualRoot = tree.isLink ? tree.target : tree const { dependencies = {} } = actualRoot.package for (const [name, kid] of actualRoot.children.entries()) { @@ -223,30 +235,30 @@ module.exports = cls => class ActualLoader extends cls { } actualRoot.package = { ...actualRoot.package, dependencies } } - return this.#actualTree + return this[_actualTree] } - #transplant (root) { - if (!root || root === this.#actualTree) { + [_transplant] (root) { + if (!root || root === this[_actualTree]) { return } - this.#actualTree[_changePath](root.path) - for (const node of this.#actualTree.children.values()) { - if (!this.#transplantFilter(node)) { + this[_actualTree][_changePath](root.path) + for (const node of this[_actualTree].children.values()) { + if (!this[_transplantFilter](node)) { node.root = null } } - root.replace(this.#actualTree) - for (const node of this.#actualTree.fsChildren) { - node.root = this.#transplantFilter(node) ? root : null + root.replace(this[_actualTree]) + for (const node of this[_actualTree].fsChildren) { + node.root = this[_transplantFilter](node) ? root : null } - this.#actualTree = root + this[_actualTree] = root } - async #loadFSNode ({ path, parent, real, root, loadOverrides, useRootOverrides }) { + async [_loadFSNode] ({ path, parent, real, root, loadOverrides, useRootOverrides }) { if (!real) { try { real = await realpath(path, this[_rpcache], this[_stcache]) @@ -263,7 +275,7 @@ module.exports = cls => class ActualLoader extends cls { } } - const cached = this.#cache.get(path) + const cached = this[_cache].get(path) let node // missing edges get a dummy node, assign the parent and return it if (cached && !cached.dummy) { @@ -294,67 +306,67 @@ module.exports = cls => class ActualLoader extends cls { // Node which will attach it to its errors array (Link passes it along to // its target node) if (normalize(path) === real) { - node = this.#newNode(params) + node = this[_newNode](params) } else { - node = await this.#newLink(params) + node = await this[_newLink](params) } } - this.#cache.set(path, node) + this[_cache].set(path, node) return node } - #newNode (options) { + [_newNode] (options) { // check it for an fsParent if it's a tree top. there's a decent chance // it'll get parented later, making the fsParent scan a no-op, but better // safe than sorry, since it's cheap. const { parent, realpath } = options if (!parent) { - this.#topNodes.add(realpath) + this[_topNodes].add(realpath) } return new Node(options) } - async #newLink (options) { + async [_newLink] (options) { const { realpath } = options - this.#topNodes.add(realpath) - const target = this.#cache.get(realpath) + this[_topNodes].add(realpath) + const target = this[_cache].get(realpath) const link = new Link({ ...options, target }) if (!target) { // Link set its target itself in this case - this.#cache.set(realpath, link.target) + this[_cache].set(realpath, link.target) // if a link target points at a node outside of the root tree's // node_modules hierarchy, then load that node as well. - await this.#loadFSTree(link.target) + await this[_loadFSTree](link.target) } return link } - async #loadFSTree (node) { - const did = this.#actualTreeLoaded + async [_loadFSTree] (node) { + const did = this[_actualTreeLoaded] if (!did.has(node.target.realpath)) { did.add(node.target.realpath) - await this.#loadFSChildren(node.target) + await this[_loadFSChildren](node.target) return Promise.all( [...node.target.children.entries()] .filter(([name, kid]) => !did.has(kid.realpath)) - .map(([name, kid]) => this.#loadFSTree(kid)) + .map(([name, kid]) => this[_loadFSTree](kid)) ) } } // create child nodes for all the entries in node_modules // and attach them to the node as a parent - async #loadFSChildren (node) { + async [_loadFSChildren] (node) { const nm = resolve(node.realpath, 'node_modules') try { const kids = await readdirScoped(nm).then(paths => paths.map(p => p.replace(/\\/g, '/'))) return Promise.all( // ignore . dirs and retired scoped package folders kids.filter(kid => !/^(@[^/]+\/)?\./.test(kid)) - .filter(kid => this.#filter(node, kid)) - .map(kid => this.#loadFSNode({ + .filter(kid => this[_filter](node, kid)) + .map(kid => this[_loadFSNode]({ parent: node, path: resolve(nm, kid), }))) @@ -363,7 +375,7 @@ module.exports = cls => class ActualLoader extends cls { } } - async #findMissingEdges () { + async [_findMissingEdges] () { // try to resolve any missing edges by walking up the directory tree, // checking for the package in each node_modules folder. stop at the // root directory. @@ -373,7 +385,7 @@ module.exports = cls => class ActualLoader extends cls { // because people sometimes develop in ~/projects/node_modules/... // so we'd end up loading a massive tree with lots of unrelated junk. const nmContents = new Map() - const tree = this.#actualTree + const tree = this[_actualTree] for (const node of tree.inventory.values()) { const ancestor = ancestorPath(node.realpath, this.path) @@ -398,37 +410,28 @@ module.exports = cls => class ActualLoader extends cls { break } - let entries - if (!nmContents.has(p)) { - entries = await readdirScoped(p + '/node_modules') - .catch(() => []).then(paths => paths.map(p => p.replace(/\\/g, '/'))) - nmContents.set(p, entries) - } else { - entries = nmContents.get(p) - } - + const entries = nmContents.get(p) || await readdirScoped(p + '/node_modules') + .catch(() => []).then(paths => paths.map(p => p.replace(/\\/g, '/'))) + nmContents.set(p, entries) if (!entries.includes(name)) { continue } - let d - if (!this.#cache.has(p)) { - d = new Node({ path: p, root: node.root, dummy: true }) - this.#cache.set(p, d) - } else { - d = this.#cache.get(p) - } + const d = this[_cache].has(p) ? await this[_cache].get(p) + : new Node({ path: p, root: node.root, dummy: true }) + // not a promise + this[_cache].set(p, d) if (d.dummy) { // it's a placeholder, so likely would not have loaded this dep, // unless another dep in the tree also needs it. const depPath = normalize(`${p}/node_modules/${name}`) - const cached = this.#cache.get(depPath) + const cached = this[_cache].get(depPath) if (!cached || cached.dummy) { - depPromises.push(this.#loadFSNode({ + depPromises.push(this[_loadFSNode]({ path: depPath, root: node.root, parent: d, - }).then(node => this.#loadFSTree(node))) + }).then(node => this[_loadFSTree](node))) } } break diff --git a/deps/npm/node_modules/@npmcli/arborist/lib/arborist/load-virtual.js b/deps/npm/node_modules/@npmcli/arborist/lib/arborist/load-virtual.js index 9b681a47a83587..b2a6ec2315a4f1 100644 --- a/deps/npm/node_modules/@npmcli/arborist/lib/arborist/load-virtual.js +++ b/deps/npm/node_modules/@npmcli/arborist/lib/arborist/load-virtual.js @@ -1,4 +1,5 @@ // mixin providing the loadVirtual method +const localeCompare = require('@isaacs/string-locale-compare')('en') const mapWorkspaces = require('@npmcli/map-workspaces') const { resolve } = require('path') @@ -13,12 +14,23 @@ const calcDepFlags = require('../calc-dep-flags.js') const rpj = require('read-package-json-fast') const treeCheck = require('../tree-check.js') +const loadFromShrinkwrap = Symbol('loadFromShrinkwrap') +const resolveNodes = Symbol('resolveNodes') +const resolveLinks = Symbol('resolveLinks') +const assignBundles = Symbol('assignBundles') +const loadRoot = Symbol('loadRoot') +const loadNode = Symbol('loadVirtualNode') +const loadLink = Symbol('loadVirtualLink') +const loadWorkspaces = Symbol.for('loadWorkspaces') const flagsSuspect = Symbol.for('flagsSuspect') -const setWorkspaces = Symbol.for('setWorkspaces') +const reCalcDepFlags = Symbol('reCalcDepFlags') +const checkRootEdges = Symbol('checkRootEdges') +const rootOptionProvided = Symbol('rootOptionProvided') -module.exports = cls => class VirtualLoader extends cls { - #rootOptionProvided +const depsToEdges = (type, deps) => + Object.entries(deps).map(d => [type, ...d]) +module.exports = cls => class VirtualLoader extends cls { constructor (options) { super(options) @@ -38,7 +50,7 @@ module.exports = cls => class VirtualLoader extends cls { options = { ...this.options, ...options } if (options.root && options.root.meta) { - await this.#loadFromShrinkwrap(options.root.meta, options.root) + await this[loadFromShrinkwrap](options.root.meta, options.root) return treeCheck(this.virtualTree) } @@ -55,24 +67,24 @@ module.exports = cls => class VirtualLoader extends cls { // when building the ideal tree, we pass in a root node to this function // otherwise, load it from the root package json or the lockfile const { - root = await this.#loadRoot(s), + root = await this[loadRoot](s), } = options - this.#rootOptionProvided = options.root + this[rootOptionProvided] = options.root - await this.#loadFromShrinkwrap(s, root) + await this[loadFromShrinkwrap](s, root) root.assertRootOverrides() return treeCheck(this.virtualTree) } - async #loadRoot (s) { + async [loadRoot] (s) { const pj = this.path + '/package.json' const pkg = await rpj(pj).catch(() => s.data.packages['']) || {} - return this[setWorkspaces](this.#loadNode('', pkg, true)) + return this[loadWorkspaces](this[loadNode]('', pkg, true)) } - async #loadFromShrinkwrap (s, root) { - if (!this.#rootOptionProvided) { + async [loadFromShrinkwrap] (s, root) { + if (!this[rootOptionProvided]) { // root is never any of these things, but might be a brand new // baby Node object that never had its dep flags calculated. root.extraneous = false @@ -84,37 +96,41 @@ module.exports = cls => class VirtualLoader extends cls { this[flagsSuspect] = true } - this.#checkRootEdges(s, root) + this[checkRootEdges](s, root) root.meta = s this.virtualTree = root - const { links, nodes } = this.#resolveNodes(s, root) - await this.#resolveLinks(links, nodes) + const { links, nodes } = this[resolveNodes](s, root) + await this[resolveLinks](links, nodes) if (!(s.originalLockfileVersion >= 2)) { - this.#assignBundles(nodes) + this[assignBundles](nodes) } if (this[flagsSuspect]) { - // reset all dep flags - // can't use inventory here, because virtualTree might not be root - for (const node of nodes.values()) { - if (node.isRoot || node === this.#rootOptionProvided) { - continue - } - node.extraneous = true - node.dev = true - node.optional = true - node.devOptional = true - node.peer = true - } - calcDepFlags(this.virtualTree, !this.#rootOptionProvided) + this[reCalcDepFlags](nodes.values()) } return root } + [reCalcDepFlags] (nodes) { + // reset all dep flags + // can't use inventory here, because virtualTree might not be root + for (const node of nodes) { + if (node.isRoot || node === this[rootOptionProvided]) { + continue + } + node.extraneous = true + node.dev = true + node.optional = true + node.devOptional = true + node.peer = true + } + calcDepFlags(this.virtualTree, !this[rootOptionProvided]) + } + // check the lockfile deps, and see if they match. if they do not // then we have to reset dep flags at the end. for example, if the // user manually edits their package.json file, then we need to know // that the idealTree is no longer entirely trustworthy. - #checkRootEdges (s, root) { + [checkRootEdges] (s, root) { // loaded virtually from tree, no chance of being out of sync // ancient lockfiles are critically damaged by this process, // so we need to just hope for the best in those cases. @@ -128,7 +144,6 @@ module.exports = cls => class VirtualLoader extends cls { const optional = lock.optionalDependencies || {} const peer = lock.peerDependencies || {} const peerOptional = {} - if (lock.peerDependenciesMeta) { for (const [name, meta] of Object.entries(lock.peerDependenciesMeta)) { if (meta.optional && peer[name] !== undefined) { @@ -137,45 +152,50 @@ module.exports = cls => class VirtualLoader extends cls { } } } - for (const name of Object.keys(optional)) { delete prod[name] } - const lockWS = {} + const lockWS = [] const workspaces = mapWorkspaces.virtual({ cwd: this.path, lockfile: s.data, }) - for (const [name, path] of workspaces.entries()) { - lockWS[name] = `file:${path.replace(/#/g, '%23')}` + lockWS.push(['workspace', name, `file:${path.replace(/#/g, '%23')}`]) } - // Should rootNames exclude optional? - const rootNames = new Set(root.edgesOut.keys()) - - const lockByType = ({ dev, optional, peer, peerOptional, prod, workspace: lockWS }) + const lockEdges = [ + ...depsToEdges('prod', prod), + ...depsToEdges('dev', dev), + ...depsToEdges('optional', optional), + ...depsToEdges('peer', peer), + ...depsToEdges('peerOptional', peerOptional), + ...lockWS, + ].sort(([atype, aname], [btype, bname]) => + localeCompare(atype, btype) || localeCompare(aname, bname)) + + const rootEdges = [...root.edgesOut.values()] + .map(e => [e.type, e.name, e.spec]) + .sort(([atype, aname], [btype, bname]) => + localeCompare(atype, btype) || localeCompare(aname, bname)) + + if (rootEdges.length !== lockEdges.length) { + // something added or removed + return this[flagsSuspect] = true + } - // Find anything in shrinkwrap deps that doesn't match root's type or spec - for (const type in lockByType) { - const deps = lockByType[type] - for (const name in deps) { - const edge = root.edgesOut.get(name) - if (!edge || edge.type !== type || edge.spec !== deps[name]) { - return this[flagsSuspect] = true - } - rootNames.delete(name) + for (let i = 0; i < lockEdges.length; i++) { + if (rootEdges[i][0] !== lockEdges[i][0] || + rootEdges[i][1] !== lockEdges[i][1] || + rootEdges[i][2] !== lockEdges[i][2]) { + return this[flagsSuspect] = true } } - // Something was in root that's not accounted for in shrinkwrap - if (rootNames.size) { - return this[flagsSuspect] = true - } } // separate out link metadatas, and create Node objects for nodes - #resolveNodes (s, root) { + [resolveNodes] (s, root) { const links = new Map() const nodes = new Map([['', root]]) for (const [location, meta] of Object.entries(s.data.packages)) { @@ -187,7 +207,7 @@ module.exports = cls => class VirtualLoader extends cls { if (meta.link) { links.set(location, meta) } else { - nodes.set(location, this.#loadNode(location, meta)) + nodes.set(location, this[loadNode](location, meta)) } } return { links, nodes } @@ -195,12 +215,12 @@ module.exports = cls => class VirtualLoader extends cls { // links is the set of metadata, and nodes is the map of non-Link nodes // Set the targets to nodes in the set, if we have them (we might not) - async #resolveLinks (links, nodes) { + async [resolveLinks] (links, nodes) { for (const [location, meta] of links.entries()) { const targetPath = resolve(this.path, meta.resolved) const targetLoc = relpath(this.path, targetPath) const target = nodes.get(targetLoc) - const link = this.#loadLink(location, targetLoc, target, meta) + const link = this[loadLink](location, targetLoc, target, meta) nodes.set(location, link) nodes.set(targetLoc, link.target) @@ -216,7 +236,7 @@ module.exports = cls => class VirtualLoader extends cls { } } - #assignBundles (nodes) { + [assignBundles] (nodes) { for (const [location, node] of nodes) { // Skip assignment of parentage for the root package if (!location || node.isLink && !node.target.location) { @@ -245,7 +265,7 @@ module.exports = cls => class VirtualLoader extends cls { } } - #loadNode (location, sw, loadOverrides) { + [loadNode] (location, sw, loadOverrides) { const p = this.virtualTree ? this.virtualTree.realpath : this.path const path = resolve(p, location) // shrinkwrap doesn't include package name unless necessary @@ -283,7 +303,7 @@ module.exports = cls => class VirtualLoader extends cls { return node } - #loadLink (location, targetLoc, target, meta) { + [loadLink] (location, targetLoc, target, meta) { const path = resolve(this.path, location) const link = new Link({ installLinks: this.installLinks, diff --git a/deps/npm/node_modules/@npmcli/arborist/lib/arborist/set-workspaces.js b/deps/npm/node_modules/@npmcli/arborist/lib/arborist/load-workspaces.js similarity index 80% rename from deps/npm/node_modules/@npmcli/arborist/lib/arborist/set-workspaces.js rename to deps/npm/node_modules/@npmcli/arborist/lib/arborist/load-workspaces.js index 27a12708a7e82d..effa5a0cda24fa 100644 --- a/deps/npm/node_modules/@npmcli/arborist/lib/arborist/set-workspaces.js +++ b/deps/npm/node_modules/@npmcli/arborist/lib/arborist/load-workspaces.js @@ -1,10 +1,10 @@ const mapWorkspaces = require('@npmcli/map-workspaces') // shared ref used by other mixins/Arborist -const _setWorkspaces = Symbol.for('setWorkspaces') +const _loadWorkspaces = Symbol.for('loadWorkspaces') module.exports = cls => class MapWorkspaces extends cls { - async [_setWorkspaces] (node) { + async [_loadWorkspaces] (node) { const workspaces = await mapWorkspaces({ cwd: node.path, pkg: node.package, diff --git a/deps/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js b/deps/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js index 0057d38f117561..760fa977ecfd91 100644 --- a/deps/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js +++ b/deps/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js @@ -6,7 +6,7 @@ const { subset, intersects } = require('semver') const npa = require('npm-package-arg') const semver = require('semver') const debug = require('../debug.js') -const { walkUp } = require('walk-up-path') +const walkUp = require('walk-up-path') const log = require('proc-log') const hgi = require('hosted-git-info') const rpj = require('read-package-json-fast') @@ -702,6 +702,7 @@ module.exports = cls => class Reifier extends cls { }) await pacote.extract(res, node.path, { ...this.options, + Arborist: this.constructor, resolved: node.resolved, integrity: node.integrity, }) diff --git a/deps/npm/node_modules/@npmcli/arborist/lib/calc-dep-flags.js b/deps/npm/node_modules/@npmcli/arborist/lib/calc-dep-flags.js index 45ed9562479af2..2f33981419d0ca 100644 --- a/deps/npm/node_modules/@npmcli/arborist/lib/calc-dep-flags.js +++ b/deps/npm/node_modules/@npmcli/arborist/lib/calc-dep-flags.js @@ -51,12 +51,14 @@ const calcDepFlagsStep = (node) => { // however, for convenience and to save an extra rewalk, we leave // it set when we are in *either* tree, and then omit it from the // package-lock if either dev or optional are set. - const unsetDevOpt = !node.devOptional && !node.dev && !node.optional && !dev && !optional + const unsetDevOpt = !node.devOptional && !node.dev && !node.optional && + !dev && !optional // if we are not in the devOpt tree, then we're also not in // either the dev or opt trees const unsetDev = unsetDevOpt || !node.dev && !dev - const unsetOpt = unsetDevOpt || !node.optional && !optional + const unsetOpt = unsetDevOpt || + !node.optional && !optional const unsetPeer = !node.peer && !peer if (unsetPeer) { @@ -89,7 +91,8 @@ const resetParents = (node, flag) => { } } -// typically a short walk, since it only traverses deps that have the flag set. +// typically a short walk, since it only traverses deps that +// have the flag set. const unsetFlag = (node, flag) => { if (node[flag]) { node[flag] = false @@ -101,17 +104,10 @@ const unsetFlag = (node, flag) => { node.target.extraneous = node.target[flag] = false } }, - getChildren: node => { - const children = [] - for (const edge of node.target.edgesOut.values()) { - if (edge.to && edge.to[flag] && - (flag !== 'peer' && edge.type === 'peer' || edge.type === 'prod') - ) { - children.push(edge.to) - } - } - return children - }, + getChildren: node => [...node.target.edgesOut.values()] + .filter(edge => edge.to && edge.to[flag] && + (flag !== 'peer' && edge.type === 'peer' || edge.type === 'prod')) + .map(edge => edge.to), }) } } diff --git a/deps/npm/node_modules/@npmcli/arborist/lib/dep-valid.js b/deps/npm/node_modules/@npmcli/arborist/lib/dep-valid.js index 4afb5e47cf111f..9c1bc7d3f23e9f 100644 --- a/deps/npm/node_modules/@npmcli/arborist/lib/dep-valid.js +++ b/deps/npm/node_modules/@npmcli/arborist/lib/dep-valid.js @@ -84,21 +84,15 @@ const depValid = (child, requested, requestor) => { const reqHost = requested.hosted const reqCommit = /^[a-fA-F0-9]{40}$/.test(requested.gitCommittish || '') const nc = { noCommittish: !reqCommit } - if (!resHost) { - if (resRepo.fetchSpec !== requested.fetchSpec) { - return false - } - } else { - if (reqHost?.ssh(nc) !== resHost.ssh(nc)) { - return false - } - } - if (!requested.gitRange) { - return true - } - return semver.satisfies(child.package.version, requested.gitRange, { - loose: true, - }) + const sameRepo = + resHost ? reqHost && reqHost.ssh(nc) === resHost.ssh(nc) + : resRepo.fetchSpec === requested.fetchSpec + + return !sameRepo ? false + : !requested.gitRange ? true + : semver.satisfies(child.package.version, requested.gitRange, { + loose: true, + }) } default: // unpossible, just being cautious diff --git a/deps/npm/node_modules/@npmcli/arborist/lib/edge.js b/deps/npm/node_modules/@npmcli/arborist/lib/edge.js index cc9698ad6cae71..84078ba050d102 100644 --- a/deps/npm/node_modules/@npmcli/arborist/lib/edge.js +++ b/deps/npm/node_modules/@npmcli/arborist/lib/edge.js @@ -4,210 +4,194 @@ const util = require('util') const npa = require('npm-package-arg') const depValid = require('./dep-valid.js') - -class ArboristEdge { - constructor (edge) { - this.name = edge.name - this.spec = edge.spec - this.type = edge.type - - const edgeFrom = edge.from?.location - const edgeTo = edge.to?.location - const override = edge.overrides?.value - - if (edgeFrom != null) { - this.from = edgeFrom - } - if (edgeTo) { - this.to = edgeTo - } - if (edge.error) { - this.error = edge.error - } - if (edge.peerConflicted) { - this.peerConflicted = true - } - if (override) { - this.overridden = override - } - } +const _from = Symbol('_from') +const _to = Symbol('_to') +const _type = Symbol('_type') +const _spec = Symbol('_spec') +const _accept = Symbol('_accept') +const _name = Symbol('_name') +const _error = Symbol('_error') +const _loadError = Symbol('_loadError') +const _setFrom = Symbol('_setFrom') +const _explain = Symbol('_explain') +const _explanation = Symbol('_explanation') + +const types = new Set([ + 'prod', + 'dev', + 'optional', + 'peer', + 'peerOptional', + 'workspace', +]) + +class ArboristEdge {} +const printableEdge = (edge) => { + const edgeFrom = edge.from && edge.from.location + const edgeTo = edge.to && edge.to.location + const override = edge.overrides && edge.overrides.value + + return Object.assign(new ArboristEdge(), { + name: edge.name, + spec: edge.spec, + type: edge.type, + ...(edgeFrom != null ? { from: edgeFrom } : {}), + ...(edgeTo ? { to: edgeTo } : {}), + ...(edge.error ? { error: edge.error } : {}), + ...(edge.peerConflicted ? { peerConflicted: true } : {}), + ...(override ? { overridden: override } : {}), + }) } class Edge { - #accept - #error - #explanation - #from - #name - #spec - #to - #type - - static types = Object.freeze([ - 'prod', - 'dev', - 'optional', - 'peer', - 'peerOptional', - 'workspace', - ]) - - // XXX where is this used? - static errors = Object.freeze([ - 'DETACHED', - 'MISSING', - 'PEER LOCAL', - 'INVALID', - ]) - constructor (options) { const { type, name, spec, accept, from, overrides } = options - // XXX are all of these error states even possible? if (typeof spec !== 'string') { throw new TypeError('must provide string spec') } - if (!Edge.types.includes(type)) { - throw new TypeError(`invalid type: ${type}\n(valid types are: ${Edge.types.join(', ')})`) - } + if (type === 'workspace' && npa(spec).type !== 'directory') { throw new TypeError('workspace edges must be a symlink') } - if (typeof name !== 'string') { - throw new TypeError('must provide dependency name') - } - if (!from) { - throw new TypeError('must provide "from" node') + + this[_spec] = spec + + if (overrides !== undefined) { + this.overrides = overrides } + if (accept !== undefined) { if (typeof accept !== 'string') { throw new TypeError('accept field must be a string if provided') } - this.#accept = accept || '*' - } - if (overrides !== undefined) { - this.overrides = overrides + this[_accept] = accept || '*' } - this.#name = name - this.#type = type - this.#spec = spec - this.#explanation = null - this.#from = from - - from.edgesOut.get(this.#name)?.detach() - from.addEdgeOut(this) + if (typeof name !== 'string') { + throw new TypeError('must provide dependency name') + } + this[_name] = name - this.reload(true) + if (!types.has(type)) { + throw new TypeError( + `invalid type: ${type}\n` + + `(valid types are: ${Edge.types.join(', ')})`) + } + this[_type] = type + if (!from) { + throw new TypeError('must provide "from" node') + } + this[_setFrom](from) + this[_error] = this[_loadError]() this.peerConflicted = false } satisfiedBy (node) { - if (node.name !== this.#name) { + if (node.name !== this.name) { return false } // NOTE: this condition means we explicitly do not support overriding // bundled or shrinkwrapped dependencies - if (node.hasShrinkwrap || node.inShrinkwrap || node.inBundle) { - return depValid(node, this.rawSpec, this.#accept, this.#from) + const spec = (node.hasShrinkwrap || node.inShrinkwrap || node.inBundle) + ? this.rawSpec + : this.spec + return depValid(node, spec, this.accept, this.from) + } + + explain (seen = []) { + if (this[_explanation]) { + return this[_explanation] } - return depValid(node, this.spec, this.#accept, this.#from) + + return this[_explanation] = this[_explain](seen) } // return the edge data, and an explanation of how that edge came to be here - explain (seen = []) { - if (!this.#explanation) { - const explanation = { - type: this.#type, - name: this.#name, - spec: this.spec, - } - if (this.rawSpec !== this.spec) { - explanation.rawSpec = this.rawSpec - explanation.overridden = true - } - if (this.bundled) { - explanation.bundled = this.bundled - } - if (this.error) { - explanation.error = this.error - } - if (this.#from) { - explanation.from = this.#from.explain(null, seen) - } - this.#explanation = explanation + [_explain] (seen) { + const { error, from, bundled } = this + return { + type: this.type, + name: this.name, + spec: this.spec, + ...(this.rawSpec !== this.spec ? { + rawSpec: this.rawSpec, + overridden: true, + } : {}), + ...(bundled ? { bundled } : {}), + ...(error ? { error } : {}), + ...(from ? { from: from.explain(null, seen) } : {}), } - return this.#explanation } get bundled () { - return !!this.#from?.package?.bundleDependencies?.includes(this.#name) + if (!this.from) { + return false + } + const { package: { bundleDependencies = [] } } = this.from + return bundleDependencies.includes(this.name) } get workspace () { - return this.#type === 'workspace' + return this[_type] === 'workspace' } get prod () { - return this.#type === 'prod' + return this[_type] === 'prod' } get dev () { - return this.#type === 'dev' + return this[_type] === 'dev' } get optional () { - return this.#type === 'optional' || this.#type === 'peerOptional' + return this[_type] === 'optional' || this[_type] === 'peerOptional' } get peer () { - return this.#type === 'peer' || this.#type === 'peerOptional' + return this[_type] === 'peer' || this[_type] === 'peerOptional' } get type () { - return this.#type + return this[_type] } get name () { - return this.#name + return this[_name] } get rawSpec () { - return this.#spec + return this[_spec] } get spec () { - if (this.overrides?.value && this.overrides.value !== '*' && this.overrides.name === this.#name) { + if (this.overrides?.value && this.overrides.value !== '*' && this.overrides.name === this.name) { if (this.overrides.value.startsWith('$')) { const ref = this.overrides.value.slice(1) // we may be a virtual root, if we are we want to resolve reference overrides // from the real root, not the virtual one - const pkg = this.#from.sourceReference - ? this.#from.sourceReference.root.package - : this.#from.root.package - if (pkg.devDependencies?.[ref]) { - return pkg.devDependencies[ref] - } - if (pkg.optionalDependencies?.[ref]) { - return pkg.optionalDependencies[ref] - } - if (pkg.dependencies?.[ref]) { - return pkg.dependencies[ref] - } - if (pkg.peerDependencies?.[ref]) { - return pkg.peerDependencies[ref] + const pkg = this.from.sourceReference + ? this.from.sourceReference.root.package + : this.from.root.package + const overrideSpec = (pkg.devDependencies && pkg.devDependencies[ref]) || + (pkg.optionalDependencies && pkg.optionalDependencies[ref]) || + (pkg.dependencies && pkg.dependencies[ref]) || + (pkg.peerDependencies && pkg.peerDependencies[ref]) + + if (overrideSpec) { + return overrideSpec } throw new Error(`Unable to resolve reference ${this.overrides.value}`) } return this.overrides.value } - return this.#spec + return this[_spec] } get accept () { - return this.#accept + return this[_accept] } get valid () { @@ -227,70 +211,71 @@ class Edge { } get error () { - if (!this.#error) { - if (!this.#to) { - if (this.optional) { - this.#error = null - } else { - this.#error = 'MISSING' - } - } else if (this.peer && this.#from === this.#to.parent && !this.#from.isTop) { - this.#error = 'PEER LOCAL' - } else if (!this.satisfiedBy(this.#to)) { - this.#error = 'INVALID' - } else { - this.#error = 'OK' - } - } - if (this.#error === 'OK') { - return null - } - return this.#error + this[_error] = this[_error] || this[_loadError]() + return this[_error] === 'OK' ? null : this[_error] + } + + [_loadError] () { + return !this[_to] ? (this.optional ? null : 'MISSING') + : this.peer && this.from === this.to.parent && !this.from.isTop ? 'PEER LOCAL' + : !this.satisfiedBy(this.to) ? 'INVALID' + : 'OK' } reload (hard = false) { - this.#explanation = null - if (this.#from.overrides) { - this.overrides = this.#from.overrides.getEdgeRule(this) + this[_explanation] = null + if (this[_from].overrides) { + this.overrides = this[_from].overrides.getEdgeRule(this) } else { delete this.overrides } - const newTo = this.#from.resolve(this.#name) - if (newTo !== this.#to) { - if (this.#to) { - this.#to.edgesIn.delete(this) + const newTo = this[_from].resolve(this.name) + if (newTo !== this[_to]) { + if (this[_to]) { + this[_to].edgesIn.delete(this) } - this.#to = newTo - this.#error = null - if (this.#to) { - this.#to.addEdgeIn(this) + this[_to] = newTo + this[_error] = this[_loadError]() + if (this[_to]) { + this[_to].addEdgeIn(this) } } else if (hard) { - this.#error = null + this[_error] = this[_loadError]() } } detach () { - this.#explanation = null - if (this.#to) { - this.#to.edgesIn.delete(this) + this[_explanation] = null + if (this[_to]) { + this[_to].edgesIn.delete(this) } - this.#from.edgesOut.delete(this.#name) - this.#to = null - this.#error = 'DETACHED' - this.#from = null + this[_from].edgesOut.delete(this.name) + this[_to] = null + this[_error] = 'DETACHED' + this[_from] = null + } + + [_setFrom] (node) { + this[_explanation] = null + this[_from] = node + if (node.edgesOut.has(this.name)) { + node.edgesOut.get(this.name).detach() + } + + node.addEdgeOut(this) + this.reload() } get from () { - return this.#from + return this[_from] } get to () { - return this.#to + return this[_to] } toJSON () { - return new ArboristEdge(this) + return printableEdge(this) } [util.inspect.custom] () { @@ -298,4 +283,12 @@ class Edge { } } +Edge.types = [...types] +Edge.errors = [ + 'DETACHED', + 'MISSING', + 'PEER LOCAL', + 'INVALID', +] + module.exports = Edge diff --git a/deps/npm/node_modules/@npmcli/arborist/lib/from-path.js b/deps/npm/node_modules/@npmcli/arborist/lib/from-path.js index 761f15125b3432..1006f73af3d073 100644 --- a/deps/npm/node_modules/@npmcli/arborist/lib/from-path.js +++ b/deps/npm/node_modules/@npmcli/arborist/lib/from-path.js @@ -1,30 +1,24 @@ -// file dependencies need their dependencies resolved based on the location -// where the tarball was found, not the location where they end up getting -// installed. directory (ie, symlink) deps also need to be resolved based on -// their targets, but that's what realpath is +// file dependencies need their dependencies resolved based on the +// location where the tarball was found, not the location where they +// end up getting installed. directory (ie, symlink) deps also need +// to be resolved based on their targets, but that's what realpath is const { dirname } = require('path') const npa = require('npm-package-arg') -const fromPath = (node, edge) => { +const fromPath = (node, spec, edge) => { if (edge && edge.overrides && edge.overrides.name === edge.name && edge.overrides.value) { - // fromPath could be called with a node that has a virtual root, if that - // happens we want to make sure we get the real root node when overrides - // are in use. this is to allow things like overriding a dependency with a - // tarball file that's a relative path from the project root - if (node.sourceReference) { - return node.sourceReference.root.realpath - } - return node.root.realpath + // fromPath could be called with a node that has a virtual root, if that happens + // we want to make sure we get the real root node when overrides are in use. this + // is to allow things like overriding a dependency with a tarball file that's a + // relative path from the project root + return node.sourceReference + ? node.sourceReference.root.realpath + : node.root.realpath } - if (node.resolved) { - const spec = npa(node.resolved) - if (spec?.type === 'file') { - return dirname(spec.fetchSpec) - } - } - return node.realpath + return spec && spec.type === 'file' ? dirname(spec.fetchSpec) + : node.realpath } -module.exports = fromPath +module.exports = (node, edge) => fromPath(node, node.resolved && npa(node.resolved), edge) diff --git a/deps/npm/node_modules/@npmcli/arborist/lib/inventory.js b/deps/npm/node_modules/@npmcli/arborist/lib/inventory.js index 0885034666b50a..34b6f98a8b2866 100644 --- a/deps/npm/node_modules/@npmcli/arborist/lib/inventory.js +++ b/deps/npm/node_modules/@npmcli/arborist/lib/inventory.js @@ -1,28 +1,45 @@ -// a class to manage an inventory and set of indexes of a set of objects based -// on specific fields. +// a class to manage an inventory and set of indexes of +// a set of objects based on specific fields. +// primary is the primary index key. +// keys is the set of fields to be able to query. +const _primaryKey = Symbol('_primaryKey') +const _index = Symbol('_index') +const defaultKeys = ['name', 'license', 'funding', 'realpath', 'packageName'] const { hasOwnProperty } = Object.prototype const debug = require('./debug.js') -const keys = ['name', 'license', 'funding', 'realpath', 'packageName'] -class Inventory extends Map { - #index +// handling for the outdated "licenses" array, just pick the first one +// also support the alternative spelling "licence" +const getLicense = pkg => { + if (pkg) { + const lic = pkg.license || pkg.licence + if (lic) { + return lic + } + const lics = pkg.licenses || pkg.licences + if (Array.isArray(lics)) { + return lics[0] + } + } +} - constructor () { +class Inventory extends Map { + constructor (opt = {}) { + const { primary, keys } = opt super() - this.#index = new Map() - for (const key of keys) { - this.#index.set(key, new Map()) - } + this[_primaryKey] = primary || 'location' + this[_index] = (keys || defaultKeys).reduce((index, i) => { + index.set(i, new Map()) + return index + }, new Map()) } - // XXX where is this used? get primaryKey () { - return 'location' + return this[_primaryKey] } - // XXX where is this used? get indexes () { - return [...keys] + return [...this[_index].keys()] } * filter (fn) { @@ -46,49 +63,28 @@ class Inventory extends Map { return } - const current = super.get(node.location) + const current = super.get(node[this.primaryKey]) if (current) { if (current === node) { return } this.delete(current) } - super.set(node.location, node) - for (const [key, map] of this.#index.entries()) { - let val - if (hasOwnProperty.call(node, key)) { - // if the node has the value, use it even if it's false - val = node[key] - } else if (key === 'license' && node.package) { - // handling for the outdated "licenses" array, just pick the first one - // also support the alternative spelling "licence" - if (node.package.license) { - val = node.package.license - } else if (node.package.licence) { - val = node.package.licence - } else if (Array.isArray(node.package.licenses)) { - val = node.package.licenses[0] - } else if (Array.isArray(node.package.licences)) { - val = node.package.licences[0] - } - } else if (node[key]) { - val = node[key] - } else { - val = node.package?.[key] - } - if (val && typeof val === 'object') { - // We currently only use license and funding - /* istanbul ignore next - not used */ - if (key === 'license') { - val = val.type - } else if (key === 'funding') { - val = val.url - } - } - if (!map.has(val)) { - map.set(val, new Set()) - } - map.get(val).add(node) + super.set(node[this.primaryKey], node) + for (const [key, map] of this[_index].entries()) { + // if the node has the value, but it's false, then use that + const val_ = hasOwnProperty.call(node, key) ? node[key] + : key === 'license' ? getLicense(node.package) + : node[key] ? node[key] + : node.package && node.package[key] + const val = typeof val_ === 'string' ? val_ + : !val_ || typeof val_ !== 'object' ? val_ + : key === 'license' ? val_.type + : key === 'funding' ? val_.url + : /* istanbul ignore next - not used */ val_ + const set = map.get(val) || new Set() + set.add(node) + map.set(val, set) } } @@ -97,14 +93,10 @@ class Inventory extends Map { return } - super.delete(node.location) - for (const [key, map] of this.#index.entries()) { - let val - if (node[key] !== undefined) { - val = node[key] - } else { - val = node.package?.[key] - } + super.delete(node[this.primaryKey]) + for (const [key, map] of this[_index].entries()) { + const val = node[key] !== undefined ? node[key] + : (node[key] || (node.package && node.package[key])) const set = map.get(val) if (set) { set.delete(node) @@ -116,18 +108,13 @@ class Inventory extends Map { } query (key, val) { - const map = this.#index.get(key) - if (arguments.length === 2) { - if (map.has(val)) { - return map.get(val) - } - return new Set() - } - return map.keys() + const map = this[_index].get(key) + return map && (arguments.length === 2 ? map.get(val) : map.keys()) || + new Set() } has (node) { - return super.get(node.location) === node + return super.get(node[this.primaryKey]) === node } set (k, v) { diff --git a/deps/npm/node_modules/@npmcli/arborist/lib/node.js b/deps/npm/node_modules/@npmcli/arborist/lib/node.js index bdc021b7c12a99..b21a3d8e3de0a3 100644 --- a/deps/npm/node_modules/@npmcli/arborist/lib/node.js +++ b/deps/npm/node_modules/@npmcli/arborist/lib/node.js @@ -39,7 +39,7 @@ const npa = require('npm-package-arg') const debug = require('./debug.js') const gatherDepSet = require('./gather-dep-set.js') const treeCheck = require('./tree-check.js') -const { walkUp } = require('walk-up-path') +const walkUp = require('walk-up-path') const { resolve, relative, dirname, basename } = require('path') const util = require('util') @@ -47,15 +47,21 @@ const _package = Symbol('_package') const _parent = Symbol('_parent') const _target = Symbol.for('_target') const _fsParent = Symbol('_fsParent') +const _loadDepType = Symbol('_loadDepType') +const _loadWorkspaces = Symbol('_loadWorkspaces') const _reloadNamedEdges = Symbol('_reloadNamedEdges') // overridden by Link class const _loadDeps = Symbol.for('Arborist.Node._loadDeps') +const _root = Symbol('_root') const _refreshLocation = Symbol.for('_refreshLocation') const _changePath = Symbol.for('_changePath') // used by Link class as well const _delistFromMeta = Symbol.for('_delistFromMeta') +const _global = Symbol.for('global') +const _workspaces = Symbol('_workspaces') const _explain = Symbol('_explain') const _explanation = Symbol('_explanation') +const _meta = Symbol('_meta') const relpath = require('./relpath.js') const consistentResolve = require('./consistent-resolve.js') @@ -66,11 +72,6 @@ const CaseInsensitiveMap = require('./case-insensitive-map.js') const querySelectorAll = require('./query-selector-all.js') class Node { - #global - #meta - #root - #workspaces - constructor (options) { // NB: path can be null if it's a link target const { @@ -108,9 +109,9 @@ class Node { this.queryContext = {} // true if part of a global install - this.#global = global + this[_global] = global - this.#workspaces = null + this[_workspaces] = null this.errors = error ? [error] : [] this.isInStore = isInStore @@ -164,7 +165,7 @@ class Node { this.children = new CaseInsensitiveMap() this.fsChildren = new Set() - this.inventory = new Inventory() + this.inventory = new Inventory({}) this.tops = new Set() this.linksIn = new Set(linksIn || []) @@ -261,21 +262,18 @@ class Node { } get meta () { - return this.#meta + return this[_meta] } set meta (meta) { - this.#meta = meta + this[_meta] = meta if (meta) { meta.add(this) } } get global () { - if (this.#root === this) { - return this.#global - } - return this.#root.global + return this.root[_global] } // true for packages installed directly in the global node_modules folder @@ -284,21 +282,21 @@ class Node { } get workspaces () { - return this.#workspaces + return this[_workspaces] } set workspaces (workspaces) { // deletes edges if they already exists - if (this.#workspaces) { - for (const name of this.#workspaces.keys()) { + if (this[_workspaces]) { + for (const name of this[_workspaces].keys()) { if (!workspaces.has(name)) { this.edgesOut.get(name).detach() } } } - this.#workspaces = workspaces - this.#loadWorkspaces() + this[_workspaces] = workspaces + this[_loadWorkspaces]() this[_loadDeps]() } @@ -369,7 +367,7 @@ class Node { pkg = {} } this[_package] = pkg - this.#loadWorkspaces() + this[_loadWorkspaces]() this[_loadDeps]() // do a hard reload, since the dependents may now be valid or invalid // as a result of the package change. @@ -571,12 +569,12 @@ class Node { // this allows us to do new Node({...}) and then set the root later. // just make the assignment so we don't lose it, and move on. if (!this.path || !root.realpath || !root.path) { - this.#root = root + this[_root] = root return } // temporarily become a root node - this.#root = this + this[_root] = this // break all linksIn, we're going to re-set them if needed later for (const link of this.linksIn) { @@ -620,7 +618,7 @@ class Node { current.root = null } - this.#root = root + this[_root] = root // set this.location and add to inventory this[_refreshLocation]() @@ -686,22 +684,22 @@ class Node { // the node at nm/a, which might have the root node as a fsParent. // we can't rely on the public setter here, because it calls into // this function to set up these references! - // check dirname so that /foo isn't treated as the fsparent of /foo-bar const nmloc = `${this.location}${this.location ? '/' : ''}node_modules/` + const isChild = n => n.location === nmloc + n.name + // check dirname so that /foo isn't treated as the fsparent of /foo-bar + const isFsChild = n => { + return dirname(n.path).startsWith(this.path) && + n !== this && + !n.parent && + (!n.fsParent || + n.fsParent === this || + dirname(this.path).startsWith(n.fsParent.path)) + } + const isKid = n => isChild(n) || isFsChild(n) + // only walk top nodes, since anything else already has a parent. for (const child of root.tops) { - const isChild = child.location === nmloc + child.name - const isFsChild = - dirname(child.path).startsWith(this.path) && - child !== this && - !child.parent && - ( - !child.fsParent || - child.fsParent === this || - dirname(this.path).startsWith(child.fsParent.path) - ) - - if (!isChild && !isFsChild) { + if (!isKid(child)) { continue } @@ -714,7 +712,7 @@ class Node { child.fsParent.fsChildren.delete(child) } child[_fsParent] = null - if (isChild) { + if (isChild(child)) { this.children.set(child.name, child) child[_parent] = this root.tops.delete(child) @@ -825,21 +823,19 @@ class Node { } // tree should always be valid upon root setter completion. treeCheck(this) - if (this !== root) { - treeCheck(root) - } + treeCheck(root) } get root () { - return this.#root || this + return this[_root] || this } - #loadWorkspaces () { - if (!this.#workspaces) { + [_loadWorkspaces] () { + if (!this[_workspaces]) { return } - for (const [name, path] of this.#workspaces.entries()) { + for (const [name, path] of this[_workspaces].entries()) { new Edge({ from: this, name, spec: `file:${path.replace(/#/g, '%23')}`, type: 'workspace' }) } } @@ -855,24 +851,23 @@ class Node { // but don't have a 'path' field, only a 'realpath', because we // don't know their canonical location. We don't need their devDeps. const pd = this.package.peerDependencies - const ad = this.package.acceptDependencies || {} if (pd && typeof pd === 'object' && !this.legacyPeerDeps) { const pm = this.package.peerDependenciesMeta || {} const peerDependencies = {} const peerOptional = {} for (const [name, dep] of Object.entries(pd)) { - if (pm[name]?.optional) { + if (pm[name] && pm[name].optional) { peerOptional[name] = dep } else { peerDependencies[name] = dep } } - this.#loadDepType(peerDependencies, 'peer', ad) - this.#loadDepType(peerOptional, 'peerOptional', ad) + this[_loadDepType](peerDependencies, 'peer') + this[_loadDepType](peerOptional, 'peerOptional') } - this.#loadDepType(this.package.dependencies, 'prod', ad) - this.#loadDepType(this.package.optionalDependencies, 'optional', ad) + this[_loadDepType](this.package.dependencies, 'prod') + this[_loadDepType](this.package.optionalDependencies, 'optional') const { globalTop, isTop, path, sourceReference } = this const { @@ -883,11 +878,12 @@ class Node { const thisDev = isTop && !globalTop && path const srcDev = !sourceReference || srcTop && !srcGlobalTop && srcPath if (thisDev && srcDev) { - this.#loadDepType(this.package.devDependencies, 'dev', ad) + this[_loadDepType](this.package.devDependencies, 'dev') } } - #loadDepType (deps, type, ad) { + [_loadDepType] (deps, type) { + const ad = this.package.acceptDependencies || {} // Because of the order in which _loadDeps runs, we always want to // prioritize a new edge over an existing one for (const [name, spec] of Object.entries(deps || {})) { @@ -899,8 +895,14 @@ class Node { } get fsParent () { - // in debug setter prevents fsParent from being this - return this[_fsParent] + const parent = this[_fsParent] + /* istanbul ignore next - should be impossible */ + debug(() => { + if (parent === this) { + throw new Error('node set to its own fsParent') + } + }) + return parent } set fsParent (fsParent) { @@ -995,7 +997,7 @@ class Node { // root dependency brings peer deps along with it. In that case, we // will go ahead and create the invalid state, and then try to resolve // it with more tree construction, because it's a user request. - canReplaceWith (node, ignorePeers) { + canReplaceWith (node, ignorePeers = []) { if (node.name !== this.name) { return false } @@ -1008,6 +1010,7 @@ class Node { if (node.overrides !== this.overrides) { return false } + ignorePeers = new Set(ignorePeers) // gather up all the deps of this node and that are only depended @@ -1019,10 +1022,11 @@ class Node { // when replacing peer sets, we need to be able to replace the entire // peer group, which means we ignore incoming edges from other peers // within the replacement set. - if (!this.isTop && + const ignored = !this.isTop && edge.from.parent === this.parent && edge.peer && - ignorePeers.has(edge.from.name)) { + ignorePeers.has(edge.from.name) + if (ignored) { continue } @@ -1152,7 +1156,9 @@ class Node { // something case-insensitively, so merely setting name and path won't // have the desired effect. just set the path so it'll collide in the // parent's children map, and leave it at that. - if (node.parent?.children.get(this.name) === node) { + const nameMatch = node.parent && + node.parent.children.get(this.name) === node + if (nameMatch) { this.path = resolve(node.parent.path, 'node_modules', this.name) } else { this.path = node.path @@ -1187,8 +1193,14 @@ class Node { } get parent () { - // setter prevents _parent from being this - return this[_parent] + const parent = this[_parent] + /* istanbul ignore next - should be impossible */ + debug(() => { + if (parent === this) { + throw new Error('node set to its own parent') + } + }) + return parent } // This setter keeps everything in order when we move a node from @@ -1393,10 +1405,7 @@ class Node { } get depth () { - if (this.isTop) { - return 0 - } - return this.parent.depth + 1 + return this.isTop ? 0 : this.parent.depth + 1 } get isTop () { @@ -1404,10 +1413,7 @@ class Node { } get top () { - if (this.isTop) { - return this - } - return this.parent.top + return this.isTop ? this : this.parent.top } get isFsTop () { @@ -1415,10 +1421,7 @@ class Node { } get fsTop () { - if (this.isFsTop) { - return this - } - return this.fsParent.fsTop + return this.isFsTop ? this : this.fsParent.fsTop } get resolveParent () { diff --git a/deps/npm/node_modules/@npmcli/arborist/lib/query-selector-all.js b/deps/npm/node_modules/@npmcli/arborist/lib/query-selector-all.js index 36334e5a859f1d..5d21c92df78e58 100644 --- a/deps/npm/node_modules/@npmcli/arborist/lib/query-selector-all.js +++ b/deps/npm/node_modules/@npmcli/arborist/lib/query-selector-all.js @@ -4,7 +4,7 @@ const { resolve } = require('path') const { parser, arrayDelimiter } = require('@npmcli/query') const localeCompare = require('@isaacs/string-locale-compare')('en') const log = require('proc-log') -const { minimatch } = require('minimatch') +const minimatch = require('minimatch') const npa = require('npm-package-arg') const pacote = require('pacote') const semver = require('semver') diff --git a/deps/npm/node_modules/@npmcli/arborist/package.json b/deps/npm/node_modules/@npmcli/arborist/package.json index bba6a2e9e5c85c..f5706d414ef12b 100644 --- a/deps/npm/node_modules/@npmcli/arborist/package.json +++ b/deps/npm/node_modules/@npmcli/arborist/package.json @@ -1,6 +1,6 @@ { "name": "@npmcli/arborist", - "version": "6.2.9", + "version": "6.2.7", "description": "Manage node_modules trees", "dependencies": { "@isaacs/string-locale-compare": "^1.1.0", @@ -19,7 +19,7 @@ "hosted-git-info": "^6.1.1", "json-parse-even-better-errors": "^3.0.0", "json-stringify-nice": "^1.1.4", - "minimatch": "^9.0.0", + "minimatch": "^7.4.2", "nopt": "^7.0.0", "npm-install-checks": "^6.0.0", "npm-package-arg": "^10.1.0", @@ -35,11 +35,11 @@ "semver": "^7.3.7", "ssri": "^10.0.1", "treeverse": "^3.0.0", - "walk-up-path": "^3.0.1" + "walk-up-path": "^1.0.0" }, "devDependencies": { "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.14.1", + "@npmcli/template-oss": "4.12.1", "benchmark": "^2.1.4", "chalk": "^4.1.0", "minify-registry-metadata": "^3.0.0", @@ -98,7 +98,7 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.14.1", + "version": "4.12.1", "content": "../../scripts/template-oss/index.js" } } diff --git a/deps/npm/node_modules/@npmcli/config/lib/index.js b/deps/npm/node_modules/@npmcli/config/lib/index.js index 9bba1d6977ae39..6520e5616ff41c 100644 --- a/deps/npm/node_modules/@npmcli/config/lib/index.js +++ b/deps/npm/node_modules/@npmcli/config/lib/index.js @@ -1,5 +1,5 @@ // TODO: set the scope config from package.json or explicit cli config -const { walkUp } = require('walk-up-path') +const walkUp = require('walk-up-path') const ini = require('ini') const nopt = require('nopt') const mapWorkspaces = require('@npmcli/map-workspaces') @@ -72,12 +72,16 @@ const confTypes = new Set([ 'cli', ]) -class Config { - #loaded = false - #flatten - // populated the first time we flatten the object - #flatOptions = null +const _loaded = Symbol('loaded') +const _get = Symbol('get') +const _find = Symbol('find') +const _loadObject = Symbol('loadObject') +const _loadFile = Symbol('loadFile') +const _checkDeprecated = Symbol('checkDeprecated') +const _flatten = Symbol('flatten') +const _flatOptions = Symbol('flatOptions') +class Config { static get typeDefs () { return typeDefs } @@ -109,7 +113,9 @@ class Config { } } - this.#flatten = flatten + // populated the first time we flatten the object + this[_flatOptions] = null + this[_flatten] = flatten this.types = types this.shorthands = shorthands this.defaults = defaults @@ -153,15 +159,15 @@ class Config { } Object.freeze(this.list) - this.#loaded = false + this[_loaded] = false } get loaded () { - return this.#loaded + return this[_loaded] } get prefix () { - return this.#get('global') ? this.globalPrefix : this.localPrefix + return this[_get]('global') ? this.globalPrefix : this.localPrefix } // return the location where key is found. @@ -169,7 +175,10 @@ class Config { if (!this.loaded) { throw new Error('call config.load() before reading values') } + return this[_find](key) + } + [_find] (key) { // have to look in reverse order const entries = [...this.data.entries()] for (let i = entries.length - 1; i > -1; i--) { @@ -185,12 +194,12 @@ class Config { if (!this.loaded) { throw new Error('call config.load() before reading values') } - return this.#get(key, where) + return this[_get](key, where) } // we need to get values sometimes, so use this internal one to do so // while in the process of loading. - #get (key, where = null) { + [_get] (key, where = null) { if (where !== null && !confTypes.has(where)) { throw new Error('invalid config location param: ' + where) } @@ -205,35 +214,32 @@ class Config { if (!confTypes.has(where)) { throw new Error('invalid config location param: ' + where) } - this.#checkDeprecated(key) - const { data, raw } = this.data.get(where) + this[_checkDeprecated](key) + const { data } = this.data.get(where) data[key] = val - if (['global', 'user', 'project'].includes(where)) { - raw[key] = val - } // this is now dirty, the next call to this.valid will have to check it this.data.get(where)[_valid] = null // the flat options are invalidated, regenerate next time they're needed - this.#flatOptions = null + this[_flatOptions] = null } get flat () { - if (this.#flatOptions) { - return this.#flatOptions + if (this[_flatOptions]) { + return this[_flatOptions] } // create the object for flat options passed to deps process.emit('time', 'config:load:flatten') - this.#flatOptions = {} + this[_flatOptions] = {} // walk from least priority to highest for (const { data } of this.data.values()) { - this.#flatten(data, this.#flatOptions) + this[_flatten](data, this[_flatOptions]) } process.emit('timeEnd', 'config:load:flatten') - return this.#flatOptions + return this[_flatOptions] } delete (key, where = 'cli') { @@ -243,11 +249,7 @@ class Config { if (!confTypes.has(where)) { throw new Error('invalid config location param: ' + where) } - const { data, raw } = this.data.get(where) - delete data[key] - if (['global', 'user', 'project'].includes(where)) { - delete raw[key] - } + delete this.data.get(where).data[key] } async load () { @@ -288,8 +290,8 @@ class Config { process.emit('timeEnd', 'config:load:global') // set this before calling setEnvs, so that we don't have to share - // private attributes, as that module also does a bunch of get operations - this.#loaded = true + // symbols, as that module also does a bunch of get operations + this[_loaded] = true // set proper globalPrefix now that everything is loaded this.globalPrefix = this.get('prefix') @@ -305,7 +307,7 @@ class Config { this.loadGlobalPrefix() this.loadHome() - this.#loadObject({ + this[_loadObject]({ ...this.defaults, prefix: this.globalPrefix, }, 'default', 'default values') @@ -314,13 +316,13 @@ class Config { // the metrics-registry defaults to the current resolved value of // the registry, unless overridden somewhere else. - settableGetter(data, 'metrics-registry', () => this.#get('registry')) + settableGetter(data, 'metrics-registry', () => this[_get]('registry')) // if the prefix is set on cli, env, or userconfig, then we need to // default the globalconfig file to that location, instead of the default // global prefix. It's weird that `npm get globalconfig --prefix=/foo` // returns `/foo/etc/npmrc`, but better to not change it at this point. - settableGetter(data, 'globalconfig', () => resolve(this.#get('prefix'), 'etc/npmrc')) + settableGetter(data, 'globalconfig', () => resolve(this[_get]('prefix'), 'etc/npmrc')) } loadHome () { @@ -361,7 +363,7 @@ class Config { } conf[key] = envVal } - this.#loadObject(conf, 'env', 'environment') + this[_loadObject](conf, 'env', 'environment') } loadCLI () { @@ -371,7 +373,7 @@ class Config { nopt.invalidHandler = null this.parsedArgv = conf.argv delete conf.argv - this.#loadObject(conf, 'cli', 'command line options') + this[_loadObject](conf, 'cli', 'command line options') } get valid () { @@ -539,8 +541,7 @@ class Config { log.warn('invalid config', msg, desc) } - #loadObject (obj, where, source, er = null) { - // obj is the raw data read from the file + [_loadObject] (obj, where, source, er = null) { const conf = this.data.get(where) if (conf.source) { const m = `double-loading "${where}" configs from ${source}, ` + @@ -567,14 +568,14 @@ class Config { const k = envReplace(key, this.env) const v = this.parseField(value, k) if (where !== 'default') { - this.#checkDeprecated(k, where, obj, [key, value]) + this[_checkDeprecated](k, where, obj, [key, value]) } conf.data[k] = v } } } - #checkDeprecated (key, where, obj, kv) { + [_checkDeprecated] (key, where, obj, kv) { // XXX(npm9+) make this throw an error if (this.deprecated[key]) { log.warn('config', key, this.deprecated[key]) @@ -586,18 +587,18 @@ class Config { return parseField(f, key, this, listElement) } - async #loadFile (file, type) { + async [_loadFile] (file, type) { process.emit('time', 'config:load:file:' + file) // only catch the error from readFile, not from the loadObject call await readFile(file, 'utf8').then( - data => this.#loadObject(ini.parse(data), type, file), - er => this.#loadObject(null, type, file, er) + data => this[_loadObject](ini.parse(data), type, file), + er => this[_loadObject](null, type, file, er) ) process.emit('timeEnd', 'config:load:file:' + file) } loadBuiltinConfig () { - return this.#loadFile(resolve(this.npmPath, 'npmrc'), 'builtin') + return this[_loadFile](resolve(this.npmPath, 'npmrc'), 'builtin') } async loadProjectConfig () { @@ -612,7 +613,7 @@ class Config { this.localPackage = await fileExists(this.localPrefix, 'package.json') } - if (this.#get('global') === true || this.#get('location') === 'global') { + if (this[_get]('global') === true || this[_get]('location') === 'global') { this.data.get('project').source = '(global mode enabled, ignored)' this.sources.set(this.data.get('project').source, 'project') return @@ -624,8 +625,8 @@ class Config { // up loading the "project" config where the "userconfig" will be, // which causes some calamaties. So, we only load project config if // it doesn't match what the userconfig will be. - if (projectFile !== this.#get('userconfig')) { - return this.#loadFile(projectFile, 'project') + if (projectFile !== this[_get]('userconfig')) { + return this[_loadFile](projectFile, 'project') } else { this.data.get('project').source = '(same as "user" config, ignored)' this.sources.set(this.data.get('project').source, 'project') @@ -633,14 +634,14 @@ class Config { } async loadLocalPrefix () { - const cliPrefix = this.#get('prefix', 'cli') + const cliPrefix = this[_get]('prefix', 'cli') if (cliPrefix) { this.localPrefix = cliPrefix return } - const cliWorkspaces = this.#get('workspaces', 'cli') - const isGlobal = this.#get('global') || this.#get('location') === 'global' + const cliWorkspaces = this[_get]('workspaces', 'cli') + const isGlobal = this[_get]('global') || this[_get]('location') === 'global' for (const p of walkUp(this.cwd)) { // HACK: this is an option set in tests to stop the local prefix from being set @@ -700,11 +701,11 @@ class Config { } loadUserConfig () { - return this.#loadFile(this.#get('userconfig'), 'user') + return this[_loadFile](this[_get]('userconfig'), 'user') } loadGlobalConfig () { - return this.#loadFile(this.#get('globalconfig'), 'global') + return this[_loadFile](this[_get]('globalconfig'), 'global') } async save (where) { @@ -716,6 +717,7 @@ class Config { } const conf = this.data.get(where) + conf[_raw] = { ...conf.data } conf[_loadError] = null if (where === 'user') { @@ -728,9 +730,7 @@ class Config { } } - // We need the actual raw data before we called parseField so that we are - // saving the same content back to the file - const iniData = ini.stringify(conf.raw).trim() + '\n' + const iniData = ini.stringify(conf.data).trim() + '\n' if (!iniData.trim()) { // ignore the unlink error (eg, if file doesn't exist) await unlink(conf.source).catch(er => {}) @@ -870,21 +870,22 @@ class Config { } } +const _data = Symbol('data') +const _raw = Symbol('raw') const _loadError = Symbol('loadError') +const _source = Symbol('source') const _valid = Symbol('valid') - class ConfigData { - #data - #source = null - #raw = null constructor (parent) { - this.#data = Object.create(parent && parent.data) - this.#raw = {} + this[_data] = Object.create(parent && parent.data) + this[_source] = null + this[_loadError] = null + this[_raw] = null this[_valid] = true } get data () { - return this.#data + return this[_data] } get valid () { @@ -892,18 +893,18 @@ class ConfigData { } set source (s) { - if (this.#source) { + if (this[_source]) { throw new Error('cannot set ConfigData source more than once') } - this.#source = s + this[_source] = s } get source () { - return this.#source + return this[_source] } set loadError (e) { - if (this[_loadError] || (Object.keys(this.#raw).length)) { + if (this[_loadError] || this[_raw]) { throw new Error('cannot set ConfigData loadError after load') } this[_loadError] = e @@ -914,14 +915,14 @@ class ConfigData { } set raw (r) { - if (Object.keys(this.#raw).length || this[_loadError]) { + if (this[_raw] || this[_loadError]) { throw new Error('cannot set ConfigData raw after load') } - this.#raw = r + this[_raw] = r } get raw () { - return this.#raw + return this[_raw] } } diff --git a/deps/npm/node_modules/@npmcli/config/package.json b/deps/npm/node_modules/@npmcli/config/package.json index f34d20f1e4dd83..d61e4fab839c43 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.5", "files": [ "bin/", "lib/" @@ -33,23 +33,23 @@ }, "devDependencies": { "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.14.1", + "@npmcli/template-oss": "4.12.1", "tap": "^16.3.4" }, "dependencies": { "@npmcli/map-workspaces": "^3.0.2", - "ini": "^4.1.0", + "ini": "^3.0.0", "nopt": "^7.0.0", "proc-log": "^3.0.0", "read-package-json-fast": "^3.0.2", "semver": "^7.3.5", - "walk-up-path": "^3.0.1" + "walk-up-path": "^1.0.0" }, "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.14.1" + "version": "4.12.1" } } diff --git a/deps/npm/node_modules/@npmcli/map-workspaces/lib/index.js b/deps/npm/node_modules/@npmcli/map-workspaces/lib/index.js index 501dad870a2b75..cd9b65db53231c 100644 --- a/deps/npm/node_modules/@npmcli/map-workspaces/lib/index.js +++ b/deps/npm/node_modules/@npmcli/map-workspaces/lib/index.js @@ -1,9 +1,9 @@ const path = require('path') const getName = require('@npmcli/name-from-folder') -const { minimatch } = require('minimatch') +const minimatch = require('minimatch') const rpj = require('read-package-json-fast') -const { glob } = require('glob') +const glob = require('glob') function appendNegatedPatterns (patterns) { const results = [] diff --git a/deps/npm/node_modules/@npmcli/map-workspaces/package.json b/deps/npm/node_modules/@npmcli/map-workspaces/package.json index 64cb7f9d3f1177..35b7e3fde2362e 100644 --- a/deps/npm/node_modules/@npmcli/map-workspaces/package.json +++ b/deps/npm/node_modules/@npmcli/map-workspaces/package.json @@ -1,6 +1,6 @@ { "name": "@npmcli/map-workspaces", - "version": "3.0.4", + "version": "3.0.3", "main": "lib/index.js", "files": [ "bin/", @@ -43,18 +43,17 @@ }, "devDependencies": { "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.14.1", + "@npmcli/template-oss": "4.12.0", "tap": "^16.0.1" }, "dependencies": { "@npmcli/name-from-folder": "^2.0.0", - "glob": "^10.2.2", - "minimatch": "^9.0.0", + "glob": "^9.3.1", + "minimatch": "^7.4.2", "read-package-json-fast": "^3.0.0" }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.14.1", - "publish": "true" + "version": "4.12.0" } } diff --git a/deps/npm/node_modules/@npmcli/metavuln-calculator/lib/advisory.js b/deps/npm/node_modules/@npmcli/metavuln-calculator/lib/advisory.js index 01f6a66fc2ac4c..1f479a90dd999f 100644 --- a/deps/npm/node_modules/@npmcli/metavuln-calculator/lib/advisory.js +++ b/deps/npm/node_modules/@npmcli/metavuln-calculator/lib/advisory.js @@ -106,7 +106,7 @@ class Advisory { this[_packument] = packument - const pakuVersions = Object.keys(packument.versions || {}) + const pakuVersions = Object.keys(packument.versions) const allVersions = new Set([...pakuVersions, ...this.versions]) const versionsAdded = [] const versionsRemoved = [] @@ -242,7 +242,7 @@ class Advisory { // check the dependency of this version on the vulnerable dep // if we got a version that's not in the packument, fall back on // the spec provided, if possible. - const mani = this[_packument]?.versions?.[version] || { + const mani = this[_packument].versions[version] || { dependencies: { [this.dependency]: spec, }, diff --git a/deps/npm/node_modules/@npmcli/metavuln-calculator/package.json b/deps/npm/node_modules/@npmcli/metavuln-calculator/package.json index 18ebb68c4bfd1a..baf59c47fcb403 100644 --- a/deps/npm/node_modules/@npmcli/metavuln-calculator/package.json +++ b/deps/npm/node_modules/@npmcli/metavuln-calculator/package.json @@ -1,6 +1,6 @@ { "name": "@npmcli/metavuln-calculator", - "version": "5.0.1", + "version": "5.0.0", "main": "lib/index.js", "files": [ "bin/", @@ -33,8 +33,8 @@ ] }, "devDependencies": { - "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.13.0", + "@npmcli/eslint-config": "^3.0.1", + "@npmcli/template-oss": "4.5.1", "require-inject": "^1.4.4", "tap": "^16.0.1" }, @@ -49,7 +49,6 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.13.0", - "publish": "true" + "version": "4.5.1" } } diff --git a/deps/npm/node_modules/@npmcli/run-script/package.json b/deps/npm/node_modules/@npmcli/run-script/package.json index cdcf6fb0fcf823..dbae5733a368b7 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.0", "description": "Run a lifecycle script for a package (descendant of npm-lifecycle)", "author": "GitHub Inc.", "license": "ISC", @@ -16,7 +16,8 @@ }, "devDependencies": { "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.14.1", + "@npmcli/template-oss": "4.8.0", + "minipass": "^3.1.6", "require-inject": "^1.4.4", "tap": "^16.0.1" }, @@ -41,8 +42,7 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.14.1", - "publish": "true" + "version": "4.8.0" }, "tap": { "nyc-arg": [ diff --git a/deps/npm/node_modules/@pkgjs/parseargs/LICENSE b/deps/npm/node_modules/@pkgjs/parseargs/LICENSE deleted file mode 100644 index 261eeb9e9f8b2b..00000000000000 --- a/deps/npm/node_modules/@pkgjs/parseargs/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/deps/npm/node_modules/@pkgjs/parseargs/examples/is-default-value.js b/deps/npm/node_modules/@pkgjs/parseargs/examples/is-default-value.js deleted file mode 100644 index 0a67972b71d135..00000000000000 --- a/deps/npm/node_modules/@pkgjs/parseargs/examples/is-default-value.js +++ /dev/null @@ -1,25 +0,0 @@ -'use strict'; - -// This example shows how to understand if a default value is used or not. - -// 1. const { parseArgs } = require('node:util'); // from node -// 2. const { parseArgs } = require('@pkgjs/parseargs'); // from package -const { parseArgs } = require('..'); // in repo - -const options = { - file: { short: 'f', type: 'string', default: 'FOO' }, -}; - -const { values, tokens } = parseArgs({ options, tokens: true }); - -const isFileDefault = !tokens.some((token) => token.kind === 'option' && - token.name === 'file' -); - -console.log(values); -console.log(`Is the file option [${values.file}] the default value? ${isFileDefault}`); - -// Try the following: -// node is-default-value.js -// node is-default-value.js -f FILE -// node is-default-value.js --file FILE diff --git a/deps/npm/node_modules/@pkgjs/parseargs/examples/limit-long-syntax.js b/deps/npm/node_modules/@pkgjs/parseargs/examples/limit-long-syntax.js deleted file mode 100644 index 943e643ee9553b..00000000000000 --- a/deps/npm/node_modules/@pkgjs/parseargs/examples/limit-long-syntax.js +++ /dev/null @@ -1,35 +0,0 @@ -'use strict'; - -// This is an example of using tokens to add a custom behaviour. -// -// Require the use of `=` for long options and values by blocking -// the use of space separated values. -// So allow `--foo=bar`, and not allow `--foo bar`. -// -// Note: this is not a common behaviour, most CLIs allow both forms. - -// 1. const { parseArgs } = require('node:util'); // from node -// 2. const { parseArgs } = require('@pkgjs/parseargs'); // from package -const { parseArgs } = require('..'); // in repo - -const options = { - file: { short: 'f', type: 'string' }, - log: { type: 'string' }, -}; - -const { values, tokens } = parseArgs({ options, tokens: true }); - -const badToken = tokens.find((token) => token.kind === 'option' && - token.value != null && - token.rawName.startsWith('--') && - !token.inlineValue -); -if (badToken) { - throw new Error(`Option value for '${badToken.rawName}' must be inline, like '${badToken.rawName}=VALUE'`); -} - -console.log(values); - -// Try the following: -// node limit-long-syntax.js -f FILE --log=LOG -// node limit-long-syntax.js --file FILE diff --git a/deps/npm/node_modules/@pkgjs/parseargs/examples/negate.js b/deps/npm/node_modules/@pkgjs/parseargs/examples/negate.js deleted file mode 100644 index b6634690a4a0c0..00000000000000 --- a/deps/npm/node_modules/@pkgjs/parseargs/examples/negate.js +++ /dev/null @@ -1,43 +0,0 @@ -'use strict'; - -// This example is used in the documentation. - -// How might I add my own support for --no-foo? - -// 1. const { parseArgs } = require('node:util'); // from node -// 2. const { parseArgs } = require('@pkgjs/parseargs'); // from package -const { parseArgs } = require('..'); // in repo - -const options = { - 'color': { type: 'boolean' }, - 'no-color': { type: 'boolean' }, - 'logfile': { type: 'string' }, - 'no-logfile': { type: 'boolean' }, -}; -const { values, tokens } = parseArgs({ options, tokens: true }); - -// Reprocess the option tokens and overwrite the returned values. -tokens - .filter((token) => token.kind === 'option') - .forEach((token) => { - if (token.name.startsWith('no-')) { - // Store foo:false for --no-foo - const positiveName = token.name.slice(3); - values[positiveName] = false; - delete values[token.name]; - } else { - // Resave value so last one wins if both --foo and --no-foo. - values[token.name] = token.value ?? true; - } - }); - -const color = values.color; -const logfile = values.logfile ?? 'default.log'; - -console.log({ logfile, color }); - -// Try the following: -// node negate.js -// node negate.js --no-logfile --no-color -// negate.js --logfile=test.log --color -// node negate.js --no-logfile --logfile=test.log --color --no-color diff --git a/deps/npm/node_modules/@pkgjs/parseargs/examples/no-repeated-options.js b/deps/npm/node_modules/@pkgjs/parseargs/examples/no-repeated-options.js deleted file mode 100644 index 0c324688af0305..00000000000000 --- a/deps/npm/node_modules/@pkgjs/parseargs/examples/no-repeated-options.js +++ /dev/null @@ -1,31 +0,0 @@ -'use strict'; - -// This is an example of using tokens to add a custom behaviour. -// -// Throw an error if an option is used more than once. - -// 1. const { parseArgs } = require('node:util'); // from node -// 2. const { parseArgs } = require('@pkgjs/parseargs'); // from package -const { parseArgs } = require('..'); // in repo - -const options = { - ding: { type: 'boolean', short: 'd' }, - beep: { type: 'boolean', short: 'b' } -}; -const { values, tokens } = parseArgs({ options, tokens: true }); - -const seenBefore = new Set(); -tokens.forEach((token) => { - if (token.kind !== 'option') return; - if (seenBefore.has(token.name)) { - throw new Error(`option '${token.name}' used multiple times`); - } - seenBefore.add(token.name); -}); - -console.log(values); - -// Try the following: -// node no-repeated-options --ding --beep -// node no-repeated-options --beep -b -// node no-repeated-options -ddd diff --git a/deps/npm/node_modules/@pkgjs/parseargs/examples/ordered-options.mjs b/deps/npm/node_modules/@pkgjs/parseargs/examples/ordered-options.mjs deleted file mode 100644 index 8ab7367b8bbb11..00000000000000 --- a/deps/npm/node_modules/@pkgjs/parseargs/examples/ordered-options.mjs +++ /dev/null @@ -1,41 +0,0 @@ -// This is an example of using tokens to add a custom behaviour. -// -// This adds a option order check so that --some-unstable-option -// may only be used after --enable-experimental-options -// -// Note: this is not a common behaviour, the order of different options -// does not usually matter. - -import { parseArgs } from '../index.js'; - -function findTokenIndex(tokens, target) { - return tokens.findIndex((token) => token.kind === 'option' && - token.name === target - ); -} - -const experimentalName = 'enable-experimental-options'; -const unstableName = 'some-unstable-option'; - -const options = { - [experimentalName]: { type: 'boolean' }, - [unstableName]: { type: 'boolean' }, -}; - -const { values, tokens } = parseArgs({ options, tokens: true }); - -const experimentalIndex = findTokenIndex(tokens, experimentalName); -const unstableIndex = findTokenIndex(tokens, unstableName); -if (unstableIndex !== -1 && - ((experimentalIndex === -1) || (unstableIndex < experimentalIndex))) { - throw new Error(`'--${experimentalName}' must be specified before '--${unstableName}'`); -} - -console.log(values); - -/* eslint-disable max-len */ -// Try the following: -// node ordered-options.mjs -// node ordered-options.mjs --some-unstable-option -// node ordered-options.mjs --some-unstable-option --enable-experimental-options -// node ordered-options.mjs --enable-experimental-options --some-unstable-option diff --git a/deps/npm/node_modules/@pkgjs/parseargs/examples/simple-hard-coded.js b/deps/npm/node_modules/@pkgjs/parseargs/examples/simple-hard-coded.js deleted file mode 100644 index eff04c2a60fa21..00000000000000 --- a/deps/npm/node_modules/@pkgjs/parseargs/examples/simple-hard-coded.js +++ /dev/null @@ -1,26 +0,0 @@ -'use strict'; - -// This example is used in the documentation. - -// 1. const { parseArgs } = require('node:util'); // from node -// 2. const { parseArgs } = require('@pkgjs/parseargs'); // from package -const { parseArgs } = require('..'); // in repo - -const args = ['-f', '--bar', 'b']; -const options = { - foo: { - type: 'boolean', - short: 'f' - }, - bar: { - type: 'string' - } -}; -const { - values, - positionals -} = parseArgs({ args, options }); -console.log(values, positionals); - -// Try the following: -// node simple-hard-coded.js diff --git a/deps/npm/node_modules/@pkgjs/parseargs/index.js b/deps/npm/node_modules/@pkgjs/parseargs/index.js deleted file mode 100644 index b1004c7b72f271..00000000000000 --- a/deps/npm/node_modules/@pkgjs/parseargs/index.js +++ /dev/null @@ -1,396 +0,0 @@ -'use strict'; - -const { - ArrayPrototypeForEach, - ArrayPrototypeIncludes, - ArrayPrototypeMap, - ArrayPrototypePush, - ArrayPrototypePushApply, - ArrayPrototypeShift, - ArrayPrototypeSlice, - ArrayPrototypeUnshiftApply, - ObjectEntries, - ObjectPrototypeHasOwnProperty: ObjectHasOwn, - StringPrototypeCharAt, - StringPrototypeIndexOf, - StringPrototypeSlice, - StringPrototypeStartsWith, -} = require('./internal/primordials'); - -const { - validateArray, - validateBoolean, - validateBooleanArray, - validateObject, - validateString, - validateStringArray, - validateUnion, -} = require('./internal/validators'); - -const { - kEmptyObject, -} = require('./internal/util'); - -const { - findLongOptionForShort, - isLoneLongOption, - isLoneShortOption, - isLongOptionAndValue, - isOptionValue, - isOptionLikeValue, - isShortOptionAndValue, - isShortOptionGroup, - useDefaultValueOption, - objectGetOwn, - optionsGetOwn, -} = require('./utils'); - -const { - codes: { - ERR_INVALID_ARG_VALUE, - ERR_PARSE_ARGS_INVALID_OPTION_VALUE, - ERR_PARSE_ARGS_UNKNOWN_OPTION, - ERR_PARSE_ARGS_UNEXPECTED_POSITIONAL, - }, -} = require('./internal/errors'); - -function getMainArgs() { - // Work out where to slice process.argv for user supplied arguments. - - // Check node options for scenarios where user CLI args follow executable. - const execArgv = process.execArgv; - if (ArrayPrototypeIncludes(execArgv, '-e') || - ArrayPrototypeIncludes(execArgv, '--eval') || - ArrayPrototypeIncludes(execArgv, '-p') || - ArrayPrototypeIncludes(execArgv, '--print')) { - return ArrayPrototypeSlice(process.argv, 1); - } - - // Normally first two arguments are executable and script, then CLI arguments - return ArrayPrototypeSlice(process.argv, 2); -} - -/** - * In strict mode, throw for possible usage errors like --foo --bar - * - * @param {object} token - from tokens as available from parseArgs - */ -function checkOptionLikeValue(token) { - if (!token.inlineValue && isOptionLikeValue(token.value)) { - // Only show short example if user used short option. - const example = StringPrototypeStartsWith(token.rawName, '--') ? - `'${token.rawName}=-XYZ'` : - `'--${token.name}=-XYZ' or '${token.rawName}-XYZ'`; - const errorMessage = `Option '${token.rawName}' argument is ambiguous. -Did you forget to specify the option argument for '${token.rawName}'? -To specify an option argument starting with a dash use ${example}.`; - throw new ERR_PARSE_ARGS_INVALID_OPTION_VALUE(errorMessage); - } -} - -/** - * In strict mode, throw for usage errors. - * - * @param {object} config - from config passed to parseArgs - * @param {object} token - from tokens as available from parseArgs - */ -function checkOptionUsage(config, token) { - if (!ObjectHasOwn(config.options, token.name)) { - throw new ERR_PARSE_ARGS_UNKNOWN_OPTION( - token.rawName, config.allowPositionals); - } - - const short = optionsGetOwn(config.options, token.name, 'short'); - const shortAndLong = `${short ? `-${short}, ` : ''}--${token.name}`; - const type = optionsGetOwn(config.options, token.name, 'type'); - if (type === 'string' && typeof token.value !== 'string') { - throw new ERR_PARSE_ARGS_INVALID_OPTION_VALUE(`Option '${shortAndLong} ' argument missing`); - } - // (Idiomatic test for undefined||null, expecting undefined.) - if (type === 'boolean' && token.value != null) { - throw new ERR_PARSE_ARGS_INVALID_OPTION_VALUE(`Option '${shortAndLong}' does not take an argument`); - } -} - - -/** - * Store the option value in `values`. - * - * @param {string} longOption - long option name e.g. 'foo' - * @param {string|undefined} optionValue - value from user args - * @param {object} options - option configs, from parseArgs({ options }) - * @param {object} values - option values returned in `values` by parseArgs - */ -function storeOption(longOption, optionValue, options, values) { - if (longOption === '__proto__') { - return; // No. Just no. - } - - // We store based on the option value rather than option type, - // preserving the users intent for author to deal with. - const newValue = optionValue ?? true; - if (optionsGetOwn(options, longOption, 'multiple')) { - // Always store value in array, including for boolean. - // values[longOption] starts out not present, - // first value is added as new array [newValue], - // subsequent values are pushed to existing array. - // (note: values has null prototype, so simpler usage) - if (values[longOption]) { - ArrayPrototypePush(values[longOption], newValue); - } else { - values[longOption] = [newValue]; - } - } else { - values[longOption] = newValue; - } -} - -/** - * Store the default option value in `values`. - * - * @param {string} longOption - long option name e.g. 'foo' - * @param {string - * | boolean - * | string[] - * | boolean[]} optionValue - default value from option config - * @param {object} values - option values returned in `values` by parseArgs - */ -function storeDefaultOption(longOption, optionValue, values) { - if (longOption === '__proto__') { - return; // No. Just no. - } - - values[longOption] = optionValue; -} - -/** - * Process args and turn into identified tokens: - * - option (along with value, if any) - * - positional - * - option-terminator - * - * @param {string[]} args - from parseArgs({ args }) or mainArgs - * @param {object} options - option configs, from parseArgs({ options }) - */ -function argsToTokens(args, options) { - const tokens = []; - let index = -1; - let groupCount = 0; - - const remainingArgs = ArrayPrototypeSlice(args); - while (remainingArgs.length > 0) { - const arg = ArrayPrototypeShift(remainingArgs); - const nextArg = remainingArgs[0]; - if (groupCount > 0) - groupCount--; - else - index++; - - // Check if `arg` is an options terminator. - // Guideline 10 in https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap12.html - if (arg === '--') { - // Everything after a bare '--' is considered a positional argument. - ArrayPrototypePush(tokens, { kind: 'option-terminator', index }); - ArrayPrototypePushApply( - tokens, ArrayPrototypeMap(remainingArgs, (arg) => { - return { kind: 'positional', index: ++index, value: arg }; - }) - ); - break; // Finished processing args, leave while loop. - } - - if (isLoneShortOption(arg)) { - // e.g. '-f' - const shortOption = StringPrototypeCharAt(arg, 1); - const longOption = findLongOptionForShort(shortOption, options); - let value; - let inlineValue; - if (optionsGetOwn(options, longOption, 'type') === 'string' && - isOptionValue(nextArg)) { - // e.g. '-f', 'bar' - value = ArrayPrototypeShift(remainingArgs); - inlineValue = false; - } - ArrayPrototypePush( - tokens, - { kind: 'option', name: longOption, rawName: arg, - index, value, inlineValue }); - if (value != null) ++index; - continue; - } - - if (isShortOptionGroup(arg, options)) { - // Expand -fXzy to -f -X -z -y - const expanded = []; - for (let index = 1; index < arg.length; index++) { - const shortOption = StringPrototypeCharAt(arg, index); - const longOption = findLongOptionForShort(shortOption, options); - if (optionsGetOwn(options, longOption, 'type') !== 'string' || - index === arg.length - 1) { - // Boolean option, or last short in group. Well formed. - ArrayPrototypePush(expanded, `-${shortOption}`); - } else { - // String option in middle. Yuck. - // Expand -abfFILE to -a -b -fFILE - ArrayPrototypePush(expanded, `-${StringPrototypeSlice(arg, index)}`); - break; // finished short group - } - } - ArrayPrototypeUnshiftApply(remainingArgs, expanded); - groupCount = expanded.length; - continue; - } - - if (isShortOptionAndValue(arg, options)) { - // e.g. -fFILE - const shortOption = StringPrototypeCharAt(arg, 1); - const longOption = findLongOptionForShort(shortOption, options); - const value = StringPrototypeSlice(arg, 2); - ArrayPrototypePush( - tokens, - { kind: 'option', name: longOption, rawName: `-${shortOption}`, - index, value, inlineValue: true }); - continue; - } - - if (isLoneLongOption(arg)) { - // e.g. '--foo' - const longOption = StringPrototypeSlice(arg, 2); - let value; - let inlineValue; - if (optionsGetOwn(options, longOption, 'type') === 'string' && - isOptionValue(nextArg)) { - // e.g. '--foo', 'bar' - value = ArrayPrototypeShift(remainingArgs); - inlineValue = false; - } - ArrayPrototypePush( - tokens, - { kind: 'option', name: longOption, rawName: arg, - index, value, inlineValue }); - if (value != null) ++index; - continue; - } - - if (isLongOptionAndValue(arg)) { - // e.g. --foo=bar - const equalIndex = StringPrototypeIndexOf(arg, '='); - const longOption = StringPrototypeSlice(arg, 2, equalIndex); - const value = StringPrototypeSlice(arg, equalIndex + 1); - ArrayPrototypePush( - tokens, - { kind: 'option', name: longOption, rawName: `--${longOption}`, - index, value, inlineValue: true }); - continue; - } - - ArrayPrototypePush(tokens, { kind: 'positional', index, value: arg }); - } - - return tokens; -} - -const parseArgs = (config = kEmptyObject) => { - const args = objectGetOwn(config, 'args') ?? getMainArgs(); - const strict = objectGetOwn(config, 'strict') ?? true; - const allowPositionals = objectGetOwn(config, 'allowPositionals') ?? !strict; - const returnTokens = objectGetOwn(config, 'tokens') ?? false; - const options = objectGetOwn(config, 'options') ?? { __proto__: null }; - // Bundle these up for passing to strict-mode checks. - const parseConfig = { args, strict, options, allowPositionals }; - - // Validate input configuration. - validateArray(args, 'args'); - validateBoolean(strict, 'strict'); - validateBoolean(allowPositionals, 'allowPositionals'); - validateBoolean(returnTokens, 'tokens'); - validateObject(options, 'options'); - ArrayPrototypeForEach( - ObjectEntries(options), - ({ 0: longOption, 1: optionConfig }) => { - validateObject(optionConfig, `options.${longOption}`); - - // type is required - const optionType = objectGetOwn(optionConfig, 'type'); - validateUnion(optionType, `options.${longOption}.type`, ['string', 'boolean']); - - if (ObjectHasOwn(optionConfig, 'short')) { - const shortOption = optionConfig.short; - validateString(shortOption, `options.${longOption}.short`); - if (shortOption.length !== 1) { - throw new ERR_INVALID_ARG_VALUE( - `options.${longOption}.short`, - shortOption, - 'must be a single character' - ); - } - } - - const multipleOption = objectGetOwn(optionConfig, 'multiple'); - if (ObjectHasOwn(optionConfig, 'multiple')) { - validateBoolean(multipleOption, `options.${longOption}.multiple`); - } - - const defaultValue = objectGetOwn(optionConfig, 'default'); - if (defaultValue !== undefined) { - let validator; - switch (optionType) { - case 'string': - validator = multipleOption ? validateStringArray : validateString; - break; - - case 'boolean': - validator = multipleOption ? validateBooleanArray : validateBoolean; - break; - } - validator(defaultValue, `options.${longOption}.default`); - } - } - ); - - // Phase 1: identify tokens - const tokens = argsToTokens(args, options); - - // Phase 2: process tokens into parsed option values and positionals - const result = { - values: { __proto__: null }, - positionals: [], - }; - if (returnTokens) { - result.tokens = tokens; - } - ArrayPrototypeForEach(tokens, (token) => { - if (token.kind === 'option') { - if (strict) { - checkOptionUsage(parseConfig, token); - checkOptionLikeValue(token); - } - storeOption(token.name, token.value, options, result.values); - } else if (token.kind === 'positional') { - if (!allowPositionals) { - throw new ERR_PARSE_ARGS_UNEXPECTED_POSITIONAL(token.value); - } - ArrayPrototypePush(result.positionals, token.value); - } - }); - - // Phase 3: fill in default values for missing args - ArrayPrototypeForEach(ObjectEntries(options), ({ 0: longOption, - 1: optionConfig }) => { - const mustSetDefault = useDefaultValueOption(longOption, - optionConfig, - result.values); - if (mustSetDefault) { - storeDefaultOption(longOption, - objectGetOwn(optionConfig, 'default'), - result.values); - } - }); - - - return result; -}; - -module.exports = { - parseArgs, -}; diff --git a/deps/npm/node_modules/@pkgjs/parseargs/internal/errors.js b/deps/npm/node_modules/@pkgjs/parseargs/internal/errors.js deleted file mode 100644 index e1b237b5b16395..00000000000000 --- a/deps/npm/node_modules/@pkgjs/parseargs/internal/errors.js +++ /dev/null @@ -1,47 +0,0 @@ -'use strict'; - -class ERR_INVALID_ARG_TYPE extends TypeError { - constructor(name, expected, actual) { - super(`${name} must be ${expected} got ${actual}`); - this.code = 'ERR_INVALID_ARG_TYPE'; - } -} - -class ERR_INVALID_ARG_VALUE extends TypeError { - constructor(arg1, arg2, expected) { - super(`The property ${arg1} ${expected}. Received '${arg2}'`); - this.code = 'ERR_INVALID_ARG_VALUE'; - } -} - -class ERR_PARSE_ARGS_INVALID_OPTION_VALUE extends Error { - constructor(message) { - super(message); - this.code = 'ERR_PARSE_ARGS_INVALID_OPTION_VALUE'; - } -} - -class ERR_PARSE_ARGS_UNKNOWN_OPTION extends Error { - constructor(option, allowPositionals) { - const suggestDashDash = allowPositionals ? `. To specify a positional argument starting with a '-', place it at the end of the command after '--', as in '-- ${JSON.stringify(option)}` : ''; - super(`Unknown option '${option}'${suggestDashDash}`); - this.code = 'ERR_PARSE_ARGS_UNKNOWN_OPTION'; - } -} - -class ERR_PARSE_ARGS_UNEXPECTED_POSITIONAL extends Error { - constructor(positional) { - super(`Unexpected argument '${positional}'. This command does not take positional arguments`); - this.code = 'ERR_PARSE_ARGS_UNEXPECTED_POSITIONAL'; - } -} - -module.exports = { - codes: { - ERR_INVALID_ARG_TYPE, - ERR_INVALID_ARG_VALUE, - ERR_PARSE_ARGS_INVALID_OPTION_VALUE, - ERR_PARSE_ARGS_UNKNOWN_OPTION, - ERR_PARSE_ARGS_UNEXPECTED_POSITIONAL, - } -}; diff --git a/deps/npm/node_modules/@pkgjs/parseargs/internal/primordials.js b/deps/npm/node_modules/@pkgjs/parseargs/internal/primordials.js deleted file mode 100644 index 63e23ab117a9cc..00000000000000 --- a/deps/npm/node_modules/@pkgjs/parseargs/internal/primordials.js +++ /dev/null @@ -1,393 +0,0 @@ -/* -This file is copied from https://github.com/nodejs/node/blob/v14.19.3/lib/internal/per_context/primordials.js -under the following license: - -Copyright Node.js contributors. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. -*/ - -'use strict'; - -/* eslint-disable node-core/prefer-primordials */ - -// This file subclasses and stores the JS builtins that come from the VM -// so that Node.js's builtin modules do not need to later look these up from -// the global proxy, which can be mutated by users. - -// Use of primordials have sometimes a dramatic impact on performance, please -// benchmark all changes made in performance-sensitive areas of the codebase. -// See: https://github.com/nodejs/node/pull/38248 - -const primordials = {}; - -const { - defineProperty: ReflectDefineProperty, - getOwnPropertyDescriptor: ReflectGetOwnPropertyDescriptor, - ownKeys: ReflectOwnKeys, -} = Reflect; - -// `uncurryThis` is equivalent to `func => Function.prototype.call.bind(func)`. -// It is using `bind.bind(call)` to avoid using `Function.prototype.bind` -// and `Function.prototype.call` after it may have been mutated by users. -const { apply, bind, call } = Function.prototype; -const uncurryThis = bind.bind(call); -primordials.uncurryThis = uncurryThis; - -// `applyBind` is equivalent to `func => Function.prototype.apply.bind(func)`. -// It is using `bind.bind(apply)` to avoid using `Function.prototype.bind` -// and `Function.prototype.apply` after it may have been mutated by users. -const applyBind = bind.bind(apply); -primordials.applyBind = applyBind; - -// Methods that accept a variable number of arguments, and thus it's useful to -// also create `${prefix}${key}Apply`, which uses `Function.prototype.apply`, -// instead of `Function.prototype.call`, and thus doesn't require iterator -// destructuring. -const varargsMethods = [ - // 'ArrayPrototypeConcat' is omitted, because it performs the spread - // on its own for arrays and array-likes with a truthy - // @@isConcatSpreadable symbol property. - 'ArrayOf', - 'ArrayPrototypePush', - 'ArrayPrototypeUnshift', - // 'FunctionPrototypeCall' is omitted, since there's 'ReflectApply' - // and 'FunctionPrototypeApply'. - 'MathHypot', - 'MathMax', - 'MathMin', - 'StringPrototypeConcat', - 'TypedArrayOf', -]; - -function getNewKey(key) { - return typeof key === 'symbol' ? - `Symbol${key.description[7].toUpperCase()}${key.description.slice(8)}` : - `${key[0].toUpperCase()}${key.slice(1)}`; -} - -function copyAccessor(dest, prefix, key, { enumerable, get, set }) { - ReflectDefineProperty(dest, `${prefix}Get${key}`, { - value: uncurryThis(get), - enumerable - }); - if (set !== undefined) { - ReflectDefineProperty(dest, `${prefix}Set${key}`, { - value: uncurryThis(set), - enumerable - }); - } -} - -function copyPropsRenamed(src, dest, prefix) { - for (const key of ReflectOwnKeys(src)) { - const newKey = getNewKey(key); - const desc = ReflectGetOwnPropertyDescriptor(src, key); - if ('get' in desc) { - copyAccessor(dest, prefix, newKey, desc); - } else { - const name = `${prefix}${newKey}`; - ReflectDefineProperty(dest, name, desc); - if (varargsMethods.includes(name)) { - ReflectDefineProperty(dest, `${name}Apply`, { - // `src` is bound as the `this` so that the static `this` points - // to the object it was defined on, - // e.g.: `ArrayOfApply` gets a `this` of `Array`: - value: applyBind(desc.value, src), - }); - } - } - } -} - -function copyPropsRenamedBound(src, dest, prefix) { - for (const key of ReflectOwnKeys(src)) { - const newKey = getNewKey(key); - const desc = ReflectGetOwnPropertyDescriptor(src, key); - if ('get' in desc) { - copyAccessor(dest, prefix, newKey, desc); - } else { - const { value } = desc; - if (typeof value === 'function') { - desc.value = value.bind(src); - } - - const name = `${prefix}${newKey}`; - ReflectDefineProperty(dest, name, desc); - if (varargsMethods.includes(name)) { - ReflectDefineProperty(dest, `${name}Apply`, { - value: applyBind(value, src), - }); - } - } - } -} - -function copyPrototype(src, dest, prefix) { - for (const key of ReflectOwnKeys(src)) { - const newKey = getNewKey(key); - const desc = ReflectGetOwnPropertyDescriptor(src, key); - if ('get' in desc) { - copyAccessor(dest, prefix, newKey, desc); - } else { - const { value } = desc; - if (typeof value === 'function') { - desc.value = uncurryThis(value); - } - - const name = `${prefix}${newKey}`; - ReflectDefineProperty(dest, name, desc); - if (varargsMethods.includes(name)) { - ReflectDefineProperty(dest, `${name}Apply`, { - value: applyBind(value), - }); - } - } - } -} - -// Create copies of configurable value properties of the global object -[ - 'Proxy', - 'globalThis', -].forEach((name) => { - // eslint-disable-next-line no-restricted-globals - primordials[name] = globalThis[name]; -}); - -// Create copies of URI handling functions -[ - decodeURI, - decodeURIComponent, - encodeURI, - encodeURIComponent, -].forEach((fn) => { - primordials[fn.name] = fn; -}); - -// Create copies of the namespace objects -[ - 'JSON', - 'Math', - 'Proxy', - 'Reflect', -].forEach((name) => { - // eslint-disable-next-line no-restricted-globals - copyPropsRenamed(global[name], primordials, name); -}); - -// Create copies of intrinsic objects -[ - 'Array', - 'ArrayBuffer', - 'BigInt', - 'BigInt64Array', - 'BigUint64Array', - 'Boolean', - 'DataView', - 'Date', - 'Error', - 'EvalError', - 'Float32Array', - 'Float64Array', - 'Function', - 'Int16Array', - 'Int32Array', - 'Int8Array', - 'Map', - 'Number', - 'Object', - 'RangeError', - 'ReferenceError', - 'RegExp', - 'Set', - 'String', - 'Symbol', - 'SyntaxError', - 'TypeError', - 'URIError', - 'Uint16Array', - 'Uint32Array', - 'Uint8Array', - 'Uint8ClampedArray', - 'WeakMap', - 'WeakSet', -].forEach((name) => { - // eslint-disable-next-line no-restricted-globals - const original = global[name]; - primordials[name] = original; - copyPropsRenamed(original, primordials, name); - copyPrototype(original.prototype, primordials, `${name}Prototype`); -}); - -// Create copies of intrinsic objects that require a valid `this` to call -// static methods. -// Refs: https://www.ecma-international.org/ecma-262/#sec-promise.all -[ - 'Promise', -].forEach((name) => { - // eslint-disable-next-line no-restricted-globals - const original = global[name]; - primordials[name] = original; - copyPropsRenamedBound(original, primordials, name); - copyPrototype(original.prototype, primordials, `${name}Prototype`); -}); - -// Create copies of abstract intrinsic objects that are not directly exposed -// on the global object. -// Refs: https://tc39.es/ecma262/#sec-%typedarray%-intrinsic-object -[ - { name: 'TypedArray', original: Reflect.getPrototypeOf(Uint8Array) }, - { name: 'ArrayIterator', original: { - prototype: Reflect.getPrototypeOf(Array.prototype[Symbol.iterator]()), - } }, - { name: 'StringIterator', original: { - prototype: Reflect.getPrototypeOf(String.prototype[Symbol.iterator]()), - } }, -].forEach(({ name, original }) => { - primordials[name] = original; - // The static %TypedArray% methods require a valid `this`, but can't be bound, - // as they need a subclass constructor as the receiver: - copyPrototype(original, primordials, name); - copyPrototype(original.prototype, primordials, `${name}Prototype`); -}); - -/* eslint-enable node-core/prefer-primordials */ - -const { - ArrayPrototypeForEach, - FunctionPrototypeCall, - Map, - ObjectFreeze, - ObjectSetPrototypeOf, - Set, - SymbolIterator, - WeakMap, - WeakSet, -} = primordials; - -// Because these functions are used by `makeSafe`, which is exposed -// on the `primordials` object, it's important to use const references -// to the primordials that they use: -const createSafeIterator = (factory, next) => { - class SafeIterator { - constructor(iterable) { - this._iterator = factory(iterable); - } - next() { - return next(this._iterator); - } - [SymbolIterator]() { - return this; - } - } - ObjectSetPrototypeOf(SafeIterator.prototype, null); - ObjectFreeze(SafeIterator.prototype); - ObjectFreeze(SafeIterator); - return SafeIterator; -}; - -primordials.SafeArrayIterator = createSafeIterator( - primordials.ArrayPrototypeSymbolIterator, - primordials.ArrayIteratorPrototypeNext -); -primordials.SafeStringIterator = createSafeIterator( - primordials.StringPrototypeSymbolIterator, - primordials.StringIteratorPrototypeNext -); - -const copyProps = (src, dest) => { - ArrayPrototypeForEach(ReflectOwnKeys(src), (key) => { - if (!ReflectGetOwnPropertyDescriptor(dest, key)) { - ReflectDefineProperty( - dest, - key, - ReflectGetOwnPropertyDescriptor(src, key)); - } - }); -}; - -const makeSafe = (unsafe, safe) => { - if (SymbolIterator in unsafe.prototype) { - const dummy = new unsafe(); - let next; // We can reuse the same `next` method. - - ArrayPrototypeForEach(ReflectOwnKeys(unsafe.prototype), (key) => { - if (!ReflectGetOwnPropertyDescriptor(safe.prototype, key)) { - const desc = ReflectGetOwnPropertyDescriptor(unsafe.prototype, key); - if ( - typeof desc.value === 'function' && - desc.value.length === 0 && - SymbolIterator in (FunctionPrototypeCall(desc.value, dummy) ?? {}) - ) { - const createIterator = uncurryThis(desc.value); - next = next ?? uncurryThis(createIterator(dummy).next); - const SafeIterator = createSafeIterator(createIterator, next); - desc.value = function() { - return new SafeIterator(this); - }; - } - ReflectDefineProperty(safe.prototype, key, desc); - } - }); - } else { - copyProps(unsafe.prototype, safe.prototype); - } - copyProps(unsafe, safe); - - ObjectSetPrototypeOf(safe.prototype, null); - ObjectFreeze(safe.prototype); - ObjectFreeze(safe); - return safe; -}; -primordials.makeSafe = makeSafe; - -// Subclass the constructors because we need to use their prototype -// methods later. -// Defining the `constructor` is necessary here to avoid the default -// constructor which uses the user-mutable `%ArrayIteratorPrototype%.next`. -primordials.SafeMap = makeSafe( - Map, - class SafeMap extends Map { - constructor(i) { super(i); } // eslint-disable-line no-useless-constructor - } -); -primordials.SafeWeakMap = makeSafe( - WeakMap, - class SafeWeakMap extends WeakMap { - constructor(i) { super(i); } // eslint-disable-line no-useless-constructor - } -); -primordials.SafeSet = makeSafe( - Set, - class SafeSet extends Set { - constructor(i) { super(i); } // eslint-disable-line no-useless-constructor - } -); -primordials.SafeWeakSet = makeSafe( - WeakSet, - class SafeWeakSet extends WeakSet { - constructor(i) { super(i); } // eslint-disable-line no-useless-constructor - } -); - -ObjectSetPrototypeOf(primordials, null); -ObjectFreeze(primordials); - -module.exports = primordials; diff --git a/deps/npm/node_modules/@pkgjs/parseargs/internal/util.js b/deps/npm/node_modules/@pkgjs/parseargs/internal/util.js deleted file mode 100644 index b9b8fe5b8d7c02..00000000000000 --- a/deps/npm/node_modules/@pkgjs/parseargs/internal/util.js +++ /dev/null @@ -1,14 +0,0 @@ -'use strict'; - -// This is a placeholder for util.js in node.js land. - -const { - ObjectCreate, - ObjectFreeze, -} = require('./primordials'); - -const kEmptyObject = ObjectFreeze(ObjectCreate(null)); - -module.exports = { - kEmptyObject, -}; diff --git a/deps/npm/node_modules/@pkgjs/parseargs/internal/validators.js b/deps/npm/node_modules/@pkgjs/parseargs/internal/validators.js deleted file mode 100644 index b5ac4fb501eff4..00000000000000 --- a/deps/npm/node_modules/@pkgjs/parseargs/internal/validators.js +++ /dev/null @@ -1,89 +0,0 @@ -'use strict'; - -// This file is a proxy of the original file located at: -// https://github.com/nodejs/node/blob/main/lib/internal/validators.js -// Every addition or modification to this file must be evaluated -// during the PR review. - -const { - ArrayIsArray, - ArrayPrototypeIncludes, - ArrayPrototypeJoin, -} = require('./primordials'); - -const { - codes: { - ERR_INVALID_ARG_TYPE - } -} = require('./errors'); - -function validateString(value, name) { - if (typeof value !== 'string') { - throw new ERR_INVALID_ARG_TYPE(name, 'String', value); - } -} - -function validateUnion(value, name, union) { - if (!ArrayPrototypeIncludes(union, value)) { - throw new ERR_INVALID_ARG_TYPE(name, `('${ArrayPrototypeJoin(union, '|')}')`, value); - } -} - -function validateBoolean(value, name) { - if (typeof value !== 'boolean') { - throw new ERR_INVALID_ARG_TYPE(name, 'Boolean', value); - } -} - -function validateArray(value, name) { - if (!ArrayIsArray(value)) { - throw new ERR_INVALID_ARG_TYPE(name, 'Array', value); - } -} - -function validateStringArray(value, name) { - validateArray(value, name); - for (let i = 0; i < value.length; i++) { - validateString(value[i], `${name}[${i}]`); - } -} - -function validateBooleanArray(value, name) { - validateArray(value, name); - for (let i = 0; i < value.length; i++) { - validateBoolean(value[i], `${name}[${i}]`); - } -} - -/** - * @param {unknown} value - * @param {string} name - * @param {{ - * allowArray?: boolean, - * allowFunction?: boolean, - * nullable?: boolean - * }} [options] - */ -function validateObject(value, name, options) { - const useDefaultOptions = options == null; - const allowArray = useDefaultOptions ? false : options.allowArray; - const allowFunction = useDefaultOptions ? false : options.allowFunction; - const nullable = useDefaultOptions ? false : options.nullable; - if ((!nullable && value === null) || - (!allowArray && ArrayIsArray(value)) || - (typeof value !== 'object' && ( - !allowFunction || typeof value !== 'function' - ))) { - throw new ERR_INVALID_ARG_TYPE(name, 'Object', value); - } -} - -module.exports = { - validateArray, - validateObject, - validateString, - validateStringArray, - validateUnion, - validateBoolean, - validateBooleanArray, -}; diff --git a/deps/npm/node_modules/@pkgjs/parseargs/package.json b/deps/npm/node_modules/@pkgjs/parseargs/package.json deleted file mode 100644 index 0bcc05c0d4a3ec..00000000000000 --- a/deps/npm/node_modules/@pkgjs/parseargs/package.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "name": "@pkgjs/parseargs", - "version": "0.11.0", - "description": "Polyfill of future proposal for `util.parseArgs()`", - "engines": { - "node": ">=14" - }, - "main": "index.js", - "exports": { - ".": "./index.js", - "./package.json": "./package.json" - }, - "scripts": { - "coverage": "c8 --check-coverage tape 'test/*.js'", - "test": "c8 tape 'test/*.js'", - "posttest": "eslint .", - "fix": "npm run posttest -- --fix" - }, - "repository": { - "type": "git", - "url": "git@github.com:pkgjs/parseargs.git" - }, - "keywords": [], - "author": "", - "license": "MIT", - "bugs": { - "url": "https://github.com/pkgjs/parseargs/issues" - }, - "homepage": "https://github.com/pkgjs/parseargs#readme", - "devDependencies": { - "c8": "^7.10.0", - "eslint": "^8.2.0", - "eslint-plugin-node-core": "iansu/eslint-plugin-node-core", - "tape": "^5.2.2" - } -} diff --git a/deps/npm/node_modules/@pkgjs/parseargs/utils.js b/deps/npm/node_modules/@pkgjs/parseargs/utils.js deleted file mode 100644 index d7f420a2339246..00000000000000 --- a/deps/npm/node_modules/@pkgjs/parseargs/utils.js +++ /dev/null @@ -1,198 +0,0 @@ -'use strict'; - -const { - ArrayPrototypeFind, - ObjectEntries, - ObjectPrototypeHasOwnProperty: ObjectHasOwn, - StringPrototypeCharAt, - StringPrototypeIncludes, - StringPrototypeStartsWith, -} = require('./internal/primordials'); - -const { - validateObject, -} = require('./internal/validators'); - -// These are internal utilities to make the parsing logic easier to read, and -// add lots of detail for the curious. They are in a separate file to allow -// unit testing, although that is not essential (this could be rolled into -// main file and just tested implicitly via API). -// -// These routines are for internal use, not for export to client. - -/** - * Return the named property, but only if it is an own property. - */ -function objectGetOwn(obj, prop) { - if (ObjectHasOwn(obj, prop)) - return obj[prop]; -} - -/** - * Return the named options property, but only if it is an own property. - */ -function optionsGetOwn(options, longOption, prop) { - if (ObjectHasOwn(options, longOption)) - return objectGetOwn(options[longOption], prop); -} - -/** - * Determines if the argument may be used as an option value. - * @example - * isOptionValue('V') // returns true - * isOptionValue('-v') // returns true (greedy) - * isOptionValue('--foo') // returns true (greedy) - * isOptionValue(undefined) // returns false - */ -function isOptionValue(value) { - if (value == null) return false; - - // Open Group Utility Conventions are that an option-argument - // is the argument after the option, and may start with a dash. - return true; // greedy! -} - -/** - * Detect whether there is possible confusion and user may have omitted - * the option argument, like `--port --verbose` when `port` of type:string. - * In strict mode we throw errors if value is option-like. - */ -function isOptionLikeValue(value) { - if (value == null) return false; - - return value.length > 1 && StringPrototypeCharAt(value, 0) === '-'; -} - -/** - * Determines if `arg` is just a short option. - * @example '-f' - */ -function isLoneShortOption(arg) { - return arg.length === 2 && - StringPrototypeCharAt(arg, 0) === '-' && - StringPrototypeCharAt(arg, 1) !== '-'; -} - -/** - * Determines if `arg` is a lone long option. - * @example - * isLoneLongOption('a') // returns false - * isLoneLongOption('-a') // returns false - * isLoneLongOption('--foo') // returns true - * isLoneLongOption('--foo=bar') // returns false - */ -function isLoneLongOption(arg) { - return arg.length > 2 && - StringPrototypeStartsWith(arg, '--') && - !StringPrototypeIncludes(arg, '=', 3); -} - -/** - * Determines if `arg` is a long option and value in the same argument. - * @example - * isLongOptionAndValue('--foo') // returns false - * isLongOptionAndValue('--foo=bar') // returns true - */ -function isLongOptionAndValue(arg) { - return arg.length > 2 && - StringPrototypeStartsWith(arg, '--') && - StringPrototypeIncludes(arg, '=', 3); -} - -/** - * Determines if `arg` is a short option group. - * - * See Guideline 5 of the [Open Group Utility Conventions](https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap12.html). - * One or more options without option-arguments, followed by at most one - * option that takes an option-argument, should be accepted when grouped - * behind one '-' delimiter. - * @example - * isShortOptionGroup('-a', {}) // returns false - * isShortOptionGroup('-ab', {}) // returns true - * // -fb is an option and a value, not a short option group - * isShortOptionGroup('-fb', { - * options: { f: { type: 'string' } } - * }) // returns false - * isShortOptionGroup('-bf', { - * options: { f: { type: 'string' } } - * }) // returns true - * // -bfb is an edge case, return true and caller sorts it out - * isShortOptionGroup('-bfb', { - * options: { f: { type: 'string' } } - * }) // returns true - */ -function isShortOptionGroup(arg, options) { - if (arg.length <= 2) return false; - if (StringPrototypeCharAt(arg, 0) !== '-') return false; - if (StringPrototypeCharAt(arg, 1) === '-') return false; - - const firstShort = StringPrototypeCharAt(arg, 1); - const longOption = findLongOptionForShort(firstShort, options); - return optionsGetOwn(options, longOption, 'type') !== 'string'; -} - -/** - * Determine if arg is a short string option followed by its value. - * @example - * isShortOptionAndValue('-a', {}); // returns false - * isShortOptionAndValue('-ab', {}); // returns false - * isShortOptionAndValue('-fFILE', { - * options: { foo: { short: 'f', type: 'string' }} - * }) // returns true - */ -function isShortOptionAndValue(arg, options) { - validateObject(options, 'options'); - - if (arg.length <= 2) return false; - if (StringPrototypeCharAt(arg, 0) !== '-') return false; - if (StringPrototypeCharAt(arg, 1) === '-') return false; - - const shortOption = StringPrototypeCharAt(arg, 1); - const longOption = findLongOptionForShort(shortOption, options); - return optionsGetOwn(options, longOption, 'type') === 'string'; -} - -/** - * Find the long option associated with a short option. Looks for a configured - * `short` and returns the short option itself if a long option is not found. - * @example - * findLongOptionForShort('a', {}) // returns 'a' - * findLongOptionForShort('b', { - * options: { bar: { short: 'b' } } - * }) // returns 'bar' - */ -function findLongOptionForShort(shortOption, options) { - validateObject(options, 'options'); - const longOptionEntry = ArrayPrototypeFind( - ObjectEntries(options), - ({ 1: optionConfig }) => objectGetOwn(optionConfig, 'short') === shortOption - ); - return longOptionEntry?.[0] ?? shortOption; -} - -/** - * Check if the given option includes a default value - * and that option has not been set by the input args. - * - * @param {string} longOption - long option name e.g. 'foo' - * @param {object} optionConfig - the option configuration properties - * @param {object} values - option values returned in `values` by parseArgs - */ -function useDefaultValueOption(longOption, optionConfig, values) { - return objectGetOwn(optionConfig, 'default') !== undefined && - values[longOption] === undefined; -} - -module.exports = { - findLongOptionForShort, - isLoneLongOption, - isLoneShortOption, - isLongOptionAndValue, - isOptionValue, - isOptionLikeValue, - isShortOptionAndValue, - isShortOptionGroup, - useDefaultValueOption, - objectGetOwn, - optionsGetOwn, -}; diff --git a/deps/npm/node_modules/@tufjs/canonical-json/LICENSE b/deps/npm/node_modules/@tufjs/canonical-json/LICENSE deleted file mode 100644 index 420700f5d37659..00000000000000 --- a/deps/npm/node_modules/@tufjs/canonical-json/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2022 GitHub and the TUF Contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/deps/npm/node_modules/@tufjs/canonical-json/lib/index.js b/deps/npm/node_modules/@tufjs/canonical-json/lib/index.js deleted file mode 100644 index d480696de1f6c3..00000000000000 --- a/deps/npm/node_modules/@tufjs/canonical-json/lib/index.js +++ /dev/null @@ -1,64 +0,0 @@ -const COMMA = ','; -const COLON = ':'; -const LEFT_SQUARE_BRACKET = '['; -const RIGHT_SQUARE_BRACKET = ']'; -const LEFT_CURLY_BRACKET = '{'; -const RIGHT_CURLY_BRACKET = '}'; - -// Recursively encodes the supplied object according to the canonical JSON form -// as specified at http://wiki.laptop.org/go/Canonical_JSON. It's a restricted -// dialect of JSON in which keys are lexically sorted, floats are not allowed, -// and only double quotes and backslashes are escaped. -function canonicalize(object) { - const buffer = []; - if (typeof object === 'string') { - buffer.push(canonicalizeString(object)); - } else if (typeof object === 'boolean') { - buffer.push(JSON.stringify(object)); - } else if (Number.isInteger(object)) { - buffer.push(JSON.stringify(object)); - } else if (object === null) { - buffer.push(JSON.stringify(object)); - } else if (Array.isArray(object)) { - buffer.push(LEFT_SQUARE_BRACKET); - let first = true; - object.forEach((element) => { - if (!first) { - buffer.push(COMMA); - } - first = false; - buffer.push(canonicalize(element)); - }); - buffer.push(RIGHT_SQUARE_BRACKET); - } else if (typeof object === 'object') { - buffer.push(LEFT_CURLY_BRACKET); - let first = true; - Object.keys(object) - .sort() - .forEach((property) => { - if (!first) { - buffer.push(COMMA); - } - first = false; - buffer.push(canonicalizeString(property)); - buffer.push(COLON); - buffer.push(canonicalize(object[property])); - }); - buffer.push(RIGHT_CURLY_BRACKET); - } else { - throw new TypeError('cannot encode ' + object.toString()); - } - - return buffer.join(''); -} - -// String canonicalization consists of escaping backslash (\) and double -// quote (") characters and wrapping the resulting string in double quotes. -function canonicalizeString(string) { - const escapedString = string.replace(/\\/g, '\\\\').replace(/"/g, '\\"'); - return '"' + escapedString + '"'; -} - -module.exports = { - canonicalize, -}; diff --git a/deps/npm/node_modules/@tufjs/canonical-json/package.json b/deps/npm/node_modules/@tufjs/canonical-json/package.json deleted file mode 100644 index 688c9b93c3a4e6..00000000000000 --- a/deps/npm/node_modules/@tufjs/canonical-json/package.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "name": "@tufjs/canonical-json", - "version": "1.0.0", - "description": "OLPC JSON canonicalization", - "main": "lib/index.js", - "typings": "lib/index.d.ts", - "license": "MIT", - "keywords": [ - "json", - "canonical", - "canonicalize", - "canonicalization", - "crypto", - "signature", - "olpc" - ], - "author": "bdehamer@github.com", - "repository": { - "type": "git", - "url": "git+https://github.com/theupdateframework/tuf-js.git" - }, - "homepage": "https://github.com/theupdateframework/tuf-js/packages/canonical-json#readme", - "bugs": { - "url": "https://github.com/theupdateframework/tuf-js/issues" - }, - "files": [ - "lib/" - ], - "scripts": { - "test": "jest" - }, - "devDependencies": { - "@types/node": "^18.14.1", - "typescript": "^4.9.5" - }, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } -} diff --git a/deps/npm/node_modules/@tufjs/models/dist/metadata.js b/deps/npm/node_modules/@tufjs/models/dist/metadata.js index 9668b6f14fa701..945d3a42a7cfb2 100644 --- a/deps/npm/node_modules/@tufjs/models/dist/metadata.js +++ b/deps/npm/node_modules/@tufjs/models/dist/metadata.js @@ -4,7 +4,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) { }; Object.defineProperty(exports, "__esModule", { value: true }); exports.Metadata = void 0; -const canonical_json_1 = require("@tufjs/canonical-json"); const util_1 = __importDefault(require("util")); const base_1 = require("./base"); const error_1 = require("./error"); @@ -14,6 +13,7 @@ const snapshot_1 = require("./snapshot"); const targets_1 = require("./targets"); const timestamp_1 = require("./timestamp"); const utils_1 = require("./utils"); +const json_1 = require("./utils/json"); /*** * A container for signed TUF metadata. * @@ -45,7 +45,7 @@ class Metadata { this.unrecognizedFields = unrecognizedFields || {}; } sign(signer, append = true) { - const bytes = Buffer.from((0, canonical_json_1.canonicalize)(this.signed.toJSON())); + const bytes = (0, json_1.canonicalize)(this.signed.toJSON()); const signature = signer(bytes); if (!append) { this.signatures = {}; diff --git a/deps/npm/node_modules/@tufjs/models/dist/role.js b/deps/npm/node_modules/@tufjs/models/dist/role.js index f7ddbc6fe3f388..143c5dc6089665 100644 --- a/deps/npm/node_modules/@tufjs/models/dist/role.js +++ b/deps/npm/node_modules/@tufjs/models/dist/role.js @@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) { Object.defineProperty(exports, "__esModule", { value: true }); exports.SuccinctRoles = exports.DelegatedRole = exports.Role = exports.TOP_LEVEL_ROLE_NAMES = void 0; const crypto_1 = __importDefault(require("crypto")); -const minimatch_1 = require("minimatch"); +const minimatch_1 = __importDefault(require("minimatch")); const util_1 = __importDefault(require("util")); const error_1 = require("./error"); const utils_1 = require("./utils"); @@ -167,7 +167,7 @@ function isTargetInPathPattern(target, pattern) { if (patternParts.length != targetParts.length) { return false; } - return zip(targetParts, patternParts).every(([targetPart, patternPart]) => (0, minimatch_1.minimatch)(targetPart, patternPart)); + return zip(targetParts, patternParts).every(([targetPart, patternPart]) => (0, minimatch_1.default)(targetPart, patternPart)); } /** * Succinctly defines a hash bin delegation graph. diff --git a/deps/npm/node_modules/@tufjs/models/dist/utils/json.js b/deps/npm/node_modules/@tufjs/models/dist/utils/json.js new file mode 100644 index 00000000000000..30f82ea4c3d84d --- /dev/null +++ b/deps/npm/node_modules/@tufjs/models/dist/utils/json.js @@ -0,0 +1,62 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.canonicalize = void 0; +const QUOTATION_MARK = Buffer.from('"'); +const COMMA = Buffer.from(','); +const COLON = Buffer.from(':'); +const LEFT_SQUARE_BRACKET = Buffer.from('['); +const RIGHT_SQUARE_BRACKET = Buffer.from(']'); +const LEFT_CURLY_BRACKET = Buffer.from('{'); +const RIGHT_CURLY_BRACKET = Buffer.from('}'); +// eslint-disable-next-line @typescript-eslint/no-explicit-any +function canonicalize(object) { + let buffer = Buffer.from(''); + if (object === null || typeof object !== 'object' || object.toJSON != null) { + // Primitives or toJSONable objects + if (typeof object === 'string') { + buffer = Buffer.concat([ + buffer, + QUOTATION_MARK, + Buffer.from(object), + QUOTATION_MARK, + ]); + } + else { + buffer = Buffer.concat([buffer, Buffer.from(JSON.stringify(object))]); + } + } + else if (Array.isArray(object)) { + // Array - maintain element order + buffer = Buffer.concat([buffer, LEFT_SQUARE_BRACKET]); + let first = true; + object.forEach((element) => { + if (!first) { + buffer = Buffer.concat([buffer, COMMA]); + } + first = false; + // recursive call + buffer = Buffer.concat([buffer, canonicalize(element)]); + }); + buffer = Buffer.concat([buffer, RIGHT_SQUARE_BRACKET]); + } + else { + // Object - Sort properties before serializing + buffer = Buffer.concat([buffer, LEFT_CURLY_BRACKET]); + let first = true; + Object.keys(object) + .sort() + .forEach((property) => { + if (!first) { + buffer = Buffer.concat([buffer, COMMA]); + } + first = false; + buffer = Buffer.concat([buffer, Buffer.from(JSON.stringify(property))]); + buffer = Buffer.concat([buffer, COLON]); + // recursive call + buffer = Buffer.concat([buffer, canonicalize(object[property])]); + }); + buffer = Buffer.concat([buffer, RIGHT_CURLY_BRACKET]); + } + return buffer; +} +exports.canonicalize = canonicalize; diff --git a/deps/npm/node_modules/@tufjs/models/dist/utils/verify.js b/deps/npm/node_modules/@tufjs/models/dist/utils/verify.js index 8232b6f6a97ab1..d3b2e7515d7f9b 100644 --- a/deps/npm/node_modules/@tufjs/models/dist/utils/verify.js +++ b/deps/npm/node_modules/@tufjs/models/dist/utils/verify.js @@ -4,10 +4,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) { }; Object.defineProperty(exports, "__esModule", { value: true }); exports.verifySignature = void 0; -const canonical_json_1 = require("@tufjs/canonical-json"); const crypto_1 = __importDefault(require("crypto")); +const json_1 = require("./json"); const verifySignature = (metaDataSignedData, key, signature) => { - const canonicalData = Buffer.from((0, canonical_json_1.canonicalize)(metaDataSignedData)); + const canonicalData = (0, json_1.canonicalize)(metaDataSignedData) || ''; return crypto_1.default.verify(undefined, canonicalData, key, Buffer.from(signature, 'hex')); }; exports.verifySignature = verifySignature; diff --git a/deps/npm/node_modules/@tufjs/models/package.json b/deps/npm/node_modules/@tufjs/models/package.json index 6711ee0dababca..d8b2a189a1425c 100644 --- a/deps/npm/node_modules/@tufjs/models/package.json +++ b/deps/npm/node_modules/@tufjs/models/package.json @@ -1,6 +1,6 @@ { "name": "@tufjs/models", - "version": "1.0.4", + "version": "1.0.1", "description": "TUF metadata models", "main": "dist/index.js", "types": "dist/index.d.ts", @@ -28,12 +28,12 @@ }, "homepage": "https://github.com/theupdateframework/tuf-js/tree/main/packages/models#readme", "devDependencies": { - "@types/node": "^18.16.3", - "typescript": "^5.0.4" + "@types/minimatch": "^5.1.2", + "@types/node": "^18.15.3", + "typescript": "^4.9.5" }, "dependencies": { - "@tufjs/canonical-json": "1.0.0", - "minimatch": "^9.0.0" + "minimatch": "^7.4.2" }, "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" diff --git a/deps/npm/node_modules/cacache/lib/content/write.js b/deps/npm/node_modules/cacache/lib/content/write.js index b6f5c5623b58b4..d799ae883752b5 100644 --- a/deps/npm/node_modules/cacache/lib/content/write.js +++ b/deps/npm/node_modules/cacache/lib/content/write.js @@ -4,8 +4,8 @@ const events = require('events') const contentPath = require('./path') const fs = require('fs/promises') -const { moveFile } = require('@npmcli/fs') -const { Minipass } = require('minipass') +const moveFile = require('../util/move-file') +const Minipass = require('minipass') const Pipeline = require('minipass-pipeline') const Flush = require('minipass-flush') const path = require('path') @@ -17,6 +17,9 @@ module.exports = write async function write (cache, data, opts = {}) { const { algorithms, size, integrity } = opts + if (algorithms && algorithms.length > 1) { + throw new Error('opts.algorithms only supports a single algorithm for now') + } if (typeof size === 'number' && data.length !== size) { throw sizeError(size, data.length) @@ -27,19 +30,16 @@ async function write (cache, data, opts = {}) { throw checksumError(integrity, sri) } - for (const algo in sri) { - const tmp = await makeTmp(cache, opts) - const hash = sri[algo].toString() - try { - await fs.writeFile(tmp.target, data, { flag: 'wx' }) - await moveToDestination(tmp, cache, hash, opts) - } finally { - if (!tmp.moved) { - await fs.rm(tmp.target, { recursive: true, force: true }) - } + const tmp = await makeTmp(cache, opts) + try { + await fs.writeFile(tmp.target, data, { flag: 'wx' }) + await moveToDestination(tmp, cache, sri, opts) + return { integrity: sri, size: data.length } + } finally { + if (!tmp.moved) { + await fs.rm(tmp.target, { recursive: true, force: true }) } } - return { integrity: sri, size: data.length } } module.exports.stream = writeStream @@ -161,14 +161,8 @@ async function moveToDestination (tmp, cache, sri, opts) { 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' }) - } - } + await moveFile(tmp.target, destination) + tmp.moved = true } function sizeError (expected, found) { diff --git a/deps/npm/node_modules/cacache/lib/entry-index.js b/deps/npm/node_modules/cacache/lib/entry-index.js index 722a37af5ce157..add15e3a22a328 100644 --- a/deps/npm/node_modules/cacache/lib/entry-index.js +++ b/deps/npm/node_modules/cacache/lib/entry-index.js @@ -9,7 +9,7 @@ const { rm, writeFile, } = require('fs/promises') -const { Minipass } = require('minipass') +const Minipass = require('minipass') const path = require('path') const ssri = require('ssri') const uniqueFilename = require('unique-filename') @@ -109,12 +109,12 @@ async function compact (cache, key, matchFn, opts = {}) { module.exports.insert = insert async function insert (cache, key, integrity, opts = {}) { - const { metadata, size, time } = opts + const { metadata, size } = opts const bucket = bucketPath(cache, key) const entry = { key, integrity: integrity && ssri.stringify(integrity), - time: time || Date.now(), + time: Date.now(), size, metadata, } diff --git a/deps/npm/node_modules/cacache/lib/get.js b/deps/npm/node_modules/cacache/lib/get.js index 80ec206c7ecaaa..272ddb62920a44 100644 --- a/deps/npm/node_modules/cacache/lib/get.js +++ b/deps/npm/node_modules/cacache/lib/get.js @@ -1,7 +1,7 @@ 'use strict' const Collect = require('minipass-collect') -const { Minipass } = require('minipass') +const Minipass = require('minipass') const Pipeline = require('minipass-pipeline') const index = require('./entry-index') diff --git a/deps/npm/node_modules/cacache/lib/util/glob.js b/deps/npm/node_modules/cacache/lib/util/glob.js index 3132a4da65e63e..38b5459c59b294 100644 --- a/deps/npm/node_modules/cacache/lib/util/glob.js +++ b/deps/npm/node_modules/cacache/lib/util/glob.js @@ -1,6 +1,6 @@ 'use strict' -const { glob } = require('glob') +const glob = require('glob') const globify = (pattern) => pattern.split('//').join('/') module.exports = (path, options) => glob(globify(path), options) diff --git a/deps/npm/node_modules/cacache/lib/util/move-file.js b/deps/npm/node_modules/cacache/lib/util/move-file.js new file mode 100644 index 00000000000000..eb3ba76107cd71 --- /dev/null +++ b/deps/npm/node_modules/cacache/lib/util/move-file.js @@ -0,0 +1,56 @@ +'use strict' + +const fs = require('fs/promises') +const { moveFile: move } = require('@npmcli/fs') +const pinflight = require('promise-inflight') + +module.exports = moveFile + +async function moveFile (src, dest) { + const isWindows = process.platform === 'win32' + + // This isn't quite an fs.rename -- the assumption is that + // if `dest` already exists, and we get certain errors while + // trying to move it, we should just not bother. + // + // In the case of cache corruption, users will receive an + // EINTEGRITY error elsewhere, and can remove the offending + // content their own way. + // + // Note that, as the name suggests, this strictly only supports file moves. + try { + await fs.link(src, dest) + } catch (err) { + if (isWindows && err.code === 'EPERM') { + // XXX This is a really weird way to handle this situation, as it + // results in the src file being deleted even though the dest + // might not exist. Since we pretty much always write files to + // deterministic locations based on content hash, this is likely + // ok (or at worst, just ends in a future cache miss). But it would + // be worth investigating at some time in the future if this is + // really what we want to do here. + } else if (err.code === 'EEXIST' || err.code === 'EBUSY') { + // file already exists, so whatever + } else { + throw err + } + } + try { + await Promise.all([ + fs.unlink(src), + !isWindows && fs.chmod(dest, '0444'), + ]) + } catch (e) { + return pinflight('cacache-move-file:' + dest, async () => { + await fs.stat(dest).catch((err) => { + if (err.code !== 'ENOENT') { + // Something else is wrong here. Bail bail bail + throw err + } + }) + // file doesn't already exist! let's try a rename -> copy fallback + // only delete if it successfully copies + return move(src, dest) + }) + } +} diff --git a/deps/npm/node_modules/cacache/lib/verify.js b/deps/npm/node_modules/cacache/lib/verify.js index 62e85c946490fc..33f566c12afa98 100644 --- a/deps/npm/node_modules/cacache/lib/verify.js +++ b/deps/npm/node_modules/cacache/lib/verify.js @@ -100,11 +100,7 @@ async function garbageCollect (cache, opts) { return } - // integrity is stringified, re-parse it so we can get each hash - const integrity = ssri.parse(entry.integrity) - for (const algo in integrity) { - liveContent.add(integrity[algo].toString()) - } + liveContent.add(entry.integrity.toString()) }) await new Promise((resolve, reject) => { indexStream.on('end', resolve).on('error', reject) @@ -224,7 +220,6 @@ async function rebuildBucket (cache, bucket, stats, opts) { await index.insert(cache, entry.key, entry.integrity, { metadata: entry.metadata, size: entry.size, - time: entry.time, }) stats.totalEntries++ } catch (err) { diff --git a/deps/npm/node_modules/cacache/package.json b/deps/npm/node_modules/cacache/package.json index b8ee783388d847..e3a0ab6a610039 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.0.5", "cache-version": { "content": "2", "index": "5" @@ -47,20 +47,21 @@ "dependencies": { "@npmcli/fs": "^3.1.0", "fs-minipass": "^3.0.0", - "glob": "^10.2.2", + "glob": "^9.3.1", "lru-cache": "^7.7.1", - "minipass": "^5.0.0", + "minipass": "^4.0.0", "minipass-collect": "^1.0.2", "minipass-flush": "^1.0.5", "minipass-pipeline": "^1.2.4", "p-map": "^4.0.0", + "promise-inflight": "^1.0.1", "ssri": "^10.0.0", "tar": "^6.1.11", "unique-filename": "^3.0.0" }, "devDependencies": { "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.14.1", + "@npmcli/template-oss": "4.12.0", "tap": "^16.0.0" }, "engines": { @@ -69,8 +70,7 @@ "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", "windowsCI": false, - "version": "4.14.1", - "publish": "true" + "version": "4.12.0" }, "author": "GitHub Inc.", "tap": { diff --git a/deps/npm/node_modules/cross-spawn/LICENSE b/deps/npm/node_modules/cross-spawn/LICENSE deleted file mode 100644 index 8407b9a30f51b0..00000000000000 --- a/deps/npm/node_modules/cross-spawn/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2018 Made With MOXY Lda - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/deps/npm/node_modules/cross-spawn/index.js b/deps/npm/node_modules/cross-spawn/index.js deleted file mode 100644 index 5509742ca9fa8f..00000000000000 --- a/deps/npm/node_modules/cross-spawn/index.js +++ /dev/null @@ -1,39 +0,0 @@ -'use strict'; - -const cp = require('child_process'); -const parse = require('./lib/parse'); -const enoent = require('./lib/enoent'); - -function spawn(command, args, options) { - // Parse the arguments - const parsed = parse(command, args, options); - - // Spawn the child process - const spawned = cp.spawn(parsed.command, parsed.args, parsed.options); - - // Hook into child process "exit" event to emit an error if the command - // does not exists, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16 - enoent.hookChildProcess(spawned, parsed); - - return spawned; -} - -function spawnSync(command, args, options) { - // Parse the arguments - const parsed = parse(command, args, options); - - // Spawn the child process - const result = cp.spawnSync(parsed.command, parsed.args, parsed.options); - - // Analyze if the command does not exist, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16 - result.error = result.error || enoent.verifyENOENTSync(result.status, parsed); - - return result; -} - -module.exports = spawn; -module.exports.spawn = spawn; -module.exports.sync = spawnSync; - -module.exports._parse = parse; -module.exports._enoent = enoent; diff --git a/deps/npm/node_modules/cross-spawn/lib/enoent.js b/deps/npm/node_modules/cross-spawn/lib/enoent.js deleted file mode 100644 index 14df9b623d0a20..00000000000000 --- a/deps/npm/node_modules/cross-spawn/lib/enoent.js +++ /dev/null @@ -1,59 +0,0 @@ -'use strict'; - -const isWin = process.platform === 'win32'; - -function notFoundError(original, syscall) { - return Object.assign(new Error(`${syscall} ${original.command} ENOENT`), { - code: 'ENOENT', - errno: 'ENOENT', - syscall: `${syscall} ${original.command}`, - path: original.command, - spawnargs: original.args, - }); -} - -function hookChildProcess(cp, parsed) { - if (!isWin) { - return; - } - - const originalEmit = cp.emit; - - cp.emit = function (name, arg1) { - // If emitting "exit" event and exit code is 1, we need to check if - // the command exists and emit an "error" instead - // See https://github.com/IndigoUnited/node-cross-spawn/issues/16 - if (name === 'exit') { - const err = verifyENOENT(arg1, parsed, 'spawn'); - - if (err) { - return originalEmit.call(cp, 'error', err); - } - } - - return originalEmit.apply(cp, arguments); // eslint-disable-line prefer-rest-params - }; -} - -function verifyENOENT(status, parsed) { - if (isWin && status === 1 && !parsed.file) { - return notFoundError(parsed.original, 'spawn'); - } - - return null; -} - -function verifyENOENTSync(status, parsed) { - if (isWin && status === 1 && !parsed.file) { - return notFoundError(parsed.original, 'spawnSync'); - } - - return null; -} - -module.exports = { - hookChildProcess, - verifyENOENT, - verifyENOENTSync, - notFoundError, -}; diff --git a/deps/npm/node_modules/cross-spawn/lib/parse.js b/deps/npm/node_modules/cross-spawn/lib/parse.js deleted file mode 100644 index 0129d74774a8a0..00000000000000 --- a/deps/npm/node_modules/cross-spawn/lib/parse.js +++ /dev/null @@ -1,91 +0,0 @@ -'use strict'; - -const path = require('path'); -const resolveCommand = require('./util/resolveCommand'); -const escape = require('./util/escape'); -const readShebang = require('./util/readShebang'); - -const isWin = process.platform === 'win32'; -const isExecutableRegExp = /\.(?:com|exe)$/i; -const isCmdShimRegExp = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i; - -function detectShebang(parsed) { - parsed.file = resolveCommand(parsed); - - const shebang = parsed.file && readShebang(parsed.file); - - if (shebang) { - parsed.args.unshift(parsed.file); - parsed.command = shebang; - - return resolveCommand(parsed); - } - - return parsed.file; -} - -function parseNonShell(parsed) { - if (!isWin) { - return parsed; - } - - // Detect & add support for shebangs - const commandFile = detectShebang(parsed); - - // We don't need a shell if the command filename is an executable - const needsShell = !isExecutableRegExp.test(commandFile); - - // If a shell is required, use cmd.exe and take care of escaping everything correctly - // Note that `forceShell` is an hidden option used only in tests - if (parsed.options.forceShell || needsShell) { - // Need to double escape meta chars if the command is a cmd-shim located in `node_modules/.bin/` - // The cmd-shim simply calls execute the package bin file with NodeJS, proxying any argument - // Because the escape of metachars with ^ gets interpreted when the cmd.exe is first called, - // we need to double escape them - const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile); - - // Normalize posix paths into OS compatible paths (e.g.: foo/bar -> foo\bar) - // This is necessary otherwise it will always fail with ENOENT in those cases - parsed.command = path.normalize(parsed.command); - - // Escape command & arguments - parsed.command = escape.command(parsed.command); - parsed.args = parsed.args.map((arg) => escape.argument(arg, needsDoubleEscapeMetaChars)); - - const shellCommand = [parsed.command].concat(parsed.args).join(' '); - - parsed.args = ['/d', '/s', '/c', `"${shellCommand}"`]; - parsed.command = process.env.comspec || 'cmd.exe'; - parsed.options.windowsVerbatimArguments = true; // Tell node's spawn that the arguments are already escaped - } - - return parsed; -} - -function parse(command, args, options) { - // Normalize arguments, similar to nodejs - if (args && !Array.isArray(args)) { - options = args; - args = null; - } - - args = args ? args.slice(0) : []; // Clone array to avoid changing the original - options = Object.assign({}, options); // Clone object to avoid changing the original - - // Build our parsed object - const parsed = { - command, - args, - options, - file: undefined, - original: { - command, - args, - }, - }; - - // Delegate further parsing to shell or non-shell - return options.shell ? parsed : parseNonShell(parsed); -} - -module.exports = parse; diff --git a/deps/npm/node_modules/cross-spawn/lib/util/escape.js b/deps/npm/node_modules/cross-spawn/lib/util/escape.js deleted file mode 100644 index b0bb84c3a14092..00000000000000 --- a/deps/npm/node_modules/cross-spawn/lib/util/escape.js +++ /dev/null @@ -1,45 +0,0 @@ -'use strict'; - -// See http://www.robvanderwoude.com/escapechars.php -const metaCharsRegExp = /([()\][%!^"`<>&|;, *?])/g; - -function escapeCommand(arg) { - // Escape meta chars - arg = arg.replace(metaCharsRegExp, '^$1'); - - return arg; -} - -function escapeArgument(arg, doubleEscapeMetaChars) { - // Convert to string - arg = `${arg}`; - - // Algorithm below is based on https://qntm.org/cmd - - // Sequence of backslashes followed by a double quote: - // double up all the backslashes and escape the double quote - arg = arg.replace(/(\\*)"/g, '$1$1\\"'); - - // Sequence of backslashes followed by the end of the string - // (which will become a double quote later): - // double up all the backslashes - arg = arg.replace(/(\\*)$/, '$1$1'); - - // All other backslashes occur literally - - // Quote the whole thing: - arg = `"${arg}"`; - - // Escape meta chars - arg = arg.replace(metaCharsRegExp, '^$1'); - - // Double escape meta chars if necessary - if (doubleEscapeMetaChars) { - arg = arg.replace(metaCharsRegExp, '^$1'); - } - - return arg; -} - -module.exports.command = escapeCommand; -module.exports.argument = escapeArgument; diff --git a/deps/npm/node_modules/cross-spawn/lib/util/readShebang.js b/deps/npm/node_modules/cross-spawn/lib/util/readShebang.js deleted file mode 100644 index 5e83733fef260f..00000000000000 --- a/deps/npm/node_modules/cross-spawn/lib/util/readShebang.js +++ /dev/null @@ -1,23 +0,0 @@ -'use strict'; - -const fs = require('fs'); -const shebangCommand = require('shebang-command'); - -function readShebang(command) { - // Read the first 150 bytes from the file - const size = 150; - const buffer = Buffer.alloc(size); - - let fd; - - try { - fd = fs.openSync(command, 'r'); - fs.readSync(fd, buffer, 0, size, 0); - fs.closeSync(fd); - } catch (e) { /* Empty */ } - - // Attempt to extract shebang (null is returned if not a shebang) - return shebangCommand(buffer.toString()); -} - -module.exports = readShebang; diff --git a/deps/npm/node_modules/cross-spawn/lib/util/resolveCommand.js b/deps/npm/node_modules/cross-spawn/lib/util/resolveCommand.js deleted file mode 100644 index 7972455008e917..00000000000000 --- a/deps/npm/node_modules/cross-spawn/lib/util/resolveCommand.js +++ /dev/null @@ -1,52 +0,0 @@ -'use strict'; - -const path = require('path'); -const which = require('which'); -const getPathKey = require('path-key'); - -function resolveCommandAttempt(parsed, withoutPathExt) { - const env = parsed.options.env || process.env; - const cwd = process.cwd(); - const hasCustomCwd = parsed.options.cwd != null; - // Worker threads do not have process.chdir() - const shouldSwitchCwd = hasCustomCwd && process.chdir !== undefined && !process.chdir.disabled; - - // If a custom `cwd` was specified, we need to change the process cwd - // because `which` will do stat calls but does not support a custom cwd - if (shouldSwitchCwd) { - try { - process.chdir(parsed.options.cwd); - } catch (err) { - /* Empty */ - } - } - - let resolved; - - try { - resolved = which.sync(parsed.command, { - path: env[getPathKey({ env })], - pathExt: withoutPathExt ? path.delimiter : undefined, - }); - } catch (e) { - /* Empty */ - } finally { - if (shouldSwitchCwd) { - process.chdir(cwd); - } - } - - // If we successfully resolved, ensure that an absolute path is returned - // Note that when a custom `cwd` was used, we need to resolve to an absolute path based on it - if (resolved) { - resolved = path.resolve(hasCustomCwd ? parsed.options.cwd : '', resolved); - } - - return resolved; -} - -function resolveCommand(parsed) { - return resolveCommandAttempt(parsed) || resolveCommandAttempt(parsed, true); -} - -module.exports = resolveCommand; diff --git a/deps/npm/node_modules/cross-spawn/node_modules/which/LICENSE b/deps/npm/node_modules/cross-spawn/node_modules/which/LICENSE deleted file mode 100644 index 19129e315fe593..00000000000000 --- a/deps/npm/node_modules/cross-spawn/node_modules/which/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/deps/npm/node_modules/cross-spawn/node_modules/which/README.md b/deps/npm/node_modules/cross-spawn/node_modules/which/README.md deleted file mode 100644 index cd833509f3bcc9..00000000000000 --- a/deps/npm/node_modules/cross-spawn/node_modules/which/README.md +++ /dev/null @@ -1,54 +0,0 @@ -# which - -Like the unix `which` utility. - -Finds the first instance of a specified executable in the PATH -environment variable. Does not cache the results, so `hash -r` is not -needed when the PATH changes. - -## USAGE - -```javascript -var which = require('which') - -// async usage -which('node', function (er, resolvedPath) { - // er is returned if no "node" is found on the PATH - // if it is found, then the absolute path to the exec is returned -}) - -// or promise -which('node').then(resolvedPath => { ... }).catch(er => { ... not found ... }) - -// sync usage -// throws if not found -var resolved = which.sync('node') - -// if nothrow option is used, returns null if not found -resolved = which.sync('node', {nothrow: true}) - -// Pass options to override the PATH and PATHEXT environment vars. -which('node', { path: someOtherPath }, function (er, resolved) { - if (er) - throw er - console.log('found at %j', resolved) -}) -``` - -## CLI USAGE - -Same as the BSD `which(1)` binary. - -``` -usage: which [-as] program ... -``` - -## OPTIONS - -You may pass an options object as the second argument. - -- `path`: Use instead of the `PATH` environment variable. -- `pathExt`: Use instead of the `PATHEXT` environment variable. -- `all`: Return all matches, instead of just the first one. Note that - this means the function returns an array of strings instead of a - single string. diff --git a/deps/npm/node_modules/cross-spawn/node_modules/which/bin/node-which b/deps/npm/node_modules/cross-spawn/node_modules/which/bin/node-which deleted file mode 100755 index 7cee3729eebdd0..00000000000000 --- a/deps/npm/node_modules/cross-spawn/node_modules/which/bin/node-which +++ /dev/null @@ -1,52 +0,0 @@ -#!/usr/bin/env node -var which = require("../") -if (process.argv.length < 3) - usage() - -function usage () { - console.error('usage: which [-as] program ...') - process.exit(1) -} - -var all = false -var silent = false -var dashdash = false -var args = process.argv.slice(2).filter(function (arg) { - if (dashdash || !/^-/.test(arg)) - return true - - if (arg === '--') { - dashdash = true - return false - } - - var flags = arg.substr(1).split('') - for (var f = 0; f < flags.length; f++) { - var flag = flags[f] - switch (flag) { - case 's': - silent = true - break - case 'a': - all = true - break - default: - console.error('which: illegal option -- ' + flag) - usage() - } - } - return false -}) - -process.exit(args.reduce(function (pv, current) { - try { - var f = which.sync(current, { all: all }) - if (all) - f = f.join('\n') - if (!silent) - console.log(f) - return pv; - } catch (e) { - return 1; - } -}, 0)) diff --git a/deps/npm/node_modules/cross-spawn/node_modules/which/package.json b/deps/npm/node_modules/cross-spawn/node_modules/which/package.json deleted file mode 100644 index 97ad7fbabc52b5..00000000000000 --- a/deps/npm/node_modules/cross-spawn/node_modules/which/package.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "author": "Isaac Z. Schlueter (http://blog.izs.me)", - "name": "which", - "description": "Like which(1) unix command. Find the first instance of an executable in the PATH.", - "version": "2.0.2", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/node-which.git" - }, - "main": "which.js", - "bin": { - "node-which": "./bin/node-which" - }, - "license": "ISC", - "dependencies": { - "isexe": "^2.0.0" - }, - "devDependencies": { - "mkdirp": "^0.5.0", - "rimraf": "^2.6.2", - "tap": "^14.6.9" - }, - "scripts": { - "test": "tap", - "preversion": "npm test", - "postversion": "npm publish", - "prepublish": "npm run changelog", - "prechangelog": "bash gen-changelog.sh", - "changelog": "git add CHANGELOG.md", - "postchangelog": "git commit -m 'update changelog - '${npm_package_version}", - "postpublish": "git push origin --follow-tags" - }, - "files": [ - "which.js", - "bin/node-which" - ], - "tap": { - "check-coverage": true - }, - "engines": { - "node": ">= 8" - } -} diff --git a/deps/npm/node_modules/cross-spawn/node_modules/which/which.js b/deps/npm/node_modules/cross-spawn/node_modules/which/which.js deleted file mode 100644 index 82afffd2143749..00000000000000 --- a/deps/npm/node_modules/cross-spawn/node_modules/which/which.js +++ /dev/null @@ -1,125 +0,0 @@ -const isWindows = process.platform === 'win32' || - process.env.OSTYPE === 'cygwin' || - process.env.OSTYPE === 'msys' - -const path = require('path') -const COLON = isWindows ? ';' : ':' -const isexe = require('isexe') - -const getNotFoundError = (cmd) => - Object.assign(new Error(`not found: ${cmd}`), { code: 'ENOENT' }) - -const getPathInfo = (cmd, opt) => { - const colon = opt.colon || COLON - - // If it has a slash, then we don't bother searching the pathenv. - // just check the file itself, and that's it. - const pathEnv = cmd.match(/\//) || isWindows && cmd.match(/\\/) ? [''] - : ( - [ - // windows always checks the cwd first - ...(isWindows ? [process.cwd()] : []), - ...(opt.path || process.env.PATH || - /* istanbul ignore next: very unusual */ '').split(colon), - ] - ) - const pathExtExe = isWindows - ? opt.pathExt || process.env.PATHEXT || '.EXE;.CMD;.BAT;.COM' - : '' - const pathExt = isWindows ? pathExtExe.split(colon) : [''] - - if (isWindows) { - if (cmd.indexOf('.') !== -1 && pathExt[0] !== '') - pathExt.unshift('') - } - - return { - pathEnv, - pathExt, - pathExtExe, - } -} - -const which = (cmd, opt, cb) => { - if (typeof opt === 'function') { - cb = opt - opt = {} - } - if (!opt) - opt = {} - - const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt) - const found = [] - - const step = i => new Promise((resolve, reject) => { - if (i === pathEnv.length) - return opt.all && found.length ? resolve(found) - : reject(getNotFoundError(cmd)) - - const ppRaw = pathEnv[i] - const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw - - const pCmd = path.join(pathPart, cmd) - const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd - : pCmd - - resolve(subStep(p, i, 0)) - }) - - const subStep = (p, i, ii) => new Promise((resolve, reject) => { - if (ii === pathExt.length) - return resolve(step(i + 1)) - const ext = pathExt[ii] - isexe(p + ext, { pathExt: pathExtExe }, (er, is) => { - if (!er && is) { - if (opt.all) - found.push(p + ext) - else - return resolve(p + ext) - } - return resolve(subStep(p, i, ii + 1)) - }) - }) - - return cb ? step(0).then(res => cb(null, res), cb) : step(0) -} - -const whichSync = (cmd, opt) => { - opt = opt || {} - - const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt) - const found = [] - - for (let i = 0; i < pathEnv.length; i ++) { - const ppRaw = pathEnv[i] - const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw - - const pCmd = path.join(pathPart, cmd) - const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd - : pCmd - - for (let j = 0; j < pathExt.length; j ++) { - const cur = p + pathExt[j] - try { - const is = isexe.sync(cur, { pathExt: pathExtExe }) - if (is) { - if (opt.all) - found.push(cur) - else - return cur - } - } catch (ex) {} - } - } - - if (opt.all && found.length) - return found - - if (opt.nothrow) - return null - - throw getNotFoundError(cmd) -} - -module.exports = which -which.sync = whichSync diff --git a/deps/npm/node_modules/cross-spawn/package.json b/deps/npm/node_modules/cross-spawn/package.json deleted file mode 100644 index 232ff97e04b213..00000000000000 --- a/deps/npm/node_modules/cross-spawn/package.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "name": "cross-spawn", - "version": "7.0.3", - "description": "Cross platform child_process#spawn and child_process#spawnSync", - "keywords": [ - "spawn", - "spawnSync", - "windows", - "cross-platform", - "path-ext", - "shebang", - "cmd", - "execute" - ], - "author": "André Cruz ", - "homepage": "https://github.com/moxystudio/node-cross-spawn", - "repository": { - "type": "git", - "url": "git@github.com:moxystudio/node-cross-spawn.git" - }, - "license": "MIT", - "main": "index.js", - "files": [ - "lib" - ], - "scripts": { - "lint": "eslint .", - "test": "jest --env node --coverage", - "prerelease": "npm t && npm run lint", - "release": "standard-version", - "postrelease": "git push --follow-tags origin HEAD && npm publish" - }, - "husky": { - "hooks": { - "commit-msg": "commitlint -E HUSKY_GIT_PARAMS", - "pre-commit": "lint-staged" - } - }, - "lint-staged": { - "*.js": [ - "eslint --fix", - "git add" - ] - }, - "commitlint": { - "extends": [ - "@commitlint/config-conventional" - ] - }, - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "devDependencies": { - "@commitlint/cli": "^8.1.0", - "@commitlint/config-conventional": "^8.1.0", - "babel-core": "^6.26.3", - "babel-jest": "^24.9.0", - "babel-preset-moxy": "^3.1.0", - "eslint": "^5.16.0", - "eslint-config-moxy": "^7.1.0", - "husky": "^3.0.5", - "jest": "^24.9.0", - "lint-staged": "^9.2.5", - "mkdirp": "^0.5.1", - "rimraf": "^3.0.0", - "standard-version": "^7.0.0" - }, - "engines": { - "node": ">= 8" - } -} diff --git a/deps/npm/node_modules/eastasianwidth/eastasianwidth.js b/deps/npm/node_modules/eastasianwidth/eastasianwidth.js deleted file mode 100644 index 7d0aa0f6ecbf34..00000000000000 --- a/deps/npm/node_modules/eastasianwidth/eastasianwidth.js +++ /dev/null @@ -1,311 +0,0 @@ -var eaw = {}; - -if ('undefined' == typeof module) { - window.eastasianwidth = eaw; -} else { - module.exports = eaw; -} - -eaw.eastAsianWidth = function(character) { - var x = character.charCodeAt(0); - var y = (character.length == 2) ? character.charCodeAt(1) : 0; - var codePoint = x; - if ((0xD800 <= x && x <= 0xDBFF) && (0xDC00 <= y && y <= 0xDFFF)) { - x &= 0x3FF; - y &= 0x3FF; - codePoint = (x << 10) | y; - codePoint += 0x10000; - } - - if ((0x3000 == codePoint) || - (0xFF01 <= codePoint && codePoint <= 0xFF60) || - (0xFFE0 <= codePoint && codePoint <= 0xFFE6)) { - return 'F'; - } - if ((0x20A9 == codePoint) || - (0xFF61 <= codePoint && codePoint <= 0xFFBE) || - (0xFFC2 <= codePoint && codePoint <= 0xFFC7) || - (0xFFCA <= codePoint && codePoint <= 0xFFCF) || - (0xFFD2 <= codePoint && codePoint <= 0xFFD7) || - (0xFFDA <= codePoint && codePoint <= 0xFFDC) || - (0xFFE8 <= codePoint && codePoint <= 0xFFEE)) { - return 'H'; - } - if ((0x1100 <= codePoint && codePoint <= 0x115F) || - (0x11A3 <= codePoint && codePoint <= 0x11A7) || - (0x11FA <= codePoint && codePoint <= 0x11FF) || - (0x2329 <= codePoint && codePoint <= 0x232A) || - (0x2E80 <= codePoint && codePoint <= 0x2E99) || - (0x2E9B <= codePoint && codePoint <= 0x2EF3) || - (0x2F00 <= codePoint && codePoint <= 0x2FD5) || - (0x2FF0 <= codePoint && codePoint <= 0x2FFB) || - (0x3001 <= codePoint && codePoint <= 0x303E) || - (0x3041 <= codePoint && codePoint <= 0x3096) || - (0x3099 <= codePoint && codePoint <= 0x30FF) || - (0x3105 <= codePoint && codePoint <= 0x312D) || - (0x3131 <= codePoint && codePoint <= 0x318E) || - (0x3190 <= codePoint && codePoint <= 0x31BA) || - (0x31C0 <= codePoint && codePoint <= 0x31E3) || - (0x31F0 <= codePoint && codePoint <= 0x321E) || - (0x3220 <= codePoint && codePoint <= 0x3247) || - (0x3250 <= codePoint && codePoint <= 0x32FE) || - (0x3300 <= codePoint && codePoint <= 0x4DBF) || - (0x4E00 <= codePoint && codePoint <= 0xA48C) || - (0xA490 <= codePoint && codePoint <= 0xA4C6) || - (0xA960 <= codePoint && codePoint <= 0xA97C) || - (0xAC00 <= codePoint && codePoint <= 0xD7A3) || - (0xD7B0 <= codePoint && codePoint <= 0xD7C6) || - (0xD7CB <= codePoint && codePoint <= 0xD7FB) || - (0xF900 <= codePoint && codePoint <= 0xFAFF) || - (0xFE10 <= codePoint && codePoint <= 0xFE19) || - (0xFE30 <= codePoint && codePoint <= 0xFE52) || - (0xFE54 <= codePoint && codePoint <= 0xFE66) || - (0xFE68 <= codePoint && codePoint <= 0xFE6B) || - (0x1B000 <= codePoint && codePoint <= 0x1B001) || - (0x1F200 <= codePoint && codePoint <= 0x1F202) || - (0x1F210 <= codePoint && codePoint <= 0x1F23A) || - (0x1F240 <= codePoint && codePoint <= 0x1F248) || - (0x1F250 <= codePoint && codePoint <= 0x1F251) || - (0x20000 <= codePoint && codePoint <= 0x2F73F) || - (0x2B740 <= codePoint && codePoint <= 0x2FFFD) || - (0x30000 <= codePoint && codePoint <= 0x3FFFD)) { - return 'W'; - } - if ((0x0020 <= codePoint && codePoint <= 0x007E) || - (0x00A2 <= codePoint && codePoint <= 0x00A3) || - (0x00A5 <= codePoint && codePoint <= 0x00A6) || - (0x00AC == codePoint) || - (0x00AF == codePoint) || - (0x27E6 <= codePoint && codePoint <= 0x27ED) || - (0x2985 <= codePoint && codePoint <= 0x2986)) { - return 'Na'; - } - if ((0x00A1 == codePoint) || - (0x00A4 == codePoint) || - (0x00A7 <= codePoint && codePoint <= 0x00A8) || - (0x00AA == codePoint) || - (0x00AD <= codePoint && codePoint <= 0x00AE) || - (0x00B0 <= codePoint && codePoint <= 0x00B4) || - (0x00B6 <= codePoint && codePoint <= 0x00BA) || - (0x00BC <= codePoint && codePoint <= 0x00BF) || - (0x00C6 == codePoint) || - (0x00D0 == codePoint) || - (0x00D7 <= codePoint && codePoint <= 0x00D8) || - (0x00DE <= codePoint && codePoint <= 0x00E1) || - (0x00E6 == codePoint) || - (0x00E8 <= codePoint && codePoint <= 0x00EA) || - (0x00EC <= codePoint && codePoint <= 0x00ED) || - (0x00F0 == codePoint) || - (0x00F2 <= codePoint && codePoint <= 0x00F3) || - (0x00F7 <= codePoint && codePoint <= 0x00FA) || - (0x00FC == codePoint) || - (0x00FE == codePoint) || - (0x0101 == codePoint) || - (0x0111 == codePoint) || - (0x0113 == codePoint) || - (0x011B == codePoint) || - (0x0126 <= codePoint && codePoint <= 0x0127) || - (0x012B == codePoint) || - (0x0131 <= codePoint && codePoint <= 0x0133) || - (0x0138 == codePoint) || - (0x013F <= codePoint && codePoint <= 0x0142) || - (0x0144 == codePoint) || - (0x0148 <= codePoint && codePoint <= 0x014B) || - (0x014D == codePoint) || - (0x0152 <= codePoint && codePoint <= 0x0153) || - (0x0166 <= codePoint && codePoint <= 0x0167) || - (0x016B == codePoint) || - (0x01CE == codePoint) || - (0x01D0 == codePoint) || - (0x01D2 == codePoint) || - (0x01D4 == codePoint) || - (0x01D6 == codePoint) || - (0x01D8 == codePoint) || - (0x01DA == codePoint) || - (0x01DC == codePoint) || - (0x0251 == codePoint) || - (0x0261 == codePoint) || - (0x02C4 == codePoint) || - (0x02C7 == codePoint) || - (0x02C9 <= codePoint && codePoint <= 0x02CB) || - (0x02CD == codePoint) || - (0x02D0 == codePoint) || - (0x02D8 <= codePoint && codePoint <= 0x02DB) || - (0x02DD == codePoint) || - (0x02DF == codePoint) || - (0x0300 <= codePoint && codePoint <= 0x036F) || - (0x0391 <= codePoint && codePoint <= 0x03A1) || - (0x03A3 <= codePoint && codePoint <= 0x03A9) || - (0x03B1 <= codePoint && codePoint <= 0x03C1) || - (0x03C3 <= codePoint && codePoint <= 0x03C9) || - (0x0401 == codePoint) || - (0x0410 <= codePoint && codePoint <= 0x044F) || - (0x0451 == codePoint) || - (0x2010 == codePoint) || - (0x2013 <= codePoint && codePoint <= 0x2016) || - (0x2018 <= codePoint && codePoint <= 0x2019) || - (0x201C <= codePoint && codePoint <= 0x201D) || - (0x2020 <= codePoint && codePoint <= 0x2022) || - (0x2024 <= codePoint && codePoint <= 0x2027) || - (0x2030 == codePoint) || - (0x2032 <= codePoint && codePoint <= 0x2033) || - (0x2035 == codePoint) || - (0x203B == codePoint) || - (0x203E == codePoint) || - (0x2074 == codePoint) || - (0x207F == codePoint) || - (0x2081 <= codePoint && codePoint <= 0x2084) || - (0x20AC == codePoint) || - (0x2103 == codePoint) || - (0x2105 == codePoint) || - (0x2109 == codePoint) || - (0x2113 == codePoint) || - (0x2116 == codePoint) || - (0x2121 <= codePoint && codePoint <= 0x2122) || - (0x2126 == codePoint) || - (0x212B == codePoint) || - (0x2153 <= codePoint && codePoint <= 0x2154) || - (0x215B <= codePoint && codePoint <= 0x215E) || - (0x2160 <= codePoint && codePoint <= 0x216B) || - (0x2170 <= codePoint && codePoint <= 0x2179) || - (0x2189 == codePoint) || - (0x2190 <= codePoint && codePoint <= 0x2199) || - (0x21B8 <= codePoint && codePoint <= 0x21B9) || - (0x21D2 == codePoint) || - (0x21D4 == codePoint) || - (0x21E7 == codePoint) || - (0x2200 == codePoint) || - (0x2202 <= codePoint && codePoint <= 0x2203) || - (0x2207 <= codePoint && codePoint <= 0x2208) || - (0x220B == codePoint) || - (0x220F == codePoint) || - (0x2211 == codePoint) || - (0x2215 == codePoint) || - (0x221A == codePoint) || - (0x221D <= codePoint && codePoint <= 0x2220) || - (0x2223 == codePoint) || - (0x2225 == codePoint) || - (0x2227 <= codePoint && codePoint <= 0x222C) || - (0x222E == codePoint) || - (0x2234 <= codePoint && codePoint <= 0x2237) || - (0x223C <= codePoint && codePoint <= 0x223D) || - (0x2248 == codePoint) || - (0x224C == codePoint) || - (0x2252 == codePoint) || - (0x2260 <= codePoint && codePoint <= 0x2261) || - (0x2264 <= codePoint && codePoint <= 0x2267) || - (0x226A <= codePoint && codePoint <= 0x226B) || - (0x226E <= codePoint && codePoint <= 0x226F) || - (0x2282 <= codePoint && codePoint <= 0x2283) || - (0x2286 <= codePoint && codePoint <= 0x2287) || - (0x2295 == codePoint) || - (0x2299 == codePoint) || - (0x22A5 == codePoint) || - (0x22BF == codePoint) || - (0x2312 == codePoint) || - (0x2460 <= codePoint && codePoint <= 0x24E9) || - (0x24EB <= codePoint && codePoint <= 0x254B) || - (0x2550 <= codePoint && codePoint <= 0x2573) || - (0x2580 <= codePoint && codePoint <= 0x258F) || - (0x2592 <= codePoint && codePoint <= 0x2595) || - (0x25A0 <= codePoint && codePoint <= 0x25A1) || - (0x25A3 <= codePoint && codePoint <= 0x25A9) || - (0x25B2 <= codePoint && codePoint <= 0x25B3) || - (0x25B6 <= codePoint && codePoint <= 0x25B7) || - (0x25BC <= codePoint && codePoint <= 0x25BD) || - (0x25C0 <= codePoint && codePoint <= 0x25C1) || - (0x25C6 <= codePoint && codePoint <= 0x25C8) || - (0x25CB == codePoint) || - (0x25CE <= codePoint && codePoint <= 0x25D1) || - (0x25E2 <= codePoint && codePoint <= 0x25E5) || - (0x25EF == codePoint) || - (0x2605 <= codePoint && codePoint <= 0x2606) || - (0x2609 == codePoint) || - (0x260E <= codePoint && codePoint <= 0x260F) || - (0x2614 <= codePoint && codePoint <= 0x2615) || - (0x261C == codePoint) || - (0x261E == codePoint) || - (0x2640 == codePoint) || - (0x2642 == codePoint) || - (0x2660 <= codePoint && codePoint <= 0x2661) || - (0x2663 <= codePoint && codePoint <= 0x2665) || - (0x2667 <= codePoint && codePoint <= 0x266A) || - (0x266C <= codePoint && codePoint <= 0x266D) || - (0x266F == codePoint) || - (0x269E <= codePoint && codePoint <= 0x269F) || - (0x26BE <= codePoint && codePoint <= 0x26BF) || - (0x26C4 <= codePoint && codePoint <= 0x26CD) || - (0x26CF <= codePoint && codePoint <= 0x26E1) || - (0x26E3 == codePoint) || - (0x26E8 <= codePoint && codePoint <= 0x26FF) || - (0x273D == codePoint) || - (0x2757 == codePoint) || - (0x2776 <= codePoint && codePoint <= 0x277F) || - (0x2B55 <= codePoint && codePoint <= 0x2B59) || - (0x3248 <= codePoint && codePoint <= 0x324F) || - (0xE000 <= codePoint && codePoint <= 0xF8FF) || - (0xFE00 <= codePoint && codePoint <= 0xFE0F) || - (0xFFFD == codePoint) || - (0x1F100 <= codePoint && codePoint <= 0x1F10A) || - (0x1F110 <= codePoint && codePoint <= 0x1F12D) || - (0x1F130 <= codePoint && codePoint <= 0x1F169) || - (0x1F170 <= codePoint && codePoint <= 0x1F19A) || - (0xE0100 <= codePoint && codePoint <= 0xE01EF) || - (0xF0000 <= codePoint && codePoint <= 0xFFFFD) || - (0x100000 <= codePoint && codePoint <= 0x10FFFD)) { - return 'A'; - } - - return 'N'; -}; - -eaw.characterLength = function(character) { - var code = this.eastAsianWidth(character); - if (code == 'F' || code == 'W' || code == 'A') { - return 2; - } else { - return 1; - } -}; - -// Split a string considering surrogate-pairs. -function stringToArray(string) { - return string.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g) || []; -} - -eaw.length = function(string) { - var characters = stringToArray(string); - var len = 0; - for (var i = 0; i < characters.length; i++) { - len = len + this.characterLength(characters[i]); - } - return len; -}; - -eaw.slice = function(text, start, end) { - textLen = eaw.length(text) - start = start ? start : 0; - end = end ? end : 1; - if (start < 0) { - start = textLen + start; - } - if (end < 0) { - end = textLen + end; - } - var result = ''; - var eawLen = 0; - var chars = stringToArray(text); - for (var i = 0; i < chars.length; i++) { - var char = chars[i]; - var charLen = eaw.length(char); - if (eawLen >= start - (charLen == 2 ? 1 : 0)) { - if (eawLen + charLen <= end) { - result += char; - } else { - break; - } - } - eawLen += charLen; - } - return result; -}; diff --git a/deps/npm/node_modules/eastasianwidth/package.json b/deps/npm/node_modules/eastasianwidth/package.json deleted file mode 100644 index cb7ac6ab3b0da4..00000000000000 --- a/deps/npm/node_modules/eastasianwidth/package.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "eastasianwidth", - "version": "0.2.0", - "description": "Get East Asian Width from a character.", - "main": "eastasianwidth.js", - "files": [ - "eastasianwidth.js" - ], - "scripts": { - "test": "mocha" - }, - "repository": "git://github.com/komagata/eastasianwidth.git", - "author": "Masaki Komagata", - "license": "MIT", - "devDependencies": { - "mocha": "~1.9.0" - } -} diff --git a/deps/npm/node_modules/foreground-child/LICENSE b/deps/npm/node_modules/foreground-child/LICENSE deleted file mode 100644 index 2d80720fe669c9..00000000000000 --- a/deps/npm/node_modules/foreground-child/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) 2015-2023 Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/deps/npm/node_modules/foreground-child/dist/cjs/all-signals.js b/deps/npm/node_modules/foreground-child/dist/cjs/all-signals.js deleted file mode 100644 index b5ee4638bb567f..00000000000000 --- a/deps/npm/node_modules/foreground-child/dist/cjs/all-signals.js +++ /dev/null @@ -1,58 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.allSignals = void 0; -const node_constants_1 = __importDefault(require("node:constants")); -exports.allSignals = -// this is the full list of signals that Node will let us do anything with -Object.keys(node_constants_1.default).filter(k => k.startsWith('SIG') && - // https://github.com/tapjs/signal-exit/issues/21 - k !== 'SIGPROF' && - // no sense trying to listen for SIGKILL, it's impossible - k !== 'SIGKILL'); -// These are some obscure signals that are reported by kill -l -// on macOS, Linux, or Windows, but which don't have any mapping -// in Node.js. No sense trying if they're just going to throw -// every time on every platform. -// -// 'SIGEMT', -// 'SIGLOST', -// 'SIGPOLL', -// 'SIGRTMAX', -// 'SIGRTMAX-1', -// 'SIGRTMAX-10', -// 'SIGRTMAX-11', -// 'SIGRTMAX-12', -// 'SIGRTMAX-13', -// 'SIGRTMAX-14', -// 'SIGRTMAX-15', -// 'SIGRTMAX-2', -// 'SIGRTMAX-3', -// 'SIGRTMAX-4', -// 'SIGRTMAX-5', -// 'SIGRTMAX-6', -// 'SIGRTMAX-7', -// 'SIGRTMAX-8', -// 'SIGRTMAX-9', -// 'SIGRTMIN', -// 'SIGRTMIN+1', -// 'SIGRTMIN+10', -// 'SIGRTMIN+11', -// 'SIGRTMIN+12', -// 'SIGRTMIN+13', -// 'SIGRTMIN+14', -// 'SIGRTMIN+15', -// 'SIGRTMIN+16', -// 'SIGRTMIN+2', -// 'SIGRTMIN+3', -// 'SIGRTMIN+4', -// 'SIGRTMIN+5', -// 'SIGRTMIN+6', -// 'SIGRTMIN+7', -// 'SIGRTMIN+8', -// 'SIGRTMIN+9', -// 'SIGSTKFLT', -// 'SIGUNUSED', -//# sourceMappingURL=all-signals.js.map \ No newline at end of file diff --git a/deps/npm/node_modules/foreground-child/dist/cjs/index.js b/deps/npm/node_modules/foreground-child/dist/cjs/index.js deleted file mode 100644 index d522c981fabcbe..00000000000000 --- a/deps/npm/node_modules/foreground-child/dist/cjs/index.js +++ /dev/null @@ -1,154 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.foregroundChild = exports.normalizeFgArgs = void 0; -const child_process_1 = require("child_process"); -const cross_spawn_1 = __importDefault(require("cross-spawn")); -const signal_exit_1 = require("signal-exit"); -const all_signals_js_1 = require("./all-signals.js"); -const watchdog_js_1 = require("./watchdog.js"); -/* c8 ignore start */ -const spawn = process?.platform === 'win32' ? cross_spawn_1.default : child_process_1.spawn; -/** - * Normalizes the arguments passed to `foregroundChild`. - * - * Exposed for testing. - * - * @internal - */ -const normalizeFgArgs = (fgArgs) => { - let [program, args = [], spawnOpts = {}, cleanup = () => { }] = fgArgs; - if (typeof args === 'function') { - cleanup = args; - spawnOpts = {}; - args = []; - } - else if (!!args && typeof args === 'object' && !Array.isArray(args)) { - if (typeof spawnOpts === 'function') - cleanup = spawnOpts; - spawnOpts = args; - args = []; - } - else if (typeof spawnOpts === 'function') { - cleanup = spawnOpts; - spawnOpts = {}; - } - if (Array.isArray(program)) { - const [pp, ...pa] = program; - program = pp; - args = pa; - } - return [program, args, { ...spawnOpts }, cleanup]; -}; -exports.normalizeFgArgs = normalizeFgArgs; -function foregroundChild(...fgArgs) { - const [program, args, spawnOpts, cleanup] = (0, exports.normalizeFgArgs)(fgArgs); - spawnOpts.stdio = [0, 1, 2]; - if (process.send) { - spawnOpts.stdio.push('ipc'); - } - const child = spawn(program, args, spawnOpts); - const unproxySignals = proxySignals(child); - const childHangup = () => { - try { - child.kill('SIGHUP'); - /* c8 ignore start */ - } - catch (_) { - // SIGHUP is weird on windows - child.kill('SIGTERM'); - } - /* c8 ignore stop */ - }; - const removeOnExit = (0, signal_exit_1.onExit)(childHangup); - const dog = (0, watchdog_js_1.watchdog)(child); - let done = false; - child.on('close', async (code, signal) => { - dog.kill('SIGKILL'); - /* c8 ignore start */ - if (done) { - return; - } - /* c8 ignore stop */ - done = true; - const result = cleanup(code, signal); - const res = isPromise(result) ? await result : result; - removeOnExit(); - unproxySignals(); - if (res === false) - return; - else if (typeof res === 'string') { - signal = res; - code = null; - } - else if (typeof res === 'number') { - code = res; - signal = null; - } - if (signal) { - // If there is nothing else keeping the event loop alive, - // then there's a race between a graceful exit and getting - // the signal to this process. Put this timeout here to - // make sure we're still alive to get the signal, and thus - // exit with the intended signal code. - /* istanbul ignore next */ - setTimeout(() => { }, 2000); - try { - process.kill(process.pid, signal); - /* c8 ignore start */ - } - catch (_) { - process.kill(process.pid, 'SIGTERM'); - } - /* c8 ignore stop */ - } - else { - process.exit(code || 0); - } - }); - if (process.send) { - process.removeAllListeners('message'); - child.on('message', (message, sendHandle) => { - process.send?.(message, sendHandle); - }); - process.on('message', (message, sendHandle) => { - child.send(message, sendHandle); - }); - } - return child; -} -exports.foregroundChild = foregroundChild; -/** - * Starts forwarding signals to `child` through `parent`. - */ -const proxySignals = (child) => { - const listeners = new Map(); - for (const sig of all_signals_js_1.allSignals) { - const listener = () => { - // some signals can only be received, not sent - try { - child.kill(sig); - /* c8 ignore start */ - } - catch (_) { } - /* c8 ignore stop */ - }; - try { - // if it's a signal this system doesn't recognize, skip it - process.on(sig, listener); - listeners.set(sig, listener); - /* c8 ignore start */ - } - catch (_) { } - /* c8 ignore stop */ - } - return () => { - for (const [sig, listener] of listeners) { - process.removeListener(sig, listener); - } - }; -}; -const isPromise = (o) => !!o && typeof o === 'object' && typeof o.then === 'function'; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/deps/npm/node_modules/foreground-child/dist/cjs/package.json b/deps/npm/node_modules/foreground-child/dist/cjs/package.json deleted file mode 100644 index 5bbefffbabee39..00000000000000 --- a/deps/npm/node_modules/foreground-child/dist/cjs/package.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "type": "commonjs" -} diff --git a/deps/npm/node_modules/foreground-child/dist/cjs/watchdog.js b/deps/npm/node_modules/foreground-child/dist/cjs/watchdog.js deleted file mode 100644 index 5f553ac1ae3d39..00000000000000 --- a/deps/npm/node_modules/foreground-child/dist/cjs/watchdog.js +++ /dev/null @@ -1,43 +0,0 @@ -"use strict"; -// this spawns a child process that listens for SIGHUP when the -// parent process exits, and after 200ms, sends a SIGKILL to the -// child, in case it did not terminate. -Object.defineProperty(exports, "__esModule", { value: true }); -exports.watchdog = void 0; -const child_process_1 = require("child_process"); -const watchdogCode = String.raw ` -const pid = parseInt(process.argv[1], 10) -process.title = 'node (foreground-child watchdog pid=' + pid + ')' -if (!isNaN(pid)) { - let barked = false - // keepalive - const interval = setInterval(() => {}, 60000) - const bark = () => { - clearInterval(interval) - if (barked) return - barked = true - process.removeListener('SIGHUP', bark) - setTimeout(() => { - try { - process.kill(pid, 'SIGKILL') - setTimeout(() => process.exit(), 200) - } catch (_) {} - }, 500) - }) - process.on('SIGHUP', bark) -} -`; -const watchdog = (child) => { - let dogExited = false; - const dog = (0, child_process_1.spawn)(process.execPath, ['-e', watchdogCode, String(child.pid)], { - stdio: 'ignore', - }); - dog.on('exit', () => (dogExited = true)); - child.on('exit', () => { - if (!dogExited) - dog.kill('SIGTERM'); - }); - return dog; -}; -exports.watchdog = watchdog; -//# sourceMappingURL=watchdog.js.map \ No newline at end of file diff --git a/deps/npm/node_modules/foreground-child/dist/mjs/all-signals.js b/deps/npm/node_modules/foreground-child/dist/mjs/all-signals.js deleted file mode 100644 index 6b24993d22fea4..00000000000000 --- a/deps/npm/node_modules/foreground-child/dist/mjs/all-signals.js +++ /dev/null @@ -1,52 +0,0 @@ -import constants from 'node:constants'; -export const allSignals = -// this is the full list of signals that Node will let us do anything with -Object.keys(constants).filter(k => k.startsWith('SIG') && - // https://github.com/tapjs/signal-exit/issues/21 - k !== 'SIGPROF' && - // no sense trying to listen for SIGKILL, it's impossible - k !== 'SIGKILL'); -// These are some obscure signals that are reported by kill -l -// on macOS, Linux, or Windows, but which don't have any mapping -// in Node.js. No sense trying if they're just going to throw -// every time on every platform. -// -// 'SIGEMT', -// 'SIGLOST', -// 'SIGPOLL', -// 'SIGRTMAX', -// 'SIGRTMAX-1', -// 'SIGRTMAX-10', -// 'SIGRTMAX-11', -// 'SIGRTMAX-12', -// 'SIGRTMAX-13', -// 'SIGRTMAX-14', -// 'SIGRTMAX-15', -// 'SIGRTMAX-2', -// 'SIGRTMAX-3', -// 'SIGRTMAX-4', -// 'SIGRTMAX-5', -// 'SIGRTMAX-6', -// 'SIGRTMAX-7', -// 'SIGRTMAX-8', -// 'SIGRTMAX-9', -// 'SIGRTMIN', -// 'SIGRTMIN+1', -// 'SIGRTMIN+10', -// 'SIGRTMIN+11', -// 'SIGRTMIN+12', -// 'SIGRTMIN+13', -// 'SIGRTMIN+14', -// 'SIGRTMIN+15', -// 'SIGRTMIN+16', -// 'SIGRTMIN+2', -// 'SIGRTMIN+3', -// 'SIGRTMIN+4', -// 'SIGRTMIN+5', -// 'SIGRTMIN+6', -// 'SIGRTMIN+7', -// 'SIGRTMIN+8', -// 'SIGRTMIN+9', -// 'SIGSTKFLT', -// 'SIGUNUSED', -//# sourceMappingURL=all-signals.js.map \ No newline at end of file diff --git a/deps/npm/node_modules/foreground-child/dist/mjs/index.js b/deps/npm/node_modules/foreground-child/dist/mjs/index.js deleted file mode 100644 index 405b3959310fa3..00000000000000 --- a/deps/npm/node_modules/foreground-child/dist/mjs/index.js +++ /dev/null @@ -1,146 +0,0 @@ -import { spawn as nodeSpawn, } from 'child_process'; -import crossSpawn from 'cross-spawn'; -import { onExit } from 'signal-exit'; -import { allSignals } from './all-signals.js'; -import { watchdog } from './watchdog.js'; -/* c8 ignore start */ -const spawn = process?.platform === 'win32' ? crossSpawn : nodeSpawn; -/** - * Normalizes the arguments passed to `foregroundChild`. - * - * Exposed for testing. - * - * @internal - */ -export const normalizeFgArgs = (fgArgs) => { - let [program, args = [], spawnOpts = {}, cleanup = () => { }] = fgArgs; - if (typeof args === 'function') { - cleanup = args; - spawnOpts = {}; - args = []; - } - else if (!!args && typeof args === 'object' && !Array.isArray(args)) { - if (typeof spawnOpts === 'function') - cleanup = spawnOpts; - spawnOpts = args; - args = []; - } - else if (typeof spawnOpts === 'function') { - cleanup = spawnOpts; - spawnOpts = {}; - } - if (Array.isArray(program)) { - const [pp, ...pa] = program; - program = pp; - args = pa; - } - return [program, args, { ...spawnOpts }, cleanup]; -}; -export function foregroundChild(...fgArgs) { - const [program, args, spawnOpts, cleanup] = normalizeFgArgs(fgArgs); - spawnOpts.stdio = [0, 1, 2]; - if (process.send) { - spawnOpts.stdio.push('ipc'); - } - const child = spawn(program, args, spawnOpts); - const unproxySignals = proxySignals(child); - const childHangup = () => { - try { - child.kill('SIGHUP'); - /* c8 ignore start */ - } - catch (_) { - // SIGHUP is weird on windows - child.kill('SIGTERM'); - } - /* c8 ignore stop */ - }; - const removeOnExit = onExit(childHangup); - const dog = watchdog(child); - let done = false; - child.on('close', async (code, signal) => { - dog.kill('SIGKILL'); - /* c8 ignore start */ - if (done) { - return; - } - /* c8 ignore stop */ - done = true; - const result = cleanup(code, signal); - const res = isPromise(result) ? await result : result; - removeOnExit(); - unproxySignals(); - if (res === false) - return; - else if (typeof res === 'string') { - signal = res; - code = null; - } - else if (typeof res === 'number') { - code = res; - signal = null; - } - if (signal) { - // If there is nothing else keeping the event loop alive, - // then there's a race between a graceful exit and getting - // the signal to this process. Put this timeout here to - // make sure we're still alive to get the signal, and thus - // exit with the intended signal code. - /* istanbul ignore next */ - setTimeout(() => { }, 2000); - try { - process.kill(process.pid, signal); - /* c8 ignore start */ - } - catch (_) { - process.kill(process.pid, 'SIGTERM'); - } - /* c8 ignore stop */ - } - else { - process.exit(code || 0); - } - }); - if (process.send) { - process.removeAllListeners('message'); - child.on('message', (message, sendHandle) => { - process.send?.(message, sendHandle); - }); - process.on('message', (message, sendHandle) => { - child.send(message, sendHandle); - }); - } - return child; -} -/** - * Starts forwarding signals to `child` through `parent`. - */ -const proxySignals = (child) => { - const listeners = new Map(); - for (const sig of allSignals) { - const listener = () => { - // some signals can only be received, not sent - try { - child.kill(sig); - /* c8 ignore start */ - } - catch (_) { } - /* c8 ignore stop */ - }; - try { - // if it's a signal this system doesn't recognize, skip it - process.on(sig, listener); - listeners.set(sig, listener); - /* c8 ignore start */ - } - catch (_) { } - /* c8 ignore stop */ - } - return () => { - for (const [sig, listener] of listeners) { - process.removeListener(sig, listener); - } - }; -}; -const isPromise = (o) => !!o && typeof o === 'object' && typeof o.then === 'function'; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/deps/npm/node_modules/foreground-child/dist/mjs/package.json b/deps/npm/node_modules/foreground-child/dist/mjs/package.json deleted file mode 100644 index 3dbc1ca591c055..00000000000000 --- a/deps/npm/node_modules/foreground-child/dist/mjs/package.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "type": "module" -} diff --git a/deps/npm/node_modules/foreground-child/dist/mjs/watchdog.js b/deps/npm/node_modules/foreground-child/dist/mjs/watchdog.js deleted file mode 100644 index 3b897a6c4c73ff..00000000000000 --- a/deps/npm/node_modules/foreground-child/dist/mjs/watchdog.js +++ /dev/null @@ -1,39 +0,0 @@ -// this spawns a child process that listens for SIGHUP when the -// parent process exits, and after 200ms, sends a SIGKILL to the -// child, in case it did not terminate. -import { spawn } from 'child_process'; -const watchdogCode = String.raw ` -const pid = parseInt(process.argv[1], 10) -process.title = 'node (foreground-child watchdog pid=' + pid + ')' -if (!isNaN(pid)) { - let barked = false - // keepalive - const interval = setInterval(() => {}, 60000) - const bark = () => { - clearInterval(interval) - if (barked) return - barked = true - process.removeListener('SIGHUP', bark) - setTimeout(() => { - try { - process.kill(pid, 'SIGKILL') - setTimeout(() => process.exit(), 200) - } catch (_) {} - }, 500) - }) - process.on('SIGHUP', bark) -} -`; -export const watchdog = (child) => { - let dogExited = false; - const dog = spawn(process.execPath, ['-e', watchdogCode, String(child.pid)], { - stdio: 'ignore', - }); - dog.on('exit', () => (dogExited = true)); - child.on('exit', () => { - if (!dogExited) - dog.kill('SIGTERM'); - }); - return dog; -}; -//# sourceMappingURL=watchdog.js.map \ No newline at end of file diff --git a/deps/npm/node_modules/foreground-child/package.json b/deps/npm/node_modules/foreground-child/package.json deleted file mode 100644 index dfda32847d990b..00000000000000 --- a/deps/npm/node_modules/foreground-child/package.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "name": "foreground-child", - "version": "3.1.1", - "description": "Run a child as if it's the foreground process. Give it stdio. Exit when it exits.", - "main": "./dist/cjs/index.js", - "module": "./dist/mjs/index.js", - "types": "./dist/mjs/index.d.ts", - "exports": { - ".": { - "import": { - "types": "./dist/mjs/index.d.ts", - "default": "./dist/mjs/index.js" - }, - "require": { - "types": "./dist/cjs/index.d.ts", - "default": "./dist/cjs/index.js" - } - } - }, - "files": [ - "dist" - ], - "engines": { - "node": ">=14" - }, - "dependencies": { - "cross-spawn": "^7.0.0", - "signal-exit": "^4.0.1" - }, - "scripts": { - "preversion": "npm test", - "postversion": "npm publish", - "prepublishOnly": "git push origin --follow-tags", - "prepare": "tsc -p tsconfig.json && tsc -p tsconfig-esm.json && bash ./scripts/fixup.sh", - "pretest": "npm run prepare", - "presnap": "npm run prepare", - "test": "c8 tap", - "snap": "c8 tap", - "format": "prettier --write . --loglevel warn", - "typedoc": "typedoc --tsconfig tsconfig-esm.json ./src/*.ts" - }, - "prettier": { - "semi": false, - "printWidth": 75, - "tabWidth": 2, - "useTabs": false, - "singleQuote": true, - "jsxSingleQuote": false, - "bracketSameLine": true, - "arrowParens": "avoid", - "endOfLine": "lf" - }, - "tap": { - "coverage": false, - "jobs": 1, - "node-arg": [ - "--no-warnings", - "--loader", - "ts-node/esm" - ], - "ts": false - }, - "repository": { - "type": "git", - "url": "git+https://github.com/tapjs/foreground-child.git" - }, - "author": "Isaac Z. Schlueter (http://blog.izs.me/)", - "license": "ISC", - "devDependencies": { - "@types/cross-spawn": "^6.0.2", - "@types/node": "^18.15.11", - "@types/tap": "^15.0.8", - "c8": "^7.13.0", - "prettier": "^2.8.6", - "tap": "^16.3.4", - "ts-node": "^10.9.1", - "typedoc": "^0.24.2", - "typescript": "^5.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } -} diff --git a/deps/npm/node_modules/fs-minipass/lib/index.js b/deps/npm/node_modules/fs-minipass/lib/index.js index 3b84ff661448a0..f9d5082a4d6426 100644 --- a/deps/npm/node_modules/fs-minipass/lib/index.js +++ b/deps/npm/node_modules/fs-minipass/lib/index.js @@ -1,5 +1,5 @@ 'use strict' -const { Minipass } = require('minipass') +const MiniPass = require('minipass') const EE = require('events').EventEmitter const fs = require('fs') @@ -34,7 +34,7 @@ const _writing = Symbol('_writing') const _defaultFlag = Symbol('_defaultFlag') const _errored = Symbol('_errored') -class ReadStream extends Minipass { +class ReadStream extends MiniPass { constructor (path, opt) { opt = opt || {} super(opt) diff --git a/deps/npm/node_modules/fs-minipass/package.json b/deps/npm/node_modules/fs-minipass/package.json index 3d1fa3dbc11e46..cba0d0cbc2dd85 100644 --- a/deps/npm/node_modules/fs-minipass/package.json +++ b/deps/npm/node_modules/fs-minipass/package.json @@ -1,6 +1,6 @@ { "name": "fs-minipass", - "version": "3.0.2", + "version": "3.0.1", "main": "lib/index.js", "scripts": { "test": "tap", @@ -24,11 +24,11 @@ "homepage": "https://github.com/npm/fs-minipass#readme", "description": "fs read and write streams based on minipass", "dependencies": { - "minipass": "^5.0.0" + "minipass": "^4.0.0" }, "devDependencies": { "@npmcli/eslint-config": "^4.0.1", - "@npmcli/template-oss": "4.14.1", + "@npmcli/template-oss": "4.11.3", "mutate-fs": "^2.1.1", "tap": "^16.3.2" }, @@ -48,7 +48,6 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.14.1", - "publish": "true" + "version": "4.11.3" } } diff --git a/deps/npm/node_modules/gauge/lib/index.js b/deps/npm/node_modules/gauge/lib/index.js index be94f53f3b5f46..37fc5ac60a16fd 100644 --- a/deps/npm/node_modules/gauge/lib/index.js +++ b/deps/npm/node_modules/gauge/lib/index.js @@ -2,7 +2,7 @@ var Plumbing = require('./plumbing.js') var hasUnicode = require('has-unicode') var hasColor = require('./has-color.js') -var onExit = require('signal-exit').onExit +var onExit = require('signal-exit') var defaultThemes = require('./themes') var setInterval = require('./set-interval.js') var process = require('./process.js') diff --git a/deps/npm/node_modules/gauge/package.json b/deps/npm/node_modules/gauge/package.json index 449d9dd3ed3920..9e62510298b551 100644 --- a/deps/npm/node_modules/gauge/package.json +++ b/deps/npm/node_modules/gauge/package.json @@ -1,6 +1,6 @@ { "name": "gauge", - "version": "5.0.1", + "version": "5.0.0", "description": "A terminal based horizontal gauge", "main": "lib", "scripts": { @@ -32,14 +32,14 @@ "color-support": "^1.1.3", "console-control-strings": "^1.1.0", "has-unicode": "^2.0.1", - "signal-exit": "^4.0.1", + "signal-exit": "^3.0.7", "string-width": "^4.2.3", "strip-ansi": "^6.0.1", "wide-align": "^1.1.5" }, "devDependencies": { - "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.14.1", + "@npmcli/eslint-config": "^3.0.1", + "@npmcli/template-oss": "4.5.1", "readable-stream": "^4.0.0", "tap": "^16.0.1" }, @@ -62,7 +62,6 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.14.1", - "publish": "true" + "version": "4.5.1" } } diff --git a/deps/npm/node_modules/glob/README.md b/deps/npm/node_modules/glob/README.md deleted file mode 100644 index 892013baae771c..00000000000000 --- a/deps/npm/node_modules/glob/README.md +++ /dev/null @@ -1,1212 +0,0 @@ -# Glob - -Match files using the patterns the shell uses. - -The most correct and second fastest glob implementation in -JavaScript. (See **Comparison to Other JavaScript Glob -Implementations** at the bottom of this readme.) - -![a fun cartoon logo made of glob characters](https://github.com/isaacs/node-glob/raw/main/logo/glob.png) - -## Usage - -Install with npm - -``` -npm i glob -``` - -**Note** the npm package name is _not_ `node-glob` that's a -different thing that was abandoned years ago. Just `glob`. - -```js -// load using import -import { glob, globSync, globStream, globStreamSync, Glob } from 'glob' -// or using commonjs, that's fine, too -const { - glob, - globSync, - globStream, - globStreamSync, - Glob, -} = require('glob') - -// the main glob() and globSync() resolve/return array of filenames - -// all js files, but don't look in node_modules -const jsfiles = await glob('**/*.js', { ignore: 'node_modules/**' }) - -// pass in a signal to cancel the glob walk -const stopAfter100ms = await glob('**/*.css', { - signal: AbortSignal.timeout(100), -}) - -// multiple patterns supported as well -const images = await glob(['css/*.{png,jpeg}', 'public/*.{png,jpeg}']) - -// but of course you can do that with the glob pattern also -// the sync function is the same, just returns a string[] instead -// of Promise -const imagesAlt = globSync('{css,public}/*.{png,jpeg}') - -// you can also stream them, this is a Minipass stream -const filesStream = globStream(['**/*.dat', 'logs/**/*.log']) - -// construct a Glob object if you wanna do it that way, which -// allows for much faster walks if you have to look in the same -// folder multiple times. -const g = new Glob('**/foo') -// glob objects are async iterators, can also do globIterate() or -// g.iterate(), same deal -for await (const file of g) { - console.log('found a foo file:', file) -} -// pass a glob as the glob options to reuse its settings and caches -const g2 = new Glob('**/bar', g) -// sync iteration works as well -for (const file of g2) { - console.log('found a bar file:', file) -} - -// you can also pass withFileTypes: true to get Path objects -// these are like a Dirent, but with some more added powers -// check out http://npm.im/path-scurry for more info on their API -const g3 = new Glob('**/baz/**', { withFileTypes: true }) -g3.stream().on('data', path => { - console.log( - 'got a path object', - path.fullpath(), - path.isDirectory(), - path.readdirSync().map(e => e.name) - ) -}) - -// if you use stat:true and withFileTypes, you can sort results -// by things like modified time, filter by permission mode, etc. -// All Stats fields will be available in that case. Slightly -// slower, though. -// For example: -const results = await glob('**', { stat: true, withFileTypes: true }) - -const timeSortedFiles = results - .sort((a, b) => a.mtimeMS - b.mtimeMS) - .map(path => path.fullpath()) - -const groupReadableFiles = results - .filter(path => path.mode & 0o040) - .map(path => path.fullpath()) - -// custom ignores can be done like this, for example by saying -// you'll ignore all markdown files, and all folders named 'docs' -const customIgnoreResults = await glob('**', { - ignore: { - ignored: p => /\.md$/.test(p.name), - childrenIgnored: p => p.isNamed('docs'), - }, -}) - -// another fun use case, only return files with the same name as -// their parent folder, plus either `.ts` or `.js` -const folderNamedModules = await glob('**/*.{ts,js}', { - ignore: { - ignored: p => { - const pp = p.parent - return !(p.isNamed(pp.name + '.ts') || p.isNamed(pp.name + '.js')) - }, - }, -}) - -// find all files edited in the last hour, to do this, we ignore -// all of them that are more than an hour old -const newFiles = await glob('**', { - // need stat so we have mtime - stat: true, - // only want the files, not the dirs - nodir: true, - ignore: { - ignored: p => { - return new Date() - p.mtime > 60 * 60 * 1000 - }, - // could add similar childrenIgnored here as well, but - // directory mtime is inconsistent across platforms, so - // probably better not to, unless you know the system - // tracks this reliably. - }, -}) -``` - -**Note** Glob patterns should always use `/` as a path separator, -even on Windows systems, as `\` is used to escape glob -characters. If you wish to use `\` as a path separator _instead -of_ using it as an escape character on Windows platforms, you may -set `windowsPathsNoEscape:true` in the options. In this mode, -special glob characters cannot be escaped, making it impossible -to match a literal `*` `?` and so on in filenames. - -## Command Line Interface - -``` -$ glob -h - -Usage: - glob [options] [ [ ...]] - -Expand the positional glob expression arguments into any matching file system -paths found. - - -c --cmd= - Run the command provided, passing the glob expression - matches as arguments. - - -A --all By default, the glob cli command will not expand any - arguments that are an exact match to a file on disk. - - This prevents double-expanding, in case the shell - expands an argument whose filename is a glob - expression. - - For example, if 'app/*.ts' would match 'app/[id].ts', - then on Windows powershell or cmd.exe, 'glob app/*.ts' - will expand to 'app/[id].ts', as expected. However, in - posix shells such as bash or zsh, the shell will first - expand 'app/*.ts' to a list of filenames. Then glob - will look for a file matching 'app/[id].ts' (ie, - 'app/i.ts' or 'app/d.ts'), which is unexpected. - - Setting '--all' prevents this behavior, causing glob to - treat ALL patterns as glob expressions to be expanded, - even if they are an exact match to a file on disk. - - When setting this option, be sure to enquote arguments - so that the shell will not expand them prior to passing - them to the glob command process. - - -a --absolute Expand to absolute paths - -d --dot-relative Prepend './' on relative matches - -m --mark Append a / on any directories matched - -x --posix Always resolve to posix style paths, using '/' as the - directory separator, even on Windows. Drive letter - absolute matches on Windows will be expanded to their - full resolved UNC maths, eg instead of 'C:\foo\bar', it - will expand to '//?/C:/foo/bar'. - - -f --follow Follow symlinked directories when expanding '**' - -R --realpath Call 'fs.realpath' on all of the results. In the case - of an entry that cannot be resolved, the entry is - omitted. This incurs a slight performance penalty, of - course, because of the added system calls. - - -s --stat Call 'fs.lstat' on all entries, whether required or not - to determine if it's a valid match. - - -b --match-base Perform a basename-only match if the pattern does not - contain any slash characters. That is, '*.js' would be - treated as equivalent to '**/*.js', matching js files - in all directories. - - --dot Allow patterns to match files/directories that start - with '.', even if the pattern does not start with '.' - - --nobrace Do not expand {...} patterns - --nocase Perform a case-insensitive match. This defaults to - 'true' on macOS and Windows platforms, and false on all - others. - - Note: 'nocase' should only be explicitly set when it is - known that the filesystem's case sensitivity differs - from the platform default. If set 'true' on - case-insensitive file systems, then the walk may return - more or less results than expected. - - --nodir Do not match directories, only files. - - Note: to *only* match directories, append a '/' at the - end of the pattern. - - --noext Do not expand extglob patterns, such as '+(a|b)' - --noglobstar Do not expand '**' against multiple path portions. Ie, - treat it as a normal '*' instead. - - --windows-path-no-escape - Use '\' as a path separator *only*, and *never* as an - escape character. If set, all '\' characters are - replaced with '/' in the pattern. - - -D --max-depth= Maximum depth to traverse from the current working - directory - - -C --cwd= Current working directory to execute/match in - -r --root= A string path resolved against the 'cwd', which is used - as the starting point for absolute patterns that start - with '/' (but not drive letters or UNC paths on - Windows). - - Note that this *doesn't* necessarily limit the walk to - the 'root' directory, and doesn't affect the cwd - starting point for non-absolute patterns. A pattern - containing '..' will still be able to traverse out of - the root directory, if it is not an actual root - directory on the filesystem, and any non-absolute - patterns will still be matched in the 'cwd'. - - To start absolute and non-absolute patterns in the same - path, you can use '--root=' to set it to the empty - string. However, be aware that on Windows systems, a - pattern like 'x:/*' or '//host/share/*' will *always* - start in the 'x:/' or '//host/share/' directory, - regardless of the --root setting. - - --platform= Defaults to the value of 'process.platform' if - available, or 'linux' if not. Setting --platform=win32 - on non-Windows systems may cause strange behavior! - - -i --ignore= - Glob patterns to ignore Can be set multiple times - -v --debug Output a huge amount of noisy debug information about - patterns as they are parsed and used to match files. - - -h --help Show this usage information -``` - -## `glob(pattern: string | string[], options?: GlobOptions) => Promise` - -Perform an asynchronous glob search for the pattern(s) specified. -Returns -[Path](https://isaacs.github.io/path-scurry/classes/PathBase) -objects if the `withFileTypes` option is set to `true`. See below -for full options field desciptions. - -## `globSync(pattern: string | string[], options?: GlobOptions) => string[] | Path[]` - -Synchronous form of `glob()`. - -Alias: `glob.sync()` - -## `globIterate(pattern: string | string[], options?: GlobOptions) => AsyncGenerator` - -Return an async iterator for walking glob pattern matches. - -Alias: `glob.iterate()` - -## `globIterateSync(pattern: string | string[], options?: GlobOptions) => Generator` - -Return a sync iterator for walking glob pattern matches. - -Alias: `glob.iterate.sync()`, `glob.sync.iterate()` - -## `globStream(pattern: string | string[], options?: GlobOptions) => Minipass` - -Return a stream that emits all the strings or `Path` objects and -then emits `end` when completed. - -Alias: `glob.stream()` - -## `globStreamSync(pattern: string | string[], options?: GlobOptions) => Minipass` - -Syncronous form of `globStream()`. Will read all the matches as -fast as you consume them, even all in a single tick if you -consume them immediately, but will still respond to backpressure -if they're not consumed immediately. - -Alias: `glob.stream.sync()`, `glob.sync.stream()` - -## `hasMagic(pattern: string | string[], options?: GlobOptions) => boolean` - -Returns `true` if the provided pattern contains any "magic" glob -characters, given the options provided. - -Brace expansion is not considered "magic" unless the -`magicalBraces` option is set, as brace expansion just turns one -string into an array of strings. So a pattern like `'x{a,b}y'` -would return `false`, because `'xay'` and `'xby'` both do not -contain any magic glob characters, and it's treated the same as -if you had called it on `['xay', 'xby']`. When -`magicalBraces:true` is in the options, brace expansion _is_ -treated as a pattern having magic. - -## `escape(pattern: string, options?: GlobOptions) => string` - -Escape all magic characters in a glob pattern, so that it will -only ever match literal strings - -If the `windowsPathsNoEscape` option is used, then characters are -escaped by wrapping in `[]`, because a magic character wrapped in -a character class can only be satisfied by that exact character. - -Slashes (and backslashes in `windowsPathsNoEscape` mode) cannot -be escaped or unescaped. - -## `unescape(pattern: string, options?: GlobOptions) => string` - -Un-escape a glob string that may contain some escaped characters. - -If the `windowsPathsNoEscape` option is used, then square-brace -escapes are removed, but not backslash escapes. For example, it -will turn the string `'[*]'` into `*`, but it will not turn -`'\\*'` into `'*'`, because `\` is a path separator in -`windowsPathsNoEscape` mode. - -When `windowsPathsNoEscape` is not set, then both brace escapes -and backslash escapes are removed. - -Slashes (and backslashes in `windowsPathsNoEscape` mode) cannot -be escaped or unescaped. - -## Class `Glob` - -An object that can perform glob pattern traversals. - -### `const g = new Glob(pattern: string | string[], options: GlobOptions)` - -See full options descriptions below. - -Note that a previous `Glob` object can be passed as the -`GlobOptions` to another `Glob` instantiation to re-use settings -and caches with a new pattern. - -Traversal functions can be called multiple times to run the walk -again. - -### `g.stream()` - -Stream results asynchronously, - -### `g.streamSync()` - -Stream results synchronously. - -### `g.iterate()` - -Default async iteration function. Returns an AsyncGenerator that -iterates over the results. - -### `g.iterateSync()` - -Default sync iteration function. Returns a Generator that -iterates over the results. - -### `g.walk()` - -Returns a Promise that resolves to the results array. - -### `g.walkSync()` - -Returns a results array. - -### Properties - -All options are stored as properties on the `Glob` object. - -- `opts` The options provided to the constructor. -- `patterns` An array of parsed immutable `Pattern` objects. - -## Options - -Exported as `GlobOptions` TypeScript interface. A `GlobOptions` -object may be provided to any of the exported methods, and must -be provided to the `Glob` constructor. - -All options are optional, boolean, and false by default, unless -otherwise noted. - -All resolved options are added to the Glob object as properties. - -If you are running many `glob` operations, you can pass a Glob -object as the `options` argument to a subsequent operation to -share the previously loaded cache. - -- `cwd` String path or `file://` string or URL object. The - current working directory in which to search. Defaults to - `process.cwd()`. See also: "Windows, CWDs, Drive Letters, and - UNC Paths", below. - - This option may be eiher a string path or a `file://` URL - object or string. - -- `root` A string path resolved against the `cwd` option, which - is used as the starting point for absolute patterns that start - with `/`, (but not drive letters or UNC paths on Windows). - - Note that this _doesn't_ necessarily limit the walk to the - `root` directory, and doesn't affect the cwd starting point for - non-absolute patterns. A pattern containing `..` will still be - able to traverse out of the root directory, if it is not an - actual root directory on the filesystem, and any non-absolute - patterns will be matched in the `cwd`. For example, the - pattern `/../*` with `{root:'/some/path'}` will return all - files in `/some`, not all files in `/some/path`. The pattern - `*` with `{root:'/some/path'}` will return all the entries in - the cwd, not the entries in `/some/path`. - - To start absolute and non-absolute patterns in the same - path, you can use `{root:''}`. However, be aware that on - Windows systems, a pattern like `x:/*` or `//host/share/*` will - _always_ start in the `x:/` or `//host/share` directory, - regardless of the `root` setting. - -- `windowsPathsNoEscape` Use `\\` as a path separator _only_, and - _never_ as an escape character. If set, all `\\` characters are - replaced with `/` in the pattern. - - Note that this makes it **impossible** to match against paths - containing literal glob pattern characters, but allows matching - with patterns constructed using `path.join()` and - `path.resolve()` on Windows platforms, mimicking the (buggy!) - behavior of Glob v7 and before on Windows. Please use with - caution, and be mindful of [the caveat below about Windows - paths](#windows). (For legacy reasons, this is also set if - `allowWindowsEscape` is set to the exact value `false`.) - -- `dot` Include `.dot` files in normal matches and `globstar` - matches. Note that an explicit dot in a portion of the pattern - will always match dot files. - -- `magicalBraces` Treat brace expansion like `{a,b}` as a "magic" - pattern. Has no effect if {@link nobrace} is set. - - Only has effect on the {@link hasMagic} function, no effect on - glob pattern matching itself. - -- `dotRelative` Prepend all relative path strings with `./` (or - `.\` on Windows). - - Without this option, returned relative paths are "bare", so - instead of returning `'./foo/bar'`, they are returned as - `'foo/bar'`. - - Relative patterns starting with `'../'` are not prepended with - `./`, even if this option is set. - -- `mark` Add a `/` character to directory matches. Note that this - requires additional stat calls. - -- `nobrace` Do not expand `{a,b}` and `{1..3}` brace sets. - -- `noglobstar` Do not match `**` against multiple filenames. (Ie, - treat it as a normal `*` instead.) - -- `noext` Do not match "extglob" patterns such as `+(a|b)`. - -- `nocase` Perform a case-insensitive match. This defaults to - `true` on macOS and Windows systems, and `false` on all others. - - **Note** `nocase` should only be explicitly set when it is - known that the filesystem's case sensitivity differs from the - platform default. If set `true` on case-sensitive file - systems, or `false` on case-insensitive file systems, then the - walk may return more or less results than expected. - -- `maxDepth` Specify a number to limit the depth of the directory - traversal to this many levels below the `cwd`. - -- `matchBase` Perform a basename-only match if the pattern does - not contain any slash characters. That is, `*.js` would be - treated as equivalent to `**/*.js`, matching all js files in - all directories. - -- `nodir` Do not match directories, only files. (Note: to match - _only_ directories, put a `/` at the end of the pattern.) - -- `stat` Call `lstat()` on all entries, whether required or not - to determine whether it's a valid match. When used with - `withFileTypes`, this means that matches will include data such - as modified time, permissions, and so on. Note that this will - incur a performance cost due to the added system calls. - -- `ignore` string or string[], or an object with `ignore` and - `ignoreChildren` methods. - - If a string or string[] is provided, then this is treated as a - glob pattern or array of glob patterns to exclude from matches. - To ignore all children within a directory, as well as the entry - itself, append `'/**'` to the ignore pattern. - - **Note** `ignore` patterns are _always_ in `dot:true` mode, - regardless of any other settings. - - If an object is provided that has `ignored(path)` and/or - `childrenIgnored(path)` methods, then these methods will be - called to determine whether any Path is a match or if its - children should be traversed, respectively. - -- `follow` Follow symlinked directories when expanding `**` - patterns. This can result in a lot of duplicate references in - the presence of cyclic links, and make performance quite bad. - - By default, a `**` in a pattern will follow 1 symbolic link if - it is not the first item in the pattern, or none if it is the - first item in the pattern, following the same behavior as Bash. - -- `realpath` Set to true to call `fs.realpath` on all of the - results. In the case of an entry that cannot be resolved, the - entry is omitted. This incurs a slight performance penalty, of - course, because of the added system calls. - -- `absolute` Set to true to always receive absolute paths for - matched files. Set to `false` to always receive relative paths - for matched files. - - By default, when this option is not set, absolute paths are - returned for patterns that are absolute, and otherwise paths - are returned that are relative to the `cwd` setting. - - This does _not_ make an extra system call to get the realpath, - it only does string path resolution. - - `absolute` may not be used along with `withFileTypes`. - -- `posix` Set to true to use `/` as the path separator in - returned results. On posix systems, this has no effect. On - Windows systems, this will return `/` delimited path results, - and absolute paths will be returned in their full resolved UNC - path form, eg insted of `'C:\\foo\\bar'`, it will return - `//?/C:/foo/bar`. - -- `platform` Defaults to value of `process.platform` if - available, or `'linux'` if not. Setting `platform:'win32'` on - non-Windows systems may cause strange behavior. - -- `withFileTypes` Return [PathScurry](http://npm.im/path-scurry) - `Path` objects instead of strings. These are similar to a - NodeJS `Dirent` object, but with additional methods and - properties. - - `withFileTypes` may not be used along with `absolute`. - -- `signal` An AbortSignal which will cancel the Glob walk when - triggered. - -- `fs` An override object to pass in custom filesystem methods. - See [PathScurry docs](http://npm.im/path-scurry) for what can - be overridden. - -- `scurry` A [PathScurry](http://npm.im/path-scurry) object used - to traverse the file system. If the `nocase` option is set - explicitly, then any provided `scurry` object must match this - setting. - -## Glob Primer - -Much more information about glob pattern expansion can be found -by running `man bash` and searching for `Pattern Matching`. - -"Globs" are the patterns you type when you do stuff like `ls -*.js` on the command line, or put `build/*` in a `.gitignore` -file. - -Before parsing the path part patterns, braced sections are -expanded into a set. Braced sections start with `{` and end with -`}`, with 2 or more comma-delimited sections within. Braced -sections may contain slash characters, so `a{/b/c,bcd}` would -expand into `a/b/c` and `abcd`. - -The following characters have special magic meaning when used in -a path portion. With the exception of `**`, none of these match -path separators (ie, `/` on all platforms, and `\` on Windows). - -- `*` Matches 0 or more characters in a single path portion. - When alone in a path portion, it must match at least 1 - character. If `dot:true` is not specified, then `*` will not - match against a `.` character at the start of a path portion. -- `?` Matches 1 character. If `dot:true` is not specified, then - `?` will not match against a `.` character at the start of a - path portion. -- `[...]` Matches a range of characters, similar to a RegExp - range. If the first character of the range is `!` or `^` then - it matches any character not in the range. If the first - character is `]`, then it will be considered the same as `\]`, - rather than the end of the character class. -- `!(pattern|pattern|pattern)` Matches anything that does not - match any of the patterns provided. May _not_ contain `/` - characters. Similar to `*`, if alone in a path portion, then - the path portion must have at least one character. -- `?(pattern|pattern|pattern)` Matches zero or one occurrence of - the patterns provided. May _not_ contain `/` characters. -- `+(pattern|pattern|pattern)` Matches one or more occurrences of - the patterns provided. May _not_ contain `/` characters. -- `*(a|b|c)` Matches zero or more occurrences of the patterns - provided. May _not_ contain `/` characters. -- `@(pattern|pat*|pat?erN)` Matches exactly one of the patterns - provided. May _not_ contain `/` characters. -- `**` If a "globstar" is alone in a path portion, then it - matches zero or more directories and subdirectories searching - for matches. It does not crawl symlinked directories, unless - `{follow:true}` is passed in the options object. A pattern - like `a/b/**` will only match `a/b` if it is a directory. - Follows 1 symbolic link if not the first item in the pattern, - or 0 if it is the first item, unless `follow:true` is set, in - which case it follows all symbolic links. - -`[:class:]` patterns are supported by this implementation, but -`[=c=]` and `[.symbol.]` style class patterns are not. - -### Dots - -If a file or directory path portion has a `.` as the first -character, then it will not match any glob pattern unless that -pattern's corresponding path part also has a `.` as its first -character. - -For example, the pattern `a/.*/c` would match the file at -`a/.b/c`. However the pattern `a/*/c` would not, because `*` does -not start with a dot character. - -You can make glob treat dots as normal characters by setting -`dot:true` in the options. - -### Basename Matching - -If you set `matchBase:true` in the options, and the pattern has -no slashes in it, then it will seek for any file anywhere in the -tree with a matching basename. For example, `*.js` would match -`test/simple/basic.js`. - -### Empty Sets - -If no matching files are found, then an empty array is returned. -This differs from the shell, where the pattern itself is -returned. For example: - -```sh -$ echo a*s*d*f -a*s*d*f -``` - -## Comparisons to other fnmatch/glob implementations - -While strict compliance with the existing standards is a -worthwhile goal, some discrepancies exist between node-glob and -other implementations, and are intentional. - -The double-star character `**` is supported by default, unless -the `noglobstar` flag is set. This is supported in the manner of -bsdglob and bash 5, where `**` only has special significance if -it is the only thing in a path part. That is, `a/**/b` will match -`a/x/y/b`, but `a/**b` will not. - -Note that symlinked directories are not traversed as part of a -`**`, though their contents may match against subsequent portions -of the pattern. This prevents infinite loops and duplicates and -the like. You can force glob to traverse symlinks with `**` by -setting `{follow:true}` in the options. - -There is no equivalent of the `nonull` option. A pattern that -does not find any matches simply resolves to nothing. (An empty -array, immediately ended stream, etc.) - -If brace expansion is not disabled, then it is performed before -any other interpretation of the glob pattern. Thus, a pattern -like `+(a|{b),c)}`, which would not be valid in bash or zsh, is -expanded **first** into the set of `+(a|b)` and `+(a|c)`, and -those patterns are checked for validity. Since those two are -valid, matching proceeds. - -The character class patterns `[:class:]` (posix standard named -classes) style class patterns are supported and unicode-aware, -but `[=c=]` (locale-specific character collation weight), and -`[.symbol.]` (collating symbol), are not. - -### Repeated Slashes - -Unlike Bash and zsh, repeated `/` are always coalesced into a -single path separator. - -### Comments and Negation - -Previously, this module let you mark a pattern as a "comment" if -it started with a `#` character, or a "negated" pattern if it -started with a `!` character. - -These options were deprecated in version 5, and removed in -version 6. - -To specify things that should not match, use the `ignore` option. - -## Windows - -**Please only use forward-slashes in glob expressions.** - -Though windows uses either `/` or `\` as its path separator, only -`/` characters are used by this glob implementation. You must use -forward-slashes **only** in glob expressions. Back-slashes will -always be interpreted as escape characters, not path separators. - -Results from absolute patterns such as `/foo/*` are mounted onto -the root setting using `path.join`. On windows, this will by -default result in `/foo/*` matching `C:\foo\bar.txt`. - -To automatically coerce all `\` characters to `/` in pattern -strings, **thus making it impossible to escape literal glob -characters**, you may set the `windowsPathsNoEscape` option to -`true`. - -### Windows, CWDs, Drive Letters, and UNC Paths - -On posix systems, when a pattern starts with `/`, any `cwd` -option is ignored, and the traversal starts at `/`, plus any -non-magic path portions specified in the pattern. - -On Windows systems, the behavior is similar, but the concept of -an "absolute path" is somewhat more involved. - -#### UNC Paths - -A UNC path may be used as the start of a pattern on Windows -platforms. For example, a pattern like: `//?/x:/*` will return -all file entries in the root of the `x:` drive. A pattern like -`//ComputerName/Share/*` will return all files in the associated -share. - -UNC path roots are always compared case insensitively. - -#### Drive Letters - -A pattern starting with a drive letter, like `c:/*`, will search -in that drive, regardless of any `cwd` option provided. - -If the pattern starts with `/`, and is not a UNC path, and there -is an explicit `cwd` option set with a drive letter, then the -drive letter in the `cwd` is used as the root of the directory -traversal. - -For example, `glob('/tmp', { cwd: 'c:/any/thing' })` will return -`['c:/tmp']` as the result. - -If an explicit `cwd` option is not provided, and the pattern -starts with `/`, then the traversal will run on the root of the -drive provided as the `cwd` option. (That is, it is the result of -`path.resolve('/')`.) - -## Race Conditions - -Glob searching, by its very nature, is susceptible to race -conditions, since it relies on directory walking. - -As a result, it is possible that a file that exists when glob -looks for it may have been deleted or modified by the time it -returns the result. - -By design, this implementation caches all readdir calls that it -makes, in order to cut down on system overhead. However, this -also makes it even more susceptible to races, especially if the -cache object is reused between glob calls. - -Users are thus advised not to use a glob result as a guarantee of -filesystem state in the face of rapid changes. For the vast -majority of operations, this is never a problem. - -### See Also: - -- `man sh` -- `man bash` [Pattern - Matching](https://www.gnu.org/software/bash/manual/html_node/Pattern-Matching.html) -- `man 3 fnmatch` -- `man 5 gitignore` -- [minimatch documentation](https://github.com/isaacs/minimatch) - -## Glob Logo - -Glob's logo was created by [Tanya -Brassie](http://tanyabrassie.com/). Logo files can be found -[here](https://github.com/isaacs/node-glob/tree/master/logo). - -The logo is licensed under a [Creative Commons -Attribution-ShareAlike 4.0 International -License](https://creativecommons.org/licenses/by-sa/4.0/). - -## Contributing - -Any change to behavior (including bugfixes) must come with a -test. - -Patches that fail tests or reduce performance will be rejected. - -```sh -# to run tests -npm test - -# to re-generate test fixtures -npm run test-regen - -# run the benchmarks -npm run bench - -# to profile javascript -npm run prof -``` - -## Comparison to Other JavaScript Glob Implementations - -**tl;dr** - -- If you want glob matching that is as faithful as possible to - Bash pattern expansion semantics, and as fast as possible - within that constraint, _use this module_. -- If you are reasonably sure that the patterns you will encounter - are relatively simple, and want the absolutely fastest glob - matcher out there, _use [fast-glob](http://npm.im/fast-glob)_. -- If you are reasonably sure that the patterns you will encounter - are relatively simple, and want the convenience of - automatically respecting `.gitignore` files, _use - [globby](http://npm.im/globby)_. - -There are some other glob matcher libraries on npm, but these -three are (in my opinion, as of 2023) the best. - ---- - -**full explanation** - -Every library reflects a set of opinions and priorities in the -trade-offs it makes. Other than this library, I can personally -recommend both [globby](http://npm.im/globby) and -[fast-glob](http://npm.im/fast-glob), though they differ in their -benefits and drawbacks. - -Both have very nice APIs and are reasonably fast. - -`fast-glob` is, as far as I am aware, the fastest glob -implementation in JavaScript today. However, there are many -cases where the choices that `fast-glob` makes in pursuit of -speed mean that its results differ from the results returned by -Bash and other sh-like shells, which may be surprising. - -In my testing, `fast-glob` is around 10-20% faster than this -module when walking over 200k files nested 4 directories -deep[1](#fn-webscale). However, there are some inconsistencies -with Bash matching behavior that this module does not suffer -from: - -- `**` only matches files, not directories -- `..` path portions are not handled unless they appear at the - start of the pattern -- `./!()` will not match any files that _start_ with - ``, even if they do not match ``. For - example, `!(9).txt` will not match `9999.txt`. -- Some brace patterns in the middle of a pattern will result in - failing to find certain matches. -- Extglob patterns are allowed to contain `/` characters. - -Globby exhibits all of the same pattern semantics as fast-glob, -(as it is a wrapper around fast-glob) and is slightly slower than -node-glob (by about 10-20% in the benchmark test set, or in other -words, anywhere from 20-50% slower than fast-glob). However, it -adds some API conveniences that may be worth the costs. - -- Support for `.gitignore` and other ignore files. -- Support for negated globs (ie, patterns starting with `!` - rather than using a separate `ignore` option). - -The priority of this module is "correctness" in the sense of -performing a glob pattern expansion as faithfully as possible to -the behavior of Bash and other sh-like shells, with as much speed -as possible. - -Note that prior versions of `node-glob` are _not_ on this list. -Former versions of this module are far too slow for any cases -where performance matters at all, and were designed with APIs -that are extremely dated by current JavaScript standards. - ---- - -[1]: In the cases where this module -returns results and `fast-glob` doesn't, it's even faster, of -course. - -![lumpy space princess saying 'oh my GLOB'](https://github.com/isaacs/node-glob/raw/main/oh-my-glob.gif) - -### Benchmark Results - -First number is time, smaller is better. - -Second number is the count of results returned. - -``` ---- pattern: '**' --- -~~ sync ~~ -node fast-glob sync 0m0.598s 200364 -node globby sync 0m0.765s 200364 -node current globSync mjs 0m0.683s 222656 -node current glob syncStream 0m0.649s 222656 -~~ async ~~ -node fast-glob async 0m0.350s 200364 -node globby async 0m0.509s 200364 -node current glob async mjs 0m0.463s 222656 -node current glob stream 0m0.411s 222656 - ---- pattern: '**/..' --- -~~ sync ~~ -node fast-glob sync 0m0.486s 0 -node globby sync 0m0.769s 200364 -node current globSync mjs 0m0.564s 2242 -node current glob syncStream 0m0.583s 2242 -~~ async ~~ -node fast-glob async 0m0.283s 0 -node globby async 0m0.512s 200364 -node current glob async mjs 0m0.299s 2242 -node current glob stream 0m0.312s 2242 - ---- pattern: './**/0/**/0/**/0/**/0/**/*.txt' --- -~~ sync ~~ -node fast-glob sync 0m0.490s 10 -node globby sync 0m0.517s 10 -node current globSync mjs 0m0.540s 10 -node current glob syncStream 0m0.550s 10 -~~ async ~~ -node fast-glob async 0m0.290s 10 -node globby async 0m0.296s 10 -node current glob async mjs 0m0.278s 10 -node current glob stream 0m0.302s 10 - ---- pattern: './**/[01]/**/[12]/**/[23]/**/[45]/**/*.txt' --- -~~ sync ~~ -node fast-glob sync 0m0.500s 160 -node globby sync 0m0.528s 160 -node current globSync mjs 0m0.556s 160 -node current glob syncStream 0m0.573s 160 -~~ async ~~ -node fast-glob async 0m0.283s 160 -node globby async 0m0.301s 160 -node current glob async mjs 0m0.306s 160 -node current glob stream 0m0.322s 160 - ---- pattern: './**/0/**/0/**/*.txt' --- -~~ sync ~~ -node fast-glob sync 0m0.502s 5230 -node globby sync 0m0.527s 5230 -node current globSync mjs 0m0.544s 5230 -node current glob syncStream 0m0.557s 5230 -~~ async ~~ -node fast-glob async 0m0.285s 5230 -node globby async 0m0.305s 5230 -node current glob async mjs 0m0.304s 5230 -node current glob stream 0m0.310s 5230 - ---- pattern: '**/*.txt' --- -~~ sync ~~ -node fast-glob sync 0m0.580s 200023 -node globby sync 0m0.771s 200023 -node current globSync mjs 0m0.685s 200023 -node current glob syncStream 0m0.649s 200023 -~~ async ~~ -node fast-glob async 0m0.349s 200023 -node globby async 0m0.509s 200023 -node current glob async mjs 0m0.427s 200023 -node current glob stream 0m0.388s 200023 - ---- pattern: '{**/*.txt,**/?/**/*.txt,**/?/**/?/**/*.txt,**/?/**/?/**/?/**/*.txt,**/?/**/?/**/?/**/?/**/*.txt}' --- -~~ sync ~~ -node fast-glob sync 0m0.589s 200023 -node globby sync 0m0.771s 200023 -node current globSync mjs 0m0.716s 200023 -node current glob syncStream 0m0.684s 200023 -~~ async ~~ -node fast-glob async 0m0.351s 200023 -node globby async 0m0.518s 200023 -node current glob async mjs 0m0.462s 200023 -node current glob stream 0m0.468s 200023 - ---- pattern: '**/5555/0000/*.txt' --- -~~ sync ~~ -node fast-glob sync 0m0.496s 1000 -node globby sync 0m0.519s 1000 -node current globSync mjs 0m0.539s 1000 -node current glob syncStream 0m0.567s 1000 -~~ async ~~ -node fast-glob async 0m0.285s 1000 -node globby async 0m0.299s 1000 -node current glob async mjs 0m0.305s 1000 -node current glob stream 0m0.301s 1000 - ---- pattern: './**/0/**/../[01]/**/0/../**/0/*.txt' --- -~~ sync ~~ -node fast-glob sync 0m0.484s 0 -node globby sync 0m0.507s 0 -node current globSync mjs 0m0.577s 4880 -node current glob syncStream 0m0.586s 4880 -~~ async ~~ -node fast-glob async 0m0.280s 0 -node globby async 0m0.298s 0 -node current glob async mjs 0m0.327s 4880 -node current glob stream 0m0.324s 4880 - ---- pattern: '**/????/????/????/????/*.txt' --- -~~ sync ~~ -node fast-glob sync 0m0.547s 100000 -node globby sync 0m0.673s 100000 -node current globSync mjs 0m0.626s 100000 -node current glob syncStream 0m0.618s 100000 -~~ async ~~ -node fast-glob async 0m0.315s 100000 -node globby async 0m0.414s 100000 -node current glob async mjs 0m0.366s 100000 -node current glob stream 0m0.345s 100000 - ---- pattern: './{**/?{/**/?{/**/?{/**/?,,,,},,,,},,,,},,,}/**/*.txt' --- -~~ sync ~~ -node fast-glob sync 0m0.588s 100000 -node globby sync 0m0.670s 100000 -node current globSync mjs 0m0.717s 200023 -node current glob syncStream 0m0.687s 200023 -~~ async ~~ -node fast-glob async 0m0.343s 100000 -node globby async 0m0.418s 100000 -node current glob async mjs 0m0.519s 200023 -node current glob stream 0m0.451s 200023 - ---- pattern: '**/!(0|9).txt' --- -~~ sync ~~ -node fast-glob sync 0m0.573s 160023 -node globby sync 0m0.731s 160023 -node current globSync mjs 0m0.680s 180023 -node current glob syncStream 0m0.659s 180023 -~~ async ~~ -node fast-glob async 0m0.345s 160023 -node globby async 0m0.476s 160023 -node current glob async mjs 0m0.427s 180023 -node current glob stream 0m0.388s 180023 - ---- pattern: './{*/**/../{*/**/../{*/**/../{*/**/../{*/**,,,,},,,,},,,,},,,,},,,,}/*.txt' --- -~~ sync ~~ -node fast-glob sync 0m0.483s 0 -node globby sync 0m0.512s 0 -node current globSync mjs 0m0.811s 200023 -node current glob syncStream 0m0.773s 200023 -~~ async ~~ -node fast-glob async 0m0.280s 0 -node globby async 0m0.299s 0 -node current glob async mjs 0m0.617s 200023 -node current glob stream 0m0.568s 200023 - ---- pattern: './*/**/../*/**/../*/**/../*/**/../*/**/../*/**/../*/**/../*/**/*.txt' --- -~~ sync ~~ -node fast-glob sync 0m0.485s 0 -node globby sync 0m0.507s 0 -node current globSync mjs 0m0.759s 200023 -node current glob syncStream 0m0.740s 200023 -~~ async ~~ -node fast-glob async 0m0.281s 0 -node globby async 0m0.297s 0 -node current glob async mjs 0m0.544s 200023 -node current glob stream 0m0.464s 200023 - ---- pattern: './*/**/../*/**/../*/**/../*/**/../*/**/*.txt' --- -~~ sync ~~ -node fast-glob sync 0m0.486s 0 -node globby sync 0m0.513s 0 -node current globSync mjs 0m0.734s 200023 -node current glob syncStream 0m0.696s 200023 -~~ async ~~ -node fast-glob async 0m0.286s 0 -node globby async 0m0.296s 0 -node current glob async mjs 0m0.506s 200023 -node current glob stream 0m0.483s 200023 - ---- pattern: './0/**/../1/**/../2/**/../3/**/../4/**/../5/**/../6/**/../7/**/*.txt' --- -~~ sync ~~ -node fast-glob sync 0m0.060s 0 -node globby sync 0m0.074s 0 -node current globSync mjs 0m0.067s 0 -node current glob syncStream 0m0.066s 0 -~~ async ~~ -node fast-glob async 0m0.060s 0 -node globby async 0m0.075s 0 -node current glob async mjs 0m0.066s 0 -node current glob stream 0m0.067s 0 - ---- pattern: './**/?/**/?/**/?/**/?/**/*.txt' --- -~~ sync ~~ -node fast-glob sync 0m0.568s 100000 -node globby sync 0m0.651s 100000 -node current globSync mjs 0m0.619s 100000 -node current glob syncStream 0m0.617s 100000 -~~ async ~~ -node fast-glob async 0m0.332s 100000 -node globby async 0m0.409s 100000 -node current glob async mjs 0m0.372s 100000 -node current glob stream 0m0.351s 100000 - ---- pattern: '**/*/**/*/**/*/**/*/**' --- -~~ sync ~~ -node fast-glob sync 0m0.603s 200113 -node globby sync 0m0.798s 200113 -node current globSync mjs 0m0.730s 222137 -node current glob syncStream 0m0.693s 222137 -~~ async ~~ -node fast-glob async 0m0.356s 200113 -node globby async 0m0.525s 200113 -node current glob async mjs 0m0.508s 222137 -node current glob stream 0m0.455s 222137 - ---- pattern: './**/*/**/*/**/*/**/*/**/*.txt' --- -~~ sync ~~ -node fast-glob sync 0m0.622s 200000 -node globby sync 0m0.792s 200000 -node current globSync mjs 0m0.722s 200000 -node current glob syncStream 0m0.695s 200000 -~~ async ~~ -node fast-glob async 0m0.369s 200000 -node globby async 0m0.527s 200000 -node current glob async mjs 0m0.502s 200000 -node current glob stream 0m0.481s 200000 - ---- pattern: '**/*.txt' --- -~~ sync ~~ -node fast-glob sync 0m0.588s 200023 -node globby sync 0m0.771s 200023 -node current globSync mjs 0m0.684s 200023 -node current glob syncStream 0m0.658s 200023 -~~ async ~~ -node fast-glob async 0m0.352s 200023 -node globby async 0m0.516s 200023 -node current glob async mjs 0m0.432s 200023 -node current glob stream 0m0.384s 200023 - ---- pattern: './**/**/**/**/**/**/**/**/*.txt' --- -~~ sync ~~ -node fast-glob sync 0m0.589s 200023 -node globby sync 0m0.766s 200023 -node current globSync mjs 0m0.682s 200023 -node current glob syncStream 0m0.652s 200023 -~~ async ~~ -node fast-glob async 0m0.352s 200023 -node globby async 0m0.523s 200023 -node current glob async mjs 0m0.436s 200023 -node current glob stream 0m0.380s 200023 - ---- pattern: '**/*/*.txt' --- -~~ sync ~~ -node fast-glob sync 0m0.592s 200023 -node globby sync 0m0.776s 200023 -node current globSync mjs 0m0.691s 200023 -node current glob syncStream 0m0.659s 200023 -~~ async ~~ -node fast-glob async 0m0.357s 200023 -node globby async 0m0.513s 200023 -node current glob async mjs 0m0.471s 200023 -node current glob stream 0m0.424s 200023 - ---- pattern: '**/*/**/*.txt' --- -~~ sync ~~ -node fast-glob sync 0m0.585s 200023 -node globby sync 0m0.766s 200023 -node current globSync mjs 0m0.694s 200023 -node current glob syncStream 0m0.664s 200023 -~~ async ~~ -node fast-glob async 0m0.350s 200023 -node globby async 0m0.514s 200023 -node current glob async mjs 0m0.472s 200023 -node current glob stream 0m0.424s 200023 - ---- pattern: '**/[0-9]/**/*.txt' --- -~~ sync ~~ -node fast-glob sync 0m0.544s 100000 -node globby sync 0m0.636s 100000 -node current globSync mjs 0m0.626s 100000 -node current glob syncStream 0m0.621s 100000 -~~ async ~~ -node fast-glob async 0m0.322s 100000 -node globby async 0m0.404s 100000 -node current glob async mjs 0m0.360s 100000 -node current glob stream 0m0.352s 100000 -``` diff --git a/deps/npm/node_modules/glob/dist/cjs/src/glob.js b/deps/npm/node_modules/glob/dist/cjs/glob.js similarity index 99% rename from deps/npm/node_modules/glob/dist/cjs/src/glob.js rename to deps/npm/node_modules/glob/dist/cjs/glob.js index a05d9f0eb39637..5e1d25ed4b33d0 100644 --- a/deps/npm/node_modules/glob/dist/cjs/src/glob.js +++ b/deps/npm/node_modules/glob/dist/cjs/glob.js @@ -144,7 +144,6 @@ class Glob { optimizationLevel: 2, platform: this.platform, windowsPathsNoEscape: this.windowsPathsNoEscape, - debug: !!this.opts.debug, }; const mms = this.pattern.map(p => new minimatch_1.Minimatch(p, mmo)); const [matchSet, globParts] = mms.reduce((set, m) => { diff --git a/deps/npm/node_modules/glob/dist/cjs/src/has-magic.js b/deps/npm/node_modules/glob/dist/cjs/has-magic.js similarity index 100% rename from deps/npm/node_modules/glob/dist/cjs/src/has-magic.js rename to deps/npm/node_modules/glob/dist/cjs/has-magic.js diff --git a/deps/npm/node_modules/glob/dist/cjs/src/ignore.js b/deps/npm/node_modules/glob/dist/cjs/ignore.js similarity index 100% rename from deps/npm/node_modules/glob/dist/cjs/src/ignore.js rename to deps/npm/node_modules/glob/dist/cjs/ignore.js diff --git a/deps/npm/node_modules/glob/dist/cjs/index-cjs.js b/deps/npm/node_modules/glob/dist/cjs/index-cjs.js new file mode 100644 index 00000000000000..e2b324783e8076 --- /dev/null +++ b/deps/npm/node_modules/glob/dist/cjs/index-cjs.js @@ -0,0 +1,7 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +const index_js_1 = __importDefault(require("./index.js")); +module.exports = Object.assign(index_js_1.default, { default: index_js_1.default, glob: index_js_1.default }); +//# sourceMappingURL=index-cjs.js.map \ No newline at end of file diff --git a/deps/npm/node_modules/glob/dist/cjs/src/index.js b/deps/npm/node_modules/glob/dist/cjs/index.js similarity index 86% rename from deps/npm/node_modules/glob/dist/cjs/src/index.js rename to deps/npm/node_modules/glob/dist/cjs/index.js index 71c31c03dd339b..0b6842da937af4 100644 --- a/deps/npm/node_modules/glob/dist/cjs/src/index.js +++ b/deps/npm/node_modules/glob/dist/cjs/index.js @@ -1,6 +1,6 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.glob = exports.hasMagic = exports.Glob = exports.unescape = exports.escape = exports.sync = exports.iterate = exports.iterateSync = exports.stream = exports.streamSync = exports.globIterate = exports.globIterateSync = exports.globSync = exports.globStream = exports.globStreamSync = void 0; +exports.hasMagic = exports.Glob = exports.unescape = exports.escape = exports.sync = exports.iterate = exports.iterateSync = exports.stream = exports.streamSync = exports.globIterate = exports.globIterateSync = exports.glob = exports.globSync = exports.globStream = exports.globStreamSync = void 0; const minimatch_1 = require("minimatch"); const glob_js_1 = require("./glob.js"); const has_magic_js_1 = require("./has-magic.js"); @@ -16,9 +16,10 @@ function globSync(pattern, options = {}) { return new glob_js_1.Glob(pattern, options).walkSync(); } exports.globSync = globSync; -async function glob_(pattern, options = {}) { +async function glob(pattern, options = {}) { return new glob_js_1.Glob(pattern, options).walk(); } +exports.glob = glob; function globIterateSync(pattern, options = {}) { return new glob_js_1.Glob(pattern, options).iterateSync(); } @@ -47,8 +48,8 @@ Object.defineProperty(exports, "Glob", { enumerable: true, get: function () { re var has_magic_js_2 = require("./has-magic.js"); Object.defineProperty(exports, "hasMagic", { enumerable: true, get: function () { return has_magic_js_2.hasMagic; } }); /* c8 ignore stop */ -exports.glob = Object.assign(glob_, { - glob: glob_, +exports.default = Object.assign(glob, { + glob, globSync, sync: exports.sync, globStream, @@ -64,5 +65,4 @@ exports.glob = Object.assign(glob_, { escape: minimatch_1.escape, unescape: minimatch_1.unescape, }); -exports.glob.glob = exports.glob; //# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/deps/npm/node_modules/glob/dist/cjs/package.json b/deps/npm/node_modules/glob/dist/cjs/package.json index e225638de741d7..5bbefffbabee39 100644 --- a/deps/npm/node_modules/glob/dist/cjs/package.json +++ b/deps/npm/node_modules/glob/dist/cjs/package.json @@ -1,99 +1,3 @@ { - "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", - "bin": "./dist/cjs/src/bin.js", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/node-glob.git" - }, - "main": "./dist/cjs/src/index.js", - "module": "./dist/mjs/index.js", - "types": "./dist/mjs/index.d.ts", - "exports": { - ".": { - "import": { - "types": "./dist/mjs/index.d.ts", - "default": "./dist/mjs/index.js" - }, - "require": { - "types": "./dist/cjs/src/index.d.ts", - "default": "./dist/cjs/src/index.js" - } - } - }, - "files": [ - "dist" - ], - "scripts": { - "preversion": "npm test", - "postversion": "npm publish", - "prepublishOnly": "git push origin --follow-tags", - "preprepare": "rm -rf dist", - "prepare": "tsc -p tsconfig.json && tsc -p tsconfig-esm.json", - "postprepare": "bash fixup.sh", - "pretest": "npm run prepare", - "presnap": "npm run prepare", - "test": "c8 tap", - "snap": "c8 tap", - "format": "prettier --write . --loglevel warn", - "typedoc": "typedoc --tsconfig tsconfig-esm.json ./src/*.ts", - "prepublish": "npm run benchclean", - "profclean": "rm -f v8.log profile.txt", - "test-regen": "npm run profclean && TEST_REGEN=1 node --no-warnings --loader ts-node/esm test/00-setup.ts", - "prebench": "npm run prepare", - "bench": "bash benchmark.sh", - "preprof": "npm run prepare", - "prof": "bash prof.sh", - "benchclean": "node benchclean.js" - }, - "prettier": { - "semi": false, - "printWidth": 75, - "tabWidth": 2, - "useTabs": false, - "singleQuote": true, - "jsxSingleQuote": false, - "bracketSameLine": true, - "arrowParens": "avoid", - "endOfLine": "lf" - }, - "dependencies": { - "foreground-child": "^3.1.0", - "jackspeak": "^2.0.3", - "minimatch": "^9.0.0", - "minipass": "^5.0.0", - "path-scurry": "^1.7.0" - }, - "devDependencies": { - "@types/node": "^18.11.18", - "@types/tap": "^15.0.7", - "c8": "^7.12.0", - "memfs": "^3.4.13", - "mkdirp": "^2.1.4", - "prettier": "^2.8.3", - "rimraf": "^4.1.3", - "tap": "^16.3.4", - "ts-node": "^10.9.1", - "typedoc": "^0.23.24", - "typescript": "^4.9.4" - }, - "tap": { - "before": "test/00-setup.ts", - "coverage": false, - "node-arg": [ - "--no-warnings", - "--loader", - "ts-node/esm" - ], - "ts": false - }, - "license": "ISC", - "funding": { - "url": "https://github.com/sponsors/isaacs" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - } + "type": "commonjs" } diff --git a/deps/npm/node_modules/glob/dist/cjs/src/pattern.js b/deps/npm/node_modules/glob/dist/cjs/pattern.js similarity index 100% rename from deps/npm/node_modules/glob/dist/cjs/src/pattern.js rename to deps/npm/node_modules/glob/dist/cjs/pattern.js diff --git a/deps/npm/node_modules/glob/dist/cjs/src/processor.js b/deps/npm/node_modules/glob/dist/cjs/processor.js similarity index 100% rename from deps/npm/node_modules/glob/dist/cjs/src/processor.js rename to deps/npm/node_modules/glob/dist/cjs/processor.js diff --git a/deps/npm/node_modules/glob/dist/cjs/src/bin.d.ts b/deps/npm/node_modules/glob/dist/cjs/src/bin.d.ts deleted file mode 100644 index 34e005228653c8..00000000000000 --- a/deps/npm/node_modules/glob/dist/cjs/src/bin.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env node -export {}; -//# sourceMappingURL=bin.d.ts.map \ No newline at end of file diff --git a/deps/npm/node_modules/glob/dist/cjs/src/bin.d.ts.map b/deps/npm/node_modules/glob/dist/cjs/src/bin.d.ts.map deleted file mode 100644 index c10c656ec75109..00000000000000 --- a/deps/npm/node_modules/glob/dist/cjs/src/bin.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"bin.d.ts","sourceRoot":"","sources":["../../../src/bin.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/deps/npm/node_modules/glob/dist/cjs/src/bin.js b/deps/npm/node_modules/glob/dist/cjs/src/bin.js deleted file mode 100755 index 733358c7365be8..00000000000000 --- a/deps/npm/node_modules/glob/dist/cjs/src/bin.js +++ /dev/null @@ -1,260 +0,0 @@ -#!/usr/bin/env node -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const foreground_child_1 = require("foreground-child"); -const fs_1 = require("fs"); -const jackspeak_1 = require("jackspeak"); -const index_js_1 = require("./index.js"); -const package_json_1 = require("../package.json"); -const j = (0, jackspeak_1.jack)({ - usage: 'glob [options] [ [ ...]]' -}) - .description(` - Glob v${package_json_1.version} - - Expand the positional glob expression arguments into any matching file - system paths found. - `) - .opt({ - cmd: { - short: 'c', - hint: 'command', - description: `Run the command provided, passing the glob expression - matches as arguments.`, - }, -}) - .flag({ - all: { - short: 'A', - description: `By default, the glob cli command will not expand any - arguments that are an exact match to a file on disk. - - This prevents double-expanding, in case the shell expands - an argument whose filename is a glob expression. - - For example, if 'app/*.ts' would match 'app/[id].ts', then - on Windows powershell or cmd.exe, 'glob app/*.ts' will - expand to 'app/[id].ts', as expected. However, in posix - shells such as bash or zsh, the shell will first expand - 'app/*.ts' to a list of filenames. Then glob will look - for a file matching 'app/[id].ts' (ie, 'app/i.ts' or - 'app/d.ts'), which is unexpected. - - Setting '--all' prevents this behavior, causing glob - to treat ALL patterns as glob expressions to be expanded, - even if they are an exact match to a file on disk. - - When setting this option, be sure to enquote arguments - so that the shell will not expand them prior to passing - them to the glob command process. - `, - }, - absolute: { - short: 'a', - description: 'Expand to absolute paths', - }, - 'dot-relative': { - short: 'd', - description: `Prepend './' on relative matches`, - }, - mark: { - short: 'm', - description: `Append a / on any directories matched`, - }, - posix: { - short: 'x', - description: `Always resolve to posix style paths, using '/' as the - directory separator, even on Windows. Drive letter - absolute matches on Windows will be expanded to their - full resolved UNC maths, eg instead of 'C:\\foo\\bar', - it will expand to '//?/C:/foo/bar'. - `, - }, - follow: { - short: 'f', - description: `Follow symlinked directories when expanding '**'`, - }, - realpath: { - short: 'R', - description: `Call 'fs.realpath' on all of the results. In the case - of an entry that cannot be resolved, the entry is - omitted. This incurs a slight performance penalty, of - course, because of the added system calls.`, - }, - stat: { - short: 's', - description: `Call 'fs.lstat' on all entries, whether required or not - to determine if it's a valid match.`, - }, - 'match-base': { - short: 'b', - description: `Perform a basename-only match if the pattern does not - contain any slash characters. That is, '*.js' would be - treated as equivalent to '**/*.js', matching js files - in all directories. - `, - }, - dot: { - description: `Allow patterns to match files/directories that start - with '.', even if the pattern does not start with '.' - `, - }, - nobrace: { - description: 'Do not expand {...} patterns', - }, - nocase: { - description: `Perform a case-insensitive match. This defaults to - 'true' on macOS and Windows platforms, and false on - all others. - - Note: 'nocase' should only be explicitly set when it is - known that the filesystem's case sensitivity differs - from the platform default. If set 'true' on - case-insensitive file systems, then the walk may return - more or less results than expected. - `, - }, - nodir: { - description: `Do not match directories, only files. - - Note: to *only* match directories, append a '/' at the - end of the pattern. - `, - }, - noext: { - description: `Do not expand extglob patterns, such as '+(a|b)'`, - }, - noglobstar: { - description: `Do not expand '**' against multiple path portions. - Ie, treat it as a normal '*' instead.`, - }, - 'windows-path-no-escape': { - description: `Use '\\' as a path separator *only*, and *never* as an - escape character. If set, all '\\' characters are - replaced with '/' in the pattern.`, - }, -}) - .num({ - 'max-depth': { - short: 'D', - description: `Maximum depth to traverse from the current - working directory`, - }, -}) - .opt({ - cwd: { - short: 'C', - description: 'Current working directory to execute/match in', - default: process.cwd(), - }, - root: { - short: 'r', - description: `A string path resolved against the 'cwd', which is - used as the starting point for absolute patterns that - start with '/' (but not drive letters or UNC paths - on Windows). - - Note that this *doesn't* necessarily limit the walk to - the 'root' directory, and doesn't affect the cwd - starting point for non-absolute patterns. A pattern - containing '..' will still be able to traverse out of - the root directory, if it is not an actual root directory - on the filesystem, and any non-absolute patterns will - still be matched in the 'cwd'. - - To start absolute and non-absolute patterns in the same - path, you can use '--root=' to set it to the empty - string. However, be aware that on Windows systems, a - pattern like 'x:/*' or '//host/share/*' will *always* - start in the 'x:/' or '//host/share/' directory, - regardless of the --root setting. - `, - }, - platform: { - description: `Defaults to the value of 'process.platform' if - available, or 'linux' if not. Setting --platform=win32 - on non-Windows systems may cause strange behavior!`, - validate: v => new Set([ - 'aix', - 'android', - 'darwin', - 'freebsd', - 'haiku', - 'linux', - 'openbsd', - 'sunos', - 'win32', - 'cygwin', - 'netbsd', - ]).has(v), - }, -}) - .optList({ - ignore: { - short: 'i', - description: `Glob patterns to ignore`, - }, -}) - .flag({ - debug: { - short: 'v', - description: `Output a huge amount of noisy debug information about - patterns as they are parsed and used to match files.`, - }, -}) - .flag({ - help: { - short: 'h', - description: 'Show this usage information', - }, -}); -try { - const { positionals, values } = j.parse(); - if (values.help) { - console.log(j.usage()); - process.exit(0); - } - if (positionals.length === 0) - throw 'No patterns provided'; - const patterns = values.all - ? positionals - : positionals.filter(p => !(0, fs_1.existsSync)(p)); - const matches = values.all ? [] : positionals.filter(p => (0, fs_1.existsSync)(p)); - const stream = (0, index_js_1.globStream)(patterns, { - absolute: values.absolute, - cwd: values.cwd, - dot: values.dot, - dotRelative: values['dot-relative'], - follow: values.follow, - ignore: values.ignore, - mark: values.mark, - matchBase: values['match-base'], - maxDepth: values['max-depth'], - nobrace: values.nobrace, - nocase: values.nocase, - nodir: values.nodir, - noext: values.noext, - noglobstar: values.noglobstar, - platform: values.platform, - realpath: values.realpath, - root: values.root, - stat: values.stat, - debug: values.debug, - posix: values.posix, - }); - const cmd = values.cmd; - if (!cmd) { - matches.forEach(m => console.log(m)); - stream.on('data', f => console.log(f)); - } - else { - stream.on('data', f => matches.push(f)); - stream.on('end', () => (0, foreground_child_1.foregroundChild)(cmd, matches, { shell: true })); - } -} -catch (e) { - console.error(j.usage()); - console.error(e instanceof Error ? e.message : String(e)); - process.exit(1); -} -//# sourceMappingURL=bin.js.map \ No newline at end of file diff --git a/deps/npm/node_modules/glob/dist/cjs/src/bin.js.map b/deps/npm/node_modules/glob/dist/cjs/src/bin.js.map deleted file mode 100644 index abd2aa47d82d3c..00000000000000 --- a/deps/npm/node_modules/glob/dist/cjs/src/bin.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"bin.js","sourceRoot":"","sources":["../../../src/bin.ts"],"names":[],"mappings":";;;AACA,uDAAkD;AAClD,2BAA+B;AAC/B,yCAAgC;AAChC,yCAAuC;AACvC,kDAAyC;AAEzC,MAAM,CAAC,GAAG,IAAA,gBAAI,EAAC;IACb,KAAK,EAAE,4CAA4C;CACpD,CAAC;KACC,WAAW,CACV;YACQ,sBAAO;;;;GAIhB,CACA;KACA,GAAG,CAAC;IACH,GAAG,EAAE;QACH,KAAK,EAAE,GAAG;QACV,IAAI,EAAE,SAAS;QACf,WAAW,EAAE;0CACuB;KACrC;CACF,CAAC;KACD,IAAI,CAAC;IACJ,GAAG,EAAE;QACH,KAAK,EAAE,GAAG;QACV,WAAW,EAAE;;;;;;;;;;;;;;;;;;;;;OAqBZ;KACF;IACD,QAAQ,EAAE;QACR,KAAK,EAAE,GAAG;QACV,WAAW,EAAE,0BAA0B;KACxC;IACD,cAAc,EAAE;QACd,KAAK,EAAE,GAAG;QACV,WAAW,EAAE,kCAAkC;KAChD;IACD,IAAI,EAAE;QACJ,KAAK,EAAE,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KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,CAAA;KACvE;CACF;AAAC,OAAO,CAAC,EAAE;IACV,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,CAAA;IACxB,OAAO,CAAC,KAAK,CAAC,CAAC,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAA;IACzD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;CAChB","sourcesContent":["#!/usr/bin/env node\nimport { foregroundChild } from 'foreground-child'\nimport { existsSync } from 'fs'\nimport { jack } from 'jackspeak'\nimport { globStream } from './index.js'\nimport { version } from '../package.json'\n\nconst j = jack({\n usage: 'glob [options] [ [ ...]]'\n})\n .description(\n `\n Glob v${version}\n\n Expand the positional glob expression arguments into any matching file\n system paths found.\n `\n )\n .opt({\n cmd: {\n short: 'c',\n hint: 'command',\n description: `Run the command provided, passing the glob expression\n matches as arguments.`,\n },\n })\n .flag({\n all: {\n short: 'A',\n description: `By default, the glob cli command will not expand any\n arguments that are an exact match to a file on disk.\n\n This prevents double-expanding, in case the shell expands\n an argument whose filename is a glob expression.\n\n For example, if 'app/*.ts' would match 'app/[id].ts', then\n on Windows powershell or cmd.exe, 'glob app/*.ts' will\n expand to 'app/[id].ts', as expected. However, in posix\n shells such as bash or zsh, the shell will first expand\n 'app/*.ts' to a list of filenames. Then glob will look\n for a file matching 'app/[id].ts' (ie, 'app/i.ts' or\n 'app/d.ts'), which is unexpected.\n\n Setting '--all' prevents this behavior, causing glob\n to treat ALL patterns as glob expressions to be expanded,\n even if they are an exact match to a file on disk.\n\n When setting this option, be sure to enquote arguments\n so that the shell will not expand them prior to passing\n them to the glob command process.\n `,\n },\n absolute: {\n short: 'a',\n description: 'Expand to absolute paths',\n },\n 'dot-relative': {\n short: 'd',\n description: `Prepend './' on relative matches`,\n },\n mark: {\n short: 'm',\n description: `Append a / on any directories matched`,\n },\n posix: {\n short: 'x',\n description: `Always resolve to posix style paths, using '/' as the\n directory separator, even on Windows. Drive letter\n absolute matches on Windows will be expanded to their\n full resolved UNC maths, eg instead of 'C:\\\\foo\\\\bar',\n it will expand to '//?/C:/foo/bar'.\n `,\n },\n\n follow: {\n short: 'f',\n description: `Follow symlinked directories when expanding '**'`,\n },\n realpath: {\n short: 'R',\n description: `Call 'fs.realpath' on all of the results. In the case\n of an entry that cannot be resolved, the entry is\n omitted. This incurs a slight performance penalty, of\n course, because of the added system calls.`,\n },\n stat: {\n short: 's',\n description: `Call 'fs.lstat' on all entries, whether required or not\n to determine if it's a valid match.`,\n },\n 'match-base': {\n short: 'b',\n description: `Perform a basename-only match if the pattern does not\n contain any slash characters. That is, '*.js' would be\n treated as equivalent to '**/*.js', matching js files\n in all directories.\n `,\n },\n\n dot: {\n description: `Allow patterns to match files/directories that start\n with '.', even if the pattern does not start with '.'\n `,\n },\n nobrace: {\n description: 'Do not expand {...} patterns',\n },\n nocase: {\n description: `Perform a case-insensitive match. This defaults to\n 'true' on macOS and Windows platforms, and false on\n all others.\n\n Note: 'nocase' should only be explicitly set when it is\n known that the filesystem's case sensitivity differs\n from the platform default. If set 'true' on\n case-insensitive file systems, then the walk may return\n more or less results than expected.\n `,\n },\n nodir: {\n description: `Do not match directories, only files.\n\n Note: to *only* match directories, append a '/' at the\n end of the pattern.\n `,\n },\n noext: {\n description: `Do not expand extglob patterns, such as '+(a|b)'`,\n },\n noglobstar: {\n description: `Do not expand '**' against multiple path portions.\n Ie, treat it as a normal '*' instead.`,\n },\n 'windows-path-no-escape': {\n description: `Use '\\\\' as a path separator *only*, and *never* as an\n escape character. If set, all '\\\\' characters are\n replaced with '/' in the pattern.`,\n },\n })\n .num({\n 'max-depth': {\n short: 'D',\n description: `Maximum depth to traverse from the current\n working directory`,\n },\n })\n .opt({\n cwd: {\n short: 'C',\n description: 'Current working directory to execute/match in',\n default: process.cwd(),\n },\n root: {\n short: 'r',\n description: `A string path resolved against the 'cwd', which is\n used as the starting point for absolute patterns that\n start with '/' (but not drive letters or UNC paths\n on Windows).\n\n Note that this *doesn't* necessarily limit the walk to\n the 'root' directory, and doesn't affect the cwd\n starting point for non-absolute patterns. A pattern\n containing '..' will still be able to traverse out of\n the root directory, if it is not an actual root directory\n on the filesystem, and any non-absolute patterns will\n still be matched in the 'cwd'.\n\n To start absolute and non-absolute patterns in the same\n path, you can use '--root=' to set it to the empty\n string. However, be aware that on Windows systems, a\n pattern like 'x:/*' or '//host/share/*' will *always*\n start in the 'x:/' or '//host/share/' directory,\n regardless of the --root setting.\n `,\n },\n platform: {\n description: `Defaults to the value of 'process.platform' if\n available, or 'linux' if not. Setting --platform=win32\n on non-Windows systems may cause strange behavior!`,\n validate: v =>\n new Set([\n 'aix',\n 'android',\n 'darwin',\n 'freebsd',\n 'haiku',\n 'linux',\n 'openbsd',\n 'sunos',\n 'win32',\n 'cygwin',\n 'netbsd',\n ]).has(v),\n },\n })\n .optList({\n ignore: {\n short: 'i',\n description: `Glob patterns to ignore`,\n },\n })\n .flag({\n debug: {\n short: 'v',\n description: `Output a huge amount of noisy debug information about\n patterns as they are parsed and used to match files.`,\n },\n })\n .flag({\n help: {\n short: 'h',\n description: 'Show this usage information',\n },\n })\n\ntry {\n const { positionals, values } = j.parse()\n if (values.help) {\n console.log(j.usage())\n process.exit(0)\n }\n if (positionals.length === 0) throw 'No patterns provided'\n const patterns = values.all\n ? positionals\n : positionals.filter(p => !existsSync(p))\n const matches = values.all ? [] : positionals.filter(p => existsSync(p))\n const stream = globStream(patterns, {\n absolute: values.absolute,\n cwd: values.cwd,\n dot: values.dot,\n dotRelative: values['dot-relative'],\n follow: values.follow,\n ignore: values.ignore,\n mark: values.mark,\n matchBase: values['match-base'],\n maxDepth: values['max-depth'],\n nobrace: values.nobrace,\n nocase: values.nocase,\n nodir: values.nodir,\n noext: values.noext,\n noglobstar: values.noglobstar,\n platform: values.platform as undefined | NodeJS.Platform,\n realpath: values.realpath,\n root: values.root,\n stat: values.stat,\n debug: values.debug,\n posix: values.posix,\n })\n\n const cmd = values.cmd\n if (!cmd) {\n matches.forEach(m => console.log(m))\n stream.on('data', f => console.log(f))\n } else {\n stream.on('data', f => matches.push(f))\n stream.on('end', () => foregroundChild(cmd, matches, { shell: true }))\n }\n} catch (e) {\n console.error(j.usage())\n console.error(e instanceof Error ? e.message : String(e))\n process.exit(1)\n}\n"]} \ No newline at end of file diff --git a/deps/npm/node_modules/glob/dist/cjs/src/glob.d.ts b/deps/npm/node_modules/glob/dist/cjs/src/glob.d.ts deleted file mode 100644 index a8b3da7722b652..00000000000000 --- a/deps/npm/node_modules/glob/dist/cjs/src/glob.d.ts +++ /dev/null @@ -1,344 +0,0 @@ -/// -import { Minimatch } from 'minimatch'; -import { Minipass } from 'minipass'; -import { FSOption, Path, PathScurry } from 'path-scurry'; -import { IgnoreLike } from './ignore.js'; -import { Pattern } from './pattern.js'; -export type MatchSet = Minimatch['set']; -export type GlobParts = Exclude; -/** - * A `GlobOptions` object may be provided to any of the exported methods, and - * must be provided to the `Glob` constructor. - * - * All options are optional, boolean, and false by default, unless otherwise - * noted. - * - * All resolved options are added to the Glob object as properties. - * - * If you are running many `glob` operations, you can pass a Glob object as the - * `options` argument to a subsequent operation to share the previously loaded - * cache. - */ -export interface GlobOptions { - /** - * Set to `true` to always receive absolute paths for - * matched files. Set to `false` to always return relative paths. - * - * When this option is not set, absolute paths are returned for patterns - * that are absolute, and otherwise paths are returned that are relative - * to the `cwd` setting. - * - * This does _not_ make an extra system call to get - * the realpath, it only does string path resolution. - * - * Conflicts with {@link withFileTypes} - */ - absolute?: boolean; - /** - * Set to false to enable {@link windowsPathsNoEscape} - * - * @deprecated - */ - allowWindowsEscape?: boolean; - /** - * The current working directory in which to search. Defaults to - * `process.cwd()`. - * - * May be eiher a string path or a `file://` URL object or string. - */ - cwd?: string | URL; - /** - * Include `.dot` files in normal matches and `globstar` - * matches. Note that an explicit dot in a portion of the pattern - * will always match dot files. - */ - dot?: boolean; - /** - * Prepend all relative path strings with `./` (or `.\` on Windows). - * - * Without this option, returned relative paths are "bare", so instead of - * returning `'./foo/bar'`, they are returned as `'foo/bar'`. - * - * Relative patterns starting with `'../'` are not prepended with `./`, even - * if this option is set. - */ - dotRelative?: boolean; - /** - * Follow symlinked directories when expanding `**` - * patterns. This can result in a lot of duplicate references in - * the presence of cyclic links, and make performance quite bad. - * - * By default, a `**` in a pattern will follow 1 symbolic link if - * it is not the first item in the pattern, or none if it is the - * first item in the pattern, following the same behavior as Bash. - */ - follow?: boolean; - /** - * string or string[], or an object with `ignore` and `ignoreChildren` - * methods. - * - * If a string or string[] is provided, then this is treated as a glob - * pattern or array of glob patterns to exclude from matches. To ignore all - * children within a directory, as well as the entry itself, append `'/**'` - * to the ignore pattern. - * - * **Note** `ignore` patterns are _always_ in `dot:true` mode, regardless of - * any other settings. - * - * If an object is provided that has `ignored(path)` and/or - * `childrenIgnored(path)` methods, then these methods will be called to - * determine whether any Path is a match or if its children should be - * traversed, respectively. - */ - ignore?: string | string[] | IgnoreLike; - /** - * Treat brace expansion like `{a,b}` as a "magic" pattern. Has no - * effect if {@link nobrace} is set. - * - * Only has effect on the {@link hasMagic} function. - */ - magicalBraces?: boolean; - /** - * Add a `/` character to directory matches. Note that this requires - * additional stat calls in some cases. - */ - mark?: boolean; - /** - * Perform a basename-only match if the pattern does not contain any slash - * characters. That is, `*.js` would be treated as equivalent to - * `**\/*.js`, matching all js files in all directories. - */ - matchBase?: boolean; - /** - * Limit the directory traversal to a given depth below the cwd. - * Note that this does NOT prevent traversal to sibling folders, - * root patterns, and so on. It only limits the maximum folder depth - * that the walk will descend, relative to the cwd. - */ - maxDepth?: number; - /** - * Do not expand `{a,b}` and `{1..3}` brace sets. - */ - nobrace?: boolean; - /** - * Perform a case-insensitive match. This defaults to `true` on macOS and - * Windows systems, and `false` on all others. - * - * **Note** `nocase` should only be explicitly set when it is - * known that the filesystem's case sensitivity differs from the - * platform default. If set `true` on case-sensitive file - * systems, or `false` on case-insensitive file systems, then the - * walk may return more or less results than expected. - */ - nocase?: boolean; - /** - * Do not match directories, only files. (Note: to match - * _only_ directories, put a `/` at the end of the pattern.) - */ - nodir?: boolean; - /** - * Do not match "extglob" patterns such as `+(a|b)`. - */ - noext?: boolean; - /** - * Do not match `**` against multiple filenames. (Ie, treat it as a normal - * `*` instead.) - * - * Conflicts with {@link matchBase} - */ - noglobstar?: boolean; - /** - * Defaults to value of `process.platform` if available, or `'linux'` if - * not. Setting `platform:'win32'` on non-Windows systems may cause strange - * behavior. - */ - platform?: NodeJS.Platform; - /** - * Set to true to call `fs.realpath` on all of the - * results. In the case of an entry that cannot be resolved, the - * entry is omitted. This incurs a slight performance penalty, of - * course, because of the added system calls. - */ - realpath?: boolean; - /** - * - * A string path resolved against the `cwd` option, which - * is used as the starting point for absolute patterns that start - * with `/`, (but not drive letters or UNC paths on Windows). - * - * Note that this _doesn't_ necessarily limit the walk to the - * `root` directory, and doesn't affect the cwd starting point for - * non-absolute patterns. A pattern containing `..` will still be - * able to traverse out of the root directory, if it is not an - * actual root directory on the filesystem, and any non-absolute - * patterns will be matched in the `cwd`. For example, the - * pattern `/../*` with `{root:'/some/path'}` will return all - * files in `/some`, not all files in `/some/path`. The pattern - * `*` with `{root:'/some/path'}` will return all the entries in - * the cwd, not the entries in `/some/path`. - * - * To start absolute and non-absolute patterns in the same - * path, you can use `{root:''}`. However, be aware that on - * Windows systems, a pattern like `x:/*` or `//host/share/*` will - * _always_ start in the `x:/` or `//host/share` directory, - * regardless of the `root` setting. - */ - root?: string; - /** - * A [PathScurry](http://npm.im/path-scurry) object used - * to traverse the file system. If the `nocase` option is set - * explicitly, then any provided `scurry` object must match this - * setting. - */ - scurry?: PathScurry; - /** - * Call `lstat()` on all entries, whether required or not to determine - * if it's a valid match. When used with {@link withFileTypes}, this means - * that matches will include data such as modified time, permissions, and - * so on. Note that this will incur a performance cost due to the added - * system calls. - */ - stat?: boolean; - /** - * An AbortSignal which will cancel the Glob walk when - * triggered. - */ - signal?: AbortSignal; - /** - * Use `\\` as a path separator _only_, and - * _never_ as an escape character. If set, all `\\` characters are - * replaced with `/` in the pattern. - * - * Note that this makes it **impossible** to match against paths - * containing literal glob pattern characters, but allows matching - * with patterns constructed using `path.join()` and - * `path.resolve()` on Windows platforms, mimicking the (buggy!) - * behavior of Glob v7 and before on Windows. Please use with - * caution, and be mindful of [the caveat below about Windows - * paths](#windows). (For legacy reasons, this is also set if - * `allowWindowsEscape` is set to the exact value `false`.) - */ - windowsPathsNoEscape?: boolean; - /** - * Return [PathScurry](http://npm.im/path-scurry) - * `Path` objects instead of strings. These are similar to a - * NodeJS `Dirent` object, but with additional methods and - * properties. - * - * Conflicts with {@link absolute} - */ - withFileTypes?: boolean; - /** - * An fs implementation to override some or all of the defaults. See - * http://npm.im/path-scurry for details about what can be overridden. - */ - fs?: FSOption; - /** - * Just passed along to Minimatch. Note that this makes all pattern - * matching operations slower and *extremely* noisy. - */ - debug?: boolean; - /** - * Return `/` delimited paths, even on Windows. - * - * On posix systems, this has no effect. But, on Windows, it means that - * paths will be `/` delimited, and absolute paths will be their full - * resolved UNC forms, eg instead of `'C:\\foo\\bar'`, it would return - * `'//?/C:/foo/bar'` - */ - posix?: boolean; -} -export type GlobOptionsWithFileTypesTrue = GlobOptions & { - withFileTypes: true; - absolute?: undefined; - mark?: undefined; - posix?: undefined; -}; -export type GlobOptionsWithFileTypesFalse = GlobOptions & { - withFileTypes?: false; -}; -export type GlobOptionsWithFileTypesUnset = GlobOptions & { - withFileTypes?: undefined; -}; -export type Result = Opts extends GlobOptionsWithFileTypesTrue ? Path : Opts extends GlobOptionsWithFileTypesFalse ? string : Opts extends GlobOptionsWithFileTypesUnset ? string : string | Path; -export type Results = Result[]; -export type FileTypes = Opts extends GlobOptionsWithFileTypesTrue ? true : Opts extends GlobOptionsWithFileTypesFalse ? false : Opts extends GlobOptionsWithFileTypesUnset ? false : boolean; -/** - * An object that can perform glob pattern traversals. - */ -export declare class Glob implements GlobOptions { - absolute?: boolean; - cwd: string; - root?: string; - dot: boolean; - dotRelative: boolean; - follow: boolean; - ignore?: string | string[] | IgnoreLike; - magicalBraces: boolean; - mark?: boolean; - matchBase: boolean; - maxDepth: number; - nobrace: boolean; - nocase: boolean; - nodir: boolean; - noext: boolean; - noglobstar: boolean; - pattern: string[]; - platform: NodeJS.Platform; - realpath: boolean; - scurry: PathScurry; - stat: boolean; - signal?: AbortSignal; - windowsPathsNoEscape: boolean; - withFileTypes: FileTypes; - /** - * The options provided to the constructor. - */ - opts: Opts; - /** - * An array of parsed immutable {@link Pattern} objects. - */ - patterns: Pattern[]; - /** - * All options are stored as properties on the `Glob` object. - * - * See {@link GlobOptions} for full options descriptions. - * - * Note that a previous `Glob` object can be passed as the - * `GlobOptions` to another `Glob` instantiation to re-use settings - * and caches with a new pattern. - * - * Traversal functions can be called multiple times to run the walk - * again. - */ - constructor(pattern: string | string[], opts: Opts); - /** - * Returns a Promise that resolves to the results array. - */ - walk(): Promise>; - /** - * synchronous {@link Glob.walk} - */ - walkSync(): Results; - /** - * Stream results asynchronously. - */ - stream(): Minipass, Result>; - /** - * Stream results synchronously. - */ - streamSync(): Minipass, Result>; - /** - * Default sync iteration function. Returns a Generator that - * iterates over the results. - */ - iterateSync(): Generator, void, void>; - [Symbol.iterator](): Generator, void, void>; - /** - * Default async iteration function. Returns an AsyncGenerator that - * iterates over the results. - */ - iterate(): AsyncGenerator, void, void>; - [Symbol.asyncIterator](): AsyncGenerator, void, void>; -} -//# sourceMappingURL=glob.d.ts.map \ No newline at end of file diff --git a/deps/npm/node_modules/glob/dist/cjs/src/glob.d.ts.map b/deps/npm/node_modules/glob/dist/cjs/src/glob.d.ts.map deleted file mode 100644 index bd44bbf49d5949..00000000000000 --- a/deps/npm/node_modules/glob/dist/cjs/src/glob.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"glob.d.ts","sourceRoot":"","sources":["../../../src/glob.ts"],"names":[],"mappings":";AAAA,OAAO,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9B;;OAEG;IACH,IAAI,EAAE,IAAI,CAAA;IAEV;;OAEG;IACH,QAAQ,EAAE,OAAO,EAAE,CAAA;IAEnB;;;;;;;;;;;OAWG;gBACS,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,IAAI,EAAE,IAAI;IA8GlD;;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/cjs/src/glob.js.map b/deps/npm/node_modules/glob/dist/cjs/src/glob.js.map deleted file mode 100644 index aae70b0e4479f3..00000000000000 --- a/deps/npm/node_modules/glob/dist/cjs/src/glob.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"glob.js","sourceRoot":"","sources":["../../../src/glob.ts"],"names":[],"mappings":";;;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,OA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AAC,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 diff --git a/deps/npm/node_modules/glob/dist/cjs/src/has-magic.d.ts b/deps/npm/node_modules/glob/dist/cjs/src/has-magic.d.ts deleted file mode 100644 index 8aec3bd9725175..00000000000000 --- a/deps/npm/node_modules/glob/dist/cjs/src/has-magic.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { GlobOptions } from './glob.js'; -/** - * Return true if the patterns provided contain any magic glob characters, - * given the options provided. - * - * Brace expansion is not considered "magic" unless the `magicalBraces` option - * is set, as brace expansion just turns one string into an array of strings. - * So a pattern like `'x{a,b}y'` would return `false`, because `'xay'` and - * `'xby'` both do not contain any magic glob characters, and it's treated the - * same as if you had called it on `['xay', 'xby']`. When `magicalBraces:true` - * is in the options, brace expansion _is_ treated as a pattern having magic. - */ -export declare const hasMagic: (pattern: string | string[], options?: GlobOptions) => boolean; -//# sourceMappingURL=has-magic.d.ts.map \ No newline at end of file diff --git a/deps/npm/node_modules/glob/dist/cjs/src/has-magic.d.ts.map b/deps/npm/node_modules/glob/dist/cjs/src/has-magic.d.ts.map deleted file mode 100644 index dd5053f80b44c3..00000000000000 --- a/deps/npm/node_modules/glob/dist/cjs/src/has-magic.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"has-magic.d.ts","sourceRoot":"","sources":["../../../src/has-magic.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AAEvC;;;;;;;;;;GAUG;AACH,eAAO,MAAM,QAAQ,YACV,MAAM,GAAG,MAAM,EAAE,YACjB,WAAW,KACnB,OAQF,CAAA"} \ No newline at end of file diff --git a/deps/npm/node_modules/glob/dist/cjs/src/has-magic.js.map b/deps/npm/node_modules/glob/dist/cjs/src/has-magic.js.map deleted file mode 100644 index 9b73cfad7d05e4..00000000000000 --- a/deps/npm/node_modules/glob/dist/cjs/src/has-magic.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"has-magic.js","sourceRoot":"","sources":["../../../src/has-magic.ts"],"names":[],"mappings":";;;AAAA,yCAAqC;AAGrC;;;;;;;;;;GAUG;AACI,MAAM,QAAQ,GAAG,CACtB,OAA0B,EAC1B,UAAuB,EAAE,EAChB,EAAE;IACX,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE;QAC3B,OAAO,GAAG,CAAC,OAAO,CAAC,CAAA;KACpB;IACD,KAAK,MAAM,CAAC,IAAI,OAAO,EAAE;QACvB,IAAI,IAAI,qBAAS,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,QAAQ,EAAE;YAAE,OAAO,IAAI,CAAA;KACtD;IACD,OAAO,KAAK,CAAA;AACd,CAAC,CAAA;AAXY,QAAA,QAAQ,YAWpB","sourcesContent":["import { Minimatch } from 'minimatch'\nimport { GlobOptions } from './glob.js'\n\n/**\n * Return true if the patterns provided contain any magic glob characters,\n * given the options provided.\n *\n * Brace expansion is not considered \"magic\" unless the `magicalBraces` option\n * is set, as brace expansion just turns one string into an array of strings.\n * So a pattern like `'x{a,b}y'` would return `false`, because `'xay'` and\n * `'xby'` both do not contain any magic glob characters, and it's treated the\n * same as if you had called it on `['xay', 'xby']`. When `magicalBraces:true`\n * is in the options, brace expansion _is_ treated as a pattern having magic.\n */\nexport const hasMagic = (\n pattern: string | string[],\n options: GlobOptions = {}\n): boolean => {\n if (!Array.isArray(pattern)) {\n pattern = [pattern]\n }\n for (const p of pattern) {\n if (new Minimatch(p, options).hasMagic()) return true\n }\n return false\n}\n"]} \ No newline at end of file diff --git a/deps/npm/node_modules/glob/dist/cjs/src/ignore.d.ts b/deps/npm/node_modules/glob/dist/cjs/src/ignore.d.ts deleted file mode 100644 index e9d74f3b5e1291..00000000000000 --- a/deps/npm/node_modules/glob/dist/cjs/src/ignore.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { Minimatch } from 'minimatch'; -import { Path } from 'path-scurry'; -import { GlobWalkerOpts } from './walker.js'; -export interface IgnoreLike { - ignored?: (p: Path) => boolean; - childrenIgnored?: (p: Path) => boolean; -} -/** - * Class used to process ignored patterns - */ -export declare class Ignore implements IgnoreLike { - relative: Minimatch[]; - relativeChildren: Minimatch[]; - absolute: Minimatch[]; - absoluteChildren: Minimatch[]; - constructor(ignored: string[], { nobrace, nocase, noext, noglobstar, platform, }: GlobWalkerOpts); - ignored(p: Path): boolean; - childrenIgnored(p: Path): boolean; -} -//# sourceMappingURL=ignore.d.ts.map \ No newline at end of file diff --git a/deps/npm/node_modules/glob/dist/cjs/src/ignore.d.ts.map b/deps/npm/node_modules/glob/dist/cjs/src/ignore.d.ts.map deleted file mode 100644 index 3d604838d1eed2..00000000000000 --- a/deps/npm/node_modules/glob/dist/cjs/src/ignore.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ignore.d.ts","sourceRoot":"","sources":["../../../src/ignore.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAElC,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAE5C,MAAM,WAAW,UAAU;IACzB,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,KAAK,OAAO,CAAA;IAC9B,eAAe,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,KAAK,OAAO,CAAA;CACvC;AASD;;GAEG;AACH,qBAAa,MAAO,YAAW,UAAU;IACvC,QAAQ,EAAE,SAAS,EAAE,CAAA;IACrB,gBAAgB,EAAE,SAAS,EAAE,CAAA;IAC7B,QAAQ,EAAE,SAAS,EAAE,CAAA;IACrB,gBAAgB,EAAE,SAAS,EAAE,CAAA;gBAG3B,OAAO,EAAE,MAAM,EAAE,EACjB,EACE,OAAO,EACP,MAAM,EACN,KAAK,EACL,UAAU,EACV,QAA0B,GAC3B,EAAE,cAAc;IAiDnB,OAAO,CAAC,CAAC,EAAE,IAAI,GAAG,OAAO;IAczB,eAAe,CAAC,CAAC,EAAE,IAAI,GAAG,OAAO;CAWlC"} \ No newline at end of file diff --git a/deps/npm/node_modules/glob/dist/cjs/src/ignore.js.map b/deps/npm/node_modules/glob/dist/cjs/src/ignore.js.map deleted file mode 100644 index 7595b4c68f79ed..00000000000000 --- a/deps/npm/node_modules/glob/dist/cjs/src/ignore.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ignore.js","sourceRoot":"","sources":["../../../src/ignore.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,kCAAkC;AAClC,kEAAkE;AAClE,6CAA6C;;;AAE7C,yCAAqC;AAErC,6CAAsC;AAQtC,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;AAEb;;GAEG;AACH,MAAa,MAAM;IACjB,QAAQ,CAAa;IACrB,gBAAgB,CAAa;IAC7B,QAAQ,CAAa;IACrB,gBAAgB,CAAa;IAE7B,YACE,OAAiB,EACjB,EACE,OAAO,EACP,MAAM,EACN,KAAK,EACL,UAAU,EACV,QAAQ,GAAG,eAAe,GACX;QAEjB,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAA;QAClB,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAA;QAClB,IAAI,CAAC,gBAAgB,GAAG,EAAE,CAAA;QAC1B,IAAI,CAAC,gBAAgB,GAAG,EAAE,CAAA;QAC1B,MAAM,MAAM,GAAG;YACb,GAAG,EAAE,IAAI;YACT,OAAO;YACP,MAAM;YACN,KAAK;YACL,UAAU;YACV,iBAAi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ent":["// give it a pattern, and it'll be able to tell you if\n// a given path should be ignored.\n// Ignoring a path ignores its children if the pattern ends in /**\n// Ignores are always parsed in dot:true mode\n\nimport { Minimatch } from 'minimatch'\nimport { Path } from 'path-scurry'\nimport { Pattern } from './pattern.js'\nimport { GlobWalkerOpts } from './walker.js'\n\nexport interface IgnoreLike {\n ignored?: (p: Path) => boolean\n childrenIgnored?: (p: Path) => boolean\n}\n\nconst defaultPlatform: NodeJS.Platform =\n typeof process === 'object' &&\n process &&\n typeof process.platform === 'string'\n ? process.platform\n : 'linux'\n\n/**\n * Class used to process ignored patterns\n */\nexport class Ignore implements IgnoreLike {\n relative: Minimatch[]\n relativeChildren: Minimatch[]\n absolute: Minimatch[]\n absoluteChildren: Minimatch[]\n\n constructor(\n ignored: string[],\n {\n nobrace,\n nocase,\n noext,\n noglobstar,\n platform = defaultPlatform,\n }: GlobWalkerOpts\n ) {\n this.relative = []\n this.absolute = []\n this.relativeChildren = []\n this.absoluteChildren = []\n const mmopts = {\n dot: true,\n nobrace,\n nocase,\n noext,\n noglobstar,\n optimizationLevel: 2,\n platform,\n nocomment: true,\n nonegate: true,\n }\n\n // this is a little weird, but it gives us a clean set of optimized\n // minimatch matchers, without getting tripped up if one of them\n // ends in /** inside a brace section, and it's only inefficient at\n // the start of the walk, not along it.\n // It'd be nice if the Pattern class just had a .test() method, but\n // handling globstars is a bit of a pita, and that code already lives\n // in minimatch anyway.\n // Another way would be if maybe Minimatch could take its set/globParts\n // as an option, and then we could at least just use Pattern to test\n // for absolute-ness.\n // Yet another way, Minimatch could take an array of glob strings, and\n // a cwd option, and do the right thing.\n for (const ign of ignored) {\n const mm = new Minimatch(ign, mmopts)\n for (let i = 0; i < mm.set.length; i++) {\n const parsed = mm.set[i]\n const globParts = mm.globParts[i]\n const p = new Pattern(parsed, globParts, 0, platform)\n const m = new Minimatch(p.globString(), mmopts)\n const children = globParts[globParts.length - 1] === '**'\n const absolute = p.isAbsolute()\n if (absolute) this.absolute.push(m)\n else this.relative.push(m)\n if (children) {\n if (absolute) this.absoluteChildren.push(m)\n else this.relativeChildren.push(m)\n }\n }\n }\n }\n\n ignored(p: Path): boolean {\n const fullpath = p.fullpath()\n const fullpaths = `${fullpath}/`\n const relative = p.relative() || '.'\n const relatives = `${relative}/`\n for (const m of this.relative) {\n if (m.match(relative) || m.match(relatives)) return true\n }\n for (const m of this.absolute) {\n if (m.match(fullpath) || m.match(fullpaths)) return true\n }\n return false\n }\n\n childrenIgnored(p: Path): boolean {\n const fullpath = p.fullpath() + '/'\n const relative = (p.relative() || '.') + '/'\n for (const m of this.relativeChildren) {\n if (m.match(relative)) return true\n }\n for (const m of this.absoluteChildren) {\n if (m.match(fullpath)) true\n }\n return false\n }\n}\n"]} \ No newline at end of file diff --git a/deps/npm/node_modules/glob/dist/cjs/src/index.d.ts b/deps/npm/node_modules/glob/dist/cjs/src/index.d.ts deleted file mode 100644 index 669bf12e6d5916..00000000000000 --- a/deps/npm/node_modules/glob/dist/cjs/src/index.d.ts +++ /dev/null @@ -1,95 +0,0 @@ -import { Minipass } from 'minipass'; -import { Path } from 'path-scurry'; -import type { GlobOptions, GlobOptionsWithFileTypesFalse, GlobOptionsWithFileTypesTrue, GlobOptionsWithFileTypesUnset } from './glob.js'; -import { Glob } from './glob.js'; -/** - * Syncronous form of {@link globStream}. Will read all the matches as fast as - * you consume them, even all in a single tick if you consume them immediately, - * but will still respond to backpressure if they're not consumed immediately. - */ -export declare function globStreamSync(pattern: string | string[], options: GlobOptionsWithFileTypesTrue): Minipass; -export declare function globStreamSync(pattern: string | string[], options: GlobOptionsWithFileTypesFalse): Minipass; -export declare function globStreamSync(pattern: string | string[], options: GlobOptionsWithFileTypesUnset): Minipass; -export declare function globStreamSync(pattern: string | string[], options: GlobOptions): Minipass | Minipass; -/** - * Return a stream that emits all the strings or `Path` objects and - * then emits `end` when completed. - */ -export declare function globStream(pattern: string | string[], options: GlobOptionsWithFileTypesFalse): Minipass; -export declare function globStream(pattern: string | string[], options: GlobOptionsWithFileTypesTrue): Minipass; -export declare function globStream(pattern: string | string[], options?: GlobOptionsWithFileTypesUnset | undefined): Minipass; -export declare function globStream(pattern: string | string[], options: GlobOptions): Minipass | Minipass; -/** - * Synchronous form of {@link glob} - */ -export declare function globSync(pattern: string | string[], options: GlobOptionsWithFileTypesFalse): string[]; -export declare function globSync(pattern: string | string[], options: GlobOptionsWithFileTypesTrue): Path[]; -export declare function globSync(pattern: string | string[], options?: GlobOptionsWithFileTypesUnset | undefined): string[]; -export declare function globSync(pattern: string | string[], options: GlobOptions): Path[] | string[]; -/** - * Perform an asynchronous glob search for the pattern(s) specified. Returns - * [Path](https://isaacs.github.io/path-scurry/classes/PathBase) objects if the - * {@link withFileTypes} option is set to `true`. See {@link GlobOptions} for - * full option descriptions. - */ -declare function glob_(pattern: string | string[], options?: GlobOptionsWithFileTypesUnset | undefined): Promise; -declare function glob_(pattern: string | string[], options: GlobOptionsWithFileTypesTrue): Promise; -declare function glob_(pattern: string | string[], options: GlobOptionsWithFileTypesFalse): Promise; -declare function glob_(pattern: string | string[], options: GlobOptions): Promise; -/** - * Return a sync iterator for walking glob pattern matches. - */ -export declare function globIterateSync(pattern: string | string[], options?: GlobOptionsWithFileTypesUnset | undefined): Generator; -export declare function globIterateSync(pattern: string | string[], options: GlobOptionsWithFileTypesTrue): Generator; -export declare function globIterateSync(pattern: string | string[], options: GlobOptionsWithFileTypesFalse): Generator; -export declare function globIterateSync(pattern: string | string[], options: GlobOptions): Generator | Generator; -/** - * Return an async iterator for walking glob pattern matches. - */ -export declare function globIterate(pattern: string | string[], options?: GlobOptionsWithFileTypesUnset | undefined): AsyncGenerator; -export declare function globIterate(pattern: string | string[], options: GlobOptionsWithFileTypesTrue): AsyncGenerator; -export declare function globIterate(pattern: string | string[], options: GlobOptionsWithFileTypesFalse): AsyncGenerator; -export declare function globIterate(pattern: string | string[], options: GlobOptions): AsyncGenerator | AsyncGenerator; -export declare const streamSync: typeof globStreamSync; -export declare const stream: typeof globStream & { - sync: typeof globStreamSync; -}; -export declare const iterateSync: typeof globIterateSync; -export declare const iterate: typeof globIterate & { - sync: typeof globIterateSync; -}; -export declare const sync: typeof globSync & { - stream: typeof globStreamSync; - iterate: typeof globIterateSync; -}; -export { escape, unescape } from 'minimatch'; -export { Glob } from './glob.js'; -export type { GlobOptions, GlobOptionsWithFileTypesFalse, GlobOptionsWithFileTypesTrue, GlobOptionsWithFileTypesUnset, } from './glob.js'; -export { hasMagic } from './has-magic.js'; -export type { IgnoreLike } from './ignore.js'; -export type { MatchStream } from './walker.js'; -export declare const glob: typeof glob_ & { - glob: typeof glob_; - globSync: typeof globSync; - sync: typeof globSync & { - stream: typeof globStreamSync; - iterate: typeof globIterateSync; - }; - globStream: typeof globStream; - stream: typeof globStream & { - sync: typeof globStreamSync; - }; - globStreamSync: typeof globStreamSync; - streamSync: typeof globStreamSync; - globIterate: typeof globIterate; - iterate: typeof globIterate & { - sync: typeof globIterateSync; - }; - globIterateSync: typeof globIterateSync; - iterateSync: typeof globIterateSync; - Glob: typeof Glob; - hasMagic: (pattern: string | string[], options?: GlobOptions) => boolean; - escape: (s: string, { windowsPathsNoEscape, }?: Pick | undefined) => string; - unescape: (s: string, { windowsPathsNoEscape, }?: Pick | undefined) => string; -}; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/deps/npm/node_modules/glob/dist/cjs/src/index.d.ts.map b/deps/npm/node_modules/glob/dist/cjs/src/index.d.ts.map deleted file mode 100644 index 4e9ba085ce45b2..00000000000000 --- a/deps/npm/node_modules/glob/dist/cjs/src/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AACnC,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAClC,OAAO,KAAK,EACV,WAAW,EACX,6BAA6B,EAC7B,4BAA4B,EAC5B,6BAA6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AI,EAAE,IAAI,EAAE,IAAI,CAAC,GAAG,cAAc,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;AASxE,eAAO,MAAM,UAAU,uBAAiB,CAAA;AACxC,eAAO,MAAM,MAAM;;CAAsD,CAAA;AACzE,eAAO,MAAM,WAAW,wBAAkB,CAAA;AAC1C,eAAO,MAAM,OAAO;;CAElB,CAAA;AACF,eAAO,MAAM,IAAI;;;CAGf,CAAA;AAGF,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,YAAY,EACV,WAAW,EACX,6BAA6B,EAC7B,4BAA4B,EAC5B,6BAA6B,GAC9B,MAAM,WAAW,CAAA;AAClB,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACzC,YAAY,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAC7C,YAAY,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAG9C,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;CAgBf,CAAA"} \ No newline at end of file diff --git a/deps/npm/node_modules/glob/dist/cjs/src/index.js.map b/deps/npm/node_modules/glob/dist/cjs/src/index.js.map deleted file mode 100644 index 060338fbd1b94b..00000000000000 --- a/deps/npm/node_modules/glob/dist/cjs/src/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":";;;AAAA,yCAA4C;AAS5C,uCAAgC;AAChC,iDAAyC;AAuBzC,SAAgB,cAAc,CAC5B,OAA0B,EAC1B,UAAuB,EAAE;IAEzB,OAAO,IAAI,cAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,UAAU,EAAE,CAAA;AAChD,CAAC;AALD,wCAKC;AAsBD,SAAgB,UAAU,CACxB,OAA0B,EAC1B,UAAuB,EAAE;IAEzB,OAAO,IAAI,c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AAAvB,+FAAA,IAAI,OAAA;AAOb,+CAAyC;AAAhC,wGAAA,QAAQ,OAAA;AAGjB,oBAAoB;AAEP,QAAA,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE;IACvC,IAAI,EAAE,KAAK;IACX,QAAQ;IACR,IAAI,EAAJ,YAAI;IACJ,UAAU;IACV,MAAM,EAAN,cAAM;IACN,cAAc;IACd,UAAU,EAAV,kBAAU;IACV,WAAW;IACX,OAAO,EAAP,eAAO;IACP,eAAe;IACf,WAAW,EAAX,mBAAW;IACX,IAAI,EAAJ,cAAI;IACJ,QAAQ,EAAR,uBAAQ;IACR,MAAM,EAAN,kBAAM;IACN,QAAQ,EAAR,oBAAQ;CACT,CAAC,CAAA;AACF,YAAI,CAAC,IAAI,GAAG,YAAI,CAAA","sourcesContent":["import { escape, unescape } from 'minimatch'\nimport { Minipass } from 'minipass'\nimport { Path } from 'path-scurry'\nimport type {\n GlobOptions,\n GlobOptionsWithFileTypesFalse,\n GlobOptionsWithFileTypesTrue,\n GlobOptionsWithFileTypesUnset,\n} from './glob.js'\nimport { Glob } from './glob.js'\nimport { hasMagic } from './has-magic.js'\n\n/**\n * Syncronous form of {@link globStream}. Will read all the matches as fast as\n * you consume them, even all in a single tick if you consume them immediately,\n * but will still respond to backpressure if they're not consumed immediately.\n */\nexport function globStreamSync(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesTrue\n): Minipass\nexport function globStreamSync(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesFalse\n): Minipass\nexport function globStreamSync(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesUnset\n): Minipass\nexport function globStreamSync(\n pattern: string | string[],\n options: GlobOptions\n): Minipass | Minipass\nexport function globStreamSync(\n pattern: string | string[],\n options: GlobOptions = {}\n) {\n return new Glob(pattern, options).streamSync()\n}\n\n/**\n * Return a stream that emits all the strings or `Path` objects and\n * then emits `end` when completed.\n */\nexport function globStream(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesFalse\n): Minipass\nexport function globStream(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesTrue\n): Minipass\nexport function globStream(\n pattern: string | string[],\n options?: GlobOptionsWithFileTypesUnset | undefined\n): Minipass\nexport function globStream(\n pattern: string | string[],\n options: GlobOptions\n): Minipass | Minipass\nexport function globStream(\n pattern: string | string[],\n options: GlobOptions = {}\n) {\n return new Glob(pattern, options).stream()\n}\n\n/**\n * Synchronous form of {@link glob}\n */\nexport function globSync(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesFalse\n): string[]\nexport function globSync(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesTrue\n): Path[]\nexport function globSync(\n pattern: string | string[],\n options?: GlobOptionsWithFileTypesUnset | undefined\n): string[]\nexport function globSync(\n pattern: string | string[],\n options: GlobOptions\n): Path[] | string[]\nexport function globSync(\n pattern: string | string[],\n options: GlobOptions = {}\n) {\n return new Glob(pattern, options).walkSync()\n}\n\n/**\n * Perform an asynchronous glob search for the pattern(s) specified. Returns\n * [Path](https://isaacs.github.io/path-scurry/classes/PathBase) objects if the\n * {@link withFileTypes} option is set to `true`. See {@link GlobOptions} for\n * full option descriptions.\n */\nasync function glob_(\n pattern: string | string[],\n options?: GlobOptionsWithFileTypesUnset | undefined\n): Promise\nasync function glob_(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesTrue\n): Promise\nasync function glob_(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesFalse\n): Promise\nasync function glob_(\n pattern: string | string[],\n options: GlobOptions\n): Promise\nasync function glob_(\n pattern: string | string[],\n options: GlobOptions = {}\n) {\n return new Glob(pattern, options).walk()\n}\n\n/**\n * Return a sync iterator for walking glob pattern matches.\n */\nexport function globIterateSync(\n pattern: string | string[],\n options?: GlobOptionsWithFileTypesUnset | undefined\n): Generator\nexport function globIterateSync(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesTrue\n): Generator\nexport function globIterateSync(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesFalse\n): Generator\nexport function globIterateSync(\n pattern: string | string[],\n options: GlobOptions\n): Generator | Generator\nexport function globIterateSync(\n pattern: string | string[],\n options: GlobOptions = {}\n) {\n return new Glob(pattern, options).iterateSync()\n}\n\n/**\n * Return an async iterator for walking glob pattern matches.\n */\nexport function globIterate(\n pattern: string | string[],\n options?: GlobOptionsWithFileTypesUnset | undefined\n): AsyncGenerator\nexport function globIterate(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesTrue\n): AsyncGenerator\nexport function globIterate(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesFalse\n): AsyncGenerator\nexport function globIterate(\n pattern: string | string[],\n options: GlobOptions\n): AsyncGenerator | AsyncGenerator\nexport function globIterate(\n pattern: string | string[],\n options: GlobOptions = {}\n) {\n return new Glob(pattern, options).iterate()\n}\n\n// aliases: glob.sync.stream() glob.stream.sync() glob.sync() etc\nexport const streamSync = globStreamSync\nexport const stream = Object.assign(globStream, { sync: globStreamSync })\nexport const iterateSync = globIterateSync\nexport const iterate = Object.assign(globIterate, {\n sync: globIterateSync,\n})\nexport const sync = Object.assign(globSync, {\n stream: globStreamSync,\n iterate: globIterateSync,\n})\n\n/* c8 ignore start */\nexport { escape, unescape } from 'minimatch'\nexport { Glob } from './glob.js'\nexport type {\n GlobOptions,\n GlobOptionsWithFileTypesFalse,\n GlobOptionsWithFileTypesTrue,\n GlobOptionsWithFileTypesUnset,\n} from './glob.js'\nexport { hasMagic } from './has-magic.js'\nexport type { IgnoreLike } from './ignore.js'\nexport type { MatchStream } from './walker.js'\n/* c8 ignore stop */\n\nexport const glob = Object.assign(glob_, {\n glob: glob_,\n globSync,\n sync,\n globStream,\n stream,\n globStreamSync,\n streamSync,\n globIterate,\n iterate,\n globIterateSync,\n iterateSync,\n Glob,\n hasMagic,\n escape,\n unescape,\n})\nglob.glob = glob\n"]} \ No newline at end of file diff --git a/deps/npm/node_modules/glob/dist/cjs/src/pattern.d.ts b/deps/npm/node_modules/glob/dist/cjs/src/pattern.d.ts deleted file mode 100644 index 109cc4e7a5dae3..00000000000000 --- a/deps/npm/node_modules/glob/dist/cjs/src/pattern.d.ts +++ /dev/null @@ -1,77 +0,0 @@ -/// -import { GLOBSTAR } from 'minimatch'; -export type MMPattern = string | RegExp | typeof GLOBSTAR; -export type PatternList = [p: MMPattern, ...rest: MMPattern[]]; -export type UNCPatternList = [ - p0: '', - p1: '', - p2: string, - p3: string, - ...rest: MMPattern[] -]; -export type DrivePatternList = [p0: string, ...rest: MMPattern[]]; -export type AbsolutePatternList = [p0: '', ...rest: MMPattern[]]; -export type GlobList = [p: string, ...rest: string[]]; -/** - * An immutable-ish view on an array of glob parts and their parsed - * results - */ -export declare class Pattern { - #private; - readonly length: number; - constructor(patternList: MMPattern[], globList: string[], index: number, platform: NodeJS.Platform); - /** - * The first entry in the parsed list of patterns - */ - pattern(): MMPattern; - /** - * true of if pattern() returns a string - */ - isString(): boolean; - /** - * true of if pattern() returns GLOBSTAR - */ - isGlobstar(): boolean; - /** - * true if pattern() returns a regexp - */ - isRegExp(): boolean; - /** - * The /-joined set of glob parts that make up this pattern - */ - globString(): string; - /** - * true if there are more pattern parts after this one - */ - hasMore(): boolean; - /** - * The rest of the pattern after this part, or null if this is the end - */ - rest(): Pattern | null; - /** - * true if the pattern represents a //unc/path/ on windows - */ - isUNC(): boolean; - /** - * True if the pattern starts with a drive letter on Windows - */ - isDrive(): boolean; - /** - * True if the pattern is rooted on an absolute path - */ - isAbsolute(): boolean; - /** - * consume the root of the pattern, and return it - */ - root(): string; - /** - * Check to see if the current globstar pattern is allowed to follow - * a symbolic link. - */ - checkFollowGlobstar(): boolean; - /** - * Mark that the current globstar pattern is following a symbolic link - */ - markFollowGlobstar(): boolean; -} -//# sourceMappingURL=pattern.d.ts.map \ No newline at end of file diff --git a/deps/npm/node_modules/glob/dist/cjs/src/pattern.d.ts.map b/deps/npm/node_modules/glob/dist/cjs/src/pattern.d.ts.map deleted file mode 100644 index 48430f63db0947..00000000000000 --- a/deps/npm/node_modules/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;OAEG;IACH,OAAO,IAAI,OAAO;IAIlB;;OAEG;IACH,IAAI,IAAI,OAAO,GAAG,IAAI;IAetB;;OAEG;IACH,KAAK,IAAI,OAAO;IAoBhB;;OAEG;IACH,OAAO,IAAI,OAAO;IAelB;;OAEG;IACH,UAAU,IAAI,OAAO;IAUrB;;OAEG;IACH,IAAI,IAAI,MAAM;IAOd;;;OAGG;IACH,mBAAmB,IAAI,OAAO;IAQ9B;;OAEG;IACH,kBAAkB,IAAI,OAAO;CAM9B"} \ No newline at end of file diff --git a/deps/npm/node_modules/glob/dist/cjs/src/pattern.js.map b/deps/npm/node_modules/glob/dist/cjs/src/pattern.js.map deleted file mode 100644 index ba5293ff9f2489..00000000000000 --- a/deps/npm/node_modules/glob/dist/cjs/src/pattern.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"pattern.js","sourceRoot":"","sources":["../../../src/pattern.ts"],"names":[],"mappings":";AAAA,yEAAyE;;;AAEzE,yCAAoC;AAgBpC,MAAM,aAAa,GAAG,CAAC,EAAe,EAAqB,EAAE,CAC3D,EAAE,CAAC,MAAM,IAAI,CAAC,CAAA;AAChB,MAAM,UAAU,GAAG,CAAC,EAAY,EAAkB,EAAE,CAAC,EAAE,CAAC,MAAM,IAAI,CAAC,CAAA;AAEnE;;;GAGG;AACH,MAAa,OAAO;IACT,YAAY,CAAa;IACzB,SAAS,CAAU;IACnB,MAAM,CAAQ;IACd,MAAM,CAAQ;IACd,SAAS,CAAiB;IACnC,KAAK,CAAiB;IACtB,WAAW,CAAS;IACpB,QAAQ,CAAU;IAClB,MAAM,CAAU;IAChB,WAAW,CAAU;IACrB,eAAe,GAAY,IAAI,CAAA;IAE/B,YACE,WAAwB,EACxB,QAAkB,EAClB,KAAa,EACb,QAAyB;QAEzB,IAAI,CAAC,aAAa,CAAC,WAAW,CAAC,EAAE;YAC/B,MAAM,IAAI,SAAS,CAAC,oBAAoB,CAAC,CAAA;SAC1C;QACD,IAAI,CAAC,UAAU,CAAC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AAO,IAAI,CAAA;IACb,CAAC;CACF;AAnOD,0BAmOC","sourcesContent":["// this is just a very light wrapper around 2 arrays with an offset index\n\nimport { GLOBSTAR } from 'minimatch'\nexport type MMPattern = string | RegExp | typeof GLOBSTAR\n\n// an array of length >= 1\nexport type PatternList = [p: MMPattern, ...rest: MMPattern[]]\nexport type UNCPatternList = [\n p0: '',\n p1: '',\n p2: string,\n p3: string,\n ...rest: MMPattern[]\n]\nexport type DrivePatternList = [p0: string, ...rest: MMPattern[]]\nexport type AbsolutePatternList = [p0: '', ...rest: MMPattern[]]\nexport type GlobList = [p: string, ...rest: string[]]\n\nconst isPatternList = (pl: MMPattern[]): pl is PatternList =>\n pl.length >= 1\nconst isGlobList = (gl: string[]): gl is GlobList => gl.length >= 1\n\n/**\n * An immutable-ish view on an array of glob parts and their parsed\n * results\n */\nexport class Pattern {\n readonly #patternList: PatternList\n readonly #globList: GlobList\n readonly #index: number\n readonly length: number\n readonly #platform: NodeJS.Platform\n #rest?: Pattern | null\n #globString?: string\n #isDrive?: boolean\n #isUNC?: boolean\n #isAbsolute?: boolean\n #followGlobstar: boolean = true\n\n constructor(\n patternList: MMPattern[],\n globList: string[],\n index: number,\n platform: NodeJS.Platform\n ) {\n if (!isPatternList(patternList)) {\n throw new TypeError('empty pattern list')\n }\n if (!isGlobList(globList)) {\n throw new TypeError('empty glob list')\n }\n if (globList.length !== patternList.length) {\n throw new TypeError('mismatched pattern list and glob list lengths')\n }\n this.length = patternList.length\n if (index < 0 || index >= this.length) {\n throw new TypeError('index out of range')\n }\n this.#patternList = patternList\n this.#globList = globList\n this.#index = index\n this.#platform = platform\n\n // normalize root entries of absolute patterns on initial creation.\n if (this.#index === 0) {\n // c: => ['c:/']\n // C:/ => ['C:/']\n // C:/x => ['C:/', 'x']\n // //host/share => ['//host/share/']\n // //host/share/ => ['//host/share/']\n // //host/share/x => ['//host/share/', 'x']\n // /etc => ['/', 'etc']\n // / => ['/']\n if (this.isUNC()) {\n // '' / '' / 'host' / 'share'\n const [p0, p1, p2, p3, ...prest] = this.#patternList\n const [g0, g1, g2, g3, ...grest] = this.#globList\n if (prest[0] === '') {\n // ends in /\n prest.shift()\n grest.shift()\n }\n const p = [p0, p1, p2, p3, ''].join('/')\n const g = [g0, g1, g2, g3, ''].join('/')\n this.#patternList = [p, ...prest]\n this.#globList = [g, ...grest]\n this.length = this.#patternList.length\n } else if (this.isDrive() || this.isAbsolute()) {\n const [p1, ...prest] = this.#patternList\n const [g1, ...grest] = this.#globList\n if (prest[0] === '') {\n // ends in /\n prest.shift()\n grest.shift()\n }\n const p = (p1 as string) + '/'\n const g = g1 + '/'\n this.#patternList = [p, ...prest]\n this.#globList = [g, ...grest]\n this.length = this.#patternList.length\n }\n }\n }\n\n /**\n * The first entry in the parsed list of patterns\n */\n pattern(): MMPattern {\n return this.#patternList[this.#index]\n }\n\n /**\n * true of if pattern() returns a string\n */\n isString(): boolean {\n return typeof this.#patternList[this.#index] === 'string'\n }\n /**\n * true of if pattern() returns GLOBSTAR\n */\n isGlobstar(): boolean {\n return this.#patternList[this.#index] === GLOBSTAR\n }\n /**\n * true if pattern() returns a regexp\n */\n isRegExp(): boolean {\n return this.#patternList[this.#index] instanceof RegExp\n }\n\n /**\n * The /-joined set of glob parts that make up this pattern\n */\n globString(): string {\n return (this.#globString =\n this.#globString ||\n (this.#index === 0\n ? this.isAbsolute()\n ? this.#globList[0] + this.#globList.slice(1).join('/')\n : this.#globList.join('/')\n : this.#globList.slice(this.#index).join('/')))\n }\n\n /**\n * true if there are more pattern parts after this one\n */\n hasMore(): boolean {\n return this.length > this.#index + 1\n }\n\n /**\n * The rest of the pattern after this part, or null if this is the end\n */\n rest(): Pattern | null {\n if (this.#rest !== undefined) return this.#rest\n if (!this.hasMore()) return (this.#rest = null)\n this.#rest = new Pattern(\n this.#patternList,\n this.#globList,\n this.#index + 1,\n this.#platform\n )\n this.#rest.#isAbsolute = this.#isAbsolute\n this.#rest.#isUNC = this.#isUNC\n this.#rest.#isDrive = this.#isDrive\n return this.#rest\n }\n\n /**\n * true if the pattern represents a //unc/path/ on windows\n */\n isUNC(): boolean {\n const pl = this.#patternList\n return this.#isUNC !== undefined\n ? this.#isUNC\n : (this.#isUNC =\n this.#platform === 'win32' &&\n this.#index === 0 &&\n pl[0] === '' &&\n pl[1] === '' &&\n typeof pl[2] === 'string' &&\n !!pl[2] &&\n typeof pl[3] === 'string' &&\n !!pl[3])\n }\n\n // pattern like C:/...\n // split = ['C:', ...]\n // XXX: would be nice to handle patterns like `c:*` to test the cwd\n // in c: for *, but I don't know of a way to even figure out what that\n // cwd is without actually chdir'ing into it?\n /**\n * True if the pattern starts with a drive letter on Windows\n */\n isDrive(): boolean {\n const pl = this.#patternList\n return this.#isDrive !== undefined\n ? this.#isDrive\n : (this.#isDrive =\n this.#platform === 'win32' &&\n this.#index === 0 &&\n this.length > 1 &&\n typeof pl[0] === 'string' &&\n /^[a-z]:$/i.test(pl[0]))\n }\n\n // pattern = '/' or '/...' or '/x/...'\n // split = ['', ''] or ['', ...] or ['', 'x', ...]\n // Drive and UNC both considered absolute on windows\n /**\n * True if the pattern is rooted on an absolute path\n */\n isAbsolute(): boolean {\n const pl = this.#patternList\n return this.#isAbsolute !== undefined\n ? this.#isAbsolute\n : (this.#isAbsolute =\n (pl[0] === '' && pl.length > 1) ||\n this.isDrive() ||\n this.isUNC())\n }\n\n /**\n * consume the root of the pattern, and return it\n */\n root(): string {\n const p = this.#patternList[0]\n return typeof p === 'string' && this.isAbsolute() && this.#index === 0\n ? p\n : ''\n }\n\n /**\n * Check to see if the current globstar pattern is allowed to follow\n * a symbolic link.\n */\n checkFollowGlobstar(): boolean {\n return !(\n this.#index === 0 ||\n !this.isGlobstar() ||\n !this.#followGlobstar\n )\n }\n\n /**\n * Mark that the current globstar pattern is following a symbolic link\n */\n markFollowGlobstar(): boolean {\n if (this.#index === 0 || !this.isGlobstar() || !this.#followGlobstar)\n return false\n this.#followGlobstar = false\n return true\n }\n}\n"]} \ No newline at end of file diff --git a/deps/npm/node_modules/glob/dist/cjs/src/processor.d.ts b/deps/npm/node_modules/glob/dist/cjs/src/processor.d.ts deleted file mode 100644 index ccedfbf2820f7d..00000000000000 --- a/deps/npm/node_modules/glob/dist/cjs/src/processor.d.ts +++ /dev/null @@ -1,59 +0,0 @@ -import { MMRegExp } from 'minimatch'; -import { Path } from 'path-scurry'; -import { Pattern } from './pattern.js'; -import { GlobWalkerOpts } from './walker.js'; -/** - * A cache of which patterns have been processed for a given Path - */ -export declare class HasWalkedCache { - store: Map>; - constructor(store?: Map>); - copy(): HasWalkedCache; - hasWalked(target: Path, pattern: Pattern): boolean | undefined; - storeWalked(target: Path, pattern: Pattern): void; -} -/** - * A record of which paths have been matched in a given walk step, - * and whether they only are considered a match if they are a directory, - * and whether their absolute or relative path should be returned. - */ -export declare class MatchRecord { - store: Map; - add(target: Path, absolute: boolean, ifDir: boolean): void; - entries(): [Path, boolean, boolean][]; -} -/** - * A collection of patterns that must be processed in a subsequent step - * for a given path. - */ -export declare class SubWalks { - store: Map; - add(target: Path, pattern: Pattern): void; - get(target: Path): Pattern[]; - entries(): [Path, Pattern[]][]; - keys(): Path[]; -} -/** - * The class that processes patterns for a given path. - * - * Handles child entry filtering, and determining whether a path's - * directory contents must be read. - */ -export declare class Processor { - hasWalkedCache: HasWalkedCache; - matches: MatchRecord; - subwalks: SubWalks; - patterns?: Pattern[]; - follow: boolean; - dot: boolean; - opts: GlobWalkerOpts; - constructor(opts: GlobWalkerOpts, hasWalkedCache?: HasWalkedCache); - processPatterns(target: Path, patterns: Pattern[]): this; - subwalkTargets(): Path[]; - child(): Processor; - filterEntries(parent: Path, entries: Path[]): Processor; - testGlobstar(e: Path, pattern: Pattern, rest: Pattern | null, absolute: boolean): void; - testRegExp(e: Path, p: MMRegExp, rest: Pattern | null, absolute: boolean): void; - testString(e: Path, p: string, rest: Pattern | null, absolute: boolean): void; -} -//# sourceMappingURL=processor.d.ts.map \ No newline at end of file diff --git a/deps/npm/node_modules/glob/dist/cjs/src/processor.d.ts.map b/deps/npm/node_modules/glob/dist/cjs/src/processor.d.ts.map deleted file mode 100644 index ca6c63ca264b27..00000000000000 --- a/deps/npm/node_modules/glob/dist/cjs/src/processor.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"processor.d.ts","sourceRoot":"","sources":["../../../src/processor.ts"],"names":[],"mappings":"AAEA,OAAO,EAAY,QAAQ,EAAE,MAAM,WAAW,CAAA;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAClC,OAAO,EAAa,OAAO,EAAE,MAAM,cAAc,CAAA;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAE5C;;GAEG;AACH,qBAAa,cAAc;IACzB,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC,CAAA;gBACnB,KAAK,GAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,CAAa;IAGvD,IAAI;IAGJ,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO;IAGxC,WAAW,CAAC,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO;CAM3C;AAED;;;;GAIG;AACH,qBAAa,WAAW;IACtB,KAAK,EAAE,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC,CAAY;IACpC,GAAG,CAAC,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO;IAMnD,OAAO,IAAI,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE;CAOtC;AAED;;;GAGG;AACH,qBAAa,QAAQ;IACnB,KAAK,EAAE,GAAG,CAAC,IAAI,EAAE,OAAO,EAAE,CAAC,CAAY;IACvC,GAAG,CAAC,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO;IAWlC,GAAG,CAAC,MAAM,EAAE,IAAI,GAAG,OAAO,EAAE;IAS5B,OAAO,IAAI,CAAC,IAAI,EAAE,OAAO,EAAE,CAAC,EAAE;IAG9B,IAAI,IAAI,IAAI,EAAE;CAGf;AAED;;;;;GAKG;AACH,qBAAa,SAAS;IACpB,cAAc,EAAE,cAAc,CAAA;IAC9B,OAAO,cAAoB;IAC3B,QAAQ,WAAiB;IACzB,QAAQ,CAAC,EAAE,OAAO,EAAE,CAAA;IACpB,MAAM,EAAE,OAAO,CAAA;IACf,GAAG,EAAE,OAAO,CAAA;IACZ,IAAI,EAAE,cAAc,CAAA;gBAER,IAAI,EAAE,cAAc,EAAE,cAAc,CAAC,EAAE,cAAc;IASjE,eAAe,CAAC,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE;IAwGjD,cAAc,IAAI,IAAI,EAAE;IAIxB,KAAK;IAQL,aAAa,CAAC,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,SAAS;IAqBvD,YAAY,CACV,CAAC,EAAE,IAAI,EACP,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,OAAO,GAAG,IAAI,EACpB,QAAQ,EAAE,OAAO;IA8CnB,UAAU,CACR,CAAC,EAAE,IAAI,EACP,CAAC,EAAE,QAAQ,EACX,IAAI,EAAE,OAAO,GAAG,IAAI,EACpB,QAAQ,EAAE,OAAO;IAUnB,UAAU,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,IAAI,EAAE,QAAQ,EAAE,OAAO;CASvE"} \ No newline at end of file diff --git a/deps/npm/node_modules/glob/dist/cjs/src/processor.js.map b/deps/npm/node_modules/glob/dist/cjs/src/processor.js.map deleted file mode 100644 index bcbac1f723f983..00000000000000 --- a/deps/npm/node_modules/glob/dist/cjs/src/processor.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"processor.js","sourceRoot":"","sources":["../../../src/processor.ts"],"names":[],"mappings":";AAAA,qEAAqE;;;AAErE,yCAA8C;AA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AC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;YAAE,OAAM;QAC3B,IAAI,CAAC,IAAI,EAAE;YACT,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAA;SACrC;aAAM;YACL,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,CAAA;SAC3B;IACH,CAAC;IAED,UAAU,CAAC,CAAO,EAAE,CAAS,EAAE,IAAoB,EAAE,QAAiB;QACpE,uBAAuB;QACvB,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;YAAE,OAAM;QACzB,IAAI,CAAC,IAAI,EAAE;YACT,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAA;SACrC;aAAM;YACL,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,CAAA;SAC3B;IACH,CAAC;CACF;AApOD,8BAoOC","sourcesContent":["// synchronous utility for filtering entries and calculating subwalks\n\nimport { GLOBSTAR, MMRegExp } from 'minimatch'\nimport { Path } from 'path-scurry'\nimport { MMPattern, Pattern } from './pattern.js'\nimport { GlobWalkerOpts } from './walker.js'\n\n/**\n * A cache of which patterns have been processed for a given Path\n */\nexport class HasWalkedCache {\n store: Map>\n constructor(store: Map> = new Map()) {\n this.store = store\n }\n copy() {\n return new HasWalkedCache(new Map(this.store))\n }\n hasWalked(target: Path, pattern: Pattern) {\n return this.store.get(target.fullpath())?.has(pattern.globString())\n }\n storeWalked(target: Path, pattern: Pattern) {\n const fullpath = target.fullpath()\n const cached = this.store.get(fullpath)\n if (cached) cached.add(pattern.globString())\n else this.store.set(fullpath, new Set([pattern.globString()]))\n }\n}\n\n/**\n * A record of which paths have been matched in a given walk step,\n * and whether they only are considered a match if they are a directory,\n * and whether their absolute or relative path should be returned.\n */\nexport class MatchRecord {\n store: Map = new Map()\n add(target: Path, absolute: boolean, ifDir: boolean) {\n const n = (absolute ? 2 : 0) | (ifDir ? 1 : 0)\n const current = this.store.get(target)\n this.store.set(target, current === undefined ? n : n & current)\n }\n // match, absolute, ifdir\n entries(): [Path, boolean, boolean][] {\n return [...this.store.entries()].map(([path, n]) => [\n path,\n !!(n & 2),\n !!(n & 1),\n ])\n }\n}\n\n/**\n * A collection of patterns that must be processed in a subsequent step\n * for a given path.\n */\nexport class SubWalks {\n store: Map = new Map()\n add(target: Path, pattern: Pattern) {\n if (!target.canReaddir()) {\n return\n }\n const subs = this.store.get(target)\n if (subs) {\n if (!subs.find(p => p.globString() === pattern.globString())) {\n subs.push(pattern)\n }\n } else this.store.set(target, [pattern])\n }\n get(target: Path): Pattern[] {\n const subs = this.store.get(target)\n /* c8 ignore start */\n if (!subs) {\n throw new Error('attempting to walk unknown path')\n }\n /* c8 ignore stop */\n return subs\n }\n entries(): [Path, Pattern[]][] {\n return this.keys().map(k => [k, this.store.get(k) as Pattern[]])\n }\n keys(): Path[] {\n return [...this.store.keys()].filter(t => t.canReaddir())\n }\n}\n\n/**\n * The class that processes patterns for a given path.\n *\n * Handles child entry filtering, and determining whether a path's\n * directory contents must be read.\n */\nexport class Processor {\n hasWalkedCache: HasWalkedCache\n matches = new MatchRecord()\n subwalks = new SubWalks()\n patterns?: Pattern[]\n follow: boolean\n dot: boolean\n opts: GlobWalkerOpts\n\n constructor(opts: GlobWalkerOpts, hasWalkedCache?: HasWalkedCache) {\n this.opts = opts\n this.follow = !!opts.follow\n this.dot = !!opts.dot\n this.hasWalkedCache = hasWalkedCache\n ? hasWalkedCache.copy()\n : new HasWalkedCache()\n }\n\n processPatterns(target: Path, patterns: Pattern[]) {\n this.patterns = patterns\n const processingSet: [Path, Pattern][] = patterns.map(p => [target, p])\n\n // map of paths to the magic-starting subwalks they need to walk\n // first item in patterns is the filter\n\n for (let [t, pattern] of processingSet) {\n this.hasWalkedCache.storeWalked(t, pattern)\n\n const root = pattern.root()\n const absolute = pattern.isAbsolute() && this.opts.absolute !== false\n\n // start absolute patterns at root\n if (root) {\n t = t.resolve(\n root === '/' && this.opts.root !== undefined\n ? this.opts.root\n : root\n )\n const rest = pattern.rest()\n if (!rest) {\n this.matches.add(t, true, false)\n continue\n } else {\n pattern = rest\n }\n }\n\n if (t.isENOENT()) continue\n\n let p: MMPattern\n let rest: Pattern | null\n let changed = false\n while (\n typeof (p = pattern.pattern()) === 'string' &&\n (rest = pattern.rest())\n ) {\n const c = t.resolve(p)\n // we can be reasonably sure that .. is a readable dir\n if (c.isUnknown() && p !== '..') break\n t = c\n pattern = rest\n changed = true\n }\n p = pattern.pattern()\n rest = pattern.rest()\n if (changed) {\n if (this.hasWalkedCache.hasWalked(t, pattern)) continue\n this.hasWalkedCache.storeWalked(t, pattern)\n }\n\n // now we have either a final string for a known entry,\n // more strings for an unknown entry,\n // or a pattern starting with magic, mounted on t.\n if (typeof p === 'string') {\n // must be final entry\n if (!rest) {\n const ifDir = p === '..' || p === '' || p === '.'\n this.matches.add(t.resolve(p), absolute, ifDir)\n } else {\n this.subwalks.add(t, pattern)\n }\n continue\n } else if (p === GLOBSTAR) {\n // if no rest, match and subwalk pattern\n // if rest, process rest and subwalk pattern\n // if it's a symlink, but we didn't get here by way of a\n // globstar match (meaning it's the first time THIS globstar\n // has traversed a symlink), then we follow it. Otherwise, stop.\n if (\n !t.isSymbolicLink() ||\n this.follow ||\n pattern.checkFollowGlobstar()\n ) {\n this.subwalks.add(t, pattern)\n }\n const rp = rest?.pattern()\n const rrest = rest?.rest()\n if (!rest || ((rp === '' || rp === '.') && !rrest)) {\n // only HAS to be a dir if it ends in **/ or **/.\n // but ending in ** will match files as well.\n this.matches.add(t, absolute, rp === '' || rp === '.')\n } else {\n if (rp === '..') {\n // this would mean you're matching **/.. at the fs root,\n // and no thanks, I'm not gonna test that specific case.\n /* c8 ignore start */\n const tp = t.parent || t\n /* c8 ignore stop */\n if (!rrest) this.matches.add(tp, absolute, true)\n else if (!this.hasWalkedCache.hasWalked(tp, rrest)) {\n this.subwalks.add(tp, rrest)\n }\n }\n }\n } else if (p instanceof RegExp) {\n this.subwalks.add(t, pattern)\n }\n }\n\n return this\n }\n\n subwalkTargets(): Path[] {\n return this.subwalks.keys()\n }\n\n child() {\n return new Processor(this.opts, this.hasWalkedCache)\n }\n\n // return a new Processor containing the subwalks for each\n // child entry, and a set of matches, and\n // a hasWalkedCache that's a copy of this one\n // then we're going to call\n filterEntries(parent: Path, entries: Path[]): Processor {\n const patterns = this.subwalks.get(parent)\n // put matches and entry walks into the results processor\n const results = this.child()\n for (const e of entries) {\n for (const pattern of patterns) {\n const absolute = pattern.isAbsolute()\n const p = pattern.pattern()\n const rest = pattern.rest()\n if (p === GLOBSTAR) {\n results.testGlobstar(e, pattern, rest, absolute)\n } else if (p instanceof RegExp) {\n results.testRegExp(e, p, rest, absolute)\n } else {\n results.testString(e, p, rest, absolute)\n }\n }\n }\n return results\n }\n\n testGlobstar(\n e: Path,\n pattern: Pattern,\n rest: Pattern | null,\n absolute: boolean\n ) {\n if (this.dot || !e.name.startsWith('.')) {\n if (!pattern.hasMore()) {\n this.matches.add(e, absolute, false)\n }\n if (e.canReaddir()) {\n // if we're in follow mode or it's not a symlink, just keep\n // testing the same pattern. If there's more after the globstar,\n // then this symlink consumes the globstar. If not, then we can\n // follow at most ONE symlink along the way, so we mark it, which\n // also checks to ensure that it wasn't already marked.\n if (this.follow || !e.isSymbolicLink()) {\n this.subwalks.add(e, pattern)\n } else if (e.isSymbolicLink()) {\n if (rest && pattern.checkFollowGlobstar()) {\n this.subwalks.add(e, rest)\n } else if (pattern.markFollowGlobstar()) {\n this.subwalks.add(e, pattern)\n }\n }\n }\n }\n // if the NEXT thing matches this entry, then also add\n // the rest.\n if (rest) {\n const rp = rest.pattern()\n if (\n typeof rp === 'string' &&\n // dots and empty were handled already\n rp !== '..' &&\n rp !== '' &&\n rp !== '.'\n ) {\n this.testString(e, rp, rest.rest(), absolute)\n } else if (rp === '..') {\n /* c8 ignore start */\n const ep = e.parent || e\n /* c8 ignore stop */\n this.subwalks.add(ep, rest)\n } else if (rp instanceof RegExp) {\n this.testRegExp(e, rp, rest.rest(), absolute)\n }\n }\n }\n\n testRegExp(\n e: Path,\n p: MMRegExp,\n rest: Pattern | null,\n absolute: boolean\n ) {\n if (!p.test(e.name)) return\n if (!rest) {\n this.matches.add(e, absolute, false)\n } else {\n this.subwalks.add(e, rest)\n }\n }\n\n testString(e: Path, p: string, rest: Pattern | null, absolute: boolean) {\n // should never happen?\n if (!e.isNamed(p)) return\n if (!rest) {\n this.matches.add(e, absolute, false)\n } else {\n this.subwalks.add(e, rest)\n }\n }\n}\n"]} \ No newline at end of file diff --git a/deps/npm/node_modules/glob/dist/cjs/src/walker.d.ts b/deps/npm/node_modules/glob/dist/cjs/src/walker.d.ts deleted file mode 100644 index 5c1a0414971b3a..00000000000000 --- a/deps/npm/node_modules/glob/dist/cjs/src/walker.d.ts +++ /dev/null @@ -1,96 +0,0 @@ -/// -/** - * Single-use utility classes to provide functionality to the {@link Glob} - * methods. - * - * @module - */ -import { Minipass } from 'minipass'; -import { Path } from 'path-scurry'; -import { IgnoreLike } from './ignore.js'; -import { Pattern } from './pattern.js'; -import { Processor } from './processor.js'; -export interface GlobWalkerOpts { - absolute?: boolean; - allowWindowsEscape?: boolean; - cwd?: string | URL; - dot?: boolean; - dotRelative?: boolean; - follow?: boolean; - ignore?: string | string[] | IgnoreLike; - mark?: boolean; - matchBase?: boolean; - maxDepth?: number; - nobrace?: boolean; - nocase?: boolean; - nodir?: boolean; - noext?: boolean; - noglobstar?: boolean; - platform?: NodeJS.Platform; - posix?: boolean; - realpath?: boolean; - root?: string; - stat?: boolean; - signal?: AbortSignal; - windowsPathsNoEscape?: boolean; - withFileTypes?: boolean; -} -export type GWOFileTypesTrue = GlobWalkerOpts & { - withFileTypes: true; -}; -export type GWOFileTypesFalse = GlobWalkerOpts & { - withFileTypes: false; -}; -export type GWOFileTypesUnset = GlobWalkerOpts & { - withFileTypes?: undefined; -}; -export type Result = O extends GWOFileTypesTrue ? Path : O extends GWOFileTypesFalse ? string : O extends GWOFileTypesUnset ? string : Path | string; -export type Matches = O extends GWOFileTypesTrue ? Set : O extends GWOFileTypesFalse ? Set : O extends GWOFileTypesUnset ? Set : Set; -export type MatchStream = O extends GWOFileTypesTrue ? Minipass : O extends GWOFileTypesFalse ? Minipass : O extends GWOFileTypesUnset ? Minipass : Minipass; -/** - * basic walking utilities that all the glob walker types use - */ -export declare abstract class GlobUtil { - #private; - path: Path; - patterns: Pattern[]; - opts: O; - seen: Set; - paused: boolean; - aborted: boolean; - signal?: AbortSignal; - maxDepth: number; - constructor(patterns: Pattern[], path: Path, opts: O); - pause(): void; - resume(): void; - onResume(fn: () => any): void; - matchCheck(e: Path, ifDir: boolean): Promise; - matchCheckTest(e: Path | undefined, ifDir: boolean): Path | undefined; - matchCheckSync(e: Path, ifDir: boolean): Path | undefined; - abstract matchEmit(p: Result): void; - abstract matchEmit(p: string | Path): void; - matchFinish(e: Path, absolute: boolean): void; - match(e: Path, absolute: boolean, ifDir: boolean): Promise; - matchSync(e: Path, absolute: boolean, ifDir: boolean): void; - walkCB(target: Path, patterns: Pattern[], cb: () => any): void; - walkCB2(target: Path, patterns: Pattern[], processor: Processor, cb: () => any): any; - walkCB3(target: Path, entries: Path[], processor: Processor, cb: () => any): void; - walkCBSync(target: Path, patterns: Pattern[], cb: () => any): void; - walkCB2Sync(target: Path, patterns: Pattern[], processor: Processor, cb: () => any): any; - walkCB3Sync(target: Path, entries: Path[], processor: Processor, cb: () => any): void; -} -export declare class GlobWalker extends GlobUtil { - matches: O extends GWOFileTypesTrue ? Set : O extends GWOFileTypesFalse ? Set : O extends GWOFileTypesUnset ? Set : Set; - constructor(patterns: Pattern[], path: Path, opts: O); - matchEmit(e: Result): void; - walk(): Promise>; - walkSync(): Matches; -} -export declare class GlobStream extends GlobUtil { - results: O extends GWOFileTypesTrue ? Minipass : O extends GWOFileTypesFalse ? Minipass : O extends GWOFileTypesUnset ? Minipass : Minipass; - constructor(patterns: Pattern[], path: Path, opts: O); - matchEmit(e: Result): void; - stream(): MatchStream; - streamSync(): MatchStream; -} -//# sourceMappingURL=walker.d.ts.map \ No newline at end of file diff --git a/deps/npm/node_modules/glob/dist/cjs/src/walker.d.ts.map b/deps/npm/node_modules/glob/dist/cjs/src/walker.d.ts.map deleted file mode 100644 index dda062358f1998..00000000000000 --- a/deps/npm/node_modules/glob/dist/cjs/src/walker.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"walker.d.ts","sourceRoot":"","sources":["../../../src/walker.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AACnC,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAClC,OAAO,EAAU,UAAU,EAAE,MAAM,aAAa,CAAA;AAOhD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAE1C,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,GAAG,CAAC,EAAE,MAAM,GAAG,GAAG,CAAA;IAClB,GAAG,CAAC,EAAE,OAAO,CAAA;IACb,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,UAAU,CAAA;IACvC,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,SAAS,CAAC,EAAE,OAAO,CAAA;IAGnB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,KAAK,CAAC,EAAE,OAAO,CA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EAAE,IAAI,EAAE,CAAC;IAKpD,SAAS,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,GAAG,IAAI;IAKvB,IAAI,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;IAiBjC,QAAQ,IAAI,OAAO,CAAC,CAAC,CAAC;CAWvB;AAED,qBAAa,UAAU,CACrB,CAAC,SAAS,cAAc,GAAG,cAAc,CACzC,SAAQ,QAAQ,CAAC,CAAC,CAAC;IACnB,OAAO,EAAE,CAAC,SAAS,gBAAgB,GAC/B,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,GACpB,CAAC,SAAS,iBAAiB,GAC3B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,GACxB,CAAC,SAAS,iBAAiB,GAC3B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,GACxB,QAAQ,CAAC,IAAI,GAAG,MAAM,EAAE,IAAI,GAAG,MAAM,CAAC,CAAA;gBAE9B,QAAQ,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IAUpD,SAAS,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,GAAG,IAAI;IAM7B,MAAM,IAAI,WAAW,CAAC,CAAC,CAAC;IAYxB,UAAU,IAAI,WAAW,CAAC,CAAC,CAAC;CAO7B"} \ No newline at end of file diff --git a/deps/npm/node_modules/glob/dist/cjs/src/walker.js.map b/deps/npm/node_modules/glob/dist/cjs/src/walker.js.map deleted file mode 100644 index a7af398939ae48..00000000000000 --- a/deps/npm/node_modules/glob/dist/cjs/src/walker.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"walker.js","sourceRoot":"","sources":["../../../src/walker.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,uCAAmC;AAEnC,2CAAgD;AAQhD,iDAA0C;AAiE1C,MAAM,UAAU,GAAG,CACjB,MAAsC,EACtC,IAAoB,EACR,EAAE,CACd,OAAO,MA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C7D;QACD,OAAO,IAAI,CAAC,OAAO,CAAA;IACrB,CAAC;IAED,UAAU;QACR,IAAI,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE;YACzB,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,CAAA;SACtB;QACD,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,QAAQ,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,CAAA;QACnE,OAAO,IAAI,CAAC,OAAO,CAAA;IACrB,CAAC;CACF;AA9CD,gCA8CC","sourcesContent":["/**\n * Single-use utility classes to provide functionality to the {@link Glob}\n * methods.\n *\n * @module\n */\nimport { Minipass } from 'minipass'\nimport { Path } from 'path-scurry'\nimport { Ignore, IgnoreLike } from './ignore.js'\n\n// XXX can we somehow make it so that it NEVER processes a given path more than\n// once, enough that the match set tracking is no longer needed? that'd speed\n// things up a lot. Or maybe bring back nounique, and skip it in that case?\n\n// a single minimatch set entry with 1 or more parts\nimport { Pattern } from './pattern.js'\nimport { Processor } from './processor.js'\n\nexport interface GlobWalkerOpts {\n absolute?: boolean\n allowWindowsEscape?: boolean\n cwd?: string | URL\n dot?: boolean\n dotRelative?: boolean\n follow?: boolean\n ignore?: string | string[] | IgnoreLike\n mark?: boolean\n matchBase?: boolean\n // Note: maxDepth here means \"maximum actual Path.depth()\",\n // not \"maximum depth beyond cwd\"\n maxDepth?: number\n nobrace?: boolean\n nocase?: boolean\n nodir?: boolean\n noext?: boolean\n noglobstar?: boolean\n platform?: NodeJS.Platform\n posix?: boolean\n realpath?: boolean\n root?: string\n stat?: boolean\n signal?: AbortSignal\n windowsPathsNoEscape?: boolean\n withFileTypes?: boolean\n}\n\nexport type GWOFileTypesTrue = GlobWalkerOpts & {\n withFileTypes: true\n}\nexport type GWOFileTypesFalse = GlobWalkerOpts & {\n withFileTypes: false\n}\nexport type GWOFileTypesUnset = GlobWalkerOpts & {\n withFileTypes?: undefined\n}\n\nexport type Result = O extends GWOFileTypesTrue\n ? Path\n : O extends GWOFileTypesFalse\n ? string\n : O extends GWOFileTypesUnset\n ? string\n : Path | string\n\nexport type Matches = O extends GWOFileTypesTrue\n ? Set\n : O extends GWOFileTypesFalse\n ? Set\n : O extends GWOFileTypesUnset\n ? Set\n : Set\n\nexport type MatchStream =\n O extends GWOFileTypesTrue\n ? Minipass\n : O extends GWOFileTypesFalse\n ? Minipass\n : O extends GWOFileTypesUnset\n ? Minipass\n : Minipass\n\nconst makeIgnore = (\n ignore: string | string[] | IgnoreLike,\n opts: GlobWalkerOpts\n): IgnoreLike =>\n typeof ignore === 'string'\n ? new Ignore([ignore], opts)\n : Array.isArray(ignore)\n ? new Ignore(ignore, opts)\n : ignore\n\n/**\n * basic walking utilities that all the glob walker types use\n */\nexport abstract class GlobUtil {\n path: Path\n patterns: Pattern[]\n opts: O\n seen: Set = new Set()\n paused: boolean = false\n aborted: boolean = false\n #onResume: (() => any)[] = []\n #ignore?: IgnoreLike\n #sep: '\\\\' | '/'\n signal?: AbortSignal\n maxDepth: number\n\n constructor(patterns: Pattern[], path: Path, opts: O)\n constructor(patterns: Pattern[], path: Path, opts: O) {\n this.patterns = patterns\n this.path = path\n this.opts = opts\n this.#sep = !opts.posix && opts.platform === 'win32' ? '\\\\' : '/'\n if (opts.ignore) {\n this.#ignore = makeIgnore(opts.ignore, opts)\n }\n // ignore, always set with maxDepth, but it's optional on the\n // GlobOptions type\n /* c8 ignore start */\n this.maxDepth = opts.maxDepth || Infinity\n /* c8 ignore stop */\n if (opts.signal) {\n this.signal = opts.signal\n this.signal.addEventListener('abort', () => {\n this.#onResume.length = 0\n })\n }\n }\n\n #ignored(path: Path): boolean {\n return this.seen.has(path) || !!this.#ignore?.ignored?.(path)\n }\n #childrenIgnored(path: Path): boolean {\n return !!this.#ignore?.childrenIgnored?.(path)\n }\n\n // backpressure mechanism\n pause() {\n this.paused = true\n }\n resume() {\n /* c8 ignore start */\n if (this.signal?.aborted) return\n /* c8 ignore stop */\n this.paused = false\n let fn: (() => any) | undefined = undefined\n while (!this.paused && (fn = this.#onResume.shift())) {\n fn()\n }\n }\n onResume(fn: () => any) {\n if (this.signal?.aborted) return\n /* c8 ignore start */\n if (!this.paused) {\n fn()\n } else {\n /* c8 ignore stop */\n this.#onResume.push(fn)\n }\n }\n\n // do the requisite realpath/stat checking, and return the path\n // to add or undefined to filter it out.\n async matchCheck(e: Path, ifDir: boolean): Promise {\n if (ifDir && this.opts.nodir) return undefined\n let rpc: Path | undefined\n if (this.opts.realpath) {\n rpc = e.realpathCached() || (await e.realpath())\n if (!rpc) return undefined\n e = rpc\n }\n const needStat = e.isUnknown() || this.opts.stat\n return this.matchCheckTest(needStat ? await e.lstat() : e, ifDir)\n }\n\n matchCheckTest(e: Path | undefined, ifDir: boolean): Path | undefined {\n return e &&\n (this.maxDepth === Infinity || e.depth() <= this.maxDepth) &&\n (!ifDir || e.canReaddir()) &&\n (!this.opts.nodir || !e.isDirectory()) &&\n !this.#ignored(e)\n ? e\n : undefined\n }\n\n matchCheckSync(e: Path, ifDir: boolean): Path | undefined {\n if (ifDir && this.opts.nodir) return undefined\n let rpc: Path | undefined\n if (this.opts.realpath) {\n rpc = e.realpathCached() || e.realpathSync()\n if (!rpc) return undefined\n e = rpc\n }\n const needStat = e.isUnknown() || this.opts.stat\n return this.matchCheckTest(needStat ? e.lstatSync() : e, ifDir)\n }\n\n abstract matchEmit(p: Result): void\n abstract matchEmit(p: string | Path): void\n\n matchFinish(e: Path, absolute: boolean) {\n if (this.#ignored(e)) return\n const abs =\n this.opts.absolute === undefined ? absolute : this.opts.absolute\n this.seen.add(e)\n const mark = this.opts.mark && e.isDirectory() ? this.#sep : ''\n // ok, we have what we need!\n if (this.opts.withFileTypes) {\n this.matchEmit(e)\n } else if (abs) {\n const abs = this.opts.posix ? e.fullpathPosix() : e.fullpath()\n this.matchEmit(abs + mark)\n } else {\n const rel = this.opts.posix ? e.relativePosix() : e.relative()\n const pre =\n this.opts.dotRelative && !rel.startsWith('..' + this.#sep)\n ? '.' + this.#sep\n : ''\n this.matchEmit(!rel ? '.' + mark : pre + rel + mark)\n }\n }\n\n async match(e: Path, absolute: boolean, ifDir: boolean): Promise {\n const p = await this.matchCheck(e, ifDir)\n if (p) this.matchFinish(p, absolute)\n }\n\n matchSync(e: Path, absolute: boolean, ifDir: boolean): void {\n const p = this.matchCheckSync(e, ifDir)\n if (p) this.matchFinish(p, absolute)\n }\n\n walkCB(target: Path, patterns: Pattern[], cb: () => any) {\n /* c8 ignore start */\n if (this.signal?.aborted) cb()\n /* c8 ignore stop */\n this.walkCB2(target, patterns, new Processor(this.opts), cb)\n }\n\n walkCB2(\n target: Path,\n patterns: Pattern[],\n processor: Processor,\n cb: () => any\n ) {\n if (this.#childrenIgnored(target)) return cb()\n if (this.signal?.aborted) cb()\n if (this.paused) {\n this.onResume(() => this.walkCB2(target, patterns, processor, cb))\n return\n }\n processor.processPatterns(target, patterns)\n\n // done processing. all of the above is sync, can be abstracted out.\n // subwalks is a map of paths to the entry filters they need\n // matches is a map of paths to [absolute, ifDir] tuples.\n let tasks = 1\n const next = () => {\n if (--tasks === 0) cb()\n }\n\n for (const [m, absolute, ifDir] of processor.matches.entries()) {\n if (this.#ignored(m)) continue\n tasks++\n this.match(m, absolute, ifDir).then(() => next())\n }\n\n for (const t of processor.subwalkTargets()) {\n if (this.maxDepth !== Infinity && t.depth() >= this.maxDepth) {\n continue\n }\n tasks++\n const childrenCached = t.readdirCached()\n if (t.calledReaddir())\n this.walkCB3(t, childrenCached, processor, next)\n else {\n t.readdirCB(\n (_, entries) => this.walkCB3(t, entries, processor, next),\n true\n )\n }\n }\n\n next()\n }\n\n walkCB3(\n target: Path,\n entries: Path[],\n processor: Processor,\n cb: () => any\n ) {\n processor = processor.filterEntries(target, entries)\n\n let tasks = 1\n const next = () => {\n if (--tasks === 0) cb()\n }\n\n for (const [m, absolute, ifDir] of processor.matches.entries()) {\n if (this.#ignored(m)) continue\n tasks++\n this.match(m, absolute, ifDir).then(() => next())\n }\n for (const [target, patterns] of processor.subwalks.entries()) {\n tasks++\n this.walkCB2(target, patterns, processor.child(), next)\n }\n\n next()\n }\n\n walkCBSync(target: Path, patterns: Pattern[], cb: () => any) {\n /* c8 ignore start */\n if (this.signal?.aborted) cb()\n /* c8 ignore stop */\n this.walkCB2Sync(target, patterns, new Processor(this.opts), cb)\n }\n\n walkCB2Sync(\n target: Path,\n patterns: Pattern[],\n processor: Processor,\n cb: () => any\n ) {\n if (this.#childrenIgnored(target)) return cb()\n if (this.signal?.aborted) cb()\n if (this.paused) {\n this.onResume(() =>\n this.walkCB2Sync(target, patterns, processor, cb)\n )\n return\n }\n processor.processPatterns(target, patterns)\n\n // done processing. all of the above is sync, can be abstracted out.\n // subwalks is a map of paths to the entry filters they need\n // matches is a map of paths to [absolute, ifDir] tuples.\n let tasks = 1\n const next = () => {\n if (--tasks === 0) cb()\n }\n\n for (const [m, absolute, ifDir] of processor.matches.entries()) {\n if (this.#ignored(m)) continue\n this.matchSync(m, absolute, ifDir)\n }\n\n for (const t of processor.subwalkTargets()) {\n if (this.maxDepth !== Infinity && t.depth() >= this.maxDepth) {\n continue\n }\n tasks++\n const children = t.readdirSync()\n this.walkCB3Sync(t, children, processor, next)\n }\n\n next()\n }\n\n walkCB3Sync(\n target: Path,\n entries: Path[],\n processor: Processor,\n cb: () => any\n ) {\n processor = processor.filterEntries(target, entries)\n\n let tasks = 1\n const next = () => {\n if (--tasks === 0) cb()\n }\n\n for (const [m, absolute, ifDir] of processor.matches.entries()) {\n if (this.#ignored(m)) continue\n this.matchSync(m, absolute, ifDir)\n }\n for (const [target, patterns] of processor.subwalks.entries()) {\n tasks++\n this.walkCB2Sync(target, patterns, processor.child(), next)\n }\n\n next()\n }\n}\n\nexport class GlobWalker<\n O extends GlobWalkerOpts = GlobWalkerOpts\n> extends GlobUtil {\n matches: O extends GWOFileTypesTrue\n ? Set\n : O extends GWOFileTypesFalse\n ? Set\n : O extends GWOFileTypesUnset\n ? Set\n : Set\n\n constructor(patterns: Pattern[], path: Path, opts: O) {\n super(patterns, path, opts)\n this.matches = new Set() as Matches\n }\n\n matchEmit(e: Result): void\n matchEmit(e: Path | string): void {\n this.matches.add(e)\n }\n\n async walk(): Promise> {\n if (this.signal?.aborted) throw this.signal.reason\n if (this.path.isUnknown()) {\n await this.path.lstat()\n }\n await new Promise((res, rej) => {\n this.walkCB(this.path, this.patterns, () => {\n if (this.signal?.aborted) {\n rej(this.signal.reason)\n } else {\n res(this.matches)\n }\n })\n })\n return this.matches\n }\n\n walkSync(): Matches {\n if (this.signal?.aborted) throw this.signal.reason\n if (this.path.isUnknown()) {\n this.path.lstatSync()\n }\n // nothing for the callback to do, because this never pauses\n this.walkCBSync(this.path, this.patterns, () => {\n if (this.signal?.aborted) throw this.signal.reason\n })\n return this.matches\n }\n}\n\nexport class GlobStream<\n O extends GlobWalkerOpts = GlobWalkerOpts\n> extends GlobUtil {\n results: O extends GWOFileTypesTrue\n ? Minipass\n : O extends GWOFileTypesFalse\n ? Minipass\n : O extends GWOFileTypesUnset\n ? Minipass\n : Minipass\n\n constructor(patterns: Pattern[], path: Path, opts: O) {\n super(patterns, path, opts)\n this.results = new Minipass({\n signal: this.signal,\n objectMode: true,\n }) as MatchStream\n this.results.on('drain', () => this.resume())\n this.results.on('resume', () => this.resume())\n }\n\n matchEmit(e: Result): void\n matchEmit(e: Path | string): void {\n this.results.write(e)\n if (!this.results.flowing) this.pause()\n }\n\n stream(): MatchStream {\n const target = this.path\n if (target.isUnknown()) {\n target.lstat().then(() => {\n this.walkCB(target, this.patterns, () => this.results.end())\n })\n } else {\n this.walkCB(target, this.patterns, () => this.results.end())\n }\n return this.results\n }\n\n streamSync(): MatchStream {\n if (this.path.isUnknown()) {\n this.path.lstatSync()\n }\n this.walkCBSync(this.path, this.patterns, () => this.results.end())\n return this.results\n }\n}\n"]} \ No newline at end of file diff --git a/deps/npm/node_modules/glob/dist/cjs/src/walker.js b/deps/npm/node_modules/glob/dist/cjs/walker.js similarity index 95% rename from deps/npm/node_modules/glob/dist/cjs/src/walker.js rename to deps/npm/node_modules/glob/dist/cjs/walker.js index 9651ce1164016c..8c31172cc92fba 100644 --- a/deps/npm/node_modules/glob/dist/cjs/src/walker.js +++ b/deps/npm/node_modules/glob/dist/cjs/walker.js @@ -1,4 +1,7 @@ "use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; Object.defineProperty(exports, "__esModule", { value: true }); exports.GlobStream = exports.GlobWalker = exports.GlobUtil = void 0; /** @@ -7,7 +10,7 @@ exports.GlobStream = exports.GlobWalker = exports.GlobUtil = void 0; * * @module */ -const minipass_1 = require("minipass"); +const minipass_1 = __importDefault(require("minipass")); const ignore_js_1 = require("./ignore.js"); const processor_js_1 = require("./processor.js"); const makeIgnore = (ignore, opts) => typeof ignore === 'string' @@ -34,7 +37,7 @@ class GlobUtil { this.patterns = patterns; this.path = path; this.opts = opts; - this.#sep = !opts.posix && opts.platform === 'win32' ? '\\' : '/'; + this.#sep = opts.platform === 'win32' ? '\\' : '/'; if (opts.ignore) { this.#ignore = makeIgnore(opts.ignore, opts); } @@ -131,15 +134,14 @@ class GlobUtil { this.matchEmit(e); } else if (abs) { - const abs = this.opts.posix ? e.fullpathPosix() : e.fullpath(); - this.matchEmit(abs + mark); + this.matchEmit(e.fullpath() + mark); } else { - const rel = this.opts.posix ? e.relativePosix() : e.relative(); + const rel = e.relative(); const pre = this.opts.dotRelative && !rel.startsWith('..' + this.#sep) ? '.' + this.#sep : ''; - this.matchEmit(!rel ? '.' + mark : pre + rel + mark); + this.matchEmit(!rel && mark ? '.' + mark : pre + rel + mark); } } async match(e, absolute, ifDir) { @@ -322,7 +324,7 @@ class GlobStream extends GlobUtil { results; constructor(patterns, path, opts) { super(patterns, path, opts); - this.results = new minipass_1.Minipass({ + this.results = new minipass_1.default({ signal: this.signal, objectMode: true, }); diff --git a/deps/npm/node_modules/glob/dist/mjs/glob.d.ts b/deps/npm/node_modules/glob/dist/mjs/glob.d.ts deleted file mode 100644 index a8b3da7722b652..00000000000000 --- a/deps/npm/node_modules/glob/dist/mjs/glob.d.ts +++ /dev/null @@ -1,344 +0,0 @@ -/// -import { Minimatch } from 'minimatch'; -import { Minipass } from 'minipass'; -import { FSOption, Path, PathScurry } from 'path-scurry'; -import { IgnoreLike } from './ignore.js'; -import { Pattern } from './pattern.js'; -export type MatchSet = Minimatch['set']; -export type GlobParts = Exclude; -/** - * A `GlobOptions` object may be provided to any of the exported methods, and - * must be provided to the `Glob` constructor. - * - * All options are optional, boolean, and false by default, unless otherwise - * noted. - * - * All resolved options are added to the Glob object as properties. - * - * If you are running many `glob` operations, you can pass a Glob object as the - * `options` argument to a subsequent operation to share the previously loaded - * cache. - */ -export interface GlobOptions { - /** - * Set to `true` to always receive absolute paths for - * matched files. Set to `false` to always return relative paths. - * - * When this option is not set, absolute paths are returned for patterns - * that are absolute, and otherwise paths are returned that are relative - * to the `cwd` setting. - * - * This does _not_ make an extra system call to get - * the realpath, it only does string path resolution. - * - * Conflicts with {@link withFileTypes} - */ - absolute?: boolean; - /** - * Set to false to enable {@link windowsPathsNoEscape} - * - * @deprecated - */ - allowWindowsEscape?: boolean; - /** - * The current working directory in which to search. Defaults to - * `process.cwd()`. - * - * May be eiher a string path or a `file://` URL object or string. - */ - cwd?: string | URL; - /** - * Include `.dot` files in normal matches and `globstar` - * matches. Note that an explicit dot in a portion of the pattern - * will always match dot files. - */ - dot?: boolean; - /** - * Prepend all relative path strings with `./` (or `.\` on Windows). - * - * Without this option, returned relative paths are "bare", so instead of - * returning `'./foo/bar'`, they are returned as `'foo/bar'`. - * - * Relative patterns starting with `'../'` are not prepended with `./`, even - * if this option is set. - */ - dotRelative?: boolean; - /** - * Follow symlinked directories when expanding `**` - * patterns. This can result in a lot of duplicate references in - * the presence of cyclic links, and make performance quite bad. - * - * By default, a `**` in a pattern will follow 1 symbolic link if - * it is not the first item in the pattern, or none if it is the - * first item in the pattern, following the same behavior as Bash. - */ - follow?: boolean; - /** - * string or string[], or an object with `ignore` and `ignoreChildren` - * methods. - * - * If a string or string[] is provided, then this is treated as a glob - * pattern or array of glob patterns to exclude from matches. To ignore all - * children within a directory, as well as the entry itself, append `'/**'` - * to the ignore pattern. - * - * **Note** `ignore` patterns are _always_ in `dot:true` mode, regardless of - * any other settings. - * - * If an object is provided that has `ignored(path)` and/or - * `childrenIgnored(path)` methods, then these methods will be called to - * determine whether any Path is a match or if its children should be - * traversed, respectively. - */ - ignore?: string | string[] | IgnoreLike; - /** - * Treat brace expansion like `{a,b}` as a "magic" pattern. Has no - * effect if {@link nobrace} is set. - * - * Only has effect on the {@link hasMagic} function. - */ - magicalBraces?: boolean; - /** - * Add a `/` character to directory matches. Note that this requires - * additional stat calls in some cases. - */ - mark?: boolean; - /** - * Perform a basename-only match if the pattern does not contain any slash - * characters. That is, `*.js` would be treated as equivalent to - * `**\/*.js`, matching all js files in all directories. - */ - matchBase?: boolean; - /** - * Limit the directory traversal to a given depth below the cwd. - * Note that this does NOT prevent traversal to sibling folders, - * root patterns, and so on. It only limits the maximum folder depth - * that the walk will descend, relative to the cwd. - */ - maxDepth?: number; - /** - * Do not expand `{a,b}` and `{1..3}` brace sets. - */ - nobrace?: boolean; - /** - * Perform a case-insensitive match. This defaults to `true` on macOS and - * Windows systems, and `false` on all others. - * - * **Note** `nocase` should only be explicitly set when it is - * known that the filesystem's case sensitivity differs from the - * platform default. If set `true` on case-sensitive file - * systems, or `false` on case-insensitive file systems, then the - * walk may return more or less results than expected. - */ - nocase?: boolean; - /** - * Do not match directories, only files. (Note: to match - * _only_ directories, put a `/` at the end of the pattern.) - */ - nodir?: boolean; - /** - * Do not match "extglob" patterns such as `+(a|b)`. - */ - noext?: boolean; - /** - * Do not match `**` against multiple filenames. (Ie, treat it as a normal - * `*` instead.) - * - * Conflicts with {@link matchBase} - */ - noglobstar?: boolean; - /** - * Defaults to value of `process.platform` if available, or `'linux'` if - * not. Setting `platform:'win32'` on non-Windows systems may cause strange - * behavior. - */ - platform?: NodeJS.Platform; - /** - * Set to true to call `fs.realpath` on all of the - * results. In the case of an entry that cannot be resolved, the - * entry is omitted. This incurs a slight performance penalty, of - * course, because of the added system calls. - */ - realpath?: boolean; - /** - * - * A string path resolved against the `cwd` option, which - * is used as the starting point for absolute patterns that start - * with `/`, (but not drive letters or UNC paths on Windows). - * - * Note that this _doesn't_ necessarily limit the walk to the - * `root` directory, and doesn't affect the cwd starting point for - * non-absolute patterns. A pattern containing `..` will still be - * able to traverse out of the root directory, if it is not an - * actual root directory on the filesystem, and any non-absolute - * patterns will be matched in the `cwd`. For example, the - * pattern `/../*` with `{root:'/some/path'}` will return all - * files in `/some`, not all files in `/some/path`. The pattern - * `*` with `{root:'/some/path'}` will return all the entries in - * the cwd, not the entries in `/some/path`. - * - * To start absolute and non-absolute patterns in the same - * path, you can use `{root:''}`. However, be aware that on - * Windows systems, a pattern like `x:/*` or `//host/share/*` will - * _always_ start in the `x:/` or `//host/share` directory, - * regardless of the `root` setting. - */ - root?: string; - /** - * A [PathScurry](http://npm.im/path-scurry) object used - * to traverse the file system. If the `nocase` option is set - * explicitly, then any provided `scurry` object must match this - * setting. - */ - scurry?: PathScurry; - /** - * Call `lstat()` on all entries, whether required or not to determine - * if it's a valid match. When used with {@link withFileTypes}, this means - * that matches will include data such as modified time, permissions, and - * so on. Note that this will incur a performance cost due to the added - * system calls. - */ - stat?: boolean; - /** - * An AbortSignal which will cancel the Glob walk when - * triggered. - */ - signal?: AbortSignal; - /** - * Use `\\` as a path separator _only_, and - * _never_ as an escape character. If set, all `\\` characters are - * replaced with `/` in the pattern. - * - * Note that this makes it **impossible** to match against paths - * containing literal glob pattern characters, but allows matching - * with patterns constructed using `path.join()` and - * `path.resolve()` on Windows platforms, mimicking the (buggy!) - * behavior of Glob v7 and before on Windows. Please use with - * caution, and be mindful of [the caveat below about Windows - * paths](#windows). (For legacy reasons, this is also set if - * `allowWindowsEscape` is set to the exact value `false`.) - */ - windowsPathsNoEscape?: boolean; - /** - * Return [PathScurry](http://npm.im/path-scurry) - * `Path` objects instead of strings. These are similar to a - * NodeJS `Dirent` object, but with additional methods and - * properties. - * - * Conflicts with {@link absolute} - */ - withFileTypes?: boolean; - /** - * An fs implementation to override some or all of the defaults. See - * http://npm.im/path-scurry for details about what can be overridden. - */ - fs?: FSOption; - /** - * Just passed along to Minimatch. Note that this makes all pattern - * matching operations slower and *extremely* noisy. - */ - debug?: boolean; - /** - * Return `/` delimited paths, even on Windows. - * - * On posix systems, this has no effect. But, on Windows, it means that - * paths will be `/` delimited, and absolute paths will be their full - * resolved UNC forms, eg instead of `'C:\\foo\\bar'`, it would return - * `'//?/C:/foo/bar'` - */ - posix?: boolean; -} -export type GlobOptionsWithFileTypesTrue = GlobOptions & { - withFileTypes: true; - absolute?: undefined; - mark?: undefined; - posix?: undefined; -}; -export type GlobOptionsWithFileTypesFalse = GlobOptions & { - withFileTypes?: false; -}; -export type GlobOptionsWithFileTypesUnset = GlobOptions & { - withFileTypes?: undefined; -}; -export type Result = Opts extends GlobOptionsWithFileTypesTrue ? Path : Opts extends GlobOptionsWithFileTypesFalse ? string : Opts extends GlobOptionsWithFileTypesUnset ? string : string | Path; -export type Results = Result[]; -export type FileTypes = Opts extends GlobOptionsWithFileTypesTrue ? true : Opts extends GlobOptionsWithFileTypesFalse ? false : Opts extends GlobOptionsWithFileTypesUnset ? false : boolean; -/** - * An object that can perform glob pattern traversals. - */ -export declare class Glob implements GlobOptions { - absolute?: boolean; - cwd: string; - root?: string; - dot: boolean; - dotRelative: boolean; - follow: boolean; - ignore?: string | string[] | IgnoreLike; - magicalBraces: boolean; - mark?: boolean; - matchBase: boolean; - maxDepth: number; - nobrace: boolean; - nocase: boolean; - nodir: boolean; - noext: boolean; - noglobstar: boolean; - pattern: string[]; - platform: NodeJS.Platform; - realpath: boolean; - scurry: PathScurry; - stat: boolean; - signal?: AbortSignal; - windowsPathsNoEscape: boolean; - withFileTypes: FileTypes; - /** - * The options provided to the constructor. - */ - opts: Opts; - /** - * An array of parsed immutable {@link Pattern} objects. - */ - patterns: Pattern[]; - /** - * All options are stored as properties on the `Glob` object. - * - * See {@link GlobOptions} for full options descriptions. - * - * Note that a previous `Glob` object can be passed as the - * `GlobOptions` to another `Glob` instantiation to re-use settings - * and caches with a new pattern. - * - * Traversal functions can be called multiple times to run the walk - * again. - */ - constructor(pattern: string | string[], opts: Opts); - /** - * Returns a Promise that resolves to the results array. - */ - walk(): Promise>; - /** - * synchronous {@link Glob.walk} - */ - walkSync(): Results; - /** - * Stream results asynchronously. - */ - stream(): Minipass, Result>; - /** - * Stream results synchronously. - */ - streamSync(): Minipass, Result>; - /** - * Default sync iteration function. Returns a Generator that - * iterates over the results. - */ - iterateSync(): Generator, void, void>; - [Symbol.iterator](): Generator, void, void>; - /** - * Default async iteration function. Returns an AsyncGenerator that - * iterates over the results. - */ - iterate(): AsyncGenerator, void, void>; - [Symbol.asyncIterator](): AsyncGenerator, void, void>; -} -//# sourceMappingURL=glob.d.ts.map \ No newline at end of file diff --git a/deps/npm/node_modules/glob/dist/mjs/glob.d.ts.map b/deps/npm/node_modules/glob/dist/mjs/glob.d.ts.map deleted file mode 100644 index e5423682233478..00000000000000 --- a/deps/npm/node_modules/glob/dist/mjs/glob.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"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,CAA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AC;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..e1eaf6f4f51697 100644 --- a/deps/npm/node_modules/glob/dist/mjs/glob.js +++ b/deps/npm/node_modules/glob/dist/mjs/glob.js @@ -141,7 +141,6 @@ export class Glob { optimizationLevel: 2, platform: this.platform, windowsPathsNoEscape: this.windowsPathsNoEscape, - debug: !!this.opts.debug, }; const mms = this.pattern.map(p => new Minimatch(p, mmo)); const [matchSet, globParts] = mms.reduce((set, m) => { diff --git a/deps/npm/node_modules/glob/dist/mjs/glob.js.map b/deps/npm/node_modules/glob/dist/mjs/glob.js.map deleted file mode 100644 index 8917735ad9296f..00000000000000 --- a/deps/npm/node_modules/glob/dist/mjs/glob.js.map +++ /dev/null @@ -1 +0,0 @@ -{"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,EAA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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 diff --git a/deps/npm/node_modules/glob/dist/mjs/has-magic.d.ts b/deps/npm/node_modules/glob/dist/mjs/has-magic.d.ts deleted file mode 100644 index 8aec3bd9725175..00000000000000 --- a/deps/npm/node_modules/glob/dist/mjs/has-magic.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { GlobOptions } from './glob.js'; -/** - * Return true if the patterns provided contain any magic glob characters, - * given the options provided. - * - * Brace expansion is not considered "magic" unless the `magicalBraces` option - * is set, as brace expansion just turns one string into an array of strings. - * So a pattern like `'x{a,b}y'` would return `false`, because `'xay'` and - * `'xby'` both do not contain any magic glob characters, and it's treated the - * same as if you had called it on `['xay', 'xby']`. When `magicalBraces:true` - * is in the options, brace expansion _is_ treated as a pattern having magic. - */ -export declare const hasMagic: (pattern: string | string[], options?: GlobOptions) => boolean; -//# sourceMappingURL=has-magic.d.ts.map \ No newline at end of file diff --git a/deps/npm/node_modules/glob/dist/mjs/has-magic.d.ts.map b/deps/npm/node_modules/glob/dist/mjs/has-magic.d.ts.map deleted file mode 100644 index b24dd4ec47e0bb..00000000000000 --- a/deps/npm/node_modules/glob/dist/mjs/has-magic.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"has-magic.d.ts","sourceRoot":"","sources":["../../src/has-magic.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AAEvC;;;;;;;;;;GAUG;AACH,eAAO,MAAM,QAAQ,YACV,MAAM,GAAG,MAAM,EAAE,YACjB,WAAW,KACnB,OAQF,CAAA"} \ No newline at end of file diff --git a/deps/npm/node_modules/glob/dist/mjs/has-magic.js.map b/deps/npm/node_modules/glob/dist/mjs/has-magic.js.map deleted file mode 100644 index 27fd78dbae62cf..00000000000000 --- a/deps/npm/node_modules/glob/dist/mjs/has-magic.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"has-magic.js","sourceRoot":"","sources":["../../src/has-magic.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;AAGrC;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,CACtB,OAA0B,EAC1B,UAAuB,EAAE,EAChB,EAAE;IACX,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE;QAC3B,OAAO,GAAG,CAAC,OAAO,CAAC,CAAA;KACpB;IACD,KAAK,MAAM,CAAC,IAAI,OAAO,EAAE;QACvB,IAAI,IAAI,SAAS,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,QAAQ,EAAE;YAAE,OAAO,IAAI,CAAA;KACtD;IACD,OAAO,KAAK,CAAA;AACd,CAAC,CAAA","sourcesContent":["import { Minimatch } from 'minimatch'\nimport { GlobOptions } from './glob.js'\n\n/**\n * Return true if the patterns provided contain any magic glob characters,\n * given the options provided.\n *\n * Brace expansion is not considered \"magic\" unless the `magicalBraces` option\n * is set, as brace expansion just turns one string into an array of strings.\n * So a pattern like `'x{a,b}y'` would return `false`, because `'xay'` and\n * `'xby'` both do not contain any magic glob characters, and it's treated the\n * same as if you had called it on `['xay', 'xby']`. When `magicalBraces:true`\n * is in the options, brace expansion _is_ treated as a pattern having magic.\n */\nexport const hasMagic = (\n pattern: string | string[],\n options: GlobOptions = {}\n): boolean => {\n if (!Array.isArray(pattern)) {\n pattern = [pattern]\n }\n for (const p of pattern) {\n if (new Minimatch(p, options).hasMagic()) return true\n }\n return false\n}\n"]} \ No newline at end of file diff --git a/deps/npm/node_modules/glob/dist/mjs/ignore.d.ts b/deps/npm/node_modules/glob/dist/mjs/ignore.d.ts deleted file mode 100644 index e9d74f3b5e1291..00000000000000 --- a/deps/npm/node_modules/glob/dist/mjs/ignore.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { Minimatch } from 'minimatch'; -import { Path } from 'path-scurry'; -import { GlobWalkerOpts } from './walker.js'; -export interface IgnoreLike { - ignored?: (p: Path) => boolean; - childrenIgnored?: (p: Path) => boolean; -} -/** - * Class used to process ignored patterns - */ -export declare class Ignore implements IgnoreLike { - relative: Minimatch[]; - relativeChildren: Minimatch[]; - absolute: Minimatch[]; - absoluteChildren: Minimatch[]; - constructor(ignored: string[], { nobrace, nocase, noext, noglobstar, platform, }: GlobWalkerOpts); - ignored(p: Path): boolean; - childrenIgnored(p: Path): boolean; -} -//# sourceMappingURL=ignore.d.ts.map \ No newline at end of file diff --git a/deps/npm/node_modules/glob/dist/mjs/ignore.d.ts.map b/deps/npm/node_modules/glob/dist/mjs/ignore.d.ts.map deleted file mode 100644 index e0018cf935b046..00000000000000 --- a/deps/npm/node_modules/glob/dist/mjs/ignore.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ignore.d.ts","sourceRoot":"","sources":["../../src/ignore.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAElC,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAE5C,MAAM,WAAW,UAAU;IACzB,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,KAAK,OAAO,CAAA;IAC9B,eAAe,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,KAAK,OAAO,CAAA;CACvC;AASD;;GAEG;AACH,qBAAa,MAAO,YAAW,UAAU;IACvC,QAAQ,EAAE,SAAS,EAAE,CAAA;IACrB,gBAAgB,EAAE,SAAS,EAAE,CAAA;IAC7B,QAAQ,EAAE,SAAS,EAAE,CAAA;IACrB,gBAAgB,EAAE,SAAS,EAAE,CAAA;gBAG3B,OAAO,EAAE,MAAM,EAAE,EACjB,EACE,OAAO,EACP,MAAM,EACN,KAAK,EACL,UAAU,EACV,QAA0B,GAC3B,EAAE,cAAc;IAiDnB,OAAO,CAAC,CAAC,EAAE,IAAI,GAAG,OAAO;IAczB,eAAe,CAAC,CAAC,EAAE,IAAI,GAAG,OAAO;CAWlC"} \ No newline at end of file diff --git a/deps/npm/node_modules/glob/dist/mjs/ignore.js.map b/deps/npm/node_modules/glob/dist/mjs/ignore.js.map deleted file mode 100644 index 1038b712396eaf..00000000000000 --- a/deps/npm/node_modules/glob/dist/mjs/ignore.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ignore.js","sourceRoot":"","sources":["../../src/ignore.ts"],"names":[],"mappings":"AAAA,sDAAsD;AACtD,kCAAkC;AAClC,kEAAkE;AAClE,6CAA6C;AAE7C,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;AAErC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAQtC,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;AAEb;;GAEG;AACH,MAAM,OAAO,MAAM;IACjB,QAAQ,CAAa;IACrB,gBAAgB,CAAa;IAC7B,QAAQ,CAAa;IACrB,gBAAgB,CAAa;IAE7B,YACE,OAAiB,EACjB,EACE,OAAO,EACP,MAAM,EACN,KAAK,EACL,UAAU,EACV,QAAQ,GAAG,eAAe,GACX;QAEjB,IAAI,CAAC,QAAQ,GAAG,EAAE,CAA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AAQ,CAAC;gBAAE,OAAO,IAAI,CAAA;SACnC;QACD,KAAK,MAAM,CAAC,IAAI,IAAI,CAAC,gBAAgB,EAAE;YACrC,IAAI,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC;gBAAE,IAAI,CAAA;SAC5B;QACD,OAAO,KAAK,CAAA;IACd,CAAC;CACF","sourcesContent":["// give it a pattern, and it'll be able to tell you if\n// a given path should be ignored.\n// Ignoring a path ignores its children if the pattern ends in /**\n// Ignores are always parsed in dot:true mode\n\nimport { Minimatch } from 'minimatch'\nimport { Path } from 'path-scurry'\nimport { Pattern } from './pattern.js'\nimport { GlobWalkerOpts } from './walker.js'\n\nexport interface IgnoreLike {\n ignored?: (p: Path) => boolean\n childrenIgnored?: (p: Path) => boolean\n}\n\nconst defaultPlatform: NodeJS.Platform =\n typeof process === 'object' &&\n process &&\n typeof process.platform === 'string'\n ? process.platform\n : 'linux'\n\n/**\n * Class used to process ignored patterns\n */\nexport class Ignore implements IgnoreLike {\n relative: Minimatch[]\n relativeChildren: Minimatch[]\n absolute: Minimatch[]\n absoluteChildren: Minimatch[]\n\n constructor(\n ignored: string[],\n {\n nobrace,\n nocase,\n noext,\n noglobstar,\n platform = defaultPlatform,\n }: GlobWalkerOpts\n ) {\n this.relative = []\n this.absolute = []\n this.relativeChildren = []\n this.absoluteChildren = []\n const mmopts = {\n dot: true,\n nobrace,\n nocase,\n noext,\n noglobstar,\n optimizationLevel: 2,\n platform,\n nocomment: true,\n nonegate: true,\n }\n\n // this is a little weird, but it gives us a clean set of optimized\n // minimatch matchers, without getting tripped up if one of them\n // ends in /** inside a brace section, and it's only inefficient at\n // the start of the walk, not along it.\n // It'd be nice if the Pattern class just had a .test() method, but\n // handling globstars is a bit of a pita, and that code already lives\n // in minimatch anyway.\n // Another way would be if maybe Minimatch could take its set/globParts\n // as an option, and then we could at least just use Pattern to test\n // for absolute-ness.\n // Yet another way, Minimatch could take an array of glob strings, and\n // a cwd option, and do the right thing.\n for (const ign of ignored) {\n const mm = new Minimatch(ign, mmopts)\n for (let i = 0; i < mm.set.length; i++) {\n const parsed = mm.set[i]\n const globParts = mm.globParts[i]\n const p = new Pattern(parsed, globParts, 0, platform)\n const m = new Minimatch(p.globString(), mmopts)\n const children = globParts[globParts.length - 1] === '**'\n const absolute = p.isAbsolute()\n if (absolute) this.absolute.push(m)\n else this.relative.push(m)\n if (children) {\n if (absolute) this.absoluteChildren.push(m)\n else this.relativeChildren.push(m)\n }\n }\n }\n }\n\n ignored(p: Path): boolean {\n const fullpath = p.fullpath()\n const fullpaths = `${fullpath}/`\n const relative = p.relative() || '.'\n const relatives = `${relative}/`\n for (const m of this.relative) {\n if (m.match(relative) || m.match(relatives)) return true\n }\n for (const m of this.absolute) {\n if (m.match(fullpath) || m.match(fullpaths)) return true\n }\n return false\n }\n\n childrenIgnored(p: Path): boolean {\n const fullpath = p.fullpath() + '/'\n const relative = (p.relative() || '.') + '/'\n for (const m of this.relativeChildren) {\n if (m.match(relative)) return true\n }\n for (const m of this.absoluteChildren) {\n if (m.match(fullpath)) true\n }\n return false\n }\n}\n"]} \ No newline at end of file diff --git a/deps/npm/node_modules/glob/dist/mjs/index.d.ts b/deps/npm/node_modules/glob/dist/mjs/index.d.ts deleted file mode 100644 index 669bf12e6d5916..00000000000000 --- a/deps/npm/node_modules/glob/dist/mjs/index.d.ts +++ /dev/null @@ -1,95 +0,0 @@ -import { Minipass } from 'minipass'; -import { Path } from 'path-scurry'; -import type { GlobOptions, GlobOptionsWithFileTypesFalse, GlobOptionsWithFileTypesTrue, GlobOptionsWithFileTypesUnset } from './glob.js'; -import { Glob } from './glob.js'; -/** - * Syncronous form of {@link globStream}. Will read all the matches as fast as - * you consume them, even all in a single tick if you consume them immediately, - * but will still respond to backpressure if they're not consumed immediately. - */ -export declare function globStreamSync(pattern: string | string[], options: GlobOptionsWithFileTypesTrue): Minipass; -export declare function globStreamSync(pattern: string | string[], options: GlobOptionsWithFileTypesFalse): Minipass; -export declare function globStreamSync(pattern: string | string[], options: GlobOptionsWithFileTypesUnset): Minipass; -export declare function globStreamSync(pattern: string | string[], options: GlobOptions): Minipass | Minipass; -/** - * Return a stream that emits all the strings or `Path` objects and - * then emits `end` when completed. - */ -export declare function globStream(pattern: string | string[], options: GlobOptionsWithFileTypesFalse): Minipass; -export declare function globStream(pattern: string | string[], options: GlobOptionsWithFileTypesTrue): Minipass; -export declare function globStream(pattern: string | string[], options?: GlobOptionsWithFileTypesUnset | undefined): Minipass; -export declare function globStream(pattern: string | string[], options: GlobOptions): Minipass | Minipass; -/** - * Synchronous form of {@link glob} - */ -export declare function globSync(pattern: string | string[], options: GlobOptionsWithFileTypesFalse): string[]; -export declare function globSync(pattern: string | string[], options: GlobOptionsWithFileTypesTrue): Path[]; -export declare function globSync(pattern: string | string[], options?: GlobOptionsWithFileTypesUnset | undefined): string[]; -export declare function globSync(pattern: string | string[], options: GlobOptions): Path[] | string[]; -/** - * Perform an asynchronous glob search for the pattern(s) specified. Returns - * [Path](https://isaacs.github.io/path-scurry/classes/PathBase) objects if the - * {@link withFileTypes} option is set to `true`. See {@link GlobOptions} for - * full option descriptions. - */ -declare function glob_(pattern: string | string[], options?: GlobOptionsWithFileTypesUnset | undefined): Promise; -declare function glob_(pattern: string | string[], options: GlobOptionsWithFileTypesTrue): Promise; -declare function glob_(pattern: string | string[], options: GlobOptionsWithFileTypesFalse): Promise; -declare function glob_(pattern: string | string[], options: GlobOptions): Promise; -/** - * Return a sync iterator for walking glob pattern matches. - */ -export declare function globIterateSync(pattern: string | string[], options?: GlobOptionsWithFileTypesUnset | undefined): Generator; -export declare function globIterateSync(pattern: string | string[], options: GlobOptionsWithFileTypesTrue): Generator; -export declare function globIterateSync(pattern: string | string[], options: GlobOptionsWithFileTypesFalse): Generator; -export declare function globIterateSync(pattern: string | string[], options: GlobOptions): Generator | Generator; -/** - * Return an async iterator for walking glob pattern matches. - */ -export declare function globIterate(pattern: string | string[], options?: GlobOptionsWithFileTypesUnset | undefined): AsyncGenerator; -export declare function globIterate(pattern: string | string[], options: GlobOptionsWithFileTypesTrue): AsyncGenerator; -export declare function globIterate(pattern: string | string[], options: GlobOptionsWithFileTypesFalse): AsyncGenerator; -export declare function globIterate(pattern: string | string[], options: GlobOptions): AsyncGenerator | AsyncGenerator; -export declare const streamSync: typeof globStreamSync; -export declare const stream: typeof globStream & { - sync: typeof globStreamSync; -}; -export declare const iterateSync: typeof globIterateSync; -export declare const iterate: typeof globIterate & { - sync: typeof globIterateSync; -}; -export declare const sync: typeof globSync & { - stream: typeof globStreamSync; - iterate: typeof globIterateSync; -}; -export { escape, unescape } from 'minimatch'; -export { Glob } from './glob.js'; -export type { GlobOptions, GlobOptionsWithFileTypesFalse, GlobOptionsWithFileTypesTrue, GlobOptionsWithFileTypesUnset, } from './glob.js'; -export { hasMagic } from './has-magic.js'; -export type { IgnoreLike } from './ignore.js'; -export type { MatchStream } from './walker.js'; -export declare const glob: typeof glob_ & { - glob: typeof glob_; - globSync: typeof globSync; - sync: typeof globSync & { - stream: typeof globStreamSync; - iterate: typeof globIterateSync; - }; - globStream: typeof globStream; - stream: typeof globStream & { - sync: typeof globStreamSync; - }; - globStreamSync: typeof globStreamSync; - streamSync: typeof globStreamSync; - globIterate: typeof globIterate; - iterate: typeof globIterate & { - sync: typeof globIterateSync; - }; - globIterateSync: typeof globIterateSync; - iterateSync: typeof globIterateSync; - Glob: typeof Glob; - hasMagic: (pattern: string | string[], options?: GlobOptions) => boolean; - escape: (s: string, { windowsPathsNoEscape, }?: Pick | undefined) => string; - unescape: (s: string, { windowsPathsNoEscape, }?: Pick | undefined) => string; -}; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/deps/npm/node_modules/glob/dist/mjs/index.d.ts.map b/deps/npm/node_modules/glob/dist/mjs/index.d.ts.map deleted file mode 100644 index c60290eb118a91..00000000000000 --- a/deps/npm/node_modules/glob/dist/mjs/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"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E,EAC1B,OAAO,EAAE,6BAA6B,GACrC,cAAc,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;AACrC,wBAAgB,WAAW,CACzB,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAC1B,OAAO,EAAE,WAAW,GACnB,cAAc,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,GAAG,cAAc,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;AASxE,eAAO,MAAM,UAAU,uBAAiB,CAAA;AACxC,eAAO,MAAM,MAAM;;CAAsD,CAAA;AACzE,eAAO,MAAM,WAAW,wBAAkB,CAAA;AAC1C,eAAO,MAAM,OAAO;;CAElB,CAAA;AACF,eAAO,MAAM,IAAI;;;CAGf,CAAA;AAGF,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,YAAY,EACV,WAAW,EACX,6BAA6B,EAC7B,4BAA4B,EAC5B,6BAA6B,GAC9B,MAAM,WAAW,CAAA;AAClB,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACzC,YAAY,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAC7C,YAAY,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAG9C,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;CAgBf,CAAA"} \ No newline at end of file diff --git a/deps/npm/node_modules/glob/dist/mjs/index.js b/deps/npm/node_modules/glob/dist/mjs/index.js index 7b270117e740ad..df9deead1144ce 100644 --- a/deps/npm/node_modules/glob/dist/mjs/index.js +++ b/deps/npm/node_modules/glob/dist/mjs/index.js @@ -10,7 +10,7 @@ export function globStream(pattern, options = {}) { export function globSync(pattern, options = {}) { return new Glob(pattern, options).walkSync(); } -async function glob_(pattern, options = {}) { +export async function glob(pattern, options = {}) { return new Glob(pattern, options).walk(); } export function globIterateSync(pattern, options = {}) { @@ -35,8 +35,8 @@ export { escape, unescape } from 'minimatch'; export { Glob } from './glob.js'; export { hasMagic } from './has-magic.js'; /* c8 ignore stop */ -export const glob = Object.assign(glob_, { - glob: glob_, +export default Object.assign(glob, { + glob, globSync, sync, globStream, @@ -52,5 +52,4 @@ export const glob = Object.assign(glob_, { escape, unescape, }); -glob.glob = glob; //# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/deps/npm/node_modules/glob/dist/mjs/index.js.map b/deps/npm/node_modules/glob/dist/mjs/index.js.map deleted file mode 100644 index 2d4fc077271b15..00000000000000 --- a/deps/npm/node_modules/glob/dist/mjs/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AAS5C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAuBzC,MAAM,UAAU,cAAc,CAC5B,OAA0B,EAC1B,UAAuB,EAAE;IAEzB,OAAO,IAAI,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,UAAU,EAAE,CAAA;AAChD,CAAC;AAsBD,MAAM,UAAU,UAAU,CACxB,OAA0B,EAC1B,UAAuB,EAAE;IAEzB,OAAO,IAAI,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,MAAM,EAAE,CAAA;AAC5C,CAAC;AAqBD,MAAM,UAAU,QAAQ,CACtB,OAA0B,EAC1B,UAAuB,EAAE;IAEzB,OAAO,IAAI,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,QAAQ,EAAE,CAAA;AAC9C,CAAC;AAwBD,KAAK,UAAU,KAAK,CAClB,OAA0B,EAC1B,UAAuB,EAAE;IAEzB,OAAO,IAAI,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,IAAI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;IACR,MAAM;IACN,QAAQ;CACT,CAAC,CAAA;AACF,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA","sourcesContent":["import { escape, unescape } from 'minimatch'\nimport { Minipass } from 'minipass'\nimport { Path } from 'path-scurry'\nimport type {\n GlobOptions,\n GlobOptionsWithFileTypesFalse,\n GlobOptionsWithFileTypesTrue,\n GlobOptionsWithFileTypesUnset,\n} from './glob.js'\nimport { Glob } from './glob.js'\nimport { hasMagic } from './has-magic.js'\n\n/**\n * Syncronous form of {@link globStream}. Will read all the matches as fast as\n * you consume them, even all in a single tick if you consume them immediately,\n * but will still respond to backpressure if they're not consumed immediately.\n */\nexport function globStreamSync(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesTrue\n): Minipass\nexport function globStreamSync(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesFalse\n): Minipass\nexport function globStreamSync(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesUnset\n): Minipass\nexport function globStreamSync(\n pattern: string | string[],\n options: GlobOptions\n): Minipass | Minipass\nexport function globStreamSync(\n pattern: string | string[],\n options: GlobOptions = {}\n) {\n return new Glob(pattern, options).streamSync()\n}\n\n/**\n * Return a stream that emits all the strings or `Path` objects and\n * then emits `end` when completed.\n */\nexport function globStream(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesFalse\n): Minipass\nexport function globStream(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesTrue\n): Minipass\nexport function globStream(\n pattern: string | string[],\n options?: GlobOptionsWithFileTypesUnset | undefined\n): Minipass\nexport function globStream(\n pattern: string | string[],\n options: GlobOptions\n): Minipass | Minipass\nexport function globStream(\n pattern: string | string[],\n options: GlobOptions = {}\n) {\n return new Glob(pattern, options).stream()\n}\n\n/**\n * Synchronous form of {@link glob}\n */\nexport function globSync(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesFalse\n): string[]\nexport function globSync(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesTrue\n): Path[]\nexport function globSync(\n pattern: string | string[],\n options?: GlobOptionsWithFileTypesUnset | undefined\n): string[]\nexport function globSync(\n pattern: string | string[],\n options: GlobOptions\n): Path[] | string[]\nexport function globSync(\n pattern: string | string[],\n options: GlobOptions = {}\n) {\n return new Glob(pattern, options).walkSync()\n}\n\n/**\n * Perform an asynchronous glob search for the pattern(s) specified. Returns\n * [Path](https://isaacs.github.io/path-scurry/classes/PathBase) objects if the\n * {@link withFileTypes} option is set to `true`. See {@link GlobOptions} for\n * full option descriptions.\n */\nasync function glob_(\n pattern: string | string[],\n options?: GlobOptionsWithFileTypesUnset | undefined\n): Promise\nasync function glob_(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesTrue\n): Promise\nasync function glob_(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesFalse\n): Promise\nasync function glob_(\n pattern: string | string[],\n options: GlobOptions\n): Promise\nasync function glob_(\n pattern: string | string[],\n options: GlobOptions = {}\n) {\n return new Glob(pattern, options).walk()\n}\n\n/**\n * Return a sync iterator for walking glob pattern matches.\n */\nexport function globIterateSync(\n pattern: string | string[],\n options?: GlobOptionsWithFileTypesUnset | undefined\n): Generator\nexport function globIterateSync(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesTrue\n): Generator\nexport function globIterateSync(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesFalse\n): Generator\nexport function globIterateSync(\n pattern: string | string[],\n options: GlobOptions\n): Generator | Generator\nexport function globIterateSync(\n pattern: string | string[],\n options: GlobOptions = {}\n) {\n return new Glob(pattern, options).iterateSync()\n}\n\n/**\n * Return an async iterator for walking glob pattern matches.\n */\nexport function globIterate(\n pattern: string | string[],\n options?: GlobOptionsWithFileTypesUnset | undefined\n): AsyncGenerator\nexport function globIterate(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesTrue\n): AsyncGenerator\nexport function globIterate(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesFalse\n): AsyncGenerator\nexport function globIterate(\n pattern: string | string[],\n options: GlobOptions\n): AsyncGenerator | AsyncGenerator\nexport function globIterate(\n pattern: string | string[],\n options: GlobOptions = {}\n) {\n return new Glob(pattern, options).iterate()\n}\n\n// aliases: glob.sync.stream() glob.stream.sync() glob.sync() etc\nexport const streamSync = globStreamSync\nexport const stream = Object.assign(globStream, { sync: globStreamSync })\nexport const iterateSync = globIterateSync\nexport const iterate = Object.assign(globIterate, {\n sync: globIterateSync,\n})\nexport const sync = Object.assign(globSync, {\n stream: globStreamSync,\n iterate: globIterateSync,\n})\n\n/* c8 ignore start */\nexport { escape, unescape } from 'minimatch'\nexport { Glob } from './glob.js'\nexport type {\n GlobOptions,\n GlobOptionsWithFileTypesFalse,\n GlobOptionsWithFileTypesTrue,\n GlobOptionsWithFileTypesUnset,\n} from './glob.js'\nexport { hasMagic } from './has-magic.js'\nexport type { IgnoreLike } from './ignore.js'\nexport type { MatchStream } from './walker.js'\n/* c8 ignore stop */\n\nexport const glob = Object.assign(glob_, {\n glob: glob_,\n globSync,\n sync,\n globStream,\n stream,\n globStreamSync,\n streamSync,\n globIterate,\n iterate,\n globIterateSync,\n iterateSync,\n Glob,\n hasMagic,\n escape,\n unescape,\n})\nglob.glob = glob\n"]} \ No newline at end of file diff --git a/deps/npm/node_modules/glob/dist/mjs/package.json b/deps/npm/node_modules/glob/dist/mjs/package.json index ff3441b45957b2..3dbc1ca591c055 100644 --- a/deps/npm/node_modules/glob/dist/mjs/package.json +++ b/deps/npm/node_modules/glob/dist/mjs/package.json @@ -1,4 +1,3 @@ { - "version": "10.2.1", "type": "module" } diff --git a/deps/npm/node_modules/glob/dist/mjs/pattern.d.ts b/deps/npm/node_modules/glob/dist/mjs/pattern.d.ts deleted file mode 100644 index 109cc4e7a5dae3..00000000000000 --- a/deps/npm/node_modules/glob/dist/mjs/pattern.d.ts +++ /dev/null @@ -1,77 +0,0 @@ -/// -import { GLOBSTAR } from 'minimatch'; -export type MMPattern = string | RegExp | typeof GLOBSTAR; -export type PatternList = [p: MMPattern, ...rest: MMPattern[]]; -export type UNCPatternList = [ - p0: '', - p1: '', - p2: string, - p3: string, - ...rest: MMPattern[] -]; -export type DrivePatternList = [p0: string, ...rest: MMPattern[]]; -export type AbsolutePatternList = [p0: '', ...rest: MMPattern[]]; -export type GlobList = [p: string, ...rest: string[]]; -/** - * An immutable-ish view on an array of glob parts and their parsed - * results - */ -export declare class Pattern { - #private; - readonly length: number; - constructor(patternList: MMPattern[], globList: string[], index: number, platform: NodeJS.Platform); - /** - * The first entry in the parsed list of patterns - */ - pattern(): MMPattern; - /** - * true of if pattern() returns a string - */ - isString(): boolean; - /** - * true of if pattern() returns GLOBSTAR - */ - isGlobstar(): boolean; - /** - * true if pattern() returns a regexp - */ - isRegExp(): boolean; - /** - * The /-joined set of glob parts that make up this pattern - */ - globString(): string; - /** - * true if there are more pattern parts after this one - */ - hasMore(): boolean; - /** - * The rest of the pattern after this part, or null if this is the end - */ - rest(): Pattern | null; - /** - * true if the pattern represents a //unc/path/ on windows - */ - isUNC(): boolean; - /** - * True if the pattern starts with a drive letter on Windows - */ - isDrive(): boolean; - /** - * True if the pattern is rooted on an absolute path - */ - isAbsolute(): boolean; - /** - * consume the root of the pattern, and return it - */ - root(): string; - /** - * Check to see if the current globstar pattern is allowed to follow - * a symbolic link. - */ - checkFollowGlobstar(): boolean; - /** - * Mark that the current globstar pattern is following a symbolic link - */ - markFollowGlobstar(): boolean; -} -//# sourceMappingURL=pattern.d.ts.map \ No newline at end of file diff --git a/deps/npm/node_modules/glob/dist/mjs/pattern.d.ts.map b/deps/npm/node_modules/glob/dist/mjs/pattern.d.ts.map deleted file mode 100644 index 1430a77dadbbe4..00000000000000 --- a/deps/npm/node_modules/glob/dist/mjs/pattern.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"pattern.d.ts","sourceRoot":"","sources":["../../src/pattern.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AACpC,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG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AM;IAOd;;;OAGG;IACH,mBAAmB,IAAI,OAAO;IAQ9B;;OAEG;IACH,kBAAkB,IAAI,OAAO;CAM9B"} \ No newline at end of file diff --git a/deps/npm/node_modules/glob/dist/mjs/pattern.js.map b/deps/npm/node_modules/glob/dist/mjs/pattern.js.map deleted file mode 100644 index bb039c142107fc..00000000000000 --- a/deps/npm/node_modules/glob/dist/mjs/pattern.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"pattern.js","sourceRoot":"","sources":["../../src/pattern.ts"],"names":[],"mappings":"AAAA,yEAAyE;AAEzE,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AAgBpC,MAAM,aAAa,GAAG,CAAC,EAAe,EAAqB,EAAE,CAC3D,EAAE,CAAC,MAAM,IAAI,CAAC,CAAA;AAChB,MAAM,UAAU,GAAG,CAAC,EAAY,EAAkB,EAAE,CAAC,EAAE,CAAC,MAAM,IAAI,CAAC,CAAA;AAEnE;;;GAGG;AACH,MAAM,OAAO,OAAO;IACT,YAAY,CAAa;IACzB,SAAS,CAAU;IACnB,MAAM,CAAQ;IACd,MAAM,CAAQ;IACd,SAAS,CAAiB;IACnC,KAAK,CAAiB;IACtB,WAAW,CAAS;IACpB,QAAQ,CAAU;IAClB,MAAM,CAAU;IAChB,WAAW,CAAU;IACrB,eAAe,GAAY,IAAI,CAAA;IAE/B,YACE,WAAwB,EACxB,QAAkB,EAClB,KAAa,EACb,QAAyB;QAEzB,IAAI,CAAC,aAAa,CAAC,WAAW,CAAC,EAAE;YAC/B,MAAM,IAAI,SAAS,CAAC,oBAAoB,CAAC,CAAA;SAC1C;QACD,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE;YACzB,MAAM,IAAI,SAAS,CAAC,iBAAiB,CAAC,CAAA;SACvC;QACD,IAAI,QAAQ,CAAC,MAAM,KAAK,WAAW,CAAC,MAAM,EAAE;YAC1C,MAAM,IAAI,SAAS,CAAC,+CAA+C,CAAC,CAAA;SACrE;Q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AsC;IACtC,kDAAkD;IAClD,oDAAoD;IACpD;;OAEG;IACH,UAAU;QACR,MAAM,EAAE,GAAG,IAAI,CAAC,YAAY,CAAA;QAC5B,OAAO,IAAI,CAAC,WAAW,KAAK,SAAS;YACnC,CAAC,CAAC,IAAI,CAAC,WAAW;YAClB,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW;gBACf,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC;oBAC/B,IAAI,CAAC,OAAO,EAAE;oBACd,IAAI,CAAC,KAAK,EAAE,CAAC,CAAA;IACrB,CAAC;IAED;;OAEG;IACH,IAAI;QACF,MAAM,CAAC,GAAG,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,CAAA;QAC9B,OAAO,OAAO,CAAC,KAAK,QAAQ,IAAI,IAAI,CAAC,UAAU,EAAE,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC;YACpE,CAAC,CAAC,CAAC;YACH,CAAC,CAAC,EAAE,CAAA;IACR,CAAC;IAED;;;OAGG;IACH,mBAAmB;QACjB,OAAO,CAAC,CACN,IAAI,CAAC,MAAM,KAAK,CAAC;YACjB,CAAC,IAAI,CAAC,UAAU,EAAE;YAClB,CAAC,IAAI,CAAC,eAAe,CACtB,CAAA;IACH,CAAC;IAED;;OAEG;IACH,kBAAkB;QAChB,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,IAAI,CAAC,eAAe;YAClE,OAAO,KAAK,CAAA;QACd,IAAI,CAAC,eAAe,GAAG,KAAK,CAAA;QAC5B,OAAO,IAAI,CAAA;IACb,CAAC;CACF","sourcesContent":["// this is just a very light wrapper around 2 arrays with an offset index\n\nimport { GLOBSTAR } from 'minimatch'\nexport type MMPattern = string | RegExp | typeof GLOBSTAR\n\n// an array of length >= 1\nexport type PatternList = [p: MMPattern, ...rest: MMPattern[]]\nexport type UNCPatternList = [\n p0: '',\n p1: '',\n p2: string,\n p3: string,\n ...rest: MMPattern[]\n]\nexport type DrivePatternList = [p0: string, ...rest: MMPattern[]]\nexport type AbsolutePatternList = [p0: '', ...rest: MMPattern[]]\nexport type GlobList = [p: string, ...rest: string[]]\n\nconst isPatternList = (pl: MMPattern[]): pl is PatternList =>\n pl.length >= 1\nconst isGlobList = (gl: string[]): gl is GlobList => gl.length >= 1\n\n/**\n * An immutable-ish view on an array of glob parts and their parsed\n * results\n */\nexport class Pattern {\n readonly #patternList: PatternList\n readonly #globList: GlobList\n readonly #index: number\n readonly length: number\n readonly #platform: NodeJS.Platform\n #rest?: Pattern | null\n #globString?: string\n #isDrive?: boolean\n #isUNC?: boolean\n #isAbsolute?: boolean\n #followGlobstar: boolean = true\n\n constructor(\n patternList: MMPattern[],\n globList: string[],\n index: number,\n platform: NodeJS.Platform\n ) {\n if (!isPatternList(patternList)) {\n throw new TypeError('empty pattern list')\n }\n if (!isGlobList(globList)) {\n throw new TypeError('empty glob list')\n }\n if (globList.length !== patternList.length) {\n throw new TypeError('mismatched pattern list and glob list lengths')\n }\n this.length = patternList.length\n if (index < 0 || index >= this.length) {\n throw new TypeError('index out of range')\n }\n this.#patternList = patternList\n this.#globList = globList\n this.#index = index\n this.#platform = platform\n\n // normalize root entries of absolute patterns on initial creation.\n if (this.#index === 0) {\n // c: => ['c:/']\n // C:/ => ['C:/']\n // C:/x => ['C:/', 'x']\n // //host/share => ['//host/share/']\n // //host/share/ => ['//host/share/']\n // //host/share/x => ['//host/share/', 'x']\n // /etc => ['/', 'etc']\n // / => ['/']\n if (this.isUNC()) {\n // '' / '' / 'host' / 'share'\n const [p0, p1, p2, p3, ...prest] = this.#patternList\n const [g0, g1, g2, g3, ...grest] = this.#globList\n if (prest[0] === '') {\n // ends in /\n prest.shift()\n grest.shift()\n }\n const p = [p0, p1, p2, p3, ''].join('/')\n const g = [g0, g1, g2, g3, ''].join('/')\n this.#patternList = [p, ...prest]\n this.#globList = [g, ...grest]\n this.length = this.#patternList.length\n } else if (this.isDrive() || this.isAbsolute()) {\n const [p1, ...prest] = this.#patternList\n const [g1, ...grest] = this.#globList\n if (prest[0] === '') {\n // ends in /\n prest.shift()\n grest.shift()\n }\n const p = (p1 as string) + '/'\n const g = g1 + '/'\n this.#patternList = [p, ...prest]\n this.#globList = [g, ...grest]\n this.length = this.#patternList.length\n }\n }\n }\n\n /**\n * The first entry in the parsed list of patterns\n */\n pattern(): MMPattern {\n return this.#patternList[this.#index]\n }\n\n /**\n * true of if pattern() returns a string\n */\n isString(): boolean {\n return typeof this.#patternList[this.#index] === 'string'\n }\n /**\n * true of if pattern() returns GLOBSTAR\n */\n isGlobstar(): boolean {\n return this.#patternList[this.#index] === GLOBSTAR\n }\n /**\n * true if pattern() returns a regexp\n */\n isRegExp(): boolean {\n return this.#patternList[this.#index] instanceof RegExp\n }\n\n /**\n * The /-joined set of glob parts that make up this pattern\n */\n globString(): string {\n return (this.#globString =\n this.#globString ||\n (this.#index === 0\n ? this.isAbsolute()\n ? this.#globList[0] + this.#globList.slice(1).join('/')\n : this.#globList.join('/')\n : this.#globList.slice(this.#index).join('/')))\n }\n\n /**\n * true if there are more pattern parts after this one\n */\n hasMore(): boolean {\n return this.length > this.#index + 1\n }\n\n /**\n * The rest of the pattern after this part, or null if this is the end\n */\n rest(): Pattern | null {\n if (this.#rest !== undefined) return this.#rest\n if (!this.hasMore()) return (this.#rest = null)\n this.#rest = new Pattern(\n this.#patternList,\n this.#globList,\n this.#index + 1,\n this.#platform\n )\n this.#rest.#isAbsolute = this.#isAbsolute\n this.#rest.#isUNC = this.#isUNC\n this.#rest.#isDrive = this.#isDrive\n return this.#rest\n }\n\n /**\n * true if the pattern represents a //unc/path/ on windows\n */\n isUNC(): boolean {\n const pl = this.#patternList\n return this.#isUNC !== undefined\n ? this.#isUNC\n : (this.#isUNC =\n this.#platform === 'win32' &&\n this.#index === 0 &&\n pl[0] === '' &&\n pl[1] === '' &&\n typeof pl[2] === 'string' &&\n !!pl[2] &&\n typeof pl[3] === 'string' &&\n !!pl[3])\n }\n\n // pattern like C:/...\n // split = ['C:', ...]\n // XXX: would be nice to handle patterns like `c:*` to test the cwd\n // in c: for *, but I don't know of a way to even figure out what that\n // cwd is without actually chdir'ing into it?\n /**\n * True if the pattern starts with a drive letter on Windows\n */\n isDrive(): boolean {\n const pl = this.#patternList\n return this.#isDrive !== undefined\n ? this.#isDrive\n : (this.#isDrive =\n this.#platform === 'win32' &&\n this.#index === 0 &&\n this.length > 1 &&\n typeof pl[0] === 'string' &&\n /^[a-z]:$/i.test(pl[0]))\n }\n\n // pattern = '/' or '/...' or '/x/...'\n // split = ['', ''] or ['', ...] or ['', 'x', ...]\n // Drive and UNC both considered absolute on windows\n /**\n * True if the pattern is rooted on an absolute path\n */\n isAbsolute(): boolean {\n const pl = this.#patternList\n return this.#isAbsolute !== undefined\n ? this.#isAbsolute\n : (this.#isAbsolute =\n (pl[0] === '' && pl.length > 1) ||\n this.isDrive() ||\n this.isUNC())\n }\n\n /**\n * consume the root of the pattern, and return it\n */\n root(): string {\n const p = this.#patternList[0]\n return typeof p === 'string' && this.isAbsolute() && this.#index === 0\n ? p\n : ''\n }\n\n /**\n * Check to see if the current globstar pattern is allowed to follow\n * a symbolic link.\n */\n checkFollowGlobstar(): boolean {\n return !(\n this.#index === 0 ||\n !this.isGlobstar() ||\n !this.#followGlobstar\n )\n }\n\n /**\n * Mark that the current globstar pattern is following a symbolic link\n */\n markFollowGlobstar(): boolean {\n if (this.#index === 0 || !this.isGlobstar() || !this.#followGlobstar)\n return false\n this.#followGlobstar = false\n return true\n }\n}\n"]} \ No newline at end of file diff --git a/deps/npm/node_modules/glob/dist/mjs/processor.d.ts b/deps/npm/node_modules/glob/dist/mjs/processor.d.ts deleted file mode 100644 index ccedfbf2820f7d..00000000000000 --- a/deps/npm/node_modules/glob/dist/mjs/processor.d.ts +++ /dev/null @@ -1,59 +0,0 @@ -import { MMRegExp } from 'minimatch'; -import { Path } from 'path-scurry'; -import { Pattern } from './pattern.js'; -import { GlobWalkerOpts } from './walker.js'; -/** - * A cache of which patterns have been processed for a given Path - */ -export declare class HasWalkedCache { - store: Map>; - constructor(store?: Map>); - copy(): HasWalkedCache; - hasWalked(target: Path, pattern: Pattern): boolean | undefined; - storeWalked(target: Path, pattern: Pattern): void; -} -/** - * A record of which paths have been matched in a given walk step, - * and whether they only are considered a match if they are a directory, - * and whether their absolute or relative path should be returned. - */ -export declare class MatchRecord { - store: Map; - add(target: Path, absolute: boolean, ifDir: boolean): void; - entries(): [Path, boolean, boolean][]; -} -/** - * A collection of patterns that must be processed in a subsequent step - * for a given path. - */ -export declare class SubWalks { - store: Map; - add(target: Path, pattern: Pattern): void; - get(target: Path): Pattern[]; - entries(): [Path, Pattern[]][]; - keys(): Path[]; -} -/** - * The class that processes patterns for a given path. - * - * Handles child entry filtering, and determining whether a path's - * directory contents must be read. - */ -export declare class Processor { - hasWalkedCache: HasWalkedCache; - matches: MatchRecord; - subwalks: SubWalks; - patterns?: Pattern[]; - follow: boolean; - dot: boolean; - opts: GlobWalkerOpts; - constructor(opts: GlobWalkerOpts, hasWalkedCache?: HasWalkedCache); - processPatterns(target: Path, patterns: Pattern[]): this; - subwalkTargets(): Path[]; - child(): Processor; - filterEntries(parent: Path, entries: Path[]): Processor; - testGlobstar(e: Path, pattern: Pattern, rest: Pattern | null, absolute: boolean): void; - testRegExp(e: Path, p: MMRegExp, rest: Pattern | null, absolute: boolean): void; - testString(e: Path, p: string, rest: Pattern | null, absolute: boolean): void; -} -//# sourceMappingURL=processor.d.ts.map \ No newline at end of file diff --git a/deps/npm/node_modules/glob/dist/mjs/processor.d.ts.map b/deps/npm/node_modules/glob/dist/mjs/processor.d.ts.map deleted file mode 100644 index 75d92efe28cb1d..00000000000000 --- a/deps/npm/node_modules/glob/dist/mjs/processor.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"processor.d.ts","sourceRoot":"","sources":["../../src/processor.ts"],"names":[],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EAAE,CAAA;IACpB,MAAM,EAAE,OAAO,CAAA;IACf,GAAG,EAAE,OAAO,CAAA;IACZ,IAAI,EAAE,cAAc,CAAA;gBAER,IAAI,EAAE,cAAc,EAAE,cAAc,CAAC,EAAE,cAAc;IASjE,eAAe,CAAC,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE;IAwGjD,cAAc,IAAI,IAAI,EAAE;IAIxB,KAAK;IAQL,aAAa,CAAC,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,SAAS;IAqBvD,YAAY,CACV,CAAC,EAAE,IAAI,EACP,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,OAAO,GAAG,IAAI,EACpB,QAAQ,EAAE,OAAO;IA8CnB,UAAU,CACR,CAAC,EAAE,IAAI,EACP,CAAC,EAAE,QAAQ,EACX,IAAI,EAAE,OAAO,GAAG,IAAI,EACpB,QAAQ,EAAE,OAAO;IAUnB,UAAU,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,IAAI,EAAE,QAAQ,EAAE,OAAO;CASvE"} \ No newline at end of file diff --git a/deps/npm/node_modules/glob/dist/mjs/processor.js.map b/deps/npm/node_modules/glob/dist/mjs/processor.js.map deleted file mode 100644 index bf17d8e99b04a6..00000000000000 --- a/deps/npm/node_modules/glob/dist/mjs/processor.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"processor.js","sourceRoot":"","sources":["../../src/processor.ts"],"names":[],"mappings":"AAAA,qEAAqE;AAErE,OAAO,EAAE,QAAQ,EAAY,MAAM,WAAW,CAAA;AAK9C;;GAEG;AACH,MAAM,OAAO,cAAc;IACzB,KAAK,CAA0B;IAC/B,YAAY,QAAkC,IAAI,GAAG,EAAE;QACrD,IAAI,CAAC,KAAK,GAAG,KAAK,CAAA;IACpB,CAAC;IACD,IAAI;QACF,OAAO,IAAI,cAAc,CAAC,IAAI,GAAG,CA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AC,EAAE,IAAI,CAAC,CAAA;SAC3B;IACH,CAAC;IAED,UAAU,CAAC,CAAO,EAAE,CAAS,EAAE,IAAoB,EAAE,QAAiB;QACpE,uBAAuB;QACvB,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;YAAE,OAAM;QACzB,IAAI,CAAC,IAAI,EAAE;YACT,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAA;SACrC;aAAM;YACL,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,CAAA;SAC3B;IACH,CAAC;CACF","sourcesContent":["// synchronous utility for filtering entries and calculating subwalks\n\nimport { GLOBSTAR, MMRegExp } from 'minimatch'\nimport { Path } from 'path-scurry'\nimport { MMPattern, Pattern } from './pattern.js'\nimport { GlobWalkerOpts } from './walker.js'\n\n/**\n * A cache of which patterns have been processed for a given Path\n */\nexport class HasWalkedCache {\n store: Map>\n constructor(store: Map> = new Map()) {\n this.store = store\n }\n copy() {\n return new HasWalkedCache(new Map(this.store))\n }\n hasWalked(target: Path, pattern: Pattern) {\n return this.store.get(target.fullpath())?.has(pattern.globString())\n }\n storeWalked(target: Path, pattern: Pattern) {\n const fullpath = target.fullpath()\n const cached = this.store.get(fullpath)\n if (cached) cached.add(pattern.globString())\n else this.store.set(fullpath, new Set([pattern.globString()]))\n }\n}\n\n/**\n * A record of which paths have been matched in a given walk step,\n * and whether they only are considered a match if they are a directory,\n * and whether their absolute or relative path should be returned.\n */\nexport class MatchRecord {\n store: Map = new Map()\n add(target: Path, absolute: boolean, ifDir: boolean) {\n const n = (absolute ? 2 : 0) | (ifDir ? 1 : 0)\n const current = this.store.get(target)\n this.store.set(target, current === undefined ? n : n & current)\n }\n // match, absolute, ifdir\n entries(): [Path, boolean, boolean][] {\n return [...this.store.entries()].map(([path, n]) => [\n path,\n !!(n & 2),\n !!(n & 1),\n ])\n }\n}\n\n/**\n * A collection of patterns that must be processed in a subsequent step\n * for a given path.\n */\nexport class SubWalks {\n store: Map = new Map()\n add(target: Path, pattern: Pattern) {\n if (!target.canReaddir()) {\n return\n }\n const subs = this.store.get(target)\n if (subs) {\n if (!subs.find(p => p.globString() === pattern.globString())) {\n subs.push(pattern)\n }\n } else this.store.set(target, [pattern])\n }\n get(target: Path): Pattern[] {\n const subs = this.store.get(target)\n /* c8 ignore start */\n if (!subs) {\n throw new Error('attempting to walk unknown path')\n }\n /* c8 ignore stop */\n return subs\n }\n entries(): [Path, Pattern[]][] {\n return this.keys().map(k => [k, this.store.get(k) as Pattern[]])\n }\n keys(): Path[] {\n return [...this.store.keys()].filter(t => t.canReaddir())\n }\n}\n\n/**\n * The class that processes patterns for a given path.\n *\n * Handles child entry filtering, and determining whether a path's\n * directory contents must be read.\n */\nexport class Processor {\n hasWalkedCache: HasWalkedCache\n matches = new MatchRecord()\n subwalks = new SubWalks()\n patterns?: Pattern[]\n follow: boolean\n dot: boolean\n opts: GlobWalkerOpts\n\n constructor(opts: GlobWalkerOpts, hasWalkedCache?: HasWalkedCache) {\n this.opts = opts\n this.follow = !!opts.follow\n this.dot = !!opts.dot\n this.hasWalkedCache = hasWalkedCache\n ? hasWalkedCache.copy()\n : new HasWalkedCache()\n }\n\n processPatterns(target: Path, patterns: Pattern[]) {\n this.patterns = patterns\n const processingSet: [Path, Pattern][] = patterns.map(p => [target, p])\n\n // map of paths to the magic-starting subwalks they need to walk\n // first item in patterns is the filter\n\n for (let [t, pattern] of processingSet) {\n this.hasWalkedCache.storeWalked(t, pattern)\n\n const root = pattern.root()\n const absolute = pattern.isAbsolute() && this.opts.absolute !== false\n\n // start absolute patterns at root\n if (root) {\n t = t.resolve(\n root === '/' && this.opts.root !== undefined\n ? this.opts.root\n : root\n )\n const rest = pattern.rest()\n if (!rest) {\n this.matches.add(t, true, false)\n continue\n } else {\n pattern = rest\n }\n }\n\n if (t.isENOENT()) continue\n\n let p: MMPattern\n let rest: Pattern | null\n let changed = false\n while (\n typeof (p = pattern.pattern()) === 'string' &&\n (rest = pattern.rest())\n ) {\n const c = t.resolve(p)\n // we can be reasonably sure that .. is a readable dir\n if (c.isUnknown() && p !== '..') break\n t = c\n pattern = rest\n changed = true\n }\n p = pattern.pattern()\n rest = pattern.rest()\n if (changed) {\n if (this.hasWalkedCache.hasWalked(t, pattern)) continue\n this.hasWalkedCache.storeWalked(t, pattern)\n }\n\n // now we have either a final string for a known entry,\n // more strings for an unknown entry,\n // or a pattern starting with magic, mounted on t.\n if (typeof p === 'string') {\n // must be final entry\n if (!rest) {\n const ifDir = p === '..' || p === '' || p === '.'\n this.matches.add(t.resolve(p), absolute, ifDir)\n } else {\n this.subwalks.add(t, pattern)\n }\n continue\n } else if (p === GLOBSTAR) {\n // if no rest, match and subwalk pattern\n // if rest, process rest and subwalk pattern\n // if it's a symlink, but we didn't get here by way of a\n // globstar match (meaning it's the first time THIS globstar\n // has traversed a symlink), then we follow it. Otherwise, stop.\n if (\n !t.isSymbolicLink() ||\n this.follow ||\n pattern.checkFollowGlobstar()\n ) {\n this.subwalks.add(t, pattern)\n }\n const rp = rest?.pattern()\n const rrest = rest?.rest()\n if (!rest || ((rp === '' || rp === '.') && !rrest)) {\n // only HAS to be a dir if it ends in **/ or **/.\n // but ending in ** will match files as well.\n this.matches.add(t, absolute, rp === '' || rp === '.')\n } else {\n if (rp === '..') {\n // this would mean you're matching **/.. at the fs root,\n // and no thanks, I'm not gonna test that specific case.\n /* c8 ignore start */\n const tp = t.parent || t\n /* c8 ignore stop */\n if (!rrest) this.matches.add(tp, absolute, true)\n else if (!this.hasWalkedCache.hasWalked(tp, rrest)) {\n this.subwalks.add(tp, rrest)\n }\n }\n }\n } else if (p instanceof RegExp) {\n this.subwalks.add(t, pattern)\n }\n }\n\n return this\n }\n\n subwalkTargets(): Path[] {\n return this.subwalks.keys()\n }\n\n child() {\n return new Processor(this.opts, this.hasWalkedCache)\n }\n\n // return a new Processor containing the subwalks for each\n // child entry, and a set of matches, and\n // a hasWalkedCache that's a copy of this one\n // then we're going to call\n filterEntries(parent: Path, entries: Path[]): Processor {\n const patterns = this.subwalks.get(parent)\n // put matches and entry walks into the results processor\n const results = this.child()\n for (const e of entries) {\n for (const pattern of patterns) {\n const absolute = pattern.isAbsolute()\n const p = pattern.pattern()\n const rest = pattern.rest()\n if (p === GLOBSTAR) {\n results.testGlobstar(e, pattern, rest, absolute)\n } else if (p instanceof RegExp) {\n results.testRegExp(e, p, rest, absolute)\n } else {\n results.testString(e, p, rest, absolute)\n }\n }\n }\n return results\n }\n\n testGlobstar(\n e: Path,\n pattern: Pattern,\n rest: Pattern | null,\n absolute: boolean\n ) {\n if (this.dot || !e.name.startsWith('.')) {\n if (!pattern.hasMore()) {\n this.matches.add(e, absolute, false)\n }\n if (e.canReaddir()) {\n // if we're in follow mode or it's not a symlink, just keep\n // testing the same pattern. If there's more after the globstar,\n // then this symlink consumes the globstar. If not, then we can\n // follow at most ONE symlink along the way, so we mark it, which\n // also checks to ensure that it wasn't already marked.\n if (this.follow || !e.isSymbolicLink()) {\n this.subwalks.add(e, pattern)\n } else if (e.isSymbolicLink()) {\n if (rest && pattern.checkFollowGlobstar()) {\n this.subwalks.add(e, rest)\n } else if (pattern.markFollowGlobstar()) {\n this.subwalks.add(e, pattern)\n }\n }\n }\n }\n // if the NEXT thing matches this entry, then also add\n // the rest.\n if (rest) {\n const rp = rest.pattern()\n if (\n typeof rp === 'string' &&\n // dots and empty were handled already\n rp !== '..' &&\n rp !== '' &&\n rp !== '.'\n ) {\n this.testString(e, rp, rest.rest(), absolute)\n } else if (rp === '..') {\n /* c8 ignore start */\n const ep = e.parent || e\n /* c8 ignore stop */\n this.subwalks.add(ep, rest)\n } else if (rp instanceof RegExp) {\n this.testRegExp(e, rp, rest.rest(), absolute)\n }\n }\n }\n\n testRegExp(\n e: Path,\n p: MMRegExp,\n rest: Pattern | null,\n absolute: boolean\n ) {\n if (!p.test(e.name)) return\n if (!rest) {\n this.matches.add(e, absolute, false)\n } else {\n this.subwalks.add(e, rest)\n }\n }\n\n testString(e: Path, p: string, rest: Pattern | null, absolute: boolean) {\n // should never happen?\n if (!e.isNamed(p)) return\n if (!rest) {\n this.matches.add(e, absolute, false)\n } else {\n this.subwalks.add(e, rest)\n }\n }\n}\n"]} \ No newline at end of file diff --git a/deps/npm/node_modules/glob/dist/mjs/walker.d.ts b/deps/npm/node_modules/glob/dist/mjs/walker.d.ts deleted file mode 100644 index 5c1a0414971b3a..00000000000000 --- a/deps/npm/node_modules/glob/dist/mjs/walker.d.ts +++ /dev/null @@ -1,96 +0,0 @@ -/// -/** - * Single-use utility classes to provide functionality to the {@link Glob} - * methods. - * - * @module - */ -import { Minipass } from 'minipass'; -import { Path } from 'path-scurry'; -import { IgnoreLike } from './ignore.js'; -import { Pattern } from './pattern.js'; -import { Processor } from './processor.js'; -export interface GlobWalkerOpts { - absolute?: boolean; - allowWindowsEscape?: boolean; - cwd?: string | URL; - dot?: boolean; - dotRelative?: boolean; - follow?: boolean; - ignore?: string | string[] | IgnoreLike; - mark?: boolean; - matchBase?: boolean; - maxDepth?: number; - nobrace?: boolean; - nocase?: boolean; - nodir?: boolean; - noext?: boolean; - noglobstar?: boolean; - platform?: NodeJS.Platform; - posix?: boolean; - realpath?: boolean; - root?: string; - stat?: boolean; - signal?: AbortSignal; - windowsPathsNoEscape?: boolean; - withFileTypes?: boolean; -} -export type GWOFileTypesTrue = GlobWalkerOpts & { - withFileTypes: true; -}; -export type GWOFileTypesFalse = GlobWalkerOpts & { - withFileTypes: false; -}; -export type GWOFileTypesUnset = GlobWalkerOpts & { - withFileTypes?: undefined; -}; -export type Result = O extends GWOFileTypesTrue ? Path : O extends GWOFileTypesFalse ? string : O extends GWOFileTypesUnset ? string : Path | string; -export type Matches = O extends GWOFileTypesTrue ? Set : O extends GWOFileTypesFalse ? Set : O extends GWOFileTypesUnset ? Set : Set; -export type MatchStream = O extends GWOFileTypesTrue ? Minipass : O extends GWOFileTypesFalse ? Minipass : O extends GWOFileTypesUnset ? Minipass : Minipass; -/** - * basic walking utilities that all the glob walker types use - */ -export declare abstract class GlobUtil { - #private; - path: Path; - patterns: Pattern[]; - opts: O; - seen: Set; - paused: boolean; - aborted: boolean; - signal?: AbortSignal; - maxDepth: number; - constructor(patterns: Pattern[], path: Path, opts: O); - pause(): void; - resume(): void; - onResume(fn: () => any): void; - matchCheck(e: Path, ifDir: boolean): Promise; - matchCheckTest(e: Path | undefined, ifDir: boolean): Path | undefined; - matchCheckSync(e: Path, ifDir: boolean): Path | undefined; - abstract matchEmit(p: Result): void; - abstract matchEmit(p: string | Path): void; - matchFinish(e: Path, absolute: boolean): void; - match(e: Path, absolute: boolean, ifDir: boolean): Promise; - matchSync(e: Path, absolute: boolean, ifDir: boolean): void; - walkCB(target: Path, patterns: Pattern[], cb: () => any): void; - walkCB2(target: Path, patterns: Pattern[], processor: Processor, cb: () => any): any; - walkCB3(target: Path, entries: Path[], processor: Processor, cb: () => any): void; - walkCBSync(target: Path, patterns: Pattern[], cb: () => any): void; - walkCB2Sync(target: Path, patterns: Pattern[], processor: Processor, cb: () => any): any; - walkCB3Sync(target: Path, entries: Path[], processor: Processor, cb: () => any): void; -} -export declare class GlobWalker extends GlobUtil { - matches: O extends GWOFileTypesTrue ? Set : O extends GWOFileTypesFalse ? Set : O extends GWOFileTypesUnset ? Set : Set; - constructor(patterns: Pattern[], path: Path, opts: O); - matchEmit(e: Result): void; - walk(): Promise>; - walkSync(): Matches; -} -export declare class GlobStream extends GlobUtil { - results: O extends GWOFileTypesTrue ? Minipass : O extends GWOFileTypesFalse ? Minipass : O extends GWOFileTypesUnset ? Minipass : Minipass; - constructor(patterns: Pattern[], path: Path, opts: O); - matchEmit(e: Result): void; - stream(): MatchStream; - streamSync(): MatchStream; -} -//# sourceMappingURL=walker.d.ts.map \ No newline at end of file diff --git a/deps/npm/node_modules/glob/dist/mjs/walker.d.ts.map b/deps/npm/node_modules/glob/dist/mjs/walker.d.ts.map deleted file mode 100644 index 7c8df20b2f323c..00000000000000 --- a/deps/npm/node_modules/glob/dist/mjs/walker.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"walker.d.ts","sourceRoot":"","sources":["../../src/walker.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AACnC,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAClC,OAAO,EAAU,UAAU,EAAE,MAAM,aAAa,CAAA;AAOhD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAE1C,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,GAAG,CAAC,EAAE,MAAM,GAAG,GAAG,CAAA;IAClB,GAAG,CAAC,EAAE,OAAO,CAAA;IACb,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,UAAU,CAAA;IACvC,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,SAAS,CAAC,EAAE,OAAO,CAAA;IAGnB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC,QAAQ,CAAA;IAC1B,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,MAAM,CAAC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AAG,cAAc,CACzC,SAAQ,QAAQ,CAAC,CAAC,CAAC;IACnB,OAAO,EAAE,CAAC,SAAS,gBAAgB,GAC/B,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,GACpB,CAAC,SAAS,iBAAiB,GAC3B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,GACxB,CAAC,SAAS,iBAAiB,GAC3B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,GACxB,QAAQ,CAAC,IAAI,GAAG,MAAM,EAAE,IAAI,GAAG,MAAM,CAAC,CAAA;gBAE9B,QAAQ,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IAUpD,SAAS,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,GAAG,IAAI;IAM7B,MAAM,IAAI,WAAW,CAAC,CAAC,CAAC;IAYxB,UAAU,IAAI,WAAW,CAAC,CAAC,CAAC;CAO7B"} \ No newline at end of file diff --git a/deps/npm/node_modules/glob/dist/mjs/walker.js b/deps/npm/node_modules/glob/dist/mjs/walker.js index 6f3358b0c39a32..349314e297a106 100644 --- a/deps/npm/node_modules/glob/dist/mjs/walker.js +++ b/deps/npm/node_modules/glob/dist/mjs/walker.js @@ -4,7 +4,7 @@ * * @module */ -import { Minipass } from 'minipass'; +import Minipass from 'minipass'; import { Ignore } from './ignore.js'; import { Processor } from './processor.js'; const makeIgnore = (ignore, opts) => typeof ignore === 'string' @@ -31,7 +31,7 @@ export class GlobUtil { this.patterns = patterns; this.path = path; this.opts = opts; - this.#sep = !opts.posix && opts.platform === 'win32' ? '\\' : '/'; + this.#sep = opts.platform === 'win32' ? '\\' : '/'; if (opts.ignore) { this.#ignore = makeIgnore(opts.ignore, opts); } @@ -128,15 +128,14 @@ export class GlobUtil { this.matchEmit(e); } else if (abs) { - const abs = this.opts.posix ? e.fullpathPosix() : e.fullpath(); - this.matchEmit(abs + mark); + this.matchEmit(e.fullpath() + mark); } else { - const rel = this.opts.posix ? e.relativePosix() : e.relative(); + const rel = e.relative(); const pre = this.opts.dotRelative && !rel.startsWith('..' + this.#sep) ? '.' + this.#sep : ''; - this.matchEmit(!rel ? '.' + mark : pre + rel + mark); + this.matchEmit(!rel && mark ? '.' + mark : pre + rel + mark); } } async match(e, absolute, ifDir) { diff --git a/deps/npm/node_modules/glob/dist/mjs/walker.js.map b/deps/npm/node_modules/glob/dist/mjs/walker.js.map deleted file mode 100644 index 8756bfca294503..00000000000000 --- a/deps/npm/node_modules/glob/dist/mjs/walker.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"walker.js","sourceRoot":"","sources":["../../src/walker.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AAEnC,OAAO,EAAE,MAAM,EAAc,MAAM,aAAa,CAAA;AAQhD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAiE1C,MAAM,UAAU,GAAG,CACjB,MAAsC,EACtC,IAAoB,EACR,EAAE,CACd,OAAO,MAAM,KAAK,QAAQ;IACxB,CAAC,CAAC,IAAI,MAAM,CAAC,CAAC,MAAM,CAAC,EAAE,IAAI,CAAC;IAC5B,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC;QACvB,CAAC,CAAC,IAAI,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC;QAC1B,CAAC,CAAC,MAAM,CAAA;AAEZ;;GAEG;AACH,MAAM,OAAgB,QAAQ;IAC5B,IAAI,CAAM;IACV,QAAQ,CAAW;IACnB,IAAI,CAAG;IACP,IAAI,GAAc,IAAI,GAAG,EAAQ,CAAA;IACjC,MAAM,GAAY,KAAK,CAAA;IACvB,OAAO,GAAY,KAAK,CAAA;IACxB,SAAS,GAAkB,EAAE,CAAA;IAC7B,OAAO,CAAa;IACpB,IAAI,CAAY;IAChB,MAAM,CAAc;IACpB,QAAQ,CAAQ;IAGhB,YAAY,QAAmB,EAAE,I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D,SAAS,CAAC,CAAgB;QACxB,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;QACrB,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO;YAAE,IAAI,CAAC,KAAK,EAAE,CAAA;IACzC,CAAC;IAED,MAAM;QACJ,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAA;QACxB,IAAI,MAAM,CAAC,SAAS,EAAE,EAAE;YACtB,MAAM,CAAC,KAAK,EAAE,CAAC,IAAI,CAAC,GAAG,EAAE;gBACvB,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,QAAQ,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,CAAA;YAC9D,CAAC,CAAC,CAAA;SACH;aAAM;YACL,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,QAAQ,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,CAAA;SAC7D;QACD,OAAO,IAAI,CAAC,OAAO,CAAA;IACrB,CAAC;IAED,UAAU;QACR,IAAI,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE;YACzB,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,CAAA;SACtB;QACD,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,QAAQ,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,CAAA;QACnE,OAAO,IAAI,CAAC,OAAO,CAAA;IACrB,CAAC;CACF","sourcesContent":["/**\n * Single-use utility classes to provide functionality to the {@link Glob}\n * methods.\n *\n * @module\n */\nimport { Minipass } from 'minipass'\nimport { Path } from 'path-scurry'\nimport { Ignore, IgnoreLike } from './ignore.js'\n\n// XXX can we somehow make it so that it NEVER processes a given path more than\n// once, enough that the match set tracking is no longer needed? that'd speed\n// things up a lot. Or maybe bring back nounique, and skip it in that case?\n\n// a single minimatch set entry with 1 or more parts\nimport { Pattern } from './pattern.js'\nimport { Processor } from './processor.js'\n\nexport interface GlobWalkerOpts {\n absolute?: boolean\n allowWindowsEscape?: boolean\n cwd?: string | URL\n dot?: boolean\n dotRelative?: boolean\n follow?: boolean\n ignore?: string | string[] | IgnoreLike\n mark?: boolean\n matchBase?: boolean\n // Note: maxDepth here means \"maximum actual Path.depth()\",\n // not \"maximum depth beyond cwd\"\n maxDepth?: number\n nobrace?: boolean\n nocase?: boolean\n nodir?: boolean\n noext?: boolean\n noglobstar?: boolean\n platform?: NodeJS.Platform\n posix?: boolean\n realpath?: boolean\n root?: string\n stat?: boolean\n signal?: AbortSignal\n windowsPathsNoEscape?: boolean\n withFileTypes?: boolean\n}\n\nexport type GWOFileTypesTrue = GlobWalkerOpts & {\n withFileTypes: true\n}\nexport type GWOFileTypesFalse = GlobWalkerOpts & {\n withFileTypes: false\n}\nexport type GWOFileTypesUnset = GlobWalkerOpts & {\n withFileTypes?: undefined\n}\n\nexport type Result = O extends GWOFileTypesTrue\n ? Path\n : O extends GWOFileTypesFalse\n ? string\n : O extends GWOFileTypesUnset\n ? string\n : Path | string\n\nexport type Matches = O extends GWOFileTypesTrue\n ? Set\n : O extends GWOFileTypesFalse\n ? Set\n : O extends GWOFileTypesUnset\n ? Set\n : Set\n\nexport type MatchStream =\n O extends GWOFileTypesTrue\n ? Minipass\n : O extends GWOFileTypesFalse\n ? Minipass\n : O extends GWOFileTypesUnset\n ? Minipass\n : Minipass\n\nconst makeIgnore = (\n ignore: string | string[] | IgnoreLike,\n opts: GlobWalkerOpts\n): IgnoreLike =>\n typeof ignore === 'string'\n ? new Ignore([ignore], opts)\n : Array.isArray(ignore)\n ? new Ignore(ignore, opts)\n : ignore\n\n/**\n * basic walking utilities that all the glob walker types use\n */\nexport abstract class GlobUtil {\n path: Path\n patterns: Pattern[]\n opts: O\n seen: Set = new Set()\n paused: boolean = false\n aborted: boolean = false\n #onResume: (() => any)[] = []\n #ignore?: IgnoreLike\n #sep: '\\\\' | '/'\n signal?: AbortSignal\n maxDepth: number\n\n constructor(patterns: Pattern[], path: Path, opts: O)\n constructor(patterns: Pattern[], path: Path, opts: O) {\n this.patterns = patterns\n this.path = path\n this.opts = opts\n this.#sep = !opts.posix && opts.platform === 'win32' ? '\\\\' : '/'\n if (opts.ignore) {\n this.#ignore = makeIgnore(opts.ignore, opts)\n }\n // ignore, always set with maxDepth, but it's optional on the\n // GlobOptions type\n /* c8 ignore start */\n this.maxDepth = opts.maxDepth || Infinity\n /* c8 ignore stop */\n if (opts.signal) {\n this.signal = opts.signal\n this.signal.addEventListener('abort', () => {\n this.#onResume.length = 0\n })\n }\n }\n\n #ignored(path: Path): boolean {\n return this.seen.has(path) || !!this.#ignore?.ignored?.(path)\n }\n #childrenIgnored(path: Path): boolean {\n return !!this.#ignore?.childrenIgnored?.(path)\n }\n\n // backpressure mechanism\n pause() {\n this.paused = true\n }\n resume() {\n /* c8 ignore start */\n if (this.signal?.aborted) return\n /* c8 ignore stop */\n this.paused = false\n let fn: (() => any) | undefined = undefined\n while (!this.paused && (fn = this.#onResume.shift())) {\n fn()\n }\n }\n onResume(fn: () => any) {\n if (this.signal?.aborted) return\n /* c8 ignore start */\n if (!this.paused) {\n fn()\n } else {\n /* c8 ignore stop */\n this.#onResume.push(fn)\n }\n }\n\n // do the requisite realpath/stat checking, and return the path\n // to add or undefined to filter it out.\n async matchCheck(e: Path, ifDir: boolean): Promise {\n if (ifDir && this.opts.nodir) return undefined\n let rpc: Path | undefined\n if (this.opts.realpath) {\n rpc = e.realpathCached() || (await e.realpath())\n if (!rpc) return undefined\n e = rpc\n }\n const needStat = e.isUnknown() || this.opts.stat\n return this.matchCheckTest(needStat ? await e.lstat() : e, ifDir)\n }\n\n matchCheckTest(e: Path | undefined, ifDir: boolean): Path | undefined {\n return e &&\n (this.maxDepth === Infinity || e.depth() <= this.maxDepth) &&\n (!ifDir || e.canReaddir()) &&\n (!this.opts.nodir || !e.isDirectory()) &&\n !this.#ignored(e)\n ? e\n : undefined\n }\n\n matchCheckSync(e: Path, ifDir: boolean): Path | undefined {\n if (ifDir && this.opts.nodir) return undefined\n let rpc: Path | undefined\n if (this.opts.realpath) {\n rpc = e.realpathCached() || e.realpathSync()\n if (!rpc) return undefined\n e = rpc\n }\n const needStat = e.isUnknown() || this.opts.stat\n return this.matchCheckTest(needStat ? e.lstatSync() : e, ifDir)\n }\n\n abstract matchEmit(p: Result): void\n abstract matchEmit(p: string | Path): void\n\n matchFinish(e: Path, absolute: boolean) {\n if (this.#ignored(e)) return\n const abs =\n this.opts.absolute === undefined ? absolute : this.opts.absolute\n this.seen.add(e)\n const mark = this.opts.mark && e.isDirectory() ? this.#sep : ''\n // ok, we have what we need!\n if (this.opts.withFileTypes) {\n this.matchEmit(e)\n } else if (abs) {\n const abs = this.opts.posix ? e.fullpathPosix() : e.fullpath()\n this.matchEmit(abs + mark)\n } else {\n const rel = this.opts.posix ? e.relativePosix() : e.relative()\n const pre =\n this.opts.dotRelative && !rel.startsWith('..' + this.#sep)\n ? '.' + this.#sep\n : ''\n this.matchEmit(!rel ? '.' + mark : pre + rel + mark)\n }\n }\n\n async match(e: Path, absolute: boolean, ifDir: boolean): Promise {\n const p = await this.matchCheck(e, ifDir)\n if (p) this.matchFinish(p, absolute)\n }\n\n matchSync(e: Path, absolute: boolean, ifDir: boolean): void {\n const p = this.matchCheckSync(e, ifDir)\n if (p) this.matchFinish(p, absolute)\n }\n\n walkCB(target: Path, patterns: Pattern[], cb: () => any) {\n /* c8 ignore start */\n if (this.signal?.aborted) cb()\n /* c8 ignore stop */\n this.walkCB2(target, patterns, new Processor(this.opts), cb)\n }\n\n walkCB2(\n target: Path,\n patterns: Pattern[],\n processor: Processor,\n cb: () => any\n ) {\n if (this.#childrenIgnored(target)) return cb()\n if (this.signal?.aborted) cb()\n if (this.paused) {\n this.onResume(() => this.walkCB2(target, patterns, processor, cb))\n return\n }\n processor.processPatterns(target, patterns)\n\n // done processing. all of the above is sync, can be abstracted out.\n // subwalks is a map of paths to the entry filters they need\n // matches is a map of paths to [absolute, ifDir] tuples.\n let tasks = 1\n const next = () => {\n if (--tasks === 0) cb()\n }\n\n for (const [m, absolute, ifDir] of processor.matches.entries()) {\n if (this.#ignored(m)) continue\n tasks++\n this.match(m, absolute, ifDir).then(() => next())\n }\n\n for (const t of processor.subwalkTargets()) {\n if (this.maxDepth !== Infinity && t.depth() >= this.maxDepth) {\n continue\n }\n tasks++\n const childrenCached = t.readdirCached()\n if (t.calledReaddir())\n this.walkCB3(t, childrenCached, processor, next)\n else {\n t.readdirCB(\n (_, entries) => this.walkCB3(t, entries, processor, next),\n true\n )\n }\n }\n\n next()\n }\n\n walkCB3(\n target: Path,\n entries: Path[],\n processor: Processor,\n cb: () => any\n ) {\n processor = processor.filterEntries(target, entries)\n\n let tasks = 1\n const next = () => {\n if (--tasks === 0) cb()\n }\n\n for (const [m, absolute, ifDir] of processor.matches.entries()) {\n if (this.#ignored(m)) continue\n tasks++\n this.match(m, absolute, ifDir).then(() => next())\n }\n for (const [target, patterns] of processor.subwalks.entries()) {\n tasks++\n this.walkCB2(target, patterns, processor.child(), next)\n }\n\n next()\n }\n\n walkCBSync(target: Path, patterns: Pattern[], cb: () => any) {\n /* c8 ignore start */\n if (this.signal?.aborted) cb()\n /* c8 ignore stop */\n this.walkCB2Sync(target, patterns, new Processor(this.opts), cb)\n }\n\n walkCB2Sync(\n target: Path,\n patterns: Pattern[],\n processor: Processor,\n cb: () => any\n ) {\n if (this.#childrenIgnored(target)) return cb()\n if (this.signal?.aborted) cb()\n if (this.paused) {\n this.onResume(() =>\n this.walkCB2Sync(target, patterns, processor, cb)\n )\n return\n }\n processor.processPatterns(target, patterns)\n\n // done processing. all of the above is sync, can be abstracted out.\n // subwalks is a map of paths to the entry filters they need\n // matches is a map of paths to [absolute, ifDir] tuples.\n let tasks = 1\n const next = () => {\n if (--tasks === 0) cb()\n }\n\n for (const [m, absolute, ifDir] of processor.matches.entries()) {\n if (this.#ignored(m)) continue\n this.matchSync(m, absolute, ifDir)\n }\n\n for (const t of processor.subwalkTargets()) {\n if (this.maxDepth !== Infinity && t.depth() >= this.maxDepth) {\n continue\n }\n tasks++\n const children = t.readdirSync()\n this.walkCB3Sync(t, children, processor, next)\n }\n\n next()\n }\n\n walkCB3Sync(\n target: Path,\n entries: Path[],\n processor: Processor,\n cb: () => any\n ) {\n processor = processor.filterEntries(target, entries)\n\n let tasks = 1\n const next = () => {\n if (--tasks === 0) cb()\n }\n\n for (const [m, absolute, ifDir] of processor.matches.entries()) {\n if (this.#ignored(m)) continue\n this.matchSync(m, absolute, ifDir)\n }\n for (const [target, patterns] of processor.subwalks.entries()) {\n tasks++\n this.walkCB2Sync(target, patterns, processor.child(), next)\n }\n\n next()\n }\n}\n\nexport class GlobWalker<\n O extends GlobWalkerOpts = GlobWalkerOpts\n> extends GlobUtil {\n matches: O extends GWOFileTypesTrue\n ? Set\n : O extends GWOFileTypesFalse\n ? Set\n : O extends GWOFileTypesUnset\n ? Set\n : Set\n\n constructor(patterns: Pattern[], path: Path, opts: O) {\n super(patterns, path, opts)\n this.matches = new Set() as Matches\n }\n\n matchEmit(e: Result): void\n matchEmit(e: Path | string): void {\n this.matches.add(e)\n }\n\n async walk(): Promise> {\n if (this.signal?.aborted) throw this.signal.reason\n if (this.path.isUnknown()) {\n await this.path.lstat()\n }\n await new Promise((res, rej) => {\n this.walkCB(this.path, this.patterns, () => {\n if (this.signal?.aborted) {\n rej(this.signal.reason)\n } else {\n res(this.matches)\n }\n })\n })\n return this.matches\n }\n\n walkSync(): Matches {\n if (this.signal?.aborted) throw this.signal.reason\n if (this.path.isUnknown()) {\n this.path.lstatSync()\n }\n // nothing for the callback to do, because this never pauses\n this.walkCBSync(this.path, this.patterns, () => {\n if (this.signal?.aborted) throw this.signal.reason\n })\n return this.matches\n }\n}\n\nexport class GlobStream<\n O extends GlobWalkerOpts = GlobWalkerOpts\n> extends GlobUtil {\n results: O extends GWOFileTypesTrue\n ? Minipass\n : O extends GWOFileTypesFalse\n ? Minipass\n : O extends GWOFileTypesUnset\n ? Minipass\n : Minipass\n\n constructor(patterns: Pattern[], path: Path, opts: O) {\n super(patterns, path, opts)\n this.results = new Minipass({\n signal: this.signal,\n objectMode: true,\n }) as MatchStream\n this.results.on('drain', () => this.resume())\n this.results.on('resume', () => this.resume())\n }\n\n matchEmit(e: Result): void\n matchEmit(e: Path | string): void {\n this.results.write(e)\n if (!this.results.flowing) this.pause()\n }\n\n stream(): MatchStream {\n const target = this.path\n if (target.isUnknown()) {\n target.lstat().then(() => {\n this.walkCB(target, this.patterns, () => this.results.end())\n })\n } else {\n this.walkCB(target, this.patterns, () => this.results.end())\n }\n return this.results\n }\n\n streamSync(): MatchStream {\n if (this.path.isUnknown()) {\n this.path.lstatSync()\n }\n this.walkCBSync(this.path, this.patterns, () => this.results.end())\n return this.results\n }\n}\n"]} \ No newline at end of file diff --git a/deps/npm/node_modules/glob/package.json b/deps/npm/node_modules/glob/package.json index b04d087e28d898..e675cebdbd4e73 100644 --- a/deps/npm/node_modules/glob/package.json +++ b/deps/npm/node_modules/glob/package.json @@ -2,13 +2,12 @@ "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", - "bin": "./dist/cjs/src/bin.js", + "version": "9.3.2", "repository": { "type": "git", "url": "git://github.com/isaacs/node-glob.git" }, - "main": "./dist/cjs/src/index.js", + "main": "./dist/cjs/index-cjs.js", "module": "./dist/mjs/index.js", "types": "./dist/mjs/index.d.ts", "exports": { @@ -18,8 +17,8 @@ "default": "./dist/mjs/index.js" }, "require": { - "types": "./dist/cjs/src/index.d.ts", - "default": "./dist/cjs/src/index.js" + "types": "./dist/cjs/index.d.ts", + "default": "./dist/cjs/index-cjs.js" } } }, @@ -60,11 +59,10 @@ "endOfLine": "lf" }, "dependencies": { - "foreground-child": "^3.1.0", - "jackspeak": "^2.0.3", - "minimatch": "^9.0.0", - "minipass": "^5.0.0", - "path-scurry": "^1.7.0" + "fs.realpath": "^1.0.0", + "minimatch": "^7.4.1", + "minipass": "^4.2.4", + "path-scurry": "^1.6.1" }, "devDependencies": { "@types/node": "^18.11.18", diff --git a/deps/npm/node_modules/ignore-walk/package.json b/deps/npm/node_modules/ignore-walk/package.json index 4d9752ae25127c..ae68746218cd8d 100644 --- a/deps/npm/node_modules/ignore-walk/package.json +++ b/deps/npm/node_modules/ignore-walk/package.json @@ -1,11 +1,11 @@ { "name": "ignore-walk", - "version": "6.0.3", + "version": "6.0.2", "description": "Nested/recursive `.gitignore`/`.npmignore` parsing and filtering.", "main": "lib/index.js", "devDependencies": { "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.14.1", + "@npmcli/template-oss": "4.12.0", "mutate-fs": "^2.1.1", "tap": "^16.0.1" }, @@ -38,7 +38,7 @@ "lib/" ], "dependencies": { - "minimatch": "^9.0.0" + "minimatch": "^7.4.2" }, "tap": { "test-env": "LC_ALL=sk", @@ -56,8 +56,7 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.14.1", - "content": "scripts/template-oss", - "publish": "true" + "version": "4.12.0", + "content": "scripts/template-oss" } } diff --git a/deps/npm/node_modules/ini/lib/ini.js b/deps/npm/node_modules/ini/lib/ini.js index 763c829c6fc51b..d05682b606bc24 100644 --- a/deps/npm/node_modules/ini/lib/ini.js +++ b/deps/npm/node_modules/ini/lib/ini.js @@ -1,70 +1,49 @@ const { hasOwnProperty } = Object.prototype -const encode = (obj, opt = {}) => { - if (typeof opt === 'string') { - opt = { section: opt } - } - opt.align = opt.align === true - opt.newline = opt.newline === true - opt.sort = opt.sort === true - opt.whitespace = opt.whitespace === true || opt.align === true - /* istanbul ignore next */ - opt.platform = opt.platform || process?.platform - opt.bracketedArray = opt.bracketedArray !== false +/* istanbul ignore next */ +const eol = typeof process !== 'undefined' && + process.platform === 'win32' ? '\r\n' : '\n' - /* istanbul ignore next */ - const eol = opt.platform === 'win32' ? '\r\n' : '\n' - const separator = opt.whitespace ? ' = ' : '=' +const encode = (obj, opt) => { const children = [] + let out = '' - const keys = opt.sort ? Object.keys(obj).sort() : Object.keys(obj) - - let padToChars = 0 - // If aligning on the separator, then padToChars is determined as follows: - // 1. Get the keys - // 2. Exclude keys pointing to objects unless the value is null or an array - // 3. Add `[]` to array keys - // 4. Ensure non empty set of keys - // 5. Reduce the set to the longest `safe` key - // 6. Get the `safe` length - if (opt.align) { - padToChars = safe( - ( - keys - .filter(k => obj[k] === null || Array.isArray(obj[k]) || typeof obj[k] !== 'object') - .map(k => Array.isArray(obj[k]) ? `${k}[]` : k) - ) - .concat(['']) - .reduce((a, b) => safe(a).length >= safe(b).length ? a : b) - ).length + if (typeof opt === 'string') { + opt = { + section: opt, + whitespace: false, + } + } else { + opt = opt || Object.create(null) + opt.whitespace = opt.whitespace === true } - let out = '' - const arraySuffix = opt.bracketedArray ? '[]' : '' + const separator = opt.whitespace ? ' = ' : '=' - for (const k of keys) { + for (const k of Object.keys(obj)) { const val = obj[k] if (val && Array.isArray(val)) { for (const item of val) { - out += safe(`${k}${arraySuffix}`).padEnd(padToChars, ' ') + separator + safe(item) + eol + out += safe(k + '[]') + separator + safe(item) + eol } } else if (val && typeof val === 'object') { children.push(k) } else { - out += safe(k).padEnd(padToChars, ' ') + separator + safe(val) + eol + out += safe(k) + separator + safe(val) + eol } } if (opt.section && out.length) { - out = '[' + safe(opt.section) + ']' + (opt.newline ? eol + eol : eol) + out + out = '[' + safe(opt.section) + ']' + eol + out } for (const k of children) { - const nk = splitSections(k, '.').join('\\.') + const nk = dotSplit(k).join('\\.') const section = (opt.section ? opt.section + '.' : '') + nk + const { whitespace } = opt const child = encode(obj[k], { - ...opt, section, + whitespace, }) if (out.length && child.length) { out += eol @@ -76,44 +55,24 @@ const encode = (obj, opt = {}) => { return out } -function splitSections (str, separator) { - var lastMatchIndex = 0 - var lastSeparatorIndex = 0 - var nextIndex = 0 - var sections = [] - - do { - nextIndex = str.indexOf(separator, lastMatchIndex) +const dotSplit = str => + str.replace(/\1/g, '\u0002LITERAL\\1LITERAL\u0002') + .replace(/\\\./g, '\u0001') + .split(/\./) + .map(part => + part.replace(/\1/g, '\\.') + .replace(/\2LITERAL\\1LITERAL\2/g, '\u0001')) - if (nextIndex !== -1) { - lastMatchIndex = nextIndex + separator.length - - if (nextIndex > 0 && str[nextIndex - 1] === '\\') { - continue - } - - sections.push(str.slice(lastSeparatorIndex, nextIndex)) - lastSeparatorIndex = nextIndex + separator.length - } - } while (nextIndex !== -1) - - sections.push(str.slice(lastSeparatorIndex)) - - return sections -} - -const decode = (str, opt = {}) => { - opt.bracketedArray = opt.bracketedArray !== false +const decode = str => { const out = Object.create(null) let p = out let section = null - // section |key = value - const re = /^\[([^\]]*)\]\s*$|^([^=]+)(=(.*))?$/i + // section |key = value + const re = /^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i const lines = str.split(/[\r\n]+/g) - const duplicates = {} for (const line of lines) { - if (!line || line.match(/^\s*[;#]/) || line.match(/^\s*$/)) { + if (!line || line.match(/^\s*[;#]/)) { continue } const match = line.match(re) @@ -132,13 +91,7 @@ const decode = (str, opt = {}) => { continue } const keyRaw = unsafe(match[2]) - let isArray - if (opt.bracketedArray) { - isArray = keyRaw.length > 2 && keyRaw.slice(-2) === '[]' - } else { - duplicates[keyRaw] = (duplicates?.[keyRaw] || 0) + 1 - isArray = duplicates[keyRaw] > 1 - } + const isArray = keyRaw.length > 2 && keyRaw.slice(-2) === '[]' const key = isArray ? keyRaw.slice(0, -2) : keyRaw if (key === '__proto__') { continue @@ -179,7 +132,7 @@ const decode = (str, opt = {}) => { // see if the parent section is also an object. // if so, add it to that, and mark this one for deletion - const parts = splitSections(k, '.') + const parts = dotSplit(k) p = out const l = parts.pop() const nl = l.replace(/\\\./g, '.') diff --git a/deps/npm/node_modules/ini/package.json b/deps/npm/node_modules/ini/package.json index 5dd968e0edb886..e41c0f0f3dcc5f 100644 --- a/deps/npm/node_modules/ini/package.json +++ b/deps/npm/node_modules/ini/package.json @@ -2,7 +2,7 @@ "author": "GitHub Inc.", "name": "ini", "description": "An ini encoder/decoder for node", - "version": "4.1.0", + "version": "3.0.1", "repository": { "type": "git", "url": "https://github.com/npm/ini.git" @@ -15,12 +15,15 @@ "test": "tap", "snap": "tap", "posttest": "npm run lint", + "preversion": "npm test", + "postversion": "npm publish", + "prepublishOnly": "git push origin --follow-tags", "postlint": "template-oss-check", "template-oss-apply": "template-oss-apply --force" }, "devDependencies": { - "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.13.0", + "@npmcli/eslint-config": "^3.0.1", + "@npmcli/template-oss": "3.5.0", "tap": "^16.0.1" }, "license": "ISC", @@ -29,17 +32,10 @@ "lib/" ], "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.13.0", - "publish": "true" - }, - "tap": { - "nyc-arg": [ - "--exclude", - "tap-snapshots/**" - ] + "version": "3.5.0" } } diff --git a/deps/npm/node_modules/is-core-module/core.json b/deps/npm/node_modules/is-core-module/core.json index 9a51663fc5ec7c..d73579c43cbf31 100644 --- a/deps/npm/node_modules/is-core-module/core.json +++ b/deps/npm/node_modules/is-core-module/core.json @@ -114,8 +114,6 @@ "node:string_decoder": [">= 14.18 && < 15", ">= 16"], "sys": [">= 0.4 && < 0.7", ">= 0.8"], "node:sys": [">= 14.18 && < 15", ">= 16"], - "test/reporters": [">= 19.9", ">= 20"], - "node:test/reporters": [">= 19.9", ">= 20"], "node:test": [">= 16.17 && < 17", ">= 18"], "timers": true, "node:timers": [">= 14.18 && < 15", ">= 16"], @@ -149,8 +147,7 @@ "node:v8": [">= 14.18 && < 15", ">= 16"], "vm": true, "node:vm": [">= 14.18 && < 15", ">= 16"], - "wasi": [">= 13.4 && < 13.5", ">= 20"], - "node:wasi": ">= 20", + "wasi": ">= 13.4 && < 13.5", "worker_threads": ">= 11.7", "node:worker_threads": [">= 14.18 && < 15", ">= 16"], "zlib": ">= 0.5", diff --git a/deps/npm/node_modules/is-core-module/package.json b/deps/npm/node_modules/is-core-module/package.json index 715299bd8d5c33..5c1a87142ba4bd 100644 --- a/deps/npm/node_modules/is-core-module/package.json +++ b/deps/npm/node_modules/is-core-module/package.json @@ -1,6 +1,6 @@ { "name": "is-core-module", - "version": "2.12.0", + "version": "2.11.0", "description": "Is this specifier a node.js core module?", "main": "index.js", "sideEffects": false, @@ -45,17 +45,16 @@ "has": "^1.0.3" }, "devDependencies": { - "@ljharb/eslint-config": "^21.0.1", - "aud": "^2.0.2", + "@ljharb/eslint-config": "^21.0.0", + "aud": "^2.0.1", "auto-changelog": "^2.4.0", "eslint": "=8.8.0", - "in-publish": "^2.0.1", "mock-property": "^1.0.0", "npmignore": "^0.3.0", "nyc": "^10.3.2", "safe-publish-latest": "^2.0.0", "semver": "^6.3.0", - "tape": "^5.6.3" + "tape": "^5.6.1" }, "auto-changelog": { "output": "CHANGELOG.md", diff --git a/deps/npm/node_modules/jackspeak/LICENSE.md b/deps/npm/node_modules/jackspeak/LICENSE.md deleted file mode 100644 index c5402b9577a8cd..00000000000000 --- a/deps/npm/node_modules/jackspeak/LICENSE.md +++ /dev/null @@ -1,55 +0,0 @@ -# Blue Oak Model License - -Version 1.0.0 - -## Purpose - -This license gives everyone as much permission to work with -this software as possible, while protecting contributors -from liability. - -## Acceptance - -In order to receive this license, you must agree to its -rules. The rules of this license are both obligations -under that agreement and conditions to your license. -You must not do anything with this software that triggers -a rule that you cannot or will not follow. - -## Copyright - -Each contributor licenses you to do everything with this -software that would otherwise infringe that contributor's -copyright in it. - -## Notices - -You must ensure that everyone who gets a copy of -any part of this software from you, with or without -changes, also gets the text of this license or a link to -. - -## Excuse - -If anyone notifies you in writing that you have not -complied with [Notices](#notices), you can keep your -license by taking all practical steps to comply within 30 -days after the notice. If you do not do so, your license -ends immediately. - -## Patent - -Each contributor licenses you to do everything with this -software that would otherwise infringe any patent claims -they can license or become able to license. - -## Reliability - -No contributor can revoke this license. - -## No Liability - -***As far as the law allows, this software comes as is, -without any warranty or condition, and no contributor -will be liable to anyone for any damages related to this -software or this license, under any kind of legal claim.*** diff --git a/deps/npm/node_modules/jackspeak/dist/cjs/index.js b/deps/npm/node_modules/jackspeak/dist/cjs/index.js deleted file mode 100644 index f268e40e05afa9..00000000000000 --- a/deps/npm/node_modules/jackspeak/dist/cjs/index.js +++ /dev/null @@ -1,723 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.jack = exports.Jack = exports.isConfigOption = exports.isConfigType = void 0; -const node_util_1 = require("node:util"); -const parse_args_js_1 = require("./parse-args.js"); -// it's a tiny API, just cast it inline, it's fine -//@ts-ignore -const cliui_1 = __importDefault(require("@isaacs/cliui")); -const node_path_1 = require("node:path"); -const width = Math.min((process && process.stdout && process.stdout.columns) || 80, 80); -// indentation spaces from heading level -const indent = (n) => (n - 1) * 2; -const toEnvKey = (pref, key) => { - return [pref, key.replace(/[^a-zA-Z0-9]+/g, ' ')] - .join(' ') - .trim() - .toUpperCase() - .replace(/ /g, '_'); -}; -const toEnvVal = (value, delim = '\n') => { - const str = typeof value === 'string' - ? value - : typeof value === 'boolean' - ? value - ? '1' - : '0' - : typeof value === 'number' - ? String(value) - : Array.isArray(value) - ? value - .map((v) => toEnvVal(v)) - .join(delim) - : /* c8 ignore start */ - undefined; - if (typeof str !== 'string') { - throw new Error(`could not serialize value to environment: ${JSON.stringify(value)}`); - } - /* c8 ignore stop */ - return str; -}; -const fromEnvVal = (env, type, multiple, delim = '\n') => (multiple - ? env.split(delim).map(v => fromEnvVal(v, type, false)) - : type === 'string' - ? env - : type === 'boolean' - ? env === '1' - : +env.trim()); -const isConfigType = (t) => typeof t === 'string' && - (t === 'string' || t === 'number' || t === 'boolean'); -exports.isConfigType = isConfigType; -const undefOrType = (v, t) => v === undefined || typeof v === t; -// print the value type, for error message reporting -const valueType = (v) => typeof v === 'string' - ? 'string' - : typeof v === 'boolean' - ? 'boolean' - : typeof v === 'number' - ? 'number' - : Array.isArray(v) - ? joinTypes([...new Set(v.map(v => valueType(v)))]) + '[]' - : `${v.type}${v.multiple ? '[]' : ''}`; -const joinTypes = (types) => types.length === 1 ? types[0] : `(${types.join('|')})`; -const isValidValue = (v, type, multi) => { - if (multi) { - if (!Array.isArray(v)) - return false; - return !v.some((v) => !isValidValue(v, type, false)); - } - if (Array.isArray(v)) - return false; - return typeof v === type; -}; -const isConfigOption = (o, type, multi) => !!o && - typeof o === 'object' && - (0, exports.isConfigType)(o.type) && - o.type === type && - undefOrType(o.short, 'string') && - undefOrType(o.description, 'string') && - undefOrType(o.hint, 'string') && - undefOrType(o.validate, 'function') && - (o.default === undefined || isValidValue(o.default, type, multi)) && - !!o.multiple === multi; -exports.isConfigOption = isConfigOption; -function num(o = {}) { - const { default: def, validate: val, ...rest } = o; - if (def !== undefined && !isValidValue(def, 'number', false)) { - throw new TypeError('invalid default value'); - } - const validate = val - ? val - : undefined; - return { - ...rest, - default: def, - validate, - type: 'number', - multiple: false, - }; -} -function numList(o = {}) { - const { default: def, validate: val, ...rest } = o; - if (def !== undefined && !isValidValue(def, 'number', true)) { - throw new TypeError('invalid default value'); - } - const validate = val - ? val - : undefined; - return { - ...rest, - default: def, - validate, - type: 'number', - multiple: true, - }; -} -function opt(o = {}) { - const { default: def, validate: val, ...rest } = o; - if (def !== undefined && !isValidValue(def, 'string', false)) { - throw new TypeError('invalid default value'); - } - const validate = val - ? val - : undefined; - return { - ...rest, - default: def, - validate, - type: 'string', - multiple: false, - }; -} -function optList(o = {}) { - const { default: def, validate: val, ...rest } = o; - if (def !== undefined && !isValidValue(def, 'string', true)) { - throw new TypeError('invalid default value'); - } - const validate = val - ? val - : undefined; - return { - ...rest, - default: def, - validate, - type: 'string', - multiple: true, - }; -} -function flag(o = {}) { - const { hint, default: def, validate: val, ...rest } = o; - if (def !== undefined && !isValidValue(def, 'boolean', false)) { - throw new TypeError('invalid default value'); - } - const validate = val - ? val - : undefined; - if (hint !== undefined) { - throw new TypeError('cannot provide hint for flag'); - } - return { - ...rest, - default: def, - validate, - type: 'boolean', - multiple: false, - }; -} -function flagList(o = {}) { - const { hint, default: def, validate: val, ...rest } = o; - if (def !== undefined && !isValidValue(def, 'boolean', true)) { - throw new TypeError('invalid default value'); - } - const validate = val - ? val - : undefined; - if (hint !== undefined) { - throw new TypeError('cannot provide hint for flag list'); - } - return { - ...rest, - default: def, - validate, - type: 'boolean', - multiple: true, - }; -} -const toParseArgsOptionsConfig = (options) => { - const c = {}; - for (const longOption in options) { - const config = options[longOption]; - if ((0, exports.isConfigOption)(config, 'number', true)) { - c[longOption] = { - type: 'string', - multiple: true, - default: config.default?.map(c => String(c)), - }; - } - else if ((0, exports.isConfigOption)(config, 'number', false)) { - c[longOption] = { - type: 'string', - multiple: false, - default: config.default === undefined - ? undefined - : String(config.default), - }; - } - else { - const conf = config; - c[longOption] = { - type: conf.type, - multiple: conf.multiple, - default: conf.default, - }; - } - if (typeof config.short === 'string') { - c[longOption].short = config.short; - } - if (config.type === 'boolean' && - !longOption.startsWith('no-') && - !options[`no-${longOption}`]) { - c[`no-${longOption}`] = { - type: 'boolean', - multiple: config.multiple, - }; - } - } - return c; -}; -const isHeading = (r) => r.type === 'heading'; -const isDescription = (r) => r.type === 'description'; -/** - * Class returned by the {@link jack} function and all configuration - * definition methods. This is what gets chained together. - */ -class Jack { - #configSet; - #shorts; - #options; - #fields = []; - #env; - #envPrefix; - #allowPositionals; - #usage; - constructor(options = {}) { - this.#options = options; - this.#allowPositionals = options.allowPositionals !== false; - this.#env = - this.#options.env === undefined ? process.env : this.#options.env; - this.#envPrefix = options.envPrefix; - // We need to fib a little, because it's always the same object, but it - // starts out as having an empty config set. Then each method that adds - // fields returns `this as Jack` - this.#configSet = Object.create(null); - this.#shorts = Object.create(null); - } - /** - * Set the default value (which will still be overridden by env or cli) - * as if from a parsed config file. The optional `source` param, if - * provided, will be included in error messages if a value is invalid or - * unknown. - */ - setConfigValues(values, source = '') { - try { - this.validate(values); - } - catch (er) { - throw Object.assign(er, source ? { source } : {}); - } - for (const [field, value] of Object.entries(values)) { - const my = this.#configSet[field]; - my.default = value; - } - return this; - } - /** - * Parse a string of arguments, and return the resulting - * `{ values, positionals }` object. - * - * If an {@link JackOptions#envPrefix} is set, then it will read default - * values from the environment, and write the resulting values back - * to the environment as well. - * - * Environment values always take precedence over any other value, except - * an explicit CLI setting. - */ - parse(args = process.argv) { - if (args === process.argv) { - args = args.slice(process._eval !== undefined ? 1 : 2); - } - if (this.#envPrefix) { - for (const [field, my] of Object.entries(this.#configSet)) { - const ek = toEnvKey(this.#envPrefix, field); - const env = this.#env[ek]; - if (env !== undefined) { - my.default = fromEnvVal(env, my.type, !!my.multiple, my.delim); - } - } - } - const options = toParseArgsOptionsConfig(this.#configSet); - const result = (0, parse_args_js_1.parseArgs)({ - args, - options, - // always strict, but using our own logic - strict: false, - allowPositionals: this.#allowPositionals, - tokens: true, - }); - const p = { - values: {}, - positionals: [], - }; - for (const token of result.tokens) { - if (token.kind === 'positional') { - p.positionals.push(token.value); - if (this.#options.stopAtPositional) { - p.positionals.push(...args.slice(token.index + 1)); - return p; - } - } - else if (token.kind === 'option') { - let value = undefined; - if (token.name.startsWith('no-')) { - const my = this.#configSet[token.name]; - const pname = token.name.substring('no-'.length); - const pos = this.#configSet[pname]; - if (pos && - pos.type === 'boolean' && - (!my || - (my.type === 'boolean' && !!my.multiple === !!pos.multiple))) { - value = false; - token.name = pname; - } - } - const my = this.#configSet[token.name]; - if (!my) { - throw new Error(`Unknown option '${token.rawName}'. ` + - `To specify a positional argument starting with a '-', ` + - `place it at the end of the command after '--', as in ` + - `'-- ${token.rawName}'`); - } - if (value === undefined) { - if (token.value === undefined) { - if (my.type !== 'boolean') { - throw new Error(`No value provided for ${token.rawName}, expected ${my.type}`); - } - value = true; - } - else { - if (my.type === 'boolean') { - throw new Error(`Flag ${token.rawName} does not take a value, received '${token.value}'`); - } - if (my.type === 'string') { - value = token.value; - } - else { - value = +token.value; - if (value !== value) { - throw new Error(`Invalid value '${token.value}' provided for ` + - `'${token.rawName}' option, expected number`); - } - } - } - } - if (my.multiple) { - const pv = p.values; - pv[token.name] = pv[token.name] ?? []; - pv[token.name].push(value); - } - else { - const pv = p.values; - pv[token.name] = value; - } - } - } - for (const [field, c] of Object.entries(this.#configSet)) { - if (c.default !== undefined && !(field in p.values)) { - //@ts-ignore - p.values[field] = c.default; - } - } - for (const [field, value] of Object.entries(p.values)) { - const valid = this.#configSet[field].validate; - if (valid && !valid(value)) { - throw new Error(`Invalid value provided for --${field}: ${JSON.stringify(value)}`); - } - } - this.#writeEnv(p); - return p; - } - /** - * Validate that any arbitrary object is a valid configuration `values` - * object. Useful when loading config files or other sources. - */ - validate(o) { - if (!o || typeof o !== 'object') { - throw new Error('Invalid config: not an object'); - } - for (const field in o) { - const config = this.#configSet[field]; - if (!config) { - throw new Error(`Unknown config option: ${field}`); - } - if (!isValidValue(o[field], config.type, !!config.multiple)) { - throw Object.assign(new Error(`Invalid value ${valueType(o[field])} for ${field}, expected ${valueType(config)}`), { - field, - value: o[field], - }); - } - if (config.validate && !config.validate(o[field])) { - throw new Error(`Invalid config value for ${field}: ${o[field]}`); - } - } - } - #writeEnv(p) { - if (!this.#env || !this.#envPrefix) - return; - for (const [field, value] of Object.entries(p.values)) { - const my = this.#configSet[field]; - this.#env[toEnvKey(this.#envPrefix, field)] = toEnvVal(value, my.delim); - } - } - /** - * Add a heading to the usage output banner - */ - heading(text, level) { - if (level === undefined) { - level = this.#fields.some(r => isHeading(r)) ? 2 : 1; - } - this.#fields.push({ type: 'heading', text, level }); - return this; - } - /** - * Add a long-form description to the usage output at this position. - */ - description(text, { pre } = {}) { - this.#fields.push({ type: 'description', text, pre }); - return this; - } - /** - * Add one or more number fields. - */ - num(fields) { - return this.#addFields(fields, num); - } - /** - * Add one or more multiple number fields. - */ - numList(fields) { - return this.#addFields(fields, numList); - } - /** - * Add one or more string option fields. - */ - opt(fields) { - return this.#addFields(fields, opt); - } - /** - * Add one or more multiple string option fields. - */ - optList(fields) { - return this.#addFields(fields, optList); - } - /** - * Add one or more flag fields. - */ - flag(fields) { - return this.#addFields(fields, flag); - } - /** - * Add one or more multiple flag fields. - */ - flagList(fields) { - return this.#addFields(fields, flagList); - } - /** - * Generic field definition method. Similar to flag/flagList/number/etc, - * but you must specify the `type` (and optionally `multiple` and `delim`) - * fields on each one, or Jack won't know how to define them. - */ - addFields(fields) { - const next = this; - for (const [name, field] of Object.entries(fields)) { - this.#validateName(name, field); - next.#fields.push({ - type: 'config', - name, - value: field, - }); - } - Object.assign(next.#configSet, fields); - return next; - } - #addFields(fields, fn) { - const next = this; - Object.assign(next.#configSet, Object.fromEntries(Object.entries(fields).map(([name, field]) => { - this.#validateName(name, field); - const option = fn(field); - next.#fields.push({ - type: 'config', - name, - value: option, - }); - return [name, option]; - }))); - return next; - } - #validateName(name, field) { - if (!/^[a-zA-Z0-9]([a-zA-Z0-9-]*[a-zA-Z0-9])?$/.test(name)) { - throw new TypeError(`Invalid option name: ${name}, ` + - `must be '-' delimited ASCII alphanumeric`); - } - if (this.#configSet[name]) { - throw new TypeError(`Cannot redefine option ${field}`); - } - if (this.#shorts[name]) { - throw new TypeError(`Cannot redefine option ${name}, already ` + - `in use for ${this.#shorts[name]}`); - } - if (field.short) { - if (!/^[a-zA-Z0-9]$/.test(field.short)) { - throw new TypeError(`Invalid ${name} short option: ${field.short}, ` + - 'must be 1 ASCII alphanumeric character'); - } - if (this.#shorts[field.short]) { - throw new TypeError(`Invalid ${name} short option: ${field.short}, ` + - `already in use for ${this.#shorts[field.short]}`); - } - this.#shorts[field.short] = name; - this.#shorts[name] = name; - } - } - /** - * Return the usage banner for the given configuration - */ - usage() { - if (this.#usage) - return this.#usage; - let headingLevel = 1; - const ui = (0, cliui_1.default)({ width }); - const first = this.#fields[0]; - let start = first?.type === 'heading' ? 1 : 0; - if (first?.type === 'heading') { - ui.div({ - padding: [0, 0, 0, 0], - text: normalize(first.text), - }); - } - ui.div({ padding: [0, 0, 0, 0], text: 'Usage:' }); - if (this.#options.usage) { - ui.div({ - text: this.#options.usage, - padding: [0, 0, 0, 2], - }); - } - else { - const cmd = (0, node_path_1.basename)(process.argv[1]); - const shortFlags = []; - const shorts = []; - const flags = []; - const opts = []; - for (const [field, config] of Object.entries(this.#configSet)) { - if (config.short) { - if (config.type === 'boolean') - shortFlags.push(config.short); - else - shorts.push([config.short, config.hint || field]); - } - else { - if (config.type === 'boolean') - flags.push(field); - else - opts.push([field, config.hint || field]); - } - } - const sf = shortFlags.length ? ' -' + shortFlags.join('') : ''; - const so = shorts.map(([k, v]) => ` --${k}=<${v}>`).join(''); - const lf = flags.map(k => ` --${k}`).join(''); - const lo = opts.map(([k, v]) => ` --${k}=<${v}>`).join(''); - const usage = `${cmd}${sf}${so}${lf}${lo}`.trim(); - ui.div({ - text: usage, - padding: [0, 0, 0, 2], - }); - } - ui.div({ padding: [0, 0, 0, 0], text: '' }); - const maybeDesc = this.#fields[start]; - if (isDescription(maybeDesc)) { - const print = normalize(maybeDesc.text, maybeDesc.pre); - start++; - ui.div({ padding: [0, 0, 0, 0], text: print }); - ui.div({ padding: [0, 0, 0, 0], text: '' }); - } - // turn each config type into a row, and figure out the width of the - // left hand indentation for the option descriptions. - let maxMax = Math.max(12, Math.min(26, Math.floor(width / 3))); - let maxWidth = 8; - let prev = undefined; - const rows = []; - for (const field of this.#fields.slice(start)) { - if (field.type !== 'config') { - if (prev?.type === 'config') - prev.skipLine = true; - prev = undefined; - field.text = normalize(field.text, !!field.pre); - rows.push(field); - continue; - } - const { value } = field; - const desc = value.description || ''; - const mult = value.multiple ? 'Can be set multiple times' : ''; - const dmDelim = mult && (desc.includes('\n') ? '\n\n' : '\n'); - const text = normalize(desc + dmDelim + mult); - const hint = value.hint || - (value.type === 'number' - ? 'n' - : value.type === 'string' - ? field.name - : undefined); - const short = !value.short - ? '' - : value.type === 'boolean' - ? `-${value.short} ` - : `-${value.short}<${hint}> `; - const left = value.type === 'boolean' - ? `${short}--${field.name}` - : `${short}--${field.name}=<${hint}>`; - const row = { text, left, type: 'config' }; - if (text.length > width - maxMax) { - row.skipLine = true; - } - if (prev && left.length > maxMax) - prev.skipLine = true; - prev = row; - const len = left.length + 4; - if (len > maxWidth && len < maxMax) { - maxWidth = len; - } - rows.push(row); - } - // every heading/description after the first gets indented by 2 - // extra spaces. - for (const row of rows) { - if (row.left) { - // If the row is too long, don't wrap it - // Bump the right-hand side down a line to make room - const configIndent = indent(Math.max(headingLevel, 2)); - if (row.left.length > maxWidth - 2) { - ui.div({ text: row.left, padding: [0, 0, 0, configIndent] }); - ui.div({ text: row.text, padding: [0, 0, 0, maxWidth] }); - } - else { - ui.div({ - text: row.left, - padding: [0, 1, 0, configIndent], - width: maxWidth, - }, { padding: [0, 0, 0, 0], text: row.text }); - } - if (row.skipLine) { - ui.div({ padding: [0, 0, 0, 0], text: '' }); - } - } - else { - if (isHeading(row)) { - const { level } = row; - headingLevel = level; - // only h1 and h2 have bottom padding - // h3-h6 do not - const b = level <= 2 ? 1 : 0; - ui.div({ ...row, padding: [0, 0, b, indent(level)] }); - } - else { - ui.div({ ...row, padding: [0, 0, 1, indent(headingLevel + 1)] }); - } - } - } - return (this.#usage = ui.toString()); - } - /** - * Return the configuration options as a plain object - */ - toJSON() { - return Object.fromEntries(Object.entries(this.#configSet).map(([field, def]) => [ - field, - { - type: def.type, - ...(def.multiple ? { multiple: true } : {}), - ...(def.delim ? { delim: def.delim } : {}), - ...(def.short ? { short: def.short } : {}), - ...(def.description ? { description: def.description } : {}), - ...(def.validate ? { validate: def.validate } : {}), - ...(def.default !== undefined ? { default: def.default } : {}), - }, - ])); - } - /** - * Custom printer for `util.inspect` - */ - [node_util_1.inspect.custom](_, options) { - return `Jack ${(0, node_util_1.inspect)(this.toJSON(), options)}`; - } -} -exports.Jack = Jack; -// Unwrap and un-indent, so we can wrap description -// strings however makes them look nice in the code. -const normalize = (s, pre = false) => pre - // prepend a ZWSP to each line so cliui doesn't strip it. - ? s.split('\n').map(l => `\u200b${l}`).join('\n') - : s - // remove single line breaks, except for lists - .replace(/([^\n])\n[ \t]*([^\n])/g, (_, $1, $2) => !/^[-*]/.test($2) ? `${$1} ${$2}` : `${$1}\n${$2}`) - // normalize mid-line whitespace - .replace(/([^\n])[ \t]+([^\n])/g, '$1 $2') - // two line breaks are enough - .replace(/\n{3,}/g, '\n\n') - .trim(); -/** - * Main entry point. Create and return a {@link Jack} object. - */ -const jack = (options = {}) => new Jack(options); -exports.jack = jack; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/deps/npm/node_modules/jackspeak/dist/cjs/package.json b/deps/npm/node_modules/jackspeak/dist/cjs/package.json deleted file mode 100644 index 5bbefffbabee39..00000000000000 --- a/deps/npm/node_modules/jackspeak/dist/cjs/package.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "type": "commonjs" -} diff --git a/deps/npm/node_modules/jackspeak/dist/cjs/parse-args.js b/deps/npm/node_modules/jackspeak/dist/cjs/parse-args.js deleted file mode 100644 index 471b4d97dc9960..00000000000000 --- a/deps/npm/node_modules/jackspeak/dist/cjs/parse-args.js +++ /dev/null @@ -1,42 +0,0 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.parseArgs = void 0; -const util = __importStar(require("util")); -const pv = typeof process === 'object' && - !!process && - typeof process.version === 'string' - ? process.version - : 'v0.0.0'; -const pvs = pv - .replace(/^v/, '') - .split('.') - .map(s => parseInt(s, 10)); -let { parseArgs: pa } = util; -if (!pa || pvs[0] > 18 || pvs[1] < 11) { - pa = require('@pkgjs/parseargs').parseArgs; -} -exports.parseArgs = pa; -//# sourceMappingURL=parse-args-cjs.js.map \ No newline at end of file diff --git a/deps/npm/node_modules/jackspeak/dist/mjs/index.js b/deps/npm/node_modules/jackspeak/dist/mjs/index.js deleted file mode 100644 index a3e2b6bab7cbb9..00000000000000 --- a/deps/npm/node_modules/jackspeak/dist/mjs/index.js +++ /dev/null @@ -1,713 +0,0 @@ -import { inspect } from 'node:util'; -import { parseArgs } from './parse-args.js'; -// it's a tiny API, just cast it inline, it's fine -//@ts-ignore -import cliui from '@isaacs/cliui'; -import { basename } from 'node:path'; -const width = Math.min((process && process.stdout && process.stdout.columns) || 80, 80); -// indentation spaces from heading level -const indent = (n) => (n - 1) * 2; -const toEnvKey = (pref, key) => { - return [pref, key.replace(/[^a-zA-Z0-9]+/g, ' ')] - .join(' ') - .trim() - .toUpperCase() - .replace(/ /g, '_'); -}; -const toEnvVal = (value, delim = '\n') => { - const str = typeof value === 'string' - ? value - : typeof value === 'boolean' - ? value - ? '1' - : '0' - : typeof value === 'number' - ? String(value) - : Array.isArray(value) - ? value - .map((v) => toEnvVal(v)) - .join(delim) - : /* c8 ignore start */ - undefined; - if (typeof str !== 'string') { - throw new Error(`could not serialize value to environment: ${JSON.stringify(value)}`); - } - /* c8 ignore stop */ - return str; -}; -const fromEnvVal = (env, type, multiple, delim = '\n') => (multiple - ? env.split(delim).map(v => fromEnvVal(v, type, false)) - : type === 'string' - ? env - : type === 'boolean' - ? env === '1' - : +env.trim()); -export const isConfigType = (t) => typeof t === 'string' && - (t === 'string' || t === 'number' || t === 'boolean'); -const undefOrType = (v, t) => v === undefined || typeof v === t; -// print the value type, for error message reporting -const valueType = (v) => typeof v === 'string' - ? 'string' - : typeof v === 'boolean' - ? 'boolean' - : typeof v === 'number' - ? 'number' - : Array.isArray(v) - ? joinTypes([...new Set(v.map(v => valueType(v)))]) + '[]' - : `${v.type}${v.multiple ? '[]' : ''}`; -const joinTypes = (types) => types.length === 1 ? types[0] : `(${types.join('|')})`; -const isValidValue = (v, type, multi) => { - if (multi) { - if (!Array.isArray(v)) - return false; - return !v.some((v) => !isValidValue(v, type, false)); - } - if (Array.isArray(v)) - return false; - return typeof v === type; -}; -export const isConfigOption = (o, type, multi) => !!o && - typeof o === 'object' && - isConfigType(o.type) && - o.type === type && - undefOrType(o.short, 'string') && - undefOrType(o.description, 'string') && - undefOrType(o.hint, 'string') && - undefOrType(o.validate, 'function') && - (o.default === undefined || isValidValue(o.default, type, multi)) && - !!o.multiple === multi; -function num(o = {}) { - const { default: def, validate: val, ...rest } = o; - if (def !== undefined && !isValidValue(def, 'number', false)) { - throw new TypeError('invalid default value'); - } - const validate = val - ? val - : undefined; - return { - ...rest, - default: def, - validate, - type: 'number', - multiple: false, - }; -} -function numList(o = {}) { - const { default: def, validate: val, ...rest } = o; - if (def !== undefined && !isValidValue(def, 'number', true)) { - throw new TypeError('invalid default value'); - } - const validate = val - ? val - : undefined; - return { - ...rest, - default: def, - validate, - type: 'number', - multiple: true, - }; -} -function opt(o = {}) { - const { default: def, validate: val, ...rest } = o; - if (def !== undefined && !isValidValue(def, 'string', false)) { - throw new TypeError('invalid default value'); - } - const validate = val - ? val - : undefined; - return { - ...rest, - default: def, - validate, - type: 'string', - multiple: false, - }; -} -function optList(o = {}) { - const { default: def, validate: val, ...rest } = o; - if (def !== undefined && !isValidValue(def, 'string', true)) { - throw new TypeError('invalid default value'); - } - const validate = val - ? val - : undefined; - return { - ...rest, - default: def, - validate, - type: 'string', - multiple: true, - }; -} -function flag(o = {}) { - const { hint, default: def, validate: val, ...rest } = o; - if (def !== undefined && !isValidValue(def, 'boolean', false)) { - throw new TypeError('invalid default value'); - } - const validate = val - ? val - : undefined; - if (hint !== undefined) { - throw new TypeError('cannot provide hint for flag'); - } - return { - ...rest, - default: def, - validate, - type: 'boolean', - multiple: false, - }; -} -function flagList(o = {}) { - const { hint, default: def, validate: val, ...rest } = o; - if (def !== undefined && !isValidValue(def, 'boolean', true)) { - throw new TypeError('invalid default value'); - } - const validate = val - ? val - : undefined; - if (hint !== undefined) { - throw new TypeError('cannot provide hint for flag list'); - } - return { - ...rest, - default: def, - validate, - type: 'boolean', - multiple: true, - }; -} -const toParseArgsOptionsConfig = (options) => { - const c = {}; - for (const longOption in options) { - const config = options[longOption]; - if (isConfigOption(config, 'number', true)) { - c[longOption] = { - type: 'string', - multiple: true, - default: config.default?.map(c => String(c)), - }; - } - else if (isConfigOption(config, 'number', false)) { - c[longOption] = { - type: 'string', - multiple: false, - default: config.default === undefined - ? undefined - : String(config.default), - }; - } - else { - const conf = config; - c[longOption] = { - type: conf.type, - multiple: conf.multiple, - default: conf.default, - }; - } - if (typeof config.short === 'string') { - c[longOption].short = config.short; - } - if (config.type === 'boolean' && - !longOption.startsWith('no-') && - !options[`no-${longOption}`]) { - c[`no-${longOption}`] = { - type: 'boolean', - multiple: config.multiple, - }; - } - } - return c; -}; -const isHeading = (r) => r.type === 'heading'; -const isDescription = (r) => r.type === 'description'; -/** - * Class returned by the {@link jack} function and all configuration - * definition methods. This is what gets chained together. - */ -export class Jack { - #configSet; - #shorts; - #options; - #fields = []; - #env; - #envPrefix; - #allowPositionals; - #usage; - constructor(options = {}) { - this.#options = options; - this.#allowPositionals = options.allowPositionals !== false; - this.#env = - this.#options.env === undefined ? process.env : this.#options.env; - this.#envPrefix = options.envPrefix; - // We need to fib a little, because it's always the same object, but it - // starts out as having an empty config set. Then each method that adds - // fields returns `this as Jack` - this.#configSet = Object.create(null); - this.#shorts = Object.create(null); - } - /** - * Set the default value (which will still be overridden by env or cli) - * as if from a parsed config file. The optional `source` param, if - * provided, will be included in error messages if a value is invalid or - * unknown. - */ - setConfigValues(values, source = '') { - try { - this.validate(values); - } - catch (er) { - throw Object.assign(er, source ? { source } : {}); - } - for (const [field, value] of Object.entries(values)) { - const my = this.#configSet[field]; - my.default = value; - } - return this; - } - /** - * Parse a string of arguments, and return the resulting - * `{ values, positionals }` object. - * - * If an {@link JackOptions#envPrefix} is set, then it will read default - * values from the environment, and write the resulting values back - * to the environment as well. - * - * Environment values always take precedence over any other value, except - * an explicit CLI setting. - */ - parse(args = process.argv) { - if (args === process.argv) { - args = args.slice(process._eval !== undefined ? 1 : 2); - } - if (this.#envPrefix) { - for (const [field, my] of Object.entries(this.#configSet)) { - const ek = toEnvKey(this.#envPrefix, field); - const env = this.#env[ek]; - if (env !== undefined) { - my.default = fromEnvVal(env, my.type, !!my.multiple, my.delim); - } - } - } - const options = toParseArgsOptionsConfig(this.#configSet); - const result = parseArgs({ - args, - options, - // always strict, but using our own logic - strict: false, - allowPositionals: this.#allowPositionals, - tokens: true, - }); - const p = { - values: {}, - positionals: [], - }; - for (const token of result.tokens) { - if (token.kind === 'positional') { - p.positionals.push(token.value); - if (this.#options.stopAtPositional) { - p.positionals.push(...args.slice(token.index + 1)); - return p; - } - } - else if (token.kind === 'option') { - let value = undefined; - if (token.name.startsWith('no-')) { - const my = this.#configSet[token.name]; - const pname = token.name.substring('no-'.length); - const pos = this.#configSet[pname]; - if (pos && - pos.type === 'boolean' && - (!my || - (my.type === 'boolean' && !!my.multiple === !!pos.multiple))) { - value = false; - token.name = pname; - } - } - const my = this.#configSet[token.name]; - if (!my) { - throw new Error(`Unknown option '${token.rawName}'. ` + - `To specify a positional argument starting with a '-', ` + - `place it at the end of the command after '--', as in ` + - `'-- ${token.rawName}'`); - } - if (value === undefined) { - if (token.value === undefined) { - if (my.type !== 'boolean') { - throw new Error(`No value provided for ${token.rawName}, expected ${my.type}`); - } - value = true; - } - else { - if (my.type === 'boolean') { - throw new Error(`Flag ${token.rawName} does not take a value, received '${token.value}'`); - } - if (my.type === 'string') { - value = token.value; - } - else { - value = +token.value; - if (value !== value) { - throw new Error(`Invalid value '${token.value}' provided for ` + - `'${token.rawName}' option, expected number`); - } - } - } - } - if (my.multiple) { - const pv = p.values; - pv[token.name] = pv[token.name] ?? []; - pv[token.name].push(value); - } - else { - const pv = p.values; - pv[token.name] = value; - } - } - } - for (const [field, c] of Object.entries(this.#configSet)) { - if (c.default !== undefined && !(field in p.values)) { - //@ts-ignore - p.values[field] = c.default; - } - } - for (const [field, value] of Object.entries(p.values)) { - const valid = this.#configSet[field].validate; - if (valid && !valid(value)) { - throw new Error(`Invalid value provided for --${field}: ${JSON.stringify(value)}`); - } - } - this.#writeEnv(p); - return p; - } - /** - * Validate that any arbitrary object is a valid configuration `values` - * object. Useful when loading config files or other sources. - */ - validate(o) { - if (!o || typeof o !== 'object') { - throw new Error('Invalid config: not an object'); - } - for (const field in o) { - const config = this.#configSet[field]; - if (!config) { - throw new Error(`Unknown config option: ${field}`); - } - if (!isValidValue(o[field], config.type, !!config.multiple)) { - throw Object.assign(new Error(`Invalid value ${valueType(o[field])} for ${field}, expected ${valueType(config)}`), { - field, - value: o[field], - }); - } - if (config.validate && !config.validate(o[field])) { - throw new Error(`Invalid config value for ${field}: ${o[field]}`); - } - } - } - #writeEnv(p) { - if (!this.#env || !this.#envPrefix) - return; - for (const [field, value] of Object.entries(p.values)) { - const my = this.#configSet[field]; - this.#env[toEnvKey(this.#envPrefix, field)] = toEnvVal(value, my.delim); - } - } - /** - * Add a heading to the usage output banner - */ - heading(text, level) { - if (level === undefined) { - level = this.#fields.some(r => isHeading(r)) ? 2 : 1; - } - this.#fields.push({ type: 'heading', text, level }); - return this; - } - /** - * Add a long-form description to the usage output at this position. - */ - description(text, { pre } = {}) { - this.#fields.push({ type: 'description', text, pre }); - return this; - } - /** - * Add one or more number fields. - */ - num(fields) { - return this.#addFields(fields, num); - } - /** - * Add one or more multiple number fields. - */ - numList(fields) { - return this.#addFields(fields, numList); - } - /** - * Add one or more string option fields. - */ - opt(fields) { - return this.#addFields(fields, opt); - } - /** - * Add one or more multiple string option fields. - */ - optList(fields) { - return this.#addFields(fields, optList); - } - /** - * Add one or more flag fields. - */ - flag(fields) { - return this.#addFields(fields, flag); - } - /** - * Add one or more multiple flag fields. - */ - flagList(fields) { - return this.#addFields(fields, flagList); - } - /** - * Generic field definition method. Similar to flag/flagList/number/etc, - * but you must specify the `type` (and optionally `multiple` and `delim`) - * fields on each one, or Jack won't know how to define them. - */ - addFields(fields) { - const next = this; - for (const [name, field] of Object.entries(fields)) { - this.#validateName(name, field); - next.#fields.push({ - type: 'config', - name, - value: field, - }); - } - Object.assign(next.#configSet, fields); - return next; - } - #addFields(fields, fn) { - const next = this; - Object.assign(next.#configSet, Object.fromEntries(Object.entries(fields).map(([name, field]) => { - this.#validateName(name, field); - const option = fn(field); - next.#fields.push({ - type: 'config', - name, - value: option, - }); - return [name, option]; - }))); - return next; - } - #validateName(name, field) { - if (!/^[a-zA-Z0-9]([a-zA-Z0-9-]*[a-zA-Z0-9])?$/.test(name)) { - throw new TypeError(`Invalid option name: ${name}, ` + - `must be '-' delimited ASCII alphanumeric`); - } - if (this.#configSet[name]) { - throw new TypeError(`Cannot redefine option ${field}`); - } - if (this.#shorts[name]) { - throw new TypeError(`Cannot redefine option ${name}, already ` + - `in use for ${this.#shorts[name]}`); - } - if (field.short) { - if (!/^[a-zA-Z0-9]$/.test(field.short)) { - throw new TypeError(`Invalid ${name} short option: ${field.short}, ` + - 'must be 1 ASCII alphanumeric character'); - } - if (this.#shorts[field.short]) { - throw new TypeError(`Invalid ${name} short option: ${field.short}, ` + - `already in use for ${this.#shorts[field.short]}`); - } - this.#shorts[field.short] = name; - this.#shorts[name] = name; - } - } - /** - * Return the usage banner for the given configuration - */ - usage() { - if (this.#usage) - return this.#usage; - let headingLevel = 1; - const ui = cliui({ width }); - const first = this.#fields[0]; - let start = first?.type === 'heading' ? 1 : 0; - if (first?.type === 'heading') { - ui.div({ - padding: [0, 0, 0, 0], - text: normalize(first.text), - }); - } - ui.div({ padding: [0, 0, 0, 0], text: 'Usage:' }); - if (this.#options.usage) { - ui.div({ - text: this.#options.usage, - padding: [0, 0, 0, 2], - }); - } - else { - const cmd = basename(process.argv[1]); - const shortFlags = []; - const shorts = []; - const flags = []; - const opts = []; - for (const [field, config] of Object.entries(this.#configSet)) { - if (config.short) { - if (config.type === 'boolean') - shortFlags.push(config.short); - else - shorts.push([config.short, config.hint || field]); - } - else { - if (config.type === 'boolean') - flags.push(field); - else - opts.push([field, config.hint || field]); - } - } - const sf = shortFlags.length ? ' -' + shortFlags.join('') : ''; - const so = shorts.map(([k, v]) => ` --${k}=<${v}>`).join(''); - const lf = flags.map(k => ` --${k}`).join(''); - const lo = opts.map(([k, v]) => ` --${k}=<${v}>`).join(''); - const usage = `${cmd}${sf}${so}${lf}${lo}`.trim(); - ui.div({ - text: usage, - padding: [0, 0, 0, 2], - }); - } - ui.div({ padding: [0, 0, 0, 0], text: '' }); - const maybeDesc = this.#fields[start]; - if (isDescription(maybeDesc)) { - const print = normalize(maybeDesc.text, maybeDesc.pre); - start++; - ui.div({ padding: [0, 0, 0, 0], text: print }); - ui.div({ padding: [0, 0, 0, 0], text: '' }); - } - // turn each config type into a row, and figure out the width of the - // left hand indentation for the option descriptions. - let maxMax = Math.max(12, Math.min(26, Math.floor(width / 3))); - let maxWidth = 8; - let prev = undefined; - const rows = []; - for (const field of this.#fields.slice(start)) { - if (field.type !== 'config') { - if (prev?.type === 'config') - prev.skipLine = true; - prev = undefined; - field.text = normalize(field.text, !!field.pre); - rows.push(field); - continue; - } - const { value } = field; - const desc = value.description || ''; - const mult = value.multiple ? 'Can be set multiple times' : ''; - const dmDelim = mult && (desc.includes('\n') ? '\n\n' : '\n'); - const text = normalize(desc + dmDelim + mult); - const hint = value.hint || - (value.type === 'number' - ? 'n' - : value.type === 'string' - ? field.name - : undefined); - const short = !value.short - ? '' - : value.type === 'boolean' - ? `-${value.short} ` - : `-${value.short}<${hint}> `; - const left = value.type === 'boolean' - ? `${short}--${field.name}` - : `${short}--${field.name}=<${hint}>`; - const row = { text, left, type: 'config' }; - if (text.length > width - maxMax) { - row.skipLine = true; - } - if (prev && left.length > maxMax) - prev.skipLine = true; - prev = row; - const len = left.length + 4; - if (len > maxWidth && len < maxMax) { - maxWidth = len; - } - rows.push(row); - } - // every heading/description after the first gets indented by 2 - // extra spaces. - for (const row of rows) { - if (row.left) { - // If the row is too long, don't wrap it - // Bump the right-hand side down a line to make room - const configIndent = indent(Math.max(headingLevel, 2)); - if (row.left.length > maxWidth - 2) { - ui.div({ text: row.left, padding: [0, 0, 0, configIndent] }); - ui.div({ text: row.text, padding: [0, 0, 0, maxWidth] }); - } - else { - ui.div({ - text: row.left, - padding: [0, 1, 0, configIndent], - width: maxWidth, - }, { padding: [0, 0, 0, 0], text: row.text }); - } - if (row.skipLine) { - ui.div({ padding: [0, 0, 0, 0], text: '' }); - } - } - else { - if (isHeading(row)) { - const { level } = row; - headingLevel = level; - // only h1 and h2 have bottom padding - // h3-h6 do not - const b = level <= 2 ? 1 : 0; - ui.div({ ...row, padding: [0, 0, b, indent(level)] }); - } - else { - ui.div({ ...row, padding: [0, 0, 1, indent(headingLevel + 1)] }); - } - } - } - return (this.#usage = ui.toString()); - } - /** - * Return the configuration options as a plain object - */ - toJSON() { - return Object.fromEntries(Object.entries(this.#configSet).map(([field, def]) => [ - field, - { - type: def.type, - ...(def.multiple ? { multiple: true } : {}), - ...(def.delim ? { delim: def.delim } : {}), - ...(def.short ? { short: def.short } : {}), - ...(def.description ? { description: def.description } : {}), - ...(def.validate ? { validate: def.validate } : {}), - ...(def.default !== undefined ? { default: def.default } : {}), - }, - ])); - } - /** - * Custom printer for `util.inspect` - */ - [inspect.custom](_, options) { - return `Jack ${inspect(this.toJSON(), options)}`; - } -} -// Unwrap and un-indent, so we can wrap description -// strings however makes them look nice in the code. -const normalize = (s, pre = false) => pre - // prepend a ZWSP to each line so cliui doesn't strip it. - ? s.split('\n').map(l => `\u200b${l}`).join('\n') - : s - // remove single line breaks, except for lists - .replace(/([^\n])\n[ \t]*([^\n])/g, (_, $1, $2) => !/^[-*]/.test($2) ? `${$1} ${$2}` : `${$1}\n${$2}`) - // normalize mid-line whitespace - .replace(/([^\n])[ \t]+([^\n])/g, '$1 $2') - // two line breaks are enough - .replace(/\n{3,}/g, '\n\n') - .trim(); -/** - * Main entry point. Create and return a {@link Jack} object. - */ -export const jack = (options = {}) => new Jack(options); -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/deps/npm/node_modules/jackspeak/dist/mjs/package.json b/deps/npm/node_modules/jackspeak/dist/mjs/package.json deleted file mode 100644 index 3dbc1ca591c055..00000000000000 --- a/deps/npm/node_modules/jackspeak/dist/mjs/package.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "type": "module" -} diff --git a/deps/npm/node_modules/jackspeak/dist/mjs/parse-args.js b/deps/npm/node_modules/jackspeak/dist/mjs/parse-args.js deleted file mode 100644 index 24ec319d38199c..00000000000000 --- a/deps/npm/node_modules/jackspeak/dist/mjs/parse-args.js +++ /dev/null @@ -1,19 +0,0 @@ -// polyfill that overwrites parse-args.ts in the mjs build -import { createRequire } from 'module'; -import * as util from 'util'; -const pv = typeof process === 'object' && - !!process && - typeof process.version === 'string' - ? process.version - : 'v0.0.0'; -const pvs = pv - .replace(/^v/, '') - .split('.') - .map(s => parseInt(s, 10)); -let { parseArgs: pa } = util; -if (!pa || pvs[0] > 18 || pvs[1] < 11) { - const require = createRequire(import.meta.url); - pa = require('@pkgjs/parseargs').parseArgs; -} -export const parseArgs = pa; -//# sourceMappingURL=parse-args-esm.js.map \ No newline at end of file diff --git a/deps/npm/node_modules/jackspeak/package.json b/deps/npm/node_modules/jackspeak/package.json deleted file mode 100644 index 8d85e7f09e9152..00000000000000 --- a/deps/npm/node_modules/jackspeak/package.json +++ /dev/null @@ -1,98 +0,0 @@ -{ - "name": "jackspeak", - "version": "2.2.0", - "description": "A very strict and proper argument parser.", - "main": "./dist/cjs/index.js", - "module": "./dist/mjs/index.js", - "types": "./dist/mjs/index.js", - "exports": { - ".": { - "import": { - "types": "./dist/mjs/index.d.ts", - "default": "./dist/mjs/index.js" - }, - "require": { - "types": "./dist/cjs/index.d.ts", - "default": "./dist/cjs/index.js" - } - } - }, - "files": [ - "dist" - ], - "scripts": { - "build-examples": "for i in examples/*.js ; do node $i -h > ${i/.js/.txt}; done", - "preversion": "npm test", - "postversion": "npm publish", - "prepublishOnly": "git push origin --follow-tags", - "prepare": "tsc -p tsconfig.json && tsc -p tsconfig-esm.json && bash ./scripts/fixup.sh", - "pretest": "npm run prepare", - "presnap": "npm run prepare", - "test": "c8 tap", - "snap": "c8 tap", - "format": "prettier --write . --loglevel warn", - "typedoc": "typedoc --tsconfig tsconfig-esm.json ./src/*.ts" - }, - "license": "BlueOak-1.0.0", - "prettier": { - "semi": false, - "printWidth": 75, - "tabWidth": 2, - "useTabs": false, - "singleQuote": true, - "jsxSingleQuote": false, - "bracketSameLine": true, - "arrowParens": "avoid", - "endOfLine": "lf" - }, - "tap": { - "coverage": false, - "node-arg": [ - "--no-warnings", - "--loader", - "ts-node/esm" - ], - "ts": false - }, - "devDependencies": { - "@types/node": "^18.15.11", - "@types/pkgjs__parseargs": "^0.10.0", - "@types/tap": "^15.0.8", - "c8": "^7.13.0", - "eslint-config-prettier": "^8.8.0", - "prettier": "^2.8.6", - "tap": "^16.3.4", - "ts-node": "^10.9.1", - "typedoc": "^0.23.28", - "typescript": "^5.0.2" - }, - "dependencies": { - "@isaacs/cliui": "^8.0.2" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/isaacs/jackspeak.git" - }, - "keywords": [ - "argument", - "parser", - "args", - "option", - "flag", - "cli", - "command", - "line", - "parse", - "parsing" - ], - "author": "Isaac Z. Schlueter ", - "optionalDependencies": { - "@pkgjs/parseargs": "^0.11.0" - } -} diff --git a/deps/npm/node_modules/libnpmaccess/package.json b/deps/npm/node_modules/libnpmaccess/package.json index 42ea3c661c2911..15581fe03ae4d0 100644 --- a/deps/npm/node_modules/libnpmaccess/package.json +++ b/deps/npm/node_modules/libnpmaccess/package.json @@ -17,7 +17,7 @@ "devDependencies": { "@npmcli/eslint-config": "^4.0.0", "@npmcli/mock-registry": "^1.0.0", - "@npmcli/template-oss": "4.14.1", + "@npmcli/template-oss": "4.12.1", "nock": "^13.3.0", "tap": "^16.3.4" }, @@ -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.12.1", "content": "../../scripts/template-oss/index.js" }, "tap": { diff --git a/deps/npm/node_modules/libnpmdiff/lib/untar.js b/deps/npm/node_modules/libnpmdiff/lib/untar.js index 341ae27d1e8263..16b69ab8fdd010 100644 --- a/deps/npm/node_modules/libnpmdiff/lib/untar.js +++ b/deps/npm/node_modules/libnpmdiff/lib/untar.js @@ -1,5 +1,5 @@ const tar = require('tar') -const { minimatch } = require('minimatch') +const minimatch = require('minimatch') const normalizeMatch = str => str .replace(/\\+/g, '/') diff --git a/deps/npm/node_modules/libnpmdiff/package.json b/deps/npm/node_modules/libnpmdiff/package.json index 9e2e96bae61c99..8fc6d7a0b50464 100644 --- a/deps/npm/node_modules/libnpmdiff/package.json +++ b/deps/npm/node_modules/libnpmdiff/package.json @@ -1,6 +1,6 @@ { "name": "libnpmdiff", - "version": "5.0.17", + "version": "5.0.15", "description": "The registry diff", "repository": { "type": "git", @@ -42,23 +42,23 @@ }, "devDependencies": { "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.14.1", + "@npmcli/template-oss": "4.12.1", "tap": "^16.3.4" }, "dependencies": { - "@npmcli/arborist": "^6.2.9", + "@npmcli/arborist": "^6.2.7", "@npmcli/disparity-colors": "^3.0.0", "@npmcli/installed-package-contents": "^2.0.2", "binary-extensions": "^2.2.0", "diff": "^5.1.0", - "minimatch": "^9.0.0", + "minimatch": "^7.4.2", "npm-package-arg": "^10.1.0", "pacote": "^15.0.8", "tar": "^6.1.13" }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.14.1", + "version": "4.12.1", "content": "../../scripts/template-oss/index.js" }, "tap": { diff --git a/deps/npm/node_modules/libnpmexec/lib/file-exists.js b/deps/npm/node_modules/libnpmexec/lib/file-exists.js index 55c04bd4dc547e..0a8d79e83b2569 100644 --- a/deps/npm/node_modules/libnpmexec/lib/file-exists.js +++ b/deps/npm/node_modules/libnpmexec/lib/file-exists.js @@ -1,6 +1,6 @@ const { resolve } = require('path') const { stat } = require('fs/promises') -const { walkUp } = require('walk-up-path') +const walkUp = require('walk-up-path') const fileExists = async (file) => { try { diff --git a/deps/npm/node_modules/libnpmexec/lib/index.js b/deps/npm/node_modules/libnpmexec/lib/index.js index b7aa43588c0fd8..719f81ec11d57b 100644 --- a/deps/npm/node_modules/libnpmexec/lib/index.js +++ b/deps/npm/node_modules/libnpmexec/lib/index.js @@ -35,15 +35,12 @@ const getManifest = async (spec, flatOptions) => { // Returns the required manifest if the spec is missing from the tree // Returns the found node if it is in the tree -const missingFromTree = async ({ spec, tree, flatOptions, isNpxTree }) => { - // If asking for a spec by name only (spec.raw === spec.name): - // - In local or global mode go with anything in the tree that matches - // - If looking in the npx cache check if a newer version is available - const npxByNameOnly = isNpxTree && spec.name === spec.raw - if (spec.registry && spec.type !== 'tag' && !npxByNameOnly) { +const missingFromTree = async ({ spec, tree, flatOptions }) => { + if (spec.registry && spec.type !== 'tag') { // registry spec that is not a specific tag. const nodesBySpec = tree.inventory.query('packageName', spec.name) for (const node of nodesBySpec) { + // package requested by name only (or name@*) if (spec.rawSpec === '*') { return { node } } @@ -59,8 +56,8 @@ const missingFromTree = async ({ spec, tree, flatOptions, isNpxTree }) => { const manifest = await getManifest(spec, flatOptions) return { manifest } } else { - // non-registry spec, or a specific tag, or name only in npx tree. Look up - // manifest and check resolved to see if it's in the tree. + // non-registry spec, or a specific tag. Look up manifest and check + // resolved to see if it's in the tree. const manifest = await getManifest(spec, flatOptions) if (spec.type === 'directory') { return { manifest } @@ -227,12 +224,7 @@ const exec = async (opts) => { }) const npxTree = await npxArb.loadActual() await Promise.all(needInstall.map(async ({ spec }) => { - const { manifest } = await missingFromTree({ - spec, - tree: npxTree, - flatOptions, - isNpxTree: true, - }) + const { manifest } = await missingFromTree({ spec, tree: npxTree, flatOptions }) if (manifest) { // Manifest is not in npxCache, we need to install it there if (!spec.registry) { diff --git a/deps/npm/node_modules/libnpmexec/package.json b/deps/npm/node_modules/libnpmexec/package.json index e47e301ab7dd77..2582a253f906ca 100644 --- a/deps/npm/node_modules/libnpmexec/package.json +++ b/deps/npm/node_modules/libnpmexec/package.json @@ -1,6 +1,6 @@ { "name": "libnpmexec", - "version": "5.0.17", + "version": "5.0.15", "files": [ "bin/", "lib/" @@ -52,7 +52,7 @@ "devDependencies": { "@npmcli/eslint-config": "^4.0.0", "@npmcli/mock-registry": "^1.0.0", - "@npmcli/template-oss": "4.14.1", + "@npmcli/template-oss": "4.12.1", "bin-links": "^4.0.1", "just-extend": "^6.2.0", "just-safe-set": "^4.2.1", @@ -60,7 +60,7 @@ "tap": "^16.3.4" }, "dependencies": { - "@npmcli/arborist": "^6.2.9", + "@npmcli/arborist": "^6.2.7", "@npmcli/run-script": "^6.0.0", "chalk": "^4.1.0", "ci-info": "^3.7.1", @@ -71,11 +71,11 @@ "read": "^2.0.0", "read-package-json-fast": "^3.0.2", "semver": "^7.3.7", - "walk-up-path": "^3.0.1" + "walk-up-path": "^1.0.0" }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.14.1", + "version": "4.12.1", "content": "../../scripts/template-oss/index.js" } } diff --git a/deps/npm/node_modules/libnpmfund/package.json b/deps/npm/node_modules/libnpmfund/package.json index 88cff7aa6bb11f..60fc641d2778ac 100644 --- a/deps/npm/node_modules/libnpmfund/package.json +++ b/deps/npm/node_modules/libnpmfund/package.json @@ -1,6 +1,6 @@ { "name": "libnpmfund", - "version": "4.0.17", + "version": "4.0.15", "main": "lib/index.js", "files": [ "bin/", @@ -41,18 +41,18 @@ }, "devDependencies": { "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.14.1", + "@npmcli/template-oss": "4.12.1", "tap": "^16.3.4" }, "dependencies": { - "@npmcli/arborist": "^6.2.9" + "@npmcli/arborist": "^6.2.7" }, "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.14.1", + "version": "4.12.1", "content": "../../scripts/template-oss/index.js" }, "tap": { diff --git a/deps/npm/node_modules/libnpmhook/package.json b/deps/npm/node_modules/libnpmhook/package.json index bc439929e7c7a1..24f2d309ffd982 100644 --- a/deps/npm/node_modules/libnpmhook/package.json +++ b/deps/npm/node_modules/libnpmhook/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.14.1", + "@npmcli/template-oss": "4.12.1", "nock": "^13.3.0", "tap": "^16.3.4" }, @@ -44,7 +44,7 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.14.1", + "version": "4.12.1", "content": "../../scripts/template-oss/index.js" }, "tap": { diff --git a/deps/npm/node_modules/libnpmorg/package.json b/deps/npm/node_modules/libnpmorg/package.json index 0ee6abd7455a60..00d3f9f72e80c4 100644 --- a/deps/npm/node_modules/libnpmorg/package.json +++ b/deps/npm/node_modules/libnpmorg/package.json @@ -1,6 +1,6 @@ { "name": "libnpmorg", - "version": "5.0.4", + "version": "5.0.3", "description": "Programmatic api for `npm org` commands", "author": "GitHub Inc.", "main": "lib/index.js", @@ -28,8 +28,8 @@ ], "devDependencies": { "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.14.1", - "minipass": "^5.0.0", + "@npmcli/template-oss": "4.12.1", + "minipass": "^4.0.2", "nock": "^13.3.0", "tap": "^16.3.4" }, @@ -49,7 +49,7 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.14.1", + "version": "4.12.1", "content": "../../scripts/template-oss/index.js" }, "tap": { diff --git a/deps/npm/node_modules/libnpmpack/package.json b/deps/npm/node_modules/libnpmpack/package.json index 8589f5ddea8929..9c2e909aac4f10 100644 --- a/deps/npm/node_modules/libnpmpack/package.json +++ b/deps/npm/node_modules/libnpmpack/package.json @@ -1,6 +1,6 @@ { "name": "libnpmpack", - "version": "5.0.17", + "version": "5.0.15", "description": "Programmatic API for the bits behind npm pack", "author": "GitHub Inc.", "main": "lib/index.js", @@ -23,7 +23,7 @@ }, "devDependencies": { "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.14.1", + "@npmcli/template-oss": "4.12.1", "nock": "^13.3.0", "spawk": "^1.7.1", "tap": "^16.3.4" @@ -36,7 +36,7 @@ "bugs": "https://github.com/npm/libnpmpack/issues", "homepage": "https://npmjs.com/package/libnpmpack", "dependencies": { - "@npmcli/arborist": "^6.2.9", + "@npmcli/arborist": "^6.2.7", "@npmcli/run-script": "^6.0.0", "npm-package-arg": "^10.1.0", "pacote": "^15.0.8" @@ -46,7 +46,7 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.14.1", + "version": "4.12.1", "content": "../../scripts/template-oss/index.js" }, "tap": { diff --git a/deps/npm/node_modules/libnpmpublish/package.json b/deps/npm/node_modules/libnpmpublish/package.json index 2034ef85e47390..1557b8403d1043 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.1.3", "description": "Programmatic API for the bits behind npm publish and unpublish", "author": "GitHub Inc.", "main": "lib/index.js", @@ -25,7 +25,7 @@ "devDependencies": { "@npmcli/eslint-config": "^4.0.0", "@npmcli/mock-registry": "^1.0.0", - "@npmcli/template-oss": "4.14.1", + "@npmcli/template-oss": "4.12.1", "lodash.clonedeep": "^4.5.0", "nock": "^13.3.0", "tap": "^16.3.4" @@ -44,7 +44,7 @@ "npm-registry-fetch": "^14.0.3", "proc-log": "^3.0.0", "semver": "^7.3.7", - "sigstore": "^1.4.0", + "sigstore": "^1.0.0", "ssri": "^10.0.1" }, "engines": { @@ -52,7 +52,7 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.14.1", + "version": "4.12.1", "content": "../../scripts/template-oss/index.js" }, "tap": { diff --git a/deps/npm/node_modules/libnpmsearch/package.json b/deps/npm/node_modules/libnpmsearch/package.json index e7dd7aca9baf16..765c6897360b6b 100644 --- a/deps/npm/node_modules/libnpmsearch/package.json +++ b/deps/npm/node_modules/libnpmsearch/package.json @@ -26,7 +26,7 @@ }, "devDependencies": { "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.14.1", + "@npmcli/template-oss": "4.12.1", "nock": "^13.3.0", "tap": "^16.3.4" }, @@ -45,7 +45,7 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.14.1", + "version": "4.12.1", "content": "../../scripts/template-oss/index.js" }, "tap": { diff --git a/deps/npm/node_modules/libnpmteam/package.json b/deps/npm/node_modules/libnpmteam/package.json index 5558224050eec7..ff4f5a7852a82a 100644 --- a/deps/npm/node_modules/libnpmteam/package.json +++ b/deps/npm/node_modules/libnpmteam/package.json @@ -16,7 +16,7 @@ }, "devDependencies": { "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.14.1", + "@npmcli/template-oss": "4.12.1", "nock": "^13.3.0", "tap": "^16.3.4" }, @@ -39,7 +39,7 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.14.1", + "version": "4.12.1", "content": "../../scripts/template-oss/index.js" }, "tap": { diff --git a/deps/npm/node_modules/libnpmversion/package.json b/deps/npm/node_modules/libnpmversion/package.json index 7bae86d8afe228..46362ae10b1044 100644 --- a/deps/npm/node_modules/libnpmversion/package.json +++ b/deps/npm/node_modules/libnpmversion/package.json @@ -32,7 +32,7 @@ }, "devDependencies": { "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.14.1", + "@npmcli/template-oss": "4.12.1", "require-inject": "^1.4.4", "tap": "^16.3.4" }, @@ -48,7 +48,7 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.14.1", + "version": "4.12.1", "content": "../../scripts/template-oss/index.js" } } diff --git a/deps/npm/node_modules/make-fetch-happen/lib/cache/entry.js b/deps/npm/node_modules/make-fetch-happen/lib/cache/entry.js index 45141095074ecb..dba89d715d8a51 100644 --- a/deps/npm/node_modules/make-fetch-happen/lib/cache/entry.js +++ b/deps/npm/node_modules/make-fetch-happen/lib/cache/entry.js @@ -1,5 +1,5 @@ const { Request, Response } = require('minipass-fetch') -const { Minipass } = require('minipass') +const Minipass = require('minipass') const MinipassFlush = require('minipass-flush') const cacache = require('cacache') const url = require('url') @@ -99,12 +99,6 @@ const getMetadata = (request, response, options) => { } } - for (const name of options.cacheAdditionalHeaders) { - if (response.headers.has(name)) { - metadata.resHeaders[name] = response.headers.get(name) - } - } - return metadata } @@ -337,7 +331,6 @@ class CacheEntry { // that reads from cacache and attach it to a new Response const body = new Minipass() const headers = { ...this.policy.responseHeaders() } - const onResume = () => { const cacheStream = cacache.get.stream.byDigest( this.options.cachePath, this.entry.integrity, { memoize: this.options.memoize } @@ -424,24 +417,6 @@ class CacheEntry { } } - for (const name of options.cacheAdditionalHeaders) { - const inMeta = hasOwnProperty(metadata.resHeaders, name) - const inEntry = hasOwnProperty(this.entry.metadata.resHeaders, name) - const inPolicy = hasOwnProperty(this.policy.response.headers, name) - - // if the header is in the existing entry, but it is not in the metadata - // then we need to write it to the metadata as this will refresh the on-disk cache - if (!inMeta && inEntry) { - metadata.resHeaders[name] = this.entry.metadata.resHeaders[name] - } - // if the header is in the metadata, but not in the policy, then we need to set - // it in the policy so that it's included in the immediate response. future - // responses will load a new cache entry, so we don't need to change that - if (!inPolicy && inMeta) { - this.policy.response.headers[name] = metadata.resHeaders[name] - } - } - try { await cacache.index.insert(options.cachePath, this.key, this.entry.integrity, { size: this.entry.size, diff --git a/deps/npm/node_modules/make-fetch-happen/lib/options.js b/deps/npm/node_modules/make-fetch-happen/lib/options.js index f77511279f831d..daa9ecd9d5d5f2 100644 --- a/deps/npm/node_modules/make-fetch-happen/lib/options.js +++ b/deps/npm/node_modules/make-fetch-happen/lib/options.js @@ -40,8 +40,6 @@ const configureOptions = (opts) => { } } - options.cacheAdditionalHeaders = options.cacheAdditionalHeaders || [] - // cacheManager is deprecated, but if it's set and // cachePath is not we should copy it to the new field if (options.cacheManager && !options.cachePath) { diff --git a/deps/npm/node_modules/make-fetch-happen/lib/remote.js b/deps/npm/node_modules/make-fetch-happen/lib/remote.js index bdbcc79cad908d..068c73a8a7a7e3 100644 --- a/deps/npm/node_modules/make-fetch-happen/lib/remote.js +++ b/deps/npm/node_modules/make-fetch-happen/lib/remote.js @@ -1,4 +1,4 @@ -const { Minipass } = require('minipass') +const Minipass = require('minipass') const fetch = require('minipass-fetch') const promiseRetry = require('promise-retry') const ssri = require('ssri') diff --git a/deps/npm/node_modules/make-fetch-happen/package.json b/deps/npm/node_modules/make-fetch-happen/package.json index fd415dc9966faa..7c340820f0c550 100644 --- a/deps/npm/node_modules/make-fetch-happen/package.json +++ b/deps/npm/node_modules/make-fetch-happen/package.json @@ -1,6 +1,6 @@ { "name": "make-fetch-happen", - "version": "11.1.1", + "version": "11.0.3", "description": "Opinionated, caching, retrying fetch client", "main": "lib/index.js", "files": [ @@ -40,7 +40,7 @@ "https-proxy-agent": "^5.0.0", "is-lambda": "^1.0.1", "lru-cache": "^7.7.1", - "minipass": "^5.0.0", + "minipass": "^4.0.0", "minipass-fetch": "^3.0.0", "minipass-flush": "^1.0.5", "minipass-pipeline": "^1.2.4", @@ -51,7 +51,7 @@ }, "devDependencies": { "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.14.1", + "@npmcli/template-oss": "4.11.3", "nock": "^13.2.4", "safe-buffer": "^5.2.1", "standard-version": "^9.3.2", @@ -72,7 +72,6 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.14.1", - "publish": "true" + "version": "4.11.3" } } diff --git a/deps/npm/node_modules/minimatch/dist/cjs/_parse.js b/deps/npm/node_modules/minimatch/dist/cjs/_parse.js new file mode 100644 index 00000000000000..4387a26171dfe8 --- /dev/null +++ b/deps/npm/node_modules/minimatch/dist/cjs/_parse.js @@ -0,0 +1,300 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.parse = void 0; +// parse a single path portion +const brace_expressions_js_1 = require("./brace-expressions.js"); +const assert_valid_pattern_js_1 = require("./assert-valid-pattern.js"); +const globUnescape = (s) => s.replace(/\\(.)/g, '$1'); +const regExpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&'); +// "abc" -> { a:true, b:true, c:true } +const charSet = (s) => s.split('').reduce((set, c) => { + set[c] = true; + return set; +}, {}); +const plTypes = { + '!': { open: '(?:(?!(?:', close: '))[^/]*?)' }, + '?': { open: '(?:', close: ')?' }, + '+': { open: '(?:', close: ')+' }, + '*': { open: '(?:', close: ')*' }, + '@': { open: '(?:', close: ')' }, +}; +// characters that need to be escaped in RegExp. +const reSpecials = charSet('().*{}+?[]^$\\!'); +// characters that indicate we have to add the pattern start +const addPatternStartSet = charSet('[.('); +// any single thing other than / +// don't need to escape / when using new RegExp() +const qmark = '[^/]'; +// * => any number of characters +const star = qmark + '*?'; +// TODO: take an offset and length, so we can sub-parse the extglobs +const parse = (options, pattern, debug) => { + (0, assert_valid_pattern_js_1.assertValidPattern)(pattern); + if (pattern === '') + return ''; + let re = ''; + let hasMagic = false; + let escaping = false; + // ? => one single character + const patternListStack = []; + const negativeLists = []; + let stateChar = false; + let uflag = false; + let pl; + // . and .. never match anything that doesn't start with ., + // even when options.dot is set. However, if the pattern + // starts with ., then traversal patterns can match. + let dotTravAllowed = pattern.charAt(0) === '.'; + let dotFileAllowed = options.dot || dotTravAllowed; + const patternStart = () => dotTravAllowed + ? '' + : dotFileAllowed + ? '(?!(?:^|\\/)\\.{1,2}(?:$|\\/))' + : '(?!\\.)'; + const subPatternStart = (p) => p.charAt(0) === '.' + ? '' + : options.dot + ? '(?!(?:^|\\/)\\.{1,2}(?:$|\\/))' + : '(?!\\.)'; + const clearStateChar = () => { + if (stateChar) { + // we had some state-tracking character + // that wasn't consumed by this pass. + switch (stateChar) { + case '*': + re += star; + hasMagic = true; + break; + case '?': + re += qmark; + hasMagic = true; + break; + default: + re += '\\' + stateChar; + break; + } + debug('clearStateChar %j %j', stateChar, re); + stateChar = false; + } + }; + for (let i = 0, c; i < pattern.length && (c = pattern.charAt(i)); i++) { + debug('%s\t%s %s %j', pattern, i, re, c); + // skip over any that are escaped. + if (escaping) { + // completely not allowed, even escaped. + // should be impossible. + /* c8 ignore start */ + if (c === '/') { + return false; + } + /* c8 ignore stop */ + if (reSpecials[c]) { + re += '\\'; + } + re += c; + escaping = false; + continue; + } + switch (c) { + // Should already be path-split by now. + /* c8 ignore start */ + case '/': { + return false; + } + /* c8 ignore stop */ + case '\\': + clearStateChar(); + escaping = true; + continue; + // the various stateChar values + // for the "extglob" stuff. + case '?': + case '*': + case '+': + case '@': + case '!': + debug('%s\t%s %s %j <-- stateChar', pattern, i, re, c); + // if we already have a stateChar, then it means + // that there was something like ** or +? in there. + // Handle the stateChar, then proceed with this one. + debug('call clearStateChar %j', stateChar); + clearStateChar(); + stateChar = c; + // if extglob is disabled, then +(asdf|foo) isn't a thing. + // just clear the statechar *now*, rather than even diving into + // the patternList stuff. + if (options.noext) + clearStateChar(); + continue; + case '(': { + if (!stateChar) { + re += '\\('; + continue; + } + const plEntry = { + type: stateChar, + start: i - 1, + reStart: re.length, + open: plTypes[stateChar].open, + close: plTypes[stateChar].close, + }; + debug(pattern, '\t', plEntry); + patternListStack.push(plEntry); + // negation is (?:(?!(?:js)(?:))[^/]*) + re += plEntry.open; + // next entry starts with a dot maybe? + if (plEntry.start === 0 && plEntry.type !== '!') { + dotTravAllowed = true; + re += subPatternStart(pattern.slice(i + 1)); + } + debug('plType %j %j', stateChar, re); + stateChar = false; + continue; + } + case ')': { + const plEntry = patternListStack[patternListStack.length - 1]; + if (!plEntry) { + re += '\\)'; + continue; + } + patternListStack.pop(); + // closing an extglob + clearStateChar(); + hasMagic = true; + pl = plEntry; + // negation is (?:(?!js)[^/]*) + // The others are (?:) + re += pl.close; + if (pl.type === '!') { + negativeLists.push(Object.assign(pl, { reEnd: re.length })); + } + continue; + } + case '|': { + const plEntry = patternListStack[patternListStack.length - 1]; + if (!plEntry) { + re += '\\|'; + continue; + } + clearStateChar(); + re += '|'; + // next subpattern can start with a dot? + if (plEntry.start === 0 && plEntry.type !== '!') { + dotTravAllowed = true; + re += subPatternStart(pattern.slice(i + 1)); + } + continue; + } + // these are mostly the same in regexp and glob + case '[': + // swallow any state-tracking char before the [ + clearStateChar(); + const [src, needUflag, consumed, magic] = (0, brace_expressions_js_1.parseClass)(pattern, i); + if (consumed) { + re += src; + uflag = uflag || needUflag; + i += consumed - 1; + hasMagic = hasMagic || magic; + } + else { + re += '\\['; + } + continue; + case ']': + re += '\\' + c; + continue; + default: + // swallow any state char that wasn't consumed + clearStateChar(); + re += regExpEscape(c); + break; + } // switch + } // for + // handle the case where we had a +( thing at the *end* + // of the pattern. + // each pattern list stack adds 3 chars, and we need to go through + // and escape any | chars that were passed through as-is for the regexp. + // Go through and escape them, taking care not to double-escape any + // | chars that were already escaped. + for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { + let tail; + tail = re.slice(pl.reStart + pl.open.length); + debug(pattern, 'setting tail', re, pl); + // maybe some even number of \, then maybe 1 \, followed by a | + tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, (_, $1, $2) => { + if (!$2) { + // the | isn't already escaped, so escape it. + $2 = '\\'; + // should already be done + /* c8 ignore start */ + } + /* c8 ignore stop */ + // need to escape all those slashes *again*, without escaping the + // one that we need for escaping the | character. As it works out, + // escaping an even number of slashes can be done by simply repeating + // it exactly after itself. That's why this trick works. + // + // I am sorry that you have to see this. + return $1 + $1 + $2 + '|'; + }); + debug('tail=%j\n %s', tail, tail, pl, re); + const t = pl.type === '*' ? star : pl.type === '?' ? qmark : '\\' + pl.type; + hasMagic = true; + re = re.slice(0, pl.reStart) + t + '\\(' + tail; + } + // handle trailing things that only matter at the very end. + clearStateChar(); + if (escaping) { + // trailing \\ + re += '\\\\'; + } + // only need to apply the nodot start if the re starts with + // something that could conceivably capture a dot + const addPatternStart = addPatternStartSet[re.charAt(0)]; + // Hack to work around lack of negative lookbehind in JS + // A pattern like: *.!(x).!(y|z) needs to ensure that a name + // like 'a.xyz.yz' doesn't match. So, the first negative + // lookahead, has to look ALL the way ahead, to the end of + // the pattern. + for (let n = negativeLists.length - 1; n > -1; n--) { + const nl = negativeLists[n]; + const nlBefore = re.slice(0, nl.reStart); + const nlFirst = re.slice(nl.reStart, nl.reEnd - 8); + let nlAfter = re.slice(nl.reEnd); + const nlLast = re.slice(nl.reEnd - 8, nl.reEnd) + nlAfter; + // Handle nested stuff like *(*.js|!(*.json)), where open parens + // mean that we should *not* include the ) in the bit that is considered + // "after" the negated section. + const closeParensBefore = nlBefore.split(')').length; + const openParensBefore = nlBefore.split('(').length - closeParensBefore; + let cleanAfter = nlAfter; + for (let i = 0; i < openParensBefore; i++) { + cleanAfter = cleanAfter.replace(/\)[+*?]?/, ''); + } + nlAfter = cleanAfter; + const dollar = nlAfter === '' ? '(?:$|\\/)' : ''; + re = nlBefore + nlFirst + nlAfter + dollar + nlLast; + } + // if the re is not "" at this point, then we need to make sure + // it doesn't match against an empty path part. + // Otherwise a/* will match a/, which it should not. + if (re !== '' && hasMagic) { + re = '(?=.)' + re; + } + if (addPatternStart) { + re = patternStart() + re; + } + // if it's nocase, and the lcase/uppercase don't match, it's magic + if (options.nocase && !hasMagic && !options.nocaseMagicOnly) { + hasMagic = pattern.toUpperCase() !== pattern.toLowerCase(); + } + // skip the regexp for non-magical patterns + // unescape anything in it, though, so that it'll be + // an exact match against a file etc. + if (!hasMagic) { + return globUnescape(re); + } + return re; +}; +exports.parse = parse; +//# sourceMappingURL=_parse.js.map \ No newline at end of file diff --git a/deps/npm/node_modules/minimatch/dist/cjs/ast.js b/deps/npm/node_modules/minimatch/dist/cjs/ast.js deleted file mode 100644 index 191e7e871c51d9..00000000000000 --- a/deps/npm/node_modules/minimatch/dist/cjs/ast.js +++ /dev/null @@ -1,566 +0,0 @@ -"use strict"; -// parse a single path portion -Object.defineProperty(exports, "__esModule", { value: true }); -exports.AST = void 0; -const brace_expressions_js_1 = require("./brace-expressions.js"); -const unescape_js_1 = require("./unescape.js"); -const types = new Set(['!', '?', '+', '*', '@']); -const isExtglobType = (c) => types.has(c); -// Patterns that get prepended to bind to the start of either the -// entire string, or just a single path portion, to prevent dots -// and/or traversal patterns, when needed. -// Exts don't need the ^ or / bit, because the root binds that already. -const startNoTraversal = '(?!\\.\\.?(?:$|/))'; -const startNoDot = '(?!\\.)'; -// characters that indicate a start of pattern needs the "no dots" bit, -// because a dot *might* be matched. ( is not in the list, because in -// the case of a child extglob, it will handle the prevention itself. -const addPatternStart = new Set(['[', '.']); -// cases where traversal is A-OK, no dot prevention needed -const justDots = new Set(['..', '.']); -const reSpecials = new Set('().*{}+?[]^$\\!'); -const regExpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&'); -// any single thing other than / -const qmark = '[^/]'; -// * => any number of characters -const star = qmark + '*?'; -// use + when we need to ensure that *something* matches, because the * is -// the only thing in the path portion. -const starNoEmpty = qmark + '+?'; -// remove the \ chars that we added if we end up doing a nonmagic compare -// const deslash = (s: string) => s.replace(/\\(.)/g, '$1') -class AST { - type; - #root; - #hasMagic; - #uflag = false; - #parts = []; - #parent; - #parentIndex; - #negs; - #filledNegs = false; - #options; - #toString; - // set to true if it's an extglob with no children - // (which really means one child of '') - #emptyExt = false; - constructor(type, parent, options = {}) { - this.type = type; - // extglobs are inherently magical - if (type) - this.#hasMagic = true; - this.#parent = parent; - this.#root = this.#parent ? this.#parent.#root : this; - this.#options = this.#root === this ? options : this.#root.#options; - this.#negs = this.#root === this ? [] : this.#root.#negs; - if (type === '!' && !this.#root.#filledNegs) - this.#negs.push(this); - this.#parentIndex = this.#parent ? this.#parent.#parts.length : 0; - } - get hasMagic() { - /* c8 ignore start */ - if (this.#hasMagic !== undefined) - return this.#hasMagic; - /* c8 ignore stop */ - for (const p of this.#parts) { - if (typeof p === 'string') - continue; - if (p.type || p.hasMagic) - return (this.#hasMagic = true); - } - // note: will be undefined until we generate the regexp src and find out - return this.#hasMagic; - } - // reconstructs the pattern - toString() { - if (this.#toString !== undefined) - return this.#toString; - if (!this.type) { - return (this.#toString = this.#parts.map(p => String(p)).join('')); - } - else { - return (this.#toString = - this.type + '(' + this.#parts.map(p => String(p)).join('|') + ')'); - } - } - #fillNegs() { - /* c8 ignore start */ - if (this !== this.#root) - throw new Error('should only call on root'); - if (this.#filledNegs) - return this; - /* c8 ignore stop */ - // call toString() once to fill this out - this.toString(); - this.#filledNegs = true; - let n; - while ((n = this.#negs.pop())) { - if (n.type !== '!') - continue; - // walk up the tree, appending everthing that comes AFTER parentIndex - let p = n; - let pp = p.#parent; - while (pp) { - for (let i = p.#parentIndex + 1; !pp.type && i < pp.#parts.length; i++) { - for (const part of n.#parts) { - /* c8 ignore start */ - if (typeof part === 'string') { - throw new Error('string part in extglob AST??'); - } - /* c8 ignore stop */ - part.copyIn(pp.#parts[i]); - } - } - p = pp; - pp = p.#parent; - } - } - return this; - } - push(...parts) { - for (const p of parts) { - if (p === '') - continue; - /* c8 ignore start */ - if (typeof p !== 'string' && !(p instanceof AST && p.#parent === this)) { - throw new Error('invalid part: ' + p); - } - /* c8 ignore stop */ - this.#parts.push(p); - } - } - toJSON() { - const ret = this.type === null - ? this.#parts.slice().map(p => (typeof p === 'string' ? p : p.toJSON())) - : [this.type, ...this.#parts.map(p => p.toJSON())]; - if (this.isStart() && !this.type) - ret.unshift([]); - if (this.isEnd() && - (this === this.#root || - (this.#root.#filledNegs && this.#parent?.type === '!'))) { - ret.push({}); - } - return ret; - } - isStart() { - if (this.#root === this) - return true; - // if (this.type) return !!this.#parent?.isStart() - if (!this.#parent?.isStart()) - return false; - if (this.#parentIndex === 0) - return true; - // if everything AHEAD of this is a negation, then it's still the "start" - const p = this.#parent; - for (let i = 0; i < this.#parentIndex; i++) { - const pp = p.#parts[i]; - if (!(pp instanceof AST && pp.type === '!')) { - return false; - } - } - return true; - } - isEnd() { - if (this.#root === this) - return true; - if (this.#parent?.type === '!') - return true; - if (!this.#parent?.isEnd()) - return false; - if (!this.type) - return this.#parent?.isEnd(); - // if not root, it'll always have a parent - /* c8 ignore start */ - const pl = this.#parent ? this.#parent.#parts.length : 0; - /* c8 ignore stop */ - return this.#parentIndex === pl - 1; - } - copyIn(part) { - if (typeof part === 'string') - this.push(part); - else - this.push(part.clone(this)); - } - clone(parent) { - const c = new AST(this.type, parent); - for (const p of this.#parts) { - c.copyIn(p); - } - return c; - } - static #parseAST(str, ast, pos, opt) { - let escaping = false; - let inBrace = false; - let braceStart = -1; - let braceNeg = false; - if (ast.type === null) { - // outside of a extglob, append until we find a start - let i = pos; - let acc = ''; - while (i < str.length) { - const c = str.charAt(i++); - // still accumulate escapes at this point, but we do ignore - // starts that are escaped - if (escaping || c === '\\') { - escaping = !escaping; - acc += c; - continue; - } - if (inBrace) { - if (i === braceStart + 1) { - if (c === '^' || c === '!') { - braceNeg = true; - } - } - else if (c === ']' && !(i === braceStart + 2 && braceNeg)) { - inBrace = false; - } - acc += c; - continue; - } - else if (c === '[') { - inBrace = true; - braceStart = i; - braceNeg = false; - acc += c; - continue; - } - if (!opt.noext && isExtglobType(c) && str.charAt(i) === '(') { - ast.push(acc); - acc = ''; - const ext = new AST(c, ast); - i = AST.#parseAST(str, ext, i, opt); - ast.push(ext); - continue; - } - acc += c; - } - ast.push(acc); - return i; - } - // some kind of extglob, pos is at the ( - // find the next | or ) - let i = pos + 1; - let part = new AST(null, ast); - const parts = []; - let acc = ''; - while (i < str.length) { - const c = str.charAt(i++); - // still accumulate escapes at this point, but we do ignore - // starts that are escaped - if (escaping || c === '\\') { - escaping = !escaping; - acc += c; - continue; - } - if (inBrace) { - if (i === braceStart + 1) { - if (c === '^' || c === '!') { - braceNeg = true; - } - } - else if (c === ']' && !(i === braceStart + 2 && braceNeg)) { - inBrace = false; - } - acc += c; - continue; - } - else if (c === '[') { - inBrace = true; - braceStart = i; - braceNeg = false; - acc += c; - continue; - } - if (isExtglobType(c) && str.charAt(i) === '(') { - part.push(acc); - acc = ''; - const ext = new AST(c, part); - part.push(ext); - i = AST.#parseAST(str, ext, i, opt); - continue; - } - if (c === '|') { - part.push(acc); - acc = ''; - parts.push(part); - part = new AST(null, ast); - continue; - } - if (c === ')') { - if (acc === '' && ast.#parts.length === 0) { - ast.#emptyExt = true; - } - part.push(acc); - acc = ''; - ast.push(...parts, part); - return i; - } - acc += c; - } - // unfinished extglob - // if we got here, it was a malformed extglob! not an extglob, but - // maybe something else in there. - ast.type = null; - ast.#hasMagic = undefined; - ast.#parts = [str.substring(pos - 1)]; - return i; - } - static fromGlob(pattern, options = {}) { - const ast = new AST(null, undefined, options); - AST.#parseAST(pattern, ast, 0, options); - return ast; - } - // returns the regular expression if there's magic, or the unescaped - // string if not. - toMMPattern() { - // should only be called on root - /* c8 ignore start */ - if (this !== this.#root) - return this.#root.toMMPattern(); - /* c8 ignore stop */ - const glob = this.toString(); - const [re, body, hasMagic, uflag] = this.toRegExpSource(); - // if we're in nocase mode, and not nocaseMagicOnly, then we do - // still need a regular expression if we have to case-insensitively - // match capital/lowercase characters. - const anyMagic = hasMagic || - this.#hasMagic || - (this.#options.nocase && - !this.#options.nocaseMagicOnly && - glob.toUpperCase() !== glob.toLowerCase()); - if (!anyMagic) { - return body; - } - const flags = (this.#options.nocase ? 'i' : '') + (uflag ? 'u' : ''); - return Object.assign(new RegExp(`^${re}$`, flags), { - _src: re, - _glob: glob, - }); - } - // returns the string match, the regexp source, whether there's magic - // in the regexp (so a regular expression is required) and whether or - // not the uflag is needed for the regular expression (for posix classes) - // TODO: instead of injecting the start/end at this point, just return - // the BODY of the regexp, along with the start/end portions suitable - // for binding the start/end in either a joined full-path makeRe context - // (where we bind to (^|/), or a standalone matchPart context (where - // we bind to ^, and not /). Otherwise slashes get duped! - // - // In part-matching mode, the start is: - // - if not isStart: nothing - // - if traversal possible, but not allowed: ^(?!\.\.?$) - // - if dots allowed or not possible: ^ - // - if dots possible and not allowed: ^(?!\.) - // end is: - // - if not isEnd(): nothing - // - else: $ - // - // In full-path matching mode, we put the slash at the START of the - // pattern, so start is: - // - if first pattern: same as part-matching mode - // - if not isStart(): nothing - // - if traversal possible, but not allowed: /(?!\.\.?(?:$|/)) - // - if dots allowed or not possible: / - // - if dots possible and not allowed: /(?!\.) - // end is: - // - if last pattern, same as part-matching mode - // - else nothing - // - // Always put the (?:$|/) on negated tails, though, because that has to be - // there to bind the end of the negated pattern portion, and it's easier to - // just stick it in now rather than try to inject it later in the middle of - // the pattern. - // - // We can just always return the same end, and leave it up to the caller - // to know whether it's going to be used joined or in parts. - // And, if the start is adjusted slightly, can do the same there: - // - if not isStart: nothing - // - if traversal possible, but not allowed: (?:/|^)(?!\.\.?$) - // - if dots allowed or not possible: (?:/|^) - // - if dots possible and not allowed: (?:/|^)(?!\.) - // - // But it's better to have a simpler binding without a conditional, for - // performance, so probably better to return both start options. - // - // Then the caller just ignores the end if it's not the first pattern, - // and the start always gets applied. - // - // But that's always going to be $ if it's the ending pattern, or nothing, - // so the caller can just attach $ at the end of the pattern when building. - // - // So the todo is: - // - better detect what kind of start is needed - // - return both flavors of starting pattern - // - attach $ at the end of the pattern when creating the actual RegExp - // - // Ah, but wait, no, that all only applies to the root when the first pattern - // is not an extglob. If the first pattern IS an extglob, then we need all - // that dot prevention biz to live in the extglob portions, because eg - // +(*|.x*) can match .xy but not .yx. - // - // So, return the two flavors if it's #root and the first child is not an - // AST, otherwise leave it to the child AST to handle it, and there, - // use the (?:^|/) style of start binding. - // - // Even simplified further: - // - Since the start for a join is eg /(?!\.) and the start for a part - // is ^(?!\.), we can just prepend (?!\.) to the pattern (either root - // or start or whatever) and prepend ^ or / at the Regexp construction. - toRegExpSource() { - if (this.#root === this) - this.#fillNegs(); - if (!this.type) { - const noEmpty = this.isStart() && this.isEnd(); - const src = this.#parts - .map(p => { - const [re, _, hasMagic, uflag] = typeof p === 'string' - ? AST.#parseGlob(p, this.#hasMagic, noEmpty) - : p.toRegExpSource(); - this.#hasMagic = this.#hasMagic || hasMagic; - this.#uflag = this.#uflag || uflag; - return re; - }) - .join(''); - let start = ''; - if (this.isStart()) { - if (typeof this.#parts[0] === 'string') { - // this is the string that will match the start of the pattern, - // so we need to protect against dots and such. - // '.' and '..' cannot match unless the pattern is that exactly, - // even if it starts with . or dot:true is set. - const dotTravAllowed = this.#parts.length === 1 && justDots.has(this.#parts[0]); - if (!dotTravAllowed) { - const aps = addPatternStart; - // check if we have a possibility of matching . or .., - // and prevent that. - const needNoTrav = - // dots are allowed, and the pattern starts with [ or . - (this.#options.dot && aps.has(src.charAt(0))) || - // the pattern starts with \., and then [ or . - (src.startsWith('\\.') && aps.has(src.charAt(2))) || - // the pattern starts with \.\., and then [ or . - (src.startsWith('\\.\\.') && aps.has(src.charAt(4))); - // no need to prevent dots if it can't match a dot, or if a - // sub-pattern will be preventing it anyway. - const needNoDot = !this.#options.dot && aps.has(src.charAt(0)); - start = needNoTrav ? startNoTraversal : needNoDot ? startNoDot : ''; - } - } - } - // append the "end of path portion" pattern to negation tails - let end = ''; - if (this.isEnd() && - this.#root.#filledNegs && - this.#parent?.type === '!') { - end = '(?:$|\\/)'; - } - const final = start + src + end; - return [ - final, - (0, unescape_js_1.unescape)(src), - (this.#hasMagic = !!this.#hasMagic), - this.#uflag, - ]; - } - // some kind of extglob - const start = this.type === '!' ? '(?:(?!(?:' : '(?:'; - const body = this.#parts - .map(p => { - // extglob ASTs should only contain parent ASTs - /* c8 ignore start */ - if (typeof p === 'string') { - throw new Error('string type in extglob ast??'); - } - /* c8 ignore stop */ - // can ignore hasMagic, because extglobs are already always magic - const [re, _, _hasMagic, uflag] = p.toRegExpSource(); - this.#uflag = this.#uflag || uflag; - return re; - }) - .filter(p => !(this.isStart() && this.isEnd()) || !!p) - .join('|'); - if (this.isStart() && this.isEnd() && !body && this.type !== '!') { - // invalid extglob, has to at least be *something* present, if it's - // the entire path portion. - const s = this.toString(); - this.#parts = [s]; - this.type = null; - this.#hasMagic = undefined; - return [s, (0, unescape_js_1.unescape)(this.toString()), false, false]; - } - // an empty !() is exactly equivalent to a starNoEmpty - let final = ''; - if (this.type === '!' && this.#emptyExt) { - final = - (this.isStart() && !this.#options.dot ? startNoDot : '') + starNoEmpty; - } - else { - const close = this.type === '!' - ? // !() must match something,but !(x) can match '' - '))' + - (this.isStart() && !this.#options.dot ? startNoDot : '') + - star + - ')' - : this.type === '@' - ? ')' - : `)${this.type}`; - final = start + body + close; - } - return [ - final, - (0, unescape_js_1.unescape)(body), - (this.#hasMagic = !!this.#hasMagic), - this.#uflag, - ]; - } - static #parseGlob(glob, hasMagic, noEmpty = false) { - let escaping = false; - let re = ''; - let uflag = false; - for (let i = 0; i < glob.length; i++) { - const c = glob.charAt(i); - if (escaping) { - escaping = false; - re += (reSpecials.has(c) ? '\\' : '') + c; - continue; - } - if (c === '\\') { - if (i === glob.length - 1) { - re += '\\\\'; - } - else { - escaping = true; - } - continue; - } - if (c === '[') { - const [src, needUflag, consumed, magic] = (0, brace_expressions_js_1.parseClass)(glob, i); - if (consumed) { - re += src; - uflag = uflag || needUflag; - i += consumed - 1; - hasMagic = hasMagic || magic; - continue; - } - } - if (c === '*') { - if (noEmpty && glob === '*') - re += starNoEmpty; - else - re += star; - hasMagic = true; - continue; - } - if (c === '?') { - re += qmark; - hasMagic = true; - continue; - } - re += regExpEscape(c); - } - return [re, (0, unescape_js_1.unescape)(glob), !!hasMagic, uflag]; - } -} -exports.AST = AST; -//# sourceMappingURL=ast.js.map \ No newline at end of file diff --git a/deps/npm/node_modules/minimatch/dist/cjs/extglob.js b/deps/npm/node_modules/minimatch/dist/cjs/extglob.js new file mode 100644 index 00000000000000..8d7607b7f7ead4 --- /dev/null +++ b/deps/npm/node_modules/minimatch/dist/cjs/extglob.js @@ -0,0 +1,4 @@ +"use strict"; +// translate an extglob into a regular expression +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=extglob.js.map \ No newline at end of file diff --git a/deps/npm/node_modules/minimatch/dist/cjs/index-cjs.js b/deps/npm/node_modules/minimatch/dist/cjs/index-cjs.js new file mode 100644 index 00000000000000..db73b6b933a8a5 --- /dev/null +++ b/deps/npm/node_modules/minimatch/dist/cjs/index-cjs.js @@ -0,0 +1,7 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +const index_js_1 = __importDefault(require("./index.js")); +module.exports = Object.assign(index_js_1.default, { default: index_js_1.default, minimatch: index_js_1.default }); +//# sourceMappingURL=index-cjs.js.map \ No newline at end of file diff --git a/deps/npm/node_modules/minimatch/dist/cjs/index.js b/deps/npm/node_modules/minimatch/dist/cjs/index.js index 3cbc67f892f126..3bb6c3dee58b86 100644 --- a/deps/npm/node_modules/minimatch/dist/cjs/index.js +++ b/deps/npm/node_modules/minimatch/dist/cjs/index.js @@ -3,14 +3,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); -exports.unescape = exports.escape = exports.AST = exports.Minimatch = exports.match = exports.makeRe = exports.braceExpand = exports.defaults = exports.filter = exports.GLOBSTAR = exports.sep = exports.minimatch = void 0; +exports.unescape = exports.escape = exports.Minimatch = exports.match = exports.makeRe = exports.braceExpand = exports.defaults = exports.filter = exports.GLOBSTAR = exports.sep = exports.minimatch = void 0; const brace_expansion_1 = __importDefault(require("brace-expansion")); -const assert_valid_pattern_js_1 = require("./assert-valid-pattern.js"); -const ast_js_1 = require("./ast.js"); +const brace_expressions_js_1 = require("./brace-expressions.js"); const escape_js_1 = require("./escape.js"); const unescape_js_1 = require("./unescape.js"); const minimatch = (p, pattern, options = {}) => { - (0, assert_valid_pattern_js_1.assertValidPattern)(pattern); + assertValidPattern(pattern); // shortcut: comments match nothing. if (!options.nocomment && pattern.charAt(0) === '#') { return false; @@ -18,6 +17,7 @@ const minimatch = (p, pattern, options = {}) => { return new Minimatch(pattern, options).match(p); }; exports.minimatch = minimatch; +exports.default = exports.minimatch; // Optimized checking for the most common glob patterns. const starDotExtRE = /^\*+([^+@!?\*\[\(]*)$/; const starDotExtTest = (ext) => (f) => !f.startsWith('.') && f.endsWith(ext); @@ -85,6 +85,13 @@ exports.sep = defaultPlatform === 'win32' ? path.win32.sep : path.posix.sep; exports.minimatch.sep = exports.sep; exports.GLOBSTAR = Symbol('globstar **'); exports.minimatch.GLOBSTAR = exports.GLOBSTAR; +const plTypes = { + '!': { open: '(?:(?!(?:', close: '))[^/]*?)' }, + '?': { open: '(?:', close: ')?' }, + '+': { open: '(?:', close: ')+' }, + '*': { open: '(?:', close: ')*' }, + '@': { open: '(?:', close: ')' }, +}; // any single thing other than / // don't need to escape / when using new RegExp() const qmark = '[^/]'; @@ -97,6 +104,15 @@ const twoStarDot = '(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?'; // not a ^ or / followed by a dot, // followed by anything, any number of times. const twoStarNoDot = '(?:(?!(?:\\/|^)\\.).)*?'; +// "abc" -> { a:true, b:true, c:true } +const charSet = (s) => s.split('').reduce((set, c) => { + set[c] = true; + return set; +}, {}); +// characters that need to be escaped in RegExp. +const reSpecials = charSet('().*{}+?[]^$\\!'); +// characters that indicate we have to add the pattern start +const addPatternStartSet = charSet('[.('); const filter = (pattern, options = {}) => (p) => (0, exports.minimatch)(p, pattern, options); exports.filter = filter; exports.minimatch.filter = exports.filter; @@ -116,16 +132,6 @@ const defaults = (def) => { return orig.defaults(ext(def, options)).Minimatch; } }, - AST: class AST extends orig.AST { - /* c8 ignore start */ - constructor(type, parent, options = {}) { - super(type, parent, ext(def, options)); - } - /* c8 ignore stop */ - static fromGlob(pattern, options = {}) { - return orig.AST.fromGlob(pattern, ext(def, options)); - } - }, unescape: (s, options = {}) => orig.unescape(s, ext(def, options)), escape: (s, options = {}) => orig.escape(s, ext(def, options)), filter: (pattern, options = {}) => orig.filter(pattern, ext(def, options)), @@ -150,7 +156,7 @@ exports.minimatch.defaults = exports.defaults; // a{2..}b -> a{2..}b // a{b}c -> a{b}c const braceExpand = (pattern, options = {}) => { - (0, assert_valid_pattern_js_1.assertValidPattern)(pattern); + assertValidPattern(pattern); // Thanks to Yeting Li for // improving this regexp to avoid a ReDOS vulnerability. if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) { @@ -161,6 +167,15 @@ const braceExpand = (pattern, options = {}) => { }; exports.braceExpand = braceExpand; exports.minimatch.braceExpand = exports.braceExpand; +const MAX_PATTERN_LENGTH = 1024 * 64; +const assertValidPattern = (pattern) => { + if (typeof pattern !== 'string') { + throw new TypeError('invalid pattern'); + } + if (pattern.length > MAX_PATTERN_LENGTH) { + throw new TypeError('pattern is too long'); + } +}; // parse a component of the expanded set. // At this point, no pattern may contain "/" in it // so we're going to return a 2d array, where each entry is the full @@ -186,6 +201,7 @@ const match = (list, pattern, options = {}) => { exports.match = match; exports.minimatch.match = exports.match; // replace stuff like \* with * +const globUnescape = (s) => s.replace(/\\(.)/g, '$1'); const globMagic = /[?*]|[+@!]\(.*?\)|\[|\]/; const regExpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&'); class Minimatch { @@ -207,7 +223,7 @@ class Minimatch { windowsNoMagicRoot; regexp; constructor(pattern, options = {}) { - (0, assert_valid_pattern_js_1.assertValidPattern)(pattern); + assertValidPattern(pattern); options = options || {}; this.options = options; this.pattern = pattern; @@ -798,7 +814,7 @@ class Minimatch { return (0, exports.braceExpand)(this.pattern, this.options); } parse(pattern) { - (0, assert_valid_pattern_js_1.assertValidPattern)(pattern); + assertValidPattern(pattern); const options = this.options; // shortcuts if (pattern === '**') @@ -836,8 +852,293 @@ class Minimatch { else if ((m = pattern.match(dotStarRE))) { fastTest = dotStarTest; } - const re = ast_js_1.AST.fromGlob(pattern, this.options).toMMPattern(); - return fastTest ? Object.assign(re, { test: fastTest }) : re; + let re = ''; + let hasMagic = false; + let escaping = false; + // ? => one single character + const patternListStack = []; + const negativeLists = []; + let stateChar = false; + let uflag = false; + let pl; + // . and .. never match anything that doesn't start with ., + // even when options.dot is set. However, if the pattern + // starts with ., then traversal patterns can match. + let dotTravAllowed = pattern.charAt(0) === '.'; + let dotFileAllowed = options.dot || dotTravAllowed; + const patternStart = () => dotTravAllowed + ? '' + : dotFileAllowed + ? '(?!(?:^|\\/)\\.{1,2}(?:$|\\/))' + : '(?!\\.)'; + const subPatternStart = (p) => p.charAt(0) === '.' + ? '' + : options.dot + ? '(?!(?:^|\\/)\\.{1,2}(?:$|\\/))' + : '(?!\\.)'; + const clearStateChar = () => { + if (stateChar) { + // we had some state-tracking character + // that wasn't consumed by this pass. + switch (stateChar) { + case '*': + re += star; + hasMagic = true; + break; + case '?': + re += qmark; + hasMagic = true; + break; + default: + re += '\\' + stateChar; + break; + } + this.debug('clearStateChar %j %j', stateChar, re); + stateChar = false; + } + }; + for (let i = 0, c; i < pattern.length && (c = pattern.charAt(i)); i++) { + this.debug('%s\t%s %s %j', pattern, i, re, c); + // skip over any that are escaped. + if (escaping) { + // completely not allowed, even escaped. + // should be impossible. + /* c8 ignore start */ + if (c === '/') { + return false; + } + /* c8 ignore stop */ + if (reSpecials[c]) { + re += '\\'; + } + re += c; + escaping = false; + continue; + } + switch (c) { + // Should already be path-split by now. + /* c8 ignore start */ + case '/': { + return false; + } + /* c8 ignore stop */ + case '\\': + clearStateChar(); + escaping = true; + continue; + // the various stateChar values + // for the "extglob" stuff. + case '?': + case '*': + case '+': + case '@': + case '!': + this.debug('%s\t%s %s %j <-- stateChar', pattern, i, re, c); + // if we already have a stateChar, then it means + // that there was something like ** or +? in there. + // Handle the stateChar, then proceed with this one. + this.debug('call clearStateChar %j', stateChar); + clearStateChar(); + stateChar = c; + // if extglob is disabled, then +(asdf|foo) isn't a thing. + // just clear the statechar *now*, rather than even diving into + // the patternList stuff. + if (options.noext) + clearStateChar(); + continue; + case '(': { + if (!stateChar) { + re += '\\('; + continue; + } + const plEntry = { + type: stateChar, + start: i - 1, + reStart: re.length, + open: plTypes[stateChar].open, + close: plTypes[stateChar].close, + }; + this.debug(this.pattern, '\t', plEntry); + patternListStack.push(plEntry); + // negation is (?:(?!(?:js)(?:))[^/]*) + re += plEntry.open; + // next entry starts with a dot maybe? + if (plEntry.start === 0 && plEntry.type !== '!') { + dotTravAllowed = true; + re += subPatternStart(pattern.slice(i + 1)); + } + this.debug('plType %j %j', stateChar, re); + stateChar = false; + continue; + } + case ')': { + const plEntry = patternListStack[patternListStack.length - 1]; + if (!plEntry) { + re += '\\)'; + continue; + } + patternListStack.pop(); + // closing an extglob + clearStateChar(); + hasMagic = true; + pl = plEntry; + // negation is (?:(?!js)[^/]*) + // The others are (?:) + re += pl.close; + if (pl.type === '!') { + negativeLists.push(Object.assign(pl, { reEnd: re.length })); + } + continue; + } + case '|': { + const plEntry = patternListStack[patternListStack.length - 1]; + if (!plEntry) { + re += '\\|'; + continue; + } + clearStateChar(); + re += '|'; + // next subpattern can start with a dot? + if (plEntry.start === 0 && plEntry.type !== '!') { + dotTravAllowed = true; + re += subPatternStart(pattern.slice(i + 1)); + } + continue; + } + // these are mostly the same in regexp and glob + case '[': + // swallow any state-tracking char before the [ + clearStateChar(); + const [src, needUflag, consumed, magic] = (0, brace_expressions_js_1.parseClass)(pattern, i); + if (consumed) { + re += src; + uflag = uflag || needUflag; + i += consumed - 1; + hasMagic = hasMagic || magic; + } + else { + re += '\\['; + } + continue; + case ']': + re += '\\' + c; + continue; + default: + // swallow any state char that wasn't consumed + clearStateChar(); + re += regExpEscape(c); + break; + } // switch + } // for + // handle the case where we had a +( thing at the *end* + // of the pattern. + // each pattern list stack adds 3 chars, and we need to go through + // and escape any | chars that were passed through as-is for the regexp. + // Go through and escape them, taking care not to double-escape any + // | chars that were already escaped. + for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { + let tail; + tail = re.slice(pl.reStart + pl.open.length); + this.debug(this.pattern, 'setting tail', re, pl); + // maybe some even number of \, then maybe 1 \, followed by a | + tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, (_, $1, $2) => { + if (!$2) { + // the | isn't already escaped, so escape it. + $2 = '\\'; + // should already be done + /* c8 ignore start */ + } + /* c8 ignore stop */ + // need to escape all those slashes *again*, without escaping the + // one that we need for escaping the | character. As it works out, + // escaping an even number of slashes can be done by simply repeating + // it exactly after itself. That's why this trick works. + // + // I am sorry that you have to see this. + return $1 + $1 + $2 + '|'; + }); + this.debug('tail=%j\n %s', tail, tail, pl, re); + const t = pl.type === '*' ? star : pl.type === '?' ? qmark : '\\' + pl.type; + hasMagic = true; + re = re.slice(0, pl.reStart) + t + '\\(' + tail; + } + // handle trailing things that only matter at the very end. + clearStateChar(); + if (escaping) { + // trailing \\ + re += '\\\\'; + } + // only need to apply the nodot start if the re starts with + // something that could conceivably capture a dot + const addPatternStart = addPatternStartSet[re.charAt(0)]; + // Hack to work around lack of negative lookbehind in JS + // A pattern like: *.!(x).!(y|z) needs to ensure that a name + // like 'a.xyz.yz' doesn't match. So, the first negative + // lookahead, has to look ALL the way ahead, to the end of + // the pattern. + for (let n = negativeLists.length - 1; n > -1; n--) { + const nl = negativeLists[n]; + const nlBefore = re.slice(0, nl.reStart); + const nlFirst = re.slice(nl.reStart, nl.reEnd - 8); + let nlAfter = re.slice(nl.reEnd); + const nlLast = re.slice(nl.reEnd - 8, nl.reEnd) + nlAfter; + // Handle nested stuff like *(*.js|!(*.json)), where open parens + // mean that we should *not* include the ) in the bit that is considered + // "after" the negated section. + const closeParensBefore = nlBefore.split(')').length; + const openParensBefore = nlBefore.split('(').length - closeParensBefore; + let cleanAfter = nlAfter; + for (let i = 0; i < openParensBefore; i++) { + cleanAfter = cleanAfter.replace(/\)[+*?]?/, ''); + } + nlAfter = cleanAfter; + const dollar = nlAfter === '' ? '(?:$|\\/)' : ''; + re = nlBefore + nlFirst + nlAfter + dollar + nlLast; + } + // if the re is not "" at this point, then we need to make sure + // it doesn't match against an empty path part. + // Otherwise a/* will match a/, which it should not. + if (re !== '' && hasMagic) { + re = '(?=.)' + re; + } + if (addPatternStart) { + re = patternStart() + re; + } + // if it's nocase, and the lcase/uppercase don't match, it's magic + if (options.nocase && !hasMagic && !options.nocaseMagicOnly) { + hasMagic = pattern.toUpperCase() !== pattern.toLowerCase(); + } + // skip the regexp for non-magical patterns + // unescape anything in it, though, so that it'll be + // an exact match against a file etc. + if (!hasMagic) { + return globUnescape(re); + } + const flags = (options.nocase ? 'i' : '') + (uflag ? 'u' : ''); + try { + const ext = fastTest + ? { + _glob: pattern, + _src: re, + test: fastTest, + } + : { + _glob: pattern, + _src: re, + }; + return Object.assign(new RegExp('^' + re + '$', flags), ext); + /* c8 ignore start */ + } + catch (er) { + // should be impossible + // If it was an invalid regular expression, then it can't match + // anything. This trick looks for a character after the end of + // the string, which is of course impossible, except in multi-line + // mode, but it's not a /m regex. + this.debug('invalid regexp', er); + return new RegExp('$.'); + } + /* c8 ignore stop */ } makeRe() { if (this.regexp || this.regexp === false) @@ -859,7 +1160,7 @@ class Minimatch { : options.dot ? twoStarDot : twoStarNoDot; - const flags = new Set(options.nocase ? ['i'] : []); + const flags = options.nocase ? 'i' : ''; // regexpify non-globstar patterns // if ** is only item, then we just do one twoStar // if ** is first, and there are more, prepend (\/|twoStar\/)? to next @@ -868,17 +1169,11 @@ class Minimatch { // then filter out GLOBSTAR symbols let re = set .map(pattern => { - const pp = pattern.map(p => { - if (p instanceof RegExp) { - for (const f of p.flags.split('')) - flags.add(f); - } - return typeof p === 'string' - ? regExpEscape(p) - : p === exports.GLOBSTAR - ? exports.GLOBSTAR - : p._src; - }); + const pp = pattern.map(p => typeof p === 'string' + ? regExpEscape(p) + : p === exports.GLOBSTAR + ? exports.GLOBSTAR + : p._src); pp.forEach((p, i) => { const next = pp[i + 1]; const prev = pp[i - 1]; @@ -904,17 +1199,14 @@ class Minimatch { return pp.filter(p => p !== exports.GLOBSTAR).join('/'); }) .join('|'); - // need to wrap in parens if we had more than one thing with |, - // otherwise only the first will be anchored to ^ and the last to $ - const [open, close] = set.length > 1 ? ['(?:', ')'] : ['', '']; // must match entire pattern // ending in a * or ** will make it less strict. - re = '^' + open + re + close + '$'; + re = '^(?:' + re + ')$'; // can match anything, as long as it's not this. if (this.negate) - re = '^(?!' + re + ').+$'; + re = '^(?!' + re + ').*$'; try { - this.regexp = new RegExp(re, [...flags].join('')); + this.regexp = new RegExp(re, flags); /* c8 ignore start */ } catch (ex) { @@ -1001,14 +1293,11 @@ class Minimatch { } exports.Minimatch = Minimatch; /* c8 ignore start */ -var ast_js_2 = require("./ast.js"); -Object.defineProperty(exports, "AST", { enumerable: true, get: function () { return ast_js_2.AST; } }); var escape_js_2 = require("./escape.js"); Object.defineProperty(exports, "escape", { enumerable: true, get: function () { return escape_js_2.escape; } }); var unescape_js_2 = require("./unescape.js"); Object.defineProperty(exports, "unescape", { enumerable: true, get: function () { return unescape_js_2.unescape; } }); /* c8 ignore stop */ -exports.minimatch.AST = ast_js_1.AST; exports.minimatch.Minimatch = Minimatch; exports.minimatch.escape = escape_js_1.escape; exports.minimatch.unescape = unescape_js_1.unescape; diff --git a/deps/npm/node_modules/minimatch/dist/cjs/parse.js b/deps/npm/node_modules/minimatch/dist/cjs/parse.js new file mode 100644 index 00000000000000..2fff625bcbb6e9 --- /dev/null +++ b/deps/npm/node_modules/minimatch/dist/cjs/parse.js @@ -0,0 +1,650 @@ +"use strict"; +// parse a single path portion +Object.defineProperty(exports, "__esModule", { value: true }); +exports.AST = void 0; +const brace_expressions_1 = require("./brace-expressions"); +const types = new Set(['!', '?', '+', '*', '@']); +const isExtglobType = (c) => types.has(c); +// characters that indicate a start of pattern needs the "no dots" bit +const addPatternStart = new Set(['[', '.']); +const justDots = new Set(['..', '.']); +const reSpecials = new Set('().*{}+?[]^$\\!'); +const regExpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&'); +// any single thing other than / +// don't need to escape / when using new RegExp() +const qmark = '[^/]'; +// * => any number of characters +const star = qmark + '*?'; +class AST { + type; + #root; + #parts = []; + #parent; + #parentIndex; + #negs; + #filledNegs = false; + #options; + constructor(type, parent, options = {}) { + this.type = type; + this.#parent = parent; + this.#root = this.#parent ? this.#parent.#root : this; + this.#options = this.#root === this ? options : this.#root.#options; + this.#negs = this.#root === this ? [] : this.#root.#negs; + if (type === '!' && !this.#root.#filledNegs) + this.#negs.push(this); + this.#parentIndex = this.#parent ? this.#parent.#parts.length : 0; + } + fillNegs() { + if (this !== this.#root) { + this.#root.fillNegs(); + return this; + } + if (this.#filledNegs) + return this; + this.#filledNegs = true; + let n; + while ((n = this.#negs.pop())) { + if (n.type !== '!') + continue; + // walk up the tree, appending everthing that comes AFTER parentIndex + let p = n; + let pp = p.#parent; + while (pp) { + for (let i = p.#parentIndex + 1; !pp.type && i < pp.#parts.length; i++) { + for (const part of n.#parts) { + /* c8 ignore start */ + if (typeof part === 'string') { + throw new Error('string part in extglob AST??'); + } + /* c8 ignore stop */ + part.copyIn(pp.#parts[i]); + } + } + p = pp; + pp = p.#parent; + } + } + return this; + } + push(...parts) { + for (const p of parts) { + if (p === '') + continue; + /* c8 ignore start */ + if (typeof p !== 'string' && !(p instanceof AST && p.#parent === this)) { + throw new Error('invalid part: ' + p); + } + /* c8 ignore stop */ + this.#parts.push(p); + } + } + toJSON() { + const ret = this.type === null ? this.#parts.slice() : [this.type, ...this.#parts]; + if (this.isStart() && !this.type) + ret.unshift([]); + if (this.isEnd() && + (this === this.#root || + (this.#root.#filledNegs && this.#parent?.type === '!'))) { + ret.push({}); + } + return ret; + } + isStart() { + if (this.#root === this) + return true; + // if (this.type) return !!this.#parent?.isStart() + if (!this.#parent?.isStart()) + return false; + return this.#parentIndex === 0; + } + isEnd() { + if (this.#root === this) + return true; + if (this.#parent?.type === '!') + return true; + if (!this.#parent?.isEnd()) + return false; + if (!this.type) + return this.#parent?.isEnd(); + return (this.#parentIndex === (this.#parent ? this.#parent.#parts.length : 0) - 1); + } + copyIn(part) { + if (typeof part === 'string') + this.push(part); + else + this.push(part.clone(this)); + } + clone(parent) { + const c = new AST(this.type, parent); + for (const p of this.#parts) { + c.copyIn(p); + } + return c; + } + static #parseAST(str, ast, pos, opt) { + let escaping = false; + if (ast.type === null) { + // outside of a extglob, append until we find a start + let i = pos; + let acc = ''; + while (i < str.length) { + const c = str.charAt(i++); + // still accumulate escapes at this point, but we do ignore + // starts that are escaped + if (escaping || c === '\\') { + escaping = !escaping; + acc += c; + continue; + } + if (!opt.noext && isExtglobType(c) && str.charAt(i) === '(') { + ast.push(acc); + acc = ''; + const ext = new AST(c, ast); + i = AST.#parseAST(str, ext, i, opt); + ast.push(ext); + continue; + } + acc += c; + } + ast.push(acc); + return i; + } + // some kind of extglob, pos is at the ( + // find the next | or ) + let i = pos + 1; + let part = new AST(null, ast); + const parts = []; + let acc = ''; + while (i < str.length) { + const c = str.charAt(i++); + // still accumulate escapes at this point, but we do ignore + // starts that are escaped + if (escaping || c === '\\') { + escaping = !escaping; + acc += c; + continue; + } + if (isExtglobType(c) && str.charAt(i) === '(') { + part.push(acc); + acc = ''; + const ext = new AST(c, part); + part.push(ext); + i = AST.#parseAST(str, ext, i, opt); + continue; + } + if (c === '|') { + part.push(acc); + acc = ''; + parts.push(part); + part = new AST(null, ast); + continue; + } + if (c === ')') { + part.push(acc); + acc = ''; + ast.push(...parts, part); + return i; + } + acc += c; + } + // if we got here, it was a malformed extglob! not an extglob, but + // maybe something else in there. + ast.type = null; + ast.#parts = [str.substring(pos)]; + return i; + } + static fromGlob(pattern, options = {}) { + const ast = new AST(null, undefined, options); + AST.#parseAST(pattern, ast, 0, options); + console.log('parsed', pattern, JSON.stringify(ast)); + return ast; + } + toRegExpSource() { + if (this.#root === this) + this.fillNegs(); + if (!this.type) { + const src = this.#parts + .map(p => { + if (typeof p === 'string') + return AST.#parseGlob(p, this.#options); + else + return p.toRegExpSource(); + }) + .join(''); + let start = ''; + if (this.isStart() && typeof this.#parts[0] === 'string') { + // '.' and '..' cannot match unless the pattern is that exactly + const dotTravAllowed = this.#parts.length === 1 && justDots.has(this.#parts[0]); + if (dotTravAllowed) { + start = '(?:^|\\/)'; + } + else { + const dotsAllowed = this.#options.dot || + // no need to prevent dots if it can't match a dot, or if a sub-pattern + // will be preventing it anyway. + !addPatternStart.has(src.charAt(0)); + start = dotsAllowed ? '(?!(?:^|\\/)\\.{1,2}(?:$|\\/))' : '(?!\\.)'; + } + } + let end = ''; + if (this.isEnd() && + (this === this.#root || + (this.#root.#filledNegs && this.#parent?.type === '!'))) { + end = '(?:$|\\/)'; + } + return start + src + end; + } + // some kind of extglob + const start = this.type === '!' ? '(?:(?!(?:' : '(?:'; + const body = this.#parts + .map(p => { + /* c8 ignore start */ + if (typeof p === 'string') { + throw new Error('string type in extglob ast??'); + } + /* c8 ignore stop */ + return p.toRegExpSource(); + }) + .join('|'); + const close = this.type === '!' + ? '))[^/]*?)' + : this.type === '@' + ? ')' + : `)${this.type}`; + return start + body + close; + } + static #parseGlob(glob, options) { + let escaping = false; + let re = ''; + let uflag = false; + let hasMagic = false; + for (let i = 0; i < glob.length; i++) { + const c = glob.charAt(i); + if (escaping) { + escaping = false; + re += (reSpecials.has(c) ? '\\' : '') + c; + continue; + } + if (c === '\\') { + if (i === glob.length - 1) { + re += '\\\\'; + } + else { + escaping = true; + } + continue; + } + if (c === '[') { + const [src, needUflag, consumed, magic] = (0, brace_expressions_1.parseClass)(glob, i); + if (consumed) { + re += src; + uflag = uflag || needUflag; + i += consumed - 1; + hasMagic = hasMagic || magic; + continue; + } + } + if (c === '*') { + re += star; + hasMagic = true; + continue; + } + if (c === '?') { + re += qmark; + hasMagic = true; + continue; + } + re += regExpEscape(c); + } + return re; + } +} +exports.AST = AST; +const pattern = 'a@(i|w!(x|y)z+(l|m)|j)'; +const ast = AST.fromGlob(pattern).fillNegs(); +console.log('negged', pattern, JSON.stringify(ast)); +console.log('to re src', pattern, ast.toRegExpSource()); +// // the type (exttype or null for strings), and array of children tokens +// +// // append everything after a negative extglob to each of the parts +// // of the negative extglob node. So, eg, [a, [!, x, y], z] +// +// // +// // +// // +// // +// +// const globUnescape = (s: string) => s.replace(/\\(.)/g, '$1') +// const regExpEscape = (s: string) => +// s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&') +// +// // "abc" -> { a:true, b:true, c:true } +// const charSet = (s: string) => +// s.split('').reduce((set: { [k: string]: boolean }, c) => { +// set[c] = true +// return set +// }, {}) +// +// // characters that need to be escaped in RegExp. +// const reSpecials = charSet('().*{}+?[]^$\\!') +// +// // characters that indicate we have to add the pattern start +// const addPatternStartSet = charSet('[.(') +// +// // any single thing other than / +// // don't need to escape / when using new RegExp() +// const qmark = '[^/]' +// +// // * => any number of characters +// const star = qmark + '*?' +// +// // TODO: take an offset and length, so we can sub-parse the extglobs +// const parse = ( +// options: MinimatchOptions, +// pattern: string, +// debug: (...a: any[]) => void +// ): false | string => { +// assertValidPattern(pattern) +// +// if (pattern === '') return '' +// +// let re = '' +// let hasMagic = false +// let escaping = false +// // ? => one single character +// let uflag = false +// +// // . and .. never match anything that doesn't start with ., +// // even when options.dot is set. However, if the pattern +// // starts with ., then traversal patterns can match. +// let dotTravAllowed = pattern.charAt(0) === '.' +// let dotFileAllowed = options.dot || dotTravAllowed +// const patternStart = () => +// dotTravAllowed +// ? '' +// : dotFileAllowed +// ? '(?!(?:^|\\/)\\.{1,2}(?:$|\\/))' +// : '(?!\\.)' +// const subPatternStart = (p: string) => +// p.charAt(0) === '.' +// ? '' +// : options.dot +// ? '(?!(?:^|\\/)\\.{1,2}(?:$|\\/))' +// : '(?!\\.)' +// +// const clearStateChar = () => { +// if (stateChar) { +// // we had some state-tracking character +// // that wasn't consumed by this pass. +// switch (stateChar) { +// case '*': +// re += star +// hasMagic = true +// break +// case '?': +// re += qmark +// hasMagic = true +// break +// default: +// re += '\\' + stateChar +// break +// } +// debug('clearStateChar %j %j', stateChar, re) +// stateChar = false +// } +// } +// +// for ( +// let i = 0, c: string; +// i < pattern.length && (c = pattern.charAt(i)); +// i++ +// ) { +// debug('%s\t%s %s %j', pattern, i, re, c) +// +// // skip over any that are escaped. +// if (escaping) { +// // completely not allowed, even escaped. +// // should be impossible. +// /* c8 ignore start */ +// if (c === '/') { +// return false +// } +// /* c8 ignore stop */ +// +// if (reSpecials[c]) { +// re += '\\' +// } +// re += c +// escaping = false +// continue +// } +// +// switch (c) { +// // Should already be path-split by now. +// /* c8 ignore start */ +// case '/': { +// return false +// } +// /* c8 ignore stop */ +// +// case '\\': +// clearStateChar() +// escaping = true +// continue +// +// // the various stateChar values +// // for the "extglob" stuff. +// case '?': +// case '*': +// case '+': +// case '@': +// case '!': +// debug('%s\t%s %s %j <-- stateChar', pattern, i, re, c) +// +// // if we already have a stateChar, then it means +// // that there was something like ** or +? in there. +// // Handle the stateChar, then proceed with this one. +// debug('call clearStateChar %j', stateChar) +// clearStateChar() +// stateChar = c +// // if extglob is disabled, then +(asdf|foo) isn't a thing. +// // just clear the statechar *now*, rather than even diving into +// // the patternList stuff. +// if (options.noext) clearStateChar() +// continue +// +// case '(': { +// if (!stateChar) { +// re += '\\(' +// continue +// } +// +// const plEntry: PatternListEntry = { +// type: stateChar, +// start: i - 1, +// reStart: re.length, +// open: plTypes[stateChar].open, +// close: plTypes[stateChar].close, +// } +// debug(pattern, '\t', plEntry) +// patternListStack.push(plEntry) +// // negation is (?:(?!(?:js)(?:))[^/]*) +// re += plEntry.open +// // next entry starts with a dot maybe? +// if (plEntry.start === 0 && plEntry.type !== '!') { +// dotTravAllowed = true +// re += subPatternStart(pattern.slice(i + 1)) +// } +// debug('plType %j %j', stateChar, re) +// stateChar = false +// continue +// } +// +// case ')': { +// const plEntry = patternListStack[patternListStack.length - 1] +// if (!plEntry) { +// re += '\\)' +// continue +// } +// patternListStack.pop() +// +// // closing an extglob +// clearStateChar() +// hasMagic = true +// pl = plEntry +// // negation is (?:(?!js)[^/]*) +// // The others are (?:) +// re += pl.close +// if (pl.type === '!') { +// negativeLists.push(Object.assign(pl, { reEnd: re.length })) +// } +// continue +// } +// +// case '|': { +// const plEntry = patternListStack[patternListStack.length - 1] +// if (!plEntry) { +// re += '\\|' +// continue +// } +// +// clearStateChar() +// re += '|' +// // next subpattern can start with a dot? +// if (plEntry.start === 0 && plEntry.type !== '!') { +// dotTravAllowed = true +// re += subPatternStart(pattern.slice(i + 1)) +// } +// continue +// } +// +// // these are mostly the same in regexp and glob +// case '[': +// // swallow any state-tracking char before the [ +// clearStateChar() +// const [src, needUflag, consumed, magic] = parseClass(pattern, i) +// if (consumed) { +// re += src +// uflag = uflag || needUflag +// i += consumed - 1 +// hasMagic = hasMagic || magic +// } else { +// re += '\\[' +// } +// continue +// +// case ']': +// re += '\\' + c +// continue +// +// default: +// // swallow any state char that wasn't consumed +// clearStateChar() +// +// re += regExpEscape(c) +// break +// } // switch +// } // for +// +// // handle the case where we had a +( thing at the *end* +// // of the pattern. +// // each pattern list stack adds 3 chars, and we need to go through +// // and escape any | chars that were passed through as-is for the regexp. +// // Go through and escape them, taking care not to double-escape any +// // | chars that were already escaped. +// for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { +// let tail: string +// tail = re.slice(pl.reStart + pl.open.length) +// debug(pattern, 'setting tail', re, pl) +// // maybe some even number of \, then maybe 1 \, followed by a | +// tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, (_, $1, $2) => { +// if (!$2) { +// // the | isn't already escaped, so escape it. +// $2 = '\\' +// // should already be done +// /* c8 ignore start */ +// } +// /* c8 ignore stop */ +// +// // need to escape all those slashes *again*, without escaping the +// // one that we need for escaping the | character. As it works out, +// // escaping an even number of slashes can be done by simply repeating +// // it exactly after itself. That's why this trick works. +// // +// // I am sorry that you have to see this. +// return $1 + $1 + $2 + '|' +// }) +// +// debug('tail=%j\n %s', tail, tail, pl, re) +// const t = pl.type === '*' ? star : pl.type === '?' ? qmark : '\\' + pl.type +// +// hasMagic = true +// re = re.slice(0, pl.reStart) + t + '\\(' + tail +// } +// +// // handle trailing things that only matter at the very end. +// clearStateChar() +// if (escaping) { +// // trailing \\ +// re += '\\\\' +// } +// +// // only need to apply the nodot start if the re starts with +// // something that could conceivably capture a dot +// const addPatternStart = addPatternStartSet[re.charAt(0)] +// +// // Hack to work around lack of negative lookbehind in JS +// // A pattern like: *.!(x).!(y|z) needs to ensure that a name +// // like 'a.xyz.yz' doesn't match. So, the first negative +// // lookahead, has to look ALL the way ahead, to the end of +// // the pattern. +// for (let n = negativeLists.length - 1; n > -1; n--) { +// const nl = negativeLists[n] +// +// const nlBefore = re.slice(0, nl.reStart) +// const nlFirst = re.slice(nl.reStart, nl.reEnd - 8) +// let nlAfter = re.slice(nl.reEnd) +// const nlLast = re.slice(nl.reEnd - 8, nl.reEnd) + nlAfter +// +// // Handle nested stuff like *(*.js|!(*.json)), where open parens +// // mean that we should *not* include the ) in the bit that is considered +// // "after" the negated section. +// const closeParensBefore = nlBefore.split(')').length +// const openParensBefore = nlBefore.split('(').length - closeParensBefore +// let cleanAfter = nlAfter +// for (let i = 0; i < openParensBefore; i++) { +// cleanAfter = cleanAfter.replace(/\)[+*?]?/, '') +// } +// nlAfter = cleanAfter +// +// const dollar = nlAfter === '' ? '(?:$|\\/)' : '' +// +// re = nlBefore + nlFirst + nlAfter + dollar + nlLast +// } +// +// // if the re is not "" at this point, then we need to make sure +// // it doesn't match against an empty path part. +// // Otherwise a/* will match a/, which it should not. +// if (re !== '' && hasMagic) { +// re = '(?=.)' + re +// } +// +// if (addPatternStart) { +// re = patternStart() + re +// } +// +// // if it's nocase, and the lcase/uppercase don't match, it's magic +// if (options.nocase && !hasMagic && !options.nocaseMagicOnly) { +// hasMagic = pattern.toUpperCase() !== pattern.toLowerCase() +// } +// +// // skip the regexp for non-magical patterns +// // unescape anything in it, though, so that it'll be +// // an exact match against a file etc. +// if (!hasMagic) { +// return globUnescape(re) +// } +// +// return re +// } +//# sourceMappingURL=parse.js.map \ No newline at end of file diff --git a/deps/npm/node_modules/minimatch/dist/mjs/_parse.js b/deps/npm/node_modules/minimatch/dist/mjs/_parse.js new file mode 100644 index 00000000000000..db6a28ab08a74e --- /dev/null +++ b/deps/npm/node_modules/minimatch/dist/mjs/_parse.js @@ -0,0 +1,296 @@ +// parse a single path portion +import { parseClass } from './brace-expressions.js'; +import { assertValidPattern } from './assert-valid-pattern.js'; +const globUnescape = (s) => s.replace(/\\(.)/g, '$1'); +const regExpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&'); +// "abc" -> { a:true, b:true, c:true } +const charSet = (s) => s.split('').reduce((set, c) => { + set[c] = true; + return set; +}, {}); +const plTypes = { + '!': { open: '(?:(?!(?:', close: '))[^/]*?)' }, + '?': { open: '(?:', close: ')?' }, + '+': { open: '(?:', close: ')+' }, + '*': { open: '(?:', close: ')*' }, + '@': { open: '(?:', close: ')' }, +}; +// characters that need to be escaped in RegExp. +const reSpecials = charSet('().*{}+?[]^$\\!'); +// characters that indicate we have to add the pattern start +const addPatternStartSet = charSet('[.('); +// any single thing other than / +// don't need to escape / when using new RegExp() +const qmark = '[^/]'; +// * => any number of characters +const star = qmark + '*?'; +// TODO: take an offset and length, so we can sub-parse the extglobs +export const parse = (options, pattern, debug) => { + assertValidPattern(pattern); + if (pattern === '') + return ''; + let re = ''; + let hasMagic = false; + let escaping = false; + // ? => one single character + const patternListStack = []; + const negativeLists = []; + let stateChar = false; + let uflag = false; + let pl; + // . and .. never match anything that doesn't start with ., + // even when options.dot is set. However, if the pattern + // starts with ., then traversal patterns can match. + let dotTravAllowed = pattern.charAt(0) === '.'; + let dotFileAllowed = options.dot || dotTravAllowed; + const patternStart = () => dotTravAllowed + ? '' + : dotFileAllowed + ? '(?!(?:^|\\/)\\.{1,2}(?:$|\\/))' + : '(?!\\.)'; + const subPatternStart = (p) => p.charAt(0) === '.' + ? '' + : options.dot + ? '(?!(?:^|\\/)\\.{1,2}(?:$|\\/))' + : '(?!\\.)'; + const clearStateChar = () => { + if (stateChar) { + // we had some state-tracking character + // that wasn't consumed by this pass. + switch (stateChar) { + case '*': + re += star; + hasMagic = true; + break; + case '?': + re += qmark; + hasMagic = true; + break; + default: + re += '\\' + stateChar; + break; + } + debug('clearStateChar %j %j', stateChar, re); + stateChar = false; + } + }; + for (let i = 0, c; i < pattern.length && (c = pattern.charAt(i)); i++) { + debug('%s\t%s %s %j', pattern, i, re, c); + // skip over any that are escaped. + if (escaping) { + // completely not allowed, even escaped. + // should be impossible. + /* c8 ignore start */ + if (c === '/') { + return false; + } + /* c8 ignore stop */ + if (reSpecials[c]) { + re += '\\'; + } + re += c; + escaping = false; + continue; + } + switch (c) { + // Should already be path-split by now. + /* c8 ignore start */ + case '/': { + return false; + } + /* c8 ignore stop */ + case '\\': + clearStateChar(); + escaping = true; + continue; + // the various stateChar values + // for the "extglob" stuff. + case '?': + case '*': + case '+': + case '@': + case '!': + debug('%s\t%s %s %j <-- stateChar', pattern, i, re, c); + // if we already have a stateChar, then it means + // that there was something like ** or +? in there. + // Handle the stateChar, then proceed with this one. + debug('call clearStateChar %j', stateChar); + clearStateChar(); + stateChar = c; + // if extglob is disabled, then +(asdf|foo) isn't a thing. + // just clear the statechar *now*, rather than even diving into + // the patternList stuff. + if (options.noext) + clearStateChar(); + continue; + case '(': { + if (!stateChar) { + re += '\\('; + continue; + } + const plEntry = { + type: stateChar, + start: i - 1, + reStart: re.length, + open: plTypes[stateChar].open, + close: plTypes[stateChar].close, + }; + debug(pattern, '\t', plEntry); + patternListStack.push(plEntry); + // negation is (?:(?!(?:js)(?:))[^/]*) + re += plEntry.open; + // next entry starts with a dot maybe? + if (plEntry.start === 0 && plEntry.type !== '!') { + dotTravAllowed = true; + re += subPatternStart(pattern.slice(i + 1)); + } + debug('plType %j %j', stateChar, re); + stateChar = false; + continue; + } + case ')': { + const plEntry = patternListStack[patternListStack.length - 1]; + if (!plEntry) { + re += '\\)'; + continue; + } + patternListStack.pop(); + // closing an extglob + clearStateChar(); + hasMagic = true; + pl = plEntry; + // negation is (?:(?!js)[^/]*) + // The others are (?:) + re += pl.close; + if (pl.type === '!') { + negativeLists.push(Object.assign(pl, { reEnd: re.length })); + } + continue; + } + case '|': { + const plEntry = patternListStack[patternListStack.length - 1]; + if (!plEntry) { + re += '\\|'; + continue; + } + clearStateChar(); + re += '|'; + // next subpattern can start with a dot? + if (plEntry.start === 0 && plEntry.type !== '!') { + dotTravAllowed = true; + re += subPatternStart(pattern.slice(i + 1)); + } + continue; + } + // these are mostly the same in regexp and glob + case '[': + // swallow any state-tracking char before the [ + clearStateChar(); + const [src, needUflag, consumed, magic] = parseClass(pattern, i); + if (consumed) { + re += src; + uflag = uflag || needUflag; + i += consumed - 1; + hasMagic = hasMagic || magic; + } + else { + re += '\\['; + } + continue; + case ']': + re += '\\' + c; + continue; + default: + // swallow any state char that wasn't consumed + clearStateChar(); + re += regExpEscape(c); + break; + } // switch + } // for + // handle the case where we had a +( thing at the *end* + // of the pattern. + // each pattern list stack adds 3 chars, and we need to go through + // and escape any | chars that were passed through as-is for the regexp. + // Go through and escape them, taking care not to double-escape any + // | chars that were already escaped. + for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { + let tail; + tail = re.slice(pl.reStart + pl.open.length); + debug(pattern, 'setting tail', re, pl); + // maybe some even number of \, then maybe 1 \, followed by a | + tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, (_, $1, $2) => { + if (!$2) { + // the | isn't already escaped, so escape it. + $2 = '\\'; + // should already be done + /* c8 ignore start */ + } + /* c8 ignore stop */ + // need to escape all those slashes *again*, without escaping the + // one that we need for escaping the | character. As it works out, + // escaping an even number of slashes can be done by simply repeating + // it exactly after itself. That's why this trick works. + // + // I am sorry that you have to see this. + return $1 + $1 + $2 + '|'; + }); + debug('tail=%j\n %s', tail, tail, pl, re); + const t = pl.type === '*' ? star : pl.type === '?' ? qmark : '\\' + pl.type; + hasMagic = true; + re = re.slice(0, pl.reStart) + t + '\\(' + tail; + } + // handle trailing things that only matter at the very end. + clearStateChar(); + if (escaping) { + // trailing \\ + re += '\\\\'; + } + // only need to apply the nodot start if the re starts with + // something that could conceivably capture a dot + const addPatternStart = addPatternStartSet[re.charAt(0)]; + // Hack to work around lack of negative lookbehind in JS + // A pattern like: *.!(x).!(y|z) needs to ensure that a name + // like 'a.xyz.yz' doesn't match. So, the first negative + // lookahead, has to look ALL the way ahead, to the end of + // the pattern. + for (let n = negativeLists.length - 1; n > -1; n--) { + const nl = negativeLists[n]; + const nlBefore = re.slice(0, nl.reStart); + const nlFirst = re.slice(nl.reStart, nl.reEnd - 8); + let nlAfter = re.slice(nl.reEnd); + const nlLast = re.slice(nl.reEnd - 8, nl.reEnd) + nlAfter; + // Handle nested stuff like *(*.js|!(*.json)), where open parens + // mean that we should *not* include the ) in the bit that is considered + // "after" the negated section. + const closeParensBefore = nlBefore.split(')').length; + const openParensBefore = nlBefore.split('(').length - closeParensBefore; + let cleanAfter = nlAfter; + for (let i = 0; i < openParensBefore; i++) { + cleanAfter = cleanAfter.replace(/\)[+*?]?/, ''); + } + nlAfter = cleanAfter; + const dollar = nlAfter === '' ? '(?:$|\\/)' : ''; + re = nlBefore + nlFirst + nlAfter + dollar + nlLast; + } + // if the re is not "" at this point, then we need to make sure + // it doesn't match against an empty path part. + // Otherwise a/* will match a/, which it should not. + if (re !== '' && hasMagic) { + re = '(?=.)' + re; + } + if (addPatternStart) { + re = patternStart() + re; + } + // if it's nocase, and the lcase/uppercase don't match, it's magic + if (options.nocase && !hasMagic && !options.nocaseMagicOnly) { + hasMagic = pattern.toUpperCase() !== pattern.toLowerCase(); + } + // skip the regexp for non-magical patterns + // unescape anything in it, though, so that it'll be + // an exact match against a file etc. + if (!hasMagic) { + return globUnescape(re); + } + return re; +}; +//# sourceMappingURL=_parse.js.map \ No newline at end of file diff --git a/deps/npm/node_modules/minimatch/dist/mjs/ast.js b/deps/npm/node_modules/minimatch/dist/mjs/ast.js deleted file mode 100644 index 9836fe7b1db023..00000000000000 --- a/deps/npm/node_modules/minimatch/dist/mjs/ast.js +++ /dev/null @@ -1,562 +0,0 @@ -// parse a single path portion -import { parseClass } from './brace-expressions.js'; -import { unescape } from './unescape.js'; -const types = new Set(['!', '?', '+', '*', '@']); -const isExtglobType = (c) => types.has(c); -// Patterns that get prepended to bind to the start of either the -// entire string, or just a single path portion, to prevent dots -// and/or traversal patterns, when needed. -// Exts don't need the ^ or / bit, because the root binds that already. -const startNoTraversal = '(?!\\.\\.?(?:$|/))'; -const startNoDot = '(?!\\.)'; -// characters that indicate a start of pattern needs the "no dots" bit, -// because a dot *might* be matched. ( is not in the list, because in -// the case of a child extglob, it will handle the prevention itself. -const addPatternStart = new Set(['[', '.']); -// cases where traversal is A-OK, no dot prevention needed -const justDots = new Set(['..', '.']); -const reSpecials = new Set('().*{}+?[]^$\\!'); -const regExpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&'); -// any single thing other than / -const qmark = '[^/]'; -// * => any number of characters -const star = qmark + '*?'; -// use + when we need to ensure that *something* matches, because the * is -// the only thing in the path portion. -const starNoEmpty = qmark + '+?'; -// remove the \ chars that we added if we end up doing a nonmagic compare -// const deslash = (s: string) => s.replace(/\\(.)/g, '$1') -export class AST { - type; - #root; - #hasMagic; - #uflag = false; - #parts = []; - #parent; - #parentIndex; - #negs; - #filledNegs = false; - #options; - #toString; - // set to true if it's an extglob with no children - // (which really means one child of '') - #emptyExt = false; - constructor(type, parent, options = {}) { - this.type = type; - // extglobs are inherently magical - if (type) - this.#hasMagic = true; - this.#parent = parent; - this.#root = this.#parent ? this.#parent.#root : this; - this.#options = this.#root === this ? options : this.#root.#options; - this.#negs = this.#root === this ? [] : this.#root.#negs; - if (type === '!' && !this.#root.#filledNegs) - this.#negs.push(this); - this.#parentIndex = this.#parent ? this.#parent.#parts.length : 0; - } - get hasMagic() { - /* c8 ignore start */ - if (this.#hasMagic !== undefined) - return this.#hasMagic; - /* c8 ignore stop */ - for (const p of this.#parts) { - if (typeof p === 'string') - continue; - if (p.type || p.hasMagic) - return (this.#hasMagic = true); - } - // note: will be undefined until we generate the regexp src and find out - return this.#hasMagic; - } - // reconstructs the pattern - toString() { - if (this.#toString !== undefined) - return this.#toString; - if (!this.type) { - return (this.#toString = this.#parts.map(p => String(p)).join('')); - } - else { - return (this.#toString = - this.type + '(' + this.#parts.map(p => String(p)).join('|') + ')'); - } - } - #fillNegs() { - /* c8 ignore start */ - if (this !== this.#root) - throw new Error('should only call on root'); - if (this.#filledNegs) - return this; - /* c8 ignore stop */ - // call toString() once to fill this out - this.toString(); - this.#filledNegs = true; - let n; - while ((n = this.#negs.pop())) { - if (n.type !== '!') - continue; - // walk up the tree, appending everthing that comes AFTER parentIndex - let p = n; - let pp = p.#parent; - while (pp) { - for (let i = p.#parentIndex + 1; !pp.type && i < pp.#parts.length; i++) { - for (const part of n.#parts) { - /* c8 ignore start */ - if (typeof part === 'string') { - throw new Error('string part in extglob AST??'); - } - /* c8 ignore stop */ - part.copyIn(pp.#parts[i]); - } - } - p = pp; - pp = p.#parent; - } - } - return this; - } - push(...parts) { - for (const p of parts) { - if (p === '') - continue; - /* c8 ignore start */ - if (typeof p !== 'string' && !(p instanceof AST && p.#parent === this)) { - throw new Error('invalid part: ' + p); - } - /* c8 ignore stop */ - this.#parts.push(p); - } - } - toJSON() { - const ret = this.type === null - ? this.#parts.slice().map(p => (typeof p === 'string' ? p : p.toJSON())) - : [this.type, ...this.#parts.map(p => p.toJSON())]; - if (this.isStart() && !this.type) - ret.unshift([]); - if (this.isEnd() && - (this === this.#root || - (this.#root.#filledNegs && this.#parent?.type === '!'))) { - ret.push({}); - } - return ret; - } - isStart() { - if (this.#root === this) - return true; - // if (this.type) return !!this.#parent?.isStart() - if (!this.#parent?.isStart()) - return false; - if (this.#parentIndex === 0) - return true; - // if everything AHEAD of this is a negation, then it's still the "start" - const p = this.#parent; - for (let i = 0; i < this.#parentIndex; i++) { - const pp = p.#parts[i]; - if (!(pp instanceof AST && pp.type === '!')) { - return false; - } - } - return true; - } - isEnd() { - if (this.#root === this) - return true; - if (this.#parent?.type === '!') - return true; - if (!this.#parent?.isEnd()) - return false; - if (!this.type) - return this.#parent?.isEnd(); - // if not root, it'll always have a parent - /* c8 ignore start */ - const pl = this.#parent ? this.#parent.#parts.length : 0; - /* c8 ignore stop */ - return this.#parentIndex === pl - 1; - } - copyIn(part) { - if (typeof part === 'string') - this.push(part); - else - this.push(part.clone(this)); - } - clone(parent) { - const c = new AST(this.type, parent); - for (const p of this.#parts) { - c.copyIn(p); - } - return c; - } - static #parseAST(str, ast, pos, opt) { - let escaping = false; - let inBrace = false; - let braceStart = -1; - let braceNeg = false; - if (ast.type === null) { - // outside of a extglob, append until we find a start - let i = pos; - let acc = ''; - while (i < str.length) { - const c = str.charAt(i++); - // still accumulate escapes at this point, but we do ignore - // starts that are escaped - if (escaping || c === '\\') { - escaping = !escaping; - acc += c; - continue; - } - if (inBrace) { - if (i === braceStart + 1) { - if (c === '^' || c === '!') { - braceNeg = true; - } - } - else if (c === ']' && !(i === braceStart + 2 && braceNeg)) { - inBrace = false; - } - acc += c; - continue; - } - else if (c === '[') { - inBrace = true; - braceStart = i; - braceNeg = false; - acc += c; - continue; - } - if (!opt.noext && isExtglobType(c) && str.charAt(i) === '(') { - ast.push(acc); - acc = ''; - const ext = new AST(c, ast); - i = AST.#parseAST(str, ext, i, opt); - ast.push(ext); - continue; - } - acc += c; - } - ast.push(acc); - return i; - } - // some kind of extglob, pos is at the ( - // find the next | or ) - let i = pos + 1; - let part = new AST(null, ast); - const parts = []; - let acc = ''; - while (i < str.length) { - const c = str.charAt(i++); - // still accumulate escapes at this point, but we do ignore - // starts that are escaped - if (escaping || c === '\\') { - escaping = !escaping; - acc += c; - continue; - } - if (inBrace) { - if (i === braceStart + 1) { - if (c === '^' || c === '!') { - braceNeg = true; - } - } - else if (c === ']' && !(i === braceStart + 2 && braceNeg)) { - inBrace = false; - } - acc += c; - continue; - } - else if (c === '[') { - inBrace = true; - braceStart = i; - braceNeg = false; - acc += c; - continue; - } - if (isExtglobType(c) && str.charAt(i) === '(') { - part.push(acc); - acc = ''; - const ext = new AST(c, part); - part.push(ext); - i = AST.#parseAST(str, ext, i, opt); - continue; - } - if (c === '|') { - part.push(acc); - acc = ''; - parts.push(part); - part = new AST(null, ast); - continue; - } - if (c === ')') { - if (acc === '' && ast.#parts.length === 0) { - ast.#emptyExt = true; - } - part.push(acc); - acc = ''; - ast.push(...parts, part); - return i; - } - acc += c; - } - // unfinished extglob - // if we got here, it was a malformed extglob! not an extglob, but - // maybe something else in there. - ast.type = null; - ast.#hasMagic = undefined; - ast.#parts = [str.substring(pos - 1)]; - return i; - } - static fromGlob(pattern, options = {}) { - const ast = new AST(null, undefined, options); - AST.#parseAST(pattern, ast, 0, options); - return ast; - } - // returns the regular expression if there's magic, or the unescaped - // string if not. - toMMPattern() { - // should only be called on root - /* c8 ignore start */ - if (this !== this.#root) - return this.#root.toMMPattern(); - /* c8 ignore stop */ - const glob = this.toString(); - const [re, body, hasMagic, uflag] = this.toRegExpSource(); - // if we're in nocase mode, and not nocaseMagicOnly, then we do - // still need a regular expression if we have to case-insensitively - // match capital/lowercase characters. - const anyMagic = hasMagic || - this.#hasMagic || - (this.#options.nocase && - !this.#options.nocaseMagicOnly && - glob.toUpperCase() !== glob.toLowerCase()); - if (!anyMagic) { - return body; - } - const flags = (this.#options.nocase ? 'i' : '') + (uflag ? 'u' : ''); - return Object.assign(new RegExp(`^${re}$`, flags), { - _src: re, - _glob: glob, - }); - } - // returns the string match, the regexp source, whether there's magic - // in the regexp (so a regular expression is required) and whether or - // not the uflag is needed for the regular expression (for posix classes) - // TODO: instead of injecting the start/end at this point, just return - // the BODY of the regexp, along with the start/end portions suitable - // for binding the start/end in either a joined full-path makeRe context - // (where we bind to (^|/), or a standalone matchPart context (where - // we bind to ^, and not /). Otherwise slashes get duped! - // - // In part-matching mode, the start is: - // - if not isStart: nothing - // - if traversal possible, but not allowed: ^(?!\.\.?$) - // - if dots allowed or not possible: ^ - // - if dots possible and not allowed: ^(?!\.) - // end is: - // - if not isEnd(): nothing - // - else: $ - // - // In full-path matching mode, we put the slash at the START of the - // pattern, so start is: - // - if first pattern: same as part-matching mode - // - if not isStart(): nothing - // - if traversal possible, but not allowed: /(?!\.\.?(?:$|/)) - // - if dots allowed or not possible: / - // - if dots possible and not allowed: /(?!\.) - // end is: - // - if last pattern, same as part-matching mode - // - else nothing - // - // Always put the (?:$|/) on negated tails, though, because that has to be - // there to bind the end of the negated pattern portion, and it's easier to - // just stick it in now rather than try to inject it later in the middle of - // the pattern. - // - // We can just always return the same end, and leave it up to the caller - // to know whether it's going to be used joined or in parts. - // And, if the start is adjusted slightly, can do the same there: - // - if not isStart: nothing - // - if traversal possible, but not allowed: (?:/|^)(?!\.\.?$) - // - if dots allowed or not possible: (?:/|^) - // - if dots possible and not allowed: (?:/|^)(?!\.) - // - // But it's better to have a simpler binding without a conditional, for - // performance, so probably better to return both start options. - // - // Then the caller just ignores the end if it's not the first pattern, - // and the start always gets applied. - // - // But that's always going to be $ if it's the ending pattern, or nothing, - // so the caller can just attach $ at the end of the pattern when building. - // - // So the todo is: - // - better detect what kind of start is needed - // - return both flavors of starting pattern - // - attach $ at the end of the pattern when creating the actual RegExp - // - // Ah, but wait, no, that all only applies to the root when the first pattern - // is not an extglob. If the first pattern IS an extglob, then we need all - // that dot prevention biz to live in the extglob portions, because eg - // +(*|.x*) can match .xy but not .yx. - // - // So, return the two flavors if it's #root and the first child is not an - // AST, otherwise leave it to the child AST to handle it, and there, - // use the (?:^|/) style of start binding. - // - // Even simplified further: - // - Since the start for a join is eg /(?!\.) and the start for a part - // is ^(?!\.), we can just prepend (?!\.) to the pattern (either root - // or start or whatever) and prepend ^ or / at the Regexp construction. - toRegExpSource() { - if (this.#root === this) - this.#fillNegs(); - if (!this.type) { - const noEmpty = this.isStart() && this.isEnd(); - const src = this.#parts - .map(p => { - const [re, _, hasMagic, uflag] = typeof p === 'string' - ? AST.#parseGlob(p, this.#hasMagic, noEmpty) - : p.toRegExpSource(); - this.#hasMagic = this.#hasMagic || hasMagic; - this.#uflag = this.#uflag || uflag; - return re; - }) - .join(''); - let start = ''; - if (this.isStart()) { - if (typeof this.#parts[0] === 'string') { - // this is the string that will match the start of the pattern, - // so we need to protect against dots and such. - // '.' and '..' cannot match unless the pattern is that exactly, - // even if it starts with . or dot:true is set. - const dotTravAllowed = this.#parts.length === 1 && justDots.has(this.#parts[0]); - if (!dotTravAllowed) { - const aps = addPatternStart; - // check if we have a possibility of matching . or .., - // and prevent that. - const needNoTrav = - // dots are allowed, and the pattern starts with [ or . - (this.#options.dot && aps.has(src.charAt(0))) || - // the pattern starts with \., and then [ or . - (src.startsWith('\\.') && aps.has(src.charAt(2))) || - // the pattern starts with \.\., and then [ or . - (src.startsWith('\\.\\.') && aps.has(src.charAt(4))); - // no need to prevent dots if it can't match a dot, or if a - // sub-pattern will be preventing it anyway. - const needNoDot = !this.#options.dot && aps.has(src.charAt(0)); - start = needNoTrav ? startNoTraversal : needNoDot ? startNoDot : ''; - } - } - } - // append the "end of path portion" pattern to negation tails - let end = ''; - if (this.isEnd() && - this.#root.#filledNegs && - this.#parent?.type === '!') { - end = '(?:$|\\/)'; - } - const final = start + src + end; - return [ - final, - unescape(src), - (this.#hasMagic = !!this.#hasMagic), - this.#uflag, - ]; - } - // some kind of extglob - const start = this.type === '!' ? '(?:(?!(?:' : '(?:'; - const body = this.#parts - .map(p => { - // extglob ASTs should only contain parent ASTs - /* c8 ignore start */ - if (typeof p === 'string') { - throw new Error('string type in extglob ast??'); - } - /* c8 ignore stop */ - // can ignore hasMagic, because extglobs are already always magic - const [re, _, _hasMagic, uflag] = p.toRegExpSource(); - this.#uflag = this.#uflag || uflag; - return re; - }) - .filter(p => !(this.isStart() && this.isEnd()) || !!p) - .join('|'); - if (this.isStart() && this.isEnd() && !body && this.type !== '!') { - // invalid extglob, has to at least be *something* present, if it's - // the entire path portion. - const s = this.toString(); - this.#parts = [s]; - this.type = null; - this.#hasMagic = undefined; - return [s, unescape(this.toString()), false, false]; - } - // an empty !() is exactly equivalent to a starNoEmpty - let final = ''; - if (this.type === '!' && this.#emptyExt) { - final = - (this.isStart() && !this.#options.dot ? startNoDot : '') + starNoEmpty; - } - else { - const close = this.type === '!' - ? // !() must match something,but !(x) can match '' - '))' + - (this.isStart() && !this.#options.dot ? startNoDot : '') + - star + - ')' - : this.type === '@' - ? ')' - : `)${this.type}`; - final = start + body + close; - } - return [ - final, - unescape(body), - (this.#hasMagic = !!this.#hasMagic), - this.#uflag, - ]; - } - static #parseGlob(glob, hasMagic, noEmpty = false) { - let escaping = false; - let re = ''; - let uflag = false; - for (let i = 0; i < glob.length; i++) { - const c = glob.charAt(i); - if (escaping) { - escaping = false; - re += (reSpecials.has(c) ? '\\' : '') + c; - continue; - } - if (c === '\\') { - if (i === glob.length - 1) { - re += '\\\\'; - } - else { - escaping = true; - } - continue; - } - if (c === '[') { - const [src, needUflag, consumed, magic] = parseClass(glob, i); - if (consumed) { - re += src; - uflag = uflag || needUflag; - i += consumed - 1; - hasMagic = hasMagic || magic; - continue; - } - } - if (c === '*') { - if (noEmpty && glob === '*') - re += starNoEmpty; - else - re += star; - hasMagic = true; - continue; - } - if (c === '?') { - re += qmark; - hasMagic = true; - continue; - } - re += regExpEscape(c); - } - return [re, unescape(glob), !!hasMagic, uflag]; - } -} -//# sourceMappingURL=ast.js.map \ No newline at end of file diff --git a/deps/npm/node_modules/minimatch/dist/mjs/extglob.js b/deps/npm/node_modules/minimatch/dist/mjs/extglob.js new file mode 100644 index 00000000000000..4033f4d60e34d5 --- /dev/null +++ b/deps/npm/node_modules/minimatch/dist/mjs/extglob.js @@ -0,0 +1,3 @@ +// translate an extglob into a regular expression +export {}; +//# sourceMappingURL=extglob.js.map \ No newline at end of file diff --git a/deps/npm/node_modules/minimatch/dist/mjs/index.js b/deps/npm/node_modules/minimatch/dist/mjs/index.js index 0d5e956be8818b..34d53abafc8ea4 100644 --- a/deps/npm/node_modules/minimatch/dist/mjs/index.js +++ b/deps/npm/node_modules/minimatch/dist/mjs/index.js @@ -1,6 +1,5 @@ import expand from 'brace-expansion'; -import { assertValidPattern } from './assert-valid-pattern.js'; -import { AST } from './ast.js'; +import { parseClass } from './brace-expressions.js'; import { escape } from './escape.js'; import { unescape } from './unescape.js'; export const minimatch = (p, pattern, options = {}) => { @@ -11,6 +10,7 @@ export const minimatch = (p, pattern, options = {}) => { } return new Minimatch(pattern, options).match(p); }; +export default minimatch; // Optimized checking for the most common glob patterns. const starDotExtRE = /^\*+([^+@!?\*\[\(]*)$/; const starDotExtTest = (ext) => (f) => !f.startsWith('.') && f.endsWith(ext); @@ -78,6 +78,13 @@ export const sep = defaultPlatform === 'win32' ? path.win32.sep : path.posix.sep minimatch.sep = sep; export const GLOBSTAR = Symbol('globstar **'); minimatch.GLOBSTAR = GLOBSTAR; +const plTypes = { + '!': { open: '(?:(?!(?:', close: '))[^/]*?)' }, + '?': { open: '(?:', close: ')?' }, + '+': { open: '(?:', close: ')+' }, + '*': { open: '(?:', close: ')*' }, + '@': { open: '(?:', close: ')' }, +}; // any single thing other than / // don't need to escape / when using new RegExp() const qmark = '[^/]'; @@ -90,6 +97,15 @@ const twoStarDot = '(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?'; // not a ^ or / followed by a dot, // followed by anything, any number of times. const twoStarNoDot = '(?:(?!(?:\\/|^)\\.).)*?'; +// "abc" -> { a:true, b:true, c:true } +const charSet = (s) => s.split('').reduce((set, c) => { + set[c] = true; + return set; +}, {}); +// characters that need to be escaped in RegExp. +const reSpecials = charSet('().*{}+?[]^$\\!'); +// characters that indicate we have to add the pattern start +const addPatternStartSet = charSet('[.('); export const filter = (pattern, options = {}) => (p) => minimatch(p, pattern, options); minimatch.filter = filter; const ext = (a, b = {}) => Object.assign({}, a, b); @@ -108,16 +124,6 @@ export const defaults = (def) => { return orig.defaults(ext(def, options)).Minimatch; } }, - AST: class AST extends orig.AST { - /* c8 ignore start */ - constructor(type, parent, options = {}) { - super(type, parent, ext(def, options)); - } - /* c8 ignore stop */ - static fromGlob(pattern, options = {}) { - return orig.AST.fromGlob(pattern, ext(def, options)); - } - }, unescape: (s, options = {}) => orig.unescape(s, ext(def, options)), escape: (s, options = {}) => orig.escape(s, ext(def, options)), filter: (pattern, options = {}) => orig.filter(pattern, ext(def, options)), @@ -151,6 +157,15 @@ export const braceExpand = (pattern, options = {}) => { return expand(pattern); }; minimatch.braceExpand = braceExpand; +const MAX_PATTERN_LENGTH = 1024 * 64; +const assertValidPattern = (pattern) => { + if (typeof pattern !== 'string') { + throw new TypeError('invalid pattern'); + } + if (pattern.length > MAX_PATTERN_LENGTH) { + throw new TypeError('pattern is too long'); + } +}; // parse a component of the expanded set. // At this point, no pattern may contain "/" in it // so we're going to return a 2d array, where each entry is the full @@ -174,6 +189,7 @@ export const match = (list, pattern, options = {}) => { }; minimatch.match = match; // replace stuff like \* with * +const globUnescape = (s) => s.replace(/\\(.)/g, '$1'); const globMagic = /[?*]|[+@!]\(.*?\)|\[|\]/; const regExpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&'); export class Minimatch { @@ -824,8 +840,293 @@ export class Minimatch { else if ((m = pattern.match(dotStarRE))) { fastTest = dotStarTest; } - const re = AST.fromGlob(pattern, this.options).toMMPattern(); - return fastTest ? Object.assign(re, { test: fastTest }) : re; + let re = ''; + let hasMagic = false; + let escaping = false; + // ? => one single character + const patternListStack = []; + const negativeLists = []; + let stateChar = false; + let uflag = false; + let pl; + // . and .. never match anything that doesn't start with ., + // even when options.dot is set. However, if the pattern + // starts with ., then traversal patterns can match. + let dotTravAllowed = pattern.charAt(0) === '.'; + let dotFileAllowed = options.dot || dotTravAllowed; + const patternStart = () => dotTravAllowed + ? '' + : dotFileAllowed + ? '(?!(?:^|\\/)\\.{1,2}(?:$|\\/))' + : '(?!\\.)'; + const subPatternStart = (p) => p.charAt(0) === '.' + ? '' + : options.dot + ? '(?!(?:^|\\/)\\.{1,2}(?:$|\\/))' + : '(?!\\.)'; + const clearStateChar = () => { + if (stateChar) { + // we had some state-tracking character + // that wasn't consumed by this pass. + switch (stateChar) { + case '*': + re += star; + hasMagic = true; + break; + case '?': + re += qmark; + hasMagic = true; + break; + default: + re += '\\' + stateChar; + break; + } + this.debug('clearStateChar %j %j', stateChar, re); + stateChar = false; + } + }; + for (let i = 0, c; i < pattern.length && (c = pattern.charAt(i)); i++) { + this.debug('%s\t%s %s %j', pattern, i, re, c); + // skip over any that are escaped. + if (escaping) { + // completely not allowed, even escaped. + // should be impossible. + /* c8 ignore start */ + if (c === '/') { + return false; + } + /* c8 ignore stop */ + if (reSpecials[c]) { + re += '\\'; + } + re += c; + escaping = false; + continue; + } + switch (c) { + // Should already be path-split by now. + /* c8 ignore start */ + case '/': { + return false; + } + /* c8 ignore stop */ + case '\\': + clearStateChar(); + escaping = true; + continue; + // the various stateChar values + // for the "extglob" stuff. + case '?': + case '*': + case '+': + case '@': + case '!': + this.debug('%s\t%s %s %j <-- stateChar', pattern, i, re, c); + // if we already have a stateChar, then it means + // that there was something like ** or +? in there. + // Handle the stateChar, then proceed with this one. + this.debug('call clearStateChar %j', stateChar); + clearStateChar(); + stateChar = c; + // if extglob is disabled, then +(asdf|foo) isn't a thing. + // just clear the statechar *now*, rather than even diving into + // the patternList stuff. + if (options.noext) + clearStateChar(); + continue; + case '(': { + if (!stateChar) { + re += '\\('; + continue; + } + const plEntry = { + type: stateChar, + start: i - 1, + reStart: re.length, + open: plTypes[stateChar].open, + close: plTypes[stateChar].close, + }; + this.debug(this.pattern, '\t', plEntry); + patternListStack.push(plEntry); + // negation is (?:(?!(?:js)(?:))[^/]*) + re += plEntry.open; + // next entry starts with a dot maybe? + if (plEntry.start === 0 && plEntry.type !== '!') { + dotTravAllowed = true; + re += subPatternStart(pattern.slice(i + 1)); + } + this.debug('plType %j %j', stateChar, re); + stateChar = false; + continue; + } + case ')': { + const plEntry = patternListStack[patternListStack.length - 1]; + if (!plEntry) { + re += '\\)'; + continue; + } + patternListStack.pop(); + // closing an extglob + clearStateChar(); + hasMagic = true; + pl = plEntry; + // negation is (?:(?!js)[^/]*) + // The others are (?:) + re += pl.close; + if (pl.type === '!') { + negativeLists.push(Object.assign(pl, { reEnd: re.length })); + } + continue; + } + case '|': { + const plEntry = patternListStack[patternListStack.length - 1]; + if (!plEntry) { + re += '\\|'; + continue; + } + clearStateChar(); + re += '|'; + // next subpattern can start with a dot? + if (plEntry.start === 0 && plEntry.type !== '!') { + dotTravAllowed = true; + re += subPatternStart(pattern.slice(i + 1)); + } + continue; + } + // these are mostly the same in regexp and glob + case '[': + // swallow any state-tracking char before the [ + clearStateChar(); + const [src, needUflag, consumed, magic] = parseClass(pattern, i); + if (consumed) { + re += src; + uflag = uflag || needUflag; + i += consumed - 1; + hasMagic = hasMagic || magic; + } + else { + re += '\\['; + } + continue; + case ']': + re += '\\' + c; + continue; + default: + // swallow any state char that wasn't consumed + clearStateChar(); + re += regExpEscape(c); + break; + } // switch + } // for + // handle the case where we had a +( thing at the *end* + // of the pattern. + // each pattern list stack adds 3 chars, and we need to go through + // and escape any | chars that were passed through as-is for the regexp. + // Go through and escape them, taking care not to double-escape any + // | chars that were already escaped. + for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { + let tail; + tail = re.slice(pl.reStart + pl.open.length); + this.debug(this.pattern, 'setting tail', re, pl); + // maybe some even number of \, then maybe 1 \, followed by a | + tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, (_, $1, $2) => { + if (!$2) { + // the | isn't already escaped, so escape it. + $2 = '\\'; + // should already be done + /* c8 ignore start */ + } + /* c8 ignore stop */ + // need to escape all those slashes *again*, without escaping the + // one that we need for escaping the | character. As it works out, + // escaping an even number of slashes can be done by simply repeating + // it exactly after itself. That's why this trick works. + // + // I am sorry that you have to see this. + return $1 + $1 + $2 + '|'; + }); + this.debug('tail=%j\n %s', tail, tail, pl, re); + const t = pl.type === '*' ? star : pl.type === '?' ? qmark : '\\' + pl.type; + hasMagic = true; + re = re.slice(0, pl.reStart) + t + '\\(' + tail; + } + // handle trailing things that only matter at the very end. + clearStateChar(); + if (escaping) { + // trailing \\ + re += '\\\\'; + } + // only need to apply the nodot start if the re starts with + // something that could conceivably capture a dot + const addPatternStart = addPatternStartSet[re.charAt(0)]; + // Hack to work around lack of negative lookbehind in JS + // A pattern like: *.!(x).!(y|z) needs to ensure that a name + // like 'a.xyz.yz' doesn't match. So, the first negative + // lookahead, has to look ALL the way ahead, to the end of + // the pattern. + for (let n = negativeLists.length - 1; n > -1; n--) { + const nl = negativeLists[n]; + const nlBefore = re.slice(0, nl.reStart); + const nlFirst = re.slice(nl.reStart, nl.reEnd - 8); + let nlAfter = re.slice(nl.reEnd); + const nlLast = re.slice(nl.reEnd - 8, nl.reEnd) + nlAfter; + // Handle nested stuff like *(*.js|!(*.json)), where open parens + // mean that we should *not* include the ) in the bit that is considered + // "after" the negated section. + const closeParensBefore = nlBefore.split(')').length; + const openParensBefore = nlBefore.split('(').length - closeParensBefore; + let cleanAfter = nlAfter; + for (let i = 0; i < openParensBefore; i++) { + cleanAfter = cleanAfter.replace(/\)[+*?]?/, ''); + } + nlAfter = cleanAfter; + const dollar = nlAfter === '' ? '(?:$|\\/)' : ''; + re = nlBefore + nlFirst + nlAfter + dollar + nlLast; + } + // if the re is not "" at this point, then we need to make sure + // it doesn't match against an empty path part. + // Otherwise a/* will match a/, which it should not. + if (re !== '' && hasMagic) { + re = '(?=.)' + re; + } + if (addPatternStart) { + re = patternStart() + re; + } + // if it's nocase, and the lcase/uppercase don't match, it's magic + if (options.nocase && !hasMagic && !options.nocaseMagicOnly) { + hasMagic = pattern.toUpperCase() !== pattern.toLowerCase(); + } + // skip the regexp for non-magical patterns + // unescape anything in it, though, so that it'll be + // an exact match against a file etc. + if (!hasMagic) { + return globUnescape(re); + } + const flags = (options.nocase ? 'i' : '') + (uflag ? 'u' : ''); + try { + const ext = fastTest + ? { + _glob: pattern, + _src: re, + test: fastTest, + } + : { + _glob: pattern, + _src: re, + }; + return Object.assign(new RegExp('^' + re + '$', flags), ext); + /* c8 ignore start */ + } + catch (er) { + // should be impossible + // If it was an invalid regular expression, then it can't match + // anything. This trick looks for a character after the end of + // the string, which is of course impossible, except in multi-line + // mode, but it's not a /m regex. + this.debug('invalid regexp', er); + return new RegExp('$.'); + } + /* c8 ignore stop */ } makeRe() { if (this.regexp || this.regexp === false) @@ -847,7 +1148,7 @@ export class Minimatch { : options.dot ? twoStarDot : twoStarNoDot; - const flags = new Set(options.nocase ? ['i'] : []); + const flags = options.nocase ? 'i' : ''; // regexpify non-globstar patterns // if ** is only item, then we just do one twoStar // if ** is first, and there are more, prepend (\/|twoStar\/)? to next @@ -856,17 +1157,11 @@ export class Minimatch { // then filter out GLOBSTAR symbols let re = set .map(pattern => { - const pp = pattern.map(p => { - if (p instanceof RegExp) { - for (const f of p.flags.split('')) - flags.add(f); - } - return typeof p === 'string' - ? regExpEscape(p) - : p === GLOBSTAR - ? GLOBSTAR - : p._src; - }); + const pp = pattern.map(p => typeof p === 'string' + ? regExpEscape(p) + : p === GLOBSTAR + ? GLOBSTAR + : p._src); pp.forEach((p, i) => { const next = pp[i + 1]; const prev = pp[i - 1]; @@ -892,17 +1187,14 @@ export class Minimatch { return pp.filter(p => p !== GLOBSTAR).join('/'); }) .join('|'); - // need to wrap in parens if we had more than one thing with |, - // otherwise only the first will be anchored to ^ and the last to $ - const [open, close] = set.length > 1 ? ['(?:', ')'] : ['', '']; // must match entire pattern // ending in a * or ** will make it less strict. - re = '^' + open + re + close + '$'; + re = '^(?:' + re + ')$'; // can match anything, as long as it's not this. if (this.negate) - re = '^(?!' + re + ').+$'; + re = '^(?!' + re + ').*$'; try { - this.regexp = new RegExp(re, [...flags].join('')); + this.regexp = new RegExp(re, flags); /* c8 ignore start */ } catch (ex) { @@ -988,11 +1280,9 @@ export class Minimatch { } } /* c8 ignore start */ -export { AST } from './ast.js'; export { escape } from './escape.js'; export { unescape } from './unescape.js'; /* c8 ignore stop */ -minimatch.AST = AST; minimatch.Minimatch = Minimatch; minimatch.escape = escape; minimatch.unescape = unescape; diff --git a/deps/npm/node_modules/minimatch/dist/mjs/parse.js b/deps/npm/node_modules/minimatch/dist/mjs/parse.js new file mode 100644 index 00000000000000..70a26dee58f30b --- /dev/null +++ b/deps/npm/node_modules/minimatch/dist/mjs/parse.js @@ -0,0 +1,646 @@ +// parse a single path portion +import { parseClass } from './brace-expressions'; +const types = new Set(['!', '?', '+', '*', '@']); +const isExtglobType = (c) => types.has(c); +// characters that indicate a start of pattern needs the "no dots" bit +const addPatternStart = new Set(['[', '.']); +const justDots = new Set(['..', '.']); +const reSpecials = new Set('().*{}+?[]^$\\!'); +const regExpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&'); +// any single thing other than / +// don't need to escape / when using new RegExp() +const qmark = '[^/]'; +// * => any number of characters +const star = qmark + '*?'; +export class AST { + type; + #root; + #parts = []; + #parent; + #parentIndex; + #negs; + #filledNegs = false; + #options; + constructor(type, parent, options = {}) { + this.type = type; + this.#parent = parent; + this.#root = this.#parent ? this.#parent.#root : this; + this.#options = this.#root === this ? options : this.#root.#options; + this.#negs = this.#root === this ? [] : this.#root.#negs; + if (type === '!' && !this.#root.#filledNegs) + this.#negs.push(this); + this.#parentIndex = this.#parent ? this.#parent.#parts.length : 0; + } + fillNegs() { + if (this !== this.#root) { + this.#root.fillNegs(); + return this; + } + if (this.#filledNegs) + return this; + this.#filledNegs = true; + let n; + while ((n = this.#negs.pop())) { + if (n.type !== '!') + continue; + // walk up the tree, appending everthing that comes AFTER parentIndex + let p = n; + let pp = p.#parent; + while (pp) { + for (let i = p.#parentIndex + 1; !pp.type && i < pp.#parts.length; i++) { + for (const part of n.#parts) { + /* c8 ignore start */ + if (typeof part === 'string') { + throw new Error('string part in extglob AST??'); + } + /* c8 ignore stop */ + part.copyIn(pp.#parts[i]); + } + } + p = pp; + pp = p.#parent; + } + } + return this; + } + push(...parts) { + for (const p of parts) { + if (p === '') + continue; + /* c8 ignore start */ + if (typeof p !== 'string' && !(p instanceof AST && p.#parent === this)) { + throw new Error('invalid part: ' + p); + } + /* c8 ignore stop */ + this.#parts.push(p); + } + } + toJSON() { + const ret = this.type === null ? this.#parts.slice() : [this.type, ...this.#parts]; + if (this.isStart() && !this.type) + ret.unshift([]); + if (this.isEnd() && + (this === this.#root || + (this.#root.#filledNegs && this.#parent?.type === '!'))) { + ret.push({}); + } + return ret; + } + isStart() { + if (this.#root === this) + return true; + // if (this.type) return !!this.#parent?.isStart() + if (!this.#parent?.isStart()) + return false; + return this.#parentIndex === 0; + } + isEnd() { + if (this.#root === this) + return true; + if (this.#parent?.type === '!') + return true; + if (!this.#parent?.isEnd()) + return false; + if (!this.type) + return this.#parent?.isEnd(); + return (this.#parentIndex === (this.#parent ? this.#parent.#parts.length : 0) - 1); + } + copyIn(part) { + if (typeof part === 'string') + this.push(part); + else + this.push(part.clone(this)); + } + clone(parent) { + const c = new AST(this.type, parent); + for (const p of this.#parts) { + c.copyIn(p); + } + return c; + } + static #parseAST(str, ast, pos, opt) { + let escaping = false; + if (ast.type === null) { + // outside of a extglob, append until we find a start + let i = pos; + let acc = ''; + while (i < str.length) { + const c = str.charAt(i++); + // still accumulate escapes at this point, but we do ignore + // starts that are escaped + if (escaping || c === '\\') { + escaping = !escaping; + acc += c; + continue; + } + if (!opt.noext && isExtglobType(c) && str.charAt(i) === '(') { + ast.push(acc); + acc = ''; + const ext = new AST(c, ast); + i = AST.#parseAST(str, ext, i, opt); + ast.push(ext); + continue; + } + acc += c; + } + ast.push(acc); + return i; + } + // some kind of extglob, pos is at the ( + // find the next | or ) + let i = pos + 1; + let part = new AST(null, ast); + const parts = []; + let acc = ''; + while (i < str.length) { + const c = str.charAt(i++); + // still accumulate escapes at this point, but we do ignore + // starts that are escaped + if (escaping || c === '\\') { + escaping = !escaping; + acc += c; + continue; + } + if (isExtglobType(c) && str.charAt(i) === '(') { + part.push(acc); + acc = ''; + const ext = new AST(c, part); + part.push(ext); + i = AST.#parseAST(str, ext, i, opt); + continue; + } + if (c === '|') { + part.push(acc); + acc = ''; + parts.push(part); + part = new AST(null, ast); + continue; + } + if (c === ')') { + part.push(acc); + acc = ''; + ast.push(...parts, part); + return i; + } + acc += c; + } + // if we got here, it was a malformed extglob! not an extglob, but + // maybe something else in there. + ast.type = null; + ast.#parts = [str.substring(pos)]; + return i; + } + static fromGlob(pattern, options = {}) { + const ast = new AST(null, undefined, options); + AST.#parseAST(pattern, ast, 0, options); + console.log('parsed', pattern, JSON.stringify(ast)); + return ast; + } + toRegExpSource() { + if (this.#root === this) + this.fillNegs(); + if (!this.type) { + const src = this.#parts + .map(p => { + if (typeof p === 'string') + return AST.#parseGlob(p, this.#options); + else + return p.toRegExpSource(); + }) + .join(''); + let start = ''; + if (this.isStart() && typeof this.#parts[0] === 'string') { + // '.' and '..' cannot match unless the pattern is that exactly + const dotTravAllowed = this.#parts.length === 1 && justDots.has(this.#parts[0]); + if (dotTravAllowed) { + start = '(?:^|\\/)'; + } + else { + const dotsAllowed = this.#options.dot || + // no need to prevent dots if it can't match a dot, or if a sub-pattern + // will be preventing it anyway. + !addPatternStart.has(src.charAt(0)); + start = dotsAllowed ? '(?!(?:^|\\/)\\.{1,2}(?:$|\\/))' : '(?!\\.)'; + } + } + let end = ''; + if (this.isEnd() && + (this === this.#root || + (this.#root.#filledNegs && this.#parent?.type === '!'))) { + end = '(?:$|\\/)'; + } + return start + src + end; + } + // some kind of extglob + const start = this.type === '!' ? '(?:(?!(?:' : '(?:'; + const body = this.#parts + .map(p => { + /* c8 ignore start */ + if (typeof p === 'string') { + throw new Error('string type in extglob ast??'); + } + /* c8 ignore stop */ + return p.toRegExpSource(); + }) + .join('|'); + const close = this.type === '!' + ? '))[^/]*?)' + : this.type === '@' + ? ')' + : `)${this.type}`; + return start + body + close; + } + static #parseGlob(glob, options) { + let escaping = false; + let re = ''; + let uflag = false; + let hasMagic = false; + for (let i = 0; i < glob.length; i++) { + const c = glob.charAt(i); + if (escaping) { + escaping = false; + re += (reSpecials.has(c) ? '\\' : '') + c; + continue; + } + if (c === '\\') { + if (i === glob.length - 1) { + re += '\\\\'; + } + else { + escaping = true; + } + continue; + } + if (c === '[') { + const [src, needUflag, consumed, magic] = parseClass(glob, i); + if (consumed) { + re += src; + uflag = uflag || needUflag; + i += consumed - 1; + hasMagic = hasMagic || magic; + continue; + } + } + if (c === '*') { + re += star; + hasMagic = true; + continue; + } + if (c === '?') { + re += qmark; + hasMagic = true; + continue; + } + re += regExpEscape(c); + } + return re; + } +} +const pattern = 'a@(i|w!(x|y)z+(l|m)|j)'; +const ast = AST.fromGlob(pattern).fillNegs(); +console.log('negged', pattern, JSON.stringify(ast)); +console.log('to re src', pattern, ast.toRegExpSource()); +// // the type (exttype or null for strings), and array of children tokens +// +// // append everything after a negative extglob to each of the parts +// // of the negative extglob node. So, eg, [a, [!, x, y], z] +// +// // +// // +// // +// // +// +// const globUnescape = (s: string) => s.replace(/\\(.)/g, '$1') +// const regExpEscape = (s: string) => +// s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&') +// +// // "abc" -> { a:true, b:true, c:true } +// const charSet = (s: string) => +// s.split('').reduce((set: { [k: string]: boolean }, c) => { +// set[c] = true +// return set +// }, {}) +// +// // characters that need to be escaped in RegExp. +// const reSpecials = charSet('().*{}+?[]^$\\!') +// +// // characters that indicate we have to add the pattern start +// const addPatternStartSet = charSet('[.(') +// +// // any single thing other than / +// // don't need to escape / when using new RegExp() +// const qmark = '[^/]' +// +// // * => any number of characters +// const star = qmark + '*?' +// +// // TODO: take an offset and length, so we can sub-parse the extglobs +// const parse = ( +// options: MinimatchOptions, +// pattern: string, +// debug: (...a: any[]) => void +// ): false | string => { +// assertValidPattern(pattern) +// +// if (pattern === '') return '' +// +// let re = '' +// let hasMagic = false +// let escaping = false +// // ? => one single character +// let uflag = false +// +// // . and .. never match anything that doesn't start with ., +// // even when options.dot is set. However, if the pattern +// // starts with ., then traversal patterns can match. +// let dotTravAllowed = pattern.charAt(0) === '.' +// let dotFileAllowed = options.dot || dotTravAllowed +// const patternStart = () => +// dotTravAllowed +// ? '' +// : dotFileAllowed +// ? '(?!(?:^|\\/)\\.{1,2}(?:$|\\/))' +// : '(?!\\.)' +// const subPatternStart = (p: string) => +// p.charAt(0) === '.' +// ? '' +// : options.dot +// ? '(?!(?:^|\\/)\\.{1,2}(?:$|\\/))' +// : '(?!\\.)' +// +// const clearStateChar = () => { +// if (stateChar) { +// // we had some state-tracking character +// // that wasn't consumed by this pass. +// switch (stateChar) { +// case '*': +// re += star +// hasMagic = true +// break +// case '?': +// re += qmark +// hasMagic = true +// break +// default: +// re += '\\' + stateChar +// break +// } +// debug('clearStateChar %j %j', stateChar, re) +// stateChar = false +// } +// } +// +// for ( +// let i = 0, c: string; +// i < pattern.length && (c = pattern.charAt(i)); +// i++ +// ) { +// debug('%s\t%s %s %j', pattern, i, re, c) +// +// // skip over any that are escaped. +// if (escaping) { +// // completely not allowed, even escaped. +// // should be impossible. +// /* c8 ignore start */ +// if (c === '/') { +// return false +// } +// /* c8 ignore stop */ +// +// if (reSpecials[c]) { +// re += '\\' +// } +// re += c +// escaping = false +// continue +// } +// +// switch (c) { +// // Should already be path-split by now. +// /* c8 ignore start */ +// case '/': { +// return false +// } +// /* c8 ignore stop */ +// +// case '\\': +// clearStateChar() +// escaping = true +// continue +// +// // the various stateChar values +// // for the "extglob" stuff. +// case '?': +// case '*': +// case '+': +// case '@': +// case '!': +// debug('%s\t%s %s %j <-- stateChar', pattern, i, re, c) +// +// // if we already have a stateChar, then it means +// // that there was something like ** or +? in there. +// // Handle the stateChar, then proceed with this one. +// debug('call clearStateChar %j', stateChar) +// clearStateChar() +// stateChar = c +// // if extglob is disabled, then +(asdf|foo) isn't a thing. +// // just clear the statechar *now*, rather than even diving into +// // the patternList stuff. +// if (options.noext) clearStateChar() +// continue +// +// case '(': { +// if (!stateChar) { +// re += '\\(' +// continue +// } +// +// const plEntry: PatternListEntry = { +// type: stateChar, +// start: i - 1, +// reStart: re.length, +// open: plTypes[stateChar].open, +// close: plTypes[stateChar].close, +// } +// debug(pattern, '\t', plEntry) +// patternListStack.push(plEntry) +// // negation is (?:(?!(?:js)(?:))[^/]*) +// re += plEntry.open +// // next entry starts with a dot maybe? +// if (plEntry.start === 0 && plEntry.type !== '!') { +// dotTravAllowed = true +// re += subPatternStart(pattern.slice(i + 1)) +// } +// debug('plType %j %j', stateChar, re) +// stateChar = false +// continue +// } +// +// case ')': { +// const plEntry = patternListStack[patternListStack.length - 1] +// if (!plEntry) { +// re += '\\)' +// continue +// } +// patternListStack.pop() +// +// // closing an extglob +// clearStateChar() +// hasMagic = true +// pl = plEntry +// // negation is (?:(?!js)[^/]*) +// // The others are (?:) +// re += pl.close +// if (pl.type === '!') { +// negativeLists.push(Object.assign(pl, { reEnd: re.length })) +// } +// continue +// } +// +// case '|': { +// const plEntry = patternListStack[patternListStack.length - 1] +// if (!plEntry) { +// re += '\\|' +// continue +// } +// +// clearStateChar() +// re += '|' +// // next subpattern can start with a dot? +// if (plEntry.start === 0 && plEntry.type !== '!') { +// dotTravAllowed = true +// re += subPatternStart(pattern.slice(i + 1)) +// } +// continue +// } +// +// // these are mostly the same in regexp and glob +// case '[': +// // swallow any state-tracking char before the [ +// clearStateChar() +// const [src, needUflag, consumed, magic] = parseClass(pattern, i) +// if (consumed) { +// re += src +// uflag = uflag || needUflag +// i += consumed - 1 +// hasMagic = hasMagic || magic +// } else { +// re += '\\[' +// } +// continue +// +// case ']': +// re += '\\' + c +// continue +// +// default: +// // swallow any state char that wasn't consumed +// clearStateChar() +// +// re += regExpEscape(c) +// break +// } // switch +// } // for +// +// // handle the case where we had a +( thing at the *end* +// // of the pattern. +// // each pattern list stack adds 3 chars, and we need to go through +// // and escape any | chars that were passed through as-is for the regexp. +// // Go through and escape them, taking care not to double-escape any +// // | chars that were already escaped. +// for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { +// let tail: string +// tail = re.slice(pl.reStart + pl.open.length) +// debug(pattern, 'setting tail', re, pl) +// // maybe some even number of \, then maybe 1 \, followed by a | +// tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, (_, $1, $2) => { +// if (!$2) { +// // the | isn't already escaped, so escape it. +// $2 = '\\' +// // should already be done +// /* c8 ignore start */ +// } +// /* c8 ignore stop */ +// +// // need to escape all those slashes *again*, without escaping the +// // one that we need for escaping the | character. As it works out, +// // escaping an even number of slashes can be done by simply repeating +// // it exactly after itself. That's why this trick works. +// // +// // I am sorry that you have to see this. +// return $1 + $1 + $2 + '|' +// }) +// +// debug('tail=%j\n %s', tail, tail, pl, re) +// const t = pl.type === '*' ? star : pl.type === '?' ? qmark : '\\' + pl.type +// +// hasMagic = true +// re = re.slice(0, pl.reStart) + t + '\\(' + tail +// } +// +// // handle trailing things that only matter at the very end. +// clearStateChar() +// if (escaping) { +// // trailing \\ +// re += '\\\\' +// } +// +// // only need to apply the nodot start if the re starts with +// // something that could conceivably capture a dot +// const addPatternStart = addPatternStartSet[re.charAt(0)] +// +// // Hack to work around lack of negative lookbehind in JS +// // A pattern like: *.!(x).!(y|z) needs to ensure that a name +// // like 'a.xyz.yz' doesn't match. So, the first negative +// // lookahead, has to look ALL the way ahead, to the end of +// // the pattern. +// for (let n = negativeLists.length - 1; n > -1; n--) { +// const nl = negativeLists[n] +// +// const nlBefore = re.slice(0, nl.reStart) +// const nlFirst = re.slice(nl.reStart, nl.reEnd - 8) +// let nlAfter = re.slice(nl.reEnd) +// const nlLast = re.slice(nl.reEnd - 8, nl.reEnd) + nlAfter +// +// // Handle nested stuff like *(*.js|!(*.json)), where open parens +// // mean that we should *not* include the ) in the bit that is considered +// // "after" the negated section. +// const closeParensBefore = nlBefore.split(')').length +// const openParensBefore = nlBefore.split('(').length - closeParensBefore +// let cleanAfter = nlAfter +// for (let i = 0; i < openParensBefore; i++) { +// cleanAfter = cleanAfter.replace(/\)[+*?]?/, '') +// } +// nlAfter = cleanAfter +// +// const dollar = nlAfter === '' ? '(?:$|\\/)' : '' +// +// re = nlBefore + nlFirst + nlAfter + dollar + nlLast +// } +// +// // if the re is not "" at this point, then we need to make sure +// // it doesn't match against an empty path part. +// // Otherwise a/* will match a/, which it should not. +// if (re !== '' && hasMagic) { +// re = '(?=.)' + re +// } +// +// if (addPatternStart) { +// re = patternStart() + re +// } +// +// // if it's nocase, and the lcase/uppercase don't match, it's magic +// if (options.nocase && !hasMagic && !options.nocaseMagicOnly) { +// hasMagic = pattern.toUpperCase() !== pattern.toLowerCase() +// } +// +// // skip the regexp for non-magical patterns +// // unescape anything in it, though, so that it'll be +// // an exact match against a file etc. +// if (!hasMagic) { +// return globUnescape(re) +// } +// +// return re +// } +//# sourceMappingURL=parse.js.map \ No newline at end of file diff --git a/deps/npm/node_modules/minimatch/package.json b/deps/npm/node_modules/minimatch/package.json index 06d796a2e4143c..95364b15482463 100644 --- a/deps/npm/node_modules/minimatch/package.json +++ b/deps/npm/node_modules/minimatch/package.json @@ -2,12 +2,12 @@ "author": "Isaac Z. Schlueter (http://blog.izs.me)", "name": "minimatch", "description": "a glob matcher in javascript", - "version": "9.0.0", + "version": "7.4.3", "repository": { "type": "git", "url": "git://github.com/isaacs/minimatch.git" }, - "main": "./dist/cjs/index.js", + "main": "./dist/cjs/index-cjs.js", "module": "./dist/mjs/index.js", "types": "./dist/cjs/index.d.ts", "exports": { @@ -18,7 +18,7 @@ }, "require": { "types": "./dist/cjs/index.d.ts", - "default": "./dist/cjs/index.js" + "default": "./dist/cjs/index-cjs.js" } } }, @@ -52,14 +52,14 @@ "endOfLine": "lf" }, "engines": { - "node": ">=16 || 14 >=14.17" + "node": ">=10" }, "dependencies": { "brace-expansion": "^2.0.1" }, "devDependencies": { "@types/brace-expansion": "^1.1.0", - "@types/node": "^18.15.11", + "@types/node": "^18.11.9", "@types/tap": "^15.0.7", "c8": "^7.12.0", "eslint-config-prettier": "^8.6.0", diff --git a/deps/npm/node_modules/minipass-fetch/lib/blob.js b/deps/npm/node_modules/minipass-fetch/lib/blob.js index 121b1730102e72..efe69a34458afb 100644 --- a/deps/npm/node_modules/minipass-fetch/lib/blob.js +++ b/deps/npm/node_modules/minipass-fetch/lib/blob.js @@ -1,5 +1,5 @@ 'use strict' -const { Minipass } = require('minipass') +const Minipass = require('minipass') const TYPE = Symbol('type') const BUFFER = Symbol('buffer') diff --git a/deps/npm/node_modules/minipass-fetch/lib/body.js b/deps/npm/node_modules/minipass-fetch/lib/body.js index 6a517a21385407..9d1b45de30ce9e 100644 --- a/deps/npm/node_modules/minipass-fetch/lib/body.js +++ b/deps/npm/node_modules/minipass-fetch/lib/body.js @@ -1,5 +1,5 @@ 'use strict' -const { Minipass } = require('minipass') +const Minipass = require('minipass') const MinipassSized = require('minipass-sized') const Blob = require('./blob.js') diff --git a/deps/npm/node_modules/minipass-fetch/lib/index.js b/deps/npm/node_modules/minipass-fetch/lib/index.js index 77e82555e984f1..b1878ac0c06b50 100644 --- a/deps/npm/node_modules/minipass-fetch/lib/index.js +++ b/deps/npm/node_modules/minipass-fetch/lib/index.js @@ -3,7 +3,7 @@ const { URL } = require('url') const http = require('http') const https = require('https') const zlib = require('minizlib') -const { Minipass } = require('minipass') +const Minipass = require('minipass') const Body = require('./body.js') const { writeToStream, getTotalBytes } = Body @@ -143,20 +143,8 @@ const fetch = async (url, opts) => { const location = headers.get('Location') // HTTP fetch step 5.3 - let locationURL = null - try { - locationURL = location === null ? null : new URL(location, request.url).toString() - } catch { - // error here can only be invalid URL in Location: header - // do not throw when options.redirect == manual - // let the user extract the errorneous redirect URL - if (request.redirect !== 'manual') { - /* eslint-disable-next-line max-len */ - reject(new FetchError(`uri requested responds with an invalid redirect URL: ${location}`, 'invalid-redirect')) - finalize() - return - } - } + const locationURL = location === null ? null + : (new URL(location, request.url)).toString() // HTTP fetch step 5.5 if (request.redirect === 'error') { diff --git a/deps/npm/node_modules/minipass-fetch/lib/request.js b/deps/npm/node_modules/minipass-fetch/lib/request.js index 054439e6699107..e620df6de2c011 100644 --- a/deps/npm/node_modules/minipass-fetch/lib/request.js +++ b/deps/npm/node_modules/minipass-fetch/lib/request.js @@ -1,6 +1,6 @@ 'use strict' const { URL } = require('url') -const { Minipass } = require('minipass') +const Minipass = require('minipass') const Headers = require('./headers.js') const { exportNodeCompatibleHeaders } = Headers const Body = require('./body.js') @@ -265,7 +265,6 @@ class Request extends Body { secureProtocol, servername, sessionIdContext, - timeout: request.timeout, } } } diff --git a/deps/npm/node_modules/minipass-fetch/package.json b/deps/npm/node_modules/minipass-fetch/package.json index 78024317d8be4d..fc6f88473317a9 100644 --- a/deps/npm/node_modules/minipass-fetch/package.json +++ b/deps/npm/node_modules/minipass-fetch/package.json @@ -1,6 +1,6 @@ { "name": "minipass-fetch", - "version": "3.0.3", + "version": "3.0.1", "description": "An implementation of window.fetch in Node.js using Minipass streams", "license": "MIT", "main": "lib/index.js", @@ -24,7 +24,7 @@ }, "devDependencies": { "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.14.1", + "@npmcli/template-oss": "4.10.0", "@ungap/url-search-params": "^0.2.2", "abort-controller": "^3.0.0", "abortcontroller-polyfill": "~1.7.3", @@ -36,7 +36,7 @@ "tap": "^16.0.0" }, "dependencies": { - "minipass": "^5.0.0", + "minipass": "^4.0.0", "minipass-sized": "^1.0.3", "minizlib": "^2.1.2" }, @@ -63,7 +63,6 @@ "author": "GitHub Inc.", "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.14.1", - "publish": "true" + "version": "4.10.0" } } diff --git a/deps/npm/node_modules/minipass/index.js b/deps/npm/node_modules/minipass/index.js index ed07c17acd97b7..5e192c2824586c 100644 --- a/deps/npm/node_modules/minipass/index.js +++ b/deps/npm/node_modules/minipass/index.js @@ -699,4 +699,4 @@ class Minipass extends Stream { } } -exports.Minipass = Minipass +module.exports = Minipass diff --git a/deps/npm/node_modules/minipass/index.mjs b/deps/npm/node_modules/minipass/index.mjs index d1be109c9fc063..d5c58fc9814c00 100644 --- a/deps/npm/node_modules/minipass/index.mjs +++ b/deps/npm/node_modules/minipass/index.mjs @@ -97,7 +97,7 @@ class PipeProxyErrors extends Pipe { } } -export class Minipass extends Stream { +class Minipass extends Stream { constructor(options) { super() this[FLOWING] = false @@ -699,3 +699,4 @@ export class Minipass extends Stream { } } +export default Minipass diff --git a/deps/npm/node_modules/minipass/package.json b/deps/npm/node_modules/minipass/package.json index 0e20e988047f23..1286b88ed5d8fc 100644 --- a/deps/npm/node_modules/minipass/package.json +++ b/deps/npm/node_modules/minipass/package.json @@ -1,6 +1,6 @@ { "name": "minipass", - "version": "5.0.0", + "version": "4.2.5", "description": "minimal implementation of a PassThrough stream", "main": "./index.js", "module": "./index.mjs", diff --git a/deps/npm/node_modules/node-gyp/node_modules/signal-exit/LICENSE.txt b/deps/npm/node_modules/node-gyp/node_modules/signal-exit/LICENSE.txt deleted file mode 100644 index eead04a12162dc..00000000000000 --- a/deps/npm/node_modules/node-gyp/node_modules/signal-exit/LICENSE.txt +++ /dev/null @@ -1,16 +0,0 @@ -The ISC License - -Copyright (c) 2015, Contributors - -Permission to use, copy, modify, and/or distribute this software -for any purpose with or without fee is hereby granted, provided -that the above copyright notice and this permission notice -appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE -LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES -OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/deps/npm/node_modules/node-gyp/node_modules/signal-exit/package.json b/deps/npm/node_modules/node-gyp/node_modules/signal-exit/package.json deleted file mode 100644 index e1a00311f9fbe5..00000000000000 --- a/deps/npm/node_modules/node-gyp/node_modules/signal-exit/package.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "name": "signal-exit", - "version": "3.0.7", - "description": "when you want to fire an event no matter how a process exits.", - "main": "index.js", - "scripts": { - "test": "tap", - "snap": "tap", - "preversion": "npm test", - "postversion": "npm publish", - "prepublishOnly": "git push origin --follow-tags" - }, - "files": [ - "index.js", - "signals.js" - ], - "repository": { - "type": "git", - "url": "https://github.com/tapjs/signal-exit.git" - }, - "keywords": [ - "signal", - "exit" - ], - "author": "Ben Coe ", - "license": "ISC", - "bugs": { - "url": "https://github.com/tapjs/signal-exit/issues" - }, - "homepage": "https://github.com/tapjs/signal-exit", - "devDependencies": { - "chai": "^3.5.0", - "coveralls": "^3.1.1", - "nyc": "^15.1.0", - "standard-version": "^9.3.1", - "tap": "^15.1.1" - } -} diff --git a/deps/npm/node_modules/npm-install-checks/lib/index.js b/deps/npm/node_modules/npm-install-checks/lib/index.js index fa5f593aaac647..37530bb52d19a4 100644 --- a/deps/npm/node_modules/npm-install-checks/lib/index.js +++ b/deps/npm/node_modules/npm-install-checks/lib/index.js @@ -40,7 +40,7 @@ const checkPlatform = (target, force = false) => { libcOk = false } else { const report = process.report.getReport() - if (report.header?.glibcVersionRuntime) { + if (report.header?.glibcRuntimeVersion) { libcFamily = 'glibc' } else if (Array.isArray(report.sharedObjects) && report.sharedObjects.some(isMusl)) { libcFamily = 'musl' diff --git a/deps/npm/node_modules/npm-install-checks/package.json b/deps/npm/node_modules/npm-install-checks/package.json index 192cf68837146f..d9304ebf2a284d 100644 --- a/deps/npm/node_modules/npm-install-checks/package.json +++ b/deps/npm/node_modules/npm-install-checks/package.json @@ -1,6 +1,6 @@ { "name": "npm-install-checks", - "version": "6.1.1", + "version": "6.1.0", "description": "Check the engines and platform fields in package.json", "main": "lib/index.js", "dependencies": { @@ -8,7 +8,7 @@ }, "devDependencies": { "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.13.0", + "@npmcli/template-oss": "4.12.0", "tap": "^16.0.1" }, "scripts": { @@ -39,8 +39,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", - "publish": "true" + "version": "4.12.0" }, "tap": { "nyc-arg": [ diff --git a/deps/npm/node_modules/npm-normalize-package-bin/lib/index.js b/deps/npm/node_modules/npm-normalize-package-bin/lib/index.js index 3cb8478cf6e2f3..d6f0a581b9e661 100644 --- a/deps/npm/node_modules/npm-normalize-package-bin/lib/index.js +++ b/deps/npm/node_modules/npm-normalize-package-bin/lib/index.js @@ -41,7 +41,7 @@ const normalizeObject = pkg => { return } - const binTarget = join('/', orig[binKey].replace(/\\/g, '/')) + const binTarget = join('/', orig[binKey]) .replace(/\\/g, '/').slice(1) if (!binTarget) { diff --git a/deps/npm/node_modules/npm-normalize-package-bin/package.json b/deps/npm/node_modules/npm-normalize-package-bin/package.json index 5ea50dc2a47ba1..8e237074b8a340 100644 --- a/deps/npm/node_modules/npm-normalize-package-bin/package.json +++ b/deps/npm/node_modules/npm-normalize-package-bin/package.json @@ -1,6 +1,6 @@ { "name": "npm-normalize-package-bin", - "version": "3.0.1", + "version": "3.0.0", "description": "Turn any flavor of allowable package.json bin into a normalized object", "main": "lib/index.js", "repository": { @@ -19,8 +19,8 @@ "posttest": "npm run lint" }, "devDependencies": { - "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.14.1", + "@npmcli/eslint-config": "^3.1.0", + "@npmcli/template-oss": "4.5.1", "tap": "^16.3.0" }, "files": [ @@ -32,8 +32,7 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.14.1", - "publish": "true" + "version": "4.5.1" }, "tap": { "nyc-arg": [ diff --git a/deps/npm/node_modules/npm-registry-fetch/lib/clean-url.js b/deps/npm/node_modules/npm-registry-fetch/lib/clean-url.js index 0c2656b5653a00..a419b47d6a339f 100644 --- a/deps/npm/node_modules/npm-registry-fetch/lib/clean-url.js +++ b/deps/npm/node_modules/npm-registry-fetch/lib/clean-url.js @@ -12,8 +12,7 @@ const cleanUrl = (str) => { try { const url = new URL(str) if (url.password) { - url.password = replace - str = url.toString() + str = str.replace(url.password, replace) } } catch { // ignore errors diff --git a/deps/npm/node_modules/npm-registry-fetch/lib/index.js b/deps/npm/node_modules/npm-registry-fetch/lib/index.js index 23e349c5c5b96d..cc331a50c09635 100644 --- a/deps/npm/node_modules/npm-registry-fetch/lib/index.js +++ b/deps/npm/node_modules/npm-registry-fetch/lib/index.js @@ -9,7 +9,7 @@ const npa = require('npm-package-arg') const qs = require('querystring') const url = require('url') const zlib = require('minizlib') -const { Minipass } = require('minipass') +const Minipass = require('minipass') const defaultOpts = require('./default-opts.js') diff --git a/deps/npm/node_modules/npm-registry-fetch/package.json b/deps/npm/node_modules/npm-registry-fetch/package.json index 63a44725886ccf..89550cee29ae61 100644 --- a/deps/npm/node_modules/npm-registry-fetch/package.json +++ b/deps/npm/node_modules/npm-registry-fetch/package.json @@ -1,6 +1,6 @@ { "name": "npm-registry-fetch", - "version": "14.0.5", + "version": "14.0.3", "description": "Fetch-based http client for use with npm registry APIs", "main": "lib", "files": [ @@ -32,7 +32,7 @@ "license": "ISC", "dependencies": { "make-fetch-happen": "^11.0.0", - "minipass": "^5.0.0", + "minipass": "^4.0.0", "minipass-fetch": "^3.0.0", "minipass-json-stream": "^1.0.1", "minizlib": "^2.1.2", @@ -41,10 +41,12 @@ }, "devDependencies": { "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.14.1", + "@npmcli/template-oss": "4.10.0", "cacache": "^17.0.0", + "mkdirp": "^1.0.4", "nock": "^13.2.4", "require-inject": "^1.4.4", + "rimraf": "^3.0.2", "ssri": "^10.0.0", "tap": "^16.0.1" }, @@ -61,7 +63,6 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.14.1", - "publish": "true" + "version": "4.10.0" } } diff --git a/deps/npm/node_modules/pacote/README.md b/deps/npm/node_modules/pacote/README.md index 3db6f960fd42c5..64480b254239a1 100644 --- a/deps/npm/node_modules/pacote/README.md +++ b/deps/npm/node_modules/pacote/README.md @@ -254,9 +254,10 @@ In addition to the common `package.json` fields, manifests include: `manifest._integrity` when `dist.integrity` is not present.) * `fileCount` Number of files in the tarball. * `unpackedSize` Size on disk of the package when unpacked. - * `signatures` Signatures of the shasum. Includes the keyid that - correlates to a [`key from the npm - registry`](https://registry.npmjs.org/-/npm/v1/keys) + * `npm-signature` A signature of the package by the + [`npmregistry`](https://keybase.io/npmregistry) Keybase account. + (Obviously only present for packages published to + `https://registry.npmjs.org`.) ## Packuments diff --git a/deps/npm/node_modules/pacote/lib/dir.js b/deps/npm/node_modules/pacote/lib/dir.js index 420afc5802cb2f..923fdd65c22f39 100644 --- a/deps/npm/node_modules/pacote/lib/dir.js +++ b/deps/npm/node_modules/pacote/lib/dir.js @@ -1,6 +1,6 @@ const Fetcher = require('./fetcher.js') const FileFetcher = require('./file.js') -const { Minipass } = require('minipass') +const Minipass = require('minipass') const tarCreateOptions = require('./util/tar-create-options.js') const packlist = require('npm-packlist') const tar = require('tar') diff --git a/deps/npm/node_modules/pacote/lib/fetcher.js b/deps/npm/node_modules/pacote/lib/fetcher.js index 6694a57f6af365..4852564d0445d3 100644 --- a/deps/npm/node_modules/pacote/lib/fetcher.js +++ b/deps/npm/node_modules/pacote/lib/fetcher.js @@ -18,7 +18,7 @@ const removeTrailingSlashes = require('./util/trailing-slashes.js') const getContents = require('@npmcli/installed-package-contents') const readPackageJsonFast = require('read-package-json-fast') const readPackageJson = promisify(require('read-package-json')) -const { Minipass } = require('minipass') +const Minipass = require('minipass') const cacheDir = require('./util/cache-dir.js') diff --git a/deps/npm/node_modules/pacote/lib/git.js b/deps/npm/node_modules/pacote/lib/git.js index 5d24f72497ec9e..1fa8b1f9663343 100644 --- a/deps/npm/node_modules/pacote/lib/git.js +++ b/deps/npm/node_modules/pacote/lib/git.js @@ -6,7 +6,7 @@ const hashre = /^[a-f0-9]{40}$/ const git = require('@npmcli/git') const pickManifest = require('npm-pick-manifest') const npa = require('npm-package-arg') -const { Minipass } = require('minipass') +const Minipass = require('minipass') const cacache = require('cacache') const log = require('proc-log') const npm = require('./util/npm.js') diff --git a/deps/npm/node_modules/pacote/lib/remote.js b/deps/npm/node_modules/pacote/lib/remote.js index fd617459fb0319..a361a9e89782e5 100644 --- a/deps/npm/node_modules/pacote/lib/remote.js +++ b/deps/npm/node_modules/pacote/lib/remote.js @@ -3,7 +3,7 @@ const FileFetcher = require('./file.js') const _tarballFromResolved = Symbol.for('pacote.Fetcher._tarballFromResolved') const pacoteVersion = require('../package.json').version const fetch = require('npm-registry-fetch') -const { Minipass } = require('minipass') +const Minipass = require('minipass') const _cacheFetches = Symbol.for('pacote.Fetcher._cacheFetches') const _headers = Symbol('_headers') diff --git a/deps/npm/node_modules/pacote/package.json b/deps/npm/node_modules/pacote/package.json index 48f2bb0ac3feef..8a89a1dd612c84 100644 --- a/deps/npm/node_modules/pacote/package.json +++ b/deps/npm/node_modules/pacote/package.json @@ -1,6 +1,6 @@ { "name": "pacote", - "version": "15.1.3", + "version": "15.1.1", "description": "JavaScript package downloader", "author": "GitHub Inc.", "bin": { @@ -27,7 +27,7 @@ "devDependencies": { "@npmcli/arborist": "^6.0.0 || ^6.0.0-pre.0", "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.14.1", + "@npmcli/template-oss": "4.11.4", "hosted-git-info": "^6.0.0", "mutate-fs": "^2.1.1", "nock": "^13.2.4", @@ -50,7 +50,7 @@ "@npmcli/run-script": "^6.0.0", "cacache": "^17.0.0", "fs-minipass": "^3.0.0", - "minipass": "^5.0.0", + "minipass": "^4.0.0", "npm-package-arg": "^10.0.0", "npm-packlist": "^7.0.0", "npm-pick-manifest": "^8.0.0", @@ -59,7 +59,7 @@ "promise-retry": "^2.0.1", "read-package-json": "^6.0.0", "read-package-json-fast": "^3.0.0", - "sigstore": "^1.3.0", + "sigstore": "^1.0.0", "ssri": "^10.0.0", "tar": "^6.1.11" }, @@ -72,8 +72,7 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.14.1", - "windowsCI": false, - "publish": "true" + "version": "4.11.4", + "windowsCI": false } } diff --git a/deps/npm/node_modules/path-key/index.js b/deps/npm/node_modules/path-key/index.js deleted file mode 100644 index 0cf6415d60938f..00000000000000 --- a/deps/npm/node_modules/path-key/index.js +++ /dev/null @@ -1,16 +0,0 @@ -'use strict'; - -const pathKey = (options = {}) => { - const environment = options.env || process.env; - const platform = options.platform || process.platform; - - if (platform !== 'win32') { - return 'PATH'; - } - - return Object.keys(environment).reverse().find(key => key.toUpperCase() === 'PATH') || 'Path'; -}; - -module.exports = pathKey; -// TODO: Remove this for the next major release -module.exports.default = pathKey; diff --git a/deps/npm/node_modules/path-key/license b/deps/npm/node_modules/path-key/license deleted file mode 100644 index e7af2f77107d73..00000000000000 --- a/deps/npm/node_modules/path-key/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/deps/npm/node_modules/path-key/package.json b/deps/npm/node_modules/path-key/package.json deleted file mode 100644 index c8cbd383afc955..00000000000000 --- a/deps/npm/node_modules/path-key/package.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "name": "path-key", - "version": "3.1.1", - "description": "Get the PATH environment variable key cross-platform", - "license": "MIT", - "repository": "sindresorhus/path-key", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=8" - }, - "scripts": { - "test": "xo && ava && tsd" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "keywords": [ - "path", - "key", - "environment", - "env", - "variable", - "var", - "get", - "cross-platform", - "windows" - ], - "devDependencies": { - "@types/node": "^11.13.0", - "ava": "^1.4.1", - "tsd": "^0.7.2", - "xo": "^0.24.0" - } -} 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..54901bd8ae578c 100644 --- a/deps/npm/node_modules/path-scurry/dist/cjs/index.js +++ b/deps/npm/node_modules/path-scurry/dist/cjs/index.js @@ -22,9 +22,12 @@ var __importStar = (this && this.__importStar) || function (mod) { __setModuleDefault(result, mod); return result; }; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; Object.defineProperty(exports, "__esModule", { value: true }); exports.PathScurry = exports.Path = exports.PathScurryDarwin = exports.PathScurryPosix = exports.PathScurryWin32 = exports.PathScurryBase = exports.PathPosix = exports.PathWin32 = exports.PathBase = exports.ChildrenCache = exports.ResolveCache = void 0; -const lru_cache_1 = require("lru-cache"); +const lru_cache_1 = __importDefault(require("lru-cache")); const path_1 = require("path"); const url_1 = require("url"); const actualFS = __importStar(require("fs")); @@ -33,7 +36,7 @@ const realpathSync = fs_1.realpathSync.native; // TODO: test perf of fs/promises realpath vs realpathCB, // since the promises one uses realpath.native const promises_1 = require("fs/promises"); -const minipass_1 = require("minipass"); +const minipass_1 = __importDefault(require("minipass")); const defaultFS = { lstatSync: fs_1.lstatSync, readdir: fs_1.readdir, @@ -128,7 +131,7 @@ const normalizeNocase = (s) => { * An LRUCache for storing resolved path strings or Path objects. * @internal */ -class ResolveCache extends lru_cache_1.LRUCache { +class ResolveCache extends lru_cache_1.default { constructor() { super({ max: 256 }); } @@ -149,7 +152,7 @@ exports.ResolveCache = ResolveCache; * an LRUCache for storing child entries. * @internal */ -class ChildrenCache extends lru_cache_1.LRUCache { +class ChildrenCache extends lru_cache_1.default { constructor(maxSize = 16 * 1024) { super({ maxSize, @@ -284,9 +287,7 @@ class PathBase { #matchName; #depth; #fullpath; - #fullpathPosix; #relative; - #relativePosix; #type; #children; #linkTarget; @@ -307,7 +308,6 @@ class PathBase { this.#children = children; this.#fullpath = opts.fullpath; this.#relative = opts.relative; - this.#relativePosix = opts.relativePosix; this.parent = opts.parent; if (this.parent) { this.#fs = this.parent.#fs; @@ -428,6 +428,8 @@ class PathBase { * The relative path from the cwd. If it does not share an ancestor with * the cwd, then this ends up being equivalent to the fullpath() */ + // TODO: instead of taking a param here, set it to '' in the constructor + // for the CWD, and set it to this.name for any roots. relative() { if (this.#relative !== undefined) { return this.#relative; @@ -441,26 +443,6 @@ class PathBase { const rp = pv + (!pv || !p.parent ? '' : this.sep) + name; return (this.#relative = rp); } - /** - * The relative path from the cwd, using / as the path separator. - * If it does not share an ancestor with - * the cwd, then this ends up being equivalent to the fullpathPosix() - * On posix systems, this is identical to relative(). - */ - relativePosix() { - if (this.sep === '/') - return this.relative(); - if (this.#relativePosix !== undefined) - return this.#relativePosix; - const name = this.name; - const p = this.parent; - if (!p) { - return (this.#relativePosix = this.fullpathPosix()); - } - const pv = p.relativePosix(); - const rp = pv + (!pv || !p.parent ? '' : '/') + name; - return (this.#relativePosix = rp); - } /** * The fully resolved path string for this Path entry */ @@ -477,31 +459,6 @@ class PathBase { const fp = pv + (!p.parent ? '' : this.sep) + name; return (this.#fullpath = fp); } - /** - * On platforms other than windows, this is identical to fullpath. - * - * On windows, this is overridden to return the forward-slash form of the - * full UNC path. - */ - fullpathPosix() { - if (this.#fullpathPosix !== undefined) - return this.#fullpathPosix; - if (this.sep === '/') - return (this.#fullpathPosix = this.fullpath()); - if (!this.parent) { - const p = this.fullpath().replace(/\\/g, '/'); - if (/^[a-z]:\//i.test(p)) { - return (this.#fullpathPosix = `//?/${p}`); - } - else { - return (this.#fullpathPosix = p); - } - } - const p = this.parent; - const pfpp = p.fullpathPosix(); - const fpp = pfpp + (!pfpp || !p.parent ? '' : '/') + this.name; - return (this.#fullpathPosix = fpp); - } /** * Is the Path of an unknown type? * @@ -1250,7 +1207,6 @@ class PathScurryBase { */ cwd; #resolveCache; - #resolvePosixCache; #children; /** * Perform path comparisons case-insensitively. @@ -1277,7 +1233,6 @@ class PathScurryBase { this.roots = Object.create(null); this.rootPath = this.parseRootPath(cwdPath); this.#resolveCache = new ResolveCache(); - this.#resolvePosixCache = new ResolveCache(); this.#children = new ChildrenCache(childrenCacheSize); const split = cwdPath.substring(this.rootPath.length).split(sep); // resolve('/') leaves '', splits to [''], we don't want that. @@ -1298,10 +1253,8 @@ class PathScurryBase { let abs = this.rootPath; let sawFirst = false; for (const part of split) { - const l = len--; prev = prev.child(part, { - relative: new Array(l).fill('..').join(joinSep), - relativePosix: new Array(l).fill('..').join('/'), + relative: new Array(len--).fill('..').join(joinSep), fullpath: (abs += (sawFirst ? '' : joinSep) + part), }); sawFirst = true; @@ -1356,38 +1309,6 @@ class PathScurryBase { this.#resolveCache.set(r, result); return result; } - /** - * Resolve one or more path strings to a resolved string, returning - * the posix path. Identical to .resolve() on posix systems, but on - * windows will return a forward-slash separated UNC path. - * - * Same interface as require('path').resolve. - * - * Much faster than path.resolve() when called multiple times for the same - * path, because the resolved Path objects are cached. Much slower - * otherwise. - */ - resolvePosix(...paths) { - // first figure out the minimum number of paths we have to test - // we always start at cwd, but any absolutes will bump the start - let r = ''; - for (let i = paths.length - 1; i >= 0; i--) { - const p = paths[i]; - if (!p || p === '.') - continue; - r = r ? `${p}/${r}` : p; - if (this.isAbsolute(p)) { - break; - } - } - const cached = this.#resolvePosixCache.get(r); - if (cached !== undefined) { - return cached; - } - const result = this.cwd.resolve(r).fullpathPosix(); - this.#resolvePosixCache.set(r, result); - return result; - } /** * find the relative path from the cwd to the supplied path string or entry */ @@ -1397,16 +1318,6 @@ class PathScurryBase { } return entry.relative(); } - /** - * find the relative path from the cwd to the supplied path string or - * entry, using / as the path delimiter, even on Windows. - */ - relativePosix(entry = this.cwd) { - if (typeof entry === 'string') { - entry = this.cwd.resolve(entry); - } - return entry.relativePosix(); - } /** * Return the basename for the provided string or Path object */ @@ -1716,7 +1627,7 @@ class PathScurryBase { entry = this.cwd; } const { withFileTypes = true, follow = false, filter, walkFilter, } = opts; - const results = new minipass_1.Minipass({ objectMode: true }); + const results = new minipass_1.default({ objectMode: true }); if (!filter || filter(entry)) { results.write(withFileTypes ? entry : entry.fullpath()); } @@ -1792,7 +1703,7 @@ class PathScurryBase { entry = this.cwd; } const { withFileTypes = true, follow = false, filter, walkFilter, } = opts; - const results = new minipass_1.Minipass({ objectMode: true }); + const results = new minipass_1.default({ objectMode: true }); const dirs = new Set(); if (!filter || filter(entry)) { results.write(withFileTypes ? entry : entry.fullpath()); 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..b6a2cf9c8a08e1 100644 --- a/deps/npm/node_modules/path-scurry/dist/mjs/index.js +++ b/deps/npm/node_modules/path-scurry/dist/mjs/index.js @@ -1,4 +1,4 @@ -import { LRUCache } from 'lru-cache'; +import LRUCache from 'lru-cache'; import { posix, win32 } from 'path'; import { fileURLToPath } from 'url'; import * as actualFS from 'fs'; @@ -7,7 +7,7 @@ const realpathSync = rps.native; // TODO: test perf of fs/promises realpath vs realpathCB, // since the promises one uses realpath.native import { lstat, readdir, readlink, realpath } from 'fs/promises'; -import { Minipass } from 'minipass'; +import Minipass from 'minipass'; const defaultFS = { lstatSync, readdir: readdirCB, @@ -256,9 +256,7 @@ export class PathBase { #matchName; #depth; #fullpath; - #fullpathPosix; #relative; - #relativePosix; #type; #children; #linkTarget; @@ -279,7 +277,6 @@ export class PathBase { this.#children = children; this.#fullpath = opts.fullpath; this.#relative = opts.relative; - this.#relativePosix = opts.relativePosix; this.parent = opts.parent; if (this.parent) { this.#fs = this.parent.#fs; @@ -400,6 +397,8 @@ export class PathBase { * The relative path from the cwd. If it does not share an ancestor with * the cwd, then this ends up being equivalent to the fullpath() */ + // TODO: instead of taking a param here, set it to '' in the constructor + // for the CWD, and set it to this.name for any roots. relative() { if (this.#relative !== undefined) { return this.#relative; @@ -413,26 +412,6 @@ export class PathBase { const rp = pv + (!pv || !p.parent ? '' : this.sep) + name; return (this.#relative = rp); } - /** - * The relative path from the cwd, using / as the path separator. - * If it does not share an ancestor with - * the cwd, then this ends up being equivalent to the fullpathPosix() - * On posix systems, this is identical to relative(). - */ - relativePosix() { - if (this.sep === '/') - return this.relative(); - if (this.#relativePosix !== undefined) - return this.#relativePosix; - const name = this.name; - const p = this.parent; - if (!p) { - return (this.#relativePosix = this.fullpathPosix()); - } - const pv = p.relativePosix(); - const rp = pv + (!pv || !p.parent ? '' : '/') + name; - return (this.#relativePosix = rp); - } /** * The fully resolved path string for this Path entry */ @@ -449,31 +428,6 @@ export class PathBase { const fp = pv + (!p.parent ? '' : this.sep) + name; return (this.#fullpath = fp); } - /** - * On platforms other than windows, this is identical to fullpath. - * - * On windows, this is overridden to return the forward-slash form of the - * full UNC path. - */ - fullpathPosix() { - if (this.#fullpathPosix !== undefined) - return this.#fullpathPosix; - if (this.sep === '/') - return (this.#fullpathPosix = this.fullpath()); - if (!this.parent) { - const p = this.fullpath().replace(/\\/g, '/'); - if (/^[a-z]:\//i.test(p)) { - return (this.#fullpathPosix = `//?/${p}`); - } - else { - return (this.#fullpathPosix = p); - } - } - const p = this.parent; - const pfpp = p.fullpathPosix(); - const fpp = pfpp + (!pfpp || !p.parent ? '' : '/') + this.name; - return (this.#fullpathPosix = fpp); - } /** * Is the Path of an unknown type? * @@ -1219,7 +1173,6 @@ export class PathScurryBase { */ cwd; #resolveCache; - #resolvePosixCache; #children; /** * Perform path comparisons case-insensitively. @@ -1246,7 +1199,6 @@ export class PathScurryBase { this.roots = Object.create(null); this.rootPath = this.parseRootPath(cwdPath); this.#resolveCache = new ResolveCache(); - this.#resolvePosixCache = new ResolveCache(); this.#children = new ChildrenCache(childrenCacheSize); const split = cwdPath.substring(this.rootPath.length).split(sep); // resolve('/') leaves '', splits to [''], we don't want that. @@ -1267,10 +1219,8 @@ export class PathScurryBase { let abs = this.rootPath; let sawFirst = false; for (const part of split) { - const l = len--; prev = prev.child(part, { - relative: new Array(l).fill('..').join(joinSep), - relativePosix: new Array(l).fill('..').join('/'), + relative: new Array(len--).fill('..').join(joinSep), fullpath: (abs += (sawFirst ? '' : joinSep) + part), }); sawFirst = true; @@ -1325,38 +1275,6 @@ export class PathScurryBase { this.#resolveCache.set(r, result); return result; } - /** - * Resolve one or more path strings to a resolved string, returning - * the posix path. Identical to .resolve() on posix systems, but on - * windows will return a forward-slash separated UNC path. - * - * Same interface as require('path').resolve. - * - * Much faster than path.resolve() when called multiple times for the same - * path, because the resolved Path objects are cached. Much slower - * otherwise. - */ - resolvePosix(...paths) { - // first figure out the minimum number of paths we have to test - // we always start at cwd, but any absolutes will bump the start - let r = ''; - for (let i = paths.length - 1; i >= 0; i--) { - const p = paths[i]; - if (!p || p === '.') - continue; - r = r ? `${p}/${r}` : p; - if (this.isAbsolute(p)) { - break; - } - } - const cached = this.#resolvePosixCache.get(r); - if (cached !== undefined) { - return cached; - } - const result = this.cwd.resolve(r).fullpathPosix(); - this.#resolvePosixCache.set(r, result); - return result; - } /** * find the relative path from the cwd to the supplied path string or entry */ @@ -1366,16 +1284,6 @@ export class PathScurryBase { } return entry.relative(); } - /** - * find the relative path from the cwd to the supplied path string or - * entry, using / as the path delimiter, even on Windows. - */ - relativePosix(entry = this.cwd) { - if (typeof entry === 'string') { - entry = this.cwd.resolve(entry); - } - return entry.relativePosix(); - } /** * Return the basename for the provided string or Path object */ diff --git a/deps/npm/node_modules/path-scurry/node_modules/lru-cache/LICENSE b/deps/npm/node_modules/path-scurry/node_modules/lru-cache/LICENSE deleted file mode 100644 index f785757cd63f86..00000000000000 --- a/deps/npm/node_modules/path-scurry/node_modules/lru-cache/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) 2010-2023 Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/deps/npm/node_modules/path-scurry/node_modules/lru-cache/dist/cjs/index.js b/deps/npm/node_modules/path-scurry/node_modules/lru-cache/dist/cjs/index.js deleted file mode 100644 index e6c4f909292b3f..00000000000000 --- a/deps/npm/node_modules/path-scurry/node_modules/lru-cache/dist/cjs/index.js +++ /dev/null @@ -1,1395 +0,0 @@ -"use strict"; -/** - * @module LRUCache - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.LRUCache = void 0; -const perf = typeof performance === 'object' && - performance && - typeof performance.now === 'function' - ? performance - : Date; -const warned = new Set(); -/* c8 ignore start */ -const PROCESS = (typeof process === 'object' && !!process ? process : {}); -/* c8 ignore start */ -const emitWarning = (msg, type, code, fn) => { - typeof PROCESS.emitWarning === 'function' - ? PROCESS.emitWarning(msg, type, code, fn) - : console.error(`[${code}] ${type}: ${msg}`); -}; -let AC = globalThis.AbortController; -let AS = globalThis.AbortSignal; -/* c8 ignore start */ -if (typeof AC === 'undefined') { - //@ts-ignore - AS = class AbortSignal { - onabort; - _onabort = []; - reason; - aborted = false; - addEventListener(_, fn) { - this._onabort.push(fn); - } - }; - //@ts-ignore - AC = class AbortController { - constructor() { - warnACPolyfill(); - } - signal = new AS(); - abort(reason) { - if (this.signal.aborted) - return; - //@ts-ignore - this.signal.reason = reason; - //@ts-ignore - this.signal.aborted = true; - //@ts-ignore - for (const fn of this.signal._onabort) { - fn(reason); - } - this.signal.onabort?.(reason); - } - }; - let printACPolyfillWarning = PROCESS.env?.LRU_CACHE_IGNORE_AC_WARNING !== '1'; - const warnACPolyfill = () => { - if (!printACPolyfillWarning) - return; - printACPolyfillWarning = false; - emitWarning('AbortController is not defined. If using lru-cache in ' + - 'node 14, load an AbortController polyfill from the ' + - '`node-abort-controller` package. A minimal polyfill is ' + - 'provided for use by LRUCache.fetch(), but it should not be ' + - 'relied upon in other contexts (eg, passing it to other APIs that ' + - 'use AbortController/AbortSignal might have undesirable effects). ' + - 'You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.', 'NO_ABORT_CONTROLLER', 'ENOTSUP', warnACPolyfill); - }; -} -/* c8 ignore stop */ -const shouldWarn = (code) => !warned.has(code); -const TYPE = Symbol('type'); -const isPosInt = (n) => n && n === Math.floor(n) && n > 0 && isFinite(n); -/* c8 ignore start */ -// This is a little bit ridiculous, tbh. -// The maximum array length is 2^32-1 or thereabouts on most JS impls. -// And well before that point, you're caching the entire world, I mean, -// that's ~32GB of just integers for the next/prev links, plus whatever -// else to hold that many keys and values. Just filling the memory with -// zeroes at init time is brutal when you get that big. -// But why not be complete? -// Maybe in the future, these limits will have expanded. -const getUintArray = (max) => !isPosInt(max) - ? null - : max <= Math.pow(2, 8) - ? Uint8Array - : max <= Math.pow(2, 16) - ? Uint16Array - : max <= Math.pow(2, 32) - ? Uint32Array - : max <= Number.MAX_SAFE_INTEGER - ? ZeroArray - : null; -/* c8 ignore stop */ -class ZeroArray extends Array { - constructor(size) { - super(size); - this.fill(0); - } -} -class Stack { - heap; - length; - // private constructor - static #constructing = false; - static create(max) { - const HeapCls = getUintArray(max); - if (!HeapCls) - return []; - Stack.#constructing = true; - const s = new Stack(max, HeapCls); - Stack.#constructing = false; - return s; - } - constructor(max, HeapCls) { - /* c8 ignore start */ - if (!Stack.#constructing) { - throw new TypeError('instantiate Stack using Stack.create(n)'); - } - /* c8 ignore stop */ - this.heap = new HeapCls(max); - this.length = 0; - } - push(n) { - this.heap[this.length++] = n; - } - pop() { - return this.heap[--this.length]; - } -} -/** - * Default export, the thing you're using this module to get. - * - * All properties from the options object (with the exception of - * {@link OptionsBase.max} and {@link OptionsBase.maxSize}) are added as - * normal public members. (`max` and `maxBase` are read-only getters.) - * Changing any of these will alter the defaults for subsequent method calls, - * but is otherwise safe. - */ -class LRUCache { - // properties coming in from the options of these, only max and maxSize - // really *need* to be protected. The rest can be modified, as they just - // set defaults for various methods. - #max; - #maxSize; - #dispose; - #disposeAfter; - #fetchMethod; - /** - * {@link LRUCache.OptionsBase.ttl} - */ - ttl; - /** - * {@link LRUCache.OptionsBase.ttlResolution} - */ - ttlResolution; - /** - * {@link LRUCache.OptionsBase.ttlAutopurge} - */ - ttlAutopurge; - /** - * {@link LRUCache.OptionsBase.updateAgeOnGet} - */ - updateAgeOnGet; - /** - * {@link LRUCache.OptionsBase.updateAgeOnHas} - */ - updateAgeOnHas; - /** - * {@link LRUCache.OptionsBase.allowStale} - */ - allowStale; - /** - * {@link LRUCache.OptionsBase.noDisposeOnSet} - */ - noDisposeOnSet; - /** - * {@link LRUCache.OptionsBase.noUpdateTTL} - */ - noUpdateTTL; - /** - * {@link LRUCache.OptionsBase.maxEntrySize} - */ - maxEntrySize; - /** - * {@link LRUCache.OptionsBase.sizeCalculation} - */ - sizeCalculation; - /** - * {@link LRUCache.OptionsBase.noDeleteOnFetchRejection} - */ - noDeleteOnFetchRejection; - /** - * {@link LRUCache.OptionsBase.noDeleteOnStaleGet} - */ - noDeleteOnStaleGet; - /** - * {@link LRUCache.OptionsBase.allowStaleOnFetchAbort} - */ - allowStaleOnFetchAbort; - /** - * {@link LRUCache.OptionsBase.allowStaleOnFetchRejection} - */ - allowStaleOnFetchRejection; - /** - * {@link LRUCache.OptionsBase.ignoreFetchAbort} - */ - ignoreFetchAbort; - // computed properties - #size; - #calculatedSize; - #keyMap; - #keyList; - #valList; - #next; - #prev; - #head; - #tail; - #free; - #disposed; - #sizes; - #starts; - #ttls; - #hasDispose; - #hasFetchMethod; - #hasDisposeAfter; - /** - * Do not call this method unless you need to inspect the - * inner workings of the cache. If anything returned by this - * object is modified in any way, strange breakage may occur. - * - * These fields are private for a reason! - * - * @internal - */ - static unsafeExposeInternals(c) { - return { - // properties - starts: c.#starts, - ttls: c.#ttls, - sizes: c.#sizes, - keyMap: c.#keyMap, - keyList: c.#keyList, - valList: c.#valList, - next: c.#next, - prev: c.#prev, - get head() { - return c.#head; - }, - get tail() { - return c.#tail; - }, - free: c.#free, - // methods - isBackgroundFetch: (p) => c.#isBackgroundFetch(p), - backgroundFetch: (k, index, options, context) => c.#backgroundFetch(k, index, options, context), - moveToTail: (index) => c.#moveToTail(index), - indexes: (options) => c.#indexes(options), - rindexes: (options) => c.#rindexes(options), - isStale: (index) => c.#isStale(index), - }; - } - // Protected read-only members - /** - * {@link LRUCache.OptionsBase.max} (read-only) - */ - get max() { - return this.#max; - } - /** - * {@link LRUCache.OptionsBase.maxSize} (read-only) - */ - get maxSize() { - return this.#maxSize; - } - /** - * The total computed size of items in the cache (read-only) - */ - get calculatedSize() { - return this.#calculatedSize; - } - /** - * The number of items stored in the cache (read-only) - */ - get size() { - return this.#size; - } - /** - * {@link LRUCache.OptionsBase.fetchMethod} (read-only) - */ - get fetchMethod() { - return this.#fetchMethod; - } - /** - * {@link LRUCache.OptionsBase.dispose} (read-only) - */ - get dispose() { - return this.#dispose; - } - /** - * {@link LRUCache.OptionsBase.disposeAfter} (read-only) - */ - get disposeAfter() { - return this.#disposeAfter; - } - constructor(options) { - const { max = 0, ttl, ttlResolution = 1, ttlAutopurge, updateAgeOnGet, updateAgeOnHas, allowStale, dispose, disposeAfter, noDisposeOnSet, noUpdateTTL, maxSize = 0, maxEntrySize = 0, sizeCalculation, fetchMethod, noDeleteOnFetchRejection, noDeleteOnStaleGet, allowStaleOnFetchRejection, allowStaleOnFetchAbort, ignoreFetchAbort, } = options; - if (max !== 0 && !isPosInt(max)) { - throw new TypeError('max option must be a nonnegative integer'); - } - const UintArray = max ? getUintArray(max) : Array; - if (!UintArray) { - throw new Error('invalid max value: ' + max); - } - this.#max = max; - this.#maxSize = maxSize; - this.maxEntrySize = maxEntrySize || this.#maxSize; - this.sizeCalculation = sizeCalculation; - if (this.sizeCalculation) { - if (!this.#maxSize && !this.maxEntrySize) { - throw new TypeError('cannot set sizeCalculation without setting maxSize or maxEntrySize'); - } - if (typeof this.sizeCalculation !== 'function') { - throw new TypeError('sizeCalculation set to non-function'); - } - } - if (fetchMethod !== undefined && - typeof fetchMethod !== 'function') { - throw new TypeError('fetchMethod must be a function if specified'); - } - this.#fetchMethod = fetchMethod; - this.#hasFetchMethod = !!fetchMethod; - this.#keyMap = new Map(); - this.#keyList = new Array(max).fill(undefined); - this.#valList = new Array(max).fill(undefined); - this.#next = new UintArray(max); - this.#prev = new UintArray(max); - this.#head = 0; - this.#tail = 0; - this.#free = Stack.create(max); - this.#size = 0; - this.#calculatedSize = 0; - if (typeof dispose === 'function') { - this.#dispose = dispose; - } - if (typeof disposeAfter === 'function') { - this.#disposeAfter = disposeAfter; - this.#disposed = []; - } - else { - this.#disposeAfter = undefined; - this.#disposed = undefined; - } - this.#hasDispose = !!this.#dispose; - this.#hasDisposeAfter = !!this.#disposeAfter; - this.noDisposeOnSet = !!noDisposeOnSet; - this.noUpdateTTL = !!noUpdateTTL; - this.noDeleteOnFetchRejection = !!noDeleteOnFetchRejection; - this.allowStaleOnFetchRejection = !!allowStaleOnFetchRejection; - this.allowStaleOnFetchAbort = !!allowStaleOnFetchAbort; - this.ignoreFetchAbort = !!ignoreFetchAbort; - // NB: maxEntrySize is set to maxSize if it's set - if (this.maxEntrySize !== 0) { - if (this.#maxSize !== 0) { - if (!isPosInt(this.#maxSize)) { - throw new TypeError('maxSize must be a positive integer if specified'); - } - } - if (!isPosInt(this.maxEntrySize)) { - throw new TypeError('maxEntrySize must be a positive integer if specified'); - } - this.#initializeSizeTracking(); - } - this.allowStale = !!allowStale; - this.noDeleteOnStaleGet = !!noDeleteOnStaleGet; - this.updateAgeOnGet = !!updateAgeOnGet; - this.updateAgeOnHas = !!updateAgeOnHas; - this.ttlResolution = - isPosInt(ttlResolution) || ttlResolution === 0 - ? ttlResolution - : 1; - this.ttlAutopurge = !!ttlAutopurge; - this.ttl = ttl || 0; - if (this.ttl) { - if (!isPosInt(this.ttl)) { - throw new TypeError('ttl must be a positive integer if specified'); - } - this.#initializeTTLTracking(); - } - // do not allow completely unbounded caches - if (this.#max === 0 && this.ttl === 0 && this.#maxSize === 0) { - throw new TypeError('At least one of max, maxSize, or ttl is required'); - } - if (!this.ttlAutopurge && !this.#max && !this.#maxSize) { - const code = 'LRU_CACHE_UNBOUNDED'; - if (shouldWarn(code)) { - warned.add(code); - const msg = 'TTL caching without ttlAutopurge, max, or maxSize can ' + - 'result in unbounded memory consumption.'; - emitWarning(msg, 'UnboundedCacheWarning', code, LRUCache); - } - } - } - /** - * Return the remaining TTL time for a given entry key - */ - getRemainingTTL(key) { - return this.#keyMap.has(key) ? Infinity : 0; - } - #initializeTTLTracking() { - const ttls = new ZeroArray(this.#max); - const starts = new ZeroArray(this.#max); - this.#ttls = ttls; - this.#starts = starts; - this.#setItemTTL = (index, ttl, start = perf.now()) => { - starts[index] = ttl !== 0 ? start : 0; - ttls[index] = ttl; - if (ttl !== 0 && this.ttlAutopurge) { - const t = setTimeout(() => { - if (this.#isStale(index)) { - this.delete(this.#keyList[index]); - } - }, ttl + 1); - // unref() not supported on all platforms - /* c8 ignore start */ - if (t.unref) { - t.unref(); - } - /* c8 ignore stop */ - } - }; - this.#updateItemAge = index => { - starts[index] = ttls[index] !== 0 ? perf.now() : 0; - }; - this.#statusTTL = (status, index) => { - if (ttls[index]) { - const ttl = ttls[index]; - const start = starts[index]; - status.ttl = ttl; - status.start = start; - status.now = cachedNow || getNow(); - const age = status.now - start; - status.remainingTTL = ttl - age; - } - }; - // debounce calls to perf.now() to 1s so we're not hitting - // that costly call repeatedly. - let cachedNow = 0; - const getNow = () => { - const n = perf.now(); - if (this.ttlResolution > 0) { - cachedNow = n; - const t = setTimeout(() => (cachedNow = 0), this.ttlResolution); - // not available on all platforms - /* c8 ignore start */ - if (t.unref) { - t.unref(); - } - /* c8 ignore stop */ - } - return n; - }; - this.getRemainingTTL = key => { - const index = this.#keyMap.get(key); - if (index === undefined) { - return 0; - } - const ttl = ttls[index]; - const start = starts[index]; - if (ttl === 0 || start === 0) { - return Infinity; - } - const age = (cachedNow || getNow()) - start; - return ttl - age; - }; - this.#isStale = index => { - return (ttls[index] !== 0 && - starts[index] !== 0 && - (cachedNow || getNow()) - starts[index] > ttls[index]); - }; - } - // conditionally set private methods related to TTL - #updateItemAge = () => { }; - #statusTTL = () => { }; - #setItemTTL = () => { }; - /* c8 ignore stop */ - #isStale = () => false; - #initializeSizeTracking() { - const sizes = new ZeroArray(this.#max); - this.#calculatedSize = 0; - this.#sizes = sizes; - this.#removeItemSize = index => { - this.#calculatedSize -= sizes[index]; - sizes[index] = 0; - }; - this.#requireSize = (k, v, size, sizeCalculation) => { - // provisionally accept background fetches. - // actual value size will be checked when they return. - if (this.#isBackgroundFetch(v)) { - return 0; - } - if (!isPosInt(size)) { - if (sizeCalculation) { - if (typeof sizeCalculation !== 'function') { - throw new TypeError('sizeCalculation must be a function'); - } - size = sizeCalculation(v, k); - if (!isPosInt(size)) { - throw new TypeError('sizeCalculation return invalid (expect positive integer)'); - } - } - else { - throw new TypeError('invalid size value (must be positive integer). ' + - 'When maxSize or maxEntrySize is used, sizeCalculation ' + - 'or size must be set.'); - } - } - return size; - }; - this.#addItemSize = (index, size, status) => { - sizes[index] = size; - if (this.#maxSize) { - const maxSize = this.#maxSize - sizes[index]; - while (this.#calculatedSize > maxSize) { - this.#evict(true); - } - } - this.#calculatedSize += sizes[index]; - if (status) { - status.entrySize = size; - status.totalCalculatedSize = this.#calculatedSize; - } - }; - } - #removeItemSize = _i => { }; - #addItemSize = (_i, _s, _st) => { }; - #requireSize = (_k, _v, size, sizeCalculation) => { - if (size || sizeCalculation) { - throw new TypeError('cannot set size without setting maxSize or maxEntrySize on cache'); - } - return 0; - }; - *#indexes({ allowStale = this.allowStale } = {}) { - if (this.#size) { - for (let i = this.#tail; true;) { - if (!this.#isValidIndex(i)) { - break; - } - if (allowStale || !this.#isStale(i)) { - yield i; - } - if (i === this.#head) { - break; - } - else { - i = this.#prev[i]; - } - } - } - } - *#rindexes({ allowStale = this.allowStale } = {}) { - if (this.#size) { - for (let i = this.#head; true;) { - if (!this.#isValidIndex(i)) { - break; - } - if (allowStale || !this.#isStale(i)) { - yield i; - } - if (i === this.#tail) { - break; - } - else { - i = this.#next[i]; - } - } - } - } - #isValidIndex(index) { - return (index !== undefined && - this.#keyMap.get(this.#keyList[index]) === index); - } - /** - * Return a generator yielding `[key, value]` pairs, - * in order from most recently used to least recently used. - */ - *entries() { - for (const i of this.#indexes()) { - if (this.#valList[i] !== undefined && - this.#keyList[i] !== undefined && - !this.#isBackgroundFetch(this.#valList[i])) { - yield [this.#keyList[i], this.#valList[i]]; - } - } - } - /** - * Inverse order version of {@link LRUCache.entries} - * - * Return a generator yielding `[key, value]` pairs, - * in order from least recently used to most recently used. - */ - *rentries() { - for (const i of this.#rindexes()) { - if (this.#valList[i] !== undefined && - this.#keyList[i] !== undefined && - !this.#isBackgroundFetch(this.#valList[i])) { - yield [this.#keyList[i], this.#valList[i]]; - } - } - } - /** - * Return a generator yielding the keys in the cache, - * in order from most recently used to least recently used. - */ - *keys() { - for (const i of this.#indexes()) { - const k = this.#keyList[i]; - if (k !== undefined && - !this.#isBackgroundFetch(this.#valList[i])) { - yield k; - } - } - } - /** - * Inverse order version of {@link LRUCache.keys} - * - * Return a generator yielding the keys in the cache, - * in order from least recently used to most recently used. - */ - *rkeys() { - for (const i of this.#rindexes()) { - const k = this.#keyList[i]; - if (k !== undefined && - !this.#isBackgroundFetch(this.#valList[i])) { - yield k; - } - } - } - /** - * Return a generator yielding the values in the cache, - * in order from most recently used to least recently used. - */ - *values() { - for (const i of this.#indexes()) { - const v = this.#valList[i]; - if (v !== undefined && - !this.#isBackgroundFetch(this.#valList[i])) { - yield this.#valList[i]; - } - } - } - /** - * Inverse order version of {@link LRUCache.values} - * - * Return a generator yielding the values in the cache, - * in order from least recently used to most recently used. - */ - *rvalues() { - for (const i of this.#rindexes()) { - const v = this.#valList[i]; - if (v !== undefined && - !this.#isBackgroundFetch(this.#valList[i])) { - yield this.#valList[i]; - } - } - } - /** - * Iterating over the cache itself yields the same results as - * {@link LRUCache.entries} - */ - [Symbol.iterator]() { - return this.entries(); - } - /** - * Find a value for which the supplied fn method returns a truthy value, - * similar to Array.find(). fn is called as fn(value, key, cache). - */ - find(fn, getOptions = {}) { - for (const i of this.#indexes()) { - const v = this.#valList[i]; - const value = this.#isBackgroundFetch(v) - ? v.__staleWhileFetching - : v; - if (value === undefined) - continue; - if (fn(value, this.#keyList[i], this)) { - return this.get(this.#keyList[i], getOptions); - } - } - } - /** - * Call the supplied function on each item in the cache, in order from - * most recently used to least recently used. fn is called as - * fn(value, key, cache). Does not update age or recenty of use. - * Does not iterate over stale values. - */ - forEach(fn, thisp = this) { - for (const i of this.#indexes()) { - const v = this.#valList[i]; - const value = this.#isBackgroundFetch(v) - ? v.__staleWhileFetching - : v; - if (value === undefined) - continue; - fn.call(thisp, value, this.#keyList[i], this); - } - } - /** - * The same as {@link LRUCache.forEach} but items are iterated over in - * reverse order. (ie, less recently used items are iterated over first.) - */ - rforEach(fn, thisp = this) { - for (const i of this.#rindexes()) { - const v = this.#valList[i]; - const value = this.#isBackgroundFetch(v) - ? v.__staleWhileFetching - : v; - if (value === undefined) - continue; - fn.call(thisp, value, this.#keyList[i], this); - } - } - /** - * Delete any stale entries. Returns true if anything was removed, - * false otherwise. - */ - purgeStale() { - let deleted = false; - for (const i of this.#rindexes({ allowStale: true })) { - if (this.#isStale(i)) { - this.delete(this.#keyList[i]); - deleted = true; - } - } - return deleted; - } - /** - * Return an array of [key, {@link LRUCache.Entry}] tuples which can be - * passed to cache.load() - */ - dump() { - const arr = []; - for (const i of this.#indexes({ allowStale: true })) { - const key = this.#keyList[i]; - const v = this.#valList[i]; - const value = this.#isBackgroundFetch(v) - ? v.__staleWhileFetching - : v; - if (value === undefined || key === undefined) - continue; - const entry = { value }; - if (this.#ttls && this.#starts) { - entry.ttl = this.#ttls[i]; - // always dump the start relative to a portable timestamp - // it's ok for this to be a bit slow, it's a rare operation. - const age = perf.now() - this.#starts[i]; - entry.start = Math.floor(Date.now() - age); - } - if (this.#sizes) { - entry.size = this.#sizes[i]; - } - arr.unshift([key, entry]); - } - return arr; - } - /** - * Reset the cache and load in the items in entries in the order listed. - * Note that the shape of the resulting cache may be different if the - * same options are not used in both caches. - */ - load(arr) { - this.clear(); - for (const [key, entry] of arr) { - if (entry.start) { - // entry.start is a portable timestamp, but we may be using - // node's performance.now(), so calculate the offset, so that - // we get the intended remaining TTL, no matter how long it's - // been on ice. - // - // it's ok for this to be a bit slow, it's a rare operation. - const age = Date.now() - entry.start; - entry.start = perf.now() - age; - } - this.set(key, entry.value, entry); - } - } - /** - * Add a value to the cache. - * - * Note: if `undefined` is specified as a value, this is an alias for - * {@link LRUCache#delete} - */ - set(k, v, setOptions = {}) { - if (v === undefined) { - this.delete(k); - return this; - } - const { ttl = this.ttl, start, noDisposeOnSet = this.noDisposeOnSet, sizeCalculation = this.sizeCalculation, status, } = setOptions; - let { noUpdateTTL = this.noUpdateTTL } = setOptions; - const size = this.#requireSize(k, v, setOptions.size || 0, sizeCalculation); - // if the item doesn't fit, don't do anything - // NB: maxEntrySize set to maxSize by default - if (this.maxEntrySize && size > this.maxEntrySize) { - if (status) { - status.set = 'miss'; - status.maxEntrySizeExceeded = true; - } - // have to delete, in case something is there already. - this.delete(k); - return this; - } - let index = this.#size === 0 ? undefined : this.#keyMap.get(k); - if (index === undefined) { - // addition - index = (this.#size === 0 - ? this.#tail - : this.#free.length !== 0 - ? this.#free.pop() - : this.#size === this.#max - ? this.#evict(false) - : this.#size); - this.#keyList[index] = k; - this.#valList[index] = v; - this.#keyMap.set(k, index); - this.#next[this.#tail] = index; - this.#prev[index] = this.#tail; - this.#tail = index; - this.#size++; - this.#addItemSize(index, size, status); - if (status) - status.set = 'add'; - noUpdateTTL = false; - } - else { - // update - this.#moveToTail(index); - const oldVal = this.#valList[index]; - if (v !== oldVal) { - if (this.#hasFetchMethod && this.#isBackgroundFetch(oldVal)) { - oldVal.__abortController.abort(new Error('replaced')); - } - else if (!noDisposeOnSet) { - if (this.#hasDispose) { - this.#dispose?.(oldVal, k, 'set'); - } - if (this.#hasDisposeAfter) { - this.#disposed?.push([oldVal, k, 'set']); - } - } - this.#removeItemSize(index); - this.#addItemSize(index, size, status); - this.#valList[index] = v; - if (status) { - status.set = 'replace'; - const oldValue = oldVal && this.#isBackgroundFetch(oldVal) - ? oldVal.__staleWhileFetching - : oldVal; - if (oldValue !== undefined) - status.oldValue = oldValue; - } - } - else if (status) { - status.set = 'update'; - } - } - if (ttl !== 0 && !this.#ttls) { - this.#initializeTTLTracking(); - } - if (this.#ttls) { - if (!noUpdateTTL) { - this.#setItemTTL(index, ttl, start); - } - if (status) - this.#statusTTL(status, index); - } - if (!noDisposeOnSet && this.#hasDisposeAfter && this.#disposed) { - const dt = this.#disposed; - let task; - while ((task = dt?.shift())) { - this.#disposeAfter?.(...task); - } - } - return this; - } - /** - * Evict the least recently used item, returning its value or - * `undefined` if cache is empty. - */ - pop() { - try { - while (this.#size) { - const val = this.#valList[this.#head]; - this.#evict(true); - if (this.#isBackgroundFetch(val)) { - if (val.__staleWhileFetching) { - return val.__staleWhileFetching; - } - } - else if (val !== undefined) { - return val; - } - } - } - finally { - if (this.#hasDisposeAfter && this.#disposed) { - const dt = this.#disposed; - let task; - while ((task = dt?.shift())) { - this.#disposeAfter?.(...task); - } - } - } - } - #evict(free) { - const head = this.#head; - const k = this.#keyList[head]; - const v = this.#valList[head]; - if (this.#hasFetchMethod && this.#isBackgroundFetch(v)) { - v.__abortController.abort(new Error('evicted')); - } - else if (this.#hasDispose || this.#hasDisposeAfter) { - if (this.#hasDispose) { - this.#dispose?.(v, k, 'evict'); - } - if (this.#hasDisposeAfter) { - this.#disposed?.push([v, k, 'evict']); - } - } - this.#removeItemSize(head); - // if we aren't about to use the index, then null these out - if (free) { - this.#keyList[head] = undefined; - this.#valList[head] = undefined; - this.#free.push(head); - } - if (this.#size === 1) { - this.#head = this.#tail = 0; - this.#free.length = 0; - } - else { - this.#head = this.#next[head]; - } - this.#keyMap.delete(k); - this.#size--; - return head; - } - /** - * Check if a key is in the cache, without updating the recency of use. - * Will return false if the item is stale, even though it is technically - * in the cache. - * - * Will not update item age unless - * {@link LRUCache.OptionsBase.updateAgeOnHas} is set. - */ - has(k, hasOptions = {}) { - const { updateAgeOnHas = this.updateAgeOnHas, status } = hasOptions; - const index = this.#keyMap.get(k); - if (index !== undefined) { - const v = this.#valList[index]; - if (this.#isBackgroundFetch(v) && - v.__staleWhileFetching === undefined) { - return false; - } - if (!this.#isStale(index)) { - if (updateAgeOnHas) { - this.#updateItemAge(index); - } - if (status) { - status.has = 'hit'; - this.#statusTTL(status, index); - } - return true; - } - else if (status) { - status.has = 'stale'; - this.#statusTTL(status, index); - } - } - else if (status) { - status.has = 'miss'; - } - return false; - } - /** - * Like {@link LRUCache#get} but doesn't update recency or delete stale - * items. - * - * Returns `undefined` if the item is stale, unless - * {@link LRUCache.OptionsBase.allowStale} is set. - */ - peek(k, peekOptions = {}) { - const { allowStale = this.allowStale } = peekOptions; - const index = this.#keyMap.get(k); - if (index !== undefined && - (allowStale || !this.#isStale(index))) { - const v = this.#valList[index]; - // either stale and allowed, or forcing a refresh of non-stale value - return this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v; - } - } - #backgroundFetch(k, index, options, context) { - const v = index === undefined ? undefined : this.#valList[index]; - if (this.#isBackgroundFetch(v)) { - return v; - } - const ac = new AC(); - const { signal } = options; - // when/if our AC signals, then stop listening to theirs. - signal?.addEventListener('abort', () => ac.abort(signal.reason), { - signal: ac.signal, - }); - const fetchOpts = { - signal: ac.signal, - options, - context, - }; - const cb = (v, updateCache = false) => { - const { aborted } = ac.signal; - const ignoreAbort = options.ignoreFetchAbort && v !== undefined; - if (options.status) { - if (aborted && !updateCache) { - options.status.fetchAborted = true; - options.status.fetchError = ac.signal.reason; - if (ignoreAbort) - options.status.fetchAbortIgnored = true; - } - else { - options.status.fetchResolved = true; - } - } - if (aborted && !ignoreAbort && !updateCache) { - return fetchFail(ac.signal.reason); - } - // either we didn't abort, and are still here, or we did, and ignored - const bf = p; - if (this.#valList[index] === p) { - if (v === undefined) { - if (bf.__staleWhileFetching) { - this.#valList[index] = bf.__staleWhileFetching; - } - else { - this.delete(k); - } - } - else { - if (options.status) - options.status.fetchUpdated = true; - this.set(k, v, fetchOpts.options); - } - } - return v; - }; - const eb = (er) => { - if (options.status) { - options.status.fetchRejected = true; - options.status.fetchError = er; - } - return fetchFail(er); - }; - const fetchFail = (er) => { - const { aborted } = ac.signal; - const allowStaleAborted = aborted && options.allowStaleOnFetchAbort; - const allowStale = allowStaleAborted || options.allowStaleOnFetchRejection; - const noDelete = allowStale || options.noDeleteOnFetchRejection; - const bf = p; - if (this.#valList[index] === p) { - // if we allow stale on fetch rejections, then we need to ensure that - // the stale value is not removed from the cache when the fetch fails. - const del = !noDelete || bf.__staleWhileFetching === undefined; - if (del) { - this.delete(k); - } - else if (!allowStaleAborted) { - // still replace the *promise* with the stale value, - // since we are done with the promise at this point. - // leave it untouched if we're still waiting for an - // aborted background fetch that hasn't yet returned. - this.#valList[index] = bf.__staleWhileFetching; - } - } - if (allowStale) { - if (options.status && bf.__staleWhileFetching !== undefined) { - options.status.returnedStale = true; - } - return bf.__staleWhileFetching; - } - else if (bf.__returned === bf) { - throw er; - } - }; - const pcall = (res, rej) => { - const fmp = this.#fetchMethod?.(k, v, fetchOpts); - if (fmp && fmp instanceof Promise) { - fmp.then(v => res(v), rej); - } - // ignored, we go until we finish, regardless. - // defer check until we are actually aborting, - // so fetchMethod can override. - ac.signal.addEventListener('abort', () => { - if (!options.ignoreFetchAbort || - options.allowStaleOnFetchAbort) { - res(); - // when it eventually resolves, update the cache. - if (options.allowStaleOnFetchAbort) { - res = v => cb(v, true); - } - } - }); - }; - if (options.status) - options.status.fetchDispatched = true; - const p = new Promise(pcall).then(cb, eb); - const bf = Object.assign(p, { - __abortController: ac, - __staleWhileFetching: v, - __returned: undefined, - }); - if (index === undefined) { - // internal, don't expose status. - this.set(k, bf, { ...fetchOpts.options, status: undefined }); - index = this.#keyMap.get(k); - } - else { - this.#valList[index] = bf; - } - return bf; - } - #isBackgroundFetch(p) { - if (!this.#hasFetchMethod) - return false; - const b = p; - return (!!b && - b instanceof Promise && - b.hasOwnProperty('__staleWhileFetching') && - b.__abortController instanceof AC); - } - async fetch(k, fetchOptions = {}) { - const { - // get options - allowStale = this.allowStale, updateAgeOnGet = this.updateAgeOnGet, noDeleteOnStaleGet = this.noDeleteOnStaleGet, - // set options - ttl = this.ttl, noDisposeOnSet = this.noDisposeOnSet, size = 0, sizeCalculation = this.sizeCalculation, noUpdateTTL = this.noUpdateTTL, - // fetch exclusive options - noDeleteOnFetchRejection = this.noDeleteOnFetchRejection, allowStaleOnFetchRejection = this.allowStaleOnFetchRejection, ignoreFetchAbort = this.ignoreFetchAbort, allowStaleOnFetchAbort = this.allowStaleOnFetchAbort, context, forceRefresh = false, status, signal, } = fetchOptions; - if (!this.#hasFetchMethod) { - if (status) - status.fetch = 'get'; - return this.get(k, { - allowStale, - updateAgeOnGet, - noDeleteOnStaleGet, - status, - }); - } - const options = { - allowStale, - updateAgeOnGet, - noDeleteOnStaleGet, - ttl, - noDisposeOnSet, - size, - sizeCalculation, - noUpdateTTL, - noDeleteOnFetchRejection, - allowStaleOnFetchRejection, - allowStaleOnFetchAbort, - ignoreFetchAbort, - status, - signal, - }; - let index = this.#keyMap.get(k); - if (index === undefined) { - if (status) - status.fetch = 'miss'; - const p = this.#backgroundFetch(k, index, options, context); - return (p.__returned = p); - } - else { - // in cache, maybe already fetching - const v = this.#valList[index]; - if (this.#isBackgroundFetch(v)) { - const stale = allowStale && v.__staleWhileFetching !== undefined; - if (status) { - status.fetch = 'inflight'; - if (stale) - status.returnedStale = true; - } - return stale ? v.__staleWhileFetching : (v.__returned = v); - } - // if we force a refresh, that means do NOT serve the cached value, - // unless we are already in the process of refreshing the cache. - const isStale = this.#isStale(index); - if (!forceRefresh && !isStale) { - if (status) - status.fetch = 'hit'; - this.#moveToTail(index); - if (updateAgeOnGet) { - this.#updateItemAge(index); - } - if (status) - this.#statusTTL(status, index); - return v; - } - // ok, it is stale or a forced refresh, and not already fetching. - // refresh the cache. - const p = this.#backgroundFetch(k, index, options, context); - const hasStale = p.__staleWhileFetching !== undefined; - const staleVal = hasStale && allowStale; - if (status) { - status.fetch = isStale ? 'stale' : 'refresh'; - if (staleVal && isStale) - status.returnedStale = true; - } - return staleVal ? p.__staleWhileFetching : (p.__returned = p); - } - } - /** - * Return a value from the cache. Will update the recency of the cache - * entry found. - * - * If the key is not found, get() will return `undefined`. - */ - get(k, getOptions = {}) { - const { allowStale = this.allowStale, updateAgeOnGet = this.updateAgeOnGet, noDeleteOnStaleGet = this.noDeleteOnStaleGet, status, } = getOptions; - const index = this.#keyMap.get(k); - if (index !== undefined) { - const value = this.#valList[index]; - const fetching = this.#isBackgroundFetch(value); - if (status) - this.#statusTTL(status, index); - if (this.#isStale(index)) { - if (status) - status.get = 'stale'; - // delete only if not an in-flight background fetch - if (!fetching) { - if (!noDeleteOnStaleGet) { - this.delete(k); - } - if (status && allowStale) - status.returnedStale = true; - return allowStale ? value : undefined; - } - else { - if (status && - allowStale && - value.__staleWhileFetching !== undefined) { - status.returnedStale = true; - } - return allowStale ? value.__staleWhileFetching : undefined; - } - } - else { - if (status) - status.get = 'hit'; - // if we're currently fetching it, we don't actually have it yet - // it's not stale, which means this isn't a staleWhileRefetching. - // If it's not stale, and fetching, AND has a __staleWhileFetching - // value, then that means the user fetched with {forceRefresh:true}, - // so it's safe to return that value. - if (fetching) { - return value.__staleWhileFetching; - } - this.#moveToTail(index); - if (updateAgeOnGet) { - this.#updateItemAge(index); - } - return value; - } - } - else if (status) { - status.get = 'miss'; - } - } - #connect(p, n) { - this.#prev[n] = p; - this.#next[p] = n; - } - #moveToTail(index) { - // if tail already, nothing to do - // if head, move head to next[index] - // else - // move next[prev[index]] to next[index] (head has no prev) - // move prev[next[index]] to prev[index] - // prev[index] = tail - // next[tail] = index - // tail = index - if (index !== this.#tail) { - if (index === this.#head) { - this.#head = this.#next[index]; - } - else { - this.#connect(this.#prev[index], this.#next[index]); - } - this.#connect(this.#tail, index); - this.#tail = index; - } - } - /** - * Deletes a key out of the cache. - * Returns true if the key was deleted, false otherwise. - */ - delete(k) { - let deleted = false; - if (this.#size !== 0) { - const index = this.#keyMap.get(k); - if (index !== undefined) { - deleted = true; - if (this.#size === 1) { - this.clear(); - } - else { - this.#removeItemSize(index); - const v = this.#valList[index]; - if (this.#isBackgroundFetch(v)) { - v.__abortController.abort(new Error('deleted')); - } - else if (this.#hasDispose || this.#hasDisposeAfter) { - if (this.#hasDispose) { - this.#dispose?.(v, k, 'delete'); - } - if (this.#hasDisposeAfter) { - this.#disposed?.push([v, k, 'delete']); - } - } - this.#keyMap.delete(k); - this.#keyList[index] = undefined; - this.#valList[index] = undefined; - if (index === this.#tail) { - this.#tail = this.#prev[index]; - } - else if (index === this.#head) { - this.#head = this.#next[index]; - } - else { - this.#next[this.#prev[index]] = this.#next[index]; - this.#prev[this.#next[index]] = this.#prev[index]; - } - this.#size--; - this.#free.push(index); - } - } - } - if (this.#hasDisposeAfter && this.#disposed?.length) { - const dt = this.#disposed; - let task; - while ((task = dt?.shift())) { - this.#disposeAfter?.(...task); - } - } - return deleted; - } - /** - * Clear the cache entirely, throwing away all values. - */ - clear() { - for (const index of this.#rindexes({ allowStale: true })) { - const v = this.#valList[index]; - if (this.#isBackgroundFetch(v)) { - v.__abortController.abort(new Error('deleted')); - } - else { - const k = this.#keyList[index]; - if (this.#hasDispose) { - this.#dispose?.(v, k, 'delete'); - } - if (this.#hasDisposeAfter) { - this.#disposed?.push([v, k, 'delete']); - } - } - } - this.#keyMap.clear(); - this.#valList.fill(undefined); - this.#keyList.fill(undefined); - if (this.#ttls && this.#starts) { - this.#ttls.fill(0); - this.#starts.fill(0); - } - if (this.#sizes) { - this.#sizes.fill(0); - } - this.#head = 0; - this.#tail = 0; - this.#free.length = 0; - this.#calculatedSize = 0; - this.#size = 0; - if (this.#hasDisposeAfter && this.#disposed) { - const dt = this.#disposed; - let task; - while ((task = dt?.shift())) { - this.#disposeAfter?.(...task); - } - } - } -} -exports.LRUCache = LRUCache; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/deps/npm/node_modules/path-scurry/node_modules/lru-cache/dist/cjs/index.min.js b/deps/npm/node_modules/path-scurry/node_modules/lru-cache/dist/cjs/index.min.js deleted file mode 100644 index d854bf570d346c..00000000000000 --- a/deps/npm/node_modules/path-scurry/node_modules/lru-cache/dist/cjs/index.min.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict";var x=(o,t,e)=>{if(!t.has(o))throw TypeError("Cannot "+e)};var j=(o,t,e)=>(x(o,t,"read from private field"),e?e.call(o):t.get(o)),I=(o,t,e)=>{if(t.has(o))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(o):t.set(o,e)},D=(o,t,e,i)=>(x(o,t,"write to private field"),i?i.call(o,e):t.set(o,e),e);Object.defineProperty(exports,"__esModule",{value:!0});exports.LRUCache=void 0;var v=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,N=new Set,L=typeof process=="object"&&process?process:{},P=(o,t,e,i)=>{typeof L.emitWarning=="function"?L.emitWarning(o,t,e,i):console.error(`[${e}] ${t}: ${o}`)},W=globalThis.AbortController,M=globalThis.AbortSignal;if(typeof W>"u"){M=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(i,s){this._onabort.push(s)}},W=class{constructor(){t()}signal=new M;abort(i){if(!this.signal.aborted){this.signal.reason=i,this.signal.aborted=!0;for(let s of this.signal._onabort)s(i);this.signal.onabort?.(i)}}};let o=L.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",t=()=>{o&&(o=!1,P("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",t))}}var V=o=>!N.has(o),Y=Symbol("type"),m=o=>o&&o===Math.floor(o)&&o>0&&isFinite(o),k=o=>m(o)?o<=Math.pow(2,8)?Uint8Array:o<=Math.pow(2,16)?Uint16Array:o<=Math.pow(2,32)?Uint32Array:o<=Number.MAX_SAFE_INTEGER?z:null:null,z=class extends Array{constructor(t){super(t),this.fill(0)}},E,T=class{heap;length;static create(t){let e=k(t);if(!e)return[];D(T,E,!0);let i=new T(t,e);return D(T,E,!1),i}constructor(t,e){if(!j(T,E))throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new e(t),this.length=0}push(t){this.heap[this.length++]=t}pop(){return this.heap[--this.length]}},R=T;E=new WeakMap,I(R,E,!1);var C=class{#d;#f;#_;#g;#C;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#s;#p;#n;#i;#t;#l;#c;#o;#h;#w;#r;#m;#F;#S;#b;#T;#a;static unsafeExposeInternals(t){return{starts:t.#F,ttls:t.#S,sizes:t.#m,keyMap:t.#n,keyList:t.#i,valList:t.#t,next:t.#l,prev:t.#c,get head(){return t.#o},get tail(){return t.#h},free:t.#w,isBackgroundFetch:e=>t.#e(e),backgroundFetch:(e,i,s,n)=>t.#D(e,i,s,n),moveToTail:e=>t.#v(e),indexes:e=>t.#y(e),rindexes:e=>t.#A(e),isStale:e=>t.#u(e)}}get max(){return this.#d}get maxSize(){return this.#f}get calculatedSize(){return this.#p}get size(){return this.#s}get fetchMethod(){return this.#C}get dispose(){return this.#_}get disposeAfter(){return this.#g}constructor(t){let{max:e=0,ttl:i,ttlResolution:s=1,ttlAutopurge:n,updateAgeOnGet:h,updateAgeOnHas:a,allowStale:r,dispose:u,disposeAfter:b,noDisposeOnSet:f,noUpdateTTL:d,maxSize:p=0,maxEntrySize:F=0,sizeCalculation:c,fetchMethod:w,noDeleteOnFetchRejection:l,noDeleteOnStaleGet:S,allowStaleOnFetchRejection:y,allowStaleOnFetchAbort:g,ignoreFetchAbort:_}=t;if(e!==0&&!m(e))throw new TypeError("max option must be a nonnegative integer");let O=e?k(e):Array;if(!O)throw new Error("invalid max value: "+e);if(this.#d=e,this.#f=p,this.maxEntrySize=F||this.#f,this.sizeCalculation=c,this.sizeCalculation){if(!this.#f&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(w!==void 0&&typeof w!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#C=w,this.#T=!!w,this.#n=new Map,this.#i=new Array(e).fill(void 0),this.#t=new Array(e).fill(void 0),this.#l=new O(e),this.#c=new O(e),this.#o=0,this.#h=0,this.#w=R.create(e),this.#s=0,this.#p=0,typeof u=="function"&&(this.#_=u),typeof b=="function"?(this.#g=b,this.#r=[]):(this.#g=void 0,this.#r=void 0),this.#b=!!this.#_,this.#a=!!this.#g,this.noDisposeOnSet=!!f,this.noUpdateTTL=!!d,this.noDeleteOnFetchRejection=!!l,this.allowStaleOnFetchRejection=!!y,this.allowStaleOnFetchAbort=!!g,this.ignoreFetchAbort=!!_,this.maxEntrySize!==0){if(this.#f!==0&&!m(this.#f))throw new TypeError("maxSize must be a positive integer if specified");if(!m(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#I()}if(this.allowStale=!!r,this.noDeleteOnStaleGet=!!S,this.updateAgeOnGet=!!h,this.updateAgeOnHas=!!a,this.ttlResolution=m(s)||s===0?s:1,this.ttlAutopurge=!!n,this.ttl=i||0,this.ttl){if(!m(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#L()}if(this.#d===0&&this.ttl===0&&this.#f===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#d&&!this.#f){let A="LRU_CACHE_UNBOUNDED";V(A)&&(N.add(A),P("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",A,C))}}getRemainingTTL(t){return this.#n.has(t)?1/0:0}#L(){let t=new z(this.#d),e=new z(this.#d);this.#S=t,this.#F=e,this.#U=(n,h,a=v.now())=>{if(e[n]=h!==0?a:0,t[n]=h,h!==0&&this.ttlAutopurge){let r=setTimeout(()=>{this.#u(n)&&this.delete(this.#i[n])},h+1);r.unref&&r.unref()}},this.#z=n=>{e[n]=t[n]!==0?v.now():0},this.#O=(n,h)=>{if(t[h]){let a=t[h],r=e[h];n.ttl=a,n.start=r,n.now=i||s();let u=n.now-r;n.remainingTTL=a-u}};let i=0,s=()=>{let n=v.now();if(this.ttlResolution>0){i=n;let h=setTimeout(()=>i=0,this.ttlResolution);h.unref&&h.unref()}return n};this.getRemainingTTL=n=>{let h=this.#n.get(n);if(h===void 0)return 0;let a=t[h],r=e[h];if(a===0||r===0)return 1/0;let u=(i||s())-r;return a-u},this.#u=n=>t[n]!==0&&e[n]!==0&&(i||s())-e[n]>t[n]}#z=()=>{};#O=()=>{};#U=()=>{};#u=()=>!1;#I(){let t=new z(this.#d);this.#p=0,this.#m=t,this.#E=e=>{this.#p-=t[e],t[e]=0},this.#G=(e,i,s,n)=>{if(this.#e(i))return 0;if(!m(s))if(n){if(typeof n!="function")throw new TypeError("sizeCalculation must be a function");if(s=n(i,e),!m(s))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return s},this.#R=(e,i,s)=>{if(t[e]=i,this.#f){let n=this.#f-t[e];for(;this.#p>n;)this.#W(!0)}this.#p+=t[e],s&&(s.entrySize=i,s.totalCalculatedSize=this.#p)}}#E=t=>{};#R=(t,e,i)=>{};#G=(t,e,i,s)=>{if(i||s)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#y({allowStale:t=this.allowStale}={}){if(this.#s)for(let e=this.#h;!(!this.#x(e)||((t||!this.#u(e))&&(yield e),e===this.#o));)e=this.#c[e]}*#A({allowStale:t=this.allowStale}={}){if(this.#s)for(let e=this.#o;!(!this.#x(e)||((t||!this.#u(e))&&(yield e),e===this.#h));)e=this.#l[e]}#x(t){return t!==void 0&&this.#n.get(this.#i[t])===t}*entries(){for(let t of this.#y())this.#t[t]!==void 0&&this.#i[t]!==void 0&&!this.#e(this.#t[t])&&(yield[this.#i[t],this.#t[t]])}*rentries(){for(let t of this.#A())this.#t[t]!==void 0&&this.#i[t]!==void 0&&!this.#e(this.#t[t])&&(yield[this.#i[t],this.#t[t]])}*keys(){for(let t of this.#y()){let e=this.#i[t];e!==void 0&&!this.#e(this.#t[t])&&(yield e)}}*rkeys(){for(let t of this.#A()){let e=this.#i[t];e!==void 0&&!this.#e(this.#t[t])&&(yield e)}}*values(){for(let t of this.#y())this.#t[t]!==void 0&&!this.#e(this.#t[t])&&(yield this.#t[t])}*rvalues(){for(let t of this.#A())this.#t[t]!==void 0&&!this.#e(this.#t[t])&&(yield this.#t[t])}[Symbol.iterator](){return this.entries()}find(t,e={}){for(let i of this.#y()){let s=this.#t[i],n=this.#e(s)?s.__staleWhileFetching:s;if(n!==void 0&&t(n,this.#i[i],this))return this.get(this.#i[i],e)}}forEach(t,e=this){for(let i of this.#y()){let s=this.#t[i],n=this.#e(s)?s.__staleWhileFetching:s;n!==void 0&&t.call(e,n,this.#i[i],this)}}rforEach(t,e=this){for(let i of this.#A()){let s=this.#t[i],n=this.#e(s)?s.__staleWhileFetching:s;n!==void 0&&t.call(e,n,this.#i[i],this)}}purgeStale(){let t=!1;for(let e of this.#A({allowStale:!0}))this.#u(e)&&(this.delete(this.#i[e]),t=!0);return t}dump(){let t=[];for(let e of this.#y({allowStale:!0})){let i=this.#i[e],s=this.#t[e],n=this.#e(s)?s.__staleWhileFetching:s;if(n===void 0||i===void 0)continue;let h={value:n};if(this.#S&&this.#F){h.ttl=this.#S[e];let a=v.now()-this.#F[e];h.start=Math.floor(Date.now()-a)}this.#m&&(h.size=this.#m[e]),t.unshift([i,h])}return t}load(t){this.clear();for(let[e,i]of t){if(i.start){let s=Date.now()-i.start;i.start=v.now()-s}this.set(e,i.value,i)}}set(t,e,i={}){if(e===void 0)return this.delete(t),this;let{ttl:s=this.ttl,start:n,noDisposeOnSet:h=this.noDisposeOnSet,sizeCalculation:a=this.sizeCalculation,status:r}=i,{noUpdateTTL:u=this.noUpdateTTL}=i,b=this.#G(t,e,i.size||0,a);if(this.maxEntrySize&&b>this.maxEntrySize)return r&&(r.set="miss",r.maxEntrySizeExceeded=!0),this.delete(t),this;let f=this.#s===0?void 0:this.#n.get(t);if(f===void 0)f=this.#s===0?this.#h:this.#w.length!==0?this.#w.pop():this.#s===this.#d?this.#W(!1):this.#s,this.#i[f]=t,this.#t[f]=e,this.#n.set(t,f),this.#l[this.#h]=f,this.#c[f]=this.#h,this.#h=f,this.#s++,this.#R(f,b,r),r&&(r.set="add"),u=!1;else{this.#v(f);let d=this.#t[f];if(e!==d){if(this.#T&&this.#e(d)?d.__abortController.abort(new Error("replaced")):h||(this.#b&&this.#_?.(d,t,"set"),this.#a&&this.#r?.push([d,t,"set"])),this.#E(f),this.#R(f,b,r),this.#t[f]=e,r){r.set="replace";let p=d&&this.#e(d)?d.__staleWhileFetching:d;p!==void 0&&(r.oldValue=p)}}else r&&(r.set="update")}if(s!==0&&!this.#S&&this.#L(),this.#S&&(u||this.#U(f,s,n),r&&this.#O(r,f)),!h&&this.#a&&this.#r){let d=this.#r,p;for(;p=d?.shift();)this.#g?.(...p)}return this}pop(){try{for(;this.#s;){let t=this.#t[this.#o];if(this.#W(!0),this.#e(t)){if(t.__staleWhileFetching)return t.__staleWhileFetching}else if(t!==void 0)return t}}finally{if(this.#a&&this.#r){let t=this.#r,e;for(;e=t?.shift();)this.#g?.(...e)}}}#W(t){let e=this.#o,i=this.#i[e],s=this.#t[e];return this.#T&&this.#e(s)?s.__abortController.abort(new Error("evicted")):(this.#b||this.#a)&&(this.#b&&this.#_?.(s,i,"evict"),this.#a&&this.#r?.push([s,i,"evict"])),this.#E(e),t&&(this.#i[e]=void 0,this.#t[e]=void 0,this.#w.push(e)),this.#s===1?(this.#o=this.#h=0,this.#w.length=0):this.#o=this.#l[e],this.#n.delete(i),this.#s--,e}has(t,e={}){let{updateAgeOnHas:i=this.updateAgeOnHas,status:s}=e,n=this.#n.get(t);if(n!==void 0){let h=this.#t[n];if(this.#e(h)&&h.__staleWhileFetching===void 0)return!1;if(this.#u(n))s&&(s.has="stale",this.#O(s,n));else return i&&this.#z(n),s&&(s.has="hit",this.#O(s,n)),!0}else s&&(s.has="miss");return!1}peek(t,e={}){let{allowStale:i=this.allowStale}=e,s=this.#n.get(t);if(s!==void 0&&(i||!this.#u(s))){let n=this.#t[s];return this.#e(n)?n.__staleWhileFetching:n}}#D(t,e,i,s){let n=e===void 0?void 0:this.#t[e];if(this.#e(n))return n;let h=new W,{signal:a}=i;a?.addEventListener("abort",()=>h.abort(a.reason),{signal:h.signal});let r={signal:h.signal,options:i,context:s},u=(c,w=!1)=>{let{aborted:l}=h.signal,S=i.ignoreFetchAbort&&c!==void 0;if(i.status&&(l&&!w?(i.status.fetchAborted=!0,i.status.fetchError=h.signal.reason,S&&(i.status.fetchAbortIgnored=!0)):i.status.fetchResolved=!0),l&&!S&&!w)return f(h.signal.reason);let y=p;return this.#t[e]===p&&(c===void 0?y.__staleWhileFetching?this.#t[e]=y.__staleWhileFetching:this.delete(t):(i.status&&(i.status.fetchUpdated=!0),this.set(t,c,r.options))),c},b=c=>(i.status&&(i.status.fetchRejected=!0,i.status.fetchError=c),f(c)),f=c=>{let{aborted:w}=h.signal,l=w&&i.allowStaleOnFetchAbort,S=l||i.allowStaleOnFetchRejection,y=S||i.noDeleteOnFetchRejection,g=p;if(this.#t[e]===p&&(!y||g.__staleWhileFetching===void 0?this.delete(t):l||(this.#t[e]=g.__staleWhileFetching)),S)return i.status&&g.__staleWhileFetching!==void 0&&(i.status.returnedStale=!0),g.__staleWhileFetching;if(g.__returned===g)throw c},d=(c,w)=>{let l=this.#C?.(t,n,r);l&&l instanceof Promise&&l.then(S=>c(S),w),h.signal.addEventListener("abort",()=>{(!i.ignoreFetchAbort||i.allowStaleOnFetchAbort)&&(c(),i.allowStaleOnFetchAbort&&(c=S=>u(S,!0)))})};i.status&&(i.status.fetchDispatched=!0);let p=new Promise(d).then(u,b),F=Object.assign(p,{__abortController:h,__staleWhileFetching:n,__returned:void 0});return e===void 0?(this.set(t,F,{...r.options,status:void 0}),e=this.#n.get(t)):this.#t[e]=F,F}#e(t){if(!this.#T)return!1;let e=t;return!!e&&e instanceof Promise&&e.hasOwnProperty("__staleWhileFetching")&&e.__abortController instanceof W}async fetch(t,e={}){let{allowStale:i=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,ttl:h=this.ttl,noDisposeOnSet:a=this.noDisposeOnSet,size:r=0,sizeCalculation:u=this.sizeCalculation,noUpdateTTL:b=this.noUpdateTTL,noDeleteOnFetchRejection:f=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:d=this.allowStaleOnFetchRejection,ignoreFetchAbort:p=this.ignoreFetchAbort,allowStaleOnFetchAbort:F=this.allowStaleOnFetchAbort,context:c,forceRefresh:w=!1,status:l,signal:S}=e;if(!this.#T)return l&&(l.fetch="get"),this.get(t,{allowStale:i,updateAgeOnGet:s,noDeleteOnStaleGet:n,status:l});let y={allowStale:i,updateAgeOnGet:s,noDeleteOnStaleGet:n,ttl:h,noDisposeOnSet:a,size:r,sizeCalculation:u,noUpdateTTL:b,noDeleteOnFetchRejection:f,allowStaleOnFetchRejection:d,allowStaleOnFetchAbort:F,ignoreFetchAbort:p,status:l,signal:S},g=this.#n.get(t);if(g===void 0){l&&(l.fetch="miss");let _=this.#D(t,g,y,c);return _.__returned=_}else{let _=this.#t[g];if(this.#e(_)){let G=i&&_.__staleWhileFetching!==void 0;return l&&(l.fetch="inflight",G&&(l.returnedStale=!0)),G?_.__staleWhileFetching:_.__returned=_}let O=this.#u(g);if(!w&&!O)return l&&(l.fetch="hit"),this.#v(g),s&&this.#z(g),l&&this.#O(l,g),_;let A=this.#D(t,g,y,c),U=A.__staleWhileFetching!==void 0&&i;return l&&(l.fetch=O?"stale":"refresh",U&&O&&(l.returnedStale=!0)),U?A.__staleWhileFetching:A.__returned=A}}get(t,e={}){let{allowStale:i=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,status:h}=e,a=this.#n.get(t);if(a!==void 0){let r=this.#t[a],u=this.#e(r);return h&&this.#O(h,a),this.#u(a)?(h&&(h.get="stale"),u?(h&&i&&r.__staleWhileFetching!==void 0&&(h.returnedStale=!0),i?r.__staleWhileFetching:void 0):(n||this.delete(t),h&&i&&(h.returnedStale=!0),i?r:void 0)):(h&&(h.get="hit"),u?r.__staleWhileFetching:(this.#v(a),s&&this.#z(a),r))}else h&&(h.get="miss")}#j(t,e){this.#c[e]=t,this.#l[t]=e}#v(t){t!==this.#h&&(t===this.#o?this.#o=this.#l[t]:this.#j(this.#c[t],this.#l[t]),this.#j(this.#h,t),this.#h=t)}delete(t){let e=!1;if(this.#s!==0){let i=this.#n.get(t);if(i!==void 0)if(e=!0,this.#s===1)this.clear();else{this.#E(i);let s=this.#t[i];this.#e(s)?s.__abortController.abort(new Error("deleted")):(this.#b||this.#a)&&(this.#b&&this.#_?.(s,t,"delete"),this.#a&&this.#r?.push([s,t,"delete"])),this.#n.delete(t),this.#i[i]=void 0,this.#t[i]=void 0,i===this.#h?this.#h=this.#c[i]:i===this.#o?this.#o=this.#l[i]:(this.#l[this.#c[i]]=this.#l[i],this.#c[this.#l[i]]=this.#c[i]),this.#s--,this.#w.push(i)}}if(this.#a&&this.#r?.length){let i=this.#r,s;for(;s=i?.shift();)this.#g?.(...s)}return e}clear(){for(let t of this.#A({allowStale:!0})){let e=this.#t[t];if(this.#e(e))e.__abortController.abort(new Error("deleted"));else{let i=this.#i[t];this.#b&&this.#_?.(e,i,"delete"),this.#a&&this.#r?.push([e,i,"delete"])}}if(this.#n.clear(),this.#t.fill(void 0),this.#i.fill(void 0),this.#S&&this.#F&&(this.#S.fill(0),this.#F.fill(0)),this.#m&&this.#m.fill(0),this.#o=0,this.#h=0,this.#w.length=0,this.#p=0,this.#s=0,this.#a&&this.#r){let t=this.#r,e;for(;e=t?.shift();)this.#g?.(...e)}}};exports.LRUCache=C; -//# sourceMappingURL=index.min.js.map diff --git a/deps/npm/node_modules/path-scurry/node_modules/lru-cache/dist/cjs/package.json b/deps/npm/node_modules/path-scurry/node_modules/lru-cache/dist/cjs/package.json deleted file mode 100644 index 5bbefffbabee39..00000000000000 --- a/deps/npm/node_modules/path-scurry/node_modules/lru-cache/dist/cjs/package.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "type": "commonjs" -} diff --git a/deps/npm/node_modules/path-scurry/node_modules/lru-cache/dist/mjs/index.js b/deps/npm/node_modules/path-scurry/node_modules/lru-cache/dist/mjs/index.js deleted file mode 100644 index 1d8a36931a45a8..00000000000000 --- a/deps/npm/node_modules/path-scurry/node_modules/lru-cache/dist/mjs/index.js +++ /dev/null @@ -1,1391 +0,0 @@ -/** - * @module LRUCache - */ -const perf = typeof performance === 'object' && - performance && - typeof performance.now === 'function' - ? performance - : Date; -const warned = new Set(); -/* c8 ignore start */ -const PROCESS = (typeof process === 'object' && !!process ? process : {}); -/* c8 ignore start */ -const emitWarning = (msg, type, code, fn) => { - typeof PROCESS.emitWarning === 'function' - ? PROCESS.emitWarning(msg, type, code, fn) - : console.error(`[${code}] ${type}: ${msg}`); -}; -let AC = globalThis.AbortController; -let AS = globalThis.AbortSignal; -/* c8 ignore start */ -if (typeof AC === 'undefined') { - //@ts-ignore - AS = class AbortSignal { - onabort; - _onabort = []; - reason; - aborted = false; - addEventListener(_, fn) { - this._onabort.push(fn); - } - }; - //@ts-ignore - AC = class AbortController { - constructor() { - warnACPolyfill(); - } - signal = new AS(); - abort(reason) { - if (this.signal.aborted) - return; - //@ts-ignore - this.signal.reason = reason; - //@ts-ignore - this.signal.aborted = true; - //@ts-ignore - for (const fn of this.signal._onabort) { - fn(reason); - } - this.signal.onabort?.(reason); - } - }; - let printACPolyfillWarning = PROCESS.env?.LRU_CACHE_IGNORE_AC_WARNING !== '1'; - const warnACPolyfill = () => { - if (!printACPolyfillWarning) - return; - printACPolyfillWarning = false; - emitWarning('AbortController is not defined. If using lru-cache in ' + - 'node 14, load an AbortController polyfill from the ' + - '`node-abort-controller` package. A minimal polyfill is ' + - 'provided for use by LRUCache.fetch(), but it should not be ' + - 'relied upon in other contexts (eg, passing it to other APIs that ' + - 'use AbortController/AbortSignal might have undesirable effects). ' + - 'You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.', 'NO_ABORT_CONTROLLER', 'ENOTSUP', warnACPolyfill); - }; -} -/* c8 ignore stop */ -const shouldWarn = (code) => !warned.has(code); -const TYPE = Symbol('type'); -const isPosInt = (n) => n && n === Math.floor(n) && n > 0 && isFinite(n); -/* c8 ignore start */ -// This is a little bit ridiculous, tbh. -// The maximum array length is 2^32-1 or thereabouts on most JS impls. -// And well before that point, you're caching the entire world, I mean, -// that's ~32GB of just integers for the next/prev links, plus whatever -// else to hold that many keys and values. Just filling the memory with -// zeroes at init time is brutal when you get that big. -// But why not be complete? -// Maybe in the future, these limits will have expanded. -const getUintArray = (max) => !isPosInt(max) - ? null - : max <= Math.pow(2, 8) - ? Uint8Array - : max <= Math.pow(2, 16) - ? Uint16Array - : max <= Math.pow(2, 32) - ? Uint32Array - : max <= Number.MAX_SAFE_INTEGER - ? ZeroArray - : null; -/* c8 ignore stop */ -class ZeroArray extends Array { - constructor(size) { - super(size); - this.fill(0); - } -} -class Stack { - heap; - length; - // private constructor - static #constructing = false; - static create(max) { - const HeapCls = getUintArray(max); - if (!HeapCls) - return []; - Stack.#constructing = true; - const s = new Stack(max, HeapCls); - Stack.#constructing = false; - return s; - } - constructor(max, HeapCls) { - /* c8 ignore start */ - if (!Stack.#constructing) { - throw new TypeError('instantiate Stack using Stack.create(n)'); - } - /* c8 ignore stop */ - this.heap = new HeapCls(max); - this.length = 0; - } - push(n) { - this.heap[this.length++] = n; - } - pop() { - return this.heap[--this.length]; - } -} -/** - * Default export, the thing you're using this module to get. - * - * All properties from the options object (with the exception of - * {@link OptionsBase.max} and {@link OptionsBase.maxSize}) are added as - * normal public members. (`max` and `maxBase` are read-only getters.) - * Changing any of these will alter the defaults for subsequent method calls, - * but is otherwise safe. - */ -export class LRUCache { - // properties coming in from the options of these, only max and maxSize - // really *need* to be protected. The rest can be modified, as they just - // set defaults for various methods. - #max; - #maxSize; - #dispose; - #disposeAfter; - #fetchMethod; - /** - * {@link LRUCache.OptionsBase.ttl} - */ - ttl; - /** - * {@link LRUCache.OptionsBase.ttlResolution} - */ - ttlResolution; - /** - * {@link LRUCache.OptionsBase.ttlAutopurge} - */ - ttlAutopurge; - /** - * {@link LRUCache.OptionsBase.updateAgeOnGet} - */ - updateAgeOnGet; - /** - * {@link LRUCache.OptionsBase.updateAgeOnHas} - */ - updateAgeOnHas; - /** - * {@link LRUCache.OptionsBase.allowStale} - */ - allowStale; - /** - * {@link LRUCache.OptionsBase.noDisposeOnSet} - */ - noDisposeOnSet; - /** - * {@link LRUCache.OptionsBase.noUpdateTTL} - */ - noUpdateTTL; - /** - * {@link LRUCache.OptionsBase.maxEntrySize} - */ - maxEntrySize; - /** - * {@link LRUCache.OptionsBase.sizeCalculation} - */ - sizeCalculation; - /** - * {@link LRUCache.OptionsBase.noDeleteOnFetchRejection} - */ - noDeleteOnFetchRejection; - /** - * {@link LRUCache.OptionsBase.noDeleteOnStaleGet} - */ - noDeleteOnStaleGet; - /** - * {@link LRUCache.OptionsBase.allowStaleOnFetchAbort} - */ - allowStaleOnFetchAbort; - /** - * {@link LRUCache.OptionsBase.allowStaleOnFetchRejection} - */ - allowStaleOnFetchRejection; - /** - * {@link LRUCache.OptionsBase.ignoreFetchAbort} - */ - ignoreFetchAbort; - // computed properties - #size; - #calculatedSize; - #keyMap; - #keyList; - #valList; - #next; - #prev; - #head; - #tail; - #free; - #disposed; - #sizes; - #starts; - #ttls; - #hasDispose; - #hasFetchMethod; - #hasDisposeAfter; - /** - * Do not call this method unless you need to inspect the - * inner workings of the cache. If anything returned by this - * object is modified in any way, strange breakage may occur. - * - * These fields are private for a reason! - * - * @internal - */ - static unsafeExposeInternals(c) { - return { - // properties - starts: c.#starts, - ttls: c.#ttls, - sizes: c.#sizes, - keyMap: c.#keyMap, - keyList: c.#keyList, - valList: c.#valList, - next: c.#next, - prev: c.#prev, - get head() { - return c.#head; - }, - get tail() { - return c.#tail; - }, - free: c.#free, - // methods - isBackgroundFetch: (p) => c.#isBackgroundFetch(p), - backgroundFetch: (k, index, options, context) => c.#backgroundFetch(k, index, options, context), - moveToTail: (index) => c.#moveToTail(index), - indexes: (options) => c.#indexes(options), - rindexes: (options) => c.#rindexes(options), - isStale: (index) => c.#isStale(index), - }; - } - // Protected read-only members - /** - * {@link LRUCache.OptionsBase.max} (read-only) - */ - get max() { - return this.#max; - } - /** - * {@link LRUCache.OptionsBase.maxSize} (read-only) - */ - get maxSize() { - return this.#maxSize; - } - /** - * The total computed size of items in the cache (read-only) - */ - get calculatedSize() { - return this.#calculatedSize; - } - /** - * The number of items stored in the cache (read-only) - */ - get size() { - return this.#size; - } - /** - * {@link LRUCache.OptionsBase.fetchMethod} (read-only) - */ - get fetchMethod() { - return this.#fetchMethod; - } - /** - * {@link LRUCache.OptionsBase.dispose} (read-only) - */ - get dispose() { - return this.#dispose; - } - /** - * {@link LRUCache.OptionsBase.disposeAfter} (read-only) - */ - get disposeAfter() { - return this.#disposeAfter; - } - constructor(options) { - const { max = 0, ttl, ttlResolution = 1, ttlAutopurge, updateAgeOnGet, updateAgeOnHas, allowStale, dispose, disposeAfter, noDisposeOnSet, noUpdateTTL, maxSize = 0, maxEntrySize = 0, sizeCalculation, fetchMethod, noDeleteOnFetchRejection, noDeleteOnStaleGet, allowStaleOnFetchRejection, allowStaleOnFetchAbort, ignoreFetchAbort, } = options; - if (max !== 0 && !isPosInt(max)) { - throw new TypeError('max option must be a nonnegative integer'); - } - const UintArray = max ? getUintArray(max) : Array; - if (!UintArray) { - throw new Error('invalid max value: ' + max); - } - this.#max = max; - this.#maxSize = maxSize; - this.maxEntrySize = maxEntrySize || this.#maxSize; - this.sizeCalculation = sizeCalculation; - if (this.sizeCalculation) { - if (!this.#maxSize && !this.maxEntrySize) { - throw new TypeError('cannot set sizeCalculation without setting maxSize or maxEntrySize'); - } - if (typeof this.sizeCalculation !== 'function') { - throw new TypeError('sizeCalculation set to non-function'); - } - } - if (fetchMethod !== undefined && - typeof fetchMethod !== 'function') { - throw new TypeError('fetchMethod must be a function if specified'); - } - this.#fetchMethod = fetchMethod; - this.#hasFetchMethod = !!fetchMethod; - this.#keyMap = new Map(); - this.#keyList = new Array(max).fill(undefined); - this.#valList = new Array(max).fill(undefined); - this.#next = new UintArray(max); - this.#prev = new UintArray(max); - this.#head = 0; - this.#tail = 0; - this.#free = Stack.create(max); - this.#size = 0; - this.#calculatedSize = 0; - if (typeof dispose === 'function') { - this.#dispose = dispose; - } - if (typeof disposeAfter === 'function') { - this.#disposeAfter = disposeAfter; - this.#disposed = []; - } - else { - this.#disposeAfter = undefined; - this.#disposed = undefined; - } - this.#hasDispose = !!this.#dispose; - this.#hasDisposeAfter = !!this.#disposeAfter; - this.noDisposeOnSet = !!noDisposeOnSet; - this.noUpdateTTL = !!noUpdateTTL; - this.noDeleteOnFetchRejection = !!noDeleteOnFetchRejection; - this.allowStaleOnFetchRejection = !!allowStaleOnFetchRejection; - this.allowStaleOnFetchAbort = !!allowStaleOnFetchAbort; - this.ignoreFetchAbort = !!ignoreFetchAbort; - // NB: maxEntrySize is set to maxSize if it's set - if (this.maxEntrySize !== 0) { - if (this.#maxSize !== 0) { - if (!isPosInt(this.#maxSize)) { - throw new TypeError('maxSize must be a positive integer if specified'); - } - } - if (!isPosInt(this.maxEntrySize)) { - throw new TypeError('maxEntrySize must be a positive integer if specified'); - } - this.#initializeSizeTracking(); - } - this.allowStale = !!allowStale; - this.noDeleteOnStaleGet = !!noDeleteOnStaleGet; - this.updateAgeOnGet = !!updateAgeOnGet; - this.updateAgeOnHas = !!updateAgeOnHas; - this.ttlResolution = - isPosInt(ttlResolution) || ttlResolution === 0 - ? ttlResolution - : 1; - this.ttlAutopurge = !!ttlAutopurge; - this.ttl = ttl || 0; - if (this.ttl) { - if (!isPosInt(this.ttl)) { - throw new TypeError('ttl must be a positive integer if specified'); - } - this.#initializeTTLTracking(); - } - // do not allow completely unbounded caches - if (this.#max === 0 && this.ttl === 0 && this.#maxSize === 0) { - throw new TypeError('At least one of max, maxSize, or ttl is required'); - } - if (!this.ttlAutopurge && !this.#max && !this.#maxSize) { - const code = 'LRU_CACHE_UNBOUNDED'; - if (shouldWarn(code)) { - warned.add(code); - const msg = 'TTL caching without ttlAutopurge, max, or maxSize can ' + - 'result in unbounded memory consumption.'; - emitWarning(msg, 'UnboundedCacheWarning', code, LRUCache); - } - } - } - /** - * Return the remaining TTL time for a given entry key - */ - getRemainingTTL(key) { - return this.#keyMap.has(key) ? Infinity : 0; - } - #initializeTTLTracking() { - const ttls = new ZeroArray(this.#max); - const starts = new ZeroArray(this.#max); - this.#ttls = ttls; - this.#starts = starts; - this.#setItemTTL = (index, ttl, start = perf.now()) => { - starts[index] = ttl !== 0 ? start : 0; - ttls[index] = ttl; - if (ttl !== 0 && this.ttlAutopurge) { - const t = setTimeout(() => { - if (this.#isStale(index)) { - this.delete(this.#keyList[index]); - } - }, ttl + 1); - // unref() not supported on all platforms - /* c8 ignore start */ - if (t.unref) { - t.unref(); - } - /* c8 ignore stop */ - } - }; - this.#updateItemAge = index => { - starts[index] = ttls[index] !== 0 ? perf.now() : 0; - }; - this.#statusTTL = (status, index) => { - if (ttls[index]) { - const ttl = ttls[index]; - const start = starts[index]; - status.ttl = ttl; - status.start = start; - status.now = cachedNow || getNow(); - const age = status.now - start; - status.remainingTTL = ttl - age; - } - }; - // debounce calls to perf.now() to 1s so we're not hitting - // that costly call repeatedly. - let cachedNow = 0; - const getNow = () => { - const n = perf.now(); - if (this.ttlResolution > 0) { - cachedNow = n; - const t = setTimeout(() => (cachedNow = 0), this.ttlResolution); - // not available on all platforms - /* c8 ignore start */ - if (t.unref) { - t.unref(); - } - /* c8 ignore stop */ - } - return n; - }; - this.getRemainingTTL = key => { - const index = this.#keyMap.get(key); - if (index === undefined) { - return 0; - } - const ttl = ttls[index]; - const start = starts[index]; - if (ttl === 0 || start === 0) { - return Infinity; - } - const age = (cachedNow || getNow()) - start; - return ttl - age; - }; - this.#isStale = index => { - return (ttls[index] !== 0 && - starts[index] !== 0 && - (cachedNow || getNow()) - starts[index] > ttls[index]); - }; - } - // conditionally set private methods related to TTL - #updateItemAge = () => { }; - #statusTTL = () => { }; - #setItemTTL = () => { }; - /* c8 ignore stop */ - #isStale = () => false; - #initializeSizeTracking() { - const sizes = new ZeroArray(this.#max); - this.#calculatedSize = 0; - this.#sizes = sizes; - this.#removeItemSize = index => { - this.#calculatedSize -= sizes[index]; - sizes[index] = 0; - }; - this.#requireSize = (k, v, size, sizeCalculation) => { - // provisionally accept background fetches. - // actual value size will be checked when they return. - if (this.#isBackgroundFetch(v)) { - return 0; - } - if (!isPosInt(size)) { - if (sizeCalculation) { - if (typeof sizeCalculation !== 'function') { - throw new TypeError('sizeCalculation must be a function'); - } - size = sizeCalculation(v, k); - if (!isPosInt(size)) { - throw new TypeError('sizeCalculation return invalid (expect positive integer)'); - } - } - else { - throw new TypeError('invalid size value (must be positive integer). ' + - 'When maxSize or maxEntrySize is used, sizeCalculation ' + - 'or size must be set.'); - } - } - return size; - }; - this.#addItemSize = (index, size, status) => { - sizes[index] = size; - if (this.#maxSize) { - const maxSize = this.#maxSize - sizes[index]; - while (this.#calculatedSize > maxSize) { - this.#evict(true); - } - } - this.#calculatedSize += sizes[index]; - if (status) { - status.entrySize = size; - status.totalCalculatedSize = this.#calculatedSize; - } - }; - } - #removeItemSize = _i => { }; - #addItemSize = (_i, _s, _st) => { }; - #requireSize = (_k, _v, size, sizeCalculation) => { - if (size || sizeCalculation) { - throw new TypeError('cannot set size without setting maxSize or maxEntrySize on cache'); - } - return 0; - }; - *#indexes({ allowStale = this.allowStale } = {}) { - if (this.#size) { - for (let i = this.#tail; true;) { - if (!this.#isValidIndex(i)) { - break; - } - if (allowStale || !this.#isStale(i)) { - yield i; - } - if (i === this.#head) { - break; - } - else { - i = this.#prev[i]; - } - } - } - } - *#rindexes({ allowStale = this.allowStale } = {}) { - if (this.#size) { - for (let i = this.#head; true;) { - if (!this.#isValidIndex(i)) { - break; - } - if (allowStale || !this.#isStale(i)) { - yield i; - } - if (i === this.#tail) { - break; - } - else { - i = this.#next[i]; - } - } - } - } - #isValidIndex(index) { - return (index !== undefined && - this.#keyMap.get(this.#keyList[index]) === index); - } - /** - * Return a generator yielding `[key, value]` pairs, - * in order from most recently used to least recently used. - */ - *entries() { - for (const i of this.#indexes()) { - if (this.#valList[i] !== undefined && - this.#keyList[i] !== undefined && - !this.#isBackgroundFetch(this.#valList[i])) { - yield [this.#keyList[i], this.#valList[i]]; - } - } - } - /** - * Inverse order version of {@link LRUCache.entries} - * - * Return a generator yielding `[key, value]` pairs, - * in order from least recently used to most recently used. - */ - *rentries() { - for (const i of this.#rindexes()) { - if (this.#valList[i] !== undefined && - this.#keyList[i] !== undefined && - !this.#isBackgroundFetch(this.#valList[i])) { - yield [this.#keyList[i], this.#valList[i]]; - } - } - } - /** - * Return a generator yielding the keys in the cache, - * in order from most recently used to least recently used. - */ - *keys() { - for (const i of this.#indexes()) { - const k = this.#keyList[i]; - if (k !== undefined && - !this.#isBackgroundFetch(this.#valList[i])) { - yield k; - } - } - } - /** - * Inverse order version of {@link LRUCache.keys} - * - * Return a generator yielding the keys in the cache, - * in order from least recently used to most recently used. - */ - *rkeys() { - for (const i of this.#rindexes()) { - const k = this.#keyList[i]; - if (k !== undefined && - !this.#isBackgroundFetch(this.#valList[i])) { - yield k; - } - } - } - /** - * Return a generator yielding the values in the cache, - * in order from most recently used to least recently used. - */ - *values() { - for (const i of this.#indexes()) { - const v = this.#valList[i]; - if (v !== undefined && - !this.#isBackgroundFetch(this.#valList[i])) { - yield this.#valList[i]; - } - } - } - /** - * Inverse order version of {@link LRUCache.values} - * - * Return a generator yielding the values in the cache, - * in order from least recently used to most recently used. - */ - *rvalues() { - for (const i of this.#rindexes()) { - const v = this.#valList[i]; - if (v !== undefined && - !this.#isBackgroundFetch(this.#valList[i])) { - yield this.#valList[i]; - } - } - } - /** - * Iterating over the cache itself yields the same results as - * {@link LRUCache.entries} - */ - [Symbol.iterator]() { - return this.entries(); - } - /** - * Find a value for which the supplied fn method returns a truthy value, - * similar to Array.find(). fn is called as fn(value, key, cache). - */ - find(fn, getOptions = {}) { - for (const i of this.#indexes()) { - const v = this.#valList[i]; - const value = this.#isBackgroundFetch(v) - ? v.__staleWhileFetching - : v; - if (value === undefined) - continue; - if (fn(value, this.#keyList[i], this)) { - return this.get(this.#keyList[i], getOptions); - } - } - } - /** - * Call the supplied function on each item in the cache, in order from - * most recently used to least recently used. fn is called as - * fn(value, key, cache). Does not update age or recenty of use. - * Does not iterate over stale values. - */ - forEach(fn, thisp = this) { - for (const i of this.#indexes()) { - const v = this.#valList[i]; - const value = this.#isBackgroundFetch(v) - ? v.__staleWhileFetching - : v; - if (value === undefined) - continue; - fn.call(thisp, value, this.#keyList[i], this); - } - } - /** - * The same as {@link LRUCache.forEach} but items are iterated over in - * reverse order. (ie, less recently used items are iterated over first.) - */ - rforEach(fn, thisp = this) { - for (const i of this.#rindexes()) { - const v = this.#valList[i]; - const value = this.#isBackgroundFetch(v) - ? v.__staleWhileFetching - : v; - if (value === undefined) - continue; - fn.call(thisp, value, this.#keyList[i], this); - } - } - /** - * Delete any stale entries. Returns true if anything was removed, - * false otherwise. - */ - purgeStale() { - let deleted = false; - for (const i of this.#rindexes({ allowStale: true })) { - if (this.#isStale(i)) { - this.delete(this.#keyList[i]); - deleted = true; - } - } - return deleted; - } - /** - * Return an array of [key, {@link LRUCache.Entry}] tuples which can be - * passed to cache.load() - */ - dump() { - const arr = []; - for (const i of this.#indexes({ allowStale: true })) { - const key = this.#keyList[i]; - const v = this.#valList[i]; - const value = this.#isBackgroundFetch(v) - ? v.__staleWhileFetching - : v; - if (value === undefined || key === undefined) - continue; - const entry = { value }; - if (this.#ttls && this.#starts) { - entry.ttl = this.#ttls[i]; - // always dump the start relative to a portable timestamp - // it's ok for this to be a bit slow, it's a rare operation. - const age = perf.now() - this.#starts[i]; - entry.start = Math.floor(Date.now() - age); - } - if (this.#sizes) { - entry.size = this.#sizes[i]; - } - arr.unshift([key, entry]); - } - return arr; - } - /** - * Reset the cache and load in the items in entries in the order listed. - * Note that the shape of the resulting cache may be different if the - * same options are not used in both caches. - */ - load(arr) { - this.clear(); - for (const [key, entry] of arr) { - if (entry.start) { - // entry.start is a portable timestamp, but we may be using - // node's performance.now(), so calculate the offset, so that - // we get the intended remaining TTL, no matter how long it's - // been on ice. - // - // it's ok for this to be a bit slow, it's a rare operation. - const age = Date.now() - entry.start; - entry.start = perf.now() - age; - } - this.set(key, entry.value, entry); - } - } - /** - * Add a value to the cache. - * - * Note: if `undefined` is specified as a value, this is an alias for - * {@link LRUCache#delete} - */ - set(k, v, setOptions = {}) { - if (v === undefined) { - this.delete(k); - return this; - } - const { ttl = this.ttl, start, noDisposeOnSet = this.noDisposeOnSet, sizeCalculation = this.sizeCalculation, status, } = setOptions; - let { noUpdateTTL = this.noUpdateTTL } = setOptions; - const size = this.#requireSize(k, v, setOptions.size || 0, sizeCalculation); - // if the item doesn't fit, don't do anything - // NB: maxEntrySize set to maxSize by default - if (this.maxEntrySize && size > this.maxEntrySize) { - if (status) { - status.set = 'miss'; - status.maxEntrySizeExceeded = true; - } - // have to delete, in case something is there already. - this.delete(k); - return this; - } - let index = this.#size === 0 ? undefined : this.#keyMap.get(k); - if (index === undefined) { - // addition - index = (this.#size === 0 - ? this.#tail - : this.#free.length !== 0 - ? this.#free.pop() - : this.#size === this.#max - ? this.#evict(false) - : this.#size); - this.#keyList[index] = k; - this.#valList[index] = v; - this.#keyMap.set(k, index); - this.#next[this.#tail] = index; - this.#prev[index] = this.#tail; - this.#tail = index; - this.#size++; - this.#addItemSize(index, size, status); - if (status) - status.set = 'add'; - noUpdateTTL = false; - } - else { - // update - this.#moveToTail(index); - const oldVal = this.#valList[index]; - if (v !== oldVal) { - if (this.#hasFetchMethod && this.#isBackgroundFetch(oldVal)) { - oldVal.__abortController.abort(new Error('replaced')); - } - else if (!noDisposeOnSet) { - if (this.#hasDispose) { - this.#dispose?.(oldVal, k, 'set'); - } - if (this.#hasDisposeAfter) { - this.#disposed?.push([oldVal, k, 'set']); - } - } - this.#removeItemSize(index); - this.#addItemSize(index, size, status); - this.#valList[index] = v; - if (status) { - status.set = 'replace'; - const oldValue = oldVal && this.#isBackgroundFetch(oldVal) - ? oldVal.__staleWhileFetching - : oldVal; - if (oldValue !== undefined) - status.oldValue = oldValue; - } - } - else if (status) { - status.set = 'update'; - } - } - if (ttl !== 0 && !this.#ttls) { - this.#initializeTTLTracking(); - } - if (this.#ttls) { - if (!noUpdateTTL) { - this.#setItemTTL(index, ttl, start); - } - if (status) - this.#statusTTL(status, index); - } - if (!noDisposeOnSet && this.#hasDisposeAfter && this.#disposed) { - const dt = this.#disposed; - let task; - while ((task = dt?.shift())) { - this.#disposeAfter?.(...task); - } - } - return this; - } - /** - * Evict the least recently used item, returning its value or - * `undefined` if cache is empty. - */ - pop() { - try { - while (this.#size) { - const val = this.#valList[this.#head]; - this.#evict(true); - if (this.#isBackgroundFetch(val)) { - if (val.__staleWhileFetching) { - return val.__staleWhileFetching; - } - } - else if (val !== undefined) { - return val; - } - } - } - finally { - if (this.#hasDisposeAfter && this.#disposed) { - const dt = this.#disposed; - let task; - while ((task = dt?.shift())) { - this.#disposeAfter?.(...task); - } - } - } - } - #evict(free) { - const head = this.#head; - const k = this.#keyList[head]; - const v = this.#valList[head]; - if (this.#hasFetchMethod && this.#isBackgroundFetch(v)) { - v.__abortController.abort(new Error('evicted')); - } - else if (this.#hasDispose || this.#hasDisposeAfter) { - if (this.#hasDispose) { - this.#dispose?.(v, k, 'evict'); - } - if (this.#hasDisposeAfter) { - this.#disposed?.push([v, k, 'evict']); - } - } - this.#removeItemSize(head); - // if we aren't about to use the index, then null these out - if (free) { - this.#keyList[head] = undefined; - this.#valList[head] = undefined; - this.#free.push(head); - } - if (this.#size === 1) { - this.#head = this.#tail = 0; - this.#free.length = 0; - } - else { - this.#head = this.#next[head]; - } - this.#keyMap.delete(k); - this.#size--; - return head; - } - /** - * Check if a key is in the cache, without updating the recency of use. - * Will return false if the item is stale, even though it is technically - * in the cache. - * - * Will not update item age unless - * {@link LRUCache.OptionsBase.updateAgeOnHas} is set. - */ - has(k, hasOptions = {}) { - const { updateAgeOnHas = this.updateAgeOnHas, status } = hasOptions; - const index = this.#keyMap.get(k); - if (index !== undefined) { - const v = this.#valList[index]; - if (this.#isBackgroundFetch(v) && - v.__staleWhileFetching === undefined) { - return false; - } - if (!this.#isStale(index)) { - if (updateAgeOnHas) { - this.#updateItemAge(index); - } - if (status) { - status.has = 'hit'; - this.#statusTTL(status, index); - } - return true; - } - else if (status) { - status.has = 'stale'; - this.#statusTTL(status, index); - } - } - else if (status) { - status.has = 'miss'; - } - return false; - } - /** - * Like {@link LRUCache#get} but doesn't update recency or delete stale - * items. - * - * Returns `undefined` if the item is stale, unless - * {@link LRUCache.OptionsBase.allowStale} is set. - */ - peek(k, peekOptions = {}) { - const { allowStale = this.allowStale } = peekOptions; - const index = this.#keyMap.get(k); - if (index !== undefined && - (allowStale || !this.#isStale(index))) { - const v = this.#valList[index]; - // either stale and allowed, or forcing a refresh of non-stale value - return this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v; - } - } - #backgroundFetch(k, index, options, context) { - const v = index === undefined ? undefined : this.#valList[index]; - if (this.#isBackgroundFetch(v)) { - return v; - } - const ac = new AC(); - const { signal } = options; - // when/if our AC signals, then stop listening to theirs. - signal?.addEventListener('abort', () => ac.abort(signal.reason), { - signal: ac.signal, - }); - const fetchOpts = { - signal: ac.signal, - options, - context, - }; - const cb = (v, updateCache = false) => { - const { aborted } = ac.signal; - const ignoreAbort = options.ignoreFetchAbort && v !== undefined; - if (options.status) { - if (aborted && !updateCache) { - options.status.fetchAborted = true; - options.status.fetchError = ac.signal.reason; - if (ignoreAbort) - options.status.fetchAbortIgnored = true; - } - else { - options.status.fetchResolved = true; - } - } - if (aborted && !ignoreAbort && !updateCache) { - return fetchFail(ac.signal.reason); - } - // either we didn't abort, and are still here, or we did, and ignored - const bf = p; - if (this.#valList[index] === p) { - if (v === undefined) { - if (bf.__staleWhileFetching) { - this.#valList[index] = bf.__staleWhileFetching; - } - else { - this.delete(k); - } - } - else { - if (options.status) - options.status.fetchUpdated = true; - this.set(k, v, fetchOpts.options); - } - } - return v; - }; - const eb = (er) => { - if (options.status) { - options.status.fetchRejected = true; - options.status.fetchError = er; - } - return fetchFail(er); - }; - const fetchFail = (er) => { - const { aborted } = ac.signal; - const allowStaleAborted = aborted && options.allowStaleOnFetchAbort; - const allowStale = allowStaleAborted || options.allowStaleOnFetchRejection; - const noDelete = allowStale || options.noDeleteOnFetchRejection; - const bf = p; - if (this.#valList[index] === p) { - // if we allow stale on fetch rejections, then we need to ensure that - // the stale value is not removed from the cache when the fetch fails. - const del = !noDelete || bf.__staleWhileFetching === undefined; - if (del) { - this.delete(k); - } - else if (!allowStaleAborted) { - // still replace the *promise* with the stale value, - // since we are done with the promise at this point. - // leave it untouched if we're still waiting for an - // aborted background fetch that hasn't yet returned. - this.#valList[index] = bf.__staleWhileFetching; - } - } - if (allowStale) { - if (options.status && bf.__staleWhileFetching !== undefined) { - options.status.returnedStale = true; - } - return bf.__staleWhileFetching; - } - else if (bf.__returned === bf) { - throw er; - } - }; - const pcall = (res, rej) => { - const fmp = this.#fetchMethod?.(k, v, fetchOpts); - if (fmp && fmp instanceof Promise) { - fmp.then(v => res(v), rej); - } - // ignored, we go until we finish, regardless. - // defer check until we are actually aborting, - // so fetchMethod can override. - ac.signal.addEventListener('abort', () => { - if (!options.ignoreFetchAbort || - options.allowStaleOnFetchAbort) { - res(); - // when it eventually resolves, update the cache. - if (options.allowStaleOnFetchAbort) { - res = v => cb(v, true); - } - } - }); - }; - if (options.status) - options.status.fetchDispatched = true; - const p = new Promise(pcall).then(cb, eb); - const bf = Object.assign(p, { - __abortController: ac, - __staleWhileFetching: v, - __returned: undefined, - }); - if (index === undefined) { - // internal, don't expose status. - this.set(k, bf, { ...fetchOpts.options, status: undefined }); - index = this.#keyMap.get(k); - } - else { - this.#valList[index] = bf; - } - return bf; - } - #isBackgroundFetch(p) { - if (!this.#hasFetchMethod) - return false; - const b = p; - return (!!b && - b instanceof Promise && - b.hasOwnProperty('__staleWhileFetching') && - b.__abortController instanceof AC); - } - async fetch(k, fetchOptions = {}) { - const { - // get options - allowStale = this.allowStale, updateAgeOnGet = this.updateAgeOnGet, noDeleteOnStaleGet = this.noDeleteOnStaleGet, - // set options - ttl = this.ttl, noDisposeOnSet = this.noDisposeOnSet, size = 0, sizeCalculation = this.sizeCalculation, noUpdateTTL = this.noUpdateTTL, - // fetch exclusive options - noDeleteOnFetchRejection = this.noDeleteOnFetchRejection, allowStaleOnFetchRejection = this.allowStaleOnFetchRejection, ignoreFetchAbort = this.ignoreFetchAbort, allowStaleOnFetchAbort = this.allowStaleOnFetchAbort, context, forceRefresh = false, status, signal, } = fetchOptions; - if (!this.#hasFetchMethod) { - if (status) - status.fetch = 'get'; - return this.get(k, { - allowStale, - updateAgeOnGet, - noDeleteOnStaleGet, - status, - }); - } - const options = { - allowStale, - updateAgeOnGet, - noDeleteOnStaleGet, - ttl, - noDisposeOnSet, - size, - sizeCalculation, - noUpdateTTL, - noDeleteOnFetchRejection, - allowStaleOnFetchRejection, - allowStaleOnFetchAbort, - ignoreFetchAbort, - status, - signal, - }; - let index = this.#keyMap.get(k); - if (index === undefined) { - if (status) - status.fetch = 'miss'; - const p = this.#backgroundFetch(k, index, options, context); - return (p.__returned = p); - } - else { - // in cache, maybe already fetching - const v = this.#valList[index]; - if (this.#isBackgroundFetch(v)) { - const stale = allowStale && v.__staleWhileFetching !== undefined; - if (status) { - status.fetch = 'inflight'; - if (stale) - status.returnedStale = true; - } - return stale ? v.__staleWhileFetching : (v.__returned = v); - } - // if we force a refresh, that means do NOT serve the cached value, - // unless we are already in the process of refreshing the cache. - const isStale = this.#isStale(index); - if (!forceRefresh && !isStale) { - if (status) - status.fetch = 'hit'; - this.#moveToTail(index); - if (updateAgeOnGet) { - this.#updateItemAge(index); - } - if (status) - this.#statusTTL(status, index); - return v; - } - // ok, it is stale or a forced refresh, and not already fetching. - // refresh the cache. - const p = this.#backgroundFetch(k, index, options, context); - const hasStale = p.__staleWhileFetching !== undefined; - const staleVal = hasStale && allowStale; - if (status) { - status.fetch = isStale ? 'stale' : 'refresh'; - if (staleVal && isStale) - status.returnedStale = true; - } - return staleVal ? p.__staleWhileFetching : (p.__returned = p); - } - } - /** - * Return a value from the cache. Will update the recency of the cache - * entry found. - * - * If the key is not found, get() will return `undefined`. - */ - get(k, getOptions = {}) { - const { allowStale = this.allowStale, updateAgeOnGet = this.updateAgeOnGet, noDeleteOnStaleGet = this.noDeleteOnStaleGet, status, } = getOptions; - const index = this.#keyMap.get(k); - if (index !== undefined) { - const value = this.#valList[index]; - const fetching = this.#isBackgroundFetch(value); - if (status) - this.#statusTTL(status, index); - if (this.#isStale(index)) { - if (status) - status.get = 'stale'; - // delete only if not an in-flight background fetch - if (!fetching) { - if (!noDeleteOnStaleGet) { - this.delete(k); - } - if (status && allowStale) - status.returnedStale = true; - return allowStale ? value : undefined; - } - else { - if (status && - allowStale && - value.__staleWhileFetching !== undefined) { - status.returnedStale = true; - } - return allowStale ? value.__staleWhileFetching : undefined; - } - } - else { - if (status) - status.get = 'hit'; - // if we're currently fetching it, we don't actually have it yet - // it's not stale, which means this isn't a staleWhileRefetching. - // If it's not stale, and fetching, AND has a __staleWhileFetching - // value, then that means the user fetched with {forceRefresh:true}, - // so it's safe to return that value. - if (fetching) { - return value.__staleWhileFetching; - } - this.#moveToTail(index); - if (updateAgeOnGet) { - this.#updateItemAge(index); - } - return value; - } - } - else if (status) { - status.get = 'miss'; - } - } - #connect(p, n) { - this.#prev[n] = p; - this.#next[p] = n; - } - #moveToTail(index) { - // if tail already, nothing to do - // if head, move head to next[index] - // else - // move next[prev[index]] to next[index] (head has no prev) - // move prev[next[index]] to prev[index] - // prev[index] = tail - // next[tail] = index - // tail = index - if (index !== this.#tail) { - if (index === this.#head) { - this.#head = this.#next[index]; - } - else { - this.#connect(this.#prev[index], this.#next[index]); - } - this.#connect(this.#tail, index); - this.#tail = index; - } - } - /** - * Deletes a key out of the cache. - * Returns true if the key was deleted, false otherwise. - */ - delete(k) { - let deleted = false; - if (this.#size !== 0) { - const index = this.#keyMap.get(k); - if (index !== undefined) { - deleted = true; - if (this.#size === 1) { - this.clear(); - } - else { - this.#removeItemSize(index); - const v = this.#valList[index]; - if (this.#isBackgroundFetch(v)) { - v.__abortController.abort(new Error('deleted')); - } - else if (this.#hasDispose || this.#hasDisposeAfter) { - if (this.#hasDispose) { - this.#dispose?.(v, k, 'delete'); - } - if (this.#hasDisposeAfter) { - this.#disposed?.push([v, k, 'delete']); - } - } - this.#keyMap.delete(k); - this.#keyList[index] = undefined; - this.#valList[index] = undefined; - if (index === this.#tail) { - this.#tail = this.#prev[index]; - } - else if (index === this.#head) { - this.#head = this.#next[index]; - } - else { - this.#next[this.#prev[index]] = this.#next[index]; - this.#prev[this.#next[index]] = this.#prev[index]; - } - this.#size--; - this.#free.push(index); - } - } - } - if (this.#hasDisposeAfter && this.#disposed?.length) { - const dt = this.#disposed; - let task; - while ((task = dt?.shift())) { - this.#disposeAfter?.(...task); - } - } - return deleted; - } - /** - * Clear the cache entirely, throwing away all values. - */ - clear() { - for (const index of this.#rindexes({ allowStale: true })) { - const v = this.#valList[index]; - if (this.#isBackgroundFetch(v)) { - v.__abortController.abort(new Error('deleted')); - } - else { - const k = this.#keyList[index]; - if (this.#hasDispose) { - this.#dispose?.(v, k, 'delete'); - } - if (this.#hasDisposeAfter) { - this.#disposed?.push([v, k, 'delete']); - } - } - } - this.#keyMap.clear(); - this.#valList.fill(undefined); - this.#keyList.fill(undefined); - if (this.#ttls && this.#starts) { - this.#ttls.fill(0); - this.#starts.fill(0); - } - if (this.#sizes) { - this.#sizes.fill(0); - } - this.#head = 0; - this.#tail = 0; - this.#free.length = 0; - this.#calculatedSize = 0; - this.#size = 0; - if (this.#hasDisposeAfter && this.#disposed) { - const dt = this.#disposed; - let task; - while ((task = dt?.shift())) { - this.#disposeAfter?.(...task); - } - } - } -} -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/deps/npm/node_modules/path-scurry/node_modules/lru-cache/dist/mjs/index.min.js b/deps/npm/node_modules/path-scurry/node_modules/lru-cache/dist/mjs/index.min.js deleted file mode 100644 index 44bd1c23b86e74..00000000000000 --- a/deps/npm/node_modules/path-scurry/node_modules/lru-cache/dist/mjs/index.min.js +++ /dev/null @@ -1,2 +0,0 @@ -var U=(o,t,e)=>{if(!t.has(o))throw TypeError("Cannot "+e)};var I=(o,t,e)=>(U(o,t,"read from private field"),e?e.call(o):t.get(o)),j=(o,t,e)=>{if(t.has(o))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(o):t.set(o,e)},D=(o,t,e,i)=>(U(o,t,"write to private field"),i?i.call(o,e):t.set(o,e),e);var v=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,M=new Set,L=typeof process=="object"&&process?process:{},P=(o,t,e,i)=>{typeof L.emitWarning=="function"?L.emitWarning(o,t,e,i):console.error(`[${e}] ${t}: ${o}`)},R=globalThis.AbortController,N=globalThis.AbortSignal;if(typeof R>"u"){N=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(i,s){this._onabort.push(s)}},R=class{constructor(){t()}signal=new N;abort(i){if(!this.signal.aborted){this.signal.reason=i,this.signal.aborted=!0;for(let s of this.signal._onabort)s(i);this.signal.onabort?.(i)}}};let o=L.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",t=()=>{o&&(o=!1,P("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",t))}}var V=o=>!M.has(o),Y=Symbol("type"),m=o=>o&&o===Math.floor(o)&&o>0&&isFinite(o),k=o=>m(o)?o<=Math.pow(2,8)?Uint8Array:o<=Math.pow(2,16)?Uint16Array:o<=Math.pow(2,32)?Uint32Array:o<=Number.MAX_SAFE_INTEGER?z:null:null,z=class extends Array{constructor(t){super(t),this.fill(0)}},E,T=class{heap;length;static create(t){let e=k(t);if(!e)return[];D(T,E,!0);let i=new T(t,e);return D(T,E,!1),i}constructor(t,e){if(!I(T,E))throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new e(t),this.length=0}push(t){this.heap[this.length++]=t}pop(){return this.heap[--this.length]}},C=T;E=new WeakMap,j(C,E,!1);var W=class{#d;#f;#_;#g;#C;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#s;#p;#n;#i;#t;#l;#c;#o;#h;#w;#r;#m;#F;#S;#b;#T;#a;static unsafeExposeInternals(t){return{starts:t.#F,ttls:t.#S,sizes:t.#m,keyMap:t.#n,keyList:t.#i,valList:t.#t,next:t.#l,prev:t.#c,get head(){return t.#o},get tail(){return t.#h},free:t.#w,isBackgroundFetch:e=>t.#e(e),backgroundFetch:(e,i,s,n)=>t.#D(e,i,s,n),moveToTail:e=>t.#v(e),indexes:e=>t.#y(e),rindexes:e=>t.#A(e),isStale:e=>t.#u(e)}}get max(){return this.#d}get maxSize(){return this.#f}get calculatedSize(){return this.#p}get size(){return this.#s}get fetchMethod(){return this.#C}get dispose(){return this.#_}get disposeAfter(){return this.#g}constructor(t){let{max:e=0,ttl:i,ttlResolution:s=1,ttlAutopurge:n,updateAgeOnGet:h,updateAgeOnHas:a,allowStale:r,dispose:u,disposeAfter:b,noDisposeOnSet:f,noUpdateTTL:d,maxSize:p=0,maxEntrySize:F=0,sizeCalculation:c,fetchMethod:w,noDeleteOnFetchRejection:l,noDeleteOnStaleGet:S,allowStaleOnFetchRejection:y,allowStaleOnFetchAbort:g,ignoreFetchAbort:_}=t;if(e!==0&&!m(e))throw new TypeError("max option must be a nonnegative integer");let O=e?k(e):Array;if(!O)throw new Error("invalid max value: "+e);if(this.#d=e,this.#f=p,this.maxEntrySize=F||this.#f,this.sizeCalculation=c,this.sizeCalculation){if(!this.#f&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(w!==void 0&&typeof w!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#C=w,this.#T=!!w,this.#n=new Map,this.#i=new Array(e).fill(void 0),this.#t=new Array(e).fill(void 0),this.#l=new O(e),this.#c=new O(e),this.#o=0,this.#h=0,this.#w=C.create(e),this.#s=0,this.#p=0,typeof u=="function"&&(this.#_=u),typeof b=="function"?(this.#g=b,this.#r=[]):(this.#g=void 0,this.#r=void 0),this.#b=!!this.#_,this.#a=!!this.#g,this.noDisposeOnSet=!!f,this.noUpdateTTL=!!d,this.noDeleteOnFetchRejection=!!l,this.allowStaleOnFetchRejection=!!y,this.allowStaleOnFetchAbort=!!g,this.ignoreFetchAbort=!!_,this.maxEntrySize!==0){if(this.#f!==0&&!m(this.#f))throw new TypeError("maxSize must be a positive integer if specified");if(!m(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#j()}if(this.allowStale=!!r,this.noDeleteOnStaleGet=!!S,this.updateAgeOnGet=!!h,this.updateAgeOnHas=!!a,this.ttlResolution=m(s)||s===0?s:1,this.ttlAutopurge=!!n,this.ttl=i||0,this.ttl){if(!m(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#L()}if(this.#d===0&&this.ttl===0&&this.#f===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#d&&!this.#f){let A="LRU_CACHE_UNBOUNDED";V(A)&&(M.add(A),P("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",A,W))}}getRemainingTTL(t){return this.#n.has(t)?1/0:0}#L(){let t=new z(this.#d),e=new z(this.#d);this.#S=t,this.#F=e,this.#x=(n,h,a=v.now())=>{if(e[n]=h!==0?a:0,t[n]=h,h!==0&&this.ttlAutopurge){let r=setTimeout(()=>{this.#u(n)&&this.delete(this.#i[n])},h+1);r.unref&&r.unref()}},this.#z=n=>{e[n]=t[n]!==0?v.now():0},this.#O=(n,h)=>{if(t[h]){let a=t[h],r=e[h];n.ttl=a,n.start=r,n.now=i||s();let u=n.now-r;n.remainingTTL=a-u}};let i=0,s=()=>{let n=v.now();if(this.ttlResolution>0){i=n;let h=setTimeout(()=>i=0,this.ttlResolution);h.unref&&h.unref()}return n};this.getRemainingTTL=n=>{let h=this.#n.get(n);if(h===void 0)return 0;let a=t[h],r=e[h];if(a===0||r===0)return 1/0;let u=(i||s())-r;return a-u},this.#u=n=>t[n]!==0&&e[n]!==0&&(i||s())-e[n]>t[n]}#z=()=>{};#O=()=>{};#x=()=>{};#u=()=>!1;#j(){let t=new z(this.#d);this.#p=0,this.#m=t,this.#E=e=>{this.#p-=t[e],t[e]=0},this.#G=(e,i,s,n)=>{if(this.#e(i))return 0;if(!m(s))if(n){if(typeof n!="function")throw new TypeError("sizeCalculation must be a function");if(s=n(i,e),!m(s))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return s},this.#R=(e,i,s)=>{if(t[e]=i,this.#f){let n=this.#f-t[e];for(;this.#p>n;)this.#W(!0)}this.#p+=t[e],s&&(s.entrySize=i,s.totalCalculatedSize=this.#p)}}#E=t=>{};#R=(t,e,i)=>{};#G=(t,e,i,s)=>{if(i||s)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#y({allowStale:t=this.allowStale}={}){if(this.#s)for(let e=this.#h;!(!this.#U(e)||((t||!this.#u(e))&&(yield e),e===this.#o));)e=this.#c[e]}*#A({allowStale:t=this.allowStale}={}){if(this.#s)for(let e=this.#o;!(!this.#U(e)||((t||!this.#u(e))&&(yield e),e===this.#h));)e=this.#l[e]}#U(t){return t!==void 0&&this.#n.get(this.#i[t])===t}*entries(){for(let t of this.#y())this.#t[t]!==void 0&&this.#i[t]!==void 0&&!this.#e(this.#t[t])&&(yield[this.#i[t],this.#t[t]])}*rentries(){for(let t of this.#A())this.#t[t]!==void 0&&this.#i[t]!==void 0&&!this.#e(this.#t[t])&&(yield[this.#i[t],this.#t[t]])}*keys(){for(let t of this.#y()){let e=this.#i[t];e!==void 0&&!this.#e(this.#t[t])&&(yield e)}}*rkeys(){for(let t of this.#A()){let e=this.#i[t];e!==void 0&&!this.#e(this.#t[t])&&(yield e)}}*values(){for(let t of this.#y())this.#t[t]!==void 0&&!this.#e(this.#t[t])&&(yield this.#t[t])}*rvalues(){for(let t of this.#A())this.#t[t]!==void 0&&!this.#e(this.#t[t])&&(yield this.#t[t])}[Symbol.iterator](){return this.entries()}find(t,e={}){for(let i of this.#y()){let s=this.#t[i],n=this.#e(s)?s.__staleWhileFetching:s;if(n!==void 0&&t(n,this.#i[i],this))return this.get(this.#i[i],e)}}forEach(t,e=this){for(let i of this.#y()){let s=this.#t[i],n=this.#e(s)?s.__staleWhileFetching:s;n!==void 0&&t.call(e,n,this.#i[i],this)}}rforEach(t,e=this){for(let i of this.#A()){let s=this.#t[i],n=this.#e(s)?s.__staleWhileFetching:s;n!==void 0&&t.call(e,n,this.#i[i],this)}}purgeStale(){let t=!1;for(let e of this.#A({allowStale:!0}))this.#u(e)&&(this.delete(this.#i[e]),t=!0);return t}dump(){let t=[];for(let e of this.#y({allowStale:!0})){let i=this.#i[e],s=this.#t[e],n=this.#e(s)?s.__staleWhileFetching:s;if(n===void 0||i===void 0)continue;let h={value:n};if(this.#S&&this.#F){h.ttl=this.#S[e];let a=v.now()-this.#F[e];h.start=Math.floor(Date.now()-a)}this.#m&&(h.size=this.#m[e]),t.unshift([i,h])}return t}load(t){this.clear();for(let[e,i]of t){if(i.start){let s=Date.now()-i.start;i.start=v.now()-s}this.set(e,i.value,i)}}set(t,e,i={}){if(e===void 0)return this.delete(t),this;let{ttl:s=this.ttl,start:n,noDisposeOnSet:h=this.noDisposeOnSet,sizeCalculation:a=this.sizeCalculation,status:r}=i,{noUpdateTTL:u=this.noUpdateTTL}=i,b=this.#G(t,e,i.size||0,a);if(this.maxEntrySize&&b>this.maxEntrySize)return r&&(r.set="miss",r.maxEntrySizeExceeded=!0),this.delete(t),this;let f=this.#s===0?void 0:this.#n.get(t);if(f===void 0)f=this.#s===0?this.#h:this.#w.length!==0?this.#w.pop():this.#s===this.#d?this.#W(!1):this.#s,this.#i[f]=t,this.#t[f]=e,this.#n.set(t,f),this.#l[this.#h]=f,this.#c[f]=this.#h,this.#h=f,this.#s++,this.#R(f,b,r),r&&(r.set="add"),u=!1;else{this.#v(f);let d=this.#t[f];if(e!==d){if(this.#T&&this.#e(d)?d.__abortController.abort(new Error("replaced")):h||(this.#b&&this.#_?.(d,t,"set"),this.#a&&this.#r?.push([d,t,"set"])),this.#E(f),this.#R(f,b,r),this.#t[f]=e,r){r.set="replace";let p=d&&this.#e(d)?d.__staleWhileFetching:d;p!==void 0&&(r.oldValue=p)}}else r&&(r.set="update")}if(s!==0&&!this.#S&&this.#L(),this.#S&&(u||this.#x(f,s,n),r&&this.#O(r,f)),!h&&this.#a&&this.#r){let d=this.#r,p;for(;p=d?.shift();)this.#g?.(...p)}return this}pop(){try{for(;this.#s;){let t=this.#t[this.#o];if(this.#W(!0),this.#e(t)){if(t.__staleWhileFetching)return t.__staleWhileFetching}else if(t!==void 0)return t}}finally{if(this.#a&&this.#r){let t=this.#r,e;for(;e=t?.shift();)this.#g?.(...e)}}}#W(t){let e=this.#o,i=this.#i[e],s=this.#t[e];return this.#T&&this.#e(s)?s.__abortController.abort(new Error("evicted")):(this.#b||this.#a)&&(this.#b&&this.#_?.(s,i,"evict"),this.#a&&this.#r?.push([s,i,"evict"])),this.#E(e),t&&(this.#i[e]=void 0,this.#t[e]=void 0,this.#w.push(e)),this.#s===1?(this.#o=this.#h=0,this.#w.length=0):this.#o=this.#l[e],this.#n.delete(i),this.#s--,e}has(t,e={}){let{updateAgeOnHas:i=this.updateAgeOnHas,status:s}=e,n=this.#n.get(t);if(n!==void 0){let h=this.#t[n];if(this.#e(h)&&h.__staleWhileFetching===void 0)return!1;if(this.#u(n))s&&(s.has="stale",this.#O(s,n));else return i&&this.#z(n),s&&(s.has="hit",this.#O(s,n)),!0}else s&&(s.has="miss");return!1}peek(t,e={}){let{allowStale:i=this.allowStale}=e,s=this.#n.get(t);if(s!==void 0&&(i||!this.#u(s))){let n=this.#t[s];return this.#e(n)?n.__staleWhileFetching:n}}#D(t,e,i,s){let n=e===void 0?void 0:this.#t[e];if(this.#e(n))return n;let h=new R,{signal:a}=i;a?.addEventListener("abort",()=>h.abort(a.reason),{signal:h.signal});let r={signal:h.signal,options:i,context:s},u=(c,w=!1)=>{let{aborted:l}=h.signal,S=i.ignoreFetchAbort&&c!==void 0;if(i.status&&(l&&!w?(i.status.fetchAborted=!0,i.status.fetchError=h.signal.reason,S&&(i.status.fetchAbortIgnored=!0)):i.status.fetchResolved=!0),l&&!S&&!w)return f(h.signal.reason);let y=p;return this.#t[e]===p&&(c===void 0?y.__staleWhileFetching?this.#t[e]=y.__staleWhileFetching:this.delete(t):(i.status&&(i.status.fetchUpdated=!0),this.set(t,c,r.options))),c},b=c=>(i.status&&(i.status.fetchRejected=!0,i.status.fetchError=c),f(c)),f=c=>{let{aborted:w}=h.signal,l=w&&i.allowStaleOnFetchAbort,S=l||i.allowStaleOnFetchRejection,y=S||i.noDeleteOnFetchRejection,g=p;if(this.#t[e]===p&&(!y||g.__staleWhileFetching===void 0?this.delete(t):l||(this.#t[e]=g.__staleWhileFetching)),S)return i.status&&g.__staleWhileFetching!==void 0&&(i.status.returnedStale=!0),g.__staleWhileFetching;if(g.__returned===g)throw c},d=(c,w)=>{let l=this.#C?.(t,n,r);l&&l instanceof Promise&&l.then(S=>c(S),w),h.signal.addEventListener("abort",()=>{(!i.ignoreFetchAbort||i.allowStaleOnFetchAbort)&&(c(),i.allowStaleOnFetchAbort&&(c=S=>u(S,!0)))})};i.status&&(i.status.fetchDispatched=!0);let p=new Promise(d).then(u,b),F=Object.assign(p,{__abortController:h,__staleWhileFetching:n,__returned:void 0});return e===void 0?(this.set(t,F,{...r.options,status:void 0}),e=this.#n.get(t)):this.#t[e]=F,F}#e(t){if(!this.#T)return!1;let e=t;return!!e&&e instanceof Promise&&e.hasOwnProperty("__staleWhileFetching")&&e.__abortController instanceof R}async fetch(t,e={}){let{allowStale:i=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,ttl:h=this.ttl,noDisposeOnSet:a=this.noDisposeOnSet,size:r=0,sizeCalculation:u=this.sizeCalculation,noUpdateTTL:b=this.noUpdateTTL,noDeleteOnFetchRejection:f=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:d=this.allowStaleOnFetchRejection,ignoreFetchAbort:p=this.ignoreFetchAbort,allowStaleOnFetchAbort:F=this.allowStaleOnFetchAbort,context:c,forceRefresh:w=!1,status:l,signal:S}=e;if(!this.#T)return l&&(l.fetch="get"),this.get(t,{allowStale:i,updateAgeOnGet:s,noDeleteOnStaleGet:n,status:l});let y={allowStale:i,updateAgeOnGet:s,noDeleteOnStaleGet:n,ttl:h,noDisposeOnSet:a,size:r,sizeCalculation:u,noUpdateTTL:b,noDeleteOnFetchRejection:f,allowStaleOnFetchRejection:d,allowStaleOnFetchAbort:F,ignoreFetchAbort:p,status:l,signal:S},g=this.#n.get(t);if(g===void 0){l&&(l.fetch="miss");let _=this.#D(t,g,y,c);return _.__returned=_}else{let _=this.#t[g];if(this.#e(_)){let G=i&&_.__staleWhileFetching!==void 0;return l&&(l.fetch="inflight",G&&(l.returnedStale=!0)),G?_.__staleWhileFetching:_.__returned=_}let O=this.#u(g);if(!w&&!O)return l&&(l.fetch="hit"),this.#v(g),s&&this.#z(g),l&&this.#O(l,g),_;let A=this.#D(t,g,y,c),x=A.__staleWhileFetching!==void 0&&i;return l&&(l.fetch=O?"stale":"refresh",x&&O&&(l.returnedStale=!0)),x?A.__staleWhileFetching:A.__returned=A}}get(t,e={}){let{allowStale:i=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,status:h}=e,a=this.#n.get(t);if(a!==void 0){let r=this.#t[a],u=this.#e(r);return h&&this.#O(h,a),this.#u(a)?(h&&(h.get="stale"),u?(h&&i&&r.__staleWhileFetching!==void 0&&(h.returnedStale=!0),i?r.__staleWhileFetching:void 0):(n||this.delete(t),h&&i&&(h.returnedStale=!0),i?r:void 0)):(h&&(h.get="hit"),u?r.__staleWhileFetching:(this.#v(a),s&&this.#z(a),r))}else h&&(h.get="miss")}#I(t,e){this.#c[e]=t,this.#l[t]=e}#v(t){t!==this.#h&&(t===this.#o?this.#o=this.#l[t]:this.#I(this.#c[t],this.#l[t]),this.#I(this.#h,t),this.#h=t)}delete(t){let e=!1;if(this.#s!==0){let i=this.#n.get(t);if(i!==void 0)if(e=!0,this.#s===1)this.clear();else{this.#E(i);let s=this.#t[i];this.#e(s)?s.__abortController.abort(new Error("deleted")):(this.#b||this.#a)&&(this.#b&&this.#_?.(s,t,"delete"),this.#a&&this.#r?.push([s,t,"delete"])),this.#n.delete(t),this.#i[i]=void 0,this.#t[i]=void 0,i===this.#h?this.#h=this.#c[i]:i===this.#o?this.#o=this.#l[i]:(this.#l[this.#c[i]]=this.#l[i],this.#c[this.#l[i]]=this.#c[i]),this.#s--,this.#w.push(i)}}if(this.#a&&this.#r?.length){let i=this.#r,s;for(;s=i?.shift();)this.#g?.(...s)}return e}clear(){for(let t of this.#A({allowStale:!0})){let e=this.#t[t];if(this.#e(e))e.__abortController.abort(new Error("deleted"));else{let i=this.#i[t];this.#b&&this.#_?.(e,i,"delete"),this.#a&&this.#r?.push([e,i,"delete"])}}if(this.#n.clear(),this.#t.fill(void 0),this.#i.fill(void 0),this.#S&&this.#F&&(this.#S.fill(0),this.#F.fill(0)),this.#m&&this.#m.fill(0),this.#o=0,this.#h=0,this.#w.length=0,this.#p=0,this.#s=0,this.#a&&this.#r){let t=this.#r,e;for(;e=t?.shift();)this.#g?.(...e)}}};export{W as LRUCache}; -//# sourceMappingURL=index.min.js.map diff --git a/deps/npm/node_modules/path-scurry/node_modules/lru-cache/dist/mjs/package.json b/deps/npm/node_modules/path-scurry/node_modules/lru-cache/dist/mjs/package.json deleted file mode 100644 index 3dbc1ca591c055..00000000000000 --- a/deps/npm/node_modules/path-scurry/node_modules/lru-cache/dist/mjs/package.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "type": "module" -} diff --git a/deps/npm/node_modules/path-scurry/node_modules/lru-cache/package.json b/deps/npm/node_modules/path-scurry/node_modules/lru-cache/package.json deleted file mode 100644 index 69a20582ff9b6f..00000000000000 --- a/deps/npm/node_modules/path-scurry/node_modules/lru-cache/package.json +++ /dev/null @@ -1,109 +0,0 @@ -{ - "name": "lru-cache", - "description": "A cache object that deletes the least-recently-used items.", - "version": "9.1.1", - "author": "Isaac Z. Schlueter ", - "keywords": [ - "mru", - "lru", - "cache" - ], - "sideEffects": false, - "scripts": { - "build": "npm run prepare", - "preprepare": "rm -rf dist", - "prepare": "tsc -p tsconfig.json && tsc -p tsconfig-esm.json", - "postprepare": "bash fixup.sh", - "pretest": "npm run prepare", - "presnap": "npm run prepare", - "test": "c8 tap", - "snap": "c8 tap", - "preversion": "npm test", - "postversion": "npm publish", - "prepublishOnly": "git push origin --follow-tags", - "format": "prettier --write .", - "typedoc": "typedoc --tsconfig tsconfig-esm.json ./src/*.ts", - "benchmark-results-typedoc": "bash scripts/benchmark-results-typedoc.sh", - "prebenchmark": "npm run prepare", - "benchmark": "make -C benchmark", - "preprofile": "npm run prepare", - "profile": "make -C benchmark profile" - }, - "main": "./dist/cjs/index.js", - "module": "./dist/mjs/index.js", - "exports": { - "./min": { - "import": { - "types": "./dist/mjs/index.d.ts", - "default": "./dist/mjs/index.min.js" - }, - "require": { - "types": "./dist/cjs/index.d.ts", - "default": "./dist/cjs/index.min.js" - } - }, - ".": { - "import": { - "types": "./dist/mjs/index.d.ts", - "default": "./dist/mjs/index.js" - }, - "require": { - "types": "./dist/cjs/index.d.ts", - "default": "./dist/cjs/index.js" - } - } - }, - "repository": "git://github.com/isaacs/node-lru-cache.git", - "devDependencies": { - "@size-limit/preset-small-lib": "^7.0.8", - "@types/node": "^17.0.31", - "@types/tap": "^15.0.6", - "benchmark": "^2.1.4", - "c8": "^7.11.2", - "clock-mock": "^1.0.6", - "esbuild": "^0.17.11", - "eslint-config-prettier": "^8.5.0", - "marked": "^4.2.12", - "mkdirp": "^2.1.5", - "prettier": "^2.6.2", - "size-limit": "^7.0.8", - "tap": "^16.3.4", - "ts-node": "^10.7.0", - "tslib": "^2.4.0", - "typedoc": "^0.23.24", - "typescript": "^4.6.4" - }, - "license": "ISC", - "files": [ - "dist" - ], - "engines": { - "node": "14 || >=16.14" - }, - "prettier": { - "semi": false, - "printWidth": 70, - "tabWidth": 2, - "useTabs": false, - "singleQuote": true, - "jsxSingleQuote": false, - "bracketSameLine": true, - "arrowParens": "avoid", - "endOfLine": "lf" - }, - "tap": { - "coverage": false, - "node-arg": [ - "--expose-gc", - "--no-warnings", - "--loader", - "ts-node/esm" - ], - "ts": false - }, - "size-limit": [ - { - "path": "./dist/mjs/index.js" - } - ] -} diff --git a/deps/npm/node_modules/path-scurry/package.json b/deps/npm/node_modules/path-scurry/package.json index bb282b966c53c1..aea462a316a4a8 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.6.3", "description": "walk paths fast and efficiently", "author": "Isaac Z. Schlueter (https://blog.izs.me)", "main": "./dist/cjs/index.js", @@ -62,13 +62,13 @@ "@types/tap": "^15.0.7", "c8": "^7.12.0", "eslint-config-prettier": "^8.6.0", - "mkdirp": "^3.0.0", + "mkdirp": "^2.1.3", "prettier": "^2.8.3", "rimraf": "^4.1.2", "tap": "^16.3.4", "ts-node": "^10.9.1", "typedoc": "^0.23.24", - "typescript": "^5.0.4" + "typescript": "^4.9.4" }, "engines": { "node": ">=16 || 14 >=14.17" @@ -81,7 +81,7 @@ "url": "git+https://github.com/isaacs/path-walker" }, "dependencies": { - "lru-cache": "^9.0.0", - "minipass": "^5.0.0" + "lru-cache": "^7.14.1", + "minipass": "^4.0.2" } } diff --git a/deps/npm/node_modules/postcss-selector-parser/dist/index.js b/deps/npm/node_modules/postcss-selector-parser/dist/index.js index 995741a7ff3bef..6e76a32bdd4426 100644 --- a/deps/npm/node_modules/postcss-selector-parser/dist/index.js +++ b/deps/npm/node_modules/postcss-selector-parser/dist/index.js @@ -2,14 +2,21 @@ exports.__esModule = true; exports["default"] = void 0; + var _processor = _interopRequireDefault(require("./processor")); + var selectors = _interopRequireWildcard(require("./selectors")); -function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } -function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } + +function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + var parser = function parser(processor) { return new _processor["default"](processor); }; + Object.assign(parser, selectors); delete parser.__esModule; var _default = parser; 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..b97a0fab366488 100644 --- a/deps/npm/node_modules/postcss-selector-parser/dist/parser.js +++ b/deps/npm/node_modules/postcss-selector-parser/dist/parser.js @@ -2,43 +2,70 @@ exports.__esModule = true; exports["default"] = void 0; + var _root = _interopRequireDefault(require("./selectors/root")); + var _selector = _interopRequireDefault(require("./selectors/selector")); + var _className = _interopRequireDefault(require("./selectors/className")); + var _comment = _interopRequireDefault(require("./selectors/comment")); + var _id = _interopRequireDefault(require("./selectors/id")); + var _tag = _interopRequireDefault(require("./selectors/tag")); + var _string = _interopRequireDefault(require("./selectors/string")); + var _pseudo = _interopRequireDefault(require("./selectors/pseudo")); + var _attribute = _interopRequireWildcard(require("./selectors/attribute")); + var _universal = _interopRequireDefault(require("./selectors/universal")); + var _combinator = _interopRequireDefault(require("./selectors/combinator")); + var _nesting = _interopRequireDefault(require("./selectors/nesting")); + var _sortAscending = _interopRequireDefault(require("./sortAscending")); + var _tokenize = _interopRequireWildcard(require("./tokenize")); + var tokens = _interopRequireWildcard(require("./tokenTypes")); + var types = _interopRequireWildcard(require("./selectors/types")); + var _util = require("./util"); + var _WHITESPACE_TOKENS, _Object$assign; -function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } -function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } + +function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + var WHITESPACE_TOKENS = (_WHITESPACE_TOKENS = {}, _WHITESPACE_TOKENS[tokens.space] = true, _WHITESPACE_TOKENS[tokens.cr] = true, _WHITESPACE_TOKENS[tokens.feed] = true, _WHITESPACE_TOKENS[tokens.newline] = true, _WHITESPACE_TOKENS[tokens.tab] = true, _WHITESPACE_TOKENS); var WHITESPACE_EQUIV_TOKENS = Object.assign({}, WHITESPACE_TOKENS, (_Object$assign = {}, _Object$assign[tokens.comment] = true, _Object$assign)); + function tokenStart(token) { return { line: token[_tokenize.FIELDS.START_LINE], column: token[_tokenize.FIELDS.START_COL] }; } + function tokenEnd(token) { return { line: token[_tokenize.FIELDS.END_LINE], column: token[_tokenize.FIELDS.END_COL] }; } + function getSource(startLine, startColumn, endLine, endColumn) { return { start: { @@ -51,48 +78,62 @@ function getSource(startLine, startColumn, endLine, endColumn) { } }; } + function getTokenSource(token) { return getSource(token[_tokenize.FIELDS.START_LINE], token[_tokenize.FIELDS.START_COL], token[_tokenize.FIELDS.END_LINE], token[_tokenize.FIELDS.END_COL]); } + function getTokenSourceSpan(startToken, endToken) { if (!startToken) { return undefined; } + return getSource(startToken[_tokenize.FIELDS.START_LINE], startToken[_tokenize.FIELDS.START_COL], endToken[_tokenize.FIELDS.END_LINE], endToken[_tokenize.FIELDS.END_COL]); } + function unescapeProp(node, prop) { var value = node[prop]; + if (typeof value !== "string") { return; } + if (value.indexOf("\\") !== -1) { (0, _util.ensureObject)(node, 'raws'); node[prop] = (0, _util.unesc)(value); + if (node.raws[prop] === undefined) { node.raws[prop] = value; } } + return node; } + function indexesOf(array, item) { var i = -1; var indexes = []; + while ((i = array.indexOf(item, i + 1)) !== -1) { indexes.push(i); } + return indexes; } + function uniqs() { var list = Array.prototype.concat.apply([], arguments); return list.filter(function (item, i) { return i === list.indexOf(item); }); } + var Parser = /*#__PURE__*/function () { function Parser(rule, options) { if (options === void 0) { options = {}; } + this.rule = rule; this.options = Object.assign({ lossy: false, @@ -122,44 +163,56 @@ var Parser = /*#__PURE__*/function () { this.current = selector; this.loop(); } + var _proto = Parser.prototype; + _proto._errorGenerator = function _errorGenerator() { var _this = this; + return function (message, errorOptions) { if (typeof _this.rule === 'string') { return new Error(message); } + return _this.rule.error(message, errorOptions); }; }; + _proto.attribute = function attribute() { var attr = []; var startingToken = this.currToken; this.position++; + while (this.position < this.tokens.length && this.currToken[_tokenize.FIELDS.TYPE] !== tokens.closeSquare) { attr.push(this.currToken); this.position++; } + if (this.currToken[_tokenize.FIELDS.TYPE] !== tokens.closeSquare) { return this.expected('closing square bracket', this.currToken[_tokenize.FIELDS.START_POS]); } + var len = attr.length; var node = { source: getSource(startingToken[1], startingToken[2], this.currToken[3], this.currToken[4]), sourceIndex: startingToken[_tokenize.FIELDS.START_POS] }; + if (len === 1 && !~[tokens.word].indexOf(attr[0][_tokenize.FIELDS.TYPE])) { return this.expected('attribute', attr[0][_tokenize.FIELDS.START_POS]); } + var pos = 0; var spaceBefore = ''; var commentBefore = ''; var lastAdded = null; var spaceAfterMeaningfulToken = false; + while (pos < len) { var token = attr[pos]; var content = this.content(token); var next = attr[pos + 1]; + switch (token[_tokenize.FIELDS.TYPE]) { case tokens.space: // if ( @@ -169,14 +222,17 @@ var Parser = /*#__PURE__*/function () { // return this.expected('attribute', token[TOKEN.START_POS], content); // } spaceAfterMeaningfulToken = true; + if (this.options.lossy) { break; } + if (lastAdded) { (0, _util.ensureObject)(node, 'spaces', lastAdded); var prevContent = node.spaces[lastAdded].after || ''; node.spaces[lastAdded].after = prevContent + content; var existingComment = (0, _util.getProp)(node, 'raws', 'spaces', lastAdded, 'after') || null; + if (existingComment) { node.raws.spaces[lastAdded].after = existingComment + content; } @@ -184,7 +240,9 @@ var Parser = /*#__PURE__*/function () { spaceBefore = spaceBefore + content; commentBefore = commentBefore + content; } + break; + case tokens.asterisk: if (next[_tokenize.FIELDS.TYPE] === tokens.equals) { node.operator = content; @@ -195,57 +253,72 @@ var Parser = /*#__PURE__*/function () { node.spaces.attribute.before = spaceBefore; spaceBefore = ''; } + if (commentBefore) { (0, _util.ensureObject)(node, 'raws', 'spaces', 'attribute'); node.raws.spaces.attribute.before = spaceBefore; commentBefore = ''; } + node.namespace = (node.namespace || "") + content; var rawValue = (0, _util.getProp)(node, 'raws', 'namespace') || null; + if (rawValue) { node.raws.namespace += content; } + lastAdded = 'namespace'; } + spaceAfterMeaningfulToken = false; break; + case tokens.dollar: if (lastAdded === "value") { var oldRawValue = (0, _util.getProp)(node, 'raws', 'value'); node.value += "$"; + if (oldRawValue) { node.raws.value = oldRawValue + "$"; } + break; } + // Falls through + case tokens.caret: if (next[_tokenize.FIELDS.TYPE] === tokens.equals) { node.operator = content; lastAdded = 'operator'; } + spaceAfterMeaningfulToken = false; break; + case tokens.combinator: if (content === '~' && next[_tokenize.FIELDS.TYPE] === tokens.equals) { node.operator = content; lastAdded = 'operator'; } + if (content !== '|') { spaceAfterMeaningfulToken = false; break; } + if (next[_tokenize.FIELDS.TYPE] === tokens.equals) { node.operator = content; lastAdded = 'operator'; } else if (!node.namespace && !node.attribute) { node.namespace = true; } + spaceAfterMeaningfulToken = false; break; + case tokens.word: - if (next && this.content(next) === '|' && attr[pos + 2] && attr[pos + 2][_tokenize.FIELDS.TYPE] !== tokens.equals && - // this look-ahead probably fails with comment nodes involved. + if (next && this.content(next) === '|' && attr[pos + 2] && attr[pos + 2][_tokenize.FIELDS.TYPE] !== tokens.equals && // this look-ahead probably fails with comment nodes involved. !node.operator && !node.namespace) { node.namespace = content; lastAdded = 'namespace'; @@ -255,42 +328,56 @@ var Parser = /*#__PURE__*/function () { node.spaces.attribute.before = spaceBefore; spaceBefore = ''; } + if (commentBefore) { (0, _util.ensureObject)(node, 'raws', 'spaces', 'attribute'); node.raws.spaces.attribute.before = commentBefore; commentBefore = ''; } + node.attribute = (node.attribute || "") + content; + var _rawValue = (0, _util.getProp)(node, 'raws', 'attribute') || null; + if (_rawValue) { node.raws.attribute += content; } + lastAdded = 'attribute'; } else if (!node.value && node.value !== "" || lastAdded === "value" && !(spaceAfterMeaningfulToken || node.quoteMark)) { var _unescaped = (0, _util.unesc)(content); + var _oldRawValue = (0, _util.getProp)(node, 'raws', 'value') || ''; + var oldValue = node.value || ''; node.value = oldValue + _unescaped; node.quoteMark = null; + if (_unescaped !== content || _oldRawValue) { (0, _util.ensureObject)(node, 'raws'); node.raws.value = (_oldRawValue || oldValue) + content; } + lastAdded = 'value'; } else { var insensitive = content === 'i' || content === "I"; + if ((node.value || node.value === '') && (node.quoteMark || spaceAfterMeaningfulToken)) { node.insensitive = insensitive; + if (!insensitive || content === "I") { (0, _util.ensureObject)(node, 'raws'); node.raws.insensitiveFlag = content; } + lastAdded = 'insensitive'; + if (spaceBefore) { (0, _util.ensureObject)(node, 'spaces', 'insensitive'); node.spaces.insensitive.before = spaceBefore; spaceBefore = ''; } + if (commentBefore) { (0, _util.ensureObject)(node, 'raws', 'spaces', 'insensitive'); node.raws.spaces.insensitive.before = commentBefore; @@ -299,22 +386,27 @@ var Parser = /*#__PURE__*/function () { } else if (node.value || node.value === '') { lastAdded = 'value'; node.value += content; + if (node.raws.value) { node.raws.value += content; } } } + spaceAfterMeaningfulToken = false; break; + case tokens.str: if (!node.attribute || !node.operator) { return this.error("Expected an attribute followed by an operator preceding the string.", { index: token[_tokenize.FIELDS.START_POS] }); } + var _unescapeValue = (0, _attribute.unescapeValue)(content), - unescaped = _unescapeValue.unescaped, - quoteMark = _unescapeValue.quoteMark; + unescaped = _unescapeValue.unescaped, + quoteMark = _unescapeValue.quoteMark; + node.value = unescaped; node.quoteMark = quoteMark; lastAdded = 'value'; @@ -322,19 +414,23 @@ var Parser = /*#__PURE__*/function () { node.raws.value = content; spaceAfterMeaningfulToken = false; break; + case tokens.equals: if (!node.attribute) { return this.expected('attribute', token[_tokenize.FIELDS.START_POS], content); } + if (node.value) { return this.error('Unexpected "=" found; an operator was already defined.', { index: token[_tokenize.FIELDS.START_POS] }); } + node.operator = node.operator ? node.operator + content : content; lastAdded = 'operator'; spaceAfterMeaningfulToken = false; break; + case tokens.comment: if (lastAdded) { if (spaceAfterMeaningfulToken || next && next[_tokenize.FIELDS.TYPE] === tokens.space || lastAdded === 'insensitive') { @@ -351,20 +447,23 @@ var Parser = /*#__PURE__*/function () { } else { commentBefore = commentBefore + content; } + break; + default: return this.error("Unexpected \"" + content + "\" found.", { index: token[_tokenize.FIELDS.START_POS] }); } + pos++; } + unescapeProp(node, "attribute"); unescapeProp(node, "namespace"); this.newNode(new _attribute["default"](node)); this.position++; } - /** * return a node containing meaningless garbage up to (but not including) the specified token position. * if the token position is negative, all remaining tokens are consumed. @@ -376,15 +475,19 @@ var Parser = /*#__PURE__*/function () { * a previous node's space metadata. * * In lossy mode, this returns only comments. - */; + */ + ; + _proto.parseWhitespaceEquivalentTokens = function parseWhitespaceEquivalentTokens(stopPosition) { if (stopPosition < 0) { stopPosition = this.tokens.length; } + var startPosition = this.position; var nodes = []; var space = ""; var lastComment = undefined; + do { if (WHITESPACE_TOKENS[this.currToken[_tokenize.FIELDS.TYPE]]) { if (!this.options.lossy) { @@ -392,10 +495,12 @@ var Parser = /*#__PURE__*/function () { } } else if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.comment) { var spaces = {}; + if (space) { spaces.before = space; space = ""; } + lastComment = new _comment["default"]({ value: this.content(), source: getTokenSource(this.currToken), @@ -405,6 +510,7 @@ var Parser = /*#__PURE__*/function () { nodes.push(lastComment); } } while (++this.position < stopPosition); + if (space) { if (lastComment) { lastComment.spaces.after = space; @@ -422,49 +528,62 @@ var Parser = /*#__PURE__*/function () { })); } } + return nodes; } - /** * * @param {*} nodes - */; + */ + ; + _proto.convertWhitespaceNodesToSpace = function convertWhitespaceNodesToSpace(nodes, requiredSpace) { var _this2 = this; + if (requiredSpace === void 0) { requiredSpace = false; } + var space = ""; var rawSpace = ""; nodes.forEach(function (n) { var spaceBefore = _this2.lossySpace(n.spaces.before, requiredSpace); + var rawSpaceBefore = _this2.lossySpace(n.rawSpaceBefore, requiredSpace); + space += spaceBefore + _this2.lossySpace(n.spaces.after, requiredSpace && spaceBefore.length === 0); rawSpace += spaceBefore + n.value + _this2.lossySpace(n.rawSpaceAfter, requiredSpace && rawSpaceBefore.length === 0); }); + if (rawSpace === space) { rawSpace = undefined; } + var result = { space: space, rawSpace: rawSpace }; return result; }; + _proto.isNamedCombinator = function isNamedCombinator(position) { if (position === void 0) { position = this.position; } + return this.tokens[position + 0] && this.tokens[position + 0][_tokenize.FIELDS.TYPE] === tokens.slash && this.tokens[position + 1] && this.tokens[position + 1][_tokenize.FIELDS.TYPE] === tokens.word && this.tokens[position + 2] && this.tokens[position + 2][_tokenize.FIELDS.TYPE] === tokens.slash; }; + _proto.namedCombinator = function namedCombinator() { if (this.isNamedCombinator()) { var nameRaw = this.content(this.tokens[this.position + 1]); var name = (0, _util.unesc)(nameRaw).toLowerCase(); var raws = {}; + if (name !== nameRaw) { raws.value = "/" + nameRaw + "/"; } + var node = new _combinator["default"]({ value: "/" + name + "/", source: getSource(this.currToken[_tokenize.FIELDS.START_LINE], this.currToken[_tokenize.FIELDS.START_COL], this.tokens[this.position + 2][_tokenize.FIELDS.END_LINE], this.tokens[this.position + 2][_tokenize.FIELDS.END_COL]), @@ -477,24 +596,32 @@ var Parser = /*#__PURE__*/function () { this.unexpected(); } }; + _proto.combinator = function combinator() { var _this3 = this; + if (this.content() === '|') { return this.namespace(); - } - // We need to decide between a space that's a descendant combinator and meaningless whitespace at the end of a selector. + } // We need to decide between a space that's a descendant combinator and meaningless whitespace at the end of a selector. + + var nextSigTokenPos = this.locateNextMeaningfulToken(this.position); + if (nextSigTokenPos < 0 || this.tokens[nextSigTokenPos][_tokenize.FIELDS.TYPE] === tokens.comma) { var nodes = this.parseWhitespaceEquivalentTokens(nextSigTokenPos); + if (nodes.length > 0) { var last = this.current.last; + if (last) { var _this$convertWhitespa = this.convertWhitespaceNodesToSpace(nodes), - space = _this$convertWhitespa.space, - rawSpace = _this$convertWhitespa.rawSpace; + space = _this$convertWhitespa.space, + rawSpace = _this$convertWhitespa.rawSpace; + if (rawSpace !== undefined) { last.rawSpaceAfter += rawSpace; } + last.spaces.after += space; } else { nodes.forEach(function (n) { @@ -502,14 +629,19 @@ var Parser = /*#__PURE__*/function () { }); } } + return; } + var firstToken = this.currToken; var spaceOrDescendantSelectorNodes = undefined; + if (nextSigTokenPos > this.position) { spaceOrDescendantSelectorNodes = this.parseWhitespaceEquivalentTokens(nextSigTokenPos); } + var node; + if (this.isNamedCombinator()) { node = this.namedCombinator(); } else if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.combinator) { @@ -519,31 +651,35 @@ var Parser = /*#__PURE__*/function () { sourceIndex: this.currToken[_tokenize.FIELDS.START_POS] }); this.position++; - } else if (WHITESPACE_TOKENS[this.currToken[_tokenize.FIELDS.TYPE]]) { - // pass + } else if (WHITESPACE_TOKENS[this.currToken[_tokenize.FIELDS.TYPE]]) {// pass } else if (!spaceOrDescendantSelectorNodes) { this.unexpected(); } + if (node) { if (spaceOrDescendantSelectorNodes) { var _this$convertWhitespa2 = this.convertWhitespaceNodesToSpace(spaceOrDescendantSelectorNodes), - _space = _this$convertWhitespa2.space, - _rawSpace = _this$convertWhitespa2.rawSpace; + _space = _this$convertWhitespa2.space, + _rawSpace = _this$convertWhitespa2.rawSpace; + node.spaces.before = _space; node.rawSpaceBefore = _rawSpace; } } else { // descendant combinator var _this$convertWhitespa3 = this.convertWhitespaceNodesToSpace(spaceOrDescendantSelectorNodes, true), - _space2 = _this$convertWhitespa3.space, - _rawSpace2 = _this$convertWhitespa3.rawSpace; + _space2 = _this$convertWhitespa3.space, + _rawSpace2 = _this$convertWhitespa3.rawSpace; + if (!_rawSpace2) { _rawSpace2 = _space2; } + var spaces = {}; var raws = { spaces: {} }; + if (_space2.endsWith(' ') && _rawSpace2.endsWith(' ')) { spaces.before = _space2.slice(0, _space2.length - 1); raws.spaces.before = _rawSpace2.slice(0, _rawSpace2.length - 1); @@ -553,6 +689,7 @@ var Parser = /*#__PURE__*/function () { } else { raws.value = _rawSpace2; } + node = new _combinator["default"]({ value: ' ', source: getTokenSourceSpan(firstToken, this.tokens[this.position - 1]), @@ -561,19 +698,24 @@ var Parser = /*#__PURE__*/function () { raws: raws }); } + if (this.currToken && this.currToken[_tokenize.FIELDS.TYPE] === tokens.space) { node.spaces.after = this.optionalSpace(this.content()); this.position++; } + return this.newNode(node); }; + _proto.comma = function comma() { if (this.position === this.tokens.length - 1) { this.root.trailingComma = true; this.position++; return; } + this.current._inferEndPosition(); + var selector = new _selector["default"]({ source: { start: tokenStart(this.tokens[this.position + 1]) @@ -583,6 +725,7 @@ var Parser = /*#__PURE__*/function () { this.current = selector; this.position++; }; + _proto.comment = function comment() { var current = this.currToken; this.newNode(new _comment["default"]({ @@ -592,25 +735,32 @@ var Parser = /*#__PURE__*/function () { })); this.position++; }; + _proto.error = function error(message, opts) { throw this.root.error(message, opts); }; + _proto.missingBackslash = function missingBackslash() { return this.error('Expected a backslash preceding the semicolon.', { index: this.currToken[_tokenize.FIELDS.START_POS] }); }; + _proto.missingParenthesis = function missingParenthesis() { return this.expected('opening parenthesis', this.currToken[_tokenize.FIELDS.START_POS]); }; + _proto.missingSquareBracket = function missingSquareBracket() { return this.expected('opening square bracket', this.currToken[_tokenize.FIELDS.START_POS]); }; + _proto.unexpected = function unexpected() { return this.error("Unexpected '" + this.content() + "'. Escaping special characters with \\ may help.", 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) { this.position++; return this.word(before); @@ -619,14 +769,17 @@ var Parser = /*#__PURE__*/function () { return this.universal(before); } }; + _proto.nesting = function nesting() { if (this.nextToken) { var nextContent = this.content(this.nextToken); + if (nextContent === "|") { this.position++; return; } } + var current = this.currToken; this.newNode(new _nesting["default"]({ value: this.content(), @@ -635,10 +788,12 @@ var Parser = /*#__PURE__*/function () { })); this.position++; }; + _proto.parentheses = function parentheses() { var last = this.current.last; var unbalanced = 1; this.position++; + if (last && last.type === types.PSEUDO) { var selector = new _selector["default"]({ source: { @@ -648,13 +803,16 @@ var Parser = /*#__PURE__*/function () { var cache = this.current; last.append(selector); this.current = selector; + while (this.position < this.tokens.length && unbalanced) { if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.openParenthesis) { unbalanced++; } + if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.closeParenthesis) { unbalanced--; } + if (unbalanced) { this.parse(); } else { @@ -663,6 +821,7 @@ var Parser = /*#__PURE__*/function () { this.position++; } } + this.current = cache; } else { // I think this case should be an error. It's used to implement a basic parse of media queries @@ -670,17 +829,21 @@ var Parser = /*#__PURE__*/function () { var parenStart = this.currToken; var parenValue = "("; var parenEnd; + while (this.position < this.tokens.length && unbalanced) { if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.openParenthesis) { unbalanced++; } + if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.closeParenthesis) { unbalanced--; } + parenEnd = this.currToken; parenValue += this.parseParenthesisToken(this.currToken); this.position++; } + if (last) { last.appendToPropertyAndEscape("value", parenValue, parenValue); } else { @@ -691,29 +854,37 @@ var Parser = /*#__PURE__*/function () { })); } } + if (unbalanced) { return this.expected('closing parenthesis', this.currToken[_tokenize.FIELDS.START_POS]); } }; + _proto.pseudo = function pseudo() { var _this4 = this; + var pseudoStr = ''; var startingToken = this.currToken; + while (this.currToken && this.currToken[_tokenize.FIELDS.TYPE] === tokens.colon) { pseudoStr += this.content(); this.position++; } + if (!this.currToken) { return this.expected(['pseudo-class', 'pseudo-element'], this.position - 1); } + if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.word) { this.splitWord(false, function (first, length) { pseudoStr += first; + _this4.newNode(new _pseudo["default"]({ value: pseudoStr, source: getTokenSourceSpan(startingToken, _this4.currToken), sourceIndex: startingToken[_tokenize.FIELDS.START_POS] })); + if (length > 1 && _this4.nextToken && _this4.nextToken[_tokenize.FIELDS.TYPE] === tokens.openParenthesis) { _this4.error('Misplaced parenthesis.', { index: _this4.nextToken[_tokenize.FIELDS.START_POS] @@ -724,9 +895,10 @@ var Parser = /*#__PURE__*/function () { return this.expected(['pseudo-class', 'pseudo-element'], this.currToken[_tokenize.FIELDS.START_POS]); } }; + _proto.space = function space() { - var content = this.content(); - // Handle space before and after the selector + var content = this.content(); // Handle space before and after the selector + if (this.position === 0 || this.prevToken[_tokenize.FIELDS.TYPE] === tokens.comma || this.prevToken[_tokenize.FIELDS.TYPE] === tokens.openParenthesis || this.current.nodes.every(function (node) { return node.type === 'comment'; })) { @@ -739,6 +911,7 @@ var Parser = /*#__PURE__*/function () { this.combinator(); } }; + _proto.string = function string() { var current = this.currToken; this.newNode(new _string["default"]({ @@ -748,12 +921,15 @@ var Parser = /*#__PURE__*/function () { })); this.position++; }; + _proto.universal = function universal(namespace) { var nextToken = this.nextToken; + if (nextToken && this.content(nextToken) === '|') { this.position++; return this.namespace(); } + var current = this.currToken; this.newNode(new _universal["default"]({ value: this.content(), @@ -762,51 +938,63 @@ var Parser = /*#__PURE__*/function () { }), namespace); this.position++; }; + _proto.splitWord = function splitWord(namespace, firstCallback) { var _this5 = this; + var nextToken = this.nextToken; var word = this.content(); + while (nextToken && ~[tokens.dollar, tokens.caret, tokens.equals, tokens.word].indexOf(nextToken[_tokenize.FIELDS.TYPE])) { this.position++; var current = this.content(); word += current; + if (current.lastIndexOf('\\') === current.length - 1) { var next = this.nextToken; + if (next && next[_tokenize.FIELDS.TYPE] === tokens.space) { word += this.requiredSpace(this.content(next)); this.position++; } } + nextToken = this.nextToken; } + var hasClass = indexesOf(word, '.').filter(function (i) { // Allow escaped dot within class name - var escapedDot = word[i - 1] === '\\'; - // Allow decimal numbers percent in @keyframes + var escapedDot = word[i - 1] === '\\'; // Allow decimal numbers percent in @keyframes + var isKeyframesPercent = /^\d+\.\d+%$/.test(word); return !escapedDot && !isKeyframesPercent; }); var hasId = indexesOf(word, '#').filter(function (i) { return word[i - 1] !== '\\'; - }); - // Eliminate Sass interpolations from the list of id indexes + }); // Eliminate Sass interpolations from the list of id indexes + var interpolations = indexesOf(word, '#{'); + if (interpolations.length) { hasId = hasId.filter(function (hashIndex) { return !~interpolations.indexOf(hashIndex); }); } + var indices = (0, _sortAscending["default"])(uniqs([0].concat(hasClass, hasId))); indices.forEach(function (ind, i) { var index = indices[i + 1] || word.length; var value = word.slice(ind, index); + if (i === 0 && firstCallback) { return firstCallback.call(_this5, value, indices.length); } + var node; var current = _this5.currToken; var sourceIndex = current[_tokenize.FIELDS.START_POS] + indices[i]; var source = getSource(current[1], current[2] + ind, current[3], current[2] + (index - 1)); + if (~hasClass.indexOf(ind)) { var classNameOpts = { value: value.slice(1), @@ -830,105 +1018,136 @@ var Parser = /*#__PURE__*/function () { unescapeProp(tagOpts, "value"); node = new _tag["default"](tagOpts); } - _this5.newNode(node, namespace); - // Ensure that the namespace is used only once + + _this5.newNode(node, namespace); // Ensure that the namespace is used only once + + namespace = null; }); this.position++; }; + _proto.word = function word(namespace) { var nextToken = this.nextToken; + if (nextToken && this.content(nextToken) === '|') { this.position++; return this.namespace(); } + return this.splitWord(namespace); }; + _proto.loop = function loop() { while (this.position < this.tokens.length) { this.parse(true); } + this.current._inferEndPosition(); + return this.root; }; + _proto.parse = function parse(throwOnParenthesis) { switch (this.currToken[_tokenize.FIELDS.TYPE]) { case tokens.space: this.space(); break; + case tokens.comment: this.comment(); break; + case tokens.openParenthesis: this.parentheses(); break; + case tokens.closeParenthesis: if (throwOnParenthesis) { this.missingParenthesis(); } + break; + case tokens.openSquare: this.attribute(); break; + case tokens.dollar: case tokens.caret: case tokens.equals: case tokens.word: this.word(); break; + case tokens.colon: this.pseudo(); break; + case tokens.comma: this.comma(); break; + case tokens.asterisk: this.universal(); break; + case tokens.ampersand: this.nesting(); break; + case tokens.slash: case tokens.combinator: this.combinator(); break; + case tokens.str: this.string(); break; // These cases throw; no break needed. + case tokens.closeSquare: this.missingSquareBracket(); + case tokens.semicolon: this.missingBackslash(); + default: this.unexpected(); } } - /** * Helpers - */; + */ + ; + _proto.expected = function expected(description, index, found) { if (Array.isArray(description)) { var last = description.pop(); description = description.join(', ') + " or " + last; } + var an = /^[aeiou]/.test(description[0]) ? 'an' : 'a'; + if (!found) { return this.error("Expected " + an + " " + description + ".", { index: index }); } + return this.error("Expected " + an + " " + description + ", found \"" + found + "\" instead.", { index: index }); }; + _proto.requiredSpace = function requiredSpace(space) { return this.options.lossy ? ' ' : space; }; + _proto.optionalSpace = function optionalSpace(space) { return this.options.lossy ? '' : space; }; + _proto.lossySpace = function lossySpace(space, required) { if (this.options.lossy) { return required ? ' ' : ''; @@ -936,37 +1155,47 @@ var Parser = /*#__PURE__*/function () { return space; } }; + _proto.parseParenthesisToken = function parseParenthesisToken(token) { var content = this.content(token); + if (token[_tokenize.FIELDS.TYPE] === tokens.space) { return this.requiredSpace(content); } else { return content; } }; + _proto.newNode = function newNode(node, namespace) { if (namespace) { if (/^ +$/.test(namespace)) { if (!this.options.lossy) { this.spaces = (this.spaces || '') + namespace; } + namespace = true; } + node.namespace = namespace; unescapeProp(node, "namespace"); } + if (this.spaces) { node.spaces.before = this.spaces; this.spaces = ''; } + return this.current.append(node); }; + _proto.content = function content(token) { if (token === void 0) { token = this.currToken; } + return this.css.slice(token[_tokenize.FIELDS.START_POS], token[_tokenize.FIELDS.END_POS]); }; + /** * returns the index of the next non-whitespace, non-comment token. * returns -1 if no meaningful token is found. @@ -975,7 +1204,9 @@ var Parser = /*#__PURE__*/function () { if (startPosition === void 0) { startPosition = this.position + 1; } + var searchPosition = startPosition; + while (searchPosition < this.tokens.length) { if (WHITESPACE_EQUIV_TOKENS[this.tokens[searchPosition][_tokenize.FIELDS.TYPE]]) { searchPosition++; @@ -984,8 +1215,10 @@ var Parser = /*#__PURE__*/function () { return searchPosition; } } + return -1; }; + _createClass(Parser, [{ key: "currToken", get: function get() { @@ -1002,7 +1235,9 @@ var Parser = /*#__PURE__*/function () { return this.tokens[this.position - 1]; } }]); + return Parser; }(); + exports["default"] = Parser; module.exports = exports.default; \ No newline at end of file diff --git a/deps/npm/node_modules/postcss-selector-parser/dist/processor.js b/deps/npm/node_modules/postcss-selector-parser/dist/processor.js index dbfa09188e63db..a00170c281f966 100644 --- a/deps/npm/node_modules/postcss-selector-parser/dist/processor.js +++ b/deps/npm/node_modules/postcss-selector-parser/dist/processor.js @@ -2,63 +2,83 @@ exports.__esModule = true; exports["default"] = void 0; + var _parser = _interopRequireDefault(require("./parser")); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + var Processor = /*#__PURE__*/function () { function Processor(func, options) { this.func = func || function noop() {}; + this.funcRes = null; this.options = options; } + var _proto = Processor.prototype; + _proto._shouldUpdateSelector = function _shouldUpdateSelector(rule, options) { if (options === void 0) { options = {}; } + var merged = Object.assign({}, this.options, options); + if (merged.updateSelector === false) { return false; } else { return typeof rule !== "string"; } }; + _proto._isLossy = function _isLossy(options) { if (options === void 0) { options = {}; } + var merged = Object.assign({}, this.options, options); + if (merged.lossless === false) { return true; } else { return false; } }; + _proto._root = function _root(rule, options) { if (options === void 0) { options = {}; } + var parser = new _parser["default"](rule, this._parseOptions(options)); return parser.root; }; + _proto._parseOptions = function _parseOptions(options) { return { lossy: this._isLossy(options) }; }; + _proto._run = function _run(rule, options) { var _this = this; + if (options === void 0) { options = {}; } + return new Promise(function (resolve, reject) { try { var root = _this._root(rule, options); + Promise.resolve(_this.func(root)).then(function (transform) { var string = undefined; + if (_this._shouldUpdateSelector(rule, options)) { string = root.toString(); rule.selector = string; } + return { transform: transform, root: root, @@ -71,100 +91,116 @@ var Processor = /*#__PURE__*/function () { } }); }; + _proto._runSync = function _runSync(rule, options) { if (options === void 0) { options = {}; } + var root = this._root(rule, options); + var transform = this.func(root); + if (transform && typeof transform.then === "function") { throw new Error("Selector processor returned a promise to a synchronous call."); } + var string = undefined; + if (options.updateSelector && typeof rule !== "string") { string = root.toString(); rule.selector = string; } + return { transform: transform, root: root, string: string }; } - /** * Process rule into a selector AST. * * @param rule {postcss.Rule | string} The css selector to be processed * @param options The options for processing * @returns {Promise} The AST of the selector after processing it. - */; + */ + ; + _proto.ast = function ast(rule, options) { return this._run(rule, options).then(function (result) { return result.root; }); } - /** * Process rule into a selector AST synchronously. * * @param rule {postcss.Rule | string} The css selector to be processed * @param options The options for processing * @returns {parser.Root} The AST of the selector after processing it. - */; + */ + ; + _proto.astSync = function astSync(rule, options) { return this._runSync(rule, options).root; } - /** * Process a selector into a transformed value asynchronously * * @param rule {postcss.Rule | string} The css selector to be processed * @param options The options for processing * @returns {Promise} The value returned by the processor. - */; + */ + ; + _proto.transform = function transform(rule, options) { return this._run(rule, options).then(function (result) { return result.transform; }); } - /** * Process a selector into a transformed value synchronously. * * @param rule {postcss.Rule | string} The css selector to be processed * @param options The options for processing * @returns {any} The value returned by the processor. - */; + */ + ; + _proto.transformSync = function transformSync(rule, options) { return this._runSync(rule, options).transform; } - /** * Process a selector into a new selector string asynchronously. * * @param rule {postcss.Rule | string} The css selector to be processed * @param options The options for processing * @returns {string} the selector after processing. - */; + */ + ; + _proto.process = function process(rule, options) { return this._run(rule, options).then(function (result) { return result.string || result.root.toString(); }); } - /** * Process a selector into a new selector string synchronously. * * @param rule {postcss.Rule | string} The css selector to be processed * @param options The options for processing * @returns {string} the selector after processing. - */; + */ + ; + _proto.processSync = function processSync(rule, options) { var result = this._runSync(rule, options); + return result.string || result.root.toString(); }; + return Processor; }(); + exports["default"] = Processor; module.exports = exports.default; \ No newline at end of file diff --git a/deps/npm/node_modules/postcss-selector-parser/dist/selectors/attribute.js b/deps/npm/node_modules/postcss-selector-parser/dist/selectors/attribute.js index 0351a22bfa597c..9edc30bf133dc5 100644 --- a/deps/npm/node_modules/postcss-selector-parser/dist/selectors/attribute.js +++ b/deps/npm/node_modules/postcss-selector-parser/dist/selectors/attribute.js @@ -1,70 +1,98 @@ "use strict"; exports.__esModule = true; -exports["default"] = void 0; exports.unescapeValue = unescapeValue; +exports["default"] = void 0; + var _cssesc = _interopRequireDefault(require("cssesc")); + var _unesc = _interopRequireDefault(require("../util/unesc")); + var _namespace = _interopRequireDefault(require("./namespace")); + var _types = require("./types"); + var _CSSESC_QUOTE_OPTIONS; + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } -function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + var deprecate = require("util-deprecate"); + var WRAPPED_IN_QUOTES = /^('|")([^]*)\1$/; var warnOfDeprecatedValueAssignment = deprecate(function () {}, "Assigning an attribute a value containing characters that might need to be escaped is deprecated. " + "Call attribute.setValue() instead."); var warnOfDeprecatedQuotedAssignment = deprecate(function () {}, "Assigning attr.quoted is deprecated and has no effect. Assign to attr.quoteMark instead."); var warnOfDeprecatedConstructor = deprecate(function () {}, "Constructing an Attribute selector with a value without specifying quoteMark is deprecated. Note: The value should be unescaped now."); + function unescapeValue(value) { var deprecatedUsage = false; var quoteMark = null; var unescaped = value; var m = unescaped.match(WRAPPED_IN_QUOTES); + if (m) { quoteMark = m[1]; unescaped = m[2]; } + unescaped = (0, _unesc["default"])(unescaped); + if (unescaped !== value) { deprecatedUsage = true; } + return { deprecatedUsage: deprecatedUsage, unescaped: unescaped, quoteMark: quoteMark }; } + function handleDeprecatedContructorOpts(opts) { if (opts.quoteMark !== undefined) { return opts; } + if (opts.value === undefined) { return opts; } + warnOfDeprecatedConstructor(); + var _unescapeValue = unescapeValue(opts.value), - quoteMark = _unescapeValue.quoteMark, - unescaped = _unescapeValue.unescaped; + quoteMark = _unescapeValue.quoteMark, + unescaped = _unescapeValue.unescaped; + if (!opts.raws) { opts.raws = {}; } + if (opts.raws.value === undefined) { opts.raws.value = opts.value; } + opts.value = unescaped; opts.quoteMark = quoteMark; return opts; } + var Attribute = /*#__PURE__*/function (_Namespace) { _inheritsLoose(Attribute, _Namespace); + function Attribute(opts) { var _this; + if (opts === void 0) { opts = {}; } + _this = _Namespace.call(this, handleDeprecatedContructorOpts(opts)) || this; _this.type = _types.ATTRIBUTE; _this.raws = _this.raws || {}; @@ -79,7 +107,6 @@ var Attribute = /*#__PURE__*/function (_Namespace) { _this._constructed = true; return _this; } - /** * Returns the Attribute's value quoted such that it would be legal to use * in the value of a css file. The original value's quotation setting @@ -101,34 +128,42 @@ var Attribute = /*#__PURE__*/function (_Namespace) { * and the other options specified here. See the `smartQuoteMark()` * method. **/ + + var _proto = Attribute.prototype; + _proto.getQuotedValue = function getQuotedValue(options) { if (options === void 0) { options = {}; } + var quoteMark = this._determineQuoteMark(options); + var cssescopts = CSSESC_QUOTE_OPTIONS[quoteMark]; var escaped = (0, _cssesc["default"])(this._value, cssescopts); return escaped; }; + _proto._determineQuoteMark = function _determineQuoteMark(options) { return options.smart ? this.smartQuoteMark(options) : this.preferredQuoteMark(options); } - /** * Set the unescaped value with the specified quotation options. The value * provided must not include any wrapping quote marks -- those quotes will * be interpreted as part of the value and escaped accordingly. - */; + */ + ; + _proto.setValue = function setValue(value, options) { if (options === void 0) { options = {}; } + this._value = value; this._quoteMark = this._determineQuoteMark(options); + this._syncRawValue(); } - /** * Intelligently select a quoteMark value based on the value's contents. If * the value is a legal CSS ident, it will not be quoted. Otherwise a quote @@ -140,28 +175,35 @@ var Attribute = /*#__PURE__*/function (_Namespace) { * * @param options This takes the quoteMark and preferCurrentQuoteMark options * from the quoteValue method. - */; + */ + ; + _proto.smartQuoteMark = function smartQuoteMark(options) { var v = this.value; var numSingleQuotes = v.replace(/[^']/g, '').length; var numDoubleQuotes = v.replace(/[^"]/g, '').length; + if (numSingleQuotes + numDoubleQuotes === 0) { var escaped = (0, _cssesc["default"])(v, { isIdentifier: true }); + if (escaped === v) { return Attribute.NO_QUOTE; } else { var pref = this.preferredQuoteMark(options); + if (pref === Attribute.NO_QUOTE) { // pick a quote mark that isn't none and see if it's smaller var quote = this.quoteMark || options.quoteMark || Attribute.DOUBLE_QUOTE; var opts = CSSESC_QUOTE_OPTIONS[quote]; var quoteValue = (0, _cssesc["default"])(v, opts); + if (quoteValue.length < escaped.length) { return quote; } } + return pref; } } else if (numDoubleQuotes === numSingleQuotes) { @@ -172,24 +214,30 @@ var Attribute = /*#__PURE__*/function (_Namespace) { return Attribute.SINGLE_QUOTE; } } - /** * Selects the preferred quote mark based on the options and the current quote mark value. * If you want the quote mark to depend on the attribute value, call `smartQuoteMark(opts)` * instead. - */; + */ + ; + _proto.preferredQuoteMark = function preferredQuoteMark(options) { var quoteMark = options.preferCurrentQuoteMark ? this.quoteMark : options.quoteMark; + if (quoteMark === undefined) { quoteMark = options.preferCurrentQuoteMark ? options.quoteMark : this.quoteMark; } + if (quoteMark === undefined) { quoteMark = Attribute.DOUBLE_QUOTE; } + return quoteMark; }; + _proto._syncRawValue = function _syncRawValue() { var rawValue = (0, _cssesc["default"])(this._value, CSSESC_QUOTE_OPTIONS[this.quoteMark]); + if (rawValue === this._value) { if (this.raws) { delete this.raws.value; @@ -198,11 +246,13 @@ var Attribute = /*#__PURE__*/function (_Namespace) { this.raws.value = rawValue; } }; + _proto._handleEscapes = function _handleEscapes(prop, value) { if (this._constructed) { var escaped = (0, _cssesc["default"])(value, { isIdentifier: true }); + if (escaped !== value) { this.raws[prop] = escaped; } else { @@ -210,6 +260,7 @@ var Attribute = /*#__PURE__*/function (_Namespace) { } } }; + _proto._spacesFor = function _spacesFor(name) { var attrSpaces = { before: '', @@ -219,17 +270,20 @@ var Attribute = /*#__PURE__*/function (_Namespace) { var rawSpaces = this.raws.spaces && this.raws.spaces[name] || {}; return Object.assign(attrSpaces, spaces, rawSpaces); }; + _proto._stringFor = function _stringFor(name, spaceName, concat) { if (spaceName === void 0) { spaceName = name; } + if (concat === void 0) { concat = defaultAttrConcat; } + var attrSpaces = this._spacesFor(spaceName); + return concat(this.stringifyProperty(name), attrSpaces); } - /** * returns the offset of the attribute part specified relative to the * start of the node of the output string. @@ -243,53 +297,78 @@ var Attribute = /*#__PURE__*/function (_Namespace) { * * "insensitive" - the case insensitivity flag; * @param part One of the possible values inside an attribute. * @returns -1 if the name is invalid or the value doesn't exist in this attribute. - */; + */ + ; + _proto.offsetOf = function offsetOf(name) { var count = 1; + var attributeSpaces = this._spacesFor("attribute"); + count += attributeSpaces.before.length; + if (name === "namespace" || name === "ns") { return this.namespace ? count : -1; } + if (name === "attributeNS") { return count; } + count += this.namespaceString.length; + if (this.namespace) { count += 1; } + if (name === "attribute") { return count; } + count += this.stringifyProperty("attribute").length; count += attributeSpaces.after.length; + var operatorSpaces = this._spacesFor("operator"); + count += operatorSpaces.before.length; var operator = this.stringifyProperty("operator"); + if (name === "operator") { return operator ? count : -1; } + count += operator.length; count += operatorSpaces.after.length; + var valueSpaces = this._spacesFor("value"); + count += valueSpaces.before.length; var value = this.stringifyProperty("value"); + if (name === "value") { return value ? count : -1; } + count += value.length; count += valueSpaces.after.length; + var insensitiveSpaces = this._spacesFor("insensitive"); + count += insensitiveSpaces.before.length; + if (name === "insensitive") { return this.insensitive ? count : -1; } + return -1; }; + _proto.toString = function toString() { var _this2 = this; + var selector = [this.rawSpaceBefore, '[']; selector.push(this._stringFor('qualifiedAttribute', 'attribute')); + if (this.operator && (this.value || this.value === '')) { selector.push(this._stringFor('operator')); selector.push(this._stringFor('value')); @@ -297,13 +376,16 @@ var Attribute = /*#__PURE__*/function (_Namespace) { if (attrValue.length > 0 && !_this2.quoted && attrSpaces.before.length === 0 && !(_this2.spaces.value && _this2.spaces.value.after)) { attrSpaces.before = " "; } + return defaultAttrConcat(attrValue, attrSpaces); })); } + selector.push(']'); selector.push(this.rawSpaceAfter); return selector.join(''); }; + _createClass(Attribute, [{ key: "quoted", get: function get() { @@ -313,33 +395,35 @@ var Attribute = /*#__PURE__*/function (_Namespace) { set: function set(value) { warnOfDeprecatedQuotedAssignment(); } - /** * returns a single (`'`) or double (`"`) quote character if the value is quoted. * returns `null` if the value is not quoted. * returns `undefined` if the quotation state is unknown (this can happen when * the attribute is constructed without specifying a quote mark.) */ + }, { key: "quoteMark", get: function get() { return this._quoteMark; } - /** * Set the quote mark to be used by this attribute's value. * If the quote mark changes, the raw (escaped) value at `attr.raws.value` of the attribute * value is updated accordingly. * * @param {"'" | '"' | null} quoteMark The quote mark or `null` if the value should be unquoted. - */, + */ + , set: function set(quoteMark) { if (!this._constructed) { this._quoteMark = quoteMark; return; } + if (this._quoteMark !== quoteMark) { this._quoteMark = quoteMark; + this._syncRawValue(); } } @@ -374,17 +458,21 @@ var Attribute = /*#__PURE__*/function (_Namespace) { function set(v) { if (this._constructed) { var _unescapeValue2 = unescapeValue(v), - deprecatedUsage = _unescapeValue2.deprecatedUsage, - unescaped = _unescapeValue2.unescaped, - quoteMark = _unescapeValue2.quoteMark; + deprecatedUsage = _unescapeValue2.deprecatedUsage, + unescaped = _unescapeValue2.unescaped, + quoteMark = _unescapeValue2.quoteMark; + if (deprecatedUsage) { warnOfDeprecatedValueAssignment(); } + if (unescaped === this._value && quoteMark === this._quoteMark) { return; } + this._value = unescaped; this._quoteMark = quoteMark; + this._syncRawValue(); } else { this._value = v; @@ -395,24 +483,24 @@ var Attribute = /*#__PURE__*/function (_Namespace) { get: function get() { return this._insensitive; } - /** * Set the case insensitive flag. * If the case insensitive flag changes, the raw (escaped) value at `attr.raws.insensitiveFlag` * of the attribute is updated accordingly. * * @param {true | false} insensitive true if the attribute should match case-insensitively. - */, + */ + , set: function set(insensitive) { if (!insensitive) { - this._insensitive = false; - - // "i" and "I" can be used in "this.raws.insensitiveFlag" to store the original notation. + this._insensitive = false; // "i" and "I" can be used in "this.raws.insensitiveFlag" to store the original notation. // When setting `attr.insensitive = false` both should be erased to ensure correct serialization. + if (this.raws && (this.raws.insensitiveFlag === 'I' || this.raws.insensitiveFlag === 'i')) { this.raws.insensitiveFlag = undefined; } } + this._insensitive = insensitive; } }, { @@ -422,11 +510,14 @@ var Attribute = /*#__PURE__*/function (_Namespace) { }, set: function set(name) { this._handleEscapes("attribute", name); + this._attribute = name; } }]); + return Attribute; }(_namespace["default"]); + exports["default"] = Attribute; Attribute.NO_QUOTE = null; Attribute.SINGLE_QUOTE = "'"; @@ -443,6 +534,7 @@ var CSSESC_QUOTE_OPTIONS = (_CSSESC_QUOTE_OPTIONS = { }, _CSSESC_QUOTE_OPTIONS[null] = { isIdentifier: true }, _CSSESC_QUOTE_OPTIONS); + function defaultAttrConcat(attrValue, attrSpaces) { return "" + attrSpaces.before + attrValue + attrSpaces.after; } \ No newline at end of file diff --git a/deps/npm/node_modules/postcss-selector-parser/dist/selectors/className.js b/deps/npm/node_modules/postcss-selector-parser/dist/selectors/className.js index af325977c1146d..22409914cf728d 100644 --- a/deps/npm/node_modules/postcss-selector-parser/dist/selectors/className.js +++ b/deps/npm/node_modules/postcss-selector-parser/dist/selectors/className.js @@ -2,28 +2,43 @@ exports.__esModule = true; exports["default"] = void 0; + var _cssesc = _interopRequireDefault(require("cssesc")); + var _util = require("../util"); + var _node = _interopRequireDefault(require("./node")); + var _types = require("./types"); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } -function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + var ClassName = /*#__PURE__*/function (_Node) { _inheritsLoose(ClassName, _Node); + function ClassName(opts) { var _this; + _this = _Node.call(this, opts) || this; _this.type = _types.CLASS; _this._constructed = true; return _this; } + var _proto = ClassName.prototype; + _proto.valueToString = function valueToString() { return '.' + _Node.prototype.valueToString.call(this); }; + _createClass(ClassName, [{ key: "value", get: function get() { @@ -34,6 +49,7 @@ var ClassName = /*#__PURE__*/function (_Node) { var escaped = (0, _cssesc["default"])(v, { isIdentifier: true }); + if (escaped !== v) { (0, _util.ensureObject)(this, "raws"); this.raws.value = escaped; @@ -41,10 +57,13 @@ var ClassName = /*#__PURE__*/function (_Node) { delete this.raws.value; } } + this._value = v; } }]); + return ClassName; }(_node["default"]); + exports["default"] = ClassName; module.exports = exports.default; \ No newline at end of file diff --git a/deps/npm/node_modules/postcss-selector-parser/dist/selectors/combinator.js b/deps/npm/node_modules/postcss-selector-parser/dist/selectors/combinator.js index c6449f43cfddb7..271ab4d3b1f446 100644 --- a/deps/npm/node_modules/postcss-selector-parser/dist/selectors/combinator.js +++ b/deps/npm/node_modules/postcss-selector-parser/dist/selectors/combinator.js @@ -2,20 +2,30 @@ exports.__esModule = true; exports["default"] = void 0; + var _node = _interopRequireDefault(require("./node")); + var _types = require("./types"); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } -function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + var Combinator = /*#__PURE__*/function (_Node) { _inheritsLoose(Combinator, _Node); + function Combinator(opts) { var _this; + _this = _Node.call(this, opts) || this; _this.type = _types.COMBINATOR; return _this; } + return Combinator; }(_node["default"]); + exports["default"] = Combinator; module.exports = exports.default; \ No newline at end of file diff --git a/deps/npm/node_modules/postcss-selector-parser/dist/selectors/comment.js b/deps/npm/node_modules/postcss-selector-parser/dist/selectors/comment.js index 1709d5be925d6f..e778094e110c2f 100644 --- a/deps/npm/node_modules/postcss-selector-parser/dist/selectors/comment.js +++ b/deps/npm/node_modules/postcss-selector-parser/dist/selectors/comment.js @@ -2,20 +2,30 @@ exports.__esModule = true; exports["default"] = void 0; + var _node = _interopRequireDefault(require("./node")); + var _types = require("./types"); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } -function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + var Comment = /*#__PURE__*/function (_Node) { _inheritsLoose(Comment, _Node); + function Comment(opts) { var _this; + _this = _Node.call(this, opts) || this; _this.type = _types.COMMENT; return _this; } + return Comment; }(_node["default"]); + exports["default"] = Comment; module.exports = exports.default; \ No newline at end of file diff --git a/deps/npm/node_modules/postcss-selector-parser/dist/selectors/constructors.js b/deps/npm/node_modules/postcss-selector-parser/dist/selectors/constructors.js index 688259324cdd29..078023eb28f2d7 100644 --- a/deps/npm/node_modules/postcss-selector-parser/dist/selectors/constructors.js +++ b/deps/npm/node_modules/postcss-selector-parser/dist/selectors/constructors.js @@ -2,64 +2,101 @@ exports.__esModule = true; exports.universal = exports.tag = exports.string = exports.selector = exports.root = exports.pseudo = exports.nesting = exports.id = exports.comment = exports.combinator = exports.className = exports.attribute = void 0; + var _attribute = _interopRequireDefault(require("./attribute")); + var _className = _interopRequireDefault(require("./className")); + var _combinator = _interopRequireDefault(require("./combinator")); + var _comment = _interopRequireDefault(require("./comment")); + var _id = _interopRequireDefault(require("./id")); + var _nesting = _interopRequireDefault(require("./nesting")); + var _pseudo = _interopRequireDefault(require("./pseudo")); + var _root = _interopRequireDefault(require("./root")); + var _selector = _interopRequireDefault(require("./selector")); + var _string = _interopRequireDefault(require("./string")); + var _tag = _interopRequireDefault(require("./tag")); + var _universal = _interopRequireDefault(require("./universal")); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + var attribute = function attribute(opts) { return new _attribute["default"](opts); }; + exports.attribute = attribute; + var className = function className(opts) { return new _className["default"](opts); }; + exports.className = className; + var combinator = function combinator(opts) { return new _combinator["default"](opts); }; + exports.combinator = combinator; + var comment = function comment(opts) { return new _comment["default"](opts); }; + exports.comment = comment; + var id = function id(opts) { return new _id["default"](opts); }; + exports.id = id; + var nesting = function nesting(opts) { return new _nesting["default"](opts); }; + exports.nesting = nesting; + var pseudo = function pseudo(opts) { return new _pseudo["default"](opts); }; + exports.pseudo = pseudo; + var root = function root(opts) { return new _root["default"](opts); }; + exports.root = root; + var selector = function selector(opts) { return new _selector["default"](opts); }; + exports.selector = selector; + var string = function string(opts) { return new _string["default"](opts); }; + exports.string = string; + var tag = function tag(opts) { return new _tag["default"](opts); }; + exports.tag = tag; + var universal = function universal(opts) { return new _universal["default"](opts); }; + exports.universal = universal; \ No newline at end of file diff --git a/deps/npm/node_modules/postcss-selector-parser/dist/selectors/container.js b/deps/npm/node_modules/postcss-selector-parser/dist/selectors/container.js index be35fa994138ab..cf6176d9be6dd5 100644 --- a/deps/npm/node_modules/postcss-selector-parser/dist/selectors/container.js +++ b/deps/npm/node_modules/postcss-selector-parser/dist/selectors/container.js @@ -2,105 +2,145 @@ exports.__esModule = true; exports["default"] = void 0; + var _node = _interopRequireDefault(require("./node")); + var types = _interopRequireWildcard(require("./types")); -function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } -function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } + +function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } -function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } + +function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } it = o[Symbol.iterator](); return it.next.bind(it); } + function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } + function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } + function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } -function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + var Container = /*#__PURE__*/function (_Node) { _inheritsLoose(Container, _Node); + function Container(opts) { var _this; + _this = _Node.call(this, opts) || this; + if (!_this.nodes) { _this.nodes = []; } + return _this; } + var _proto = Container.prototype; + _proto.append = function append(selector) { selector.parent = this; this.nodes.push(selector); return this; }; + _proto.prepend = function prepend(selector) { selector.parent = this; this.nodes.unshift(selector); return this; }; + _proto.at = function at(index) { return this.nodes[index]; }; + _proto.index = function index(child) { if (typeof child === 'number') { return child; } + return this.nodes.indexOf(child); }; + _proto.removeChild = function removeChild(child) { child = this.index(child); this.at(child).parent = undefined; this.nodes.splice(child, 1); var index; + for (var id in this.indexes) { index = this.indexes[id]; + if (index >= child) { this.indexes[id] = index - 1; } } + return this; }; + _proto.removeAll = function removeAll() { for (var _iterator = _createForOfIteratorHelperLoose(this.nodes), _step; !(_step = _iterator()).done;) { var node = _step.value; node.parent = undefined; } + this.nodes = []; return this; }; + _proto.empty = function empty() { return this.removeAll(); }; + _proto.insertAfter = function insertAfter(oldNode, newNode) { newNode.parent = this; var oldIndex = this.index(oldNode); this.nodes.splice(oldIndex + 1, 0, newNode); newNode.parent = this; var index; + for (var id in this.indexes) { index = this.indexes[id]; + if (oldIndex <= index) { this.indexes[id] = index + 1; } } + return this; }; + _proto.insertBefore = function insertBefore(oldNode, newNode) { newNode.parent = this; var oldIndex = this.index(oldNode); this.nodes.splice(oldIndex, 0, newNode); newNode.parent = this; var index; + for (var id in this.indexes) { index = this.indexes[id]; + if (index <= oldIndex) { this.indexes[id] = index + 1; } } + return this; }; + _proto._findChildAtPosition = function _findChildAtPosition(line, col) { var found = undefined; this.each(function (node) { if (node.atPosition) { var foundChild = node.atPosition(line, col); + if (foundChild) { found = foundChild; return false; @@ -112,7 +152,6 @@ var Container = /*#__PURE__*/function (_Node) { }); return found; } - /** * Return the most specific node at the line and column number given. * The source location is based on the original parsed location, locations aren't @@ -125,7 +164,9 @@ var Container = /*#__PURE__*/function (_Node) { * If not found, returns undefined. * @param {number} line The line number of the node to find. (1-based index) * @param {number} col The column number of the node to find. (1-based index) - */; + */ + ; + _proto.atPosition = function atPosition(line, col) { if (this.isAtPosition(line, col)) { return this._findChildAtPosition(line, col) || this; @@ -133,6 +174,7 @@ var Container = /*#__PURE__*/function (_Node) { return undefined; } }; + _proto._inferEndPosition = function _inferEndPosition() { if (this.last && this.last.source && this.last.source.end) { this.source = this.source || {}; @@ -140,152 +182,195 @@ var Container = /*#__PURE__*/function (_Node) { Object.assign(this.source.end, this.last.source.end); } }; + _proto.each = function each(callback) { if (!this.lastEach) { this.lastEach = 0; } + if (!this.indexes) { this.indexes = {}; } + this.lastEach++; var id = this.lastEach; this.indexes[id] = 0; + if (!this.length) { return undefined; } + var index, result; + while (this.indexes[id] < this.length) { index = this.indexes[id]; result = callback(this.at(index), index); + if (result === false) { break; } + this.indexes[id] += 1; } + delete this.indexes[id]; + if (result === false) { return false; } }; + _proto.walk = function walk(callback) { return this.each(function (node, i) { var result = callback(node, i); + if (result !== false && node.length) { result = node.walk(callback); } + if (result === false) { return false; } }); }; + _proto.walkAttributes = function walkAttributes(callback) { var _this2 = this; + return this.walk(function (selector) { if (selector.type === types.ATTRIBUTE) { return callback.call(_this2, selector); } }); }; + _proto.walkClasses = function walkClasses(callback) { var _this3 = this; + return this.walk(function (selector) { if (selector.type === types.CLASS) { return callback.call(_this3, selector); } }); }; + _proto.walkCombinators = function walkCombinators(callback) { var _this4 = this; + return this.walk(function (selector) { if (selector.type === types.COMBINATOR) { return callback.call(_this4, selector); } }); }; + _proto.walkComments = function walkComments(callback) { var _this5 = this; + return this.walk(function (selector) { if (selector.type === types.COMMENT) { return callback.call(_this5, selector); } }); }; + _proto.walkIds = function walkIds(callback) { var _this6 = this; + return this.walk(function (selector) { if (selector.type === types.ID) { return callback.call(_this6, selector); } }); }; + _proto.walkNesting = function walkNesting(callback) { var _this7 = this; + return this.walk(function (selector) { if (selector.type === types.NESTING) { return callback.call(_this7, selector); } }); }; + _proto.walkPseudos = function walkPseudos(callback) { var _this8 = this; + return this.walk(function (selector) { if (selector.type === types.PSEUDO) { return callback.call(_this8, selector); } }); }; + _proto.walkTags = function walkTags(callback) { var _this9 = this; + return this.walk(function (selector) { if (selector.type === types.TAG) { return callback.call(_this9, selector); } }); }; + _proto.walkUniversals = function walkUniversals(callback) { var _this10 = this; + return this.walk(function (selector) { if (selector.type === types.UNIVERSAL) { return callback.call(_this10, selector); } }); }; + _proto.split = function split(callback) { var _this11 = this; + var current = []; return this.reduce(function (memo, node, index) { var split = callback.call(_this11, node); current.push(node); + if (split) { memo.push(current); current = []; } else if (index === _this11.length - 1) { memo.push(current); } + return memo; }, []); }; + _proto.map = function map(callback) { return this.nodes.map(callback); }; + _proto.reduce = function reduce(callback, memo) { return this.nodes.reduce(callback, memo); }; + _proto.every = function every(callback) { return this.nodes.every(callback); }; + _proto.some = function some(callback) { return this.nodes.some(callback); }; + _proto.filter = function filter(callback) { return this.nodes.filter(callback); }; + _proto.sort = function sort(callback) { return this.nodes.sort(callback); }; + _proto.toString = function toString() { return this.map(String).join(''); }; + _createClass(Container, [{ key: "first", get: function get() { @@ -302,7 +387,9 @@ var Container = /*#__PURE__*/function (_Node) { return this.nodes.length; } }]); + return Container; }(_node["default"]); + exports["default"] = Container; module.exports = exports.default; \ No newline at end of file diff --git a/deps/npm/node_modules/postcss-selector-parser/dist/selectors/guards.js b/deps/npm/node_modules/postcss-selector-parser/dist/selectors/guards.js index f06161e97cb265..c949af57eb1fdf 100644 --- a/deps/npm/node_modules/postcss-selector-parser/dist/selectors/guards.js +++ b/deps/npm/node_modules/postcss-selector-parser/dist/selectors/guards.js @@ -1,25 +1,27 @@ "use strict"; exports.__esModule = true; -exports.isComment = exports.isCombinator = exports.isClassName = exports.isAttribute = void 0; -exports.isContainer = isContainer; -exports.isIdentifier = void 0; -exports.isNamespace = isNamespace; -exports.isNesting = void 0; exports.isNode = isNode; -exports.isPseudo = void 0; -exports.isPseudoClass = isPseudoClass; exports.isPseudoElement = isPseudoElement; -exports.isUniversal = exports.isTag = exports.isString = exports.isSelector = exports.isRoot = void 0; +exports.isPseudoClass = isPseudoClass; +exports.isContainer = isContainer; +exports.isNamespace = isNamespace; +exports.isUniversal = exports.isTag = exports.isString = exports.isSelector = exports.isRoot = exports.isPseudo = exports.isNesting = exports.isIdentifier = exports.isComment = exports.isCombinator = exports.isClassName = exports.isAttribute = void 0; + var _types = require("./types"); + var _IS_TYPE; + var IS_TYPE = (_IS_TYPE = {}, _IS_TYPE[_types.ATTRIBUTE] = true, _IS_TYPE[_types.CLASS] = true, _IS_TYPE[_types.COMBINATOR] = true, _IS_TYPE[_types.COMMENT] = true, _IS_TYPE[_types.ID] = true, _IS_TYPE[_types.NESTING] = true, _IS_TYPE[_types.PSEUDO] = true, _IS_TYPE[_types.ROOT] = true, _IS_TYPE[_types.SELECTOR] = true, _IS_TYPE[_types.STRING] = true, _IS_TYPE[_types.TAG] = true, _IS_TYPE[_types.UNIVERSAL] = true, _IS_TYPE); + function isNode(node) { return typeof node === "object" && IS_TYPE[node.type]; } + function isNodeType(type, node) { return isNode(node) && node.type === type; } + var isAttribute = isNodeType.bind(null, _types.ATTRIBUTE); exports.isAttribute = isAttribute; var isClassName = isNodeType.bind(null, _types.CLASS); @@ -44,15 +46,19 @@ var isTag = isNodeType.bind(null, _types.TAG); exports.isTag = isTag; var isUniversal = isNodeType.bind(null, _types.UNIVERSAL); exports.isUniversal = isUniversal; + function isPseudoElement(node) { return isPseudo(node) && node.value && (node.value.startsWith("::") || node.value.toLowerCase() === ":before" || node.value.toLowerCase() === ":after" || node.value.toLowerCase() === ":first-letter" || node.value.toLowerCase() === ":first-line"); } + function isPseudoClass(node) { return isPseudo(node) && !isPseudoElement(node); } + function isContainer(node) { return !!(isNode(node) && node.walk); } + function isNamespace(node) { return isAttribute(node) || isTag(node); } \ No newline at end of file diff --git a/deps/npm/node_modules/postcss-selector-parser/dist/selectors/id.js b/deps/npm/node_modules/postcss-selector-parser/dist/selectors/id.js index 8baef72860c9b6..4e83147e3c4efb 100644 --- a/deps/npm/node_modules/postcss-selector-parser/dist/selectors/id.js +++ b/deps/npm/node_modules/postcss-selector-parser/dist/selectors/id.js @@ -2,24 +2,36 @@ exports.__esModule = true; exports["default"] = void 0; + var _node = _interopRequireDefault(require("./node")); + var _types = require("./types"); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } -function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + var ID = /*#__PURE__*/function (_Node) { _inheritsLoose(ID, _Node); + function ID(opts) { var _this; + _this = _Node.call(this, opts) || this; _this.type = _types.ID; return _this; } + var _proto = ID.prototype; + _proto.valueToString = function valueToString() { return '#' + _Node.prototype.valueToString.call(this); }; + return ID; }(_node["default"]); + exports["default"] = ID; module.exports = exports.default; \ No newline at end of file diff --git a/deps/npm/node_modules/postcss-selector-parser/dist/selectors/index.js b/deps/npm/node_modules/postcss-selector-parser/dist/selectors/index.js index f1f6b7f5e63ca3..1fe9b138a5a26e 100644 --- a/deps/npm/node_modules/postcss-selector-parser/dist/selectors/index.js +++ b/deps/npm/node_modules/postcss-selector-parser/dist/selectors/index.js @@ -1,19 +1,25 @@ "use strict"; exports.__esModule = true; + var _types = require("./types"); + Object.keys(_types).forEach(function (key) { if (key === "default" || key === "__esModule") return; if (key in exports && exports[key] === _types[key]) return; exports[key] = _types[key]; }); + var _constructors = require("./constructors"); + Object.keys(_constructors).forEach(function (key) { if (key === "default" || key === "__esModule") return; if (key in exports && exports[key] === _constructors[key]) return; exports[key] = _constructors[key]; }); + var _guards = require("./guards"); + Object.keys(_guards).forEach(function (key) { if (key === "default" || key === "__esModule") return; if (key in exports && exports[key] === _guards[key]) return; diff --git a/deps/npm/node_modules/postcss-selector-parser/dist/selectors/namespace.js b/deps/npm/node_modules/postcss-selector-parser/dist/selectors/namespace.js index cc97647bd174b5..fd6c729e16661f 100644 --- a/deps/npm/node_modules/postcss-selector-parser/dist/selectors/namespace.js +++ b/deps/npm/node_modules/postcss-selector-parser/dist/selectors/namespace.js @@ -2,20 +2,32 @@ exports.__esModule = true; exports["default"] = void 0; + var _cssesc = _interopRequireDefault(require("cssesc")); + var _util = require("../util"); + var _node = _interopRequireDefault(require("./node")); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } -function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + var Namespace = /*#__PURE__*/function (_Node) { _inheritsLoose(Namespace, _Node); + function Namespace() { return _Node.apply(this, arguments) || this; } + var _proto = Namespace.prototype; + _proto.qualifiedName = function qualifiedName(value) { if (this.namespace) { return this.namespaceString + "|" + value; @@ -23,9 +35,11 @@ var Namespace = /*#__PURE__*/function (_Node) { return value; } }; + _proto.valueToString = function valueToString() { return this.qualifiedName(_Node.prototype.valueToString.call(this)); }; + _createClass(Namespace, [{ key: "namespace", get: function get() { @@ -34,15 +48,19 @@ var Namespace = /*#__PURE__*/function (_Node) { set: function set(namespace) { if (namespace === true || namespace === "*" || namespace === "&") { this._namespace = namespace; + if (this.raws) { delete this.raws.namespace; } + return; } + var escaped = (0, _cssesc["default"])(namespace, { isIdentifier: true }); this._namespace = namespace; + if (escaped !== namespace) { (0, _util.ensureObject)(this, "raws"); this.raws.namespace = escaped; @@ -63,6 +81,7 @@ var Namespace = /*#__PURE__*/function (_Node) { get: function get() { if (this.namespace) { var ns = this.stringifyProperty("namespace"); + if (ns === true) { return ''; } else { @@ -73,8 +92,10 @@ var Namespace = /*#__PURE__*/function (_Node) { } } }]); + return Namespace; }(_node["default"]); + exports["default"] = Namespace; ; module.exports = exports.default; \ No newline at end of file diff --git a/deps/npm/node_modules/postcss-selector-parser/dist/selectors/nesting.js b/deps/npm/node_modules/postcss-selector-parser/dist/selectors/nesting.js index 218992875a60c9..3288c78f2dddba 100644 --- a/deps/npm/node_modules/postcss-selector-parser/dist/selectors/nesting.js +++ b/deps/npm/node_modules/postcss-selector-parser/dist/selectors/nesting.js @@ -2,21 +2,31 @@ exports.__esModule = true; exports["default"] = void 0; + var _node = _interopRequireDefault(require("./node")); + var _types = require("./types"); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } -function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + var Nesting = /*#__PURE__*/function (_Node) { _inheritsLoose(Nesting, _Node); + function Nesting(opts) { var _this; + _this = _Node.call(this, opts) || this; _this.type = _types.NESTING; _this.value = '&'; return _this; } + return Nesting; }(_node["default"]); + exports["default"] = Nesting; module.exports = exports.default; \ No newline at end of file diff --git a/deps/npm/node_modules/postcss-selector-parser/dist/selectors/node.js b/deps/npm/node_modules/postcss-selector-parser/dist/selectors/node.js index 9a8295101066ae..e8eca11c70ecf4 100644 --- a/deps/npm/node_modules/postcss-selector-parser/dist/selectors/node.js +++ b/deps/npm/node_modules/postcss-selector-parser/dist/selectors/node.js @@ -2,20 +2,28 @@ exports.__esModule = true; exports["default"] = void 0; + var _util = require("../util"); + function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + var cloneNode = function cloneNode(obj, parent) { if (typeof obj !== 'object' || obj === null) { return obj; } + var cloned = new obj.constructor(); + for (var i in obj) { if (!obj.hasOwnProperty(i)) { continue; } + var value = obj[i]; var type = typeof value; + if (i === 'parent' && type === 'object') { if (parent) { cloned[i] = parent; @@ -28,52 +36,66 @@ var cloneNode = function cloneNode(obj, parent) { cloned[i] = cloneNode(value, cloned); } } + return cloned; }; + var Node = /*#__PURE__*/function () { function Node(opts) { if (opts === void 0) { opts = {}; } + Object.assign(this, opts); this.spaces = this.spaces || {}; this.spaces.before = this.spaces.before || ''; this.spaces.after = this.spaces.after || ''; } + var _proto = Node.prototype; + _proto.remove = function remove() { if (this.parent) { this.parent.removeChild(this); } + this.parent = undefined; return this; }; + _proto.replaceWith = function replaceWith() { if (this.parent) { for (var index in arguments) { this.parent.insertBefore(this, arguments[index]); } + this.remove(); } + return this; }; + _proto.next = function next() { return this.parent.at(this.parent.index(this) + 1); }; + _proto.prev = function prev() { return this.parent.at(this.parent.index(this) - 1); }; + _proto.clone = function clone(overrides) { if (overrides === void 0) { overrides = {}; } + var cloned = cloneNode(this); + for (var name in overrides) { cloned[name] = overrides[name]; } + return cloned; } - /** * Some non-standard syntax doesn't follow normal escaping rules for css. * This allows non standard syntax to be appended to an existing property @@ -82,21 +104,24 @@ var Node = /*#__PURE__*/function () { * @param {string} name the property to set * @param {any} value the unescaped value of the property * @param {string} valueEscaped optional. the escaped value of the property. - */; + */ + ; + _proto.appendToPropertyAndEscape = function appendToPropertyAndEscape(name, value, valueEscaped) { if (!this.raws) { this.raws = {}; } + var originalValue = this[name]; var originalEscaped = this.raws[name]; this[name] = originalValue + value; // this may trigger a setter that updates raws, so it has to be set first. + if (originalEscaped || valueEscaped !== value) { this.raws[name] = (originalEscaped || originalValue) + valueEscaped; } else { delete this.raws[name]; // delete any escaped value that was created by the setter. } } - /** * Some non-standard syntax doesn't follow normal escaping rules for css. * This allows the escaped value to be specified directly, allowing illegal @@ -104,68 +129,86 @@ var Node = /*#__PURE__*/function () { * @param {string} name the property to set * @param {any} value the unescaped value of the property * @param {string} valueEscaped the escaped value of the property. - */; + */ + ; + _proto.setPropertyAndEscape = function setPropertyAndEscape(name, value, valueEscaped) { if (!this.raws) { this.raws = {}; } + this[name] = value; // this may trigger a setter that updates raws, so it has to be set first. + this.raws[name] = valueEscaped; } - /** * When you want a value to passed through to CSS directly. This method * deletes the corresponding raw value causing the stringifier to fallback * to the unescaped value. * @param {string} name the property to set. * @param {any} value The value that is both escaped and unescaped. - */; + */ + ; + _proto.setPropertyWithoutEscape = function setPropertyWithoutEscape(name, value) { this[name] = value; // this may trigger a setter that updates raws, so it has to be set first. + if (this.raws) { delete this.raws[name]; } } - /** * * @param {number} line The number (starting with 1) * @param {number} column The column number (starting with 1) - */; + */ + ; + _proto.isAtPosition = function isAtPosition(line, column) { if (this.source && this.source.start && this.source.end) { if (this.source.start.line > line) { return false; } + if (this.source.end.line < line) { return false; } + if (this.source.start.line === line && this.source.start.column > column) { return false; } + if (this.source.end.line === line && this.source.end.column < column) { return false; } + return true; } + return undefined; }; + _proto.stringifyProperty = function stringifyProperty(name) { return this.raws && this.raws[name] || this[name]; }; + _proto.valueToString = function valueToString() { return String(this.stringifyProperty("value")); }; + _proto.toString = function toString() { return [this.rawSpaceBefore, this.valueToString(), this.rawSpaceAfter].join(''); }; + _createClass(Node, [{ key: "rawSpaceBefore", get: function get() { var rawSpace = this.raws && this.raws.spaces && this.raws.spaces.before; + if (rawSpace === undefined) { rawSpace = this.spaces && this.spaces.before; } + return rawSpace || ""; }, set: function set(raw) { @@ -176,9 +219,11 @@ var Node = /*#__PURE__*/function () { key: "rawSpaceAfter", get: function get() { var rawSpace = this.raws && this.raws.spaces && this.raws.spaces.after; + if (rawSpace === undefined) { rawSpace = this.spaces.after; } + return rawSpace || ""; }, set: function set(raw) { @@ -186,7 +231,9 @@ var Node = /*#__PURE__*/function () { this.raws.spaces.after = raw; } }]); + return Node; }(); + exports["default"] = Node; module.exports = exports.default; \ No newline at end of file diff --git a/deps/npm/node_modules/postcss-selector-parser/dist/selectors/pseudo.js b/deps/npm/node_modules/postcss-selector-parser/dist/selectors/pseudo.js index 4371e5900f5c7f..a0e7bca170a76d 100644 --- a/deps/npm/node_modules/postcss-selector-parser/dist/selectors/pseudo.js +++ b/deps/npm/node_modules/postcss-selector-parser/dist/selectors/pseudo.js @@ -2,25 +2,37 @@ exports.__esModule = true; exports["default"] = void 0; + var _container = _interopRequireDefault(require("./container")); + var _types = require("./types"); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } -function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + var Pseudo = /*#__PURE__*/function (_Container) { _inheritsLoose(Pseudo, _Container); + function Pseudo(opts) { var _this; + _this = _Container.call(this, opts) || this; _this.type = _types.PSEUDO; return _this; } + var _proto = Pseudo.prototype; + _proto.toString = function toString() { var params = this.length ? '(' + this.map(String).join(',') + ')' : ''; return [this.rawSpaceBefore, this.stringifyProperty("value"), params, this.rawSpaceAfter].join(''); }; + return Pseudo; }(_container["default"]); + exports["default"] = Pseudo; module.exports = exports.default; \ No newline at end of file diff --git a/deps/npm/node_modules/postcss-selector-parser/dist/selectors/root.js b/deps/npm/node_modules/postcss-selector-parser/dist/selectors/root.js index 8c599d15809f55..be5c2ccb2dac83 100644 --- a/deps/npm/node_modules/postcss-selector-parser/dist/selectors/root.js +++ b/deps/npm/node_modules/postcss-selector-parser/dist/selectors/root.js @@ -2,22 +2,34 @@ exports.__esModule = true; exports["default"] = void 0; + var _container = _interopRequireDefault(require("./container")); + var _types = require("./types"); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } -function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + var Root = /*#__PURE__*/function (_Container) { _inheritsLoose(Root, _Container); + function Root(opts) { var _this; + _this = _Container.call(this, opts) || this; _this.type = _types.ROOT; return _this; } + var _proto = Root.prototype; + _proto.toString = function toString() { var str = this.reduce(function (memo, selector) { memo.push(String(selector)); @@ -25,6 +37,7 @@ var Root = /*#__PURE__*/function (_Container) { }, []).join(','); return this.trailingComma ? str + ',' : str; }; + _proto.error = function error(message, options) { if (this._error) { return this._error(message, options); @@ -32,13 +45,16 @@ var Root = /*#__PURE__*/function (_Container) { return new Error(message); } }; + _createClass(Root, [{ key: "errorGenerator", set: function set(handler) { this._error = handler; } }]); + return Root; }(_container["default"]); + exports["default"] = Root; module.exports = exports.default; \ No newline at end of file diff --git a/deps/npm/node_modules/postcss-selector-parser/dist/selectors/selector.js b/deps/npm/node_modules/postcss-selector-parser/dist/selectors/selector.js index 8cc4bc1cddd75c..699eeb6e546f91 100644 --- a/deps/npm/node_modules/postcss-selector-parser/dist/selectors/selector.js +++ b/deps/npm/node_modules/postcss-selector-parser/dist/selectors/selector.js @@ -2,20 +2,30 @@ exports.__esModule = true; exports["default"] = void 0; + var _container = _interopRequireDefault(require("./container")); + var _types = require("./types"); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } -function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + var Selector = /*#__PURE__*/function (_Container) { _inheritsLoose(Selector, _Container); + function Selector(opts) { var _this; + _this = _Container.call(this, opts) || this; _this.type = _types.SELECTOR; return _this; } + return Selector; }(_container["default"]); + exports["default"] = Selector; module.exports = exports.default; \ No newline at end of file diff --git a/deps/npm/node_modules/postcss-selector-parser/dist/selectors/string.js b/deps/npm/node_modules/postcss-selector-parser/dist/selectors/string.js index 4749791416b579..e61df30c74a0a3 100644 --- a/deps/npm/node_modules/postcss-selector-parser/dist/selectors/string.js +++ b/deps/npm/node_modules/postcss-selector-parser/dist/selectors/string.js @@ -2,20 +2,30 @@ exports.__esModule = true; exports["default"] = void 0; + var _node = _interopRequireDefault(require("./node")); + var _types = require("./types"); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } -function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + var String = /*#__PURE__*/function (_Node) { _inheritsLoose(String, _Node); + function String(opts) { var _this; + _this = _Node.call(this, opts) || this; _this.type = _types.STRING; return _this; } + return String; }(_node["default"]); + exports["default"] = String; module.exports = exports.default; \ No newline at end of file diff --git a/deps/npm/node_modules/postcss-selector-parser/dist/selectors/tag.js b/deps/npm/node_modules/postcss-selector-parser/dist/selectors/tag.js index 224e74de4a2f77..e298db15fafd1f 100644 --- a/deps/npm/node_modules/postcss-selector-parser/dist/selectors/tag.js +++ b/deps/npm/node_modules/postcss-selector-parser/dist/selectors/tag.js @@ -2,20 +2,30 @@ exports.__esModule = true; exports["default"] = void 0; + var _namespace = _interopRequireDefault(require("./namespace")); + var _types = require("./types"); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } -function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + var Tag = /*#__PURE__*/function (_Namespace) { _inheritsLoose(Tag, _Namespace); + function Tag(opts) { var _this; + _this = _Namespace.call(this, opts) || this; _this.type = _types.TAG; return _this; } + return Tag; }(_namespace["default"]); + exports["default"] = Tag; module.exports = exports.default; \ No newline at end of file diff --git a/deps/npm/node_modules/postcss-selector-parser/dist/selectors/types.js b/deps/npm/node_modules/postcss-selector-parser/dist/selectors/types.js index 824cc0c7389450..ab897b8ce5c129 100644 --- a/deps/npm/node_modules/postcss-selector-parser/dist/selectors/types.js +++ b/deps/npm/node_modules/postcss-selector-parser/dist/selectors/types.js @@ -1,7 +1,7 @@ "use strict"; exports.__esModule = true; -exports.UNIVERSAL = exports.TAG = exports.STRING = exports.SELECTOR = exports.ROOT = exports.PSEUDO = exports.NESTING = exports.ID = exports.COMMENT = exports.COMBINATOR = exports.CLASS = exports.ATTRIBUTE = void 0; +exports.UNIVERSAL = exports.ATTRIBUTE = exports.CLASS = exports.COMBINATOR = exports.COMMENT = exports.ID = exports.NESTING = exports.PSEUDO = exports.ROOT = exports.SELECTOR = exports.STRING = exports.TAG = void 0; var TAG = 'tag'; exports.TAG = TAG; var STRING = 'string'; diff --git a/deps/npm/node_modules/postcss-selector-parser/dist/selectors/universal.js b/deps/npm/node_modules/postcss-selector-parser/dist/selectors/universal.js index 5b5874380b8e94..cf25473d1c3d4d 100644 --- a/deps/npm/node_modules/postcss-selector-parser/dist/selectors/universal.js +++ b/deps/npm/node_modules/postcss-selector-parser/dist/selectors/universal.js @@ -2,21 +2,31 @@ exports.__esModule = true; exports["default"] = void 0; + var _namespace = _interopRequireDefault(require("./namespace")); + var _types = require("./types"); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } -function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + var Universal = /*#__PURE__*/function (_Namespace) { _inheritsLoose(Universal, _Namespace); + function Universal(opts) { var _this; + _this = _Namespace.call(this, opts) || this; _this.type = _types.UNIVERSAL; _this.value = '*'; return _this; } + return Universal; }(_namespace["default"]); + exports["default"] = Universal; module.exports = exports.default; \ No newline at end of file diff --git a/deps/npm/node_modules/postcss-selector-parser/dist/sortAscending.js b/deps/npm/node_modules/postcss-selector-parser/dist/sortAscending.js index 5666d5dc99f89c..3ef56acc570c8f 100644 --- a/deps/npm/node_modules/postcss-selector-parser/dist/sortAscending.js +++ b/deps/npm/node_modules/postcss-selector-parser/dist/sortAscending.js @@ -2,10 +2,12 @@ exports.__esModule = true; exports["default"] = sortAscending; + function sortAscending(list) { return list.sort(function (a, b) { return a - b; }); } + ; module.exports = exports.default; \ No newline at end of file diff --git a/deps/npm/node_modules/postcss-selector-parser/dist/tokenTypes.js b/deps/npm/node_modules/postcss-selector-parser/dist/tokenTypes.js index 59d8e6c6bf4cf7..48314b93e00581 100644 --- a/deps/npm/node_modules/postcss-selector-parser/dist/tokenTypes.js +++ b/deps/npm/node_modules/postcss-selector-parser/dist/tokenTypes.js @@ -1,66 +1,91 @@ "use strict"; exports.__esModule = true; -exports.word = exports.tilde = exports.tab = exports.str = exports.space = exports.slash = exports.singleQuote = exports.semicolon = exports.plus = exports.pipe = exports.openSquare = exports.openParenthesis = exports.newline = exports.greaterThan = exports.feed = exports.equals = exports.doubleQuote = exports.dollar = exports.cr = exports.comment = exports.comma = exports.combinator = exports.colon = exports.closeSquare = exports.closeParenthesis = exports.caret = exports.bang = exports.backslash = exports.at = exports.asterisk = exports.ampersand = void 0; +exports.combinator = exports.word = exports.comment = exports.str = exports.tab = exports.newline = exports.feed = exports.cr = exports.backslash = exports.bang = exports.slash = exports.doubleQuote = exports.singleQuote = exports.space = exports.greaterThan = exports.pipe = exports.equals = exports.plus = exports.caret = exports.tilde = exports.dollar = exports.closeSquare = exports.openSquare = exports.closeParenthesis = exports.openParenthesis = exports.semicolon = exports.colon = exports.comma = exports.at = exports.asterisk = exports.ampersand = void 0; var ampersand = 38; // `&`.charCodeAt(0); + exports.ampersand = ampersand; var asterisk = 42; // `*`.charCodeAt(0); + exports.asterisk = asterisk; var at = 64; // `@`.charCodeAt(0); + exports.at = at; var comma = 44; // `,`.charCodeAt(0); + exports.comma = comma; var colon = 58; // `:`.charCodeAt(0); + exports.colon = colon; var semicolon = 59; // `;`.charCodeAt(0); + exports.semicolon = semicolon; var openParenthesis = 40; // `(`.charCodeAt(0); + exports.openParenthesis = openParenthesis; var closeParenthesis = 41; // `)`.charCodeAt(0); + exports.closeParenthesis = closeParenthesis; var openSquare = 91; // `[`.charCodeAt(0); + exports.openSquare = openSquare; var closeSquare = 93; // `]`.charCodeAt(0); + exports.closeSquare = closeSquare; var dollar = 36; // `$`.charCodeAt(0); + exports.dollar = dollar; var tilde = 126; // `~`.charCodeAt(0); + exports.tilde = tilde; var caret = 94; // `^`.charCodeAt(0); + exports.caret = caret; var plus = 43; // `+`.charCodeAt(0); + exports.plus = plus; var equals = 61; // `=`.charCodeAt(0); + exports.equals = equals; var pipe = 124; // `|`.charCodeAt(0); + exports.pipe = pipe; var greaterThan = 62; // `>`.charCodeAt(0); + exports.greaterThan = greaterThan; var space = 32; // ` `.charCodeAt(0); + exports.space = space; var singleQuote = 39; // `'`.charCodeAt(0); + exports.singleQuote = singleQuote; var doubleQuote = 34; // `"`.charCodeAt(0); + exports.doubleQuote = doubleQuote; var slash = 47; // `/`.charCodeAt(0); + exports.slash = slash; var bang = 33; // `!`.charCodeAt(0); + exports.bang = bang; var backslash = 92; // '\\'.charCodeAt(0); + exports.backslash = backslash; var cr = 13; // '\r'.charCodeAt(0); + exports.cr = cr; var feed = 12; // '\f'.charCodeAt(0); + exports.feed = feed; var newline = 10; // '\n'.charCodeAt(0); + exports.newline = newline; var tab = 9; // '\t'.charCodeAt(0); - // Expose aliases primarily for readability. + exports.tab = tab; -var str = singleQuote; +var str = singleQuote; // No good single character representation! -// No good single character representation! exports.str = str; var comment = -1; exports.comment = comment; diff --git a/deps/npm/node_modules/postcss-selector-parser/dist/tokenize.js b/deps/npm/node_modules/postcss-selector-parser/dist/tokenize.js index bf61d261b5cd73..bee9fee632e84c 100644 --- a/deps/npm/node_modules/postcss-selector-parser/dist/tokenize.js +++ b/deps/npm/node_modules/postcss-selector-parser/dist/tokenize.js @@ -1,30 +1,39 @@ "use strict"; exports.__esModule = true; -exports.FIELDS = void 0; exports["default"] = tokenize; +exports.FIELDS = void 0; + var t = _interopRequireWildcard(require("./tokenTypes")); + var _unescapable, _wordDelimiters; -function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } -function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } + +function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } + var unescapable = (_unescapable = {}, _unescapable[t.tab] = true, _unescapable[t.newline] = true, _unescapable[t.cr] = true, _unescapable[t.feed] = true, _unescapable); var wordDelimiters = (_wordDelimiters = {}, _wordDelimiters[t.space] = true, _wordDelimiters[t.tab] = true, _wordDelimiters[t.newline] = true, _wordDelimiters[t.cr] = true, _wordDelimiters[t.feed] = true, _wordDelimiters[t.ampersand] = true, _wordDelimiters[t.asterisk] = true, _wordDelimiters[t.bang] = true, _wordDelimiters[t.comma] = true, _wordDelimiters[t.colon] = true, _wordDelimiters[t.semicolon] = true, _wordDelimiters[t.openParenthesis] = true, _wordDelimiters[t.closeParenthesis] = true, _wordDelimiters[t.openSquare] = true, _wordDelimiters[t.closeSquare] = true, _wordDelimiters[t.singleQuote] = true, _wordDelimiters[t.doubleQuote] = true, _wordDelimiters[t.plus] = true, _wordDelimiters[t.pipe] = true, _wordDelimiters[t.tilde] = true, _wordDelimiters[t.greaterThan] = true, _wordDelimiters[t.equals] = true, _wordDelimiters[t.dollar] = true, _wordDelimiters[t.caret] = true, _wordDelimiters[t.slash] = true, _wordDelimiters); var hex = {}; var hexChars = "0123456789abcdefABCDEF"; + for (var i = 0; i < hexChars.length; i++) { hex[hexChars.charCodeAt(i)] = true; } - /** * Returns the last index of the bar css word * @param {string} css The string in which the word begins * @param {number} start The index into the string where word's first letter occurs */ + + function consumeWord(css, start) { var next = start; var code; + do { code = css.charCodeAt(next); + if (wordDelimiters[code]) { return next - 1; } else if (code === t.backslash) { @@ -34,28 +43,31 @@ function consumeWord(css, start) { next++; } } while (next < css.length); + return next - 1; } - /** * Returns the last index of the escape sequence * @param {string} css The string in which the sequence begins * @param {number} start The index into the string where escape character (`\`) occurs. */ + + function consumeEscape(css, start) { var next = start; var code = css.charCodeAt(next + 1); - if (unescapable[code]) { - // just consume the escape char + + if (unescapable[code]) {// just consume the escape char } else if (hex[code]) { - var hexDigits = 0; - // consume up to 6 hex chars + var hexDigits = 0; // consume up to 6 hex chars + do { next++; hexDigits++; code = css.charCodeAt(next + 1); - } while (hex[code] && hexDigits < 6); - // if fewer than 6 hex chars, a trailing space ends the escape + } while (hex[code] && hexDigits < 6); // if fewer than 6 hex chars, a trailing space ends the escape + + if (hexDigits < 6 && code === t.space) { next++; } @@ -63,8 +75,10 @@ function consumeEscape(css, start) { // the next char is part of the current word next++; } + return next; } + var FIELDS = { TYPE: 0, START_LINE: 1, @@ -75,16 +89,18 @@ var FIELDS = { END_POS: 6 }; exports.FIELDS = FIELDS; + function tokenize(input) { var tokens = []; var css = input.css.valueOf(); var _css = css, - length = _css.length; + length = _css.length; var offset = -1; var line = 1; var start = 0; var end = 0; var code, content, endColumn, endLine, escaped, escapePos, last, lines, next, nextLine, nextOffset, quote, tokenType; + function unclosed(what, fix) { if (input.safe) { // fyi: this is never set to true. @@ -94,12 +110,15 @@ function tokenize(input) { throw input.error('Unclosed ' + what, line, start - offset, start); } } + while (start < length) { code = css.charCodeAt(start); + if (code === t.newline) { offset = start; line += 1; } + switch (code) { case t.space: case t.tab: @@ -107,35 +126,41 @@ function tokenize(input) { case t.cr: case t.feed: next = start; + do { next += 1; code = css.charCodeAt(next); + if (code === t.newline) { offset = next; line += 1; } } while (code === t.space || code === t.newline || code === t.tab || code === t.cr || code === t.feed); + tokenType = t.space; endLine = line; endColumn = next - offset - 1; end = next; break; + case t.plus: case t.greaterThan: case t.tilde: case t.pipe: next = start; + do { next += 1; code = css.charCodeAt(next); } while (code === t.plus || code === t.greaterThan || code === t.tilde || code === t.pipe); + tokenType = t.combinator; endLine = line; endColumn = start - offset; end = next; break; - // Consume these characters as single tokens. + case t.asterisk: case t.ampersand: case t.bang: @@ -155,36 +180,46 @@ function tokenize(input) { endColumn = start - offset; end = next + 1; break; + case t.singleQuote: case t.doubleQuote: quote = code === t.singleQuote ? "'" : '"'; next = start; + do { escaped = false; next = css.indexOf(quote, next + 1); + if (next === -1) { unclosed('quote', quote); } + escapePos = next; + while (css.charCodeAt(escapePos - 1) === t.backslash) { escapePos -= 1; escaped = !escaped; } } while (escaped); + tokenType = t.str; endLine = line; endColumn = start - offset; end = next + 1; break; + default: if (code === t.slash && css.charCodeAt(start + 1) === t.asterisk) { next = css.indexOf('*/', start + 2) + 1; + if (next === 0) { unclosed('comment', '*/'); } + content = css.slice(start, next + 1); lines = content.split('\n'); last = lines.length - 1; + if (last > 0) { nextLine = line + last; nextOffset = next - lines[last].length; @@ -192,6 +227,7 @@ function tokenize(input) { nextLine = line; nextOffset = offset; } + tokenType = t.comment; line = nextLine; endLine = nextLine; @@ -208,32 +244,28 @@ function tokenize(input) { endLine = line; endColumn = next - offset; } + end = next + 1; break; - } + } // Ensure that the token structure remains consistent - // Ensure that the token structure remains consistent - tokens.push([tokenType, - // [0] Token type - line, - // [1] Starting line - start - offset, - // [2] Starting column - endLine, - // [3] Ending line - endColumn, - // [4] Ending column - start, - // [5] Start position / Source index + + tokens.push([tokenType, // [0] Token type + line, // [1] Starting line + start - offset, // [2] Starting column + endLine, // [3] Ending line + endColumn, // [4] Ending column + start, // [5] Start position / Source index end // [6] End position - ]); + ]); // Reset offset for the next token - // Reset offset for the next token if (nextOffset) { offset = nextOffset; nextOffset = null; } + start = end; } + return tokens; } \ No newline at end of file diff --git a/deps/npm/node_modules/postcss-selector-parser/dist/util/ensureObject.js b/deps/npm/node_modules/postcss-selector-parser/dist/util/ensureObject.js index 494941adaf212a..3472e075228405 100644 --- a/deps/npm/node_modules/postcss-selector-parser/dist/util/ensureObject.js +++ b/deps/npm/node_modules/postcss-selector-parser/dist/util/ensureObject.js @@ -2,16 +2,21 @@ exports.__esModule = true; exports["default"] = ensureObject; + function ensureObject(obj) { for (var _len = arguments.length, props = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { props[_key - 1] = arguments[_key]; } + while (props.length > 0) { var prop = props.shift(); + if (!obj[prop]) { obj[prop] = {}; } + obj = obj[prop]; } } + module.exports = exports.default; \ No newline at end of file diff --git a/deps/npm/node_modules/postcss-selector-parser/dist/util/getProp.js b/deps/npm/node_modules/postcss-selector-parser/dist/util/getProp.js index a2b7a07307b0ec..53e07c90253eb1 100644 --- a/deps/npm/node_modules/postcss-selector-parser/dist/util/getProp.js +++ b/deps/npm/node_modules/postcss-selector-parser/dist/util/getProp.js @@ -2,17 +2,23 @@ exports.__esModule = true; exports["default"] = getProp; + function getProp(obj) { for (var _len = arguments.length, props = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { props[_key - 1] = arguments[_key]; } + while (props.length > 0) { var prop = props.shift(); + if (!obj[prop]) { return undefined; } + obj = obj[prop]; } + return obj; } + module.exports = exports.default; \ No newline at end of file diff --git a/deps/npm/node_modules/postcss-selector-parser/dist/util/index.js b/deps/npm/node_modules/postcss-selector-parser/dist/util/index.js index f96ec11b6d4763..043fda8c64b9a8 100644 --- a/deps/npm/node_modules/postcss-selector-parser/dist/util/index.js +++ b/deps/npm/node_modules/postcss-selector-parser/dist/util/index.js @@ -1,13 +1,22 @@ "use strict"; exports.__esModule = true; -exports.unesc = exports.stripComments = exports.getProp = exports.ensureObject = void 0; +exports.stripComments = exports.ensureObject = exports.getProp = exports.unesc = void 0; + var _unesc = _interopRequireDefault(require("./unesc")); + exports.unesc = _unesc["default"]; + var _getProp = _interopRequireDefault(require("./getProp")); + exports.getProp = _getProp["default"]; + var _ensureObject = _interopRequireDefault(require("./ensureObject")); + exports.ensureObject = _ensureObject["default"]; + var _stripComments = _interopRequireDefault(require("./stripComments")); + exports.stripComments = _stripComments["default"]; + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } \ No newline at end of file diff --git a/deps/npm/node_modules/postcss-selector-parser/dist/util/stripComments.js b/deps/npm/node_modules/postcss-selector-parser/dist/util/stripComments.js index 0baa0e07eb0b94..c74f1fecdcc641 100644 --- a/deps/npm/node_modules/postcss-selector-parser/dist/util/stripComments.js +++ b/deps/npm/node_modules/postcss-selector-parser/dist/util/stripComments.js @@ -2,20 +2,26 @@ exports.__esModule = true; exports["default"] = stripComments; + function stripComments(str) { var s = ""; var commentStart = str.indexOf("/*"); var lastEnd = 0; + while (commentStart >= 0) { s = s + str.slice(lastEnd, commentStart); var commentEnd = str.indexOf("*/", commentStart + 2); + if (commentEnd < 0) { return s; } + lastEnd = commentEnd + 2; commentStart = str.indexOf("/*", lastEnd); } + s = s + str.slice(lastEnd); return s; } + module.exports = exports.default; \ No newline at end of file diff --git a/deps/npm/node_modules/postcss-selector-parser/dist/util/unesc.js b/deps/npm/node_modules/postcss-selector-parser/dist/util/unesc.js index d5d960448b155b..e4fac839ddd035 100644 --- a/deps/npm/node_modules/postcss-selector-parser/dist/util/unesc.js +++ b/deps/npm/node_modules/postcss-selector-parser/dist/util/unesc.js @@ -2,6 +2,7 @@ exports.__esModule = true; exports["default"] = unesc; + // Many thanks for this post which made this migration much easier. // https://mathiasbynens.be/notes/css-escapes @@ -14,63 +15,79 @@ function gobbleHex(str) { var lower = str.toLowerCase(); var hex = ''; var spaceTerminated = false; + for (var i = 0; i < 6 && lower[i] !== undefined; i++) { - var code = lower.charCodeAt(i); - // check to see if we are dealing with a valid hex char [a-f|0-9] - var valid = code >= 97 && code <= 102 || code >= 48 && code <= 57; - // https://drafts.csswg.org/css-syntax/#consume-escaped-code-point + var code = lower.charCodeAt(i); // check to see if we are dealing with a valid hex char [a-f|0-9] + + var valid = code >= 97 && code <= 102 || code >= 48 && code <= 57; // https://drafts.csswg.org/css-syntax/#consume-escaped-code-point + spaceTerminated = code === 32; + if (!valid) { break; } + hex += lower[i]; } + if (hex.length === 0) { return undefined; } + var codePoint = parseInt(hex, 16); - var isSurrogate = codePoint >= 0xD800 && codePoint <= 0xDFFF; - // Add special case for + var isSurrogate = codePoint >= 0xD800 && codePoint <= 0xDFFF; // Add special case for // "If this number is zero, or is for a surrogate, or is greater than the maximum allowed code point" // https://drafts.csswg.org/css-syntax/#maximum-allowed-code-point + if (isSurrogate || codePoint === 0x0000 || codePoint > 0x10FFFF) { return ["\uFFFD", hex.length + (spaceTerminated ? 1 : 0)]; } + return [String.fromCodePoint(codePoint), hex.length + (spaceTerminated ? 1 : 0)]; } + var CONTAINS_ESCAPE = /\\/; + function unesc(str) { var needToProcess = CONTAINS_ESCAPE.test(str); + if (!needToProcess) { return str; } + var ret = ""; + for (var i = 0; i < str.length; i++) { if (str[i] === "\\") { var gobbled = gobbleHex(str.slice(i + 1, i + 7)); + if (gobbled !== undefined) { ret += gobbled[0]; i += gobbled[1]; continue; - } - - // Retain a pair of \\ if double escaped `\\\\` + } // Retain a pair of \\ if double escaped `\\\\` // https://github.com/postcss/postcss-selector-parser/commit/268c9a7656fb53f543dc620aa5b73a30ec3ff20e + + if (str[i + 1] === "\\") { ret += "\\"; i++; continue; - } - - // if \\ is at the end of the string retain it + } // if \\ is at the end of the string retain it // https://github.com/postcss/postcss-selector-parser/commit/01a6b346e3612ce1ab20219acc26abdc259ccefb + + if (str.length === i + 1) { ret += str[i]; } + continue; } + ret += str[i]; } + return ret; } + module.exports = exports.default; \ No newline at end of file diff --git a/deps/npm/node_modules/postcss-selector-parser/package.json b/deps/npm/node_modules/postcss-selector-parser/package.json index ff9c40960f737a..9655072779a29e 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.11", "devDependencies": { "@babel/cli": "^7.11.6", "@babel/core": "^7.11.6", @@ -9,13 +9,13 @@ "@babel/plugin-proposal-class-properties": "^7.10.4", "@babel/preset-env": "^7.11.5", "@babel/register": "^7.11.5", - "ava": "^5.1.0", + "ava": "^3.12.1", "babel-plugin-add-module-exports": "^1.0.4", "coveralls": "^3.1.0", - "del-cli": "^5.0.0", - "eslint": "^8.28.0", - "eslint-plugin-import": "^2.26.0", - "glob": "^8.0.3", + "del-cli": "^3.0.1", + "eslint": "^7.9.0", + "eslint-plugin-import": "^2.22.0", + "glob": "^7.1.6", "minimist": "^1.2.5", "nyc": "^15.1.0", "postcss": "^8.0.0", @@ -37,7 +37,7 @@ "prepare": "del-cli dist && BABEL_ENV=publish babel src --out-dir dist --ignore /__tests__/", "lintfix": "eslint --fix src", "report": "nyc report --reporter=html", - "test": "nyc ava src/__tests__/*.mjs", + "test": "nyc ava src/__tests__/*.js ", "testone": "ava" }, "dependencies": { @@ -67,8 +67,7 @@ "@babel/register" ], "concurrency": 5, - "timeout": "25s", - "nodeArguments": [] + "timeout": "25s" }, "nyc": { "exclude": [ diff --git a/deps/npm/node_modules/read-package-json/lib/read-json.js b/deps/npm/node_modules/read-package-json/lib/read-json.js index aaf24e94a73757..e47a1bb2febca4 100644 --- a/deps/npm/node_modules/read-package-json/lib/read-json.js +++ b/deps/npm/node_modules/read-package-json/lib/read-json.js @@ -2,7 +2,7 @@ var fs = require('fs') var path = require('path') -var { glob } = require('glob') +var glob = require('glob') var normalizeData = require('normalize-package-data') var safeJSON = require('json-parse-even-better-errors') var util = require('util') @@ -67,15 +67,13 @@ function jsonClone (obj) { } else if (Array.isArray(obj)) { var newarr = new Array(obj.length) for (var ii in obj) { - newarr[ii] = jsonClone(obj[ii]) + newarr[ii] = obj[ii] } - return newarr } else if (typeof obj === 'object') { var newobj = {} for (var kk in obj) { - newobj[kk] = jsonClone(obj[kk]) + newobj[kk] = jsonClone[kk] } - return newobj } else { return obj } @@ -117,6 +115,7 @@ function parseJson (file, er, d, log, strict, cb) { return cb(parseError(jsonErr, file)) } } + extrasCached(file, d, data, log, strict, cb) } @@ -506,7 +505,7 @@ function final (file, data, log, strict, cb) { } function fillTypes (file, data, cb) { - var index = data.main || 'index.js' + var index = data.main ? data.main : 'index.js' if (typeof index !== 'string') { return cb(new TypeError('The "main" attribute must be of type string.')) diff --git a/deps/npm/node_modules/read-package-json/package.json b/deps/npm/node_modules/read-package-json/package.json index a2f93088f37fca..d1618e3f8977fc 100644 --- a/deps/npm/node_modules/read-package-json/package.json +++ b/deps/npm/node_modules/read-package-json/package.json @@ -1,6 +1,6 @@ { "name": "read-package-json", - "version": "6.0.3", + "version": "6.0.1", "author": "GitHub Inc.", "description": "The thing npm uses to read package.json files with semantics and defaults and validation", "repository": { @@ -23,14 +23,14 @@ "template-oss-apply": "template-oss-apply --force" }, "dependencies": { - "glob": "^10.2.2", + "glob": "^9.3.0", "json-parse-even-better-errors": "^3.0.0", "normalize-package-data": "^5.0.0", "npm-normalize-package-bin": "^3.0.0" }, "devDependencies": { "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.14.1", + "@npmcli/template-oss": "4.12.0", "tap": "^16.0.1" }, "license": "ISC", @@ -53,7 +53,6 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.14.1", - "publish": "true" + "version": "4.12.0" } } diff --git a/deps/npm/node_modules/read/lib/read.js b/deps/npm/node_modules/read/lib/read.js index 92ed4157261076..882b11c285bcf3 100644 --- a/deps/npm/node_modules/read/lib/read.js +++ b/deps/npm/node_modules/read/lib/read.js @@ -5,7 +5,6 @@ module.exports = async function read ({ default: def = '', input = process.stdin, output = process.stdout, - completer, prompt = '', silent, timeout, @@ -36,7 +35,7 @@ module.exports = async function read ({ output = m return new Promise((resolve, reject) => { - const rl = readline.createInterface({ input, output, terminal, silent: true, completer }) + const rl = readline.createInterface({ input, output, terminal }) const timer = timeout && setTimeout(() => onError(new Error('timed out')), timeout) output.unmute() @@ -67,10 +66,11 @@ module.exports = async function read ({ rl.on('line', (line) => { if (silent && terminal) { output.unmute() + output.write('\r\n') } done() // truncate the \n at the end. - const res = line.replace(/\r?\n?$/, '') || def || '' + const res = line.replace(/\r?\n$/, '') || def || '' return resolve(res) }) diff --git a/deps/npm/node_modules/read/package.json b/deps/npm/node_modules/read/package.json index 4d41f91878c114..7f8d7fc249c558 100644 --- a/deps/npm/node_modules/read/package.json +++ b/deps/npm/node_modules/read/package.json @@ -1,13 +1,13 @@ { "name": "read", - "version": "2.1.0", + "version": "2.0.0", "main": "lib/read.js", "dependencies": { "mute-stream": "~1.0.0" }, "devDependencies": { "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.13.0", + "@npmcli/template-oss": "4.11.0", "tap": "^16.3.0" }, "engines": { @@ -35,8 +35,7 @@ ], "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.13.0", - "publish": "true" + "version": "4.11.0" }, "tap": { "statements": 77, diff --git a/deps/npm/node_modules/semver/README.md b/deps/npm/node_modules/semver/README.md index 33c762cb225dcb..df54e7a0938962 100644 --- a/deps/npm/node_modules/semver/README.md +++ b/deps/npm/node_modules/semver/README.md @@ -110,9 +110,6 @@ Options: -l --loose Interpret versions and ranges loosely --n <0|1> - This is the base to be used for the prerelease identifier. - -p --include-prerelease Always include prerelease versions in range matching @@ -235,35 +232,6 @@ $ semver 1.2.4-beta.0 -i prerelease 1.2.4-beta.1 ``` -#### Prerelease Identifier Base - -The method `.inc` takes an optional parameter 'identifierBase' string -that will let you let your prerelease number as zero-based or one-based. -Set to `false` to omit the prerelease number altogether. -If you do not specify this parameter, it will default to zero-based. - -```javascript -semver.inc('1.2.3', 'prerelease', 'beta', '1') -// '1.2.4-beta.1' -``` - -```javascript -semver.inc('1.2.3', 'prerelease', 'beta', false) -// '1.2.4-beta' -``` - -command-line example: - -```bash -$ semver 1.2.3 -i prerelease --preid beta -n 1 -1.2.4-beta.1 -``` - -```bash -$ semver 1.2.3 -i prerelease --preid beta -n false -1.2.4-beta -``` - ### Advanced Range Syntax Advanced range syntax desugars to primitive comparators in @@ -545,40 +513,6 @@ ex. * `s.clean(' 2.1.5 ')`: `'2.1.5'` * `s.clean('~1.0.0')`: `null` -## Constants - -As a convenience, helper constants are exported to provide information about what `node-semver` supports: - -### `RELEASE_TYPES` - -- major -- premajor -- minor -- preminor -- patch -- prepatch -- prerelease - -``` -const semver = require('semver'); - -if (semver.RELEASE_TYPES.includes(arbitraryUserInput)) { - console.log('This is a valid release type!'); -} else { - console.warn('This is NOT a valid release type!'); -} -``` - -### `SEMVER_SPEC_VERSION` - -2.0.0 - -``` -const semver = require('semver'); - -console.log('We are currently using the semver specification version:', semver.SEMVER_SPEC_VERSION); -``` - ## Exported Modules -> Stability: 1 - Experimental - Enable the Permission Model for current process. When enabled, the following permissions are restricted: @@ -627,7 +625,7 @@ added: - v19.7.0 - v18.15.0 changes: - - version: v20.1.0 + - version: REPLACEME pr-url: https://github.com/nodejs/node/pull/47686 description: This option can be used with `--test`. --> diff --git a/doc/api/deprecations.md b/doc/api/deprecations.md index d26d62a2c14dd0..7be9876e4c0db7 100644 --- a/doc/api/deprecations.md +++ b/doc/api/deprecations.md @@ -3367,7 +3367,7 @@ be added when a function is bound to an `AsyncResource`. diff --git a/doc/api/dns.md b/doc/api/dns.md index d04dbd4a3768ef..2bb997bb0a2b4e 100644 --- a/doc/api/dns.md +++ b/doc/api/dns.md @@ -795,7 +795,7 @@ dns orders in workers. ## `dns.getDefaultResultOrder()` Get the default value for `verbatim` in [`dns.lookup()`][] and @@ -1366,7 +1366,7 @@ default dns orders in workers. ### `dnsPromises.getDefaultResultOrder()` Get the value of `dnsOrder`. diff --git a/doc/api/errors.md b/doc/api/errors.md index 992ab1e7a21932..2336274e7000f3 100644 --- a/doc/api/errors.md +++ b/doc/api/errors.md @@ -1438,12 +1438,6 @@ Status code was outside the regular status code range (100-999). The client has not sent the entire request within the allowed time. - - -### `ERR_HTTP_SOCKET_ASSIGNED` - -The given [`ServerResponse`][] was already assigned a socket. - ### `ERR_HTTP_SOCKET_ENCODING` @@ -3596,7 +3590,6 @@ The native call from `process.cpuUsage` could not be processed. [`Object.getPrototypeOf`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/getPrototypeOf [`Object.setPrototypeOf`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/setPrototypeOf [`REPL`]: repl.md -[`ServerResponse`]: http.md#class-httpserverresponse [`Writable`]: stream.md#class-streamwritable [`child_process`]: child_process.md [`cipher.getAuthTag()`]: crypto.md#ciphergetauthtag diff --git a/doc/api/fs.md b/doc/api/fs.md index 4c8b736be6359c..a4efd37018c413 100644 --- a/doc/api/fs.md +++ b/doc/api/fs.md @@ -966,7 +966,7 @@ try { * {string} diff --git a/doc/api/globals.md b/doc/api/globals.md index 306d800dbdfd47..dec10a5a4e55f9 100644 --- a/doc/api/globals.md +++ b/doc/api/globals.md @@ -509,6 +509,8 @@ added: v0.1.27 +> Stability: 3 - Legacy. Use [`globalThis`][] instead. + * {Object} The global namespace object. In browsers, the top-level scope is the global scope. This means that @@ -1028,6 +1030,7 @@ A browser-compatible implementation of [`WritableStreamDefaultWriter`][]. [`console`]: console.md [`exports`]: modules.md#exports [`fetch()`]: https://developer.mozilla.org/en-US/docs/Web/API/fetch +[`globalThis`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/globalThis [`module`]: modules.md#module [`perf_hooks.performance`]: perf_hooks.md#perf_hooksperformance [`process.nextTick()`]: process.md#processnexttickcallback-args diff --git a/doc/api/http.md b/doc/api/http.md index 9493c6a269c263..30ce1ae3f43671 100644 --- a/doc/api/http.md +++ b/doc/api/http.md @@ -3192,7 +3192,7 @@ Found'`. -* `scope` {string} +* `scopes` {string} * `reference` {string} * Returns: {boolean} @@ -2657,8 +2657,6 @@ The available scopes are: * `fs` - All File System * `fs.read` - File System read operations * `fs.write` - File System write operations -* `child` - Child process spawning operations -* `worker` - Worker thread spawning operation ```js // Check if the process has permission to read the README file diff --git a/doc/api/single-executable-applications.md b/doc/api/single-executable-applications.md index fe8ff1b9545783..46c3c8e87afe95 100644 --- a/doc/api/single-executable-applications.md +++ b/doc/api/single-executable-applications.md @@ -164,8 +164,7 @@ The configuration currently reads the following top-level fields: ```json { "main": "/path/to/bundled/script.js", - "output": "/path/to/write/the/generated/blob.blob", - "disableExperimentalSEAWarning": true // Default: false + "output": "/path/to/write/the/generated/blob.blob" } ``` diff --git a/doc/api/stream.md b/doc/api/stream.md index 4b204da5e8df51..8a60742b1eed95 100644 --- a/doc/api/stream.md +++ b/doc/api/stream.md @@ -3360,7 +3360,7 @@ reader.read().then(({ value, done }) => { added: v19.9.0 --> -* `objectMode` {boolean} +* {boolean} objectMode * Returns: {integer} Returns the default highWaterMark used by streams. @@ -3372,8 +3372,8 @@ Defaults to `16384` (16 KiB), or `16` for `objectMode`. added: v19.9.0 --> -* `objectMode` {boolean} -* `value` {integer} highWaterMark value +* {boolean} objectMode +* {integer} highWaterMark value Sets the default highWaterMark used by streams. diff --git a/doc/api/test.md b/doc/api/test.md index 010c8850a32a96..f6be4f79325a8d 100644 --- a/doc/api/test.md +++ b/doc/api/test.md @@ -728,7 +728,7 @@ added: - v18.9.0 - v16.19.0 changes: - - version: v20.1.0 + - version: REPLACEME pr-url: https://github.com/nodejs/node/pull/47628 description: Add a testNamePatterns option. --> @@ -1510,7 +1510,7 @@ added: - v18.0.0 - v16.17.0 changes: - - version: v20.1.0 + - version: REPLACEME pr-url: https://github.com/nodejs/node/pull/47586 description: The `before` function was added to TestContext. --> @@ -1522,7 +1522,7 @@ exposed as part of the API. ### `context.before([fn][, options])` * `fn` {Function|AsyncFunction} The hook function. The first argument diff --git a/doc/api/v8.md b/doc/api/v8.md index 399cb1e82adf12..9ce500bf19c71d 100644 --- a/doc/api/v8.md +++ b/doc/api/v8.md @@ -921,12 +921,15 @@ added: > Stability: 1 - Experimental The `v8.startupSnapshot` interface can be used to add serialization and -deserialization hooks for custom startup snapshots. +deserialization hooks for custom startup snapshots. Currently the startup +snapshots can only be built into the Node.js binary from source. ```console -$ node --snapshot-blob snapshot.blob --build-snapshot entry.js -# This launches a process with the snapshot -$ node --snapshot-blob snapshot.blob +$ cd /path/to/node +$ ./configure --node-snapshot-main=entry.js +$ make node +# This binary contains the result of the execution of entry.js +$ out/Release/node ``` In the example above, `entry.js` can use methods from the `v8.startupSnapshot` @@ -943,66 +946,42 @@ const zlib = require('node:zlib'); const path = require('node:path'); const assert = require('node:assert'); -const v8 = require('node:v8'); +const { + isBuildingSnapshot, + addSerializeCallback, + addDeserializeCallback, + setDeserializeMainFunction, +} = require('node:v8').startupSnapshot; -class BookShelf { - storage = new Map(); +const filePath = path.resolve(__dirname, '../x1024.txt'); +const storage = {}; - // Reading a series of files from directory and store them into storage. - constructor(directory, books) { - for (const book of books) { - this.storage.set(book, fs.readFileSync(path.join(directory, book))); - } - } +assert(isBuildingSnapshot()); - static compressAll(shelf) { - for (const [ book, content ] of shelf.storage) { - shelf.storage.set(book, zlib.gzipSync(content)); - } - } +addSerializeCallback(({ filePath }) => { + storage[filePath] = zlib.gzipSync(fs.readFileSync(filePath)); +}, { filePath }); - static decompressAll(shelf) { - for (const [ book, content ] of shelf.storage) { - shelf.storage.set(book, zlib.gunzipSync(content)); - } - } -} +addDeserializeCallback(({ filePath }) => { + storage[filePath] = zlib.gunzipSync(storage[filePath]); +}, { filePath }); -// __dirname here is where the snapshot script is placed -// during snapshot building time. -const shelf = new BookShelf(__dirname, [ - 'book1.en_US.txt', - 'book1.es_ES.txt', - 'book2.zh_CN.txt', -]); - -assert(v8.startupSnapshot.isBuildingSnapshot()); -// On snapshot serialization, compress the books to reduce size. -v8.startupSnapshot.addSerializeCallback(BookShelf.compressAll, shelf); -// On snapshot deserialization, decompress the books. -v8.startupSnapshot.addDeserializeCallback(BookShelf.decompressAll, shelf); -v8.startupSnapshot.setDeserializeMainFunction((shelf) => { - // process.env and process.argv are refreshed during snapshot - // deserialization. - const lang = process.env.BOOK_LANG || 'en_US'; - const book = process.argv[1]; - const name = `${book}.${lang}.txt`; - console.log(shelf.storage.get(name)); -}, shelf); +setDeserializeMainFunction(({ filePath }) => { + console.log(storage[filePath].toString()); +}, { filePath }); ``` -The resulted binary will get print the data deserialized from the snapshot -during start up, using the refreshed `process.env` and `process.argv` of -the launched process: +The resulted binary will simply print the data deserialized from the snapshot +during start up: ```console -$ BOOK_LANG=es_ES node --snapshot-blob snapshot.blob book1 -# Prints content of book1.es_ES.txt deserialized from the snapshot. +$ out/Release/node +# Prints content of ./test/fixtures/x1024.txt ``` -Currently the application deserialized from a user-land snapshot cannot -be snapshotted again, so these APIs are only available to applications -that are not deserialized from a user-land snapshot. +Currently the API is only available to a Node.js instance launched from the +default snapshot, that is, the application deserialized from a user-land +snapshot cannot use these APIs again. ### `v8.startupSnapshot.addSerializeCallback(callback[, data])` diff --git a/doc/api/wasi.md b/doc/api/wasi.md index 4f84fd06b30029..a4171c4a6ddf81 100644 --- a/doc/api/wasi.md +++ b/doc/api/wasi.md @@ -118,7 +118,7 @@ added: - v13.3.0 - v12.16.0 changes: - - version: v20.1.0 + - version: REPLACEME pr-url: https://github.com/nodejs/node/pull/47390 description: default value of returnOnExit changed to true. - version: v20.0.0 diff --git a/doc/api/worker_threads.md b/doc/api/worker_threads.md index 09b695eb96ea29..f3f500c9075058 100644 --- a/doc/api/worker_threads.md +++ b/doc/api/worker_threads.md @@ -130,11 +130,8 @@ added: - v12.19.0 --> -* `object` {any} Any arbitrary JavaScript value. - Mark an object as not transferable. If `object` occurs in the transfer list of -a [`port.postMessage()`][] call, an error is thrown. This is a no-op if -`object` is a primitive value. +a [`port.postMessage()`][] call, it is ignored. In particular, this makes sense for objects that can be cloned, rather than transferred, and which are used by other objects on the sending side. @@ -153,17 +150,11 @@ const typedArray2 = new Float64Array(pooledBuffer); markAsUntransferable(pooledBuffer); const { port1 } = new MessageChannel(); -try { - // This will throw an error, because pooledBuffer is not transferable. - port1.postMessage(typedArray1, [ typedArray1.buffer ]); -} catch (error) { - // error.name === 'DataCloneError' -} +port1.postMessage(typedArray1, [ typedArray1.buffer ]); // The following line prints the contents of typedArray1 -- it still owns -// its memory and has not been transferred. Without -// `markAsUntransferable()`, this would print an empty Uint8Array and the -// postMessage call would have succeeded. +// its memory and has been cloned, not transferred. Without +// `markAsUntransferable()`, this would print an empty Uint8Array. // typedArray2 is intact as well. console.log(typedArray1); console.log(typedArray2); @@ -171,29 +162,6 @@ console.log(typedArray2); There is no equivalent to this API in browsers. -## `worker.isMarkedAsUntransferable(object)` - - - -* `object` {any} Any JavaScript value. -* Returns: {boolean} - -Check if an object is marked as not transferable with -[`markAsUntransferable()`][]. - -```js -const { markAsUntransferable, isMarkedAsUntransferable } = require('node:worker_threads'); - -const pooledBuffer = new ArrayBuffer(8); -markAsUntransferable(pooledBuffer); - -isMarkedAsUntransferable(pooledBuffer); // Returns true. -``` - -There is no equivalent to this API in browsers. - ## `worker.moveMessagePortToContext(port, contextifiedSandbox)`