@pnpm/exe 12.8.1 → 12.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/pnpm.mjs +5 -1
- package/bin/pnpx.mjs +1 -1
- package/dist/node_modules/.bin/get-pnpm +4 -1
- package/dist/node_modules/.bin/node-gyp +4 -1
- package/dist/node_modules/.bin/node-which +4 -1
- package/dist/node_modules/.bin/nopt +4 -1
- package/dist/node_modules/.bin/semver +4 -1
- package/dist/node_modules/.pnpm-workspace-state-v1.json +18 -11
- package/dist/node_modules/undici/lib/core/request.js +68 -2
- package/dist/node_modules/undici/lib/dispatcher/client-h1.js +18 -7
- package/dist/node_modules/undici/lib/dispatcher/client-h2.js +70 -18
- package/dist/node_modules/undici/lib/handler/retry-handler.js +4 -1
- package/dist/node_modules/undici/package.json +1 -1
- package/dist/wasm/LICENSE +22 -0
- package/dist/wasm/README.md +140 -0
- package/dist/wasm/THIRD-PARTY-NOTICES.md +42 -0
- package/dist/wasm/host/atomic-waits.mjs +43 -0
- package/dist/wasm/host/cancellation.mjs +6 -0
- package/dist/wasm/host/executable-mode.mjs +8 -0
- package/dist/wasm/host/file-locks.mjs +40 -0
- package/dist/wasm/host/filesystem.mjs +318 -0
- package/dist/wasm/host/guest-imports.mjs +45 -0
- package/dist/wasm/host/guest-operations.mjs +148 -0
- package/dist/wasm/host/lock-registry.mjs +167 -0
- package/dist/wasm/host/network.mjs +76 -0
- package/dist/wasm/host/operations.mjs +67 -0
- package/dist/wasm/host/poll.mjs +74 -0
- package/dist/wasm/host/process-stdio.mjs +41 -0
- package/dist/wasm/host/process-tree.mjs +54 -0
- package/dist/wasm/host/process.mjs +126 -0
- package/dist/wasm/host/protocol.mjs +1 -0
- package/dist/wasm/host/resources.mjs +76 -0
- package/dist/wasm/host/shell-runner.mjs +8 -0
- package/dist/wasm/host/shell.mjs +19 -0
- package/dist/wasm/host/signals.mjs +49 -0
- package/dist/wasm/host/terminal-input.mjs +7 -0
- package/dist/wasm/host/terminal-password.mjs +32 -0
- package/dist/wasm/host/terminal-session.mjs +114 -0
- package/dist/wasm/host/terminal.mjs +61 -0
- package/dist/wasm/host/thread-spawn.mjs +21 -0
- package/dist/wasm/host/upload.mjs +21 -0
- package/dist/wasm/host/wait-for-reply.mjs +7 -0
- package/dist/wasm/host/wasi-errno.mjs +81 -0
- package/dist/wasm/host/wasi-imports.mjs +58 -0
- package/dist/wasm/node_modules/.bin/js-yaml +91 -0
- package/dist/wasm/node_modules/.bin/node-which +91 -0
- package/dist/wasm/node_modules/.bin/shell +91 -0
- package/dist/wasm/node_modules/.pnpm-workspace-state-v1.json +355 -0
- package/dist/wasm/node_modules/@emnapi/wasi-threads/LICENSE +21 -0
- package/dist/wasm/node_modules/@emnapi/wasi-threads/README.md +203 -0
- package/dist/wasm/node_modules/@emnapi/wasi-threads/dist/wasi-threads.cjs.js +894 -0
- package/dist/wasm/node_modules/@emnapi/wasi-threads/dist/wasi-threads.cjs.min.d.ts +272 -0
- package/dist/wasm/node_modules/@emnapi/wasi-threads/dist/wasi-threads.cjs.min.js +1 -0
- package/dist/wasm/node_modules/@emnapi/wasi-threads/dist/wasi-threads.d.mts +272 -0
- package/dist/wasm/node_modules/@emnapi/wasi-threads/dist/wasi-threads.d.ts +274 -0
- package/dist/wasm/node_modules/@emnapi/wasi-threads/dist/wasi-threads.esm-bundler.js +942 -0
- package/dist/wasm/node_modules/@emnapi/wasi-threads/dist/wasi-threads.js +954 -0
- package/dist/wasm/node_modules/@emnapi/wasi-threads/dist/wasi-threads.min.d.mts +272 -0
- package/dist/wasm/node_modules/@emnapi/wasi-threads/dist/wasi-threads.min.js +1 -0
- package/dist/wasm/node_modules/@emnapi/wasi-threads/dist/wasi-threads.min.mjs +1 -0
- package/dist/wasm/node_modules/@emnapi/wasi-threads/dist/wasi-threads.mjs +889 -0
- package/dist/wasm/node_modules/@emnapi/wasi-threads/index.js +5 -0
- package/dist/wasm/node_modules/@emnapi/wasi-threads/package.json +50 -0
- package/dist/wasm/node_modules/@nodelib/fs.scandir/LICENSE +21 -0
- package/dist/wasm/node_modules/@nodelib/fs.scandir/README.md +171 -0
- package/dist/wasm/node_modules/@nodelib/fs.scandir/out/adapters/fs.d.ts +20 -0
- package/dist/wasm/node_modules/@nodelib/fs.scandir/out/adapters/fs.js +19 -0
- package/dist/wasm/node_modules/@nodelib/fs.scandir/out/constants.d.ts +4 -0
- package/dist/wasm/node_modules/@nodelib/fs.scandir/out/constants.js +17 -0
- package/dist/wasm/node_modules/@nodelib/fs.scandir/out/index.d.ts +12 -0
- package/dist/wasm/node_modules/@nodelib/fs.scandir/out/index.js +26 -0
- package/dist/wasm/node_modules/@nodelib/fs.scandir/out/providers/async.d.ts +7 -0
- package/dist/wasm/node_modules/@nodelib/fs.scandir/out/providers/async.js +104 -0
- package/dist/wasm/node_modules/@nodelib/fs.scandir/out/providers/common.d.ts +1 -0
- package/dist/wasm/node_modules/@nodelib/fs.scandir/out/providers/common.js +13 -0
- package/dist/wasm/node_modules/@nodelib/fs.scandir/out/providers/sync.d.ts +5 -0
- package/dist/wasm/node_modules/@nodelib/fs.scandir/out/providers/sync.js +54 -0
- package/dist/wasm/node_modules/@nodelib/fs.scandir/out/settings.d.ts +20 -0
- package/dist/wasm/node_modules/@nodelib/fs.scandir/out/settings.js +24 -0
- package/dist/wasm/node_modules/@nodelib/fs.scandir/out/types/index.d.ts +20 -0
- package/dist/wasm/node_modules/@nodelib/fs.scandir/out/types/index.js +2 -0
- package/dist/wasm/node_modules/@nodelib/fs.scandir/out/utils/fs.d.ts +2 -0
- package/dist/wasm/node_modules/@nodelib/fs.scandir/out/utils/fs.js +19 -0
- package/dist/wasm/node_modules/@nodelib/fs.scandir/out/utils/index.d.ts +2 -0
- package/dist/wasm/node_modules/@nodelib/fs.scandir/out/utils/index.js +5 -0
- package/dist/wasm/node_modules/@nodelib/fs.scandir/package.json +44 -0
- package/dist/wasm/node_modules/@nodelib/fs.stat/LICENSE +21 -0
- package/dist/wasm/node_modules/@nodelib/fs.stat/README.md +126 -0
- package/dist/wasm/node_modules/@nodelib/fs.stat/out/adapters/fs.d.ts +13 -0
- package/dist/wasm/node_modules/@nodelib/fs.stat/out/adapters/fs.js +17 -0
- package/dist/wasm/node_modules/@nodelib/fs.stat/out/index.d.ts +12 -0
- package/dist/wasm/node_modules/@nodelib/fs.stat/out/index.js +26 -0
- package/dist/wasm/node_modules/@nodelib/fs.stat/out/providers/async.d.ts +4 -0
- package/dist/wasm/node_modules/@nodelib/fs.stat/out/providers/async.js +36 -0
- package/dist/wasm/node_modules/@nodelib/fs.stat/out/providers/sync.d.ts +3 -0
- package/dist/wasm/node_modules/@nodelib/fs.stat/out/providers/sync.js +23 -0
- package/dist/wasm/node_modules/@nodelib/fs.stat/out/settings.d.ts +16 -0
- package/dist/wasm/node_modules/@nodelib/fs.stat/out/settings.js +16 -0
- package/dist/wasm/node_modules/@nodelib/fs.stat/out/types/index.d.ts +4 -0
- package/dist/wasm/node_modules/@nodelib/fs.stat/out/types/index.js +2 -0
- package/dist/wasm/node_modules/@nodelib/fs.stat/package.json +37 -0
- package/dist/wasm/node_modules/@nodelib/fs.walk/LICENSE +21 -0
- package/dist/wasm/node_modules/@nodelib/fs.walk/README.md +215 -0
- package/dist/wasm/node_modules/@nodelib/fs.walk/out/index.d.ts +14 -0
- package/dist/wasm/node_modules/@nodelib/fs.walk/out/index.js +34 -0
- package/dist/wasm/node_modules/@nodelib/fs.walk/out/providers/async.d.ts +12 -0
- package/dist/wasm/node_modules/@nodelib/fs.walk/out/providers/async.js +30 -0
- package/dist/wasm/node_modules/@nodelib/fs.walk/out/providers/index.d.ts +4 -0
- package/dist/wasm/node_modules/@nodelib/fs.walk/out/providers/index.js +9 -0
- package/dist/wasm/node_modules/@nodelib/fs.walk/out/providers/stream.d.ts +12 -0
- package/dist/wasm/node_modules/@nodelib/fs.walk/out/providers/stream.js +34 -0
- package/dist/wasm/node_modules/@nodelib/fs.walk/out/providers/sync.d.ts +10 -0
- package/dist/wasm/node_modules/@nodelib/fs.walk/out/providers/sync.js +14 -0
- package/dist/wasm/node_modules/@nodelib/fs.walk/out/readers/async.d.ts +30 -0
- package/dist/wasm/node_modules/@nodelib/fs.walk/out/readers/async.js +97 -0
- package/dist/wasm/node_modules/@nodelib/fs.walk/out/readers/common.d.ts +7 -0
- package/dist/wasm/node_modules/@nodelib/fs.walk/out/readers/common.js +31 -0
- package/dist/wasm/node_modules/@nodelib/fs.walk/out/readers/reader.d.ts +6 -0
- package/dist/wasm/node_modules/@nodelib/fs.walk/out/readers/reader.js +11 -0
- package/dist/wasm/node_modules/@nodelib/fs.walk/out/readers/sync.d.ts +15 -0
- package/dist/wasm/node_modules/@nodelib/fs.walk/out/readers/sync.js +59 -0
- package/dist/wasm/node_modules/@nodelib/fs.walk/out/settings.d.ts +30 -0
- package/dist/wasm/node_modules/@nodelib/fs.walk/out/settings.js +26 -0
- package/dist/wasm/node_modules/@nodelib/fs.walk/out/types/index.d.ts +8 -0
- package/dist/wasm/node_modules/@nodelib/fs.walk/out/types/index.js +2 -0
- package/dist/wasm/node_modules/@nodelib/fs.walk/package.json +44 -0
- package/dist/wasm/node_modules/@tybys/wasm-util/LICENSE +21 -0
- package/dist/wasm/node_modules/@tybys/wasm-util/README.md +193 -0
- package/dist/wasm/node_modules/@tybys/wasm-util/dist/tsdoc-metadata.json +11 -0
- package/dist/wasm/node_modules/@tybys/wasm-util/dist/wasm-util.d.ts +423 -0
- package/dist/wasm/node_modules/@tybys/wasm-util/dist/wasm-util.esm-bundler.js +2932 -0
- package/dist/wasm/node_modules/@tybys/wasm-util/dist/wasm-util.esm.js +2932 -0
- package/dist/wasm/node_modules/@tybys/wasm-util/dist/wasm-util.esm.min.js +1 -0
- package/dist/wasm/node_modules/@tybys/wasm-util/dist/wasm-util.js +2954 -0
- package/dist/wasm/node_modules/@tybys/wasm-util/dist/wasm-util.min.js +1 -0
- package/dist/wasm/node_modules/@tybys/wasm-util/lib/cjs/asyncify.js +158 -0
- package/dist/wasm/node_modules/@tybys/wasm-util/lib/cjs/index.js +13 -0
- package/dist/wasm/node_modules/@tybys/wasm-util/lib/cjs/jspi.js +46 -0
- package/dist/wasm/node_modules/@tybys/wasm-util/lib/cjs/load.js +97 -0
- package/dist/wasm/node_modules/@tybys/wasm-util/lib/cjs/memory.js +35 -0
- package/dist/wasm/node_modules/@tybys/wasm-util/lib/cjs/wasi/error.js +103 -0
- package/dist/wasm/node_modules/@tybys/wasm-util/lib/cjs/wasi/fd.js +268 -0
- package/dist/wasm/node_modules/@tybys/wasm-util/lib/cjs/wasi/fs.js +3 -0
- package/dist/wasm/node_modules/@tybys/wasm-util/lib/cjs/wasi/index.js +192 -0
- package/dist/wasm/node_modules/@tybys/wasm-util/lib/cjs/wasi/path.js +316 -0
- package/dist/wasm/node_modules/@tybys/wasm-util/lib/cjs/wasi/preview1.js +1599 -0
- package/dist/wasm/node_modules/@tybys/wasm-util/lib/cjs/wasi/rights.js +141 -0
- package/dist/wasm/node_modules/@tybys/wasm-util/lib/cjs/wasi/types.js +220 -0
- package/dist/wasm/node_modules/@tybys/wasm-util/lib/cjs/wasi/util.js +128 -0
- package/dist/wasm/node_modules/@tybys/wasm-util/lib/cjs/webassembly.js +13 -0
- package/dist/wasm/node_modules/@tybys/wasm-util/lib/mjs/asyncify.mjs +153 -0
- package/dist/wasm/node_modules/@tybys/wasm-util/lib/mjs/index.mjs +9 -0
- package/dist/wasm/node_modules/@tybys/wasm-util/lib/mjs/jspi.mjs +39 -0
- package/dist/wasm/node_modules/@tybys/wasm-util/lib/mjs/load.mjs +89 -0
- package/dist/wasm/node_modules/@tybys/wasm-util/lib/mjs/memory.mjs +28 -0
- package/dist/wasm/node_modules/@tybys/wasm-util/lib/mjs/wasi/error.mjs +97 -0
- package/dist/wasm/node_modules/@tybys/wasm-util/lib/mjs/wasi/fd.mjs +256 -0
- package/dist/wasm/node_modules/@tybys/wasm-util/lib/mjs/wasi/fs.mjs +1 -0
- package/dist/wasm/node_modules/@tybys/wasm-util/lib/mjs/wasi/index.mjs +186 -0
- package/dist/wasm/node_modules/@tybys/wasm-util/lib/mjs/wasi/path.mjs +310 -0
- package/dist/wasm/node_modules/@tybys/wasm-util/lib/mjs/wasi/preview1.mjs +1593 -0
- package/dist/wasm/node_modules/@tybys/wasm-util/lib/mjs/wasi/rights.mjs +135 -0
- package/dist/wasm/node_modules/@tybys/wasm-util/lib/mjs/wasi/types.mjs +216 -0
- package/dist/wasm/node_modules/@tybys/wasm-util/lib/mjs/wasi/util.mjs +113 -0
- package/dist/wasm/node_modules/@tybys/wasm-util/lib/mjs/webassembly.mjs +9 -0
- package/dist/wasm/node_modules/@tybys/wasm-util/package.json +58 -0
- package/dist/wasm/node_modules/@types/braces/LICENSE +21 -0
- package/dist/wasm/node_modules/@types/braces/README.md +15 -0
- package/dist/wasm/node_modules/@types/braces/index.d.ts +100 -0
- package/dist/wasm/node_modules/@types/braces/package.json +36 -0
- package/dist/wasm/node_modules/@types/micromatch/LICENSE +21 -0
- package/dist/wasm/node_modules/@types/micromatch/README.md +15 -0
- package/dist/wasm/node_modules/@types/micromatch/index.d.ts +670 -0
- package/dist/wasm/node_modules/@types/micromatch/package.json +28 -0
- package/dist/wasm/node_modules/@yarnpkg/fslib/README.md +17 -0
- package/dist/wasm/node_modules/@yarnpkg/fslib/lib/AliasFS.d.ts +16 -0
- package/dist/wasm/node_modules/@yarnpkg/fslib/lib/AliasFS.js +24 -0
- package/dist/wasm/node_modules/@yarnpkg/fslib/lib/CwdFS.d.ts +15 -0
- package/dist/wasm/node_modules/@yarnpkg/fslib/lib/CwdFS.js +36 -0
- package/dist/wasm/node_modules/@yarnpkg/fslib/lib/FakeFS.d.ts +398 -0
- package/dist/wasm/node_modules/@yarnpkg/fslib/lib/FakeFS.js +451 -0
- package/dist/wasm/node_modules/@yarnpkg/fslib/lib/JailFS.d.ts +16 -0
- package/dist/wasm/node_modules/@yarnpkg/fslib/lib/JailFS.js +35 -0
- package/dist/wasm/node_modules/@yarnpkg/fslib/lib/LazyFS.d.ts +13 -0
- package/dist/wasm/node_modules/@yarnpkg/fslib/lib/LazyFS.js +26 -0
- package/dist/wasm/node_modules/@yarnpkg/fslib/lib/MountFS.d.ts +278 -0
- package/dist/wasm/node_modules/@yarnpkg/fslib/lib/MountFS.js +873 -0
- package/dist/wasm/node_modules/@yarnpkg/fslib/lib/NoFS.d.ts +78 -0
- package/dist/wasm/node_modules/@yarnpkg/fslib/lib/NoFS.js +229 -0
- package/dist/wasm/node_modules/@yarnpkg/fslib/lib/NodeFS.d.ts +223 -0
- package/dist/wasm/node_modules/@yarnpkg/fslib/lib/NodeFS.js +476 -0
- package/dist/wasm/node_modules/@yarnpkg/fslib/lib/NodePathFS.d.ts +18 -0
- package/dist/wasm/node_modules/@yarnpkg/fslib/lib/NodePathFS.js +47 -0
- package/dist/wasm/node_modules/@yarnpkg/fslib/lib/PosixFS.d.ts +9 -0
- package/dist/wasm/node_modules/@yarnpkg/fslib/lib/PosixFS.js +18 -0
- package/dist/wasm/node_modules/@yarnpkg/fslib/lib/ProxiedFS.d.ts +229 -0
- package/dist/wasm/node_modules/@yarnpkg/fslib/lib/ProxiedFS.js +255 -0
- package/dist/wasm/node_modules/@yarnpkg/fslib/lib/VirtualFS.d.ts +19 -0
- package/dist/wasm/node_modules/@yarnpkg/fslib/lib/VirtualFS.js +89 -0
- package/dist/wasm/node_modules/@yarnpkg/fslib/lib/algorithms/copyPromise.d.ts +19 -0
- package/dist/wasm/node_modules/@yarnpkg/fslib/lib/algorithms/copyPromise.js +271 -0
- package/dist/wasm/node_modules/@yarnpkg/fslib/lib/algorithms/opendir.d.ts +22 -0
- package/dist/wasm/node_modules/@yarnpkg/fslib/lib/algorithms/opendir.js +65 -0
- package/dist/wasm/node_modules/@yarnpkg/fslib/lib/algorithms/watchFile/CustomStatWatcher.d.ts +59 -0
- package/dist/wasm/node_modules/@yarnpkg/fslib/lib/algorithms/watchFile/CustomStatWatcher.js +139 -0
- package/dist/wasm/node_modules/@yarnpkg/fslib/lib/algorithms/watchFile.d.ts +6 -0
- package/dist/wasm/node_modules/@yarnpkg/fslib/lib/algorithms/watchFile.js +67 -0
- package/dist/wasm/node_modules/@yarnpkg/fslib/lib/constants.d.ts +13 -0
- package/dist/wasm/node_modules/@yarnpkg/fslib/lib/constants.js +16 -0
- package/dist/wasm/node_modules/@yarnpkg/fslib/lib/errors.d.ts +36 -0
- package/dist/wasm/node_modules/@yarnpkg/fslib/lib/errors.js +54 -0
- package/dist/wasm/node_modules/@yarnpkg/fslib/lib/index.d.ts +48 -0
- package/dist/wasm/node_modules/@yarnpkg/fslib/lib/index.js +55 -0
- package/dist/wasm/node_modules/@yarnpkg/fslib/lib/patchFs/FileHandle.d.ts +81 -0
- package/dist/wasm/node_modules/@yarnpkg/fslib/lib/patchFs/FileHandle.js +254 -0
- package/dist/wasm/node_modules/@yarnpkg/fslib/lib/patchFs/patchFs.d.ts +5 -0
- package/dist/wasm/node_modules/@yarnpkg/fslib/lib/patchFs/patchFs.js +265 -0
- package/dist/wasm/node_modules/@yarnpkg/fslib/lib/path.d.ts +84 -0
- package/dist/wasm/node_modules/@yarnpkg/fslib/lib/path.js +103 -0
- package/dist/wasm/node_modules/@yarnpkg/fslib/lib/statUtils.d.ts +81 -0
- package/dist/wasm/node_modules/@yarnpkg/fslib/lib/statUtils.js +238 -0
- package/dist/wasm/node_modules/@yarnpkg/fslib/lib/xfs.d.ts +18 -0
- package/dist/wasm/node_modules/@yarnpkg/fslib/lib/xfs.js +123 -0
- package/dist/wasm/node_modules/@yarnpkg/fslib/package.json +42 -0
- package/dist/wasm/node_modules/@yarnpkg/parsers/lib/grammars/resolution.d.ts +1 -0
- package/dist/wasm/node_modules/@yarnpkg/parsers/lib/grammars/resolution.js +530 -0
- package/dist/wasm/node_modules/@yarnpkg/parsers/lib/grammars/resolution.pegjs +17 -0
- package/dist/wasm/node_modules/@yarnpkg/parsers/lib/grammars/shell.d.ts +92 -0
- package/dist/wasm/node_modules/@yarnpkg/parsers/lib/grammars/shell.js +3653 -0
- package/dist/wasm/node_modules/@yarnpkg/parsers/lib/grammars/shell.pegjs +189 -0
- package/dist/wasm/node_modules/@yarnpkg/parsers/lib/grammars/syml.d.ts +1 -0
- package/dist/wasm/node_modules/@yarnpkg/parsers/lib/grammars/syml.js +1911 -0
- package/dist/wasm/node_modules/@yarnpkg/parsers/lib/grammars/syml.pegjs +125 -0
- package/dist/wasm/node_modules/@yarnpkg/parsers/lib/index.d.ts +6 -0
- package/dist/wasm/node_modules/@yarnpkg/parsers/lib/index.js +24 -0
- package/dist/wasm/node_modules/@yarnpkg/parsers/lib/resolution.d.ts +12 -0
- package/dist/wasm/node_modules/@yarnpkg/parsers/lib/resolution.js +31 -0
- package/dist/wasm/node_modules/@yarnpkg/parsers/lib/shell.d.ts +19 -0
- package/dist/wasm/node_modules/@yarnpkg/parsers/lib/shell.js +170 -0
- package/dist/wasm/node_modules/@yarnpkg/parsers/lib/syml.d.ts +11 -0
- package/dist/wasm/node_modules/@yarnpkg/parsers/lib/syml.js +132 -0
- package/dist/wasm/node_modules/@yarnpkg/parsers/package.json +46 -0
- package/dist/wasm/node_modules/@yarnpkg/shell/README.md +38 -0
- package/dist/wasm/node_modules/@yarnpkg/shell/lib/boot-cli-dev.js +3 -0
- package/dist/wasm/node_modules/@yarnpkg/shell/lib/cli.d.ts +2 -0
- package/dist/wasm/node_modules/@yarnpkg/shell/lib/cli.js +19 -0
- package/dist/wasm/node_modules/@yarnpkg/shell/lib/commands/entry.d.ts +8 -0
- package/dist/wasm/node_modules/@yarnpkg/shell/lib/commands/entry.js +60 -0
- package/dist/wasm/node_modules/@yarnpkg/shell/lib/errors.d.ts +6 -0
- package/dist/wasm/node_modules/@yarnpkg/shell/lib/errors.js +13 -0
- package/dist/wasm/node_modules/@yarnpkg/shell/lib/globUtils.d.ts +23 -0
- package/dist/wasm/node_modules/@yarnpkg/shell/lib/globUtils.js +47 -0
- package/dist/wasm/node_modules/@yarnpkg/shell/lib/index.d.ts +56 -0
- package/dist/wasm/node_modules/@yarnpkg/shell/lib/index.js +926 -0
- package/dist/wasm/node_modules/@yarnpkg/shell/lib/pipe.d.ts +54 -0
- package/dist/wasm/node_modules/@yarnpkg/shell/lib/pipe.js +281 -0
- package/dist/wasm/node_modules/@yarnpkg/shell/package.json +54 -0
- package/dist/wasm/node_modules/ansi-styles/index.d.ts +345 -0
- package/dist/wasm/node_modules/ansi-styles/index.js +163 -0
- package/dist/wasm/node_modules/ansi-styles/license +9 -0
- package/dist/wasm/node_modules/ansi-styles/package.json +56 -0
- package/dist/wasm/node_modules/ansi-styles/readme.md +152 -0
- package/dist/wasm/node_modules/argparse/CHANGELOG.md +216 -0
- package/dist/wasm/node_modules/argparse/LICENSE +254 -0
- package/dist/wasm/node_modules/argparse/README.md +84 -0
- package/dist/wasm/node_modules/argparse/argparse.js +3707 -0
- package/dist/wasm/node_modules/argparse/lib/sub.js +67 -0
- package/dist/wasm/node_modules/argparse/lib/textwrap.js +440 -0
- package/dist/wasm/node_modules/argparse/package.json +31 -0
- package/dist/wasm/node_modules/braces/LICENSE +21 -0
- package/dist/wasm/node_modules/braces/README.md +586 -0
- package/dist/wasm/node_modules/braces/index.js +170 -0
- package/dist/wasm/node_modules/braces/lib/compile.js +60 -0
- package/dist/wasm/node_modules/braces/lib/constants.js +57 -0
- package/dist/wasm/node_modules/braces/lib/expand.js +113 -0
- package/dist/wasm/node_modules/braces/lib/parse.js +331 -0
- package/dist/wasm/node_modules/braces/lib/stringify.js +32 -0
- package/dist/wasm/node_modules/braces/lib/utils.js +122 -0
- package/dist/wasm/node_modules/braces/package.json +77 -0
- package/dist/wasm/node_modules/chalk/index.d.ts +415 -0
- package/dist/wasm/node_modules/chalk/license +9 -0
- package/dist/wasm/node_modules/chalk/package.json +68 -0
- package/dist/wasm/node_modules/chalk/readme.md +341 -0
- package/dist/wasm/node_modules/chalk/source/index.js +229 -0
- package/dist/wasm/node_modules/chalk/source/templates.js +134 -0
- package/dist/wasm/node_modules/chalk/source/util.js +39 -0
- package/dist/wasm/node_modules/clipanion/README.md +98 -0
- package/dist/wasm/node_modules/clipanion/lib/advanced/Cli.d.ts +225 -0
- package/dist/wasm/node_modules/clipanion/lib/advanced/Cli.js +406 -0
- package/dist/wasm/node_modules/clipanion/lib/advanced/Cli.mjs +398 -0
- package/dist/wasm/node_modules/clipanion/lib/advanced/Command.d.ts +144 -0
- package/dist/wasm/node_modules/clipanion/lib/advanced/Command.js +91 -0
- package/dist/wasm/node_modules/clipanion/lib/advanced/Command.mjs +67 -0
- package/dist/wasm/node_modules/clipanion/lib/advanced/HelpCommand.d.ts +11 -0
- package/dist/wasm/node_modules/clipanion/lib/advanced/HelpCommand.js +54 -0
- package/dist/wasm/node_modules/clipanion/lib/advanced/HelpCommand.mjs +50 -0
- package/dist/wasm/node_modules/clipanion/lib/advanced/builtins/definitions.d.ts +8 -0
- package/dist/wasm/node_modules/clipanion/lib/advanced/builtins/definitions.js +17 -0
- package/dist/wasm/node_modules/clipanion/lib/advanced/builtins/definitions.mjs +13 -0
- package/dist/wasm/node_modules/clipanion/lib/advanced/builtins/help.d.ts +10 -0
- package/dist/wasm/node_modules/clipanion/lib/advanced/builtins/help.js +19 -0
- package/dist/wasm/node_modules/clipanion/lib/advanced/builtins/help.mjs +15 -0
- package/dist/wasm/node_modules/clipanion/lib/advanced/builtins/index.d.ts +3 -0
- package/dist/wasm/node_modules/clipanion/lib/advanced/builtins/index.js +13 -0
- package/dist/wasm/node_modules/clipanion/lib/advanced/builtins/index.mjs +3 -0
- package/dist/wasm/node_modules/clipanion/lib/advanced/builtins/version.d.ts +10 -0
- package/dist/wasm/node_modules/clipanion/lib/advanced/builtins/version.js +20 -0
- package/dist/wasm/node_modules/clipanion/lib/advanced/builtins/version.mjs +16 -0
- package/dist/wasm/node_modules/clipanion/lib/advanced/index.d.ts +7 -0
- package/dist/wasm/node_modules/clipanion/lib/advanced/index.js +19 -0
- package/dist/wasm/node_modules/clipanion/lib/advanced/index.mjs +8 -0
- package/dist/wasm/node_modules/clipanion/lib/advanced/options/Array.d.ts +17 -0
- package/dist/wasm/node_modules/clipanion/lib/advanced/options/Array.js +37 -0
- package/dist/wasm/node_modules/clipanion/lib/advanced/options/Array.mjs +33 -0
- package/dist/wasm/node_modules/clipanion/lib/advanced/options/Boolean.d.ts +14 -0
- package/dist/wasm/node_modules/clipanion/lib/advanced/options/Boolean.js +34 -0
- package/dist/wasm/node_modules/clipanion/lib/advanced/options/Boolean.mjs +30 -0
- package/dist/wasm/node_modules/clipanion/lib/advanced/options/Counter.d.ts +15 -0
- package/dist/wasm/node_modules/clipanion/lib/advanced/options/Counter.js +41 -0
- package/dist/wasm/node_modules/clipanion/lib/advanced/options/Counter.mjs +37 -0
- package/dist/wasm/node_modules/clipanion/lib/advanced/options/Proxy.d.ts +18 -0
- package/dist/wasm/node_modules/clipanion/lib/advanced/options/Proxy.js +35 -0
- package/dist/wasm/node_modules/clipanion/lib/advanced/options/Proxy.mjs +31 -0
- package/dist/wasm/node_modules/clipanion/lib/advanced/options/Rest.d.ts +18 -0
- package/dist/wasm/node_modules/clipanion/lib/advanced/options/Rest.js +51 -0
- package/dist/wasm/node_modules/clipanion/lib/advanced/options/Rest.mjs +47 -0
- package/dist/wasm/node_modules/clipanion/lib/advanced/options/String.d.ts +49 -0
- package/dist/wasm/node_modules/clipanion/lib/advanced/options/String.js +84 -0
- package/dist/wasm/node_modules/clipanion/lib/advanced/options/String.mjs +80 -0
- package/dist/wasm/node_modules/clipanion/lib/advanced/options/index.d.ts +7 -0
- package/dist/wasm/node_modules/clipanion/lib/advanced/options/index.js +26 -0
- package/dist/wasm/node_modules/clipanion/lib/advanced/options/index.mjs +7 -0
- package/dist/wasm/node_modules/clipanion/lib/advanced/options/utils.d.ts +25 -0
- package/dist/wasm/node_modules/clipanion/lib/advanced/options/utils.js +59 -0
- package/dist/wasm/node_modules/clipanion/lib/advanced/options/utils.mjs +50 -0
- package/dist/wasm/node_modules/clipanion/lib/constants.d.ts +11 -0
- package/dist/wasm/node_modules/clipanion/lib/constants.js +27 -0
- package/dist/wasm/node_modules/clipanion/lib/constants.mjs +13 -0
- package/dist/wasm/node_modules/clipanion/lib/core.d.ts +462 -0
- package/dist/wasm/node_modules/clipanion/lib/core.js +827 -0
- package/dist/wasm/node_modules/clipanion/lib/core.mjs +800 -0
- package/dist/wasm/node_modules/clipanion/lib/demos/advanced.d.ts +22 -0
- package/dist/wasm/node_modules/clipanion/lib/errors.d.ts +52 -0
- package/dist/wasm/node_modules/clipanion/lib/errors.js +70 -0
- package/dist/wasm/node_modules/clipanion/lib/errors.mjs +64 -0
- package/dist/wasm/node_modules/clipanion/lib/format.d.ts +19 -0
- package/dist/wasm/node_modules/clipanion/lib/format.js +74 -0
- package/dist/wasm/node_modules/clipanion/lib/format.mjs +68 -0
- package/dist/wasm/node_modules/clipanion/package.json +68 -0
- package/dist/wasm/node_modules/color-convert/CHANGELOG.md +54 -0
- package/dist/wasm/node_modules/color-convert/LICENSE +21 -0
- package/dist/wasm/node_modules/color-convert/README.md +68 -0
- package/dist/wasm/node_modules/color-convert/conversions.js +839 -0
- package/dist/wasm/node_modules/color-convert/index.js +81 -0
- package/dist/wasm/node_modules/color-convert/package.json +48 -0
- package/dist/wasm/node_modules/color-convert/route.js +97 -0
- package/dist/wasm/node_modules/color-name/LICENSE +8 -0
- package/dist/wasm/node_modules/color-name/README.md +11 -0
- package/dist/wasm/node_modules/color-name/index.js +152 -0
- package/dist/wasm/node_modules/color-name/package.json +28 -0
- package/dist/wasm/node_modules/cross-spawn/LICENSE +21 -0
- package/dist/wasm/node_modules/cross-spawn/README.md +89 -0
- package/dist/wasm/node_modules/cross-spawn/index.js +39 -0
- package/dist/wasm/node_modules/cross-spawn/lib/enoent.js +59 -0
- package/dist/wasm/node_modules/cross-spawn/lib/parse.js +91 -0
- package/dist/wasm/node_modules/cross-spawn/lib/util/escape.js +47 -0
- package/dist/wasm/node_modules/cross-spawn/lib/util/readShebang.js +23 -0
- package/dist/wasm/node_modules/cross-spawn/lib/util/resolveCommand.js +52 -0
- package/dist/wasm/node_modules/cross-spawn/package.json +73 -0
- package/dist/wasm/node_modules/fast-glob/LICENSE +21 -0
- package/dist/wasm/node_modules/fast-glob/README.md +830 -0
- package/dist/wasm/node_modules/fast-glob/out/index.d.ts +40 -0
- package/dist/wasm/node_modules/fast-glob/out/index.js +102 -0
- package/dist/wasm/node_modules/fast-glob/out/managers/tasks.d.ts +22 -0
- package/dist/wasm/node_modules/fast-glob/out/managers/tasks.js +110 -0
- package/dist/wasm/node_modules/fast-glob/out/providers/async.d.ts +9 -0
- package/dist/wasm/node_modules/fast-glob/out/providers/async.js +23 -0
- package/dist/wasm/node_modules/fast-glob/out/providers/filters/deep.d.ts +16 -0
- package/dist/wasm/node_modules/fast-glob/out/providers/filters/deep.js +62 -0
- package/dist/wasm/node_modules/fast-glob/out/providers/filters/entry.d.ts +17 -0
- package/dist/wasm/node_modules/fast-glob/out/providers/filters/entry.js +85 -0
- package/dist/wasm/node_modules/fast-glob/out/providers/filters/error.d.ts +8 -0
- package/dist/wasm/node_modules/fast-glob/out/providers/filters/error.js +15 -0
- package/dist/wasm/node_modules/fast-glob/out/providers/matchers/matcher.d.ts +33 -0
- package/dist/wasm/node_modules/fast-glob/out/providers/matchers/matcher.js +45 -0
- package/dist/wasm/node_modules/fast-glob/out/providers/matchers/partial.d.ts +4 -0
- package/dist/wasm/node_modules/fast-glob/out/providers/matchers/partial.js +38 -0
- package/dist/wasm/node_modules/fast-glob/out/providers/provider.d.ts +19 -0
- package/dist/wasm/node_modules/fast-glob/out/providers/provider.js +48 -0
- package/dist/wasm/node_modules/fast-glob/out/providers/stream.d.ts +11 -0
- package/dist/wasm/node_modules/fast-glob/out/providers/stream.js +31 -0
- package/dist/wasm/node_modules/fast-glob/out/providers/sync.d.ts +9 -0
- package/dist/wasm/node_modules/fast-glob/out/providers/sync.js +23 -0
- package/dist/wasm/node_modules/fast-glob/out/providers/transformers/entry.d.ts +8 -0
- package/dist/wasm/node_modules/fast-glob/out/providers/transformers/entry.js +26 -0
- package/dist/wasm/node_modules/fast-glob/out/readers/async.d.ts +10 -0
- package/dist/wasm/node_modules/fast-glob/out/readers/async.js +35 -0
- package/dist/wasm/node_modules/fast-glob/out/readers/reader.d.ts +15 -0
- package/dist/wasm/node_modules/fast-glob/out/readers/reader.js +33 -0
- package/dist/wasm/node_modules/fast-glob/out/readers/stream.d.ts +14 -0
- package/dist/wasm/node_modules/fast-glob/out/readers/stream.js +55 -0
- package/dist/wasm/node_modules/fast-glob/out/readers/sync.d.ts +12 -0
- package/dist/wasm/node_modules/fast-glob/out/readers/sync.js +43 -0
- package/dist/wasm/node_modules/fast-glob/out/settings.d.ts +164 -0
- package/dist/wasm/node_modules/fast-glob/out/settings.js +59 -0
- package/dist/wasm/node_modules/fast-glob/out/types/index.d.ts +31 -0
- package/dist/wasm/node_modules/fast-glob/out/types/index.js +2 -0
- package/dist/wasm/node_modules/fast-glob/out/utils/array.d.ts +2 -0
- package/dist/wasm/node_modules/fast-glob/out/utils/array.js +22 -0
- package/dist/wasm/node_modules/fast-glob/out/utils/errno.d.ts +2 -0
- package/dist/wasm/node_modules/fast-glob/out/utils/errno.js +7 -0
- package/dist/wasm/node_modules/fast-glob/out/utils/fs.d.ts +4 -0
- package/dist/wasm/node_modules/fast-glob/out/utils/fs.js +19 -0
- package/dist/wasm/node_modules/fast-glob/out/utils/index.d.ts +8 -0
- package/dist/wasm/node_modules/fast-glob/out/utils/index.js +17 -0
- package/dist/wasm/node_modules/fast-glob/out/utils/path.d.ts +13 -0
- package/dist/wasm/node_modules/fast-glob/out/utils/path.js +68 -0
- package/dist/wasm/node_modules/fast-glob/out/utils/pattern.d.ts +49 -0
- package/dist/wasm/node_modules/fast-glob/out/utils/pattern.js +206 -0
- package/dist/wasm/node_modules/fast-glob/out/utils/stream.d.ts +4 -0
- package/dist/wasm/node_modules/fast-glob/out/utils/stream.js +17 -0
- package/dist/wasm/node_modules/fast-glob/out/utils/string.d.ts +2 -0
- package/dist/wasm/node_modules/fast-glob/out/utils/string.js +11 -0
- package/dist/wasm/node_modules/fast-glob/package.json +81 -0
- package/dist/wasm/node_modules/fastq/LICENSE +13 -0
- package/dist/wasm/node_modules/fastq/README.md +310 -0
- package/dist/wasm/node_modules/fastq/SECURITY.md +15 -0
- package/dist/wasm/node_modules/fastq/bench.js +66 -0
- package/dist/wasm/node_modules/fastq/eslint.config.js +11 -0
- package/dist/wasm/node_modules/fastq/example.js +14 -0
- package/dist/wasm/node_modules/fastq/example.mjs +9 -0
- package/dist/wasm/node_modules/fastq/index.d.ts +59 -0
- package/dist/wasm/node_modules/fastq/package.json +49 -0
- package/dist/wasm/node_modules/fastq/queue.js +348 -0
- package/dist/wasm/node_modules/fastq/test/example.ts +83 -0
- package/dist/wasm/node_modules/fastq/test/promise.js +356 -0
- package/dist/wasm/node_modules/fastq/test/test.js +808 -0
- package/dist/wasm/node_modules/fastq/test/tsconfig.json +11 -0
- package/dist/wasm/node_modules/fill-range/LICENSE +21 -0
- package/dist/wasm/node_modules/fill-range/README.md +237 -0
- package/dist/wasm/node_modules/fill-range/index.js +248 -0
- package/dist/wasm/node_modules/fill-range/package.json +74 -0
- package/dist/wasm/node_modules/glob-parent/CHANGELOG.md +110 -0
- package/dist/wasm/node_modules/glob-parent/LICENSE +15 -0
- package/dist/wasm/node_modules/glob-parent/README.md +137 -0
- package/dist/wasm/node_modules/glob-parent/index.js +42 -0
- package/dist/wasm/node_modules/glob-parent/package.json +48 -0
- package/dist/wasm/node_modules/has-flag/index.d.ts +39 -0
- package/dist/wasm/node_modules/has-flag/index.js +8 -0
- package/dist/wasm/node_modules/has-flag/license +9 -0
- package/dist/wasm/node_modules/has-flag/package.json +46 -0
- package/dist/wasm/node_modules/has-flag/readme.md +89 -0
- package/dist/wasm/node_modules/is-extglob/LICENSE +21 -0
- package/dist/wasm/node_modules/is-extglob/README.md +107 -0
- package/dist/wasm/node_modules/is-extglob/index.js +20 -0
- package/dist/wasm/node_modules/is-extglob/package.json +69 -0
- package/dist/wasm/node_modules/is-glob/LICENSE +21 -0
- package/dist/wasm/node_modules/is-glob/README.md +206 -0
- package/dist/wasm/node_modules/is-glob/index.js +150 -0
- package/dist/wasm/node_modules/is-glob/package.json +81 -0
- package/dist/wasm/node_modules/is-number/LICENSE +21 -0
- package/dist/wasm/node_modules/is-number/README.md +187 -0
- package/dist/wasm/node_modules/is-number/index.js +18 -0
- package/dist/wasm/node_modules/is-number/package.json +82 -0
- package/dist/wasm/node_modules/isexe/.npmignore +2 -0
- package/dist/wasm/node_modules/isexe/LICENSE +15 -0
- package/dist/wasm/node_modules/isexe/README.md +51 -0
- package/dist/wasm/node_modules/isexe/index.js +57 -0
- package/dist/wasm/node_modules/isexe/mode.js +41 -0
- package/dist/wasm/node_modules/isexe/package.json +31 -0
- package/dist/wasm/node_modules/isexe/test/basic.js +221 -0
- package/dist/wasm/node_modules/isexe/windows.js +42 -0
- package/dist/wasm/node_modules/js-yaml/LICENSE +21 -0
- package/dist/wasm/node_modules/js-yaml/README.md +246 -0
- package/dist/wasm/node_modules/js-yaml/bin/js-yaml.js +126 -0
- package/dist/wasm/node_modules/js-yaml/dist/js-yaml.js +3874 -0
- package/dist/wasm/node_modules/js-yaml/dist/js-yaml.min.js +2 -0
- package/dist/wasm/node_modules/js-yaml/dist/js-yaml.mjs +3851 -0
- package/dist/wasm/node_modules/js-yaml/index.js +30 -0
- package/dist/wasm/node_modules/js-yaml/lib/common.js +59 -0
- package/dist/wasm/node_modules/js-yaml/lib/dumper.js +979 -0
- package/dist/wasm/node_modules/js-yaml/lib/exception.js +55 -0
- package/dist/wasm/node_modules/js-yaml/lib/loader.js +1733 -0
- package/dist/wasm/node_modules/js-yaml/lib/schema/core.js +11 -0
- package/dist/wasm/node_modules/js-yaml/lib/schema/default.js +22 -0
- package/dist/wasm/node_modules/js-yaml/lib/schema/failsafe.js +17 -0
- package/dist/wasm/node_modules/js-yaml/lib/schema/json.js +19 -0
- package/dist/wasm/node_modules/js-yaml/lib/schema.js +121 -0
- package/dist/wasm/node_modules/js-yaml/lib/snippet.js +101 -0
- package/dist/wasm/node_modules/js-yaml/lib/type/binary.js +125 -0
- package/dist/wasm/node_modules/js-yaml/lib/type/bool.js +35 -0
- package/dist/wasm/node_modules/js-yaml/lib/type/float.js +97 -0
- package/dist/wasm/node_modules/js-yaml/lib/type/int.js +156 -0
- package/dist/wasm/node_modules/js-yaml/lib/type/map.js +8 -0
- package/dist/wasm/node_modules/js-yaml/lib/type/merge.js +12 -0
- package/dist/wasm/node_modules/js-yaml/lib/type/null.js +35 -0
- package/dist/wasm/node_modules/js-yaml/lib/type/omap.js +44 -0
- package/dist/wasm/node_modules/js-yaml/lib/type/pairs.js +53 -0
- package/dist/wasm/node_modules/js-yaml/lib/type/seq.js +8 -0
- package/dist/wasm/node_modules/js-yaml/lib/type/set.js +29 -0
- package/dist/wasm/node_modules/js-yaml/lib/type/str.js +8 -0
- package/dist/wasm/node_modules/js-yaml/lib/type/timestamp.js +88 -0
- package/dist/wasm/node_modules/js-yaml/lib/type.js +65 -0
- package/dist/wasm/node_modules/js-yaml/package.json +65 -0
- package/dist/wasm/node_modules/merge2/LICENSE +21 -0
- package/dist/wasm/node_modules/merge2/README.md +144 -0
- package/dist/wasm/node_modules/merge2/index.js +144 -0
- package/dist/wasm/node_modules/merge2/package.json +43 -0
- package/dist/wasm/node_modules/micromatch/LICENSE +21 -0
- package/dist/wasm/node_modules/micromatch/README.md +1024 -0
- package/dist/wasm/node_modules/micromatch/index.js +474 -0
- package/dist/wasm/node_modules/micromatch/package.json +119 -0
- package/dist/wasm/node_modules/path-key/index.d.ts +40 -0
- package/dist/wasm/node_modules/path-key/index.js +16 -0
- package/dist/wasm/node_modules/path-key/license +9 -0
- package/dist/wasm/node_modules/path-key/package.json +39 -0
- package/dist/wasm/node_modules/path-key/readme.md +61 -0
- package/dist/wasm/node_modules/picomatch/LICENSE +21 -0
- package/dist/wasm/node_modules/picomatch/README.md +716 -0
- package/dist/wasm/node_modules/picomatch/index.js +3 -0
- package/dist/wasm/node_modules/picomatch/lib/constants.js +184 -0
- package/dist/wasm/node_modules/picomatch/lib/parse.js +1392 -0
- package/dist/wasm/node_modules/picomatch/lib/picomatch.js +342 -0
- package/dist/wasm/node_modules/picomatch/lib/scan.js +391 -0
- package/dist/wasm/node_modules/picomatch/lib/utils.js +64 -0
- package/dist/wasm/node_modules/picomatch/package.json +81 -0
- package/dist/wasm/node_modules/queue-microtask/LICENSE +20 -0
- package/dist/wasm/node_modules/queue-microtask/README.md +90 -0
- package/dist/wasm/node_modules/queue-microtask/index.d.ts +2 -0
- package/dist/wasm/node_modules/queue-microtask/index.js +9 -0
- package/dist/wasm/node_modules/queue-microtask/package.json +55 -0
- package/dist/wasm/node_modules/reusify/.github/dependabot.yml +7 -0
- package/dist/wasm/node_modules/reusify/.github/workflows/ci.yml +96 -0
- package/dist/wasm/node_modules/reusify/LICENSE +22 -0
- package/dist/wasm/node_modules/reusify/README.md +139 -0
- package/dist/wasm/node_modules/reusify/SECURITY.md +15 -0
- package/dist/wasm/node_modules/reusify/benchmarks/createNoCodeFunction.js +30 -0
- package/dist/wasm/node_modules/reusify/benchmarks/fib.js +13 -0
- package/dist/wasm/node_modules/reusify/benchmarks/reuseNoCodeFunction.js +38 -0
- package/dist/wasm/node_modules/reusify/eslint.config.js +14 -0
- package/dist/wasm/node_modules/reusify/package.json +50 -0
- package/dist/wasm/node_modules/reusify/reusify.d.ts +14 -0
- package/dist/wasm/node_modules/reusify/reusify.js +33 -0
- package/dist/wasm/node_modules/reusify/test.js +66 -0
- package/dist/wasm/node_modules/reusify/tsconfig.json +11 -0
- package/dist/wasm/node_modules/run-parallel/LICENSE +20 -0
- package/dist/wasm/node_modules/run-parallel/README.md +85 -0
- package/dist/wasm/node_modules/run-parallel/index.js +51 -0
- package/dist/wasm/node_modules/run-parallel/package.json +58 -0
- package/dist/wasm/node_modules/shebang-command/index.js +19 -0
- package/dist/wasm/node_modules/shebang-command/license +9 -0
- package/dist/wasm/node_modules/shebang-command/package.json +34 -0
- package/dist/wasm/node_modules/shebang-command/readme.md +34 -0
- package/dist/wasm/node_modules/shebang-regex/index.d.ts +22 -0
- package/dist/wasm/node_modules/shebang-regex/index.js +2 -0
- package/dist/wasm/node_modules/shebang-regex/license +9 -0
- package/dist/wasm/node_modules/shebang-regex/package.json +35 -0
- package/dist/wasm/node_modules/shebang-regex/readme.md +33 -0
- package/dist/wasm/node_modules/supports-color/browser.js +5 -0
- package/dist/wasm/node_modules/supports-color/index.js +135 -0
- package/dist/wasm/node_modules/supports-color/license +9 -0
- package/dist/wasm/node_modules/supports-color/package.json +53 -0
- package/dist/wasm/node_modules/supports-color/readme.md +76 -0
- package/dist/wasm/node_modules/to-regex-range/LICENSE +21 -0
- package/dist/wasm/node_modules/to-regex-range/README.md +305 -0
- package/dist/wasm/node_modules/to-regex-range/index.js +288 -0
- package/dist/wasm/node_modules/to-regex-range/package.json +88 -0
- package/dist/wasm/node_modules/tslib/CopyrightNotice.txt +15 -0
- package/dist/wasm/node_modules/tslib/LICENSE.txt +12 -0
- package/dist/wasm/node_modules/tslib/README.md +164 -0
- package/dist/wasm/node_modules/tslib/SECURITY.md +41 -0
- package/dist/wasm/node_modules/tslib/modules/index.d.ts +38 -0
- package/dist/wasm/node_modules/tslib/modules/index.js +70 -0
- package/dist/wasm/node_modules/tslib/modules/package.json +3 -0
- package/dist/wasm/node_modules/tslib/package.json +47 -0
- package/dist/wasm/node_modules/tslib/tslib.d.ts +460 -0
- package/dist/wasm/node_modules/tslib/tslib.es6.html +1 -0
- package/dist/wasm/node_modules/tslib/tslib.es6.js +402 -0
- package/dist/wasm/node_modules/tslib/tslib.es6.mjs +401 -0
- package/dist/wasm/node_modules/tslib/tslib.html +1 -0
- package/dist/wasm/node_modules/tslib/tslib.js +484 -0
- package/dist/wasm/node_modules/typanion/README.md +117 -0
- package/dist/wasm/node_modules/typanion/lib/index.d.ts +5 -0
- package/dist/wasm/node_modules/typanion/lib/index.js +1305 -0
- package/dist/wasm/node_modules/typanion/lib/index.mjs +1249 -0
- package/dist/wasm/node_modules/typanion/lib/internal/format.d.ts +5 -0
- package/dist/wasm/node_modules/typanion/lib/internal/regexps.d.ts +5 -0
- package/dist/wasm/node_modules/typanion/lib/internal/tools.d.ts +5 -0
- package/dist/wasm/node_modules/typanion/lib/predicates/cascadingPredicates.d.ts +114 -0
- package/dist/wasm/node_modules/typanion/lib/predicates/helperPredicates.d.ts +80 -0
- package/dist/wasm/node_modules/typanion/lib/predicates/typePredicates.d.ts +205 -0
- package/dist/wasm/node_modules/typanion/lib/tools.d.ts +90 -0
- package/dist/wasm/node_modules/typanion/lib/types.d.ts +22 -0
- package/dist/wasm/node_modules/typanion/package.json +40 -0
- package/dist/wasm/node_modules/which/CHANGELOG.md +166 -0
- package/dist/wasm/node_modules/which/LICENSE +15 -0
- package/dist/wasm/node_modules/which/README.md +54 -0
- package/dist/wasm/node_modules/which/bin/node-which +52 -0
- package/dist/wasm/node_modules/which/package.json +43 -0
- package/dist/wasm/node_modules/which/which.js +125 -0
- package/dist/wasm/package.json +10 -0
- package/dist/wasm/pnpm.mjs +8 -0
- package/dist/wasm/pnpm.wasm +4 -0
- package/dist/wasm/pnpx.mjs +8 -0
- package/dist/wasm/run.mjs +147 -0
- package/dist/wasm/worker.mjs +56 -0
- package/install.js +18 -21
- package/package.json +16 -16
- package/pn +2 -70
- package/pnpm +2 -90
- package/pnpx +2 -70
- package/pnx +2 -70
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2015-present, Jon Schlinkert.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
|
13
|
+
all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
THE SOFTWARE.
|
|
@@ -0,0 +1,305 @@
|
|
|
1
|
+
# to-regex-range [](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=W8YFZ425KND68) [](https://www.npmjs.com/package/to-regex-range) [](https://npmjs.org/package/to-regex-range) [](https://npmjs.org/package/to-regex-range) [](https://travis-ci.org/micromatch/to-regex-range)
|
|
2
|
+
|
|
3
|
+
> Pass two numbers, get a regex-compatible source string for matching ranges. Validated against more than 2.78 million test assertions.
|
|
4
|
+
|
|
5
|
+
Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
Install with [npm](https://www.npmjs.com/):
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
$ npm install --save to-regex-range
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
<details>
|
|
16
|
+
<summary><strong>What does this do?</strong></summary>
|
|
17
|
+
|
|
18
|
+
<br>
|
|
19
|
+
|
|
20
|
+
This libary generates the `source` string to be passed to `new RegExp()` for matching a range of numbers.
|
|
21
|
+
|
|
22
|
+
**Example**
|
|
23
|
+
|
|
24
|
+
```js
|
|
25
|
+
const toRegexRange = require('to-regex-range');
|
|
26
|
+
const regex = new RegExp(toRegexRange('15', '95'));
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
A string is returned so that you can do whatever you need with it before passing it to `new RegExp()` (like adding `^` or `$` boundaries, defining flags, or combining it another string).
|
|
30
|
+
|
|
31
|
+
<br>
|
|
32
|
+
|
|
33
|
+
</details>
|
|
34
|
+
|
|
35
|
+
<details>
|
|
36
|
+
<summary><strong>Why use this library?</strong></summary>
|
|
37
|
+
|
|
38
|
+
<br>
|
|
39
|
+
|
|
40
|
+
### Convenience
|
|
41
|
+
|
|
42
|
+
Creating regular expressions for matching numbers gets deceptively complicated pretty fast.
|
|
43
|
+
|
|
44
|
+
For example, let's say you need a validation regex for matching part of a user-id, postal code, social security number, tax id, etc:
|
|
45
|
+
|
|
46
|
+
* regex for matching `1` => `/1/` (easy enough)
|
|
47
|
+
* regex for matching `1` through `5` => `/[1-5]/` (not bad...)
|
|
48
|
+
* regex for matching `1` or `5` => `/(1|5)/` (still easy...)
|
|
49
|
+
* regex for matching `1` through `50` => `/([1-9]|[1-4][0-9]|50)/` (uh-oh...)
|
|
50
|
+
* regex for matching `1` through `55` => `/([1-9]|[1-4][0-9]|5[0-5])/` (no prob, I can do this...)
|
|
51
|
+
* regex for matching `1` through `555` => `/([1-9]|[1-9][0-9]|[1-4][0-9]{2}|5[0-4][0-9]|55[0-5])/` (maybe not...)
|
|
52
|
+
* regex for matching `0001` through `5555` => `/(0{3}[1-9]|0{2}[1-9][0-9]|0[1-9][0-9]{2}|[1-4][0-9]{3}|5[0-4][0-9]{2}|55[0-4][0-9]|555[0-5])/` (okay, I get the point!)
|
|
53
|
+
|
|
54
|
+
The numbers are contrived, but they're also really basic. In the real world you might need to generate a regex on-the-fly for validation.
|
|
55
|
+
|
|
56
|
+
**Learn more**
|
|
57
|
+
|
|
58
|
+
If you're interested in learning more about [character classes](http://www.regular-expressions.info/charclass.html) and other regex features, I personally have always found [regular-expressions.info](http://www.regular-expressions.info/charclass.html) to be pretty useful.
|
|
59
|
+
|
|
60
|
+
### Heavily tested
|
|
61
|
+
|
|
62
|
+
As of April 07, 2019, this library runs [>1m test assertions](./test/test.js) against generated regex-ranges to provide brute-force verification that results are correct.
|
|
63
|
+
|
|
64
|
+
Tests run in ~280ms on my MacBook Pro, 2.5 GHz Intel Core i7.
|
|
65
|
+
|
|
66
|
+
### Optimized
|
|
67
|
+
|
|
68
|
+
Generated regular expressions are optimized:
|
|
69
|
+
|
|
70
|
+
* duplicate sequences and character classes are reduced using quantifiers
|
|
71
|
+
* smart enough to use `?` conditionals when number(s) or range(s) can be positive or negative
|
|
72
|
+
* uses fragment caching to avoid processing the same exact string more than once
|
|
73
|
+
|
|
74
|
+
<br>
|
|
75
|
+
|
|
76
|
+
</details>
|
|
77
|
+
|
|
78
|
+
## Usage
|
|
79
|
+
|
|
80
|
+
Add this library to your javascript application with the following line of code
|
|
81
|
+
|
|
82
|
+
```js
|
|
83
|
+
const toRegexRange = require('to-regex-range');
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
The main export is a function that takes two integers: the `min` value and `max` value (formatted as strings or numbers).
|
|
87
|
+
|
|
88
|
+
```js
|
|
89
|
+
const source = toRegexRange('15', '95');
|
|
90
|
+
//=> 1[5-9]|[2-8][0-9]|9[0-5]
|
|
91
|
+
|
|
92
|
+
const regex = new RegExp(`^${source}$`);
|
|
93
|
+
console.log(regex.test('14')); //=> false
|
|
94
|
+
console.log(regex.test('50')); //=> true
|
|
95
|
+
console.log(regex.test('94')); //=> true
|
|
96
|
+
console.log(regex.test('96')); //=> false
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
## Options
|
|
100
|
+
|
|
101
|
+
### options.capture
|
|
102
|
+
|
|
103
|
+
**Type**: `boolean`
|
|
104
|
+
|
|
105
|
+
**Deafault**: `undefined`
|
|
106
|
+
|
|
107
|
+
Wrap the returned value in parentheses when there is more than one regex condition. Useful when you're dynamically generating ranges.
|
|
108
|
+
|
|
109
|
+
```js
|
|
110
|
+
console.log(toRegexRange('-10', '10'));
|
|
111
|
+
//=> -[1-9]|-?10|[0-9]
|
|
112
|
+
|
|
113
|
+
console.log(toRegexRange('-10', '10', { capture: true }));
|
|
114
|
+
//=> (-[1-9]|-?10|[0-9])
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
### options.shorthand
|
|
118
|
+
|
|
119
|
+
**Type**: `boolean`
|
|
120
|
+
|
|
121
|
+
**Deafault**: `undefined`
|
|
122
|
+
|
|
123
|
+
Use the regex shorthand for `[0-9]`:
|
|
124
|
+
|
|
125
|
+
```js
|
|
126
|
+
console.log(toRegexRange('0', '999999'));
|
|
127
|
+
//=> [0-9]|[1-9][0-9]{1,5}
|
|
128
|
+
|
|
129
|
+
console.log(toRegexRange('0', '999999', { shorthand: true }));
|
|
130
|
+
//=> \d|[1-9]\d{1,5}
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
### options.relaxZeros
|
|
134
|
+
|
|
135
|
+
**Type**: `boolean`
|
|
136
|
+
|
|
137
|
+
**Default**: `true`
|
|
138
|
+
|
|
139
|
+
This option relaxes matching for leading zeros when when ranges are zero-padded.
|
|
140
|
+
|
|
141
|
+
```js
|
|
142
|
+
const source = toRegexRange('-0010', '0010');
|
|
143
|
+
const regex = new RegExp(`^${source}$`);
|
|
144
|
+
console.log(regex.test('-10')); //=> true
|
|
145
|
+
console.log(regex.test('-010')); //=> true
|
|
146
|
+
console.log(regex.test('-0010')); //=> true
|
|
147
|
+
console.log(regex.test('10')); //=> true
|
|
148
|
+
console.log(regex.test('010')); //=> true
|
|
149
|
+
console.log(regex.test('0010')); //=> true
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
When `relaxZeros` is false, matching is strict:
|
|
153
|
+
|
|
154
|
+
```js
|
|
155
|
+
const source = toRegexRange('-0010', '0010', { relaxZeros: false });
|
|
156
|
+
const regex = new RegExp(`^${source}$`);
|
|
157
|
+
console.log(regex.test('-10')); //=> false
|
|
158
|
+
console.log(regex.test('-010')); //=> false
|
|
159
|
+
console.log(regex.test('-0010')); //=> true
|
|
160
|
+
console.log(regex.test('10')); //=> false
|
|
161
|
+
console.log(regex.test('010')); //=> false
|
|
162
|
+
console.log(regex.test('0010')); //=> true
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
## Examples
|
|
166
|
+
|
|
167
|
+
| **Range** | **Result** | **Compile time** |
|
|
168
|
+
| --- | --- | --- |
|
|
169
|
+
| `toRegexRange(-10, 10)` | `-[1-9]\|-?10\|[0-9]` | _132μs_ |
|
|
170
|
+
| `toRegexRange(-100, -10)` | `-1[0-9]\|-[2-9][0-9]\|-100` | _50μs_ |
|
|
171
|
+
| `toRegexRange(-100, 100)` | `-[1-9]\|-?[1-9][0-9]\|-?100\|[0-9]` | _42μs_ |
|
|
172
|
+
| `toRegexRange(001, 100)` | `0{0,2}[1-9]\|0?[1-9][0-9]\|100` | _109μs_ |
|
|
173
|
+
| `toRegexRange(001, 555)` | `0{0,2}[1-9]\|0?[1-9][0-9]\|[1-4][0-9]{2}\|5[0-4][0-9]\|55[0-5]` | _51μs_ |
|
|
174
|
+
| `toRegexRange(0010, 1000)` | `0{0,2}1[0-9]\|0{0,2}[2-9][0-9]\|0?[1-9][0-9]{2}\|1000` | _31μs_ |
|
|
175
|
+
| `toRegexRange(1, 50)` | `[1-9]\|[1-4][0-9]\|50` | _24μs_ |
|
|
176
|
+
| `toRegexRange(1, 55)` | `[1-9]\|[1-4][0-9]\|5[0-5]` | _23μs_ |
|
|
177
|
+
| `toRegexRange(1, 555)` | `[1-9]\|[1-9][0-9]\|[1-4][0-9]{2}\|5[0-4][0-9]\|55[0-5]` | _30μs_ |
|
|
178
|
+
| `toRegexRange(1, 5555)` | `[1-9]\|[1-9][0-9]{1,2}\|[1-4][0-9]{3}\|5[0-4][0-9]{2}\|55[0-4][0-9]\|555[0-5]` | _43μs_ |
|
|
179
|
+
| `toRegexRange(111, 555)` | `11[1-9]\|1[2-9][0-9]\|[2-4][0-9]{2}\|5[0-4][0-9]\|55[0-5]` | _38μs_ |
|
|
180
|
+
| `toRegexRange(29, 51)` | `29\|[34][0-9]\|5[01]` | _24μs_ |
|
|
181
|
+
| `toRegexRange(31, 877)` | `3[1-9]\|[4-9][0-9]\|[1-7][0-9]{2}\|8[0-6][0-9]\|87[0-7]` | _32μs_ |
|
|
182
|
+
| `toRegexRange(5, 5)` | `5` | _8μs_ |
|
|
183
|
+
| `toRegexRange(5, 6)` | `5\|6` | _11μs_ |
|
|
184
|
+
| `toRegexRange(1, 2)` | `1\|2` | _6μs_ |
|
|
185
|
+
| `toRegexRange(1, 5)` | `[1-5]` | _15μs_ |
|
|
186
|
+
| `toRegexRange(1, 10)` | `[1-9]\|10` | _22μs_ |
|
|
187
|
+
| `toRegexRange(1, 100)` | `[1-9]\|[1-9][0-9]\|100` | _25μs_ |
|
|
188
|
+
| `toRegexRange(1, 1000)` | `[1-9]\|[1-9][0-9]{1,2}\|1000` | _31μs_ |
|
|
189
|
+
| `toRegexRange(1, 10000)` | `[1-9]\|[1-9][0-9]{1,3}\|10000` | _34μs_ |
|
|
190
|
+
| `toRegexRange(1, 100000)` | `[1-9]\|[1-9][0-9]{1,4}\|100000` | _36μs_ |
|
|
191
|
+
| `toRegexRange(1, 1000000)` | `[1-9]\|[1-9][0-9]{1,5}\|1000000` | _42μs_ |
|
|
192
|
+
| `toRegexRange(1, 10000000)` | `[1-9]\|[1-9][0-9]{1,6}\|10000000` | _42μs_ |
|
|
193
|
+
|
|
194
|
+
## Heads up!
|
|
195
|
+
|
|
196
|
+
**Order of arguments**
|
|
197
|
+
|
|
198
|
+
When the `min` is larger than the `max`, values will be flipped to create a valid range:
|
|
199
|
+
|
|
200
|
+
```js
|
|
201
|
+
toRegexRange('51', '29');
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
Is effectively flipped to:
|
|
205
|
+
|
|
206
|
+
```js
|
|
207
|
+
toRegexRange('29', '51');
|
|
208
|
+
//=> 29|[3-4][0-9]|5[0-1]
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
**Steps / increments**
|
|
212
|
+
|
|
213
|
+
This library does not support steps (increments). A pr to add support would be welcome.
|
|
214
|
+
|
|
215
|
+
## History
|
|
216
|
+
|
|
217
|
+
### v2.0.0 - 2017-04-21
|
|
218
|
+
|
|
219
|
+
**New features**
|
|
220
|
+
|
|
221
|
+
Adds support for zero-padding!
|
|
222
|
+
|
|
223
|
+
### v1.0.0
|
|
224
|
+
|
|
225
|
+
**Optimizations**
|
|
226
|
+
|
|
227
|
+
Repeating ranges are now grouped using quantifiers. rocessing time is roughly the same, but the generated regex is much smaller, which should result in faster matching.
|
|
228
|
+
|
|
229
|
+
## Attribution
|
|
230
|
+
|
|
231
|
+
Inspired by the python library [range-regex](https://github.com/dimka665/range-regex).
|
|
232
|
+
|
|
233
|
+
## About
|
|
234
|
+
|
|
235
|
+
<details>
|
|
236
|
+
<summary><strong>Contributing</strong></summary>
|
|
237
|
+
|
|
238
|
+
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
|
|
239
|
+
|
|
240
|
+
</details>
|
|
241
|
+
|
|
242
|
+
<details>
|
|
243
|
+
<summary><strong>Running Tests</strong></summary>
|
|
244
|
+
|
|
245
|
+
Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
|
|
246
|
+
|
|
247
|
+
```sh
|
|
248
|
+
$ npm install && npm test
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
</details>
|
|
252
|
+
|
|
253
|
+
<details>
|
|
254
|
+
<summary><strong>Building docs</strong></summary>
|
|
255
|
+
|
|
256
|
+
_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_
|
|
257
|
+
|
|
258
|
+
To generate the readme, run the following command:
|
|
259
|
+
|
|
260
|
+
```sh
|
|
261
|
+
$ npm install -g verbose/verb#dev verb-generate-readme && verb
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
</details>
|
|
265
|
+
|
|
266
|
+
### Related projects
|
|
267
|
+
|
|
268
|
+
You might also be interested in these projects:
|
|
269
|
+
|
|
270
|
+
* [expand-range](https://www.npmjs.com/package/expand-range): Fast, bash-like range expansion. Expand a range of numbers or letters, uppercase or lowercase. Used… [more](https://github.com/jonschlinkert/expand-range) | [homepage](https://github.com/jonschlinkert/expand-range "Fast, bash-like range expansion. Expand a range of numbers or letters, uppercase or lowercase. Used by micromatch.")
|
|
271
|
+
* [fill-range](https://www.npmjs.com/package/fill-range): Fill in a range of numbers or letters, optionally passing an increment or `step` to… [more](https://github.com/jonschlinkert/fill-range) | [homepage](https://github.com/jonschlinkert/fill-range "Fill in a range of numbers or letters, optionally passing an increment or `step` to use, or create a regex-compatible range with `options.toRegex`")
|
|
272
|
+
* [micromatch](https://www.npmjs.com/package/micromatch): Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. | [homepage](https://github.com/micromatch/micromatch "Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch.")
|
|
273
|
+
* [repeat-element](https://www.npmjs.com/package/repeat-element): Create an array by repeating the given value n times. | [homepage](https://github.com/jonschlinkert/repeat-element "Create an array by repeating the given value n times.")
|
|
274
|
+
* [repeat-string](https://www.npmjs.com/package/repeat-string): Repeat the given string n times. Fastest implementation for repeating a string. | [homepage](https://github.com/jonschlinkert/repeat-string "Repeat the given string n times. Fastest implementation for repeating a string.")
|
|
275
|
+
|
|
276
|
+
### Contributors
|
|
277
|
+
|
|
278
|
+
| **Commits** | **Contributor** |
|
|
279
|
+
| --- | --- |
|
|
280
|
+
| 63 | [jonschlinkert](https://github.com/jonschlinkert) |
|
|
281
|
+
| 3 | [doowb](https://github.com/doowb) |
|
|
282
|
+
| 2 | [realityking](https://github.com/realityking) |
|
|
283
|
+
|
|
284
|
+
### Author
|
|
285
|
+
|
|
286
|
+
**Jon Schlinkert**
|
|
287
|
+
|
|
288
|
+
* [GitHub Profile](https://github.com/jonschlinkert)
|
|
289
|
+
* [Twitter Profile](https://twitter.com/jonschlinkert)
|
|
290
|
+
* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert)
|
|
291
|
+
|
|
292
|
+
Please consider supporting me on Patreon, or [start your own Patreon page](https://patreon.com/invite/bxpbvm)!
|
|
293
|
+
|
|
294
|
+
<a href="https://www.patreon.com/jonschlinkert">
|
|
295
|
+
<img src="https://c5.patreon.com/external/logo/become_a_patron_button@2x.png" height="50">
|
|
296
|
+
</a>
|
|
297
|
+
|
|
298
|
+
### License
|
|
299
|
+
|
|
300
|
+
Copyright © 2019, [Jon Schlinkert](https://github.com/jonschlinkert).
|
|
301
|
+
Released under the [MIT License](LICENSE).
|
|
302
|
+
|
|
303
|
+
***
|
|
304
|
+
|
|
305
|
+
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on April 07, 2019._
|
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* to-regex-range <https://github.com/micromatch/to-regex-range>
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2015-present, Jon Schlinkert.
|
|
5
|
+
* Released under the MIT License.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
'use strict';
|
|
9
|
+
|
|
10
|
+
const isNumber = require('is-number');
|
|
11
|
+
|
|
12
|
+
const toRegexRange = (min, max, options) => {
|
|
13
|
+
if (isNumber(min) === false) {
|
|
14
|
+
throw new TypeError('toRegexRange: expected the first argument to be a number');
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
if (max === void 0 || min === max) {
|
|
18
|
+
return String(min);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
if (isNumber(max) === false) {
|
|
22
|
+
throw new TypeError('toRegexRange: expected the second argument to be a number.');
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
let opts = { relaxZeros: true, ...options };
|
|
26
|
+
if (typeof opts.strictZeros === 'boolean') {
|
|
27
|
+
opts.relaxZeros = opts.strictZeros === false;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
let relax = String(opts.relaxZeros);
|
|
31
|
+
let shorthand = String(opts.shorthand);
|
|
32
|
+
let capture = String(opts.capture);
|
|
33
|
+
let wrap = String(opts.wrap);
|
|
34
|
+
let cacheKey = min + ':' + max + '=' + relax + shorthand + capture + wrap;
|
|
35
|
+
|
|
36
|
+
if (toRegexRange.cache.hasOwnProperty(cacheKey)) {
|
|
37
|
+
return toRegexRange.cache[cacheKey].result;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
let a = Math.min(min, max);
|
|
41
|
+
let b = Math.max(min, max);
|
|
42
|
+
|
|
43
|
+
if (Math.abs(a - b) === 1) {
|
|
44
|
+
let result = min + '|' + max;
|
|
45
|
+
if (opts.capture) {
|
|
46
|
+
return `(${result})`;
|
|
47
|
+
}
|
|
48
|
+
if (opts.wrap === false) {
|
|
49
|
+
return result;
|
|
50
|
+
}
|
|
51
|
+
return `(?:${result})`;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
let isPadded = hasPadding(min) || hasPadding(max);
|
|
55
|
+
let state = { min, max, a, b };
|
|
56
|
+
let positives = [];
|
|
57
|
+
let negatives = [];
|
|
58
|
+
|
|
59
|
+
if (isPadded) {
|
|
60
|
+
state.isPadded = isPadded;
|
|
61
|
+
state.maxLen = String(state.max).length;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
if (a < 0) {
|
|
65
|
+
let newMin = b < 0 ? Math.abs(b) : 1;
|
|
66
|
+
negatives = splitToPatterns(newMin, Math.abs(a), state, opts);
|
|
67
|
+
a = state.a = 0;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
if (b >= 0) {
|
|
71
|
+
positives = splitToPatterns(a, b, state, opts);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
state.negatives = negatives;
|
|
75
|
+
state.positives = positives;
|
|
76
|
+
state.result = collatePatterns(negatives, positives, opts);
|
|
77
|
+
|
|
78
|
+
if (opts.capture === true) {
|
|
79
|
+
state.result = `(${state.result})`;
|
|
80
|
+
} else if (opts.wrap !== false && (positives.length + negatives.length) > 1) {
|
|
81
|
+
state.result = `(?:${state.result})`;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
toRegexRange.cache[cacheKey] = state;
|
|
85
|
+
return state.result;
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
function collatePatterns(neg, pos, options) {
|
|
89
|
+
let onlyNegative = filterPatterns(neg, pos, '-', false, options) || [];
|
|
90
|
+
let onlyPositive = filterPatterns(pos, neg, '', false, options) || [];
|
|
91
|
+
let intersected = filterPatterns(neg, pos, '-?', true, options) || [];
|
|
92
|
+
let subpatterns = onlyNegative.concat(intersected).concat(onlyPositive);
|
|
93
|
+
return subpatterns.join('|');
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
function splitToRanges(min, max) {
|
|
97
|
+
let nines = 1;
|
|
98
|
+
let zeros = 1;
|
|
99
|
+
|
|
100
|
+
let stop = countNines(min, nines);
|
|
101
|
+
let stops = new Set([max]);
|
|
102
|
+
|
|
103
|
+
while (min <= stop && stop <= max) {
|
|
104
|
+
stops.add(stop);
|
|
105
|
+
nines += 1;
|
|
106
|
+
stop = countNines(min, nines);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
stop = countZeros(max + 1, zeros) - 1;
|
|
110
|
+
|
|
111
|
+
while (min < stop && stop <= max) {
|
|
112
|
+
stops.add(stop);
|
|
113
|
+
zeros += 1;
|
|
114
|
+
stop = countZeros(max + 1, zeros) - 1;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
stops = [...stops];
|
|
118
|
+
stops.sort(compare);
|
|
119
|
+
return stops;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Convert a range to a regex pattern
|
|
124
|
+
* @param {Number} `start`
|
|
125
|
+
* @param {Number} `stop`
|
|
126
|
+
* @return {String}
|
|
127
|
+
*/
|
|
128
|
+
|
|
129
|
+
function rangeToPattern(start, stop, options) {
|
|
130
|
+
if (start === stop) {
|
|
131
|
+
return { pattern: start, count: [], digits: 0 };
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
let zipped = zip(start, stop);
|
|
135
|
+
let digits = zipped.length;
|
|
136
|
+
let pattern = '';
|
|
137
|
+
let count = 0;
|
|
138
|
+
|
|
139
|
+
for (let i = 0; i < digits; i++) {
|
|
140
|
+
let [startDigit, stopDigit] = zipped[i];
|
|
141
|
+
|
|
142
|
+
if (startDigit === stopDigit) {
|
|
143
|
+
pattern += startDigit;
|
|
144
|
+
|
|
145
|
+
} else if (startDigit !== '0' || stopDigit !== '9') {
|
|
146
|
+
pattern += toCharacterClass(startDigit, stopDigit, options);
|
|
147
|
+
|
|
148
|
+
} else {
|
|
149
|
+
count++;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
if (count) {
|
|
154
|
+
pattern += options.shorthand === true ? '\\d' : '[0-9]';
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
return { pattern, count: [count], digits };
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
function splitToPatterns(min, max, tok, options) {
|
|
161
|
+
let ranges = splitToRanges(min, max);
|
|
162
|
+
let tokens = [];
|
|
163
|
+
let start = min;
|
|
164
|
+
let prev;
|
|
165
|
+
|
|
166
|
+
for (let i = 0; i < ranges.length; i++) {
|
|
167
|
+
let max = ranges[i];
|
|
168
|
+
let obj = rangeToPattern(String(start), String(max), options);
|
|
169
|
+
let zeros = '';
|
|
170
|
+
|
|
171
|
+
if (!tok.isPadded && prev && prev.pattern === obj.pattern) {
|
|
172
|
+
if (prev.count.length > 1) {
|
|
173
|
+
prev.count.pop();
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
prev.count.push(obj.count[0]);
|
|
177
|
+
prev.string = prev.pattern + toQuantifier(prev.count);
|
|
178
|
+
start = max + 1;
|
|
179
|
+
continue;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
if (tok.isPadded) {
|
|
183
|
+
zeros = padZeros(max, tok, options);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
obj.string = zeros + obj.pattern + toQuantifier(obj.count);
|
|
187
|
+
tokens.push(obj);
|
|
188
|
+
start = max + 1;
|
|
189
|
+
prev = obj;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
return tokens;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
function filterPatterns(arr, comparison, prefix, intersection, options) {
|
|
196
|
+
let result = [];
|
|
197
|
+
|
|
198
|
+
for (let ele of arr) {
|
|
199
|
+
let { string } = ele;
|
|
200
|
+
|
|
201
|
+
// only push if _both_ are negative...
|
|
202
|
+
if (!intersection && !contains(comparison, 'string', string)) {
|
|
203
|
+
result.push(prefix + string);
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
// or _both_ are positive
|
|
207
|
+
if (intersection && contains(comparison, 'string', string)) {
|
|
208
|
+
result.push(prefix + string);
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
return result;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* Zip strings
|
|
216
|
+
*/
|
|
217
|
+
|
|
218
|
+
function zip(a, b) {
|
|
219
|
+
let arr = [];
|
|
220
|
+
for (let i = 0; i < a.length; i++) arr.push([a[i], b[i]]);
|
|
221
|
+
return arr;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
function compare(a, b) {
|
|
225
|
+
return a > b ? 1 : b > a ? -1 : 0;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
function contains(arr, key, val) {
|
|
229
|
+
return arr.some(ele => ele[key] === val);
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
function countNines(min, len) {
|
|
233
|
+
return Number(String(min).slice(0, -len) + '9'.repeat(len));
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
function countZeros(integer, zeros) {
|
|
237
|
+
return integer - (integer % Math.pow(10, zeros));
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
function toQuantifier(digits) {
|
|
241
|
+
let [start = 0, stop = ''] = digits;
|
|
242
|
+
if (stop || start > 1) {
|
|
243
|
+
return `{${start + (stop ? ',' + stop : '')}}`;
|
|
244
|
+
}
|
|
245
|
+
return '';
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
function toCharacterClass(a, b, options) {
|
|
249
|
+
return `[${a}${(b - a === 1) ? '' : '-'}${b}]`;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
function hasPadding(str) {
|
|
253
|
+
return /^-?(0+)\d/.test(str);
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
function padZeros(value, tok, options) {
|
|
257
|
+
if (!tok.isPadded) {
|
|
258
|
+
return value;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
let diff = Math.abs(tok.maxLen - String(value).length);
|
|
262
|
+
let relax = options.relaxZeros !== false;
|
|
263
|
+
|
|
264
|
+
switch (diff) {
|
|
265
|
+
case 0:
|
|
266
|
+
return '';
|
|
267
|
+
case 1:
|
|
268
|
+
return relax ? '0?' : '0';
|
|
269
|
+
case 2:
|
|
270
|
+
return relax ? '0{0,2}' : '00';
|
|
271
|
+
default: {
|
|
272
|
+
return relax ? `0{0,${diff}}` : `0{${diff}}`;
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
/**
|
|
278
|
+
* Cache
|
|
279
|
+
*/
|
|
280
|
+
|
|
281
|
+
toRegexRange.cache = {};
|
|
282
|
+
toRegexRange.clearCache = () => (toRegexRange.cache = {});
|
|
283
|
+
|
|
284
|
+
/**
|
|
285
|
+
* Expose `toRegexRange`
|
|
286
|
+
*/
|
|
287
|
+
|
|
288
|
+
module.exports = toRegexRange;
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "to-regex-range",
|
|
3
|
+
"description": "Pass two numbers, get a regex-compatible source string for matching ranges. Validated against more than 2.78 million test assertions.",
|
|
4
|
+
"version": "5.0.1",
|
|
5
|
+
"homepage": "https://github.com/micromatch/to-regex-range",
|
|
6
|
+
"author": "Jon Schlinkert (https://github.com/jonschlinkert)",
|
|
7
|
+
"contributors": [
|
|
8
|
+
"Jon Schlinkert (http://twitter.com/jonschlinkert)",
|
|
9
|
+
"Rouven Weßling (www.rouvenwessling.de)"
|
|
10
|
+
],
|
|
11
|
+
"repository": "micromatch/to-regex-range",
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/micromatch/to-regex-range/issues"
|
|
14
|
+
},
|
|
15
|
+
"license": "MIT",
|
|
16
|
+
"files": [
|
|
17
|
+
"index.js"
|
|
18
|
+
],
|
|
19
|
+
"main": "index.js",
|
|
20
|
+
"engines": {
|
|
21
|
+
"node": ">=8.0"
|
|
22
|
+
},
|
|
23
|
+
"scripts": {
|
|
24
|
+
"test": "mocha"
|
|
25
|
+
},
|
|
26
|
+
"dependencies": {
|
|
27
|
+
"is-number": "^7.0.0"
|
|
28
|
+
},
|
|
29
|
+
"devDependencies": {
|
|
30
|
+
"fill-range": "^6.0.0",
|
|
31
|
+
"gulp-format-md": "^2.0.0",
|
|
32
|
+
"mocha": "^6.0.2",
|
|
33
|
+
"text-table": "^0.2.0",
|
|
34
|
+
"time-diff": "^0.3.1"
|
|
35
|
+
},
|
|
36
|
+
"keywords": [
|
|
37
|
+
"bash",
|
|
38
|
+
"date",
|
|
39
|
+
"expand",
|
|
40
|
+
"expansion",
|
|
41
|
+
"expression",
|
|
42
|
+
"glob",
|
|
43
|
+
"match",
|
|
44
|
+
"match date",
|
|
45
|
+
"match number",
|
|
46
|
+
"match numbers",
|
|
47
|
+
"match year",
|
|
48
|
+
"matches",
|
|
49
|
+
"matching",
|
|
50
|
+
"number",
|
|
51
|
+
"numbers",
|
|
52
|
+
"numerical",
|
|
53
|
+
"range",
|
|
54
|
+
"ranges",
|
|
55
|
+
"regex",
|
|
56
|
+
"regexp",
|
|
57
|
+
"regular",
|
|
58
|
+
"regular expression",
|
|
59
|
+
"sequence"
|
|
60
|
+
],
|
|
61
|
+
"verb": {
|
|
62
|
+
"layout": "default",
|
|
63
|
+
"toc": false,
|
|
64
|
+
"tasks": [
|
|
65
|
+
"readme"
|
|
66
|
+
],
|
|
67
|
+
"plugins": [
|
|
68
|
+
"gulp-format-md"
|
|
69
|
+
],
|
|
70
|
+
"lint": {
|
|
71
|
+
"reflinks": true
|
|
72
|
+
},
|
|
73
|
+
"helpers": {
|
|
74
|
+
"examples": {
|
|
75
|
+
"displayName": "examples"
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
"related": {
|
|
79
|
+
"list": [
|
|
80
|
+
"expand-range",
|
|
81
|
+
"fill-range",
|
|
82
|
+
"micromatch",
|
|
83
|
+
"repeat-element",
|
|
84
|
+
"repeat-string"
|
|
85
|
+
]
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|