@samchon/ts-patch 3.2.2 → 3.4.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/.editorconfig +371 -0
- package/.gitattributes +2 -0
- package/.github/FUNDING.yml +1 -0
- package/.github/workflows/build.yml +49 -0
- package/.github/workflows/publish.yml +47 -0
- package/.idea/codeStyles/Project.xml +28 -0
- package/.idea/codeStyles/codeStyleConfig.xml +5 -0
- package/.idea/compiler.xml +6 -0
- package/.idea/inspectionProfiles/Project_Default.xml +98 -0
- package/.idea/jsonSchemas.xml +28 -0
- package/.idea/misc.xml +9 -0
- package/.idea/modules.xml +8 -0
- package/.idea/ts-patch.iml +22 -0
- package/.idea/vcs.xml +12 -0
- package/.idea/webResources.xml +15 -0
- package/CHANGELOG.md +7 -0
- package/dist/CHANGELOG.md +275 -0
- package/dist/LICENSE.md +13 -0
- package/dist/README.md +348 -0
- package/dist/actions/check.js +53 -0
- package/dist/actions/check.js.map +1 -0
- package/dist/actions/patch.js +88 -0
- package/dist/actions/patch.js.map +1 -0
- package/dist/actions/unpatch.js +87 -0
- package/dist/actions/unpatch.js.map +1 -0
- package/dist/bin/ts-patch.js +43 -0
- package/dist/bin/ts-patch.js.map +1 -0
- package/dist/cli/cli.js +106 -0
- package/dist/cli/cli.js.map +1 -0
- package/dist/cli/commands.js +49 -0
- package/dist/cli/commands.js.map +1 -0
- package/dist/config.js +50 -0
- package/dist/config.js.map +1 -0
- package/dist/module/module-file.d.ts +10 -0
- package/dist/module/module-file.js +102 -0
- package/dist/module/module-file.js.map +1 -0
- package/dist/module/ts-module.d.ts +40 -0
- package/dist/module/ts-module.js +131 -0
- package/dist/module/ts-module.js.map +1 -0
- package/dist/node_modules/.bin/resolve +15 -0
- package/dist/node_modules/.bin/resolve.cmd +7 -0
- package/dist/node_modules/.bin/semver +15 -0
- package/dist/node_modules/.bin/semver.cmd +7 -0
- package/dist/package.json +106 -0
- package/dist/patch/get-patched-source.js +69 -0
- package/dist/patch/get-patched-source.js.map +1 -0
- package/dist/patch/transformers/fix-ts-early-return.js +61 -0
- package/dist/patch/transformers/fix-ts-early-return.js.map +1 -0
- package/dist/resources/module-patch.js +623 -0
- package/dist/system/cache.js +79 -0
- package/dist/system/cache.js.map +1 -0
- package/dist/utils/file-utils.js +98 -0
- package/dist/utils/file-utils.js.map +1 -0
- package/jest.config.ts +26 -0
- package/package.json +60 -11
- package/projects/core/plugin.ts +42 -0
- package/projects/core/resolver-hook.js +55 -0
- package/projects/core/shared/plugin-types.ts +159 -0
- package/projects/core/src/actions/check.ts +79 -0
- package/projects/core/src/actions/index.ts +5 -0
- package/projects/core/src/actions/install.ts +23 -0
- package/projects/core/src/actions/patch.ts +110 -0
- package/projects/core/src/actions/uninstall.ts +24 -0
- package/projects/core/src/actions/unpatch.ts +109 -0
- package/projects/core/src/bin/ts-patch.ts +7 -0
- package/projects/core/src/bin/tspc.ts +12 -0
- package/projects/core/src/cli/cli.ts +94 -0
- package/projects/core/src/cli/commands.ts +55 -0
- package/projects/core/src/cli/help-menu.ts +48 -0
- package/projects/core/src/cli/options.ts +83 -0
- package/projects/core/src/compiler/package.json +4 -0
- package/projects/core/src/compiler/tsc.js +19 -0
- package/projects/core/src/compiler/tsserver.js +19 -0
- package/projects/core/src/compiler/tsserverlibrary.js +19 -0
- package/projects/core/src/compiler/typescript.js +19 -0
- package/projects/core/src/config.ts +65 -0
- package/projects/core/src/index.ts +4 -0
- package/projects/core/src/module/get-live-module.ts +25 -0
- package/projects/core/src/module/index.ts +4 -0
- package/projects/core/src/module/module-file.ts +127 -0
- package/projects/core/src/module/module-source.ts +59 -0
- package/projects/core/src/module/source-section.ts +110 -0
- package/projects/core/src/module/ts-module.ts +187 -0
- package/projects/core/src/options.ts +55 -0
- package/projects/core/src/patch/get-patched-source.ts +85 -0
- package/projects/core/src/patch/patch-detail.ts +106 -0
- package/projects/core/src/patch/patch-module.ts +213 -0
- package/projects/core/src/patch/transformers/add-original-create-program.ts +129 -0
- package/projects/core/src/patch/transformers/fix-ts-early-return.ts +46 -0
- package/projects/core/src/patch/transformers/hook-tsc-exec.ts +52 -0
- package/projects/core/src/patch/transformers/index.ts +6 -0
- package/projects/core/src/patch/transformers/merge-statements.ts +61 -0
- package/projects/core/src/patch/transformers/patch-create-program.ts +68 -0
- package/projects/core/src/patch/transformers/patch-emitter.ts +75 -0
- package/projects/core/src/slice/module-slice.ts +59 -0
- package/projects/core/src/slice/ts54.ts +79 -0
- package/projects/core/src/slice/ts55.ts +80 -0
- package/projects/core/src/slice/ts552.ts +80 -0
- package/projects/core/src/system/cache.ts +48 -0
- package/projects/core/src/system/errors.ts +39 -0
- package/projects/core/src/system/index.ts +4 -0
- package/projects/core/src/system/logger.ts +53 -0
- package/projects/core/src/system/types.ts +11 -0
- package/projects/core/src/ts-package.ts +99 -0
- package/projects/core/src/utils/file-utils.ts +104 -0
- package/projects/core/src/utils/find-cache-dir.ts +122 -0
- package/projects/core/src/utils/general.ts +24 -0
- package/projects/core/src/utils/index.ts +3 -0
- package/projects/core/tsconfig.json +20 -0
- package/projects/patch/package.json +8 -0
- package/projects/patch/plugin.ts +128 -0
- package/projects/patch/src/plugin/esm-intercept.ts +141 -0
- package/projects/patch/src/plugin/plugin-creator.ts +254 -0
- package/projects/patch/src/plugin/plugin.ts +193 -0
- package/projects/patch/src/plugin/register-plugin.ts +141 -0
- package/projects/patch/src/shared.ts +59 -0
- package/projects/patch/src/ts/create-program.ts +156 -0
- package/projects/patch/src/ts/shim.ts +43 -0
- package/projects/patch/src/types/plugin-types.ts +51 -0
- package/projects/patch/src/types/typescript.ts +11 -0
- package/projects/patch/tsconfig.json +34 -0
- package/scripts/postbuild.js +66 -0
- package/test/.yarnrc +1 -0
- package/test/assets/projects/main/package.json +5 -0
- package/test/assets/projects/main/src/index.ts +0 -0
- package/test/assets/projects/main/tsconfig.json +16 -0
- package/test/assets/projects/package-config/plugin/package.json +8 -0
- package/test/assets/projects/package-config/plugin/plugin.js +9 -0
- package/test/assets/projects/package-config/plugin/transformers/transformer1.js +28 -0
- package/test/assets/projects/package-config/plugin/transformers/transformer2.js +22 -0
- package/test/assets/projects/package-config/run-transform.js +72 -0
- package/test/assets/projects/package-config/src/index.ts +6 -0
- package/test/assets/projects/package-config/tsconfig.json +13 -0
- package/test/assets/projects/path-mapping/base.ts +1 -0
- package/test/assets/projects/path-mapping/package.json +8 -0
- package/test/assets/projects/path-mapping/src/a/a.ts +1 -0
- package/test/assets/projects/path-mapping/src/b.ts +1 -0
- package/test/assets/projects/path-mapping/src/index.ts +29 -0
- package/test/assets/projects/path-mapping/tsconfig.json +18 -0
- package/test/assets/projects/path-mapping/tsconfig.plugin.json +15 -0
- package/test/assets/projects/transform/package.json +9 -0
- package/test/assets/projects/transform/run-transform.js +56 -0
- package/test/assets/projects/transform/src/index.ts +4 -0
- package/test/assets/projects/transform/transformers/cjs/js-plugin.cjs +19 -0
- package/test/assets/projects/transform/transformers/cjs/package.json +3 -0
- package/test/assets/projects/transform/transformers/cjs/plugin.cts +17 -0
- package/test/assets/projects/transform/transformers/cjs/tsconfig.json +7 -0
- package/test/assets/projects/transform/transformers/esm/js-plugin.mjs +17 -0
- package/test/assets/projects/transform/transformers/esm/package.json +3 -0
- package/test/assets/projects/transform/transformers/esm/plugin.mts +19 -0
- package/test/assets/projects/transform/transformers/esm/plugin.ts +19 -0
- package/test/assets/projects/transform/transformers/esm/tsconfig.json +7 -0
- package/test/assets/projects/transform/tsconfig.cjs.json +12 -0
- package/test/assets/projects/transform/tsconfig.cts.json +12 -0
- package/test/assets/projects/transform/tsconfig.json +9 -0
- package/test/assets/projects/transform/tsconfig.mjs.json +12 -0
- package/test/assets/projects/transform/tsconfig.mts.json +11 -0
- package/test/assets/projects/transform/tsconfig.ts.json +11 -0
- package/test/assets/projects/webpack/esm-plugin.mjs +5 -0
- package/test/assets/projects/webpack/esm-plugin.mts +5 -0
- package/test/assets/projects/webpack/hide-module.js +24 -0
- package/test/assets/projects/webpack/package.json +14 -0
- package/test/assets/projects/webpack/plugin.ts +7 -0
- package/test/assets/projects/webpack/src/index.ts +0 -0
- package/test/assets/projects/webpack/tsconfig.esm.json +8 -0
- package/test/assets/projects/webpack/tsconfig.esmts.json +8 -0
- package/test/assets/projects/webpack/tsconfig.json +14 -0
- package/test/assets/projects/webpack/webpack.config.js +24 -0
- package/test/node_modules/.bin/acorn +15 -0
- package/test/node_modules/.bin/acorn.cmd +7 -0
- package/test/node_modules/.bin/json5 +15 -0
- package/test/node_modules/.bin/json5.cmd +7 -0
- package/test/node_modules/.bin/node-which +15 -0
- package/test/node_modules/.bin/node-which.cmd +7 -0
- package/test/node_modules/.bin/resolve +15 -0
- package/test/node_modules/.bin/resolve.cmd +7 -0
- package/test/node_modules/.bin/semver +15 -0
- package/test/node_modules/.bin/semver.cmd +7 -0
- package/test/node_modules/.bin/ts-node +15 -0
- package/test/node_modules/.bin/ts-node-cwd +15 -0
- package/test/node_modules/.bin/ts-node-cwd.cmd +7 -0
- package/test/node_modules/.bin/ts-node-esm +15 -0
- package/test/node_modules/.bin/ts-node-esm.cmd +7 -0
- package/test/node_modules/.bin/ts-node-script +15 -0
- package/test/node_modules/.bin/ts-node-script.cmd +7 -0
- package/test/node_modules/.bin/ts-node-transpile-only +15 -0
- package/test/node_modules/.bin/ts-node-transpile-only.cmd +7 -0
- package/test/node_modules/.bin/ts-node.cmd +7 -0
- package/test/node_modules/.bin/ts-script +15 -0
- package/test/node_modules/.bin/ts-script.cmd +7 -0
- package/test/node_modules/.bin/tsc +15 -0
- package/test/node_modules/.bin/tsc.cmd +7 -0
- package/test/node_modules/.bin/tsserver +15 -0
- package/test/node_modules/.bin/tsserver.cmd +7 -0
- package/test/node_modules/.yarn-integrity +73 -0
- package/test/node_modules/@cspotcode/source-map-support/LICENSE.md +21 -0
- package/test/node_modules/@cspotcode/source-map-support/README.md +289 -0
- package/test/node_modules/@cspotcode/source-map-support/browser-source-map-support.js +114 -0
- package/test/node_modules/@cspotcode/source-map-support/package.json +50 -0
- package/test/node_modules/@cspotcode/source-map-support/register-hook-require.d.ts +7 -0
- package/test/node_modules/@cspotcode/source-map-support/register-hook-require.js +3 -0
- package/test/node_modules/@cspotcode/source-map-support/register.d.ts +7 -0
- package/test/node_modules/@cspotcode/source-map-support/register.js +1 -0
- package/test/node_modules/@cspotcode/source-map-support/source-map-support.d.ts +76 -0
- package/test/node_modules/@cspotcode/source-map-support/source-map-support.js +938 -0
- package/test/node_modules/@jridgewell/resolve-uri/LICENSE +19 -0
- package/test/node_modules/@jridgewell/resolve-uri/README.md +40 -0
- package/test/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs +232 -0
- package/test/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs.map +1 -0
- package/test/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js +240 -0
- package/test/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js.map +1 -0
- package/test/node_modules/@jridgewell/resolve-uri/dist/types/resolve-uri.d.ts +4 -0
- package/test/node_modules/@jridgewell/resolve-uri/package.json +69 -0
- package/test/node_modules/@jridgewell/sourcemap-codec/LICENSE +19 -0
- package/test/node_modules/@jridgewell/sourcemap-codec/README.md +264 -0
- package/test/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs +423 -0
- package/test/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs.map +6 -0
- package/test/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js +464 -0
- package/test/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js.map +6 -0
- package/test/node_modules/@jridgewell/sourcemap-codec/package.json +63 -0
- package/test/node_modules/@jridgewell/sourcemap-codec/src/scopes.ts +345 -0
- package/test/node_modules/@jridgewell/sourcemap-codec/src/sourcemap-codec.ts +111 -0
- package/test/node_modules/@jridgewell/sourcemap-codec/src/strings.ts +65 -0
- package/test/node_modules/@jridgewell/sourcemap-codec/src/vlq.ts +55 -0
- package/test/node_modules/@jridgewell/sourcemap-codec/types/scopes.d.cts +50 -0
- package/test/node_modules/@jridgewell/sourcemap-codec/types/scopes.d.cts.map +1 -0
- package/test/node_modules/@jridgewell/sourcemap-codec/types/scopes.d.mts +50 -0
- package/test/node_modules/@jridgewell/sourcemap-codec/types/scopes.d.mts.map +1 -0
- package/test/node_modules/@jridgewell/sourcemap-codec/types/sourcemap-codec.d.cts +9 -0
- package/test/node_modules/@jridgewell/sourcemap-codec/types/sourcemap-codec.d.cts.map +1 -0
- package/test/node_modules/@jridgewell/sourcemap-codec/types/sourcemap-codec.d.mts +9 -0
- package/test/node_modules/@jridgewell/sourcemap-codec/types/sourcemap-codec.d.mts.map +1 -0
- package/test/node_modules/@jridgewell/sourcemap-codec/types/strings.d.cts +16 -0
- package/test/node_modules/@jridgewell/sourcemap-codec/types/strings.d.cts.map +1 -0
- package/test/node_modules/@jridgewell/sourcemap-codec/types/strings.d.mts +16 -0
- package/test/node_modules/@jridgewell/sourcemap-codec/types/strings.d.mts.map +1 -0
- package/test/node_modules/@jridgewell/sourcemap-codec/types/vlq.d.cts +7 -0
- package/test/node_modules/@jridgewell/sourcemap-codec/types/vlq.d.cts.map +1 -0
- package/test/node_modules/@jridgewell/sourcemap-codec/types/vlq.d.mts +7 -0
- package/test/node_modules/@jridgewell/sourcemap-codec/types/vlq.d.mts.map +1 -0
- package/test/node_modules/@jridgewell/trace-mapping/LICENSE +19 -0
- package/test/node_modules/@jridgewell/trace-mapping/README.md +193 -0
- package/test/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs +514 -0
- package/test/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs.map +1 -0
- package/test/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js +528 -0
- package/test/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js.map +1 -0
- package/test/node_modules/@jridgewell/trace-mapping/dist/types/any-map.d.ts +8 -0
- package/test/node_modules/@jridgewell/trace-mapping/dist/types/binary-search.d.ts +32 -0
- package/test/node_modules/@jridgewell/trace-mapping/dist/types/by-source.d.ts +7 -0
- package/test/node_modules/@jridgewell/trace-mapping/dist/types/resolve.d.ts +1 -0
- package/test/node_modules/@jridgewell/trace-mapping/dist/types/sort.d.ts +2 -0
- package/test/node_modules/@jridgewell/trace-mapping/dist/types/sourcemap-segment.d.ts +16 -0
- package/test/node_modules/@jridgewell/trace-mapping/dist/types/strip-filename.d.ts +4 -0
- package/test/node_modules/@jridgewell/trace-mapping/dist/types/trace-mapping.d.ts +70 -0
- package/test/node_modules/@jridgewell/trace-mapping/dist/types/types.d.ts +85 -0
- package/test/node_modules/@jridgewell/trace-mapping/package.json +70 -0
- package/test/node_modules/@tsconfig/node10/LICENSE +21 -0
- package/test/node_modules/@tsconfig/node10/README.md +38 -0
- package/test/node_modules/@tsconfig/node10/package.json +15 -0
- package/test/node_modules/@tsconfig/node10/tsconfig.json +14 -0
- package/test/node_modules/@tsconfig/node12/LICENSE +21 -0
- package/test/node_modules/@tsconfig/node12/README.md +40 -0
- package/test/node_modules/@tsconfig/node12/package.json +1 -0
- package/test/node_modules/@tsconfig/node12/tsconfig.json +16 -0
- package/test/node_modules/@tsconfig/node14/LICENSE +21 -0
- package/test/node_modules/@tsconfig/node14/README.md +40 -0
- package/test/node_modules/@tsconfig/node14/package.json +1 -0
- package/test/node_modules/@tsconfig/node14/tsconfig.json +16 -0
- package/test/node_modules/@tsconfig/node16/LICENSE +21 -0
- package/test/node_modules/@tsconfig/node16/README.md +40 -0
- package/test/node_modules/@tsconfig/node16/package.json +15 -0
- package/test/node_modules/@tsconfig/node16/tsconfig.json +16 -0
- package/test/node_modules/@types/fs-extra/LICENSE +21 -0
- package/test/node_modules/@types/fs-extra/README.md +16 -0
- package/test/node_modules/@types/fs-extra/index.d.ts +563 -0
- package/test/node_modules/@types/fs-extra/package.json +67 -0
- package/test/node_modules/@types/node/LICENSE +21 -0
- package/test/node_modules/@types/node/README.md +15 -0
- package/test/node_modules/@types/node/assert/strict.d.ts +105 -0
- package/test/node_modules/@types/node/assert.d.ts +955 -0
- package/test/node_modules/@types/node/async_hooks.d.ts +623 -0
- package/test/node_modules/@types/node/buffer.buffer.d.ts +466 -0
- package/test/node_modules/@types/node/buffer.d.ts +1810 -0
- package/test/node_modules/@types/node/child_process.d.ts +1433 -0
- package/test/node_modules/@types/node/cluster.d.ts +486 -0
- package/test/node_modules/@types/node/compatibility/iterators.d.ts +21 -0
- package/test/node_modules/@types/node/console.d.ts +151 -0
- package/test/node_modules/@types/node/constants.d.ts +20 -0
- package/test/node_modules/@types/node/crypto.d.ts +4065 -0
- package/test/node_modules/@types/node/dgram.d.ts +564 -0
- package/test/node_modules/@types/node/diagnostics_channel.d.ts +576 -0
- package/test/node_modules/@types/node/dns/promises.d.ts +503 -0
- package/test/node_modules/@types/node/dns.d.ts +922 -0
- package/test/node_modules/@types/node/domain.d.ts +166 -0
- package/test/node_modules/@types/node/events.d.ts +1047 -0
- package/test/node_modules/@types/node/fs/promises.d.ts +1329 -0
- package/test/node_modules/@types/node/fs.d.ts +4678 -0
- package/test/node_modules/@types/node/globals.d.ts +150 -0
- package/test/node_modules/@types/node/globals.typedarray.d.ts +101 -0
- package/test/node_modules/@types/node/http.d.ts +2188 -0
- package/test/node_modules/@types/node/http2.d.ts +2480 -0
- package/test/node_modules/@types/node/https.d.ts +405 -0
- package/test/node_modules/@types/node/index.d.ts +115 -0
- package/test/node_modules/@types/node/inspector/promises.d.ts +41 -0
- package/test/node_modules/@types/node/inspector.d.ts +269 -0
- package/test/node_modules/@types/node/inspector.generated.d.ts +4401 -0
- package/test/node_modules/@types/node/module.d.ts +757 -0
- package/test/node_modules/@types/node/net.d.ts +933 -0
- package/test/node_modules/@types/node/os.d.ts +507 -0
- package/test/node_modules/@types/node/package.json +155 -0
- package/test/node_modules/@types/node/path/posix.d.ts +8 -0
- package/test/node_modules/@types/node/path/win32.d.ts +8 -0
- package/test/node_modules/@types/node/path.d.ts +187 -0
- package/test/node_modules/@types/node/perf_hooks.d.ts +643 -0
- package/test/node_modules/@types/node/process.d.ts +2175 -0
- package/test/node_modules/@types/node/punycode.d.ts +117 -0
- package/test/node_modules/@types/node/querystring.d.ts +152 -0
- package/test/node_modules/@types/node/quic.d.ts +910 -0
- package/test/node_modules/@types/node/readline/promises.d.ts +161 -0
- package/test/node_modules/@types/node/readline.d.ts +542 -0
- package/test/node_modules/@types/node/repl.d.ts +415 -0
- package/test/node_modules/@types/node/sea.d.ts +162 -0
- package/test/node_modules/@types/node/sqlite.d.ts +1065 -0
- package/test/node_modules/@types/node/stream/consumers.d.ts +38 -0
- package/test/node_modules/@types/node/stream/promises.d.ts +211 -0
- package/test/node_modules/@types/node/stream/web.d.ts +296 -0
- package/test/node_modules/@types/node/stream.d.ts +1770 -0
- package/test/node_modules/@types/node/string_decoder.d.ts +67 -0
- package/test/node_modules/@types/node/test/reporters.d.ts +96 -0
- package/test/node_modules/@types/node/test.d.ts +2275 -0
- package/test/node_modules/@types/node/timers/promises.d.ts +108 -0
- package/test/node_modules/@types/node/timers.d.ts +159 -0
- package/test/node_modules/@types/node/tls.d.ts +1203 -0
- package/test/node_modules/@types/node/trace_events.d.ts +197 -0
- package/test/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +462 -0
- package/test/node_modules/@types/node/ts5.6/compatibility/float16array.d.ts +71 -0
- package/test/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +36 -0
- package/test/node_modules/@types/node/ts5.6/index.d.ts +117 -0
- package/test/node_modules/@types/node/ts5.7/compatibility/float16array.d.ts +72 -0
- package/test/node_modules/@types/node/ts5.7/index.d.ts +117 -0
- package/test/node_modules/@types/node/tty.d.ts +250 -0
- package/test/node_modules/@types/node/url.d.ts +541 -0
- package/test/node_modules/@types/node/util/types.d.ts +558 -0
- package/test/node_modules/@types/node/util.d.ts +1687 -0
- package/test/node_modules/@types/node/v8.d.ts +988 -0
- package/test/node_modules/@types/node/vm.d.ts +1208 -0
- package/test/node_modules/@types/node/wasi.d.ts +202 -0
- package/test/node_modules/@types/node/web-globals/abortcontroller.d.ts +59 -0
- package/test/node_modules/@types/node/web-globals/blob.d.ts +23 -0
- package/test/node_modules/@types/node/web-globals/console.d.ts +9 -0
- package/test/node_modules/@types/node/web-globals/crypto.d.ts +39 -0
- package/test/node_modules/@types/node/web-globals/domexception.d.ts +68 -0
- package/test/node_modules/@types/node/web-globals/encoding.d.ts +11 -0
- package/test/node_modules/@types/node/web-globals/events.d.ts +106 -0
- package/test/node_modules/@types/node/web-globals/fetch.d.ts +69 -0
- package/test/node_modules/@types/node/web-globals/importmeta.d.ts +13 -0
- package/test/node_modules/@types/node/web-globals/messaging.d.ts +23 -0
- package/test/node_modules/@types/node/web-globals/navigator.d.ts +25 -0
- package/test/node_modules/@types/node/web-globals/performance.d.ts +45 -0
- package/test/node_modules/@types/node/web-globals/storage.d.ts +24 -0
- package/test/node_modules/@types/node/web-globals/streams.d.ts +115 -0
- package/test/node_modules/@types/node/web-globals/timers.d.ts +44 -0
- package/test/node_modules/@types/node/web-globals/url.d.ts +24 -0
- package/test/node_modules/@types/node/worker_threads.d.ts +717 -0
- package/test/node_modules/@types/node/zlib.d.ts +682 -0
- package/test/node_modules/acorn/CHANGELOG.md +972 -0
- package/test/node_modules/acorn/LICENSE +21 -0
- package/test/node_modules/acorn/README.md +301 -0
- package/test/node_modules/acorn/bin/acorn +4 -0
- package/test/node_modules/acorn/dist/acorn.d.mts +883 -0
- package/test/node_modules/acorn/dist/acorn.d.ts +883 -0
- package/test/node_modules/acorn/dist/acorn.js +6295 -0
- package/test/node_modules/acorn/dist/acorn.mjs +6266 -0
- package/test/node_modules/acorn/dist/bin.js +90 -0
- package/test/node_modules/acorn/package.json +50 -0
- package/test/node_modules/acorn-walk/CHANGELOG.md +209 -0
- package/test/node_modules/acorn-walk/LICENSE +21 -0
- package/test/node_modules/acorn-walk/README.md +124 -0
- package/test/node_modules/acorn-walk/dist/walk.d.mts +152 -0
- package/test/node_modules/acorn-walk/dist/walk.d.ts +152 -0
- package/test/node_modules/acorn-walk/dist/walk.js +485 -0
- package/test/node_modules/acorn-walk/dist/walk.mjs +467 -0
- package/test/node_modules/acorn-walk/node_modules/.bin/acorn +15 -0
- package/test/node_modules/acorn-walk/node_modules/.bin/acorn.cmd +7 -0
- package/test/node_modules/acorn-walk/package.json +50 -0
- package/test/node_modules/ansi-regex/index.d.ts +37 -0
- package/test/node_modules/ansi-regex/index.js +10 -0
- package/test/node_modules/ansi-regex/license +9 -0
- package/test/node_modules/ansi-regex/package.json +55 -0
- package/test/node_modules/ansi-regex/readme.md +78 -0
- package/test/node_modules/ansi-styles/index.d.ts +345 -0
- package/test/node_modules/ansi-styles/index.js +163 -0
- package/test/node_modules/ansi-styles/license +9 -0
- package/test/node_modules/ansi-styles/package.json +56 -0
- package/test/node_modules/ansi-styles/readme.md +152 -0
- package/test/node_modules/arg/LICENSE.md +21 -0
- package/test/node_modules/arg/README.md +280 -0
- package/test/node_modules/arg/index.d.ts +31 -0
- package/test/node_modules/arg/index.js +144 -0
- package/test/node_modules/arg/package.json +30 -0
- package/test/node_modules/chalk/index.d.ts +415 -0
- package/test/node_modules/chalk/license +9 -0
- package/test/node_modules/chalk/package.json +68 -0
- package/test/node_modules/chalk/readme.md +341 -0
- package/test/node_modules/chalk/source/index.js +229 -0
- package/test/node_modules/chalk/source/templates.js +134 -0
- package/test/node_modules/chalk/source/util.js +39 -0
- package/test/node_modules/color-convert/CHANGELOG.md +54 -0
- package/test/node_modules/color-convert/LICENSE +21 -0
- package/test/node_modules/color-convert/README.md +68 -0
- package/test/node_modules/color-convert/conversions.js +839 -0
- package/test/node_modules/color-convert/index.js +81 -0
- package/test/node_modules/color-convert/package.json +48 -0
- package/test/node_modules/color-convert/route.js +97 -0
- package/test/node_modules/color-name/LICENSE +8 -0
- package/test/node_modules/color-name/README.md +11 -0
- package/test/node_modules/color-name/index.js +152 -0
- package/test/node_modules/color-name/package.json +28 -0
- package/test/node_modules/create-require/CHANGELOG.md +33 -0
- package/test/node_modules/create-require/LICENSE +25 -0
- package/test/node_modules/create-require/README.md +46 -0
- package/test/node_modules/create-require/create-require.d.ts +3 -0
- package/test/node_modules/create-require/create-require.js +49 -0
- package/test/node_modules/create-require/package.json +39 -0
- package/test/node_modules/diff/CONTRIBUTING.md +39 -0
- package/test/node_modules/diff/LICENSE +31 -0
- package/test/node_modules/diff/README.md +207 -0
- package/test/node_modules/diff/dist/diff.js +1548 -0
- package/test/node_modules/diff/dist/diff.min.js +1 -0
- package/test/node_modules/diff/lib/convert/dmp.js +32 -0
- package/test/node_modules/diff/lib/convert/xml.js +42 -0
- package/test/node_modules/diff/lib/diff/array.js +45 -0
- package/test/node_modules/diff/lib/diff/base.js +304 -0
- package/test/node_modules/diff/lib/diff/character.js +37 -0
- package/test/node_modules/diff/lib/diff/css.js +41 -0
- package/test/node_modules/diff/lib/diff/json.js +163 -0
- package/test/node_modules/diff/lib/diff/line.js +89 -0
- package/test/node_modules/diff/lib/diff/sentence.js +41 -0
- package/test/node_modules/diff/lib/diff/word.js +107 -0
- package/test/node_modules/diff/lib/index.es6.js +1519 -0
- package/test/node_modules/diff/lib/index.js +216 -0
- package/test/node_modules/diff/lib/patch/apply.js +243 -0
- package/test/node_modules/diff/lib/patch/create.js +247 -0
- package/test/node_modules/diff/lib/patch/merge.js +609 -0
- package/test/node_modules/diff/lib/patch/parse.js +156 -0
- package/test/node_modules/diff/lib/util/array.js +32 -0
- package/test/node_modules/diff/lib/util/distance-iterator.js +57 -0
- package/test/node_modules/diff/lib/util/params.js +24 -0
- package/test/node_modules/diff/package.json +74 -0
- package/test/node_modules/diff/release-notes.md +261 -0
- package/test/node_modules/diff/runtime.js +3 -0
- package/test/node_modules/fs-extra/LICENSE +15 -0
- package/test/node_modules/fs-extra/README.md +262 -0
- package/test/node_modules/fs-extra/lib/copy/copy-sync.js +169 -0
- package/test/node_modules/fs-extra/lib/copy/copy.js +235 -0
- package/test/node_modules/fs-extra/lib/copy/index.js +7 -0
- package/test/node_modules/fs-extra/lib/empty/index.js +39 -0
- package/test/node_modules/fs-extra/lib/ensure/file.js +69 -0
- package/test/node_modules/fs-extra/lib/ensure/index.js +23 -0
- package/test/node_modules/fs-extra/lib/ensure/link.js +64 -0
- package/test/node_modules/fs-extra/lib/ensure/symlink-paths.js +99 -0
- package/test/node_modules/fs-extra/lib/ensure/symlink-type.js +31 -0
- package/test/node_modules/fs-extra/lib/ensure/symlink.js +82 -0
- package/test/node_modules/fs-extra/lib/fs/index.js +128 -0
- package/test/node_modules/fs-extra/lib/index.js +16 -0
- package/test/node_modules/fs-extra/lib/json/index.js +16 -0
- package/test/node_modules/fs-extra/lib/json/jsonfile.js +11 -0
- package/test/node_modules/fs-extra/lib/json/output-json-sync.js +12 -0
- package/test/node_modules/fs-extra/lib/json/output-json.js +12 -0
- package/test/node_modules/fs-extra/lib/mkdirs/index.js +14 -0
- package/test/node_modules/fs-extra/lib/mkdirs/make-dir.js +27 -0
- package/test/node_modules/fs-extra/lib/mkdirs/utils.js +21 -0
- package/test/node_modules/fs-extra/lib/move/index.js +7 -0
- package/test/node_modules/fs-extra/lib/move/move-sync.js +54 -0
- package/test/node_modules/fs-extra/lib/move/move.js +75 -0
- package/test/node_modules/fs-extra/lib/output-file/index.js +40 -0
- package/test/node_modules/fs-extra/lib/path-exists/index.js +12 -0
- package/test/node_modules/fs-extra/lib/remove/index.js +22 -0
- package/test/node_modules/fs-extra/lib/remove/rimraf.js +302 -0
- package/test/node_modules/fs-extra/lib/util/stat.js +154 -0
- package/test/node_modules/fs-extra/lib/util/utimes.js +26 -0
- package/test/node_modules/fs-extra/package.json +67 -0
- package/test/node_modules/function-bind/.eslintrc +21 -0
- package/test/node_modules/function-bind/.github/FUNDING.yml +12 -0
- package/test/node_modules/function-bind/.github/SECURITY.md +3 -0
- package/test/node_modules/function-bind/.nycrc +13 -0
- package/test/node_modules/function-bind/CHANGELOG.md +136 -0
- package/test/node_modules/function-bind/LICENSE +20 -0
- package/test/node_modules/function-bind/README.md +46 -0
- package/test/node_modules/function-bind/implementation.js +84 -0
- package/test/node_modules/function-bind/index.js +5 -0
- package/test/node_modules/function-bind/package.json +87 -0
- package/test/node_modules/function-bind/test/.eslintrc +9 -0
- package/test/node_modules/function-bind/test/index.js +252 -0
- package/test/node_modules/global-prefix/LICENSE +21 -0
- package/test/node_modules/global-prefix/README.md +92 -0
- package/test/node_modules/global-prefix/index.js +85 -0
- package/test/node_modules/global-prefix/node_modules/.bin/node-which +15 -0
- package/test/node_modules/global-prefix/node_modules/.bin/node-which.cmd +7 -0
- package/test/node_modules/global-prefix/package.json +49 -0
- package/test/node_modules/graceful-fs/LICENSE +15 -0
- package/test/node_modules/graceful-fs/README.md +143 -0
- package/test/node_modules/graceful-fs/clone.js +23 -0
- package/test/node_modules/graceful-fs/graceful-fs.js +448 -0
- package/test/node_modules/graceful-fs/legacy-streams.js +118 -0
- package/test/node_modules/graceful-fs/package.json +53 -0
- package/test/node_modules/graceful-fs/polyfills.js +355 -0
- package/test/node_modules/has-flag/index.d.ts +39 -0
- package/test/node_modules/has-flag/index.js +8 -0
- package/test/node_modules/has-flag/license +9 -0
- package/test/node_modules/has-flag/package.json +46 -0
- package/test/node_modules/has-flag/readme.md +89 -0
- package/test/node_modules/hasown/.eslintrc +5 -0
- package/test/node_modules/hasown/.github/FUNDING.yml +12 -0
- package/test/node_modules/hasown/.nycrc +13 -0
- package/test/node_modules/hasown/CHANGELOG.md +40 -0
- package/test/node_modules/hasown/LICENSE +21 -0
- package/test/node_modules/hasown/README.md +40 -0
- package/test/node_modules/hasown/index.d.ts +3 -0
- package/test/node_modules/hasown/index.js +8 -0
- package/test/node_modules/hasown/package.json +92 -0
- package/test/node_modules/hasown/tsconfig.json +6 -0
- package/test/node_modules/ini/LICENSE +15 -0
- package/test/node_modules/ini/README.md +180 -0
- package/test/node_modules/ini/lib/ini.js +280 -0
- package/test/node_modules/ini/package.json +45 -0
- package/test/node_modules/is-core-module/.eslintrc +18 -0
- package/test/node_modules/is-core-module/.nycrc +9 -0
- package/test/node_modules/is-core-module/CHANGELOG.md +218 -0
- package/test/node_modules/is-core-module/LICENSE +20 -0
- package/test/node_modules/is-core-module/README.md +40 -0
- package/test/node_modules/is-core-module/core.json +162 -0
- package/test/node_modules/is-core-module/index.js +69 -0
- package/test/node_modules/is-core-module/package.json +76 -0
- package/test/node_modules/is-core-module/test/index.js +157 -0
- package/test/node_modules/isexe/LICENSE.md +55 -0
- package/test/node_modules/isexe/README.md +80 -0
- package/test/node_modules/isexe/dist/commonjs/index.d.ts +14 -0
- package/test/node_modules/isexe/dist/commonjs/index.d.ts.map +1 -0
- package/test/node_modules/isexe/dist/commonjs/index.js +56 -0
- package/test/node_modules/isexe/dist/commonjs/index.js.map +1 -0
- package/test/node_modules/isexe/dist/commonjs/index.min.js +2 -0
- package/test/node_modules/isexe/dist/commonjs/index.min.js.map +7 -0
- package/test/node_modules/isexe/dist/commonjs/options.d.ts +32 -0
- package/test/node_modules/isexe/dist/commonjs/options.d.ts.map +1 -0
- package/test/node_modules/isexe/dist/commonjs/options.js +3 -0
- package/test/node_modules/isexe/dist/commonjs/options.js.map +1 -0
- package/test/node_modules/isexe/dist/commonjs/package.json +3 -0
- package/test/node_modules/isexe/dist/commonjs/posix.d.ts +18 -0
- package/test/node_modules/isexe/dist/commonjs/posix.d.ts.map +1 -0
- package/test/node_modules/isexe/dist/commonjs/posix.js +67 -0
- package/test/node_modules/isexe/dist/commonjs/posix.js.map +1 -0
- package/test/node_modules/isexe/dist/commonjs/win32.d.ts +18 -0
- package/test/node_modules/isexe/dist/commonjs/win32.d.ts.map +1 -0
- package/test/node_modules/isexe/dist/commonjs/win32.js +63 -0
- package/test/node_modules/isexe/dist/commonjs/win32.js.map +1 -0
- package/test/node_modules/isexe/dist/esm/index.d.ts +14 -0
- package/test/node_modules/isexe/dist/esm/index.d.ts.map +1 -0
- package/test/node_modules/isexe/dist/esm/index.js +16 -0
- package/test/node_modules/isexe/dist/esm/index.js.map +1 -0
- package/test/node_modules/isexe/dist/esm/index.min.js +2 -0
- package/test/node_modules/isexe/dist/esm/index.min.js.map +7 -0
- package/test/node_modules/isexe/dist/esm/options.d.ts +32 -0
- package/test/node_modules/isexe/dist/esm/options.d.ts.map +1 -0
- package/test/node_modules/isexe/dist/esm/options.js +2 -0
- package/test/node_modules/isexe/dist/esm/options.js.map +1 -0
- package/test/node_modules/isexe/dist/esm/package.json +3 -0
- package/test/node_modules/isexe/dist/esm/posix.d.ts +18 -0
- package/test/node_modules/isexe/dist/esm/posix.d.ts.map +1 -0
- package/test/node_modules/isexe/dist/esm/posix.js +62 -0
- package/test/node_modules/isexe/dist/esm/posix.js.map +1 -0
- package/test/node_modules/isexe/dist/esm/win32.d.ts +18 -0
- package/test/node_modules/isexe/dist/esm/win32.d.ts.map +1 -0
- package/test/node_modules/isexe/dist/esm/win32.js +58 -0
- package/test/node_modules/isexe/dist/esm/win32.js.map +1 -0
- package/test/node_modules/isexe/package.json +78 -0
- package/test/node_modules/json5/LICENSE.md +23 -0
- package/test/node_modules/json5/README.md +282 -0
- package/test/node_modules/json5/dist/index.js +1737 -0
- package/test/node_modules/json5/dist/index.min.js +1 -0
- package/test/node_modules/json5/dist/index.min.mjs +1 -0
- package/test/node_modules/json5/dist/index.mjs +1426 -0
- package/test/node_modules/json5/lib/cli.js +152 -0
- package/test/node_modules/json5/lib/index.d.ts +4 -0
- package/test/node_modules/json5/lib/index.js +9 -0
- package/test/node_modules/json5/lib/parse.d.ts +15 -0
- package/test/node_modules/json5/lib/parse.js +1114 -0
- package/test/node_modules/json5/lib/register.js +13 -0
- package/test/node_modules/json5/lib/require.js +4 -0
- package/test/node_modules/json5/lib/stringify.d.ts +89 -0
- package/test/node_modules/json5/lib/stringify.js +261 -0
- package/test/node_modules/json5/lib/unicode.d.ts +3 -0
- package/test/node_modules/json5/lib/unicode.js +4 -0
- package/test/node_modules/json5/lib/util.d.ts +5 -0
- package/test/node_modules/json5/lib/util.js +35 -0
- package/test/node_modules/json5/package.json +72 -0
- package/test/node_modules/jsonfile/LICENSE +15 -0
- package/test/node_modules/jsonfile/README.md +230 -0
- package/test/node_modules/jsonfile/index.js +88 -0
- package/test/node_modules/jsonfile/package.json +40 -0
- package/test/node_modules/jsonfile/utils.js +14 -0
- package/test/node_modules/kind-of/CHANGELOG.md +160 -0
- package/test/node_modules/kind-of/LICENSE +21 -0
- package/test/node_modules/kind-of/README.md +367 -0
- package/test/node_modules/kind-of/index.js +129 -0
- package/test/node_modules/kind-of/package.json +88 -0
- package/test/node_modules/make-error/LICENSE +5 -0
- package/test/node_modules/make-error/README.md +112 -0
- package/test/node_modules/make-error/dist/make-error.js +1 -0
- package/test/node_modules/make-error/index.d.ts +47 -0
- package/test/node_modules/make-error/index.js +151 -0
- package/test/node_modules/make-error/package.json +62 -0
- package/test/node_modules/minimist/.eslintrc +29 -0
- package/test/node_modules/minimist/.github/FUNDING.yml +12 -0
- package/test/node_modules/minimist/.nycrc +14 -0
- package/test/node_modules/minimist/CHANGELOG.md +298 -0
- package/test/node_modules/minimist/LICENSE +18 -0
- package/test/node_modules/minimist/README.md +121 -0
- package/test/node_modules/minimist/example/parse.js +4 -0
- package/test/node_modules/minimist/index.js +263 -0
- package/test/node_modules/minimist/package.json +75 -0
- package/test/node_modules/minimist/test/all_bool.js +34 -0
- package/test/node_modules/minimist/test/bool.js +177 -0
- package/test/node_modules/minimist/test/dash.js +43 -0
- package/test/node_modules/minimist/test/default_bool.js +37 -0
- package/test/node_modules/minimist/test/dotted.js +24 -0
- package/test/node_modules/minimist/test/kv_short.js +32 -0
- package/test/node_modules/minimist/test/long.js +33 -0
- package/test/node_modules/minimist/test/num.js +38 -0
- package/test/node_modules/minimist/test/parse.js +209 -0
- package/test/node_modules/minimist/test/parse_modified.js +11 -0
- package/test/node_modules/minimist/test/proto.js +64 -0
- package/test/node_modules/minimist/test/short.js +69 -0
- package/test/node_modules/minimist/test/stop_early.js +17 -0
- package/test/node_modules/minimist/test/unknown.js +104 -0
- package/test/node_modules/minimist/test/whitespace.js +10 -0
- package/test/node_modules/path-parse/LICENSE +21 -0
- package/test/node_modules/path-parse/README.md +42 -0
- package/test/node_modules/path-parse/index.js +75 -0
- package/test/node_modules/path-parse/package.json +33 -0
- package/test/node_modules/resolve/.editorconfig +37 -0
- package/test/node_modules/resolve/.eslintrc +65 -0
- package/test/node_modules/resolve/.github/FUNDING.yml +12 -0
- package/test/node_modules/resolve/.github/INCIDENT_RESPONSE_PROCESS.md +119 -0
- package/test/node_modules/resolve/.github/THREAT_MODEL.md +74 -0
- package/test/node_modules/resolve/LICENSE +21 -0
- package/test/node_modules/resolve/SECURITY.md +11 -0
- package/test/node_modules/resolve/async.js +3 -0
- package/test/node_modules/resolve/bin/resolve +50 -0
- package/test/node_modules/resolve/example/async.js +5 -0
- package/test/node_modules/resolve/example/sync.js +3 -0
- package/test/node_modules/resolve/index.js +6 -0
- package/test/node_modules/resolve/lib/async.js +333 -0
- package/test/node_modules/resolve/lib/caller.js +8 -0
- package/test/node_modules/resolve/lib/core.js +12 -0
- package/test/node_modules/resolve/lib/core.json +162 -0
- package/test/node_modules/resolve/lib/homedir.js +24 -0
- package/test/node_modules/resolve/lib/is-core.js +5 -0
- package/test/node_modules/resolve/lib/node-modules-paths.js +45 -0
- package/test/node_modules/resolve/lib/normalize-options.js +10 -0
- package/test/node_modules/resolve/lib/sync.js +212 -0
- package/test/node_modules/resolve/package.json +75 -0
- package/test/node_modules/resolve/readme.markdown +301 -0
- package/test/node_modules/resolve/sync.js +3 -0
- package/test/node_modules/resolve/test/core.js +88 -0
- package/test/node_modules/resolve/test/dotdot/abc/index.js +2 -0
- package/test/node_modules/resolve/test/dotdot/index.js +1 -0
- package/test/node_modules/resolve/test/dotdot.js +29 -0
- package/test/node_modules/resolve/test/faulty_basedir.js +29 -0
- package/test/node_modules/resolve/test/filter.js +34 -0
- package/test/node_modules/resolve/test/filter_sync.js +33 -0
- package/test/node_modules/resolve/test/home_paths.js +127 -0
- package/test/node_modules/resolve/test/home_paths_sync.js +114 -0
- package/test/node_modules/resolve/test/mock.js +315 -0
- package/test/node_modules/resolve/test/mock_sync.js +214 -0
- package/test/node_modules/resolve/test/module_dir/xmodules/aaa/index.js +1 -0
- package/test/node_modules/resolve/test/module_dir/ymodules/aaa/index.js +1 -0
- package/test/node_modules/resolve/test/module_dir/zmodules/bbb/main.js +1 -0
- package/test/node_modules/resolve/test/module_dir/zmodules/bbb/package.json +3 -0
- package/test/node_modules/resolve/test/module_dir.js +56 -0
- package/test/node_modules/resolve/test/node-modules-paths.js +143 -0
- package/test/node_modules/resolve/test/node_path/x/aaa/index.js +1 -0
- package/test/node_modules/resolve/test/node_path/x/ccc/index.js +1 -0
- package/test/node_modules/resolve/test/node_path/y/bbb/index.js +1 -0
- package/test/node_modules/resolve/test/node_path/y/ccc/index.js +1 -0
- package/test/node_modules/resolve/test/node_path.js +70 -0
- package/test/node_modules/resolve/test/nonstring.js +9 -0
- package/test/node_modules/resolve/test/pathfilter/deep_ref/main.js +0 -0
- package/test/node_modules/resolve/test/pathfilter.js +75 -0
- package/test/node_modules/resolve/test/precedence/aaa/index.js +1 -0
- package/test/node_modules/resolve/test/precedence/aaa/main.js +1 -0
- package/test/node_modules/resolve/test/precedence/aaa.js +1 -0
- package/test/node_modules/resolve/test/precedence/bbb/main.js +1 -0
- package/test/node_modules/resolve/test/precedence/bbb.js +1 -0
- package/test/node_modules/resolve/test/precedence.js +23 -0
- package/test/node_modules/resolve/test/resolver/baz/doom.js +0 -0
- package/test/node_modules/resolve/test/resolver/baz/package.json +4 -0
- package/test/node_modules/resolve/test/resolver/baz/quux.js +1 -0
- package/test/node_modules/resolve/test/resolver/browser_field/a.js +0 -0
- package/test/node_modules/resolve/test/resolver/browser_field/b.js +0 -0
- package/test/node_modules/resolve/test/resolver/browser_field/package.json +5 -0
- package/test/node_modules/resolve/test/resolver/cup.coffee +1 -0
- package/test/node_modules/resolve/test/resolver/dot_main/index.js +1 -0
- package/test/node_modules/resolve/test/resolver/dot_main/package.json +3 -0
- package/test/node_modules/resolve/test/resolver/dot_slash_main/index.js +1 -0
- package/test/node_modules/resolve/test/resolver/dot_slash_main/package.json +3 -0
- package/test/node_modules/resolve/test/resolver/false_main/index.js +0 -0
- package/test/node_modules/resolve/test/resolver/false_main/package.json +4 -0
- package/test/node_modules/resolve/test/resolver/foo.js +1 -0
- package/test/node_modules/resolve/test/resolver/incorrect_main/index.js +2 -0
- package/test/node_modules/resolve/test/resolver/incorrect_main/package.json +3 -0
- package/test/node_modules/resolve/test/resolver/invalid_main/package.json +7 -0
- package/test/node_modules/resolve/test/resolver/mug.coffee +0 -0
- package/test/node_modules/resolve/test/resolver/mug.js +0 -0
- package/test/node_modules/resolve/test/resolver/multirepo/lerna.json +6 -0
- package/test/node_modules/resolve/test/resolver/multirepo/package.json +20 -0
- package/test/node_modules/resolve/test/resolver/multirepo/packages/package-a/index.js +35 -0
- package/test/node_modules/resolve/test/resolver/multirepo/packages/package-a/package.json +14 -0
- package/test/node_modules/resolve/test/resolver/multirepo/packages/package-b/index.js +0 -0
- package/test/node_modules/resolve/test/resolver/multirepo/packages/package-b/package.json +14 -0
- package/test/node_modules/resolve/test/resolver/nested_symlinks/mylib/async.js +26 -0
- package/test/node_modules/resolve/test/resolver/nested_symlinks/mylib/package.json +15 -0
- package/test/node_modules/resolve/test/resolver/nested_symlinks/mylib/sync.js +12 -0
- package/test/node_modules/resolve/test/resolver/other_path/lib/other-lib.js +0 -0
- package/test/node_modules/resolve/test/resolver/other_path/root.js +0 -0
- package/test/node_modules/resolve/test/resolver/quux/foo/index.js +1 -0
- package/test/node_modules/resolve/test/resolver/same_names/foo/index.js +1 -0
- package/test/node_modules/resolve/test/resolver/same_names/foo.js +1 -0
- package/test/node_modules/resolve/test/resolver/symlinked/_/node_modules/foo.js +0 -0
- package/test/node_modules/resolve/test/resolver/symlinked/_/symlink_target/.gitkeep +0 -0
- package/test/node_modules/resolve/test/resolver/symlinked/package/bar.js +1 -0
- package/test/node_modules/resolve/test/resolver/symlinked/package/package.json +3 -0
- package/test/node_modules/resolve/test/resolver/without_basedir/main.js +5 -0
- package/test/node_modules/resolve/test/resolver.js +597 -0
- package/test/node_modules/resolve/test/resolver_sync.js +730 -0
- package/test/node_modules/resolve/test/shadowed_core/node_modules/util/index.js +0 -0
- package/test/node_modules/resolve/test/shadowed_core.js +54 -0
- package/test/node_modules/resolve/test/subdirs.js +13 -0
- package/test/node_modules/resolve/test/symlinks.js +176 -0
- package/test/node_modules/semver/LICENSE +15 -0
- package/test/node_modules/semver/README.md +665 -0
- package/test/node_modules/semver/bin/semver.js +191 -0
- package/test/node_modules/semver/classes/comparator.js +143 -0
- package/test/node_modules/semver/classes/index.js +7 -0
- package/test/node_modules/semver/classes/range.js +557 -0
- package/test/node_modules/semver/classes/semver.js +333 -0
- package/test/node_modules/semver/functions/clean.js +8 -0
- package/test/node_modules/semver/functions/cmp.js +54 -0
- package/test/node_modules/semver/functions/coerce.js +62 -0
- package/test/node_modules/semver/functions/compare-build.js +9 -0
- package/test/node_modules/semver/functions/compare-loose.js +5 -0
- package/test/node_modules/semver/functions/compare.js +7 -0
- package/test/node_modules/semver/functions/diff.js +60 -0
- package/test/node_modules/semver/functions/eq.js +5 -0
- package/test/node_modules/semver/functions/gt.js +5 -0
- package/test/node_modules/semver/functions/gte.js +5 -0
- package/test/node_modules/semver/functions/inc.js +21 -0
- package/test/node_modules/semver/functions/lt.js +5 -0
- package/test/node_modules/semver/functions/lte.js +5 -0
- package/test/node_modules/semver/functions/major.js +5 -0
- package/test/node_modules/semver/functions/minor.js +5 -0
- package/test/node_modules/semver/functions/neq.js +5 -0
- package/test/node_modules/semver/functions/parse.js +18 -0
- package/test/node_modules/semver/functions/patch.js +5 -0
- package/test/node_modules/semver/functions/prerelease.js +8 -0
- package/test/node_modules/semver/functions/rcompare.js +5 -0
- package/test/node_modules/semver/functions/rsort.js +5 -0
- package/test/node_modules/semver/functions/satisfies.js +12 -0
- package/test/node_modules/semver/functions/sort.js +5 -0
- package/test/node_modules/semver/functions/valid.js +8 -0
- package/test/node_modules/semver/index.js +91 -0
- package/test/node_modules/semver/internal/constants.js +37 -0
- package/test/node_modules/semver/internal/debug.js +11 -0
- package/test/node_modules/semver/internal/identifiers.js +29 -0
- package/test/node_modules/semver/internal/lrucache.js +42 -0
- package/test/node_modules/semver/internal/parse-options.js +17 -0
- package/test/node_modules/semver/internal/re.js +223 -0
- package/test/node_modules/semver/package.json +78 -0
- package/test/node_modules/semver/preload.js +4 -0
- package/test/node_modules/semver/range.bnf +16 -0
- package/test/node_modules/semver/ranges/gtr.js +6 -0
- package/test/node_modules/semver/ranges/intersects.js +9 -0
- package/test/node_modules/semver/ranges/ltr.js +6 -0
- package/test/node_modules/semver/ranges/max-satisfying.js +27 -0
- package/test/node_modules/semver/ranges/min-satisfying.js +26 -0
- package/test/node_modules/semver/ranges/min-version.js +63 -0
- package/test/node_modules/semver/ranges/outside.js +82 -0
- package/test/node_modules/semver/ranges/simplify.js +49 -0
- package/test/node_modules/semver/ranges/subset.js +249 -0
- package/test/node_modules/semver/ranges/to-comparators.js +10 -0
- package/test/node_modules/semver/ranges/valid.js +13 -0
- package/test/node_modules/strip-ansi/index.d.ts +17 -0
- package/test/node_modules/strip-ansi/index.js +4 -0
- package/test/node_modules/strip-ansi/license +9 -0
- package/test/node_modules/strip-ansi/package.json +54 -0
- package/test/node_modules/strip-ansi/readme.md +46 -0
- package/test/node_modules/strip-bom/index.js +14 -0
- package/test/node_modules/strip-bom/license +21 -0
- package/test/node_modules/strip-bom/package.json +40 -0
- package/test/node_modules/strip-bom/readme.md +36 -0
- package/test/node_modules/supports-color/browser.js +5 -0
- package/test/node_modules/supports-color/index.js +135 -0
- package/test/node_modules/supports-color/license +9 -0
- package/test/node_modules/supports-color/package.json +53 -0
- package/test/node_modules/supports-color/readme.md +76 -0
- package/test/node_modules/supports-preserve-symlinks-flag/.eslintrc +14 -0
- package/test/node_modules/supports-preserve-symlinks-flag/.github/FUNDING.yml +12 -0
- package/test/node_modules/supports-preserve-symlinks-flag/.nycrc +9 -0
- package/test/node_modules/supports-preserve-symlinks-flag/CHANGELOG.md +22 -0
- package/test/node_modules/supports-preserve-symlinks-flag/LICENSE +21 -0
- package/test/node_modules/supports-preserve-symlinks-flag/README.md +42 -0
- package/test/node_modules/supports-preserve-symlinks-flag/browser.js +3 -0
- package/test/node_modules/supports-preserve-symlinks-flag/index.js +9 -0
- package/test/node_modules/supports-preserve-symlinks-flag/package.json +70 -0
- package/test/node_modules/supports-preserve-symlinks-flag/test/index.js +29 -0
- package/test/node_modules/ts-latest/LICENSE.txt +55 -0
- package/test/node_modules/ts-latest/README.md +50 -0
- package/test/node_modules/ts-latest/SECURITY.md +39 -0
- package/test/node_modules/ts-latest/ThirdPartyNoticeText.txt +193 -0
- package/test/node_modules/ts-latest/bin/tsc +2 -0
- package/test/node_modules/ts-latest/bin/tsserver +2 -0
- package/test/node_modules/ts-latest/lib/_tsc.js +134440 -0
- package/test/node_modules/ts-latest/lib/_tsserver.js +659 -0
- package/test/node_modules/ts-latest/lib/_typingsInstaller.js +222 -0
- package/test/node_modules/ts-latest/lib/cs/diagnosticMessages.generated.json +2129 -0
- package/test/node_modules/ts-latest/lib/de/diagnosticMessages.generated.json +2125 -0
- package/test/node_modules/ts-latest/lib/es/diagnosticMessages.generated.json +2129 -0
- package/test/node_modules/ts-latest/lib/fr/diagnosticMessages.generated.json +2129 -0
- package/test/node_modules/ts-latest/lib/it/diagnosticMessages.generated.json +2125 -0
- package/test/node_modules/ts-latest/lib/ja/diagnosticMessages.generated.json +2129 -0
- package/test/node_modules/ts-latest/lib/ko/diagnosticMessages.generated.json +2129 -0
- package/test/node_modules/ts-latest/lib/lib.d.ts +20 -0
- package/test/node_modules/ts-latest/lib/lib.decorators.d.ts +382 -0
- package/test/node_modules/ts-latest/lib/lib.decorators.legacy.d.ts +20 -0
- package/test/node_modules/ts-latest/lib/lib.dom.asynciterable.d.ts +18 -0
- package/test/node_modules/ts-latest/lib/lib.dom.d.ts +44303 -0
- package/test/node_modules/ts-latest/lib/lib.dom.iterable.d.ts +18 -0
- package/test/node_modules/ts-latest/lib/lib.es2015.collection.d.ts +150 -0
- package/test/node_modules/ts-latest/lib/lib.es2015.core.d.ts +595 -0
- package/test/node_modules/ts-latest/lib/lib.es2015.d.ts +26 -0
- package/test/node_modules/ts-latest/lib/lib.es2015.generator.d.ts +75 -0
- package/test/node_modules/ts-latest/lib/lib.es2015.iterable.d.ts +603 -0
- package/test/node_modules/ts-latest/lib/lib.es2015.promise.d.ts +79 -0
- package/test/node_modules/ts-latest/lib/lib.es2015.proxy.d.ts +126 -0
- package/test/node_modules/ts-latest/lib/lib.es2015.reflect.d.ts +142 -0
- package/test/node_modules/ts-latest/lib/lib.es2015.symbol.d.ts +44 -0
- package/test/node_modules/ts-latest/lib/lib.es2015.symbol.wellknown.d.ts +324 -0
- package/test/node_modules/ts-latest/lib/lib.es2016.array.include.d.ts +114 -0
- package/test/node_modules/ts-latest/lib/lib.es2016.d.ts +19 -0
- package/test/node_modules/ts-latest/lib/lib.es2016.full.d.ts +21 -0
- package/test/node_modules/ts-latest/lib/lib.es2016.intl.d.ts +29 -0
- package/test/node_modules/ts-latest/lib/lib.es2017.arraybuffer.d.ts +19 -0
- package/test/node_modules/ts-latest/lib/lib.es2017.d.ts +24 -0
- package/test/node_modules/ts-latest/lib/lib.es2017.date.d.ts +29 -0
- package/test/node_modules/ts-latest/lib/lib.es2017.full.d.ts +21 -0
- package/test/node_modules/ts-latest/lib/lib.es2017.intl.d.ts +42 -0
- package/test/node_modules/ts-latest/lib/lib.es2017.object.d.ts +47 -0
- package/test/node_modules/ts-latest/lib/lib.es2017.sharedmemory.d.ts +133 -0
- package/test/node_modules/ts-latest/lib/lib.es2017.string.d.ts +43 -0
- package/test/node_modules/ts-latest/lib/lib.es2017.typedarrays.d.ts +51 -0
- package/test/node_modules/ts-latest/lib/lib.es2018.asyncgenerator.d.ts +75 -0
- package/test/node_modules/ts-latest/lib/lib.es2018.asynciterable.d.ts +51 -0
- package/test/node_modules/ts-latest/lib/lib.es2018.d.ts +22 -0
- package/test/node_modules/ts-latest/lib/lib.es2018.full.d.ts +22 -0
- package/test/node_modules/ts-latest/lib/lib.es2018.intl.d.ts +81 -0
- package/test/node_modules/ts-latest/lib/lib.es2018.promise.d.ts +28 -0
- package/test/node_modules/ts-latest/lib/lib.es2018.regexp.d.ts +35 -0
- package/test/node_modules/ts-latest/lib/lib.es2019.array.d.ts +77 -0
- package/test/node_modules/ts-latest/lib/lib.es2019.d.ts +22 -0
- package/test/node_modules/ts-latest/lib/lib.es2019.full.d.ts +22 -0
- package/test/node_modules/ts-latest/lib/lib.es2019.intl.d.ts +21 -0
- package/test/node_modules/ts-latest/lib/lib.es2019.object.d.ts +31 -0
- package/test/node_modules/ts-latest/lib/lib.es2019.string.d.ts +35 -0
- package/test/node_modules/ts-latest/lib/lib.es2019.symbol.d.ts +22 -0
- package/test/node_modules/ts-latest/lib/lib.es2020.bigint.d.ts +763 -0
- package/test/node_modules/ts-latest/lib/lib.es2020.d.ts +25 -0
- package/test/node_modules/ts-latest/lib/lib.es2020.date.d.ts +40 -0
- package/test/node_modules/ts-latest/lib/lib.es2020.full.d.ts +22 -0
- package/test/node_modules/ts-latest/lib/lib.es2020.intl.d.ts +472 -0
- package/test/node_modules/ts-latest/lib/lib.es2020.number.d.ts +26 -0
- package/test/node_modules/ts-latest/lib/lib.es2020.promise.d.ts +45 -0
- package/test/node_modules/ts-latest/lib/lib.es2020.sharedmemory.d.ts +97 -0
- package/test/node_modules/ts-latest/lib/lib.es2020.string.d.ts +42 -0
- package/test/node_modules/ts-latest/lib/lib.es2020.symbol.wellknown.d.ts +39 -0
- package/test/node_modules/ts-latest/lib/lib.es2021.d.ts +21 -0
- package/test/node_modules/ts-latest/lib/lib.es2021.full.d.ts +22 -0
- package/test/node_modules/ts-latest/lib/lib.es2021.intl.d.ts +164 -0
- package/test/node_modules/ts-latest/lib/lib.es2021.promise.d.ts +46 -0
- package/test/node_modules/ts-latest/lib/lib.es2021.string.d.ts +31 -0
- package/test/node_modules/ts-latest/lib/lib.es2021.weakref.d.ts +76 -0
- package/test/node_modules/ts-latest/lib/lib.es2022.array.d.ts +119 -0
- package/test/node_modules/ts-latest/lib/lib.es2022.d.ts +23 -0
- package/test/node_modules/ts-latest/lib/lib.es2022.error.d.ts +73 -0
- package/test/node_modules/ts-latest/lib/lib.es2022.full.d.ts +22 -0
- package/test/node_modules/ts-latest/lib/lib.es2022.intl.d.ts +143 -0
- package/test/node_modules/ts-latest/lib/lib.es2022.object.d.ts +24 -0
- package/test/node_modules/ts-latest/lib/lib.es2022.regexp.d.ts +37 -0
- package/test/node_modules/ts-latest/lib/lib.es2022.string.d.ts +23 -0
- package/test/node_modules/ts-latest/lib/lib.es2023.array.d.ts +922 -0
- package/test/node_modules/ts-latest/lib/lib.es2023.collection.d.ts +19 -0
- package/test/node_modules/ts-latest/lib/lib.es2023.d.ts +20 -0
- package/test/node_modules/ts-latest/lib/lib.es2023.full.d.ts +22 -0
- package/test/node_modules/ts-latest/lib/lib.es2023.intl.d.ts +62 -0
- package/test/node_modules/ts-latest/lib/lib.es2024.arraybuffer.d.ts +63 -0
- package/test/node_modules/ts-latest/lib/lib.es2024.collection.d.ts +27 -0
- package/test/node_modules/ts-latest/lib/lib.es2024.d.ts +24 -0
- package/test/node_modules/ts-latest/lib/lib.es2024.full.d.ts +22 -0
- package/test/node_modules/ts-latest/lib/lib.es2024.object.d.ts +27 -0
- package/test/node_modules/ts-latest/lib/lib.es2024.promise.d.ts +33 -0
- package/test/node_modules/ts-latest/lib/lib.es2024.regexp.d.ts +23 -0
- package/test/node_modules/ts-latest/lib/lib.es2024.sharedmemory.d.ts +66 -0
- package/test/node_modules/ts-latest/lib/lib.es2024.string.d.ts +27 -0
- package/test/node_modules/ts-latest/lib/lib.es2025.collection.d.ts +94 -0
- package/test/node_modules/ts-latest/lib/lib.es2025.d.ts +23 -0
- package/test/node_modules/ts-latest/lib/lib.es2025.float16.d.ts +443 -0
- package/test/node_modules/ts-latest/lib/lib.es2025.full.d.ts +22 -0
- package/test/node_modules/ts-latest/lib/lib.es2025.intl.d.ts +200 -0
- package/test/node_modules/ts-latest/lib/lib.es2025.iterator.d.ts +146 -0
- package/test/node_modules/ts-latest/lib/lib.es2025.promise.d.ts +32 -0
- package/test/node_modules/ts-latest/lib/lib.es2025.regexp.d.ts +30 -0
- package/test/node_modules/ts-latest/lib/lib.es5.d.ts +4599 -0
- package/test/node_modules/ts-latest/lib/lib.es6.d.ts +21 -0
- package/test/node_modules/ts-latest/lib/lib.esnext.array.d.ts +33 -0
- package/test/node_modules/ts-latest/lib/lib.esnext.collection.d.ts +47 -0
- package/test/node_modules/ts-latest/lib/lib.esnext.d.ts +27 -0
- package/test/node_modules/ts-latest/lib/lib.esnext.date.d.ts +21 -0
- package/test/node_modules/ts-latest/lib/lib.esnext.decorators.d.ts +26 -0
- package/test/node_modules/ts-latest/lib/lib.esnext.disposable.d.ts +191 -0
- package/test/node_modules/ts-latest/lib/lib.esnext.error.d.ts +22 -0
- package/test/node_modules/ts-latest/lib/lib.esnext.full.d.ts +22 -0
- package/test/node_modules/ts-latest/lib/lib.esnext.intl.d.ts +107 -0
- package/test/node_modules/ts-latest/lib/lib.esnext.sharedmemory.d.ts +23 -0
- package/test/node_modules/ts-latest/lib/lib.esnext.temporal.d.ts +473 -0
- package/test/node_modules/ts-latest/lib/lib.esnext.typedarrays.d.ts +90 -0
- package/test/node_modules/ts-latest/lib/lib.scripthost.d.ts +320 -0
- package/test/node_modules/ts-latest/lib/lib.webworker.asynciterable.d.ts +18 -0
- package/test/node_modules/ts-latest/lib/lib.webworker.d.ts +14814 -0
- package/test/node_modules/ts-latest/lib/lib.webworker.importscripts.d.ts +21 -0
- package/test/node_modules/ts-latest/lib/lib.webworker.iterable.d.ts +18 -0
- package/test/node_modules/ts-latest/lib/pl/diagnosticMessages.generated.json +2129 -0
- package/test/node_modules/ts-latest/lib/pt-br/diagnosticMessages.generated.json +2129 -0
- package/test/node_modules/ts-latest/lib/ru/diagnosticMessages.generated.json +2125 -0
- package/test/node_modules/ts-latest/lib/tr/diagnosticMessages.generated.json +2129 -0
- package/test/node_modules/ts-latest/lib/tsc.js +8 -0
- package/test/node_modules/ts-latest/lib/tsserver.js +8 -0
- package/test/node_modules/ts-latest/lib/tsserverlibrary.d.ts +17 -0
- package/test/node_modules/ts-latest/lib/tsserverlibrary.js +21 -0
- package/test/node_modules/ts-latest/lib/typesMap.json +497 -0
- package/test/node_modules/ts-latest/lib/typescript.d.ts +11448 -0
- package/test/node_modules/ts-latest/lib/typescript.js +200997 -0
- package/test/node_modules/ts-latest/lib/typingsInstaller.js +8 -0
- package/test/node_modules/ts-latest/lib/watchGuard.js +53 -0
- package/test/node_modules/ts-latest/lib/zh-cn/diagnosticMessages.generated.json +2129 -0
- package/test/node_modules/ts-latest/lib/zh-tw/diagnosticMessages.generated.json +2125 -0
- package/test/node_modules/ts-latest/package.json +119 -0
- package/test/node_modules/ts-node/LICENSE +21 -0
- package/test/node_modules/ts-node/README.md +1442 -0
- package/test/node_modules/ts-node/child-loader.mjs +8 -0
- package/test/node_modules/ts-node/dist/bin-cwd.d.ts +2 -0
- package/test/node_modules/ts-node/dist/bin-cwd.js +6 -0
- package/test/node_modules/ts-node/dist/bin-cwd.js.map +1 -0
- package/test/node_modules/ts-node/dist/bin-esm.d.ts +2 -0
- package/test/node_modules/ts-node/dist/bin-esm.js +6 -0
- package/test/node_modules/ts-node/dist/bin-esm.js.map +1 -0
- package/test/node_modules/ts-node/dist/bin-script-deprecated.d.ts +2 -0
- package/test/node_modules/ts-node/dist/bin-script-deprecated.js +7 -0
- package/test/node_modules/ts-node/dist/bin-script-deprecated.js.map +1 -0
- package/test/node_modules/ts-node/dist/bin-script.d.ts +2 -0
- package/test/node_modules/ts-node/dist/bin-script.js +6 -0
- package/test/node_modules/ts-node/dist/bin-script.js.map +1 -0
- package/test/node_modules/ts-node/dist/bin-transpile.d.ts +2 -0
- package/test/node_modules/ts-node/dist/bin-transpile.js +6 -0
- package/test/node_modules/ts-node/dist/bin-transpile.js.map +1 -0
- package/test/node_modules/ts-node/dist/bin.d.ts +11 -0
- package/test/node_modules/ts-node/dist/bin.js +581 -0
- package/test/node_modules/ts-node/dist/bin.js.map +1 -0
- package/test/node_modules/ts-node/dist/child/argv-payload.d.ts +1 -0
- package/test/node_modules/ts-node/dist/child/argv-payload.js +19 -0
- package/test/node_modules/ts-node/dist/child/argv-payload.js.map +1 -0
- package/test/node_modules/ts-node/dist/child/child-entrypoint.d.ts +1 -0
- package/test/node_modules/ts-node/dist/child/child-entrypoint.js +24 -0
- package/test/node_modules/ts-node/dist/child/child-entrypoint.js.map +1 -0
- package/test/node_modules/ts-node/dist/child/child-loader.d.ts +1 -0
- package/test/node_modules/ts-node/dist/child/child-loader.js +32 -0
- package/test/node_modules/ts-node/dist/child/child-loader.js.map +1 -0
- package/test/node_modules/ts-node/dist/child/child-require.d.ts +7 -0
- package/test/node_modules/ts-node/dist/child/child-require.js +22 -0
- package/test/node_modules/ts-node/dist/child/child-require.js.map +1 -0
- package/test/node_modules/ts-node/dist/child/spawn-child.d.ts +1 -0
- package/test/node_modules/ts-node/dist/child/spawn-child.js +49 -0
- package/test/node_modules/ts-node/dist/child/spawn-child.js.map +1 -0
- package/test/node_modules/ts-node/dist/cjs-resolve-hooks.d.ts +1 -0
- package/test/node_modules/ts-node/dist/cjs-resolve-hooks.js +29 -0
- package/test/node_modules/ts-node/dist/cjs-resolve-hooks.js.map +1 -0
- package/test/node_modules/ts-node/dist/configuration.d.ts +1 -0
- package/test/node_modules/ts-node/dist/configuration.js +308 -0
- package/test/node_modules/ts-node/dist/configuration.js.map +1 -0
- package/test/node_modules/ts-node/dist/esm.d.ts +53 -0
- package/test/node_modules/ts-node/dist/esm.js +228 -0
- package/test/node_modules/ts-node/dist/esm.js.map +1 -0
- package/test/node_modules/ts-node/dist/file-extensions.d.ts +1 -0
- package/test/node_modules/ts-node/dist/file-extensions.js +133 -0
- package/test/node_modules/ts-node/dist/file-extensions.js.map +1 -0
- package/test/node_modules/ts-node/dist/index.d.ts +332 -0
- package/test/node_modules/ts-node/dist/index.js +953 -0
- package/test/node_modules/ts-node/dist/index.js.map +1 -0
- package/test/node_modules/ts-node/dist/module-type-classifier.d.ts +1 -0
- package/test/node_modules/ts-node/dist/module-type-classifier.js +64 -0
- package/test/node_modules/ts-node/dist/module-type-classifier.js.map +1 -0
- package/test/node_modules/ts-node/dist/node-module-type-classifier.d.ts +1 -0
- package/test/node_modules/ts-node/dist/node-module-type-classifier.js +39 -0
- package/test/node_modules/ts-node/dist/node-module-type-classifier.js.map +1 -0
- package/test/node_modules/ts-node/dist/repl.d.ts +78 -0
- package/test/node_modules/ts-node/dist/repl.js +561 -0
- package/test/node_modules/ts-node/dist/repl.js.map +1 -0
- package/test/node_modules/ts-node/dist/resolver-functions.d.ts +1 -0
- package/test/node_modules/ts-node/dist/resolver-functions.js +143 -0
- package/test/node_modules/ts-node/dist/resolver-functions.js.map +1 -0
- package/test/node_modules/ts-node/dist/transpilers/swc.d.ts +11 -0
- package/test/node_modules/ts-node/dist/transpilers/swc.js +218 -0
- package/test/node_modules/ts-node/dist/transpilers/swc.js.map +1 -0
- package/test/node_modules/ts-node/dist/transpilers/types.d.ts +35 -0
- package/test/node_modules/ts-node/dist/transpilers/types.js +3 -0
- package/test/node_modules/ts-node/dist/transpilers/types.js.map +1 -0
- package/test/node_modules/ts-node/dist/ts-compiler-types.d.ts +63 -0
- package/test/node_modules/ts-node/dist/ts-compiler-types.js +3 -0
- package/test/node_modules/ts-node/dist/ts-compiler-types.js.map +1 -0
- package/test/node_modules/ts-node/dist/ts-internals.d.ts +6 -0
- package/test/node_modules/ts-node/dist/ts-internals.js +321 -0
- package/test/node_modules/ts-node/dist/ts-internals.js.map +1 -0
- package/test/node_modules/ts-node/dist/ts-transpile-module.d.ts +1 -0
- package/test/node_modules/ts-node/dist/ts-transpile-module.js +100 -0
- package/test/node_modules/ts-node/dist/ts-transpile-module.js.map +1 -0
- package/test/node_modules/ts-node/dist/tsconfig-schema.d.ts +13 -0
- package/test/node_modules/ts-node/dist/tsconfig-schema.js +3 -0
- package/test/node_modules/ts-node/dist/tsconfig-schema.js.map +1 -0
- package/test/node_modules/ts-node/dist/tsconfigs.d.ts +1 -0
- package/test/node_modules/ts-node/dist/tsconfigs.js +36 -0
- package/test/node_modules/ts-node/dist/tsconfigs.js.map +1 -0
- package/test/node_modules/ts-node/dist/util.d.ts +4 -0
- package/test/node_modules/ts-node/dist/util.js +175 -0
- package/test/node_modules/ts-node/dist/util.js.map +1 -0
- package/test/node_modules/ts-node/dist-raw/NODE-LICENSE.md +24 -0
- package/test/node_modules/ts-node/dist-raw/README.md +36 -0
- package/test/node_modules/ts-node/dist-raw/node-internal-constants.js +4 -0
- package/test/node_modules/ts-node/dist-raw/node-internal-errors.js +82 -0
- package/test/node_modules/ts-node/dist-raw/node-internal-modules-cjs-helpers.js +89 -0
- package/test/node_modules/ts-node/dist-raw/node-internal-modules-cjs-loader.js +593 -0
- package/test/node_modules/ts-node/dist-raw/node-internal-modules-esm-get_format.js +106 -0
- package/test/node_modules/ts-node/dist-raw/node-internal-modules-esm-resolve.js +962 -0
- package/test/node_modules/ts-node/dist-raw/node-internal-modules-package_json_reader.js +44 -0
- package/test/node_modules/ts-node/dist-raw/node-internal-repl-await.js +254 -0
- package/test/node_modules/ts-node/dist-raw/node-internalBinding-fs.js +58 -0
- package/test/node_modules/ts-node/dist-raw/node-nativemodule.js +9 -0
- package/test/node_modules/ts-node/dist-raw/node-options.js +103 -0
- package/test/node_modules/ts-node/dist-raw/node-primordials.js +37 -0
- package/test/node_modules/ts-node/dist-raw/runmain-hack.js +9 -0
- package/test/node_modules/ts-node/esm/transpile-only.mjs +8 -0
- package/test/node_modules/ts-node/esm.mjs +8 -0
- package/test/node_modules/ts-node/node10/tsconfig.json +3 -0
- package/test/node_modules/ts-node/node12/tsconfig.json +3 -0
- package/test/node_modules/ts-node/node14/tsconfig.json +3 -0
- package/test/node_modules/ts-node/node16/tsconfig.json +3 -0
- package/test/node_modules/ts-node/node_modules/.bin/acorn +15 -0
- package/test/node_modules/ts-node/node_modules/.bin/acorn.cmd +7 -0
- package/test/node_modules/ts-node/package.json +182 -0
- package/test/node_modules/ts-node/register/files.js +3 -0
- package/test/node_modules/ts-node/register/index.js +1 -0
- package/test/node_modules/ts-node/register/transpile-only.js +3 -0
- package/test/node_modules/ts-node/register/type-check.js +3 -0
- package/test/node_modules/ts-node/transpilers/swc-experimental.js +1 -0
- package/test/node_modules/ts-node/transpilers/swc.js +1 -0
- package/test/node_modules/ts-node/tsconfig.schema.json +183 -0
- package/test/node_modules/ts-node/tsconfig.schemastore-schema.json +1326 -0
- package/test/node_modules/tsconfig-paths/CHANGELOG.md +407 -0
- package/test/node_modules/tsconfig-paths/LICENSE +21 -0
- package/test/node_modules/tsconfig-paths/README.md +269 -0
- package/test/node_modules/tsconfig-paths/lib/__tests__/config-loader.test.d.ts +1 -0
- package/test/node_modules/tsconfig-paths/lib/__tests__/config-loader.test.js +87 -0
- package/test/node_modules/tsconfig-paths/lib/__tests__/config-loader.test.js.map +1 -0
- package/test/node_modules/tsconfig-paths/lib/__tests__/data/match-path-data.d.ts +17 -0
- package/test/node_modules/tsconfig-paths/lib/__tests__/data/match-path-data.js +216 -0
- package/test/node_modules/tsconfig-paths/lib/__tests__/data/match-path-data.js.map +1 -0
- package/test/node_modules/tsconfig-paths/lib/__tests__/filesystem.test.d.ts +1 -0
- package/test/node_modules/tsconfig-paths/lib/__tests__/filesystem.test.js +56 -0
- package/test/node_modules/tsconfig-paths/lib/__tests__/filesystem.test.js.map +1 -0
- package/test/node_modules/tsconfig-paths/lib/__tests__/mapping-entry.test.d.ts +1 -0
- package/test/node_modules/tsconfig-paths/lib/__tests__/mapping-entry.test.js +39 -0
- package/test/node_modules/tsconfig-paths/lib/__tests__/mapping-entry.test.js.map +1 -0
- package/test/node_modules/tsconfig-paths/lib/__tests__/match-path-async.test.d.ts +1 -0
- package/test/node_modules/tsconfig-paths/lib/__tests__/match-path-async.test.js +18 -0
- package/test/node_modules/tsconfig-paths/lib/__tests__/match-path-async.test.js.map +1 -0
- package/test/node_modules/tsconfig-paths/lib/__tests__/match-path-sync.test.d.ts +1 -0
- package/test/node_modules/tsconfig-paths/lib/__tests__/match-path-sync.test.js +14 -0
- package/test/node_modules/tsconfig-paths/lib/__tests__/match-path-sync.test.js.map +1 -0
- package/test/node_modules/tsconfig-paths/lib/__tests__/try-path.test.d.ts +1 -0
- package/test/node_modules/tsconfig-paths/lib/__tests__/try-path.test.js +124 -0
- package/test/node_modules/tsconfig-paths/lib/__tests__/try-path.test.js.map +1 -0
- package/test/node_modules/tsconfig-paths/lib/__tests__/tsconfig-loader.test.d.ts +1 -0
- package/test/node_modules/tsconfig-paths/lib/__tests__/tsconfig-loader.test.js +328 -0
- package/test/node_modules/tsconfig-paths/lib/__tests__/tsconfig-loader.test.js.map +1 -0
- package/test/node_modules/tsconfig-paths/lib/config-loader.d.ts +33 -0
- package/test/node_modules/tsconfig-paths/lib/config-loader.js +48 -0
- package/test/node_modules/tsconfig-paths/lib/config-loader.js.map +1 -0
- package/test/node_modules/tsconfig-paths/lib/filesystem.d.ts +34 -0
- package/test/node_modules/tsconfig-paths/lib/filesystem.js +61 -0
- package/test/node_modules/tsconfig-paths/lib/filesystem.js.map +1 -0
- package/test/node_modules/tsconfig-paths/lib/index.d.ts +5 -0
- package/test/node_modules/tsconfig-paths/lib/index.js +15 -0
- package/test/node_modules/tsconfig-paths/lib/index.js.map +1 -0
- package/test/node_modules/tsconfig-paths/lib/mapping-entry.d.ts +18 -0
- package/test/node_modules/tsconfig-paths/lib/mapping-entry.js +54 -0
- package/test/node_modules/tsconfig-paths/lib/mapping-entry.js.map +1 -0
- package/test/node_modules/tsconfig-paths/lib/match-path-async.d.ts +21 -0
- package/test/node_modules/tsconfig-paths/lib/match-path-async.js +116 -0
- package/test/node_modules/tsconfig-paths/lib/match-path-async.js.map +1 -0
- package/test/node_modules/tsconfig-paths/lib/match-path-sync.d.ts +32 -0
- package/test/node_modules/tsconfig-paths/lib/match-path-sync.js +91 -0
- package/test/node_modules/tsconfig-paths/lib/match-path-sync.js.map +1 -0
- package/test/node_modules/tsconfig-paths/lib/register.d.ts +12 -0
- package/test/node_modules/tsconfig-paths/lib/register.js +112 -0
- package/test/node_modules/tsconfig-paths/lib/register.js.map +1 -0
- package/test/node_modules/tsconfig-paths/lib/try-path.d.ts +15 -0
- package/test/node_modules/tsconfig-paths/lib/try-path.js +91 -0
- package/test/node_modules/tsconfig-paths/lib/try-path.js.map +1 -0
- package/test/node_modules/tsconfig-paths/lib/tsconfig-loader.d.ts +28 -0
- package/test/node_modules/tsconfig-paths/lib/tsconfig-loader.js +148 -0
- package/test/node_modules/tsconfig-paths/lib/tsconfig-loader.js.map +1 -0
- package/test/node_modules/tsconfig-paths/node_modules/.bin/json5 +15 -0
- package/test/node_modules/tsconfig-paths/node_modules/.bin/json5.cmd +7 -0
- package/test/node_modules/tsconfig-paths/package.json +74 -0
- package/test/node_modules/tsconfig-paths/register.js +1 -0
- package/test/node_modules/tsconfig-paths/src/__tests__/config-loader.test.ts +101 -0
- package/test/node_modules/tsconfig-paths/src/__tests__/data/match-path-data.ts +230 -0
- package/test/node_modules/tsconfig-paths/src/__tests__/filesystem.test.ts +57 -0
- package/test/node_modules/tsconfig-paths/src/__tests__/mapping-entry.test.ts +43 -0
- package/test/node_modules/tsconfig-paths/src/__tests__/match-path-async.test.ts +26 -0
- package/test/node_modules/tsconfig-paths/src/__tests__/match-path-sync.test.ts +22 -0
- package/test/node_modules/tsconfig-paths/src/__tests__/try-path.test.ts +141 -0
- package/test/node_modules/tsconfig-paths/src/__tests__/tsconfig-loader.test.ts +428 -0
- package/test/node_modules/tsconfig-paths/src/__tests__/tsconfig-named.json +10 -0
- package/test/node_modules/tsconfig-paths/src/config-loader.ts +89 -0
- package/test/node_modules/tsconfig-paths/src/filesystem.ts +93 -0
- package/test/node_modules/tsconfig-paths/src/index.ts +24 -0
- package/test/node_modules/tsconfig-paths/src/mapping-entry.ts +65 -0
- package/test/node_modules/tsconfig-paths/src/match-path-async.ts +223 -0
- package/test/node_modules/tsconfig-paths/src/match-path-sync.ts +146 -0
- package/test/node_modules/tsconfig-paths/src/register.ts +123 -0
- package/test/node_modules/tsconfig-paths/src/try-path.ts +103 -0
- package/test/node_modules/tsconfig-paths/src/tsconfig-loader.ts +229 -0
- package/test/node_modules/undici-types/LICENSE +21 -0
- package/test/node_modules/undici-types/README.md +6 -0
- package/test/node_modules/undici-types/agent.d.ts +32 -0
- package/test/node_modules/undici-types/api.d.ts +43 -0
- package/test/node_modules/undici-types/balanced-pool.d.ts +30 -0
- package/test/node_modules/undici-types/cache-interceptor.d.ts +173 -0
- package/test/node_modules/undici-types/cache.d.ts +36 -0
- package/test/node_modules/undici-types/client-stats.d.ts +15 -0
- package/test/node_modules/undici-types/client.d.ts +108 -0
- package/test/node_modules/undici-types/connector.d.ts +34 -0
- package/test/node_modules/undici-types/content-type.d.ts +21 -0
- package/test/node_modules/undici-types/cookies.d.ts +30 -0
- package/test/node_modules/undici-types/diagnostics-channel.d.ts +74 -0
- package/test/node_modules/undici-types/dispatcher.d.ts +276 -0
- package/test/node_modules/undici-types/env-http-proxy-agent.d.ts +22 -0
- package/test/node_modules/undici-types/errors.d.ts +161 -0
- package/test/node_modules/undici-types/eventsource.d.ts +66 -0
- package/test/node_modules/undici-types/fetch.d.ts +211 -0
- package/test/node_modules/undici-types/formdata.d.ts +108 -0
- package/test/node_modules/undici-types/global-dispatcher.d.ts +9 -0
- package/test/node_modules/undici-types/global-origin.d.ts +7 -0
- package/test/node_modules/undici-types/h2c-client.d.ts +73 -0
- package/test/node_modules/undici-types/handlers.d.ts +15 -0
- package/test/node_modules/undici-types/header.d.ts +160 -0
- package/test/node_modules/undici-types/index.d.ts +88 -0
- package/test/node_modules/undici-types/interceptors.d.ts +73 -0
- package/test/node_modules/undici-types/mock-agent.d.ts +68 -0
- package/test/node_modules/undici-types/mock-call-history.d.ts +111 -0
- package/test/node_modules/undici-types/mock-client.d.ts +27 -0
- package/test/node_modules/undici-types/mock-errors.d.ts +12 -0
- package/test/node_modules/undici-types/mock-interceptor.d.ts +94 -0
- package/test/node_modules/undici-types/mock-pool.d.ts +27 -0
- package/test/node_modules/undici-types/package.json +55 -0
- package/test/node_modules/undici-types/patch.d.ts +29 -0
- package/test/node_modules/undici-types/pool-stats.d.ts +19 -0
- package/test/node_modules/undici-types/pool.d.ts +41 -0
- package/test/node_modules/undici-types/proxy-agent.d.ts +29 -0
- package/test/node_modules/undici-types/readable.d.ts +68 -0
- package/test/node_modules/undici-types/retry-agent.d.ts +8 -0
- package/test/node_modules/undici-types/retry-handler.d.ts +125 -0
- package/test/node_modules/undici-types/round-robin-pool.d.ts +41 -0
- package/test/node_modules/undici-types/snapshot-agent.d.ts +109 -0
- package/test/node_modules/undici-types/util.d.ts +18 -0
- package/test/node_modules/undici-types/utility.d.ts +7 -0
- package/test/node_modules/undici-types/webidl.d.ts +341 -0
- package/test/node_modules/undici-types/websocket.d.ts +186 -0
- package/test/node_modules/universalify/LICENSE +20 -0
- package/test/node_modules/universalify/README.md +76 -0
- package/test/node_modules/universalify/index.js +24 -0
- package/test/node_modules/universalify/package.json +34 -0
- package/test/node_modules/v8-compile-cache-lib/CHANGELOG.md +53 -0
- package/test/node_modules/v8-compile-cache-lib/LICENSE +21 -0
- package/test/node_modules/v8-compile-cache-lib/README.md +60 -0
- package/test/node_modules/v8-compile-cache-lib/package.json +35 -0
- package/test/node_modules/v8-compile-cache-lib/v8-compile-cache.d.ts +7 -0
- package/test/node_modules/v8-compile-cache-lib/v8-compile-cache.js +391 -0
- package/test/node_modules/which/LICENSE +15 -0
- package/test/node_modules/which/README.md +51 -0
- package/test/node_modules/which/bin/which.js +52 -0
- package/test/node_modules/which/lib/index.js +111 -0
- package/test/node_modules/which/package.json +57 -0
- package/test/node_modules/yn/index.d.ts +65 -0
- package/test/node_modules/yn/index.js +33 -0
- package/test/node_modules/yn/lenient.js +105 -0
- package/test/node_modules/yn/license +9 -0
- package/test/node_modules/yn/package.json +42 -0
- package/test/node_modules/yn/readme.md +83 -0
- package/test/package.json +14 -0
- package/test/src/cleanup.ts +10 -0
- package/test/src/config.ts +35 -0
- package/test/src/perf.ts +110 -0
- package/test/src/prepare.ts +10 -0
- package/test/src/project.ts +134 -0
- package/test/src/utils/general.ts +8 -0
- package/test/tests/actions.test.ts +274 -0
- package/test/tests/package-config.test.ts +40 -0
- package/test/tests/path-mapping.test.ts +47 -0
- package/test/tests/transformer.test.ts +44 -0
- package/test/tests/webpack.test.ts +71 -0
- package/test/tsconfig.json +12 -0
- package/tsconfig.base.json +21 -0
- package/actions/check.js +0 -45
- package/actions/check.js.map +0 -1
- package/actions/patch.js +0 -82
- package/actions/patch.js.map +0 -1
- package/actions/unpatch.js +0 -82
- package/actions/unpatch.js.map +0 -1
- package/bin/ts-patch.js +0 -33
- package/bin/ts-patch.js.map +0 -1
- package/cli/cli.js +0 -96
- package/cli/cli.js.map +0 -1
- package/cli/commands.js +0 -49
- package/cli/commands.js.map +0 -1
- package/config.js +0 -50
- package/config.js.map +0 -1
- package/module/module-file.d.ts +0 -9
- package/module/module-file.js +0 -97
- package/module/module-file.js.map +0 -1
- package/module/ts-module.d.ts +0 -35
- package/module/ts-module.js +0 -100
- package/module/ts-module.js.map +0 -1
- package/patch/get-patched-source.js +0 -69
- package/patch/get-patched-source.js.map +0 -1
- package/patch/transformers/fix-ts-early-return.js +0 -51
- package/patch/transformers/fix-ts-early-return.js.map +0 -1
- package/resources/module-patch.js +0 -609
- package/system/cache.js +0 -69
- package/system/cache.js.map +0 -1
- package/tsconfig.tsbuildinfo +0 -1
- package/utils/file-utils.js +0 -98
- package/utils/file-utils.js.map +0 -1
- /package/{actions → dist/actions}/check.d.ts +0 -0
- /package/{actions → dist/actions}/index.d.ts +0 -0
- /package/{actions → dist/actions}/index.js +0 -0
- /package/{actions → dist/actions}/index.js.map +0 -0
- /package/{actions → dist/actions}/install.d.ts +0 -0
- /package/{actions → dist/actions}/install.js +0 -0
- /package/{actions → dist/actions}/install.js.map +0 -0
- /package/{actions → dist/actions}/patch.d.ts +0 -0
- /package/{actions → dist/actions}/uninstall.d.ts +0 -0
- /package/{actions → dist/actions}/uninstall.js +0 -0
- /package/{actions → dist/actions}/uninstall.js.map +0 -0
- /package/{actions → dist/actions}/unpatch.d.ts +0 -0
- /package/{bin → dist/bin}/ts-patch.d.ts +0 -0
- /package/{bin → dist/bin}/tspc.d.ts +0 -0
- /package/{bin → dist/bin}/tspc.js +0 -0
- /package/{bin → dist/bin}/tspc.js.map +0 -0
- /package/{cli → dist/cli}/cli.d.ts +0 -0
- /package/{cli → dist/cli}/commands.d.ts +0 -0
- /package/{cli → dist/cli}/help-menu.d.ts +0 -0
- /package/{cli → dist/cli}/help-menu.js +0 -0
- /package/{cli → dist/cli}/help-menu.js.map +0 -0
- /package/{cli → dist/cli}/options.d.ts +0 -0
- /package/{cli → dist/cli}/options.js +0 -0
- /package/{cli → dist/cli}/options.js.map +0 -0
- /package/{compiler → dist/compiler}/package.json +0 -0
- /package/{compiler → dist/compiler}/tsc.js +0 -0
- /package/{compiler → dist/compiler}/tsserver.js +0 -0
- /package/{compiler → dist/compiler}/tsserverlibrary.js +0 -0
- /package/{compiler → dist/compiler}/typescript.js +0 -0
- /package/{config.d.ts → dist/config.d.ts} +0 -0
- /package/{index.d.ts → dist/index.d.ts} +0 -0
- /package/{index.js → dist/index.js} +0 -0
- /package/{index.js.map → dist/index.js.map} +0 -0
- /package/{module → dist/module}/get-live-module.d.ts +0 -0
- /package/{module → dist/module}/get-live-module.js +0 -0
- /package/{module → dist/module}/get-live-module.js.map +0 -0
- /package/{module → dist/module}/index.d.ts +0 -0
- /package/{module → dist/module}/index.js +0 -0
- /package/{module → dist/module}/index.js.map +0 -0
- /package/{module → dist/module}/module-source.d.ts +0 -0
- /package/{module → dist/module}/module-source.js +0 -0
- /package/{module → dist/module}/module-source.js.map +0 -0
- /package/{module → dist/module}/source-section.d.ts +0 -0
- /package/{module → dist/module}/source-section.js +0 -0
- /package/{module → dist/module}/source-section.js.map +0 -0
- /package/{options.d.ts → dist/options.d.ts} +0 -0
- /package/{options.js → dist/options.js} +0 -0
- /package/{options.js.map → dist/options.js.map} +0 -0
- /package/{patch → dist/patch}/get-patched-source.d.ts +0 -0
- /package/{patch → dist/patch}/patch-detail.d.ts +0 -0
- /package/{patch → dist/patch}/patch-detail.js +0 -0
- /package/{patch → dist/patch}/patch-detail.js.map +0 -0
- /package/{patch → dist/patch}/patch-module.d.ts +0 -0
- /package/{patch → dist/patch}/patch-module.js +0 -0
- /package/{patch → dist/patch}/patch-module.js.map +0 -0
- /package/{patch → dist/patch}/transformers/add-original-create-program.d.ts +0 -0
- /package/{patch → dist/patch}/transformers/add-original-create-program.js +0 -0
- /package/{patch → dist/patch}/transformers/add-original-create-program.js.map +0 -0
- /package/{patch → dist/patch}/transformers/fix-ts-early-return.d.ts +0 -0
- /package/{patch → dist/patch}/transformers/hook-tsc-exec.d.ts +0 -0
- /package/{patch → dist/patch}/transformers/hook-tsc-exec.js +0 -0
- /package/{patch → dist/patch}/transformers/hook-tsc-exec.js.map +0 -0
- /package/{patch → dist/patch}/transformers/index.d.ts +0 -0
- /package/{patch → dist/patch}/transformers/index.js +0 -0
- /package/{patch → dist/patch}/transformers/index.js.map +0 -0
- /package/{patch → dist/patch}/transformers/merge-statements.d.ts +0 -0
- /package/{patch → dist/patch}/transformers/merge-statements.js +0 -0
- /package/{patch → dist/patch}/transformers/merge-statements.js.map +0 -0
- /package/{patch → dist/patch}/transformers/patch-create-program.d.ts +0 -0
- /package/{patch → dist/patch}/transformers/patch-create-program.js +0 -0
- /package/{patch → dist/patch}/transformers/patch-create-program.js.map +0 -0
- /package/{patch → dist/patch}/transformers/patch-emitter.d.ts +0 -0
- /package/{patch → dist/patch}/transformers/patch-emitter.js +0 -0
- /package/{patch → dist/patch}/transformers/patch-emitter.js.map +0 -0
- /package/{plugin-types.d.ts → dist/plugin-types.d.ts} +0 -0
- /package/{plugin-types.js → dist/plugin-types.js} +0 -0
- /package/{plugin-types.js.map → dist/plugin-types.js.map} +0 -0
- /package/{resources → dist/resources}/module-patch.d.ts +0 -0
- /package/{slice → dist/slice}/module-slice.d.ts +0 -0
- /package/{slice → dist/slice}/module-slice.js +0 -0
- /package/{slice → dist/slice}/module-slice.js.map +0 -0
- /package/{slice → dist/slice}/ts54.d.ts +0 -0
- /package/{slice → dist/slice}/ts54.js +0 -0
- /package/{slice → dist/slice}/ts54.js.map +0 -0
- /package/{slice → dist/slice}/ts55.d.ts +0 -0
- /package/{slice → dist/slice}/ts55.js +0 -0
- /package/{slice → dist/slice}/ts55.js.map +0 -0
- /package/{slice → dist/slice}/ts552.d.ts +0 -0
- /package/{slice → dist/slice}/ts552.js +0 -0
- /package/{slice → dist/slice}/ts552.js.map +0 -0
- /package/{system → dist/system}/cache.d.ts +0 -0
- /package/{system → dist/system}/errors.d.ts +0 -0
- /package/{system → dist/system}/errors.js +0 -0
- /package/{system → dist/system}/errors.js.map +0 -0
- /package/{system → dist/system}/index.d.ts +0 -0
- /package/{system → dist/system}/index.js +0 -0
- /package/{system → dist/system}/index.js.map +0 -0
- /package/{system → dist/system}/logger.d.ts +0 -0
- /package/{system → dist/system}/logger.js +0 -0
- /package/{system → dist/system}/logger.js.map +0 -0
- /package/{system → dist/system}/types.d.ts +0 -0
- /package/{system → dist/system}/types.js +0 -0
- /package/{system → dist/system}/types.js.map +0 -0
- /package/{ts-package.d.ts → dist/ts-package.d.ts} +0 -0
- /package/{ts-package.js → dist/ts-package.js} +0 -0
- /package/{ts-package.js.map → dist/ts-package.js.map} +0 -0
- /package/{utils → dist/utils}/file-utils.d.ts +0 -0
- /package/{utils → dist/utils}/find-cache-dir.d.ts +0 -0
- /package/{utils → dist/utils}/find-cache-dir.js +0 -0
- /package/{utils → dist/utils}/find-cache-dir.js.map +0 -0
- /package/{utils → dist/utils}/general.d.ts +0 -0
- /package/{utils → dist/utils}/general.js +0 -0
- /package/{utils → dist/utils}/general.js.map +0 -0
- /package/{utils → dist/utils}/index.d.ts +0 -0
- /package/{utils → dist/utils}/index.js +0 -0
- /package/{utils → dist/utils}/index.js.map +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"esm.js","sourceRoot":"","sources":["../src/esm.ts"],"names":[],"mappings":";;;AAAA,mCAA6D;AAC7D,6BAMa;AACb,+BAA+B;AAC/B,iCAAiC;AACjC,iCAAwD;AACxD,mCAAuC;AAsFvC,2FAA2F;AAC3F,MAAM,WAAW,GAAG,IAAA,mBAAY,EAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;AAEnE,gBAAgB;AAChB,SAAgB,uBAAuB,CACrC,KAAgD;IAEhD,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,eAAe,EAAE,GAAG,KAAK,CAAC;IAC5D,6DAA6D;IAC7D,MAAM,QAAQ,GAA8C,WAAW;QACrE,CAAC,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,SAAS,EAAE,eAAe,EAAE,SAAS,EAAE;QACrE,CAAC,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;IAC7D,OAAO,QAAQ,CAAC;AAClB,CAAC;AATD,0DASC;AAED,gBAAgB;AAChB,SAAgB,yBAAyB,CAAC,IAAsB;IAC9D,sEAAsE;IACtE,MAAM,cAAc,GAAG,IAAA,gBAAQ,EAAC,IAAI,CAAC,CAAC;IAEtC,OAAO,cAAc,CAAC,cAAc,CAAC,CAAC;AACxC,CAAC;AALD,8DAKC;AAED,SAAgB,cAAc,CAAC,aAAsB;IACnD,aAAa,CAAC,kCAAkC,EAAE,CAAC;IAEnD,yGAAyG;IACzG,MAAM,yBAAyB,GAAG,aAAa,CAAC,kBAAkB,EAAE,CAAC;IACrE,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AC,MAAM,EAAE,OAAO,EAAE,sBAAsB,CAAC,CAAC;QAElE,MAAM,cAAc,GAClB,OAAO,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;QAEhE,MAAM,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC;QACxB,MAAM,MAAM,GAAG,IAAA,WAAQ,EAAC,GAAG,CAAC,CAAC;QAE7B,IAAI,CAAC,6BAA6B,CAAC,MAAM,CAAC,EAAE;YAC1C,OAAO,KAAK,EAAE,CAAC;SAChB;QACD,MAAM,UAAU,GAAG,IAAA,mBAAa,EAAC,GAAG,CAAC,CAAC;QAEtC,IAAI,aAAa,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE;YACrC,OAAO,KAAK,EAAE,CAAC;SAChB;QAED,MAAM,SAAS,GAAG,aAAa,CAAC,OAAO,CAAC,cAAc,EAAE,UAAU,CAAC,CAAC;QAEpE,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC;IAC/B,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC;AA7RD,wCA6RC;AAED,KAAK,UAAU,mBAAmB,CAAI,EAAoB;IACxD,MAAM,GAAG,GAAG,MAAM,EAAE,EAAE,CAAC;IACvB,yEAAyE;IACzE,IAAI,GAAG,IAAI,IAAI;QAAE,OAAO,GAAG,CAAC;IAC5B,OAAO;QACL,GAAG,GAAG;QACN,YAAY,EAAE,IAAI;KACnB,CAAC;AACJ,CAAC","sourcesContent":["import { register, RegisterOptions, Service } from './index';\nimport {\n parse as parseUrl,\n format as formatUrl,\n UrlWithStringQuery,\n fileURLToPath,\n pathToFileURL,\n} from 'url';\nimport { extname } from 'path';\nimport * as assert from 'assert';\nimport { normalizeSlashes, versionGteLt } from './util';\nimport { createRequire } from 'module';\n\n// Note: On Windows, URLs look like this: file:///D:/dev/@TypeStrong/ts-node-examples/foo.ts\n\n// NOTE ABOUT MULTIPLE EXPERIMENTAL LOADER APIS\n//\n// At the time of writing, this file implements 2x different loader APIs.\n// Node made a breaking change to the loader API in https://github.com/nodejs/node/pull/37468\n//\n// We check the node version number and export either the *old* or the *new* API.\n//\n// Today, we are implementing the *new* API on top of our implementation of the *old* API,\n// which relies on copy-pasted code from the *old* hooks implementation in node.\n//\n// In the future, we will likely invert this: we will copy-paste the *new* API implementation\n// from node, build our implementation of the *new* API on top of it, and implement the *old*\n// hooks API as a shim to the *new* API.\n\nexport interface NodeLoaderHooksAPI1 {\n resolve: NodeLoaderHooksAPI1.ResolveHook;\n getFormat: NodeLoaderHooksAPI1.GetFormatHook;\n transformSource: NodeLoaderHooksAPI1.TransformSourceHook;\n}\nexport namespace NodeLoaderHooksAPI1 {\n export type ResolveHook = NodeLoaderHooksAPI2.ResolveHook;\n export type GetFormatHook = (\n url: string,\n context: {},\n defaultGetFormat: GetFormatHook\n ) => Promise<{ format: NodeLoaderHooksFormat }>;\n export type TransformSourceHook = (\n source: string | Buffer,\n context: { url: string; format: NodeLoaderHooksFormat },\n defaultTransformSource: NodeLoaderHooksAPI1.TransformSourceHook\n ) => Promise<{ source: string | Buffer }>;\n}\n\nexport interface NodeLoaderHooksAPI2 {\n resolve: NodeLoaderHooksAPI2.ResolveHook;\n load: NodeLoaderHooksAPI2.LoadHook;\n}\nexport namespace NodeLoaderHooksAPI2 {\n export type ResolveHook = (\n specifier: string,\n context: {\n conditions?: NodeImportConditions;\n importAssertions?: NodeImportAssertions;\n parentURL: string;\n },\n defaultResolve: ResolveHook\n ) => Promise<{\n url: string;\n format?: NodeLoaderHooksFormat;\n shortCircuit?: boolean;\n }>;\n export type LoadHook = (\n url: string,\n context: {\n format: NodeLoaderHooksFormat | null | undefined;\n importAssertions?: NodeImportAssertions;\n },\n defaultLoad: NodeLoaderHooksAPI2['load']\n ) => Promise<{\n format: NodeLoaderHooksFormat;\n source: string | Buffer | undefined;\n shortCircuit?: boolean;\n }>;\n export type NodeImportConditions = unknown;\n export interface NodeImportAssertions {\n type?: 'json';\n }\n}\n\nexport type NodeLoaderHooksFormat =\n | 'builtin'\n | 'commonjs'\n | 'dynamic'\n | 'json'\n | 'module'\n | 'wasm';\n\nexport type NodeImportConditions = unknown;\nexport interface NodeImportAssertions {\n type?: 'json';\n}\n\n// The hooks API changed in node version X so we need to check for backwards compatibility.\nconst newHooksAPI = versionGteLt(process.versions.node, '16.12.0');\n\n/** @internal */\nexport function filterHooksByAPIVersion(\n hooks: NodeLoaderHooksAPI1 & NodeLoaderHooksAPI2\n): NodeLoaderHooksAPI1 | NodeLoaderHooksAPI2 {\n const { getFormat, load, resolve, transformSource } = hooks;\n // Explicit return type to avoid TS's non-ideal inferred type\n const hooksAPI: NodeLoaderHooksAPI1 | NodeLoaderHooksAPI2 = newHooksAPI\n ? { resolve, load, getFormat: undefined, transformSource: undefined }\n : { resolve, getFormat, transformSource, load: undefined };\n return hooksAPI;\n}\n\n/** @internal */\nexport function registerAndCreateEsmHooks(opts?: RegisterOptions) {\n // Automatically performs registration just like `-r ts-node/register`\n const tsNodeInstance = register(opts);\n\n return createEsmHooks(tsNodeInstance);\n}\n\nexport function createEsmHooks(tsNodeService: Service) {\n tsNodeService.enableExperimentalEsmLoaderInterop();\n\n // Custom implementation that considers additional file extensions and automatically adds file extensions\n const nodeResolveImplementation = tsNodeService.getNodeEsmResolver();\n const nodeGetFormatImplementation = tsNodeService.getNodeEsmGetFormat();\n const extensions = tsNodeService.extensions;\n\n const hooksAPI = filterHooksByAPIVersion({\n resolve,\n load,\n getFormat,\n transformSource,\n });\n\n function isFileUrlOrNodeStyleSpecifier(parsed: UrlWithStringQuery) {\n // We only understand file:// URLs, but in node, the specifier can be a node-style `./foo` or `foo`\n const { protocol } = parsed;\n return protocol === null || protocol === 'file:';\n }\n\n /**\n * Named \"probably\" as a reminder that this is a guess.\n * node does not explicitly tell us if we're resolving the entrypoint or not.\n */\n function isProbablyEntrypoint(specifier: string, parentURL: string) {\n return parentURL === undefined && specifier.startsWith('file://');\n }\n // Side-channel between `resolve()` and `load()` hooks\n const rememberIsProbablyEntrypoint = new Set();\n const rememberResolvedViaCommonjsFallback = new Set();\n\n async function resolve(\n specifier: string,\n context: { parentURL: string },\n defaultResolve: typeof resolve\n ): Promise<{ url: string; format?: NodeLoaderHooksFormat }> {\n const defer = async () => {\n const r = await defaultResolve(specifier, context, defaultResolve);\n return r;\n };\n // See: https://github.com/nodejs/node/discussions/41711\n // nodejs will likely implement a similar fallback. Till then, we can do our users a favor and fallback today.\n async function entrypointFallback(\n cb: () => ReturnType<typeof resolve> | Awaited<ReturnType<typeof resolve>>\n ): ReturnType<typeof resolve> {\n try {\n const resolution = await cb();\n if (\n resolution?.url &&\n isProbablyEntrypoint(specifier, context.parentURL)\n )\n rememberIsProbablyEntrypoint.add(resolution.url);\n return resolution;\n } catch (esmResolverError) {\n if (!isProbablyEntrypoint(specifier, context.parentURL))\n throw esmResolverError;\n try {\n let cjsSpecifier = specifier;\n // Attempt to convert from ESM file:// to CommonJS path\n try {\n if (specifier.startsWith('file://'))\n cjsSpecifier = fileURLToPath(specifier);\n } catch {}\n const resolution = pathToFileURL(\n createRequire(process.cwd()).resolve(cjsSpecifier)\n ).toString();\n rememberIsProbablyEntrypoint.add(resolution);\n rememberResolvedViaCommonjsFallback.add(resolution);\n return { url: resolution, format: 'commonjs' };\n } catch (commonjsResolverError) {\n throw esmResolverError;\n }\n }\n }\n\n return addShortCircuitFlag(async () => {\n const parsed = parseUrl(specifier);\n const { pathname, protocol, hostname } = parsed;\n\n if (!isFileUrlOrNodeStyleSpecifier(parsed)) {\n return entrypointFallback(defer);\n }\n\n if (protocol !== null && protocol !== 'file:') {\n return entrypointFallback(defer);\n }\n\n // Malformed file:// URL? We should always see `null` or `''`\n if (hostname) {\n // TODO file://./foo sets `hostname` to `'.'`. Perhaps we should special-case this.\n return entrypointFallback(defer);\n }\n\n // pathname is the path to be resolved\n\n return entrypointFallback(() =>\n nodeResolveImplementation.defaultResolve(\n specifier,\n context,\n defaultResolve\n )\n );\n });\n }\n\n // `load` from new loader hook API (See description at the top of this file)\n async function load(\n url: string,\n context: {\n format: NodeLoaderHooksFormat | null | undefined;\n importAssertions?: NodeLoaderHooksAPI2.NodeImportAssertions;\n },\n defaultLoad: typeof load\n ): Promise<{\n format: NodeLoaderHooksFormat;\n source: string | Buffer | undefined;\n }> {\n return addShortCircuitFlag(async () => {\n // If we get a format hint from resolve() on the context then use it\n // otherwise call the old getFormat() hook using node's old built-in defaultGetFormat() that ships with ts-node\n const format =\n context.format ??\n (\n await getFormat(\n url,\n context,\n nodeGetFormatImplementation.defaultGetFormat\n )\n ).format;\n\n let source = undefined;\n if (format !== 'builtin' && format !== 'commonjs') {\n // Call the new defaultLoad() to get the source\n const { source: rawSource } = await defaultLoad(\n url,\n {\n ...context,\n format,\n },\n defaultLoad\n );\n\n if (rawSource === undefined || rawSource === null) {\n throw new Error(\n `Failed to load raw source: Format was '${format}' and url was '${url}''.`\n );\n }\n\n // Emulate node's built-in old defaultTransformSource() so we can re-use the old transformSource() hook\n const defaultTransformSource: typeof transformSource = async (\n source,\n _context,\n _defaultTransformSource\n ) => ({ source });\n\n // Call the old hook\n const { source: transformedSource } = await transformSource(\n rawSource,\n { url, format },\n defaultTransformSource\n );\n source = transformedSource;\n }\n\n return { format, source };\n });\n }\n\n async function getFormat(\n url: string,\n context: {},\n defaultGetFormat: typeof getFormat\n ): Promise<{ format: NodeLoaderHooksFormat }> {\n const defer = (overrideUrl: string = url) =>\n defaultGetFormat(overrideUrl, context, defaultGetFormat);\n\n // See: https://github.com/nodejs/node/discussions/41711\n // nodejs will likely implement a similar fallback. Till then, we can do our users a favor and fallback today.\n async function entrypointFallback(\n cb: () => ReturnType<typeof getFormat>\n ): ReturnType<typeof getFormat> {\n try {\n return await cb();\n } catch (getFormatError) {\n if (!rememberIsProbablyEntrypoint.has(url)) throw getFormatError;\n return { format: 'commonjs' };\n }\n }\n\n const parsed = parseUrl(url);\n\n if (!isFileUrlOrNodeStyleSpecifier(parsed)) {\n return entrypointFallback(defer);\n }\n\n const { pathname } = parsed;\n assert(\n pathname !== null,\n 'ESM getFormat() hook: URL should never have null pathname'\n );\n\n const nativePath = fileURLToPath(url);\n\n let nodeSays: { format: NodeLoaderHooksFormat };\n\n // If file has extension not understood by node, then ask node how it would treat the emitted extension.\n // E.g. .mts compiles to .mjs, so ask node how to classify an .mjs file.\n const ext = extname(nativePath);\n const tsNodeIgnored = tsNodeService.ignored(nativePath);\n const nodeEquivalentExt = extensions.nodeEquivalents.get(ext);\n if (nodeEquivalentExt && !tsNodeIgnored) {\n nodeSays = await entrypointFallback(() =>\n defer(formatUrl(pathToFileURL(nativePath + nodeEquivalentExt)))\n );\n } else {\n try {\n nodeSays = await entrypointFallback(defer);\n } catch (e) {\n if (\n e instanceof Error &&\n tsNodeIgnored &&\n extensions.nodeDoesNotUnderstand.includes(ext)\n ) {\n e.message +=\n `\\n\\n` +\n `Hint:\\n` +\n `ts-node is configured to ignore this file.\\n` +\n `If you want ts-node to handle this file, consider enabling the \"skipIgnore\" option or adjusting your \"ignore\" patterns.\\n` +\n `https://typestrong.org/ts-node/docs/scope\\n`;\n }\n throw e;\n }\n }\n // For files compiled by ts-node that node believes are either CJS or ESM, check if we should override that classification\n if (\n !tsNodeService.ignored(nativePath) &&\n (nodeSays.format === 'commonjs' || nodeSays.format === 'module')\n ) {\n const { moduleType } =\n tsNodeService.moduleTypeClassifier.classifyModuleByModuleTypeOverrides(\n normalizeSlashes(nativePath)\n );\n if (moduleType === 'cjs') {\n return { format: 'commonjs' };\n } else if (moduleType === 'esm') {\n return { format: 'module' };\n }\n }\n return nodeSays;\n }\n\n async function transformSource(\n source: string | Buffer,\n context: { url: string; format: NodeLoaderHooksFormat },\n defaultTransformSource: typeof transformSource\n ): Promise<{ source: string | Buffer }> {\n if (source === null || source === undefined) {\n throw new Error('No source');\n }\n\n const defer = () =>\n defaultTransformSource(source, context, defaultTransformSource);\n\n const sourceAsString =\n typeof source === 'string' ? source : source.toString('utf8');\n\n const { url } = context;\n const parsed = parseUrl(url);\n\n if (!isFileUrlOrNodeStyleSpecifier(parsed)) {\n return defer();\n }\n const nativePath = fileURLToPath(url);\n\n if (tsNodeService.ignored(nativePath)) {\n return defer();\n }\n\n const emittedJs = tsNodeService.compile(sourceAsString, nativePath);\n\n return { source: emittedJs };\n }\n\n return hooksAPI;\n}\n\nasync function addShortCircuitFlag<T>(fn: () => Promise<T>) {\n const ret = await fn();\n // Not sure if this is necessary; being lazy. Can revisit in the future.\n if (ret == null) return ret;\n return {\n ...ret,\n shortCircuit: true,\n };\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getExtensions = void 0;
|
|
4
|
+
const util_1 = require("./util");
|
|
5
|
+
const nodeEquivalents = new Map([
|
|
6
|
+
['.ts', '.js'],
|
|
7
|
+
['.tsx', '.js'],
|
|
8
|
+
['.jsx', '.js'],
|
|
9
|
+
['.mts', '.mjs'],
|
|
10
|
+
['.cts', '.cjs'],
|
|
11
|
+
]);
|
|
12
|
+
const tsResolverEquivalents = new Map([
|
|
13
|
+
['.ts', ['.js']],
|
|
14
|
+
['.tsx', ['.js', '.jsx']],
|
|
15
|
+
['.mts', ['.mjs']],
|
|
16
|
+
['.cts', ['.cjs']],
|
|
17
|
+
]);
|
|
18
|
+
// All extensions understood by vanilla node
|
|
19
|
+
const vanillaNodeExtensions = [
|
|
20
|
+
'.js',
|
|
21
|
+
'.json',
|
|
22
|
+
'.node',
|
|
23
|
+
'.mjs',
|
|
24
|
+
'.cjs',
|
|
25
|
+
];
|
|
26
|
+
// Extensions added by vanilla node's require() if you omit them:
|
|
27
|
+
// js, json, node
|
|
28
|
+
// Extensions added by vanilla node if you omit them with --experimental-specifier-resolution=node
|
|
29
|
+
// js, json, node, mjs
|
|
30
|
+
// Extensions added by ESM codepath's legacy package.json "main" resolver
|
|
31
|
+
// js, json, node (not mjs!)
|
|
32
|
+
const nodeDoesNotUnderstand = [
|
|
33
|
+
'.ts',
|
|
34
|
+
'.tsx',
|
|
35
|
+
'.jsx',
|
|
36
|
+
'.cts',
|
|
37
|
+
'.mts',
|
|
38
|
+
];
|
|
39
|
+
/**
|
|
40
|
+
* [MUST_UPDATE_FOR_NEW_FILE_EXTENSIONS]
|
|
41
|
+
* @internal
|
|
42
|
+
*/
|
|
43
|
+
function getExtensions(config, options, tsVersion) {
|
|
44
|
+
// TS 4.5 is first version to understand .cts, .mts, .cjs, and .mjs extensions
|
|
45
|
+
const tsSupportsMtsCtsExts = (0, util_1.versionGteLt)(tsVersion, '4.5.0');
|
|
46
|
+
const requiresHigherTypescriptVersion = [];
|
|
47
|
+
if (!tsSupportsMtsCtsExts)
|
|
48
|
+
requiresHigherTypescriptVersion.push('.cts', '.cjs', '.mts', '.mjs');
|
|
49
|
+
const allPossibleExtensionsSortedByPreference = Array.from(new Set([
|
|
50
|
+
...(options.preferTsExts ? nodeDoesNotUnderstand : []),
|
|
51
|
+
...vanillaNodeExtensions,
|
|
52
|
+
...nodeDoesNotUnderstand,
|
|
53
|
+
]));
|
|
54
|
+
const compiledJsUnsorted = ['.ts'];
|
|
55
|
+
const compiledJsxUnsorted = [];
|
|
56
|
+
if (config.options.jsx)
|
|
57
|
+
compiledJsxUnsorted.push('.tsx');
|
|
58
|
+
if (tsSupportsMtsCtsExts)
|
|
59
|
+
compiledJsUnsorted.push('.mts', '.cts');
|
|
60
|
+
if (config.options.allowJs) {
|
|
61
|
+
compiledJsUnsorted.push('.js');
|
|
62
|
+
if (config.options.jsx)
|
|
63
|
+
compiledJsxUnsorted.push('.jsx');
|
|
64
|
+
if (tsSupportsMtsCtsExts)
|
|
65
|
+
compiledJsUnsorted.push('.mjs', '.cjs');
|
|
66
|
+
}
|
|
67
|
+
const compiledUnsorted = [...compiledJsUnsorted, ...compiledJsxUnsorted];
|
|
68
|
+
const compiled = allPossibleExtensionsSortedByPreference.filter((ext) => compiledUnsorted.includes(ext));
|
|
69
|
+
const compiledNodeDoesNotUnderstand = nodeDoesNotUnderstand.filter((ext) => compiled.includes(ext));
|
|
70
|
+
/**
|
|
71
|
+
* TS's resolver can resolve foo.js to foo.ts, by replacing .js extension with several source extensions.
|
|
72
|
+
* IMPORTANT: Must preserve ordering according to preferTsExts!
|
|
73
|
+
* Must include the .js/.mjs/.cjs extension in the array!
|
|
74
|
+
* This affects resolution behavior!
|
|
75
|
+
* [MUST_UPDATE_FOR_NEW_FILE_EXTENSIONS]
|
|
76
|
+
*/
|
|
77
|
+
const r = allPossibleExtensionsSortedByPreference.filter((ext) => [...compiledUnsorted, '.js', '.mjs', '.cjs', '.mts', '.cts'].includes(ext));
|
|
78
|
+
const replacementsForJs = r.filter((ext) => ['.js', '.jsx', '.ts', '.tsx'].includes(ext));
|
|
79
|
+
const replacementsForJsx = r.filter((ext) => ['.jsx', '.tsx'].includes(ext));
|
|
80
|
+
const replacementsForMjs = r.filter((ext) => ['.mjs', '.mts'].includes(ext));
|
|
81
|
+
const replacementsForCjs = r.filter((ext) => ['.cjs', '.cts'].includes(ext));
|
|
82
|
+
const replacementsForJsOrMjs = r.filter((ext) => ['.js', '.jsx', '.ts', '.tsx', '.mjs', '.mts'].includes(ext));
|
|
83
|
+
// Node allows omitting .js or .mjs extension in certain situations (CJS, ESM w/experimental flag)
|
|
84
|
+
// So anything that compiles to .js or .mjs can also be omitted.
|
|
85
|
+
const experimentalSpecifierResolutionAddsIfOmitted = Array.from(new Set([...replacementsForJsOrMjs, '.json', '.node']));
|
|
86
|
+
// Same as above, except node curiuosly doesn't do .mjs here
|
|
87
|
+
const legacyMainResolveAddsIfOmitted = Array.from(new Set([...replacementsForJs, '.json', '.node']));
|
|
88
|
+
return {
|
|
89
|
+
/** All file extensions we transform, ordered by resolution preference according to preferTsExts */
|
|
90
|
+
compiled,
|
|
91
|
+
/** Resolved extensions that vanilla node will not understand; we should handle them */
|
|
92
|
+
nodeDoesNotUnderstand,
|
|
93
|
+
/** Like the above, but only the ones we're compiling */
|
|
94
|
+
compiledNodeDoesNotUnderstand,
|
|
95
|
+
/**
|
|
96
|
+
* Mapping from extensions understood by tsc to the equivalent for node,
|
|
97
|
+
* as far as getFormat is concerned.
|
|
98
|
+
*/
|
|
99
|
+
nodeEquivalents,
|
|
100
|
+
/**
|
|
101
|
+
* Mapping from extensions rejected by TSC in import specifiers, to the
|
|
102
|
+
* possible alternatives that TS's resolver will accept.
|
|
103
|
+
*
|
|
104
|
+
* When we allow users to opt-in to .ts extensions in import specifiers, TS's
|
|
105
|
+
* resolver requires us to replace the .ts extensions with .js alternatives.
|
|
106
|
+
* Otherwise, resolution fails.
|
|
107
|
+
*
|
|
108
|
+
* Note TS's resolver is only used by, and only required for, typechecking.
|
|
109
|
+
* This is separate from node's resolver, which we hook separately and which
|
|
110
|
+
* does not require this mapping.
|
|
111
|
+
*/
|
|
112
|
+
tsResolverEquivalents,
|
|
113
|
+
/**
|
|
114
|
+
* Extensions that we can support if the user upgrades their typescript version.
|
|
115
|
+
* Used when raising hints.
|
|
116
|
+
*/
|
|
117
|
+
requiresHigherTypescriptVersion,
|
|
118
|
+
/**
|
|
119
|
+
* --experimental-specifier-resolution=node will add these extensions.
|
|
120
|
+
*/
|
|
121
|
+
experimentalSpecifierResolutionAddsIfOmitted,
|
|
122
|
+
/**
|
|
123
|
+
* ESM loader will add these extensions to package.json "main" field
|
|
124
|
+
*/
|
|
125
|
+
legacyMainResolveAddsIfOmitted,
|
|
126
|
+
replacementsForMjs,
|
|
127
|
+
replacementsForCjs,
|
|
128
|
+
replacementsForJsx,
|
|
129
|
+
replacementsForJs,
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
exports.getExtensions = getExtensions;
|
|
133
|
+
//# sourceMappingURL=file-extensions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-extensions.js","sourceRoot":"","sources":["../src/file-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L,mGAAmG;QACnG,QAAQ;QACR,uFAAuF;QACvF,qBAAqB;QACrB,wDAAwD;QACxD,6BAA6B;QAC7B;;;WAGG;QACH,eAAe;QACf;;;;;;;;;;;WAWG;QACH,qBAAqB;QACrB;;;WAGG;QACH,+BAA+B;QAC/B;;WAEG;QACH,4CAA4C;QAC5C;;WAEG;QACH,8BAA8B;QAC9B,kBAAkB;QAClB,kBAAkB;QAClB,kBAAkB;QAClB,iBAAiB;KAClB,CAAC;AACJ,CAAC;AAjHD,sCAiHC","sourcesContent":["import type * as _ts from 'typescript';\nimport type { RegisterOptions } from '.';\nimport { versionGteLt } from './util';\n\n/**\n * Centralized specification of how we deal with file extensions based on\n * project options:\n * which ones we do/don't support, in what situations, etc. These rules drive\n * logic elsewhere.\n * @internal\n * */\nexport type Extensions = ReturnType<typeof getExtensions>;\n\nconst nodeEquivalents = new Map<string, string>([\n ['.ts', '.js'],\n ['.tsx', '.js'],\n ['.jsx', '.js'],\n ['.mts', '.mjs'],\n ['.cts', '.cjs'],\n]);\n\nconst tsResolverEquivalents = new Map<string, readonly string[]>([\n ['.ts', ['.js']],\n ['.tsx', ['.js', '.jsx']],\n ['.mts', ['.mjs']],\n ['.cts', ['.cjs']],\n]);\n\n// All extensions understood by vanilla node\nconst vanillaNodeExtensions: readonly string[] = [\n '.js',\n '.json',\n '.node',\n '.mjs',\n '.cjs',\n];\n\n// Extensions added by vanilla node's require() if you omit them:\n// js, json, node\n// Extensions added by vanilla node if you omit them with --experimental-specifier-resolution=node\n// js, json, node, mjs\n// Extensions added by ESM codepath's legacy package.json \"main\" resolver\n// js, json, node (not mjs!)\n\nconst nodeDoesNotUnderstand: readonly string[] = [\n '.ts',\n '.tsx',\n '.jsx',\n '.cts',\n '.mts',\n];\n\n/**\n * [MUST_UPDATE_FOR_NEW_FILE_EXTENSIONS]\n * @internal\n */\nexport function getExtensions(\n config: _ts.ParsedCommandLine,\n options: RegisterOptions,\n tsVersion: string\n) {\n // TS 4.5 is first version to understand .cts, .mts, .cjs, and .mjs extensions\n const tsSupportsMtsCtsExts = versionGteLt(tsVersion, '4.5.0');\n\n const requiresHigherTypescriptVersion: string[] = [];\n if (!tsSupportsMtsCtsExts)\n requiresHigherTypescriptVersion.push('.cts', '.cjs', '.mts', '.mjs');\n\n const allPossibleExtensionsSortedByPreference = Array.from(\n new Set([\n ...(options.preferTsExts ? nodeDoesNotUnderstand : []),\n ...vanillaNodeExtensions,\n ...nodeDoesNotUnderstand,\n ])\n );\n\n const compiledJsUnsorted: string[] = ['.ts'];\n const compiledJsxUnsorted: string[] = [];\n\n if (config.options.jsx) compiledJsxUnsorted.push('.tsx');\n if (tsSupportsMtsCtsExts) compiledJsUnsorted.push('.mts', '.cts');\n if (config.options.allowJs) {\n compiledJsUnsorted.push('.js');\n if (config.options.jsx) compiledJsxUnsorted.push('.jsx');\n if (tsSupportsMtsCtsExts) compiledJsUnsorted.push('.mjs', '.cjs');\n }\n\n const compiledUnsorted = [...compiledJsUnsorted, ...compiledJsxUnsorted];\n const compiled = allPossibleExtensionsSortedByPreference.filter((ext) =>\n compiledUnsorted.includes(ext)\n );\n\n const compiledNodeDoesNotUnderstand = nodeDoesNotUnderstand.filter((ext) =>\n compiled.includes(ext)\n );\n\n /**\n * TS's resolver can resolve foo.js to foo.ts, by replacing .js extension with several source extensions.\n * IMPORTANT: Must preserve ordering according to preferTsExts!\n * Must include the .js/.mjs/.cjs extension in the array!\n * This affects resolution behavior!\n * [MUST_UPDATE_FOR_NEW_FILE_EXTENSIONS]\n */\n const r = allPossibleExtensionsSortedByPreference.filter((ext) =>\n [...compiledUnsorted, '.js', '.mjs', '.cjs', '.mts', '.cts'].includes(ext)\n );\n const replacementsForJs = r.filter((ext) =>\n ['.js', '.jsx', '.ts', '.tsx'].includes(ext)\n );\n const replacementsForJsx = r.filter((ext) => ['.jsx', '.tsx'].includes(ext));\n const replacementsForMjs = r.filter((ext) => ['.mjs', '.mts'].includes(ext));\n const replacementsForCjs = r.filter((ext) => ['.cjs', '.cts'].includes(ext));\n const replacementsForJsOrMjs = r.filter((ext) =>\n ['.js', '.jsx', '.ts', '.tsx', '.mjs', '.mts'].includes(ext)\n );\n\n // Node allows omitting .js or .mjs extension in certain situations (CJS, ESM w/experimental flag)\n // So anything that compiles to .js or .mjs can also be omitted.\n const experimentalSpecifierResolutionAddsIfOmitted = Array.from(\n new Set([...replacementsForJsOrMjs, '.json', '.node'])\n );\n // Same as above, except node curiuosly doesn't do .mjs here\n const legacyMainResolveAddsIfOmitted = Array.from(\n new Set([...replacementsForJs, '.json', '.node'])\n );\n\n return {\n /** All file extensions we transform, ordered by resolution preference according to preferTsExts */\n compiled,\n /** Resolved extensions that vanilla node will not understand; we should handle them */\n nodeDoesNotUnderstand,\n /** Like the above, but only the ones we're compiling */\n compiledNodeDoesNotUnderstand,\n /**\n * Mapping from extensions understood by tsc to the equivalent for node,\n * as far as getFormat is concerned.\n */\n nodeEquivalents,\n /**\n * Mapping from extensions rejected by TSC in import specifiers, to the\n * possible alternatives that TS's resolver will accept.\n *\n * When we allow users to opt-in to .ts extensions in import specifiers, TS's\n * resolver requires us to replace the .ts extensions with .js alternatives.\n * Otherwise, resolution fails.\n *\n * Note TS's resolver is only used by, and only required for, typechecking.\n * This is separate from node's resolver, which we hook separately and which\n * does not require this mapping.\n */\n tsResolverEquivalents,\n /**\n * Extensions that we can support if the user upgrades their typescript version.\n * Used when raising hints.\n */\n requiresHigherTypescriptVersion,\n /**\n * --experimental-specifier-resolution=node will add these extensions.\n */\n experimentalSpecifierResolutionAddsIfOmitted,\n /**\n * ESM loader will add these extensions to package.json \"main\" field\n */\n legacyMainResolveAddsIfOmitted,\n replacementsForMjs,\n replacementsForCjs,\n replacementsForJsx,\n replacementsForJs,\n };\n}\n"]}
|
|
@@ -0,0 +1,332 @@
|
|
|
1
|
+
import { BaseError } from 'make-error';
|
|
2
|
+
import type * as _ts from 'typescript';
|
|
3
|
+
import type { TSCommon } from './ts-compiler-types';
|
|
4
|
+
import type { createEsmHooks as createEsmHooksFn } from './esm';
|
|
5
|
+
export { TSCommon };
|
|
6
|
+
export { createRepl, CreateReplOptions, ReplService, EvalAwarePartialHost, } from './repl';
|
|
7
|
+
export type { TranspilerModule, TranspilerFactory, CreateTranspilerOptions, TranspileOutput, TranspileOptions, Transpiler, } from './transpilers/types';
|
|
8
|
+
export type { NodeLoaderHooksAPI1, NodeLoaderHooksAPI2, NodeLoaderHooksFormat, } from './esm';
|
|
9
|
+
/**
|
|
10
|
+
* Registered `ts-node` instance information.
|
|
11
|
+
*/
|
|
12
|
+
export declare const REGISTER_INSTANCE: unique symbol;
|
|
13
|
+
/**
|
|
14
|
+
* Expose `REGISTER_INSTANCE` information on node.js `process`.
|
|
15
|
+
*/
|
|
16
|
+
declare global {
|
|
17
|
+
namespace NodeJS {
|
|
18
|
+
interface Process {
|
|
19
|
+
[REGISTER_INSTANCE]?: Service;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Export the current version.
|
|
25
|
+
*/
|
|
26
|
+
export declare const VERSION: any;
|
|
27
|
+
/**
|
|
28
|
+
* Options for creating a new TypeScript compiler instance.
|
|
29
|
+
|
|
30
|
+
* @category Basic
|
|
31
|
+
*/
|
|
32
|
+
export interface CreateOptions {
|
|
33
|
+
/**
|
|
34
|
+
* Behave as if invoked within this working directory. Roughly equivalent to `cd $dir && ts-node ...`
|
|
35
|
+
*
|
|
36
|
+
* @default process.cwd()
|
|
37
|
+
*/
|
|
38
|
+
cwd?: string;
|
|
39
|
+
/**
|
|
40
|
+
* Legacy alias for `cwd`
|
|
41
|
+
*
|
|
42
|
+
* @deprecated use `projectSearchDir` or `cwd`
|
|
43
|
+
*/
|
|
44
|
+
dir?: string;
|
|
45
|
+
/**
|
|
46
|
+
* Emit output files into `.ts-node` directory.
|
|
47
|
+
*
|
|
48
|
+
* @default false
|
|
49
|
+
*/
|
|
50
|
+
emit?: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Scope compiler to files within `scopeDir`.
|
|
53
|
+
*
|
|
54
|
+
* @default false
|
|
55
|
+
*/
|
|
56
|
+
scope?: boolean;
|
|
57
|
+
/**
|
|
58
|
+
* @default First of: `tsconfig.json` "rootDir" if specified, directory containing `tsconfig.json`, or cwd if no `tsconfig.json` is loaded.
|
|
59
|
+
*/
|
|
60
|
+
scopeDir?: string;
|
|
61
|
+
/**
|
|
62
|
+
* Use pretty diagnostic formatter.
|
|
63
|
+
*
|
|
64
|
+
* @default false
|
|
65
|
+
*/
|
|
66
|
+
pretty?: boolean;
|
|
67
|
+
/**
|
|
68
|
+
* Use TypeScript's faster `transpileModule`.
|
|
69
|
+
*
|
|
70
|
+
* @default false
|
|
71
|
+
*/
|
|
72
|
+
transpileOnly?: boolean;
|
|
73
|
+
/**
|
|
74
|
+
* **DEPRECATED** Specify type-check is enabled (e.g. `transpileOnly == false`).
|
|
75
|
+
*
|
|
76
|
+
* @default true
|
|
77
|
+
*/
|
|
78
|
+
typeCheck?: boolean;
|
|
79
|
+
/**
|
|
80
|
+
* Use TypeScript's compiler host API instead of the language service API.
|
|
81
|
+
*
|
|
82
|
+
* @default false
|
|
83
|
+
*/
|
|
84
|
+
compilerHost?: boolean;
|
|
85
|
+
/**
|
|
86
|
+
* Logs TypeScript errors to stderr instead of throwing exceptions.
|
|
87
|
+
*
|
|
88
|
+
* @default false
|
|
89
|
+
*/
|
|
90
|
+
logError?: boolean;
|
|
91
|
+
/**
|
|
92
|
+
* Load "files" and "include" from `tsconfig.json` on startup.
|
|
93
|
+
*
|
|
94
|
+
* Default is to override `tsconfig.json` "files" and "include" to only include the entrypoint script.
|
|
95
|
+
*
|
|
96
|
+
* @default false
|
|
97
|
+
*/
|
|
98
|
+
files?: boolean;
|
|
99
|
+
/**
|
|
100
|
+
* Specify a custom TypeScript compiler.
|
|
101
|
+
*
|
|
102
|
+
* @default "typescript"
|
|
103
|
+
*/
|
|
104
|
+
compiler?: string;
|
|
105
|
+
/**
|
|
106
|
+
* Specify a custom transpiler for use with transpileOnly
|
|
107
|
+
*/
|
|
108
|
+
transpiler?: string | [string, object];
|
|
109
|
+
/**
|
|
110
|
+
* Transpile with swc instead of the TypeScript compiler, and skip typechecking.
|
|
111
|
+
*
|
|
112
|
+
* Equivalent to setting both `transpileOnly: true` and `transpiler: 'ts-node/transpilers/swc'`
|
|
113
|
+
*
|
|
114
|
+
* For complete instructions: https://typestrong.org/ts-node/docs/transpilers
|
|
115
|
+
*/
|
|
116
|
+
swc?: boolean;
|
|
117
|
+
/**
|
|
118
|
+
* Paths which should not be compiled.
|
|
119
|
+
*
|
|
120
|
+
* Each string in the array is converted to a regular expression via `new RegExp()` and tested against source paths prior to compilation.
|
|
121
|
+
*
|
|
122
|
+
* Source paths are normalized to posix-style separators, relative to the directory containing `tsconfig.json` or to cwd if no `tsconfig.json` is loaded.
|
|
123
|
+
*
|
|
124
|
+
* Default is to ignore all node_modules subdirectories.
|
|
125
|
+
*
|
|
126
|
+
* @default ["(?:^|/)node_modules/"]
|
|
127
|
+
*/
|
|
128
|
+
ignore?: string[];
|
|
129
|
+
/**
|
|
130
|
+
* Path to TypeScript config file or directory containing a `tsconfig.json`.
|
|
131
|
+
* Similar to the `tsc --project` flag: https://www.typescriptlang.org/docs/handbook/compiler-options.html
|
|
132
|
+
*/
|
|
133
|
+
project?: string;
|
|
134
|
+
/**
|
|
135
|
+
* Search for TypeScript config file (`tsconfig.json`) in this or parent directories.
|
|
136
|
+
*/
|
|
137
|
+
projectSearchDir?: string;
|
|
138
|
+
/**
|
|
139
|
+
* Skip project config resolution and loading.
|
|
140
|
+
*
|
|
141
|
+
* @default false
|
|
142
|
+
*/
|
|
143
|
+
skipProject?: boolean;
|
|
144
|
+
/**
|
|
145
|
+
* Skip ignore check, so that compilation will be attempted for all files with matching extensions.
|
|
146
|
+
*
|
|
147
|
+
* @default false
|
|
148
|
+
*/
|
|
149
|
+
skipIgnore?: boolean;
|
|
150
|
+
/**
|
|
151
|
+
* JSON object to merge with TypeScript `compilerOptions`.
|
|
152
|
+
*
|
|
153
|
+
* @allOf [{"$ref": "https://schemastore.azurewebsites.net/schemas/json/tsconfig.json#definitions/compilerOptionsDefinition/properties/compilerOptions"}]
|
|
154
|
+
*/
|
|
155
|
+
compilerOptions?: object;
|
|
156
|
+
/**
|
|
157
|
+
* Ignore TypeScript warnings by diagnostic code.
|
|
158
|
+
*/
|
|
159
|
+
ignoreDiagnostics?: Array<number | string>;
|
|
160
|
+
/**
|
|
161
|
+
* Modules to require, like node's `--require` flag.
|
|
162
|
+
*
|
|
163
|
+
* If specified in `tsconfig.json`, the modules will be resolved relative to the `tsconfig.json` file.
|
|
164
|
+
*
|
|
165
|
+
* If specified programmatically, each input string should be pre-resolved to an absolute path for
|
|
166
|
+
* best results.
|
|
167
|
+
*/
|
|
168
|
+
require?: Array<string>;
|
|
169
|
+
readFile?: (path: string) => string | undefined;
|
|
170
|
+
fileExists?: (path: string) => boolean;
|
|
171
|
+
transformers?: _ts.CustomTransformers | ((p: _ts.Program) => _ts.CustomTransformers);
|
|
172
|
+
/**
|
|
173
|
+
* Allows the usage of top level await in REPL.
|
|
174
|
+
*
|
|
175
|
+
* Uses node's implementation which accomplishes this with an AST syntax transformation.
|
|
176
|
+
*
|
|
177
|
+
* Enabled by default when tsconfig target is es2018 or above. Set to false to disable.
|
|
178
|
+
*
|
|
179
|
+
* **Note**: setting to `true` when tsconfig target is too low will throw an Error. Leave as `undefined`
|
|
180
|
+
* to get default, automatic behavior.
|
|
181
|
+
*/
|
|
182
|
+
experimentalReplAwait?: boolean;
|
|
183
|
+
/**
|
|
184
|
+
* Override certain paths to be compiled and executed as CommonJS or ECMAScript modules.
|
|
185
|
+
* When overridden, the tsconfig "module" and package.json "type" fields are overridden, and
|
|
186
|
+
* the file extension is ignored.
|
|
187
|
+
* This is useful if you cannot use .mts, .cts, .mjs, or .cjs file extensions;
|
|
188
|
+
* it achieves the same effect.
|
|
189
|
+
*
|
|
190
|
+
* Each key is a glob pattern following the same rules as tsconfig's "include" array.
|
|
191
|
+
* When multiple patterns match the same file, the last pattern takes precedence.
|
|
192
|
+
*
|
|
193
|
+
* `cjs` overrides matches files to compile and execute as CommonJS.
|
|
194
|
+
* `esm` overrides matches files to compile and execute as native ECMAScript modules.
|
|
195
|
+
* `package` overrides either of the above to default behavior, which obeys package.json "type" and
|
|
196
|
+
* tsconfig.json "module" options.
|
|
197
|
+
*/
|
|
198
|
+
moduleTypes?: ModuleTypes;
|
|
199
|
+
/**
|
|
200
|
+
* A function to collect trace messages from the TypeScript compiler, for example when `traceResolution` is enabled.
|
|
201
|
+
*
|
|
202
|
+
* @default console.log
|
|
203
|
+
*/
|
|
204
|
+
tsTrace?: (str: string) => void;
|
|
205
|
+
/**
|
|
206
|
+
* Enable native ESM support.
|
|
207
|
+
*
|
|
208
|
+
* For details, see https://typestrong.org/ts-node/docs/imports#native-ecmascript-modules
|
|
209
|
+
*/
|
|
210
|
+
esm?: boolean;
|
|
211
|
+
/**
|
|
212
|
+
* Re-order file extensions so that TypeScript imports are preferred.
|
|
213
|
+
*
|
|
214
|
+
* For example, when both `index.js` and `index.ts` exist, enabling this option causes `require('./index')` to resolve to `index.ts` instead of `index.js`
|
|
215
|
+
*
|
|
216
|
+
* @default false
|
|
217
|
+
*/
|
|
218
|
+
preferTsExts?: boolean;
|
|
219
|
+
/**
|
|
220
|
+
* Like node's `--experimental-specifier-resolution`, , but can also be set in your `tsconfig.json` for convenience.
|
|
221
|
+
*
|
|
222
|
+
* For details, see https://nodejs.org/dist/latest-v18.x/docs/api/esm.html#customizing-esm-specifier-resolution-algorithm
|
|
223
|
+
*/
|
|
224
|
+
experimentalSpecifierResolution?: 'node' | 'explicit';
|
|
225
|
+
/**
|
|
226
|
+
* Allow using voluntary `.ts` file extension in import specifiers.
|
|
227
|
+
*
|
|
228
|
+
* Typically, in ESM projects, import specifiers must have an emit extension, `.js`, `.cjs`, or `.mjs`,
|
|
229
|
+
* and we automatically map to the corresponding `.ts`, `.cts`, or `.mts` source file. This is the
|
|
230
|
+
* recommended approach.
|
|
231
|
+
*
|
|
232
|
+
* However, if you really want to use `.ts` in import specifiers, and are aware that this may
|
|
233
|
+
* break tooling, you can enable this flag.
|
|
234
|
+
*/
|
|
235
|
+
experimentalTsImportSpecifiers?: boolean;
|
|
236
|
+
}
|
|
237
|
+
export declare type ModuleTypes = Record<string, ModuleTypeOverride>;
|
|
238
|
+
export declare type ModuleTypeOverride = 'cjs' | 'esm' | 'package';
|
|
239
|
+
/**
|
|
240
|
+
* Options for registering a TypeScript compiler instance globally.
|
|
241
|
+
|
|
242
|
+
* @category Basic
|
|
243
|
+
*/
|
|
244
|
+
export interface RegisterOptions extends CreateOptions {
|
|
245
|
+
/**
|
|
246
|
+
* Enable experimental features that re-map imports and require calls to support:
|
|
247
|
+
* `baseUrl`, `paths`, `rootDirs`, `.js` to `.ts` file extension mappings,
|
|
248
|
+
* `outDir` to `rootDir` mappings for composite projects and monorepos.
|
|
249
|
+
*
|
|
250
|
+
* For details, see https://github.com/TypeStrong/ts-node/issues/1514
|
|
251
|
+
*/
|
|
252
|
+
experimentalResolver?: boolean;
|
|
253
|
+
}
|
|
254
|
+
export declare type ExperimentalSpecifierResolution = 'node' | 'explicit';
|
|
255
|
+
/**
|
|
256
|
+
* Must be an interface to support `typescript-json-schema`.
|
|
257
|
+
*/
|
|
258
|
+
export interface TsConfigOptions extends Omit<RegisterOptions, 'transformers' | 'readFile' | 'fileExists' | 'skipProject' | 'project' | 'dir' | 'cwd' | 'projectSearchDir' | 'optionBasePaths' | 'tsTrace'> {
|
|
259
|
+
}
|
|
260
|
+
/**
|
|
261
|
+
* Information retrieved from type info check.
|
|
262
|
+
*/
|
|
263
|
+
export interface TypeInfo {
|
|
264
|
+
name: string;
|
|
265
|
+
comment: string;
|
|
266
|
+
}
|
|
267
|
+
/**
|
|
268
|
+
* TypeScript diagnostics error.
|
|
269
|
+
*/
|
|
270
|
+
export declare class TSError extends BaseError {
|
|
271
|
+
diagnosticCodes: number[];
|
|
272
|
+
name: string;
|
|
273
|
+
diagnosticText: string;
|
|
274
|
+
diagnostics: ReadonlyArray<_ts.Diagnostic>;
|
|
275
|
+
constructor(diagnosticText: string, diagnosticCodes: number[], diagnostics?: ReadonlyArray<_ts.Diagnostic>);
|
|
276
|
+
}
|
|
277
|
+
/**
|
|
278
|
+
* Primary ts-node service, which wraps the TypeScript API and can compile TypeScript to JavaScript
|
|
279
|
+
*/
|
|
280
|
+
export interface Service {
|
|
281
|
+
ts: TSCommon;
|
|
282
|
+
config: _ts.ParsedCommandLine;
|
|
283
|
+
options: RegisterOptions;
|
|
284
|
+
enabled(enabled?: boolean): boolean;
|
|
285
|
+
ignored(fileName: string): boolean;
|
|
286
|
+
compile(code: string, fileName: string, lineOffset?: number): string;
|
|
287
|
+
getTypeInfo(code: string, fileName: string, position: number): TypeInfo;
|
|
288
|
+
}
|
|
289
|
+
/**
|
|
290
|
+
* Re-export of `Service` interface for backwards-compatibility
|
|
291
|
+
* @deprecated use `Service` instead
|
|
292
|
+
* @see {Service}
|
|
293
|
+
*/
|
|
294
|
+
export declare type Register = Service;
|
|
295
|
+
/**
|
|
296
|
+
* Create a new TypeScript compiler instance and register it onto node.js
|
|
297
|
+
*
|
|
298
|
+
* @category Basic
|
|
299
|
+
*/
|
|
300
|
+
export declare function register(opts?: RegisterOptions): Service;
|
|
301
|
+
/**
|
|
302
|
+
* Register TypeScript compiler instance onto node.js
|
|
303
|
+
|
|
304
|
+
* @category Basic
|
|
305
|
+
*/
|
|
306
|
+
export declare function register(service: Service): Service;
|
|
307
|
+
/**
|
|
308
|
+
* Create TypeScript compiler instance.
|
|
309
|
+
*
|
|
310
|
+
* @category Basic
|
|
311
|
+
*/
|
|
312
|
+
export declare function create(rawOptions?: CreateOptions): Service;
|
|
313
|
+
/**
|
|
314
|
+
* Create an implementation of node's ESM loader hooks.
|
|
315
|
+
*
|
|
316
|
+
* This may be useful if you
|
|
317
|
+
* want to wrap or compose the loader hooks to add additional functionality or
|
|
318
|
+
* combine with another loader.
|
|
319
|
+
*
|
|
320
|
+
* Node changed the hooks API, so there are two possible APIs. This function
|
|
321
|
+
* detects your node version and returns the appropriate API.
|
|
322
|
+
*
|
|
323
|
+
* @category ESM Loader
|
|
324
|
+
*/
|
|
325
|
+
export declare const createEsmHooks: typeof createEsmHooksFn;
|
|
326
|
+
/**
|
|
327
|
+
* When using `module: nodenext` or `module: node12`, there are two possible styles of emit depending in file extension or package.json "type":
|
|
328
|
+
*
|
|
329
|
+
* - CommonJS with dynamic imports preserved (not transformed into `require()` calls)
|
|
330
|
+
* - ECMAScript modules with `import foo = require()` transformed into `require = createRequire(); const foo = require()`
|
|
331
|
+
*/
|
|
332
|
+
export declare type NodeModuleEmitKind = 'nodeesm' | 'nodecjs';
|