diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7f49261..f71dd51 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -14,20 +14,19 @@ jobs: strategy: matrix: - # NOTE - 21+ is failing due to odd bug - maybe bug in node - see https://github.com/nonara/ts-patch/issues/153 - node-version: [ 18.x, 20.x ] + node-version: [ 22.x, 24.x ] steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v6 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v2 + uses: actions/setup-node@v6 with: node-version: ${{ matrix.node-version }} - name: Cache dependencies - uses: actions/cache@v2 + uses: actions/cache@v5 with: path: | ~/.cache/yarn diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 2c454b4..0ef1209 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -12,12 +12,12 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v6 - name: Setup Node.js to publish to npmjs.org - uses: actions/setup-node@v2 + uses: actions/setup-node@v6 with: - node-version: '20.x' + node-version: '24.x' registry-url: 'https://registry.npmjs.org' - name: Install Packages diff --git a/.gitignore b/.gitignore index 133099a..7a7645d 100644 --- a/.gitignore +++ b/.gitignore @@ -26,8 +26,12 @@ generated/ .env .vscode .idea/jsLibraryMappings.xml +.idea/copilot.*.xml todo/ TODO.ts +.agents/ +.claude/ +/.codex # Junk temp/ diff --git a/README.md b/README.md index f922bd9..0765587 100644 --- a/README.md +++ b/README.md @@ -8,12 +8,15 @@ Patch typescript to allow custom transformers (plugins) during build. Plugins are specified in `tsconfig.json`, or provided programmatically in `CompilerOptions`. +> [!IMPORTANT] +> ts-patch v4 supports TypeScript 6 and later only. For TypeScript 5 projects, use ts-patch v3. + _Migrating from ttypescript is easy! See: [Method 1: Live Compiler](#method-1-live-compiler)_ ## Features -* Patch typescript installation via on-the-fly, in-memory patching _or_ as a persistent patch -* Can patch individual libraries (see `ts-patch /?`) +* Patch typescript via on-the-fly, in-memory compiler routes _or_ persistent patches for supported files +* Can patch supported compiler libraries (see `ts-patch /?`) * Hook build process by transforming the `Program` (see: [Transforming Program](#transforming-program)) * Add, remove, or modify diagnostics (see: [Altering Diagnostics](#altering-diagnostics)) * Fully compatible with legacy [ttypescript](https://github.com/cevek/ttypescript) projects @@ -48,6 +51,7 @@ _Migrating from ttypescript is easy! See: [Method 1: Live Compiler](#method-1-li * [Recommended Tools](#recommended-tools) * [Discussion](#discussion) * [Advanced Options](#advanced-options) +* [Compatibility Direction](#compatibility-direction) * [Maintainers](#maintainers) * [Help Wanted](#help-wanted) * [License](#license) @@ -70,29 +74,42 @@ The live compiler patches on-the-fly, each time it is run. **With tools such as ts-node, webpack, ts-jest, etc:** specify the compiler as `ts-patch/compiler` +Additional live routes are available for tools that need a specific TypeScript entry: + +| Route | Library identity supplied to transformers | +|-------|-------------------------------------------| +| `ts-patch/compiler` | `typescript` | +| `ts-patch/compiler/typescript` | `typescript` | +| `ts-patch/compiler/tsc` | `tsc` | +| `ts-patch/compiler/tsserver` | `tsserver` | +| `ts-patch/compiler/tsserverlibrary` | `tsserverlibrary` | + ## Method 2: Persistent Patch -Persistent patch modifies the typescript installation within the node_modules path. It requires additional configuration -to remain persisted, but it carries less load time and complexity compared to the live compiler. +Persistent patching modifies supported TypeScript files inside `node_modules`. It is still available for TypeScript 6, +but the patchable surface is narrower than it was in earlier TypeScript versions. + +TypeScript 6 ships thin entry shims for several library files. Some service entries delegate to shared implementation +files; for example, `tsserverlibrary.js` delegates to `typescript.js`. Rewriting those service files in place would not +preserve enough entry context to distinguish direct compiler API use from `tsc`, `tsserver`, or `tsserverlibrary` use. +For those entries, use the live compiler routes instead. -1. Install the patch +`install` and `uninstall` remain available, but they now affect only `typescript.js` and `tsc.js`: ```shell -# For advanced options, see: ts-patch /? ts-patch install +ts-patch uninstall ``` -2. Add `prepare` script (keeps patch persisted after npm install) +The lower-level `patch` and `unpatch` commands are also limited to those two targets: -`package.json` - ```jsonc -{ - /* ... */ - "scripts": { - "prepare": "ts-patch install -s" - } -} - ``` +```shell +ts-patch patch typescript tsc +ts-patch unpatch typescript tsc +``` + +`tsserver.js` and `tsserverlibrary.js` are not persistent patch targets on TypeScript 6. Use the live routes above so +transformers still receive the correct library identity for those service entries. # Configuration @@ -107,7 +124,7 @@ ts-patch install { "transform": "transformer-module" }, { "transform": "transformer2", "extraOption": 123 }, { "transform": "trans-with-mapping", "resolvePathAliases": true }, - { "transform": "esm-transformer", "isEsm": true }, + { "transform": "esm-transformer.mjs" }, // Program Transformer { "transform": "transformer-module5", "transformProgram": true } @@ -124,7 +141,6 @@ ts-patch install | after | boolean | Apply transformer after stock TS transformers | | afterDeclarations | boolean | Apply transformer to declaration (*.d.ts) files | | transformProgram | boolean | Transform `Program` during `ts.createProgram()` _(see: [Program Transformers](#program-transformers))_ | -| isEsm | boolean | Transformer is ES Module (_note: experimental_ — requires [esm](https://www.npmjs.com/package/esm)) | | resolvePathAliases | boolean | Resolve path aliases in transformer (requires [tsconfig-paths](https://www.npmjs.com/package/tsconfig-paths)) | | type | string | See: [Source Transformer Entry Point](#source-transformer-entry-point) (default: 'program') | | import | string | Name of exported transformer function _(defaults to `default` export)_ | @@ -133,6 +149,8 @@ ts-patch install _Note: Required options are bold_ +_As of v4, `isEsm` has been removed. Transformer module format is inferred from the file extension and package metadata._ + # Writing Transformers For an overview of the typescript compiler (such as what a `SourceFile` and `Program` is) see: [Typescript Compiler Notes](https://github.com/microsoft/TypeScript-Compiler-Notes). @@ -329,6 +347,19 @@ Override patch cache directory Cleans patch cache & lockfiles +# Compatibility Direction + +TypeScript 6 changed the compiler distribution shape by introducing thin CommonJS shims around several implementation +files. ts-patch uses live routing where entry identity matters because a live route can preserve whether a tool requested +`typescript`, `tsc`, `tsserver`, or `tsserverlibrary` without permanently rewriting service-entry shims. + +For TypeScript 6, persistent patching is intentionally narrow: only `typescript.js` and `tsc.js` are patchable targets. +Service entries should be loaded through `ts-patch/compiler/tsserver` or `ts-patch/compiler/tsserverlibrary`. + +The TypeScript team has also announced a future Go-based compiler line. ts-patch will evaluate that implementation as a +separate compatibility track, including whether the JavaScript compiler API and transformer hooks remain available or +whether a redesigned integration is required. + # Maintainers diff --git a/jest.config.ts b/jest.config.js similarity index 64% rename from jest.config.ts rename to jest.config.js index f0b22c2..157f974 100644 --- a/jest.config.ts +++ b/jest.config.js @@ -1,16 +1,16 @@ -import type { Config } from '@jest/types'; -import * as os from 'os'; +const os = require('os'); -const config: Config.InitialOptions = { - testEnvironment: "node", +/** @type {import('@jest/types').Config.InitialOptions} */ +const config = { + testEnvironment: 'node', preset: 'ts-jest', roots: [ '/test/tests' ], testRegex: '.*(test|spec)\\.tsx?$', - moduleFileExtensions: [ 'ts', 'tsx', 'js', 'jsx', 'json', 'node' ], + moduleFileExtensions: [ 'ts', 'tsx', 'mts', 'cts', 'js', 'jsx', 'mjs', 'cjs', 'json', 'node' ], transform: { '^.+\\.(ts|tsx)$': ['ts-jest', { tsconfig: './test/tsconfig.json' }], }, - modulePaths: [ "/node_modules" ], + modulePaths: [ '/node_modules' ], // coveragePathIgnorePatterns: [ // 'src/installer/lib/system/errors.ts$' // ], @@ -21,6 +21,6 @@ const config: Config.InitialOptions = { '/node_modules/(?!(ts-transformer-keys|ts-transformer-enumerate|ts-nameof)/)' ], maxConcurrency: os.cpus().length -} +}; -export default config; +module.exports = config; diff --git a/package.json b/package.json index dbf158b..b9004ac 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,18 @@ "description": "Patch typescript to support custom transformers in tsconfig.json", "main": "./dist/index.js", "types": "./dist/index.d.ts", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + }, + "./compiler": "./dist/compiler/typescript.js", + "./compiler/typescript": "./dist/compiler/typescript.js", + "./compiler/tsc": "./dist/compiler/tsc.js", + "./compiler/tsserver": "./dist/compiler/tsserver.js", + "./compiler/tsserverlibrary": "./dist/compiler/tsserverlibrary.js", + "./package.json": "./package.json" + }, "scripts": { "compile": "yarn run compile:core && yarn run compile:patch", "build": "yarn run clean && yarn run compile:patch && yarn run compile:core", @@ -47,35 +59,36 @@ "chalk": "^4.1.2", "global-prefix": "^4.0.0", "minimist": "^1.2.8", - "resolve": "^1.22.2", - "semver": "^7.6.3", + "resolve": "^1.22.12", + "semver": "^7.7.4", "strip-ansi": "^6.0.1" }, "bin": { "ts-patch": "./dist/bin/ts-patch.js", "tspc": "./dist/bin/tspc.js" }, + "engines": { + "node": ">=22.15.0" + }, "devDependencies": { - "@types/esm": "^3.2.2", - "@types/jest": "^29.5.10", + "@types/jest": "^30.0.0", "@types/minimist": "^1.2.2", "@types/mock-fs": "^4.13.1", - "@types/node": "^16.11.5", + "@types/node": "^25.6.0", "@types/resolve": "^1.20.1", - "@types/semver": "^7.3.13", - "@types/shelljs": "^0.8.9", - "esm": "^3.2.25", - "jest": "^29.7.0", - "rimraf": "^5.0.7", - "shelljs": "^0.8.5", + "@types/semver": "^7.7.1", + "@types/shelljs": "^0.10.0", + "jest": "^30.3.0", + "rimraf": "^6.1.3", + "shelljs": "^0.10.0", "standard-version": "^9.5.0", - "ts-jest": "^29.1.1", + "ts-expose-internals": "npm:ts-expose-internals@5.6.3", + "ts-jest": "^29.4.9", + "ts-next": "npm:typescript@6.0.3", "ts-node": "^10.9.1", "ts-patch": "^3.3.0", "tsconfig-paths": "^4.2.0", - "typescript": "5.7.2", - "ts-next": "npm:typescript@beta", - "ts-expose-internals": "npm:ts-expose-internals@5.4.5" + "typescript": "6.0.3" }, "workspaces": { "packages": [ diff --git a/projects/core/resolver-hook.js b/projects/core/resolver-hook.js deleted file mode 100644 index bfd3a76..0000000 --- a/projects/core/resolver-hook.js +++ /dev/null @@ -1,55 +0,0 @@ -const path = require('path'); -const Module = require('module'); - - -/* ****************************************************************************************************************** */ -// region: Helpers -/* ****************************************************************************************************************** */ - -/** - * Enable rootDirs merge support for require (used with ts-node) - */ -function hookRequire() { - if (rootDirs.length > 0) { - const originalRequire = Module.prototype.require; - - Module.prototype.require = function (request) { - if (!path.isAbsolute(request) && request.startsWith('.')) { - const moduleDir = path.dirname(this.filename); - const moduleRootDir = rootDirs.find(rootDir => moduleDir.startsWith(rootDir)); - - if (moduleRootDir) { - const moduleRelativeFromRoot = path.relative(moduleRootDir, moduleDir); - - if (moduleRootDir) { - for (const rootDir of rootDirs) { - const possiblePath = path.join(rootDir, moduleRelativeFromRoot, request); - - let resolvedPath; - try { - resolvedPath = require.resolve(possiblePath); - } catch (e) { - continue; - } - - return originalRequire.call(this, resolvedPath); - } - } - } - } - - return originalRequire.call(this, request); - }; - } -} - -// endregion - -/* ****************************************************************************************************************** * - * Entry - * ****************************************************************************************************************** */ - -const tsConfig = require(path.join(__dirname, 'tsconfig.json')); -const rootDirs = tsConfig.compilerOptions.rootDirs.map(rootDir => path.join(__dirname, rootDir)); - -hookRequire(); diff --git a/projects/core/shared/plugin-types.ts b/projects/core/shared/plugin-types.ts index e9321d1..31e242d 100644 --- a/projects/core/shared/plugin-types.ts +++ b/projects/core/shared/plugin-types.ts @@ -37,11 +37,6 @@ export interface PluginConfig { */ import?: string; - /** - * Is the transformer an ES Module - */ - isEsm?: boolean - /** * Plugin entry point format type, default is program */ diff --git a/projects/core/src/actions/check.ts b/projects/core/src/actions/check.ts index 0c42821..76273dc 100644 --- a/projects/core/src/actions/check.ts +++ b/projects/core/src/actions/check.ts @@ -1,8 +1,8 @@ -import { LogLevel, PatchError } from '../system'; +import { assertSupportedTypeScript, LogLevel, PatchError } from '../system'; import chalk from 'chalk'; import { getTsPackage } from '../ts-package'; import { PatchDetail } from "../patch/patch-detail"; -import { getTsModule } from "../module"; +import { getTsModule, TsModule } from "../module"; import { getInstallerOptions, InstallerOptions } from "../options"; @@ -33,10 +33,12 @@ export function check(moduleNameOrNames?: string | string[], opts?: Partial TsModule.normalizePatchableName(name)) + : tsPackage.moduleNames.filter(name => (TsModule.patchableNames as readonly string[]).includes(name)); /* Check Modules */ log(`Checking TypeScript ${chalk.blueBright(`v${version}`)} installation in ${chalk.blueBright(packageDir)}\r\n`); @@ -45,7 +47,7 @@ export function check(moduleNameOrNames?: string | string[], opts?: Partial) { const options = getInstallerOptions(opts); const { logger: log } = options; - const ret = patch(defaultInstallLibraries, options); + const ret = patch([ ...TsModule.patchableNames ], options); if (ret) log([ '+', chalk.green(`ts-patch installed!`) ]); return ret; diff --git a/projects/core/src/actions/patch.ts b/projects/core/src/actions/patch.ts index 9a005d4..68dd379 100644 --- a/projects/core/src/actions/patch.ts +++ b/projects/core/src/actions/patch.ts @@ -1,7 +1,7 @@ -import { LogLevel, PatchError, TspError, } from '../system'; +import { assertSupportedTypeScript, LogLevel, PatchError, TspError, } from '../system'; import { getTsPackage } from '../ts-package'; import chalk from 'chalk'; -import { getModuleFile, getTsModule, ModuleFile } from '../module'; +import { getModuleFile, getTsModule, ModuleFile, TsModule } from '../module'; import path from 'path'; import { getInstallerOptions, InstallerOptions } from '../options'; import { writeFileWithLock } from '../utils'; @@ -18,7 +18,7 @@ import { getPatchedSource } from '../patch/get-patched-source'; export function patch(moduleName: string, opts?: Partial): boolean export function patch(moduleNames: string[], opts?: Partial): boolean export function patch(moduleNameOrNames: string | string[], opts?: Partial): boolean { - const targetModuleNames = [ moduleNameOrNames ].flat(); + const targetModuleNames = [ moduleNameOrNames ].flat().map(name => TsModule.normalizePatchableName(name)); if (!targetModuleNames.length) throw new PatchError(`Must provide at least one module name to patch`); const options = getInstallerOptions(opts); @@ -26,6 +26,7 @@ export function patch(moduleNameOrNames: string | string[], opts?: Partial 1) { + if (failedModulePaths.length > 0) { log([ '!', `Some files can't be patched! You can run again with --verbose to get specific error detail. The following files are unable to be ` + `patched:\n - ${failedModulePaths.join('\n - ')}` diff --git a/projects/core/src/actions/uninstall.ts b/projects/core/src/actions/uninstall.ts index d38e08e..3354f05 100644 --- a/projects/core/src/actions/uninstall.ts +++ b/projects/core/src/actions/uninstall.ts @@ -1,7 +1,7 @@ import chalk from 'chalk'; -import { defaultInstallLibraries } from '../config'; -import { unpatch } from './unpatch'; +import { TsModule } from '../module'; import { getInstallerOptions, InstallerOptions } from "../options"; +import { unpatch } from './unpatch'; /* ****************************************************************************************************************** */ @@ -15,7 +15,7 @@ export function uninstall(opts?: Partial) { const options = getInstallerOptions(opts); const { logger: log } = options; - const ret = unpatch(defaultInstallLibraries, opts); + const ret = unpatch([ ...TsModule.patchableNames ], options); if (ret) log([ '-', chalk.green(`ts-patch removed!`) ]); return ret; diff --git a/projects/core/src/actions/unpatch.ts b/projects/core/src/actions/unpatch.ts index ba13a14..ff87269 100644 --- a/projects/core/src/actions/unpatch.ts +++ b/projects/core/src/actions/unpatch.ts @@ -1,8 +1,8 @@ -import { LogLevel, PatchError, RestoreError } from '../system'; +import { assertSupportedTypeScript, LogLevel, PatchError, RestoreError } from '../system'; import chalk from 'chalk'; import path from 'path'; import { getTsPackage } from '../ts-package'; -import { getModuleFile, getTsModule, ModuleFile } from '../module'; +import { getModuleFile, getTsModule, ModuleFile, TsModule } from '../module'; import fs from 'fs'; import { getInstallerOptions, InstallerOptions } from '../options'; import { copyFileWithLock } from '../utils'; @@ -17,7 +17,7 @@ export function unpatch(moduleNames: string[], opts?: Partial) export function unpatch(moduleNameOrNames: string | string[], opts?: Partial): boolean { let res = false; - const targetModuleNames = [ moduleNameOrNames ].flat(); + const targetModuleNames = [ moduleNameOrNames ].flat().map(name => TsModule.normalizePatchableName(name)); if (!targetModuleNames.length) throw new PatchError(`Must provide at least one module name to patch`); const options = getInstallerOptions(opts); @@ -25,6 +25,7 @@ export function unpatch(moduleNameOrNames: string | string[], opts?: Partial`; export const modulePatchFilePath = path.resolve(appRoot, tspPackageJSON.directories.resources, 'module-patch.js'); diff --git a/projects/core/src/index.ts b/projects/core/src/index.ts index 9b5aec5..8620c79 100644 --- a/projects/core/src/index.ts +++ b/projects/core/src/index.ts @@ -1,4 +1,4 @@ export { InstallerOptions, getInstallerOptions } from './options'; -export { install, uninstall, patch, check } from './actions' +export { install, uninstall, patch, unpatch, check } from './actions' export { getLiveModule } from './module' export * from './plugin-types' diff --git a/projects/core/src/module/get-live-module.ts b/projects/core/src/module/get-live-module.ts index 4512370..64401bc 100644 --- a/projects/core/src/module/get-live-module.ts +++ b/projects/core/src/module/get-live-module.ts @@ -2,22 +2,46 @@ import path from 'path'; import { getTsModule, TsModule } from './ts-module'; import { getTsPackage } from '../ts-package'; import { getPatchedSource } from '../patch/get-patched-source'; +import { assertSupportedTypeScript } from '../system'; + + +/* ****************************************************************************************************************** */ +// region: Types +/* ****************************************************************************************************************** */ + +export interface GetLiveModuleOptions { + libraryName?: string +} + +// endregion /* ****************************************************************************************************************** */ // region: Utils /* ****************************************************************************************************************** */ -export function getLiveModule(moduleName: TsModule.Name) { +export function getLiveTypeScriptPath() { + return process.env.TSP_COMPILER_TS_PATH + ? path.resolve(process.env.TSP_COMPILER_TS_PATH) + : require.resolve('typescript'); +} + +export function getLiveTypeScriptPackage() { + return getTsPackage(getLiveTypeScriptPath()); +} + +export function getLiveModule(moduleName: TsModule.Name, opts?: GetLiveModuleOptions) { const skipCache = process.env.TSP_SKIP_CACHE === 'true'; - const tsPath = process.env.TSP_COMPILER_TS_PATH ? path.resolve(process.env.TSP_COMPILER_TS_PATH) : require.resolve('typescript'); + const libraryName = opts?.libraryName ?? String(moduleName).replace(/\.js$/, ''); /* Open the TypeScript module */ - const tsPackage = getTsPackage(tsPath); + const tsPackage = getLiveTypeScriptPackage(); + assertSupportedTypeScript(tsPackage); + const tsModule = getTsModule(tsPackage, moduleName, { skipCache }); /* Get patched version */ - const { js } = getPatchedSource(tsModule, { skipCache, skipDts: true }); + const { js } = getPatchedSource(tsModule, { skipCache, skipDts: true, libraryName }); return { js, tsModule }; } diff --git a/projects/core/src/module/index.ts b/projects/core/src/module/index.ts index 8645efc..f93b815 100644 --- a/projects/core/src/module/index.ts +++ b/projects/core/src/module/index.ts @@ -2,3 +2,4 @@ export * from './ts-module'; export * from './module-source'; export * from './module-file'; export * from './get-live-module'; +export * from './run-live-shim'; diff --git a/projects/core/src/module/run-live-shim.ts b/projects/core/src/module/run-live-shim.ts new file mode 100644 index 0000000..129adb5 --- /dev/null +++ b/projects/core/src/module/run-live-shim.ts @@ -0,0 +1,103 @@ +import Module from 'module'; +import path from 'path'; +import { runInThisContext } from 'vm'; +import { getLiveModule, getLiveTypeScriptPackage } from './get-live-module'; +import { getTsModule, TsModule } from './ts-module'; + + +/* ****************************************************************************************************************** */ +// region: Utils +/* ****************************************************************************************************************** */ + +export function runLiveShim(moduleName: TsModule.Name, parentModule: NodeJS.Module) { + const libraryName = String(moduleName).replace(/\.js$/, ''); + const tsPackage = getLiveTypeScriptPackage(); + const tsModule = getTsModule(tsPackage, moduleName); + + switch (moduleName) { + case 'tsserver.js': + case 'tsserverlibrary.js': + return evaluateModule( + tsModule.getUnpatchedModuleFile().content, + parentModule, + tsModule.moduleContentFilePath, + createPatchedRequire(tsPackage.libDir, libraryName, tsModule.moduleContentFilePath) + ); + + case 'tsc.js': + case 'typescript.js': { + const { js } = getLiveModule(moduleName, { libraryName }); + return evaluateModule( + js, + parentModule, + tsModule.moduleContentFilePath, + createPatchedRequire(tsPackage.libDir, libraryName, tsModule.moduleContentFilePath) + ); + } + + default: + throw new Error(`Unknown live TypeScript module: ${moduleName}`); + } +} + +function createPatchedRequire(libDir: string, libraryName: string, fromFile: string) { + const nativeRequire = Module.createRequire(fromFile); + + const patchedRequire = ((request: string) => { + const resolved = nativeRequire.resolve(request); + + if (isTsLibFile(resolved, libDir, 'typescript.js')) { + return requirePatchedModule('typescript.js', libraryName, resolved); + } + + if (isTsLibFile(resolved, libDir, '_tsc.js')) { + return requirePatchedModule('tsc.js', libraryName, resolved); + } + + return nativeRequire(request); + }) as NodeJS.Require; + + patchedRequire.resolve = nativeRequire.resolve; + patchedRequire.cache = nativeRequire.cache; + patchedRequire.extensions = nativeRequire.extensions; + patchedRequire.main = nativeRequire.main; + + return patchedRequire; +} + +function requirePatchedModule(moduleName: TsModule.Name, libraryName: string, resolvedPath: string) { + const syntheticModule = new Module(resolvedPath, module) as NodeJS.Module; + syntheticModule.filename = resolvedPath; + syntheticModule.paths = (Module as any)._nodeModulePaths(path.dirname(resolvedPath)); + + const localRequire = createPatchedRequire(path.dirname(resolvedPath), libraryName, resolvedPath); + syntheticModule.require = localRequire; + + const { js } = getLiveModule(moduleName, { libraryName }); + evaluateModule(js, syntheticModule, resolvedPath, localRequire); + + return syntheticModule.exports; +} + +function isTsLibFile(resolvedPath: string, libDir: string, fileName: string) { + return path.resolve(resolvedPath) === path.resolve(libDir, fileName); +} + +function evaluateModule(code: string, targetModule: NodeJS.Module, filePath: string, localRequire: NodeJS.Require) { + const script = runInThisContext(` + (function (exports, require, module, __filename, __dirname) { + ${code} + }); + `, { filename: filePath }); + + return script.call( + targetModule.exports, + targetModule.exports, + localRequire, + targetModule, + filePath, + path.dirname(filePath) + ); +} + +// endregion diff --git a/projects/core/src/module/ts-module.ts b/projects/core/src/module/ts-module.ts index 74d37b0..acb8b70 100644 --- a/projects/core/src/module/ts-module.ts +++ b/projects/core/src/module/ts-module.ts @@ -2,7 +2,7 @@ import path from 'path'; import fs from 'fs'; import type { TsPackage } from '../ts-package'; import { getModuleSource, ModuleSource } from './module-source'; -import { getCachePath, TspError } from '../system'; +import { getCachePath, PatchError, TspError } from '../system'; import { getModuleFile, ModuleFile } from './module-file'; import { cachedFilePatchedPrefix } from '../config'; @@ -12,14 +12,16 @@ import { cachedFilePatchedPrefix } from '../config'; /* ****************************************************************************************************************** */ export namespace TsModule { - export const names = [ 'tsc.js', 'tsserverlibrary.js', 'typescript.js', 'tsserver.js' ]; + export const knownNames = [ 'tsc.js', 'typescript.js', 'tsserver.js', 'tsserverlibrary.js' ]; + export const patchableNames = [ 'tsc.js', 'typescript.js' ] satisfies readonly typeof knownNames[number][]; + export const legacyServiceNames = [ 'tsserver.js', 'tsserverlibrary.js' ] satisfies readonly typeof knownNames[number][]; export const contentFileMap: Record = { 'tsc.js': '_tsc.js', 'tsserver.js': '_tsserver.js' - } satisfies Partial>; + } satisfies Partial>; - export function getContentFileName(moduleName: typeof names[number]): string { + export function getContentFileName(moduleName: typeof knownNames[number]): string { return contentFileMap[moduleName] || moduleName; } @@ -35,6 +37,29 @@ export namespace TsModule { return moduleContentPath; } + + export function normalizeName(name: string): string { + return /\.js$/.test(name) ? name : `${name}.js`; + } + + export function normalizePatchableName(name: string): typeof patchableNames[number] { + const normalized = normalizeName(name); + + if ((patchableNames as readonly string[]).includes(normalized)) { + return normalized as typeof patchableNames[number]; + } + + if ((legacyServiceNames as readonly string[]).includes(normalized)) { + throw new PatchError( + `${name} is no longer a patchable target on TypeScript 6. ` + + `Use ts-patch/compiler/${normalized.replace(/\.js$/, '')} for live patched routing instead.`, + { code: 'PATCH_TARGET_UNSUPPORTED' } + ); + } + + throw new PatchError(`Unknown TypeScript module: ${name}`, { code: 'UNKNOWN_MODULE' }); + } + } // endregion @@ -65,7 +90,7 @@ export interface TsModule { } export namespace TsModule { - export type Name = (typeof names)[number] | string; + export type Name = (typeof knownNames)[number] | string; } export interface GetTsModuleOptions { diff --git a/projects/core/src/patch/get-patched-source.ts b/projects/core/src/patch/get-patched-source.ts index e084c70..72babc6 100644 --- a/projects/core/src/patch/get-patched-source.ts +++ b/projects/core/src/patch/get-patched-source.ts @@ -1,10 +1,11 @@ -import { Logger, LogLevel } from '../system'; +import { getCachePath, Logger, LogLevel } from '../system'; import chalk from 'chalk'; import path from 'path'; import { copyFileWithLock, mkdirIfNotExist, readFileWithLock, writeFileWithLock } from '../utils'; import fs from 'fs'; import { getModuleFile, TsModule } from '../module'; import { patchModule } from './patch-module'; +import { cachedFilePatchedPrefix } from '../config'; /* ****************************************************************************************************************** */ @@ -15,6 +16,7 @@ export interface GetPatchedSourceOptions { log?: Logger skipCache?: boolean skipDts?: boolean + libraryName?: string } // endregion @@ -27,8 +29,12 @@ export interface GetPatchedSourceOptions { export function getPatchedSource(tsModule: TsModule, options?: GetPatchedSourceOptions): { js: string, dts: string | undefined, loadedFromCache: boolean } { - const { backupCachePaths, patchedCachePaths } = tsModule; - const { log, skipCache } = options || {}; + const { backupCachePaths } = tsModule; + const { log, skipCache, libraryName } = options || {}; + const defaultLibraryName = tsModule.moduleName.replace(/\.js$/, ''); + const patchedCachePaths = libraryName && libraryName !== defaultLibraryName + ? getLibraryPatchedCachePaths(tsModule, libraryName) + : tsModule.patchedCachePaths; /* Write backup if not patched */ if (!tsModule.isPatched) { @@ -48,7 +54,7 @@ export function getPatchedSource(tsModule: TsModule, options?: GetPatchedSourceO /* Get Patched Module */ const canUseCache = !skipCache && !tsModule.moduleFile.patchDetail?.isOutdated - && (!patchedCachePaths.dts || fs.existsSync(patchedCachePaths.dts)) + && (options?.skipDts || !patchedCachePaths.dts || fs.existsSync(patchedCachePaths.dts)) && fs.existsSync(patchedCachePaths.js) && !getModuleFile(patchedCachePaths.js).patchDetail?.isOutdated; @@ -58,7 +64,7 @@ export function getPatchedSource(tsModule: TsModule, options?: GetPatchedSourceO js = readFileWithLock(patchedCachePaths.js); dts = !options?.skipDts && patchedCachePaths.dts ? readFileWithLock(patchedCachePaths.dts) : undefined; } else { - const res = patchModule(tsModule, options?.skipDts); + const res = patchModule(tsModule, { skipDts: options?.skipDts, libraryName }); js = res.js; dts = res.dts; @@ -82,4 +88,18 @@ export function getPatchedSource(tsModule: TsModule, options?: GetPatchedSourceO return { js, dts, loadedFromCache: canUseCache }; } +function getLibraryPatchedCachePaths(tsModule: TsModule, libraryName: string) { + const jsName = withLibraryName(tsModule.moduleName, libraryName); + const dtsName = tsModule.dtsPath && withLibraryName(path.basename(tsModule.dtsPath), libraryName); + + return { + js: getCachePath(tsModule.cacheKey, cachedFilePatchedPrefix + jsName), + dts: dtsName && getCachePath(tsModule.cacheKey, cachedFilePatchedPrefix + dtsName) + }; +} + +function withLibraryName(fileName: string, libraryName: string) { + return fileName.replace(/(\.d\.ts|(?:\.[^.]+))$/, `@${libraryName}$1`); +} + // endregion diff --git a/projects/core/src/patch/patch-module.ts b/projects/core/src/patch/patch-module.ts index d5efef9..2bf5f72 100644 --- a/projects/core/src/patch/patch-module.ts +++ b/projects/core/src/patch/patch-module.ts @@ -4,7 +4,7 @@ import { defaultNodePrinterOptions, dtsPatchFilePath, execTscCmd, modulePatchFil import { getTsModule, TsModule } from '../module'; import { addOriginalCreateProgramTransformer, createMergeStatementsTransformer, createProgramExportFiles, - fixTsEarlyReturnTransformer, hookTscExecTransformer, patchCreateProgramTransformer, patchEmitterTransformer + hookTscExecTransformer, patchCreateProgramTransformer, patchEmitterTransformer } from './transformers'; import { SourceSection } from '../module/source-section'; import { PatchError } from '../system'; @@ -22,11 +22,23 @@ const jsPatchSrc = fs.readFileSync(modulePatchFilePath, 'utf-8') // endregion +/* ****************************************************************************************************************** */ +// region: Types +/* ****************************************************************************************************************** */ + +export interface PatchModuleOptions { + skipDts?: boolean + libraryName?: string +} + +// endregion + + /* ****************************************************************************************************************** */ // region: Utils /* ****************************************************************************************************************** */ -export function patchModule(tsModule: TsModule, skipDts: boolean = false): { js: string, dts?: string } { +export function patchModule(tsModule: TsModule, options?: PatchModuleOptions): { js: string, dts?: string } { let shouldWrap: boolean = false; switch (tsModule.moduleName) { case 'tsc.js': @@ -61,15 +73,6 @@ export function patchModule(tsModule: TsModule, skipDts: boolean = false): { js: } source.body.unshift(...tsSource.body); - - /* Fix early return */ - // NOTE - This exists up until TS 5.4, but isn't there for 5.5+ - if (tsModule.majorVer <= 5 && tsModule.minorVer <= 4) { - const typescriptSection = source.body.find(s => s.srcFileName === 'src/typescript/typescript.ts'); - if (!typescriptSection) throw new PatchError(`Could not find Typescript source section`); - typescriptSection.transform([ fixTsEarlyReturnTransformer ]); - printableBodyFooters.push(`return returnResult;`); - } } /* Patch Program */ @@ -115,7 +118,7 @@ export function patchModule(tsModule: TsModule, skipDts: boolean = false): { js: /* Get Dts */ let dts: string | undefined; - if (!skipDts && tsModule.dtsPath) { + if (!options?.skipDts && tsModule.dtsPath) { const dtsText = readFileWithLock(tsModule.dtsPath); dts = dtsPatchSrc + '\n' + @@ -123,7 +126,7 @@ export function patchModule(tsModule: TsModule, skipDts: boolean = false): { js: } /* Get JS */ - const libraryName = tsModule.moduleName.replace(/\.js$/, ''); + const libraryName = options?.libraryName ?? tsModule.moduleName.replace(/\.js$/, ''); const patchDetail = PatchDetail.fromModule(tsModule, printedJs); const js = patchDetail.toHeader() + '\n' + diff --git a/projects/core/src/patch/transformers/add-original-create-program.ts b/projects/core/src/patch/transformers/add-original-create-program.ts index 8e8a6a1..66c419f 100644 --- a/projects/core/src/patch/transformers/add-original-create-program.ts +++ b/projects/core/src/patch/transformers/add-original-create-program.ts @@ -7,11 +7,7 @@ import { PatchError } from '../../system'; /* ****************************************************************************************************************** */ export const createProgramExportFiles = [ - /* TS < 5.4 */ - 'src/typescript/_namespaces/ts.ts', - - /* TS >= 5.4 */ - 'src/server/_namespaces/ts.ts', + /* TS >= 6 */ 'src/typescript/typescript.ts' ] diff --git a/projects/core/src/slice/module-slice.ts b/projects/core/src/slice/module-slice.ts index e27fd84..2b555c5 100644 --- a/projects/core/src/slice/module-slice.ts +++ b/projects/core/src/slice/module-slice.ts @@ -1,9 +1,7 @@ import { ModuleFile } from '../module'; import { Position } from '../system'; import semver from 'semver'; -import { sliceTs54 } from './ts54'; -import { sliceTs55 } from './ts55'; -import { sliceTs552 } from './ts552'; +import { sliceTs6 } from './ts6'; /* ****************************************************************************************************************** */ @@ -34,19 +32,11 @@ export function sliceModule(moduleFile: ModuleFile, tsVersion: string) { const baseVersion = semver.coerce(tsVersion, { includePrerelease: false }); if (!baseVersion) throw new Error(`Could not parse TS version: ${tsVersion}`); - if (semver.lt(baseVersion, '5.0.0')) { - throw new Error(`Cannot patch TS version <5`); + if (semver.lt(baseVersion, '6.0.0')) { + throw new Error(`Cannot patch TS version <6`); } - if (semver.lt(baseVersion, '5.5.0')) { - return sliceTs54(moduleFile); - } - - if (semver.lt(baseVersion, '5.5.2')) { - return sliceTs55(moduleFile); - } - - return sliceTs552(moduleFile); + return sliceTs6(moduleFile); } /** @internal */ @@ -56,4 +46,3 @@ export namespace ModuleSlice { } // endregion - diff --git a/projects/core/src/slice/ts54.ts b/projects/core/src/slice/ts54.ts deleted file mode 100644 index a5912eb..0000000 --- a/projects/core/src/slice/ts54.ts +++ /dev/null @@ -1,79 +0,0 @@ -import { ModuleFile } from '../module'; -import { ModuleSlice } from './module-slice'; - - -/* ****************************************************************************************************************** */ -// region: Utils -/* ****************************************************************************************************************** */ - -/** - * Slice 5.0 - 5.4 - */ -export function sliceTs54(moduleFile: ModuleFile): ModuleSlice { - let firstSourceFileStart: number; - let wrapperStart: number | undefined; - let wrapperEnd: number | undefined; - let bodyStart: number; - let bodyEnd: number; - let sourceFileStarts: [ name: string, position: number ][] = []; - - const { content } = moduleFile; - - /* Find Wrapper or First File */ - let matcher = /^(?:\s*\/\/\s*src\/)|(?:var\s+ts\s*=.+)/gm; - - const firstMatch = matcher.exec(content); - if (!firstMatch?.[0]) throw ModuleSlice.createError(); - - /* Handle wrapped */ - if (firstMatch[0].startsWith('var')) { - wrapperStart = firstMatch.index; - bodyStart = firstMatch.index + firstMatch[0].length + 1; - - /* Find First File */ - matcher = /^\s*\/\/\s*src\//gm; - matcher.lastIndex = wrapperStart; - - const firstFileMatch = matcher.exec(content); - if (!firstFileMatch?.[0]) throw ModuleSlice.createError(); - - firstSourceFileStart = firstFileMatch.index; - - /* Find Wrapper end */ - matcher = /^}\)\(\)\s*;?/gm; - matcher.lastIndex = firstFileMatch.index; - const wrapperEndMatch = matcher.exec(content); - if (!wrapperEndMatch?.[0]) throw ModuleSlice.createError(); - - bodyEnd = wrapperEndMatch.index - 1; - wrapperEnd = wrapperEndMatch.index + wrapperEndMatch[0].length; - } - /* Handle non-wrapped */ - else { - firstSourceFileStart = firstMatch.index; - bodyStart = firstMatch.index + firstMatch[0].length; - bodyEnd = content.length; - } - - /* Get Source File Positions */ - matcher = /^\s*\/\/\s*(src\/.+)$/gm; - matcher.lastIndex = firstSourceFileStart; - for (let match = matcher.exec(content); match != null; match = matcher.exec(content)) { - sourceFileStarts.push([ match[1], match.index ]); - } - - return { - moduleFile, - firstSourceFileStart, - wrapperPos: wrapperStart != null ? { start: wrapperStart, end: wrapperEnd! } : undefined, - fileEnd: content.length, - bodyPos: { start: bodyStart, end: bodyEnd }, - sourceFileStarts, - bodyWrapper: { - start: 'var ts = (() => {', - end: '})();' - } - }; -} - -// endregion diff --git a/projects/core/src/slice/ts55.ts b/projects/core/src/slice/ts55.ts deleted file mode 100644 index 84e887e..0000000 --- a/projects/core/src/slice/ts55.ts +++ /dev/null @@ -1,80 +0,0 @@ -import { ModuleFile } from '../module'; -import { ModuleSlice } from './module-slice'; - - -/* ****************************************************************************************************************** */ -// region: Utils -/* ****************************************************************************************************************** */ - -/** - * Slice 5.5+ - */ -export function sliceTs55(moduleFile: ModuleFile): ModuleSlice { - let firstSourceFileStart: number; - let wrapperStart: number | undefined; - let wrapperEnd: number | undefined; - let bodyStart: number; - let bodyEnd: number; - let sourceFileStarts: [ name: string, position: number ][] = []; - - const { content } = moduleFile; - - /* Find Wrapper or First File */ - let matcher = /^(?:\s*\/\/\s*src\/)|(?:var\s+ts\s*=.+)/gm; - - const firstMatch = matcher.exec(content); - if (!firstMatch?.[0]) throw ModuleSlice.createError(); - let bodyWrapper: undefined | { start: string; end: string } = undefined; - - /* Handle wrapped */ - if (firstMatch[0].startsWith('var')) { - wrapperStart = firstMatch.index; - bodyStart = firstMatch.index + firstMatch[0].length + 1; - - /* Find First File */ - matcher = /^\s*\/\/\s*src\//gm; - matcher.lastIndex = wrapperStart; - - const firstFileMatch = matcher.exec(content); - if (!firstFileMatch?.[0]) throw ModuleSlice.createError(); - - firstSourceFileStart = firstFileMatch.index; - - /* Find Wrapper end */ - // TODO - We may later want to find a better approach, but this will work for now - matcher = /^}\)\(typeof module !== "undefined" .+$/gm; - matcher.lastIndex = firstFileMatch.index; - const wrapperEndMatch = matcher.exec(content); - if (!wrapperEndMatch?.[0]) throw ModuleSlice.createError(); - - bodyEnd = wrapperEndMatch.index - 1; - wrapperEnd = wrapperEndMatch.index + wrapperEndMatch[0].length; - - bodyWrapper = { start: firstMatch[0], end: wrapperEndMatch[0] }; - } - /* Handle non-wrapped */ - else { - firstSourceFileStart = firstMatch.index; - bodyStart = firstMatch.index + firstMatch[0].length; - bodyEnd = content.length; - } - - /* Get Source File Positions */ - matcher = /^\s*\/\/\s*(src\/.+)$/gm; - matcher.lastIndex = firstSourceFileStart; - for (let match = matcher.exec(content); match != null; match = matcher.exec(content)) { - sourceFileStarts.push([ match[1], match.index ]); - } - - return { - moduleFile, - firstSourceFileStart, - wrapperPos: wrapperStart != null ? { start: wrapperStart, end: wrapperEnd! } : undefined, - fileEnd: content.length, - bodyPos: { start: bodyStart, end: bodyEnd }, - sourceFileStarts, - bodyWrapper - }; -} - -// endregion diff --git a/projects/core/src/slice/ts552.ts b/projects/core/src/slice/ts6.ts similarity index 93% rename from projects/core/src/slice/ts552.ts rename to projects/core/src/slice/ts6.ts index e9b3709..b0dd9b3 100644 --- a/projects/core/src/slice/ts552.ts +++ b/projects/core/src/slice/ts6.ts @@ -6,10 +6,7 @@ import { ModuleSlice } from './module-slice'; // region: Utils /* ****************************************************************************************************************** */ -/** - * Slice 5.5.2+ - */ -export function sliceTs552(moduleFile: ModuleFile): ModuleSlice { +export function sliceTs6(moduleFile: ModuleFile): ModuleSlice { let firstSourceFileStart: number; let wrapperStart: number | undefined; let wrapperEnd: number | undefined; @@ -41,7 +38,6 @@ export function sliceTs552(moduleFile: ModuleFile): ModuleSlice { firstSourceFileStart = firstFileMatch.index; /* Find Wrapper end */ - // TODO - We may later want to find a better approach, but this will work for now matcher = /^}\)\({ get exports\(\) { return ts; }.+$/gm; matcher.lastIndex = firstFileMatch.index; const wrapperEndMatch = matcher.exec(content); diff --git a/projects/core/src/system/assert-supported-typescript.ts b/projects/core/src/system/assert-supported-typescript.ts new file mode 100644 index 0000000..40afd2d --- /dev/null +++ b/projects/core/src/system/assert-supported-typescript.ts @@ -0,0 +1,19 @@ +import type { TsPackage } from '../ts-package'; +import { PatchError } from './errors'; + + +/* ****************************************************************************************************************** */ +// region: Utils +/* ****************************************************************************************************************** */ + +export function assertSupportedTypeScript(tsPackage: TsPackage): void { + if (tsPackage.majorVer < 6) { + throw new PatchError( + `ts-patch v4 requires TypeScript >= 6. Found ${tsPackage.version}. ` + + `Use the previous ts-patch major for older TypeScript versions.`, + { code: 'TS_VERSION_UNSUPPORTED' } + ); + } +} + +// endregion diff --git a/projects/core/src/system/errors.ts b/projects/core/src/system/errors.ts index 7f923a8..e24df35 100644 --- a/projects/core/src/system/errors.ts +++ b/projects/core/src/system/errors.ts @@ -10,7 +10,20 @@ export class FileNotFound extends TspError {name = 'FileNotFound'} export class PackageError extends TspError {name = 'PackageError'} -export class PatchError extends TspError {name = 'PatchError'} +export type PatchErrorCode = + | 'PATCH_TARGET_UNSUPPORTED' + | 'UNKNOWN_MODULE' + | 'TS_VERSION_UNSUPPORTED'; + +export class PatchError extends TspError { + name = 'PatchError'; + code?: PatchErrorCode; + + constructor(message: string, opts?: { code?: PatchErrorCode }) { + super(message); + if (opts?.code) this.code = opts.code; + } +} export class PersistenceError extends TspError {name = 'PersistenceError'} diff --git a/projects/core/src/system/index.ts b/projects/core/src/system/index.ts index 8e68171..98a4401 100644 --- a/projects/core/src/system/index.ts +++ b/projects/core/src/system/index.ts @@ -1,4 +1,5 @@ export * from './cache'; export * from './errors'; +export * from './assert-supported-typescript'; export * from './logger'; export * from './types'; diff --git a/projects/core/src/ts-package.ts b/projects/core/src/ts-package.ts index 6747c18..0e06484 100644 --- a/projects/core/src/ts-package.ts +++ b/projects/core/src/ts-package.ts @@ -71,7 +71,7 @@ export function getTsPackage(dir: string = process.cwd()): TsPackage { /* Get all available module names in libDir */ const moduleNames: TsModule.Name[] = []; for (const fileName of fs.readdirSync(libDir)) - if ((TsModule.names).includes(fileName)) moduleNames.push(fileName as TsModule.Name); + if ((TsModule.knownNames as readonly string[]).includes(fileName)) moduleNames.push(fileName as TsModule.Name); const res: TsPackage = { version, diff --git a/projects/core/tsconfig.json b/projects/core/tsconfig.json index fba1f7f..0353537 100644 --- a/projects/core/tsconfig.json +++ b/projects/core/tsconfig.json @@ -8,10 +8,12 @@ "sourceMap" : true, "composite" : true, "declaration" : true, + "types" : [ "node" ], "plugins" : [ { "transform" : "./plugin.ts", + "tsConfig" : "./tsconfig.plugin.json", "transformProgram" : true } ] diff --git a/projects/core/tsconfig.plugin.json b/projects/core/tsconfig.plugin.json new file mode 100644 index 0000000..9b7738e --- /dev/null +++ b/projects/core/tsconfig.plugin.json @@ -0,0 +1,9 @@ +{ + "extends": "./tsconfig.json", + "include": [ + "plugin.ts" + ], + "compilerOptions": { + "plugins": [] + } +} diff --git a/projects/patch/src/plugin/compiler-loader.ts b/projects/patch/src/plugin/compiler-loader.ts new file mode 100644 index 0000000..652346e --- /dev/null +++ b/projects/patch/src/plugin/compiler-loader.ts @@ -0,0 +1,285 @@ +namespace tsp { + const fs = require('fs'); + const path = require('path'); + const url = require('url'); + const moduleApi = require('module'); + + interface CompiledTransformer { + format: TsFileFormat; + source: string; + } + + /* ********************************************************* */ + // region: Helpers + /* ********************************************************* */ + + function isTypeScriptPath(filePath: string) { + return tsExtensions.includes(path.extname(filePath)); + } + + function isBuiltinModule(specifier: string) { + const builtinModules = moduleApi.builtinModules as string[] | undefined; + const normalized = specifier.replace(/^node:/, ''); + return builtinModules?.includes(specifier) || builtinModules?.includes(normalized); + } + + function getParentDir(parentURL: string | undefined) { + if (!parentURL) return process.cwd(); + if (!parentURL.startsWith('file:')) return process.cwd(); + return path.dirname(url.fileURLToPath(parentURL)); + } + + function maybeFileURLToPath(specifier: string) { + return specifier.startsWith('file:') ? url.fileURLToPath(specifier) : undefined; + } + + function tryFile(filePath: string): string | undefined { + try { + const stat = fs.statSync(filePath); + return stat.isFile() ? filePath : undefined; + } catch { + return undefined; + } + } + + function resolveTypeScriptFile(basePath: string): string | undefined { + const ext = path.extname(basePath); + + if (tsExtensions.includes(ext)) return tryFile(basePath); + + const extensionReplacements: Record = { + '.js': [ '.ts' ], + '.mjs': [ '.mts' ], + '.cjs': [ '.cts' ] + }; + + for (const replacementExt of extensionReplacements[ext] || []) { + const candidate = basePath.slice(0, -ext.length) + replacementExt; + const res = tryFile(candidate); + if (res) return res; + } + + if (!ext) { + for (const candidateExt of tsExtensions) { + const res = tryFile(basePath + candidateExt); + if (res) return res; + } + + for (const candidateExt of tsExtensions) { + const res = tryFile(path.join(basePath, 'index' + candidateExt)); + if (res) return res; + } + } + + return undefined; + } + + function getTypeScriptModulePath(specifier: string, parentURL: string | undefined, registerConfig: RegisterConfig): string | undefined { + if (isBuiltinModule(specifier)) return undefined; + + const fileURLPath = maybeFileURLToPath(specifier); + if (fileURLPath) return resolveTypeScriptFile(fileURLPath); + + if (path.isAbsolute(specifier)) return resolveTypeScriptFile(specifier); + + if (specifier.startsWith('.')) { + return resolveTypeScriptFile(path.resolve(getParentDir(parentURL), specifier)); + } + + const { compilerOptions, pluginConfig } = registerConfig; + if (pluginConfig.resolvePathAliases && compilerOptions?.baseUrl && compilerOptions.paths) { + const matchPath = getTsConfigPaths().createMatchPath( + compilerOptions.baseUrl, + compilerOptions.paths + ); + + const matchedPath = matchPath( + specifier, + undefined, + fs.existsSync, + supportedExtensions + ); + + if (matchedPath) return resolveTypeScriptFile(matchedPath); + } + + return undefined; + } + + function getCompilerOptions(registerConfig: RegisterConfig): tsShim.CompilerOptions { + const baseOptions = registerConfig.compilerOptions || {}; + + const compilerOptions: tsShim.CompilerOptions = { + ...baseOptions, + target: baseOptions.target ?? tsShim.ScriptTarget.ES2022, + jsx: baseOptions.jsx ?? tsShim.JsxEmit.React, + esModuleInterop: baseOptions.esModuleInterop ?? true, + module: baseOptions.module ?? tsShim.ModuleKind.NodeNext, + sourceMap: true, + inlineSourceMap: false, + inlineSources: true, + declaration: false, + declarationMap: false, + emitDeclarationOnly: false, + noEmit: false, + outDir: undefined, + outFile: undefined, + composite: undefined, + declarationDir: undefined + }; + + if (baseOptions.module === undefined) { + compilerOptions.moduleResolution = baseOptions.moduleResolution ?? tsShim.ModuleResolutionKind.NodeNext; + } else if (baseOptions.moduleResolution !== undefined) { + compilerOptions.moduleResolution = baseOptions.moduleResolution; + } + + return compilerOptions; + } + + function getTranspileCompilerOptions(format: TsFileFormat, compilerOptions: tsShim.CompilerOptions): tsShim.CompilerOptions { + // transpileModule does not receive Program package-scope metadata, so normalize + // emit to the already-classified runtime format. + const transpileOptions: tsShim.CompilerOptions = { + ...compilerOptions, + module: format === 'module' ? tsShim.ModuleKind.ESNext : tsShim.ModuleKind.CommonJS + }; + + delete transpileOptions.moduleResolution; + return transpileOptions; + } + + function formatDiagnostics(diagnostics: readonly tsShim.Diagnostic[]) { + const diagnosticHost = { + getCurrentDirectory: () => process.cwd(), + getCanonicalFileName: (fileName: string) => fileName, + getNewLine: () => tsShim.sys.newLine + }; + + const formatter = tsShim.formatDiagnosticsWithColorAndContext || tsShim.formatDiagnostics; + return formatter(diagnostics, diagnosticHost); + } + + function getTranspileDiagnostics(diagnostics: readonly tsShim.Diagnostic[] | undefined) { + const ignoredDiagnostics = new Set([ 6059, 18002, 18003 ]); + return (diagnostics || []).filter(diagnostic => !ignoredDiagnostics.has(diagnostic.code)); + } + + function inlineSourceMap(outputText: string, sourceMapText: string | undefined) { + if (!sourceMapText) return outputText; + + const sourceMapComment = `//# sourceMappingURL=data:application/json;charset=utf-8;base64,${Buffer.from(sourceMapText, 'utf8').toString('base64')}`; + const outputWithoutSourceMap = outputText.replace(/\r?\n?\/\/# sourceMappingURL=.*(?:\r?\n)?$/, ''); + + return `${outputWithoutSourceMap}\n${sourceMapComment}`; + } + + function compileTransformer(filePath: string, registerConfig: RegisterConfig): CompiledTransformer { + const sourceText = fs.readFileSync(filePath, 'utf8'); + const compilerOptions = getCompilerOptions(registerConfig); + const format = getEmitFormat(filePath, sourceText, compilerOptions); + + if (format === 'unsupported') { + const moduleKind = compilerOptions.module === undefined ? 'undefined' : tsShim.ModuleKind[compilerOptions.module]; + throw new TsPatchError( + `Transformer "${filePath}" uses tsConfig "module" setting "${moduleKind}", which is not loadable in Node. ` + + `Use CommonJS, ES2015 or later, ESNext, Node16, NodeNext, or a module-specific extension such as ".cts" or ".mts".` + ); + } + + const result = tsShim.transpileModule(sourceText, { + compilerOptions: getTranspileCompilerOptions(format, compilerOptions), + fileName: filePath, + reportDiagnostics: true + }); + + const diagnostics = getTranspileDiagnostics(result.diagnostics); + if (diagnostics.length) { + throw new TsPatchError( + `Unable to compile TypeScript transformer "${filePath}":\n` + formatDiagnostics(diagnostics) + ); + } + + return { + format, + source: inlineSourceMap(result.outputText, result.sourceMapText) + }; + } + + // endregion + + /* ********************************************************* */ + // region: Utils + /* ********************************************************* */ + + export function registerCompilerLoader(registerConfig: RegisterConfig): () => void { + if (typeof moduleApi.registerHooks !== 'function') { + throw new TsPatchError('TypeScript transformer loading requires Node.js >=22.15.0 with module.registerHooks().'); + } + + const compiledFiles = new Map(); + + const hooks = moduleApi.registerHooks({ + resolve(specifier: string, context: any, nextResolve: Function) { + const parentURL = context?.parentURL as string | undefined; + + const explicitTsPath = getTypeScriptModulePath(specifier, parentURL, registerConfig); + if (explicitTsPath) { + return { + url: url.pathToFileURL(explicitTsPath).href, + shortCircuit: true + }; + } + + try { + const resolved = nextResolve(specifier, context); + if (resolved?.url?.startsWith('file:')) { + const resolvedPath = url.fileURLToPath(resolved.url); + if (isTypeScriptPath(resolvedPath)) { + return { + url: resolved.url, + shortCircuit: true + }; + } + } + return resolved; + } catch (e) { + const fallbackPath = getTypeScriptModulePath(specifier, parentURL, registerConfig); + if (fallbackPath) { + return { + url: url.pathToFileURL(fallbackPath).href, + shortCircuit: true + }; + } + throw e; + } + }, + + load(fileURL: string, context: any, nextLoad: Function) { + if (!fileURL.startsWith('file:')) return nextLoad(fileURL, context); + + const filePath = url.fileURLToPath(fileURL); + if (!isTypeScriptPath(filePath)) return nextLoad(fileURL, context); + + let compiledFile = compiledFiles.get(filePath); + if (!compiledFile) { + compiledFile = compileTransformer(filePath, registerConfig); + compiledFiles.set(filePath, compiledFile); + } + + return { + format: compiledFile.format, + source: compiledFile.source, + shortCircuit: true + }; + } + }); + + return () => { + compiledFiles.clear(); + hooks.deregister(); + }; + } + + // endregion +} diff --git a/projects/patch/src/plugin/esm-intercept.ts b/projects/patch/src/plugin/esm-intercept.ts deleted file mode 100644 index 1cfdc16..0000000 --- a/projects/patch/src/plugin/esm-intercept.ts +++ /dev/null @@ -1,131 +0,0 @@ -namespace tsp { - const Module = require('module'); - const path = require('path'); - const fs = require('fs'); - const crypto = require('crypto'); - - /* ********************************************************* */ - // region: Helpers - /* ********************************************************* */ - - function getEsmLibrary() { - try { - return require('esm') as typeof import('esm'); - } catch (e) { - if (e.code === 'MODULE_NOT_FOUND') - throw new TsPatchError( - `Plugin is an ESM module. To enable experimental ESM support, ` + - `install the 'esm' package as a (dev)-dependency or global.` - ); - else throw e; - } - } - - // endregion - - /* ********************************************************* */ - // region: Utils - /* ********************************************************* */ - - export function registerEsmIntercept(registerConfig: RegisterConfig): () => void { - const originalRequire = Module.prototype.require; - const builtFiles = new Map(); - - const getHash = () => { - let hash: string; - do { - hash = crypto.randomBytes(16).toString('hex'); - } while (builtFiles.has(hash)); - - return hash; - } - - /* Create cleanup function */ - const cleanup = () => { - /* Cleanup temp ESM files */ - for (const { 1: filePath } of builtFiles) { - delete require.cache[filePath]; - try { - fs.rmSync(filePath, { force: true, maxRetries: 3 }); - } catch (e) { - if (process.env.NODE_ENV !== 'production') - console.warn(`[ts-patch] Warning: Failed to delete temporary esm cache file: ${filePath}.`); - } - } - - builtFiles.clear(); - Module.prototype.require = originalRequire; - } - - /* Set Hooks */ - try { - Module.prototype.require = wrappedRequire; - } catch (e) { - cleanup(); - } - - /* ********************************************************* * - * Helpers - * ********************************************************* */ - - function wrappedRequire(this: unknown, request: string) { - try { - return originalRequire.apply(this, arguments); - } catch (e) { - if (e.code === 'ERR_REQUIRE_ESM') { - const resolvedPath = Module._resolveFilename(request, this, false); - const resolvedPathExt = path.extname(resolvedPath); - - if (Module._cache[resolvedPath]) return Module._cache[resolvedPath].exports; - - /* Compile TS */ - let targetFilePath: string; - if (tsExtensions.includes(resolvedPathExt)) { - if (!builtFiles.has(resolvedPath)) { - const tsCode = fs.readFileSync(resolvedPath, 'utf8'); - - // NOTE - I don't know why, but if you supply a *.ts file to tsNode.compile it will be output as cjs, - // regardless of the tsConfig properly specifying ESNext for module and target. Notably, this issue seems - // to have started with TS v5.5, - // - // To work around, we will tell ts-node that it's an "mts" file. - const newPath = resolvedPath.replace(/\.ts$/, '.mts'); - - const jsCode = registerConfig.tsNodeInstance!.compile(tsCode, newPath); - const outputFileName = getHash() + '.mjs'; - const outputFilePath = path.join(getTmpDir('esm'), outputFileName); - fs.writeFileSync(outputFilePath, jsCode, 'utf8'); - - builtFiles.set(resolvedPath, outputFilePath); - targetFilePath = outputFilePath; - } else { - targetFilePath = builtFiles.get(resolvedPath)!; - } - } else { - targetFilePath = resolvedPath; - } - - /* Setup new module */ - const newModule = new Module(request, this); - newModule.filename = resolvedPath; - newModule.paths = Module._nodeModulePaths(resolvedPath); - - /* Add to cache */ - Module._cache[resolvedPath] = newModule; - - /* Load with ESM library */ - const res = getEsmLibrary()(newModule)(targetFilePath); - newModule.filename = resolvedPath; - - return res; - } - - throw e; - } - } - - return cleanup; - } - - // endregion -} diff --git a/projects/patch/src/plugin/plugin-creator.ts b/projects/patch/src/plugin/plugin-creator.ts index c6cb0f7..eec5bb6 100644 --- a/projects/patch/src/plugin/plugin-creator.ts +++ b/projects/patch/src/plugin/plugin-creator.ts @@ -143,6 +143,11 @@ namespace tsp { res = wrapTransformerFactory(resFn, requireConfig, false); } } + catch (e) { + const hint = describeEsmInCjsError(e); + if (hint) throw new TsPatchError(hint); + throw e; + } finally { unregisterPlugin(); } diff --git a/projects/patch/src/plugin/plugin.ts b/projects/patch/src/plugin/plugin.ts index 4a08d20..761f600 100644 --- a/projects/patch/src/plugin/plugin.ts +++ b/projects/patch/src/plugin/plugin.ts @@ -108,24 +108,10 @@ namespace tsp { if (requireStack.includes(entryFilePath)) return; requireStack.push(entryFilePath); - /* Check if ESM */ - let isEsm: boolean | undefined = config.isEsm; - if (isEsm == null) { - const impliedModuleFormat = tsShim.getImpliedNodeFormatForFile( - entryFilePath as tsShim.Path, - undefined, - tsShim.sys, - { moduleResolution: tsShim.ModuleResolutionKind.Node16 } - ); - - isEsm = impliedModuleFormat === tsShim.ModuleKind.ESNext; - } - const isTs = configTransformValue.match(/\.[mc]?ts$/) != null; const registerConfig: RegisterConfig = { isTs, - isEsm, tsConfig: tsConfigPath, pluginConfig: config }; @@ -164,25 +150,13 @@ namespace tsp { function loadEntryFile(): PluginFactory | { [key: string]: PluginFactory } { /* Load plugin */ - let res: PluginFactory | { [key: string]: PluginFactory } try { - res = require(entryFilePath); + return require(entryFilePath); } catch (e) { - if (e.code === 'ERR_REQUIRE_ESM') { - if (!registerConfig.isEsm) { - unregisterPlugin(); - registerConfig.isEsm = true; - registerPlugin(registerConfig); - return loadEntryFile(); - } else { - throw new TsPatchError( - `Cannot load ESM transformer "${configTransformValue}" from "${entryFilePath}". Please file a bug report` - ); - } - } - else throw e; + const hint = describeEsmInCjsError(e); + if (hint) throw new TsPatchError(hint); + throw e; } - return res; } } } diff --git a/projects/patch/src/plugin/register-plugin.ts b/projects/patch/src/plugin/register-plugin.ts index 5135ed3..a3abd09 100644 --- a/projects/patch/src/plugin/register-plugin.ts +++ b/projects/patch/src/plugin/register-plugin.ts @@ -11,12 +11,10 @@ namespace tsp { /** @internal */ export interface RegisterConfig { - tsNodeInstance?: import('ts-node').Service + compilerLoaderCleanup?: () => void tsConfigPathsCleanup?: () => void - esmInterceptCleanup?: () => void isTs: boolean pluginConfig: PluginConfig - isEsm: boolean tsConfig: string | undefined compilerOptions?: tsShim.CompilerOptions } @@ -27,20 +25,7 @@ namespace tsp { // region: Helpers /* ********************************************************* */ - function getTsNode() { - try { - return require('ts-node') as typeof import('ts-node'); - } catch (e) { - if (e.code === 'MODULE_NOT_FOUND') - throw new TsPatchError( - `Cannot use a typescript-based transformer without ts-node installed. `+ - `Add ts-node as a (dev)-dependency or install globally.` - ); - else throw e; - } - } - - function getTsConfigPaths() { + export function getTsConfigPaths() { try { return require('tsconfig-paths') as typeof import('tsconfig-paths'); } catch (e) { @@ -78,13 +63,9 @@ namespace tsp { delete activeRegisterConfig.tsConfigPathsCleanup; } - if (activeRegisterConfig.tsNodeInstance) { - activeRegisterConfig.tsNodeInstance.enabled(false); - } - - if (activeRegisterConfig.esmInterceptCleanup) { - activeRegisterConfig.esmInterceptCleanup(); - delete activeRegisterConfig.esmInterceptCleanup; + if (activeRegisterConfig.compilerLoaderCleanup) { + activeRegisterConfig.compilerLoaderCleanup(); + delete activeRegisterConfig.compilerLoaderCleanup; } } @@ -92,37 +73,7 @@ namespace tsp { if (!registerConfig) throw new TsPatchError('requireConfig is required'); configStack.push(registerConfig); - const { isTs, isEsm, tsConfig, pluginConfig } = registerConfig; - - /* Register ESM */ - if (isEsm) { - registerConfig.esmInterceptCleanup = registerEsmIntercept(registerConfig); - } - - /* Register tsNode */ - if (isTs) { - const tsNode = getTsNode(); - - let tsNodeInstance: import('ts-node').Service; - if (registerConfig.tsNodeInstance) { - tsNodeInstance = registerConfig.tsNodeInstance; - tsNode.register(tsNodeInstance); - } else { - tsNodeInstance = tsNode.register({ - transpileOnly: true, - ...(tsConfig ? { project: tsConfig } : { skipProject: true }), - compilerOptions: { - target: isEsm ? 'ESNext' : 'ES2018', - jsx: 'react', - esModuleInterop: true, - module: isEsm ? 'ESNext' : 'commonjs', - } - }); - } - - tsNodeInstance.enabled(true); - registerConfig.tsNodeInstance = tsNodeInstance; - } + const { isTs, tsConfig, pluginConfig } = registerConfig; /* Register tsconfig-paths */ if (tsConfig && pluginConfig.resolvePathAliases) { @@ -133,6 +84,12 @@ namespace tsp { registerConfig.tsConfigPathsCleanup = getTsConfigPaths().register({ baseUrl, paths }); } } + + /* Register TypeScript compiler loader */ + if (isTs) { + if (tsConfig) registerConfig.compilerOptions ??= getCompilerOptions(tsConfig); + registerConfig.compilerLoaderCleanup = registerCompilerLoader(registerConfig); + } } // endregion diff --git a/projects/patch/src/plugin/ts-format.ts b/projects/patch/src/plugin/ts-format.ts new file mode 100644 index 0000000..116133c --- /dev/null +++ b/projects/patch/src/plugin/ts-format.ts @@ -0,0 +1,104 @@ +namespace tsp { + /* ********************************************************* */ + // region: Types + /* ********************************************************* */ + + export type TsFileFormat = 'commonjs' | 'module' | 'unsupported'; + + /** @internal */ + interface ImpliedNodeFormatInfo { + impliedNodeFormat?: tsShim.ModuleKind; + packageJsonLocations?: string[]; + packageJsonScope?: { + contents?: { + packageJsonContent?: { + type?: string + } + } + } + } + + // endregion + + /* ********************************************************* */ + // region: Helpers + /* ********************************************************* */ + + function getCreateSourceFileOptions( + filePath: string, + compilerOptions: tsShim.CompilerOptions + ): tsShim.CreateSourceFileOptions & Partial { + const implied = tsShim.getImpliedNodeFormatForFileWorker( + filePath, + undefined, + tsShim.sys, + compilerOptions + ); + + return { + ...(typeof implied === 'object' ? implied : { impliedNodeFormat: implied }), + languageVersion: tsShim.getEmitScriptTarget(compilerOptions), + setExternalModuleIndicator: tsShim.getSetExternalModuleIndicator(compilerOptions) + }; + } + + function createFormatSourceFile(filePath: string, sourceText: string, compilerOptions: tsShim.CompilerOptions) { + const sourceFileOptions = getCreateSourceFileOptions(filePath, compilerOptions); + const sourceFile = tsShim.createSourceFile(filePath, sourceText, sourceFileOptions, false); + const internalSourceFile = sourceFile as tsShim.SourceFile & Partial; + + internalSourceFile.packageJsonLocations = sourceFileOptions.packageJsonLocations; + internalSourceFile.packageJsonScope = sourceFileOptions.packageJsonScope; + + return sourceFile; + } + + // endregion + + /* ********************************************************* */ + // region: Utils + /* ********************************************************* */ + + export function getEmitFormat( + filePath: string, + sourceText: string, + compilerOptions: tsShim.CompilerOptions + ): TsFileFormat { + const sourceFile = createFormatSourceFile(filePath, sourceText, compilerOptions); + const emitKind = tsShim.getEmitModuleFormatOfFileWorker(sourceFile, compilerOptions); + + /* + * This switch names the Node load format, not the user's exact TypeScript emit target. + * Transformer source must be compiled to something Node can synchronously load. Known + * non-Node module wrappers are rejected deliberately, while unknown future module kinds + * are treated as ESM because new TypeScript module kinds are expected to extend modern + * ES/Node behavior rather than add another AMD/System-like wrapper. + */ + switch (emitKind) { + case undefined: + // getCompilerOptions() supplies NodeNext by default, so this should be unreachable. + // If TypeScript still cannot decide, preserve the old non-ESM transformer fallback. + case tsShim.ModuleKind.None: + // Historically ts-patch forced TS transformer loading to CommonJS unless ESM was active. + // Treat an explicit "None" module setting as that legacy CJS runtime fallback. + case tsShim.ModuleKind.CommonJS: + return 'commonjs'; + + case tsShim.ModuleKind.AMD: + case tsShim.ModuleKind.UMD: + case tsShim.ModuleKind.System: + case tsShim.ModuleKind.Preserve: + return 'unsupported'; + + case tsShim.ModuleKind.ES2015: + case tsShim.ModuleKind.ES2020: + case tsShim.ModuleKind.ES2022: + case tsShim.ModuleKind.ESNext: + default: + return 'module'; + } + } + + // endregion + +} diff --git a/projects/patch/src/shared.ts b/projects/patch/src/shared.ts index db03d26..ee9f1c6 100644 --- a/projects/patch/src/shared.ts +++ b/projects/patch/src/shared.ts @@ -15,6 +15,24 @@ namespace tsp { export const supportedExtensions = [ '.ts', '.mts', '.cts', '.js', '.mjs', '.cjs' ]; export const tsExtensions = [ '.ts', '.mts', '.cts' ]; + /** @internal */ + export type TsInstance = typeof import('typescript') & { + originalCreateProgram: typeof import('typescript').createProgram + getEmitModuleKind(options: import('typescript').CompilerOptions): import('typescript').ModuleKind + getEmitModuleFormatOfFileWorker( + sourceFile: import('typescript').SourceFile, + options: import('typescript').CompilerOptions + ): import('typescript').ModuleKind + getImpliedNodeFormatForFileWorker( + fileName: string, + packageJsonInfoCache: unknown, + host: import('typescript').ModuleResolutionHost, + options: import('typescript').CompilerOptions + ): import('typescript').ModuleKind.CommonJS | import('typescript').ModuleKind.ESNext | Partial | undefined + getEmitScriptTarget(options: import('typescript').CompilerOptions): import('typescript').ScriptTarget + getSetExternalModuleIndicator(options: import('typescript').CompilerOptions): (file: import('typescript').SourceFile) => void + }; + // endregion /* ********************************************************* */ @@ -40,7 +58,54 @@ namespace tsp { /** @internal */ export function getTsInstance() { - return (typeof ts !== 'undefined' ? ts : module.exports) as typeof import('typescript'); + return (typeof ts !== 'undefined' ? ts : module.exports) as TsInstance; + } + + function getErrorMessage(e: any) { + return String(e?.message || ''); + } + + function extractFilePathFromError(e: any): string | undefined { + if (typeof e?.fileName === 'string') return e.fileName; + + const stack = String(e?.stack || ''); + const fileUrlMatch = stack.match(/file:\/\/([^:\n)]+\.[cm]?[tj]sx?):\d+:\d+/); + if (fileUrlMatch) return decodeURIComponent(fileUrlMatch[1]); + + const pathMatch = stack.match(/(\/[^:\n)]+\.[cm]?[tj]sx?):\d+:\d+/); + return pathMatch?.[1]; + } + + /** @internal */ + export function describeEsmInCjsError(e: any): string | undefined { + const msg = getErrorMessage(e); + const filePath = extractFilePathFromError(e); + const sourceRef = filePath ? ` "${filePath}"` : ''; + + if (msg.includes('import.meta') && msg.includes('outside a module')) { + return ( + `Transformer source${sourceRef} uses "import.meta" but was loaded as CommonJS. ` + + `Rename the transformer or helper to ".mts", set the transformer tsConfig "module" to ESNext, ` + + `or use NodeNext with "type": "module" in the nearest package.json.` + ); + } + + if (/await is only valid/i.test(msg) && /module/i.test(msg)) { + return ( + `Transformer source${sourceRef} uses top-level "await" but was loaded as CommonJS. ` + + `Rename the transformer or helper to ".mts", set the transformer tsConfig "module" to ESNext, ` + + `or use NodeNext with "type": "module" in the nearest package.json.` + ); + } + + if (e?.code === 'ERR_REQUIRE_ASYNC_MODULE') { + return ( + `Transformer source${sourceRef} contains top-level "await" in its ESM graph and cannot be loaded synchronously with require(). ` + + `Move async initialization out of the top level, or open an issue if the transformer requires async module initialization.` + ); + } + + return undefined; } // endregion diff --git a/projects/patch/src/ts/shim.ts b/projects/patch/src/ts/shim.ts index 6066e8a..6180b07 100644 --- a/projects/patch/src/ts/shim.ts +++ b/projects/patch/src/ts/shim.ts @@ -19,10 +19,11 @@ namespace tsp { } }, } - ) as typeof import('typescript'); + ) as TsInstance; export namespace tsShim { export type CompilerOptions = import('typescript').CompilerOptions; + export type CreateSourceFileOptions = import('typescript').CreateSourceFileOptions; export type CreateProgramOptions = import('typescript').CreateProgramOptions; export type Program = import('typescript').Program; export type CompilerHost = import('typescript').CompilerHost; @@ -39,5 +40,6 @@ namespace tsp { export type Bundle = import('typescript').Bundle; export type Path = import('typescript').Path; export type JSDocParsingMode = import('typescript').JSDocParsingMode; + export type ModuleKind = import('typescript').ModuleKind; } } diff --git a/projects/patch/src/types/plugin-types.ts b/projects/patch/src/types/plugin-types.ts index 8c04ec7..76c7d7b 100644 --- a/projects/patch/src/types/plugin-types.ts +++ b/projects/patch/src/types/plugin-types.ts @@ -10,7 +10,6 @@ declare namespace tsp { resolvePathAliases?: boolean; tsConfig?: string; import?: string; - isEsm?: boolean; type?: 'ls' | 'program' | 'config' | 'checker' | 'raw' | 'compilerOptions'; after?: boolean; afterDeclarations?: boolean; diff --git a/projects/patch/tsconfig.json b/projects/patch/tsconfig.json index e6db858..d4a4851 100644 --- a/projects/patch/tsconfig.json +++ b/projects/patch/tsconfig.json @@ -5,6 +5,7 @@ "compilerOptions": { "outFile": "../../dist/resources/module-patch.js", + "rootDir": "./src", "declaration": true, "types": [ "@types/node" ], @@ -19,11 +20,13 @@ "useUnknownInCatchVariables": false, "newLine": "LF", "moduleResolution": "Node", + "ignoreDeprecations": "6.0", "esModuleInterop": true, "plugins": [ { "transform": "./plugin.ts", + "tsConfig": "./tsconfig.plugin.json", "transformProgram": true, "import": "transformProgram" } diff --git a/projects/patch/tsconfig.plugin.json b/projects/patch/tsconfig.plugin.json new file mode 100644 index 0000000..9b7738e --- /dev/null +++ b/projects/patch/tsconfig.plugin.json @@ -0,0 +1,9 @@ +{ + "extends": "./tsconfig.json", + "include": [ + "plugin.ts" + ], + "compilerOptions": { + "plugins": [] + } +} diff --git a/test/assets/projects/diagnostics/package.json b/test/assets/projects/diagnostics/package.json new file mode 100644 index 0000000..58499f9 --- /dev/null +++ b/test/assets/projects/diagnostics/package.json @@ -0,0 +1,4 @@ +{ + "name": "diagnostics-tspatch-project", + "version": "1.0.0" +} diff --git a/test/assets/projects/diagnostics/run-emit.js b/test/assets/projects/diagnostics/run-emit.js new file mode 100644 index 0000000..1cdaa73 --- /dev/null +++ b/test/assets/projects/diagnostics/run-emit.js @@ -0,0 +1,46 @@ +const path = require('path'); + +process.env.TSP_SKIP_CACHE = true; +const tsInstance = require('ts-patch/compiler'); + +const configPath = path.join(__dirname, 'tsconfig.json'); +const configFile = tsInstance.readConfigFile(configPath, tsInstance.sys.readFile); +if (configFile.error) throw new Error(formatDiagnostic(configFile.error)); + +const parsedConfig = tsInstance.parseJsonConfigFileContent( + configFile.config, + tsInstance.sys, + __dirname, + undefined, + configPath +); +if (parsedConfig.errors.length) throw new Error(formatDiagnostics(parsedConfig.errors)); + +const program = tsInstance.createProgram({ + rootNames: parsedConfig.fileNames, + options: parsedConfig.options, +}); + +const result = program.emit(); +const diagnostics = result.diagnostics.map(({ code, messageText }) => ({ + code, + message: tsInstance.flattenDiagnosticMessageText(messageText, '\n') +})); + +process.stdout.write(JSON.stringify(diagnostics, null, 2)); + +function formatDiagnostic(diagnostic) { + return tsInstance.formatDiagnostic(diagnostic, diagnosticHost()); +} + +function formatDiagnostics(diagnostics) { + return tsInstance.formatDiagnostics(diagnostics, diagnosticHost()); +} + +function diagnosticHost() { + return { + getCurrentDirectory: () => __dirname, + getCanonicalFileName: fileName => fileName, + getNewLine: () => tsInstance.sys.newLine, + }; +} diff --git a/test/assets/projects/diagnostics/src/index.ts b/test/assets/projects/diagnostics/src/index.ts new file mode 100644 index 0000000..f25f15b --- /dev/null +++ b/test/assets/projects/diagnostics/src/index.ts @@ -0,0 +1,5 @@ +const value = ''; + +value.missingProperty; + +export const emitted = value; diff --git a/test/assets/projects/diagnostics/transformer.ts b/test/assets/projects/diagnostics/transformer.ts new file mode 100644 index 0000000..497a4bc --- /dev/null +++ b/test/assets/projects/diagnostics/transformer.ts @@ -0,0 +1,25 @@ +import type * as ts from 'typescript'; +import type { TransformerExtras } from 'ts-patch'; + +export default function ( + program: ts.Program, + _config: unknown, + { addDiagnostic, removeDiagnostic, diagnostics, library, ts: tsInstance }: TransformerExtras +) { + const originalDiagnosticIndex = diagnostics.findIndex(({ code }) => code === 2339); + if (originalDiagnosticIndex !== -1) removeDiagnostic(originalDiagnosticIndex); + + const sourceFile = program.getSourceFiles().find(({ fileName }) => /src[\\/]index\.ts$/.test(fileName)); + const foundOriginal = originalDiagnosticIndex !== -1; + + addDiagnostic({ + code: 1337, + category: tsInstance.DiagnosticCategory.Error, + file: sourceFile, + start: 0, + length: sourceFile ? Math.min(1, sourceFile.text.length) : 0, + messageText: `ts-patch diagnostics fixture DIAG_ARRAY=${Array.isArray(diagnostics)} FOUND_ORIGINAL=${foundOriginal} LIBRARY=${library}` + }); + + return () => (sourceFile: ts.SourceFile) => sourceFile; +} diff --git a/test/assets/projects/diagnostics/tsconfig.json b/test/assets/projects/diagnostics/tsconfig.json new file mode 100644 index 0000000..fcf0aeb --- /dev/null +++ b/test/assets/projects/diagnostics/tsconfig.json @@ -0,0 +1,16 @@ +{ + "include": [ "src" ], + "compilerOptions": { + "target": "ES2018", + "module": "CommonJS", + "moduleResolution": "Node", + "ignoreDeprecations": "6.0", + "lib": [ "ES2018" ], + "types": [], + "skipLibCheck": true, + "noEmit": false, + "plugins": [ + { "transform": "./transformer.ts" } + ] + } +} diff --git a/test/assets/projects/module-format/package.json b/test/assets/projects/module-format/package.json new file mode 100644 index 0000000..6a4d4ae --- /dev/null +++ b/test/assets/projects/module-format/package.json @@ -0,0 +1,4 @@ +{ + "name": "module-format-ts-patch", + "main": "src/index.ts" +} diff --git a/test/assets/projects/module-format/run-case.js b/test/assets/projects/module-format/run-case.js new file mode 100644 index 0000000..12c4e68 --- /dev/null +++ b/test/assets/projects/module-format/run-case.js @@ -0,0 +1,49 @@ +const path = require('path'); + +function runCase(caseName) { + process.env.TSP_SKIP_CACHE = true; + const tsInstance = require('ts-patch/compiler'); + + const configPath = path.join(__dirname, `tsconfig.${caseName}.json`); + const configFile = tsInstance.readConfigFile(configPath, tsInstance.sys.readFile); + if (configFile.error) throw new Error(tsInstance.formatDiagnostic(configFile.error, diagnosticHost(tsInstance))); + + const parsedConfig = tsInstance.parseJsonConfigFileContent( + configFile.config, + tsInstance.sys, + __dirname, + undefined, + configPath + ); + + if (parsedConfig.errors.length) { + throw new Error(tsInstance.formatDiagnostics(parsedConfig.errors, diagnosticHost(tsInstance))); + } + + Object.assign(parsedConfig.options, { + noEmit: false, + skipLibCheck: true, + outDir: 'dist', + }); + + const emittedFiles = new Map(); + const program = tsInstance.createProgram({ + rootNames: [ path.join(__dirname, 'src', 'index.ts') ], + options: parsedConfig.options, + }); + + program.emit(undefined, (fileName, content) => emittedFiles.set(fileName, content)); + return emittedFiles.get('dist/index.js') || emittedFiles.get(path.join('dist', 'src', 'index.js')); +} + +function diagnosticHost(tsInstance) { + return { + getCurrentDirectory: () => __dirname, + getCanonicalFileName: fileName => fileName, + getNewLine: () => tsInstance.sys.newLine, + }; +} + +const caseName = process.argv[2]; +if (!caseName) throw new Error('Missing case name'); +console.log(runCase(caseName)); diff --git a/test/assets/projects/module-format/src/index.ts b/test/assets/projects/module-format/src/index.ts new file mode 100644 index 0000000..89dd847 --- /dev/null +++ b/test/assets/projects/module-format/src/index.ts @@ -0,0 +1 @@ +const value = 'before'; diff --git a/test/assets/projects/module-format/transformers/async-esm-entry/plugin.mts b/test/assets/projects/module-format/transformers/async-esm-entry/plugin.mts new file mode 100644 index 0000000..5edb8af --- /dev/null +++ b/test/assets/projects/module-format/transformers/async-esm-entry/plugin.mts @@ -0,0 +1,7 @@ +import type * as ts from 'typescript'; + +await Promise.resolve(); + +export default function (_program: ts.Program, _config: {}, { ts: tsInstance }: { ts: typeof ts }) { + return (ctx: ts.TransformationContext) => (sourceFile: ts.SourceFile) => tsInstance.visitEachChild(sourceFile, node => node, ctx); +} diff --git a/test/assets/projects/module-format/transformers/async-esm-entry/tsconfig.json b/test/assets/projects/module-format/transformers/async-esm-entry/tsconfig.json new file mode 100644 index 0000000..170a489 --- /dev/null +++ b/test/assets/projects/module-format/transformers/async-esm-entry/tsconfig.json @@ -0,0 +1,6 @@ +{ + "compilerOptions": { + "module": "ESNext", + "target": "ESNext" + } +} diff --git a/test/assets/projects/module-format/transformers/cts-esnext/plugin.cts b/test/assets/projects/module-format/transformers/cts-esnext/plugin.cts new file mode 100644 index 0000000..bad377d --- /dev/null +++ b/test/assets/projects/module-format/transformers/cts-esnext/plugin.cts @@ -0,0 +1,18 @@ +import type * as ts from 'typescript'; + +if (typeof __dirname !== 'string') throw new Error('cts-esnext was not loaded as CommonJS'); + +export default function (_program: ts.Program, _config: {}, { ts: tsInstance }: { ts: typeof ts }) { + return (ctx: ts.TransformationContext) => { + const factory = ctx.factory; + return (sourceFile: ts.SourceFile) => { + function visit(node: ts.Node): ts.Node { + if (tsInstance.isStringLiteral(node) && node.text === 'before') { + return factory.createStringLiteral('cts-esnext'); + } + return tsInstance.visitEachChild(node, visit, ctx); + } + return tsInstance.visitNode(sourceFile, visit); + }; + }; +} diff --git a/test/assets/projects/module-format/transformers/cts-esnext/tsconfig.json b/test/assets/projects/module-format/transformers/cts-esnext/tsconfig.json new file mode 100644 index 0000000..170a489 --- /dev/null +++ b/test/assets/projects/module-format/transformers/cts-esnext/tsconfig.json @@ -0,0 +1,6 @@ +{ + "compilerOptions": { + "module": "ESNext", + "target": "ESNext" + } +} diff --git a/test/assets/projects/module-format/transformers/default-cjs/plugin.ts b/test/assets/projects/module-format/transformers/default-cjs/plugin.ts new file mode 100644 index 0000000..702f51a --- /dev/null +++ b/test/assets/projects/module-format/transformers/default-cjs/plugin.ts @@ -0,0 +1,18 @@ +import type * as ts from 'typescript'; + +if (typeof __dirname !== 'string') throw new Error('default-cjs was not loaded as CommonJS'); + +export default function (_program: ts.Program, _config: {}, { ts: tsInstance }: { ts: typeof ts }) { + return (ctx: ts.TransformationContext) => { + const factory = ctx.factory; + return (sourceFile: ts.SourceFile) => { + function visit(node: ts.Node): ts.Node { + if (tsInstance.isStringLiteral(node) && node.text === 'before') { + return factory.createStringLiteral('default-cjs'); + } + return tsInstance.visitEachChild(node, visit, ctx); + } + return tsInstance.visitNode(sourceFile, visit); + }; + }; +} diff --git a/test/assets/projects/module-format/transformers/explicit-commonjs-ts/package.json b/test/assets/projects/module-format/transformers/explicit-commonjs-ts/package.json new file mode 100644 index 0000000..3dbc1ca --- /dev/null +++ b/test/assets/projects/module-format/transformers/explicit-commonjs-ts/package.json @@ -0,0 +1,3 @@ +{ + "type": "module" +} diff --git a/test/assets/projects/module-format/transformers/explicit-commonjs-ts/plugin.ts b/test/assets/projects/module-format/transformers/explicit-commonjs-ts/plugin.ts new file mode 100644 index 0000000..f3a161c --- /dev/null +++ b/test/assets/projects/module-format/transformers/explicit-commonjs-ts/plugin.ts @@ -0,0 +1,18 @@ +import type * as ts from 'typescript'; + +if (typeof __dirname !== 'string') throw new Error('explicit-commonjs-ts was not loaded as CommonJS'); + +export default function (_program: ts.Program, _config: {}, { ts: tsInstance }: { ts: typeof ts }) { + return (ctx: ts.TransformationContext) => { + const factory = ctx.factory; + return (sourceFile: ts.SourceFile) => { + function visit(node: ts.Node): ts.Node { + if (tsInstance.isStringLiteral(node) && node.text === 'before') { + return factory.createStringLiteral('explicit-commonjs-ts'); + } + return tsInstance.visitEachChild(node, visit, ctx); + } + return tsInstance.visitNode(sourceFile, visit); + }; + }; +} diff --git a/test/assets/projects/module-format/transformers/explicit-commonjs-ts/tsconfig.json b/test/assets/projects/module-format/transformers/explicit-commonjs-ts/tsconfig.json new file mode 100644 index 0000000..19f6633 --- /dev/null +++ b/test/assets/projects/module-format/transformers/explicit-commonjs-ts/tsconfig.json @@ -0,0 +1,6 @@ +{ + "compilerOptions": { + "module": "CommonJS", + "target": "ES2018" + } +} diff --git a/test/assets/projects/module-format/transformers/explicit-esnext-ts/plugin.ts b/test/assets/projects/module-format/transformers/explicit-esnext-ts/plugin.ts new file mode 100644 index 0000000..0fb70ac --- /dev/null +++ b/test/assets/projects/module-format/transformers/explicit-esnext-ts/plugin.ts @@ -0,0 +1,18 @@ +import type * as ts from 'typescript'; + +if (!import.meta.url) throw new Error('explicit-esnext-ts was not loaded as ESM'); + +export default function (_program: ts.Program, _config: {}, { ts: tsInstance }: { ts: typeof ts }) { + return (ctx: ts.TransformationContext) => { + const factory = ctx.factory; + return (sourceFile: ts.SourceFile) => { + function visit(node: ts.Node): ts.Node { + if (tsInstance.isStringLiteral(node) && node.text === 'before') { + return factory.createStringLiteral('explicit-esnext-ts'); + } + return tsInstance.visitEachChild(node, visit, ctx); + } + return tsInstance.visitNode(sourceFile, visit); + }; + }; +} diff --git a/test/assets/projects/module-format/transformers/explicit-esnext-ts/tsconfig.json b/test/assets/projects/module-format/transformers/explicit-esnext-ts/tsconfig.json new file mode 100644 index 0000000..170a489 --- /dev/null +++ b/test/assets/projects/module-format/transformers/explicit-esnext-ts/tsconfig.json @@ -0,0 +1,6 @@ +{ + "compilerOptions": { + "module": "ESNext", + "target": "ESNext" + } +} diff --git a/test/assets/projects/module-format/transformers/import-meta-cjs/plugin.ts b/test/assets/projects/module-format/transformers/import-meta-cjs/plugin.ts new file mode 100644 index 0000000..10c525d --- /dev/null +++ b/test/assets/projects/module-format/transformers/import-meta-cjs/plugin.ts @@ -0,0 +1,7 @@ +import type * as ts from 'typescript'; + +if (!import.meta.url) throw new Error('unreachable'); + +export default function (_program: ts.Program, _config: {}, { ts: tsInstance }: { ts: typeof ts }) { + return (ctx: ts.TransformationContext) => (sourceFile: ts.SourceFile) => tsInstance.visitEachChild(sourceFile, node => node, ctx); +} diff --git a/test/assets/projects/module-format/transformers/import-meta-cjs/tsconfig.json b/test/assets/projects/module-format/transformers/import-meta-cjs/tsconfig.json new file mode 100644 index 0000000..19f6633 --- /dev/null +++ b/test/assets/projects/module-format/transformers/import-meta-cjs/tsconfig.json @@ -0,0 +1,6 @@ +{ + "compilerOptions": { + "module": "CommonJS", + "target": "ES2018" + } +} diff --git a/test/assets/projects/module-format/transformers/lazy-import-meta-cjs/bad-helper.ts b/test/assets/projects/module-format/transformers/lazy-import-meta-cjs/bad-helper.ts new file mode 100644 index 0000000..bf21786 --- /dev/null +++ b/test/assets/projects/module-format/transformers/lazy-import-meta-cjs/bad-helper.ts @@ -0,0 +1,3 @@ +if (!import.meta.url) throw new Error('unreachable'); + +export const value = 'bad-helper'; diff --git a/test/assets/projects/module-format/transformers/lazy-import-meta-cjs/plugin.ts b/test/assets/projects/module-format/transformers/lazy-import-meta-cjs/plugin.ts new file mode 100644 index 0000000..bf9380e --- /dev/null +++ b/test/assets/projects/module-format/transformers/lazy-import-meta-cjs/plugin.ts @@ -0,0 +1,10 @@ +import type * as ts from 'typescript'; + +if (typeof __dirname !== 'string') throw new Error('lazy-import-meta-cjs was not loaded as CommonJS'); + +export default function (_program: ts.Program, _config: {}, { ts: tsInstance }: { ts: typeof ts }) { + return (ctx: ts.TransformationContext) => { + require('./bad-helper'); + return (sourceFile: ts.SourceFile) => tsInstance.visitEachChild(sourceFile, node => node, ctx); + }; +} diff --git a/test/assets/projects/module-format/transformers/lazy-import-meta-cjs/tsconfig.json b/test/assets/projects/module-format/transformers/lazy-import-meta-cjs/tsconfig.json new file mode 100644 index 0000000..19f6633 --- /dev/null +++ b/test/assets/projects/module-format/transformers/lazy-import-meta-cjs/tsconfig.json @@ -0,0 +1,6 @@ +{ + "compilerOptions": { + "module": "CommonJS", + "target": "ES2018" + } +} diff --git a/test/assets/projects/module-format/transformers/mts-commonjs/plugin.mts b/test/assets/projects/module-format/transformers/mts-commonjs/plugin.mts new file mode 100644 index 0000000..040ae47 --- /dev/null +++ b/test/assets/projects/module-format/transformers/mts-commonjs/plugin.mts @@ -0,0 +1,18 @@ +import type * as ts from 'typescript'; + +if (!import.meta.url) throw new Error('mts-commonjs was not loaded as ESM'); + +export default function (_program: ts.Program, _config: {}, { ts: tsInstance }: { ts: typeof ts }) { + return (ctx: ts.TransformationContext) => { + const factory = ctx.factory; + return (sourceFile: ts.SourceFile) => { + function visit(node: ts.Node): ts.Node { + if (tsInstance.isStringLiteral(node) && node.text === 'before') { + return factory.createStringLiteral('mts-commonjs'); + } + return tsInstance.visitEachChild(node, visit, ctx); + } + return tsInstance.visitNode(sourceFile, visit); + }; + }; +} diff --git a/test/assets/projects/module-format/transformers/mts-commonjs/tsconfig.json b/test/assets/projects/module-format/transformers/mts-commonjs/tsconfig.json new file mode 100644 index 0000000..19f6633 --- /dev/null +++ b/test/assets/projects/module-format/transformers/mts-commonjs/tsconfig.json @@ -0,0 +1,6 @@ +{ + "compilerOptions": { + "module": "CommonJS", + "target": "ES2018" + } +} diff --git a/test/assets/projects/module-format/transformers/node-next-default-cjs/plugin.ts b/test/assets/projects/module-format/transformers/node-next-default-cjs/plugin.ts new file mode 100644 index 0000000..2e23eee --- /dev/null +++ b/test/assets/projects/module-format/transformers/node-next-default-cjs/plugin.ts @@ -0,0 +1,18 @@ +import type * as ts from 'typescript'; + +if (typeof __dirname !== 'string') throw new Error('node-next-default-cjs was not loaded as CommonJS'); + +export default function (_program: ts.Program, _config: {}, { ts: tsInstance }: { ts: typeof ts }) { + return (ctx: ts.TransformationContext) => { + const factory = ctx.factory; + return (sourceFile: ts.SourceFile) => { + function visit(node: ts.Node): ts.Node { + if (tsInstance.isStringLiteral(node) && node.text === 'before') { + return factory.createStringLiteral('node-next-default-cjs'); + } + return tsInstance.visitEachChild(node, visit, ctx); + } + return tsInstance.visitNode(sourceFile, visit); + }; + }; +} diff --git a/test/assets/projects/module-format/transformers/node-next-default-cjs/tsconfig.json b/test/assets/projects/module-format/transformers/node-next-default-cjs/tsconfig.json new file mode 100644 index 0000000..7c14893 --- /dev/null +++ b/test/assets/projects/module-format/transformers/node-next-default-cjs/tsconfig.json @@ -0,0 +1,6 @@ +{ + "compilerOptions": { + "module": "NodeNext", + "target": "ESNext" + } +} diff --git a/test/assets/projects/module-format/transformers/node-next-package-module/package.json b/test/assets/projects/module-format/transformers/node-next-package-module/package.json new file mode 100644 index 0000000..3dbc1ca --- /dev/null +++ b/test/assets/projects/module-format/transformers/node-next-package-module/package.json @@ -0,0 +1,3 @@ +{ + "type": "module" +} diff --git a/test/assets/projects/module-format/transformers/node-next-package-module/plugin.ts b/test/assets/projects/module-format/transformers/node-next-package-module/plugin.ts new file mode 100644 index 0000000..0a00321 --- /dev/null +++ b/test/assets/projects/module-format/transformers/node-next-package-module/plugin.ts @@ -0,0 +1,18 @@ +import type * as ts from 'typescript'; + +if (!import.meta.url) throw new Error('node-next-package-module was not loaded as ESM'); + +export default function (_program: ts.Program, _config: {}, { ts: tsInstance }: { ts: typeof ts }) { + return (ctx: ts.TransformationContext) => { + const factory = ctx.factory; + return (sourceFile: ts.SourceFile) => { + function visit(node: ts.Node): ts.Node { + if (tsInstance.isStringLiteral(node) && node.text === 'before') { + return factory.createStringLiteral('node-next-package-module'); + } + return tsInstance.visitEachChild(node, visit, ctx); + } + return tsInstance.visitNode(sourceFile, visit); + }; + }; +} diff --git a/test/assets/projects/module-format/transformers/node-next-package-module/tsconfig.json b/test/assets/projects/module-format/transformers/node-next-package-module/tsconfig.json new file mode 100644 index 0000000..7c14893 --- /dev/null +++ b/test/assets/projects/module-format/transformers/node-next-package-module/tsconfig.json @@ -0,0 +1,6 @@ +{ + "compilerOptions": { + "module": "NodeNext", + "target": "ESNext" + } +} diff --git a/test/assets/projects/module-format/transformers/package-module-ts/package.json b/test/assets/projects/module-format/transformers/package-module-ts/package.json new file mode 100644 index 0000000..3dbc1ca --- /dev/null +++ b/test/assets/projects/module-format/transformers/package-module-ts/package.json @@ -0,0 +1,3 @@ +{ + "type": "module" +} diff --git a/test/assets/projects/module-format/transformers/package-module-ts/plugin.ts b/test/assets/projects/module-format/transformers/package-module-ts/plugin.ts new file mode 100644 index 0000000..4d45378 --- /dev/null +++ b/test/assets/projects/module-format/transformers/package-module-ts/plugin.ts @@ -0,0 +1,18 @@ +import type * as ts from 'typescript'; + +if (!import.meta.url) throw new Error('package-module-ts was not loaded as ESM'); + +export default function (_program: ts.Program, _config: {}, { ts: tsInstance }: { ts: typeof ts }) { + return (ctx: ts.TransformationContext) => { + const factory = ctx.factory; + return (sourceFile: ts.SourceFile) => { + function visit(node: ts.Node): ts.Node { + if (tsInstance.isStringLiteral(node) && node.text === 'before') { + return factory.createStringLiteral('package-module-ts'); + } + return tsInstance.visitEachChild(node, visit, ctx); + } + return tsInstance.visitNode(sourceFile, visit); + }; + }; +} diff --git a/test/assets/projects/module-format/transformers/top-level-await-cjs/plugin.ts b/test/assets/projects/module-format/transformers/top-level-await-cjs/plugin.ts new file mode 100644 index 0000000..5edb8af --- /dev/null +++ b/test/assets/projects/module-format/transformers/top-level-await-cjs/plugin.ts @@ -0,0 +1,7 @@ +import type * as ts from 'typescript'; + +await Promise.resolve(); + +export default function (_program: ts.Program, _config: {}, { ts: tsInstance }: { ts: typeof ts }) { + return (ctx: ts.TransformationContext) => (sourceFile: ts.SourceFile) => tsInstance.visitEachChild(sourceFile, node => node, ctx); +} diff --git a/test/assets/projects/module-format/transformers/top-level-await-cjs/tsconfig.json b/test/assets/projects/module-format/transformers/top-level-await-cjs/tsconfig.json new file mode 100644 index 0000000..b16d293 --- /dev/null +++ b/test/assets/projects/module-format/transformers/top-level-await-cjs/tsconfig.json @@ -0,0 +1,6 @@ +{ + "compilerOptions": { + "module": "CommonJS", + "target": "ES2022" + } +} diff --git a/test/assets/projects/module-format/transformers/unsupported/plugin.ts b/test/assets/projects/module-format/transformers/unsupported/plugin.ts new file mode 100644 index 0000000..0042b64 --- /dev/null +++ b/test/assets/projects/module-format/transformers/unsupported/plugin.ts @@ -0,0 +1,3 @@ +export default function () { + return undefined; +} diff --git a/test/assets/projects/module-format/transformers/unsupported/tsconfig.amd.json b/test/assets/projects/module-format/transformers/unsupported/tsconfig.amd.json new file mode 100644 index 0000000..8082db1 --- /dev/null +++ b/test/assets/projects/module-format/transformers/unsupported/tsconfig.amd.json @@ -0,0 +1,6 @@ +{ + "compilerOptions": { + "module": "AMD", + "target": "ES2018" + } +} diff --git a/test/assets/projects/module-format/transformers/unsupported/tsconfig.preserve.json b/test/assets/projects/module-format/transformers/unsupported/tsconfig.preserve.json new file mode 100644 index 0000000..410bce7 --- /dev/null +++ b/test/assets/projects/module-format/transformers/unsupported/tsconfig.preserve.json @@ -0,0 +1,6 @@ +{ + "compilerOptions": { + "module": "Preserve", + "target": "ESNext" + } +} diff --git a/test/assets/projects/module-format/transformers/unsupported/tsconfig.system.json b/test/assets/projects/module-format/transformers/unsupported/tsconfig.system.json new file mode 100644 index 0000000..3efdfb5 --- /dev/null +++ b/test/assets/projects/module-format/transformers/unsupported/tsconfig.system.json @@ -0,0 +1,6 @@ +{ + "compilerOptions": { + "module": "System", + "target": "ES2018" + } +} diff --git a/test/assets/projects/module-format/transformers/unsupported/tsconfig.umd.json b/test/assets/projects/module-format/transformers/unsupported/tsconfig.umd.json new file mode 100644 index 0000000..17091af --- /dev/null +++ b/test/assets/projects/module-format/transformers/unsupported/tsconfig.umd.json @@ -0,0 +1,6 @@ +{ + "compilerOptions": { + "module": "UMD", + "target": "ES2018" + } +} diff --git a/test/assets/projects/module-format/tsconfig.async-esm-entry.json b/test/assets/projects/module-format/tsconfig.async-esm-entry.json new file mode 100644 index 0000000..70c7382 --- /dev/null +++ b/test/assets/projects/module-format/tsconfig.async-esm-entry.json @@ -0,0 +1,11 @@ +{ + "extends": "./tsconfig", + "compilerOptions": { + "plugins": [ + { + "transform": "./transformers/async-esm-entry/plugin.mts", + "tsConfig": "./transformers/async-esm-entry/tsconfig.json" + } + ] + } +} diff --git a/test/assets/projects/module-format/tsconfig.cts-esnext.json b/test/assets/projects/module-format/tsconfig.cts-esnext.json new file mode 100644 index 0000000..40ea83a --- /dev/null +++ b/test/assets/projects/module-format/tsconfig.cts-esnext.json @@ -0,0 +1,11 @@ +{ + "extends": "./tsconfig", + "compilerOptions": { + "plugins": [ + { + "transform": "./transformers/cts-esnext/plugin.cts", + "tsConfig": "./transformers/cts-esnext/tsconfig.json" + } + ] + } +} diff --git a/test/assets/projects/module-format/tsconfig.default-cjs.json b/test/assets/projects/module-format/tsconfig.default-cjs.json new file mode 100644 index 0000000..c577e7d --- /dev/null +++ b/test/assets/projects/module-format/tsconfig.default-cjs.json @@ -0,0 +1,10 @@ +{ + "extends": "./tsconfig", + "compilerOptions": { + "plugins": [ + { + "transform": "./transformers/default-cjs/plugin.ts" + } + ] + } +} diff --git a/test/assets/projects/module-format/tsconfig.explicit-commonjs-ts.json b/test/assets/projects/module-format/tsconfig.explicit-commonjs-ts.json new file mode 100644 index 0000000..5c68340 --- /dev/null +++ b/test/assets/projects/module-format/tsconfig.explicit-commonjs-ts.json @@ -0,0 +1,11 @@ +{ + "extends": "./tsconfig", + "compilerOptions": { + "plugins": [ + { + "transform": "./transformers/explicit-commonjs-ts/plugin.ts", + "tsConfig": "./transformers/explicit-commonjs-ts/tsconfig.json" + } + ] + } +} diff --git a/test/assets/projects/module-format/tsconfig.explicit-esnext-ts.json b/test/assets/projects/module-format/tsconfig.explicit-esnext-ts.json new file mode 100644 index 0000000..7e0803e --- /dev/null +++ b/test/assets/projects/module-format/tsconfig.explicit-esnext-ts.json @@ -0,0 +1,11 @@ +{ + "extends": "./tsconfig", + "compilerOptions": { + "plugins": [ + { + "transform": "./transformers/explicit-esnext-ts/plugin.ts", + "tsConfig": "./transformers/explicit-esnext-ts/tsconfig.json" + } + ] + } +} diff --git a/test/assets/projects/module-format/tsconfig.import-meta-cjs.json b/test/assets/projects/module-format/tsconfig.import-meta-cjs.json new file mode 100644 index 0000000..d19ef5c --- /dev/null +++ b/test/assets/projects/module-format/tsconfig.import-meta-cjs.json @@ -0,0 +1,11 @@ +{ + "extends": "./tsconfig", + "compilerOptions": { + "plugins": [ + { + "transform": "./transformers/import-meta-cjs/plugin.ts", + "tsConfig": "./transformers/import-meta-cjs/tsconfig.json" + } + ] + } +} diff --git a/test/assets/projects/module-format/tsconfig.json b/test/assets/projects/module-format/tsconfig.json new file mode 100644 index 0000000..f62ebae --- /dev/null +++ b/test/assets/projects/module-format/tsconfig.json @@ -0,0 +1,10 @@ +{ + "include": [ "src" ], + "compilerOptions": { + "outDir": "dist", + "module": "commonjs", + "target": "esnext", + "ignoreDeprecations": "6.0", + "noEmit": true + } +} diff --git a/test/assets/projects/module-format/tsconfig.lazy-import-meta-cjs.json b/test/assets/projects/module-format/tsconfig.lazy-import-meta-cjs.json new file mode 100644 index 0000000..62046f1 --- /dev/null +++ b/test/assets/projects/module-format/tsconfig.lazy-import-meta-cjs.json @@ -0,0 +1,11 @@ +{ + "extends": "./tsconfig", + "compilerOptions": { + "plugins": [ + { + "transform": "./transformers/lazy-import-meta-cjs/plugin.ts", + "tsConfig": "./transformers/lazy-import-meta-cjs/tsconfig.json" + } + ] + } +} diff --git a/test/assets/projects/module-format/tsconfig.mts-commonjs.json b/test/assets/projects/module-format/tsconfig.mts-commonjs.json new file mode 100644 index 0000000..797ef0e --- /dev/null +++ b/test/assets/projects/module-format/tsconfig.mts-commonjs.json @@ -0,0 +1,11 @@ +{ + "extends": "./tsconfig", + "compilerOptions": { + "plugins": [ + { + "transform": "./transformers/mts-commonjs/plugin.mts", + "tsConfig": "./transformers/mts-commonjs/tsconfig.json" + } + ] + } +} diff --git a/test/assets/projects/module-format/tsconfig.node-next-default-cjs.json b/test/assets/projects/module-format/tsconfig.node-next-default-cjs.json new file mode 100644 index 0000000..f293d7e --- /dev/null +++ b/test/assets/projects/module-format/tsconfig.node-next-default-cjs.json @@ -0,0 +1,11 @@ +{ + "extends": "./tsconfig", + "compilerOptions": { + "plugins": [ + { + "transform": "./transformers/node-next-default-cjs/plugin.ts", + "tsConfig": "./transformers/node-next-default-cjs/tsconfig.json" + } + ] + } +} diff --git a/test/assets/projects/module-format/tsconfig.node-next-package-module.json b/test/assets/projects/module-format/tsconfig.node-next-package-module.json new file mode 100644 index 0000000..f535a3c --- /dev/null +++ b/test/assets/projects/module-format/tsconfig.node-next-package-module.json @@ -0,0 +1,11 @@ +{ + "extends": "./tsconfig", + "compilerOptions": { + "plugins": [ + { + "transform": "./transformers/node-next-package-module/plugin.ts", + "tsConfig": "./transformers/node-next-package-module/tsconfig.json" + } + ] + } +} diff --git a/test/assets/projects/module-format/tsconfig.package-module-ts.json b/test/assets/projects/module-format/tsconfig.package-module-ts.json new file mode 100644 index 0000000..1e13b42 --- /dev/null +++ b/test/assets/projects/module-format/tsconfig.package-module-ts.json @@ -0,0 +1,10 @@ +{ + "extends": "./tsconfig", + "compilerOptions": { + "plugins": [ + { + "transform": "./transformers/package-module-ts/plugin.ts" + } + ] + } +} diff --git a/test/assets/projects/module-format/tsconfig.top-level-await-cjs.json b/test/assets/projects/module-format/tsconfig.top-level-await-cjs.json new file mode 100644 index 0000000..73ee2a2 --- /dev/null +++ b/test/assets/projects/module-format/tsconfig.top-level-await-cjs.json @@ -0,0 +1,11 @@ +{ + "extends": "./tsconfig", + "compilerOptions": { + "plugins": [ + { + "transform": "./transformers/top-level-await-cjs/plugin.ts", + "tsConfig": "./transformers/top-level-await-cjs/tsconfig.json" + } + ] + } +} diff --git a/test/assets/projects/module-format/tsconfig.unsupported-amd.json b/test/assets/projects/module-format/tsconfig.unsupported-amd.json new file mode 100644 index 0000000..6a4d2ed --- /dev/null +++ b/test/assets/projects/module-format/tsconfig.unsupported-amd.json @@ -0,0 +1,11 @@ +{ + "extends": "./tsconfig", + "compilerOptions": { + "plugins": [ + { + "transform": "./transformers/unsupported/plugin.ts", + "tsConfig": "./transformers/unsupported/tsconfig.amd.json" + } + ] + } +} diff --git a/test/assets/projects/module-format/tsconfig.unsupported-preserve.json b/test/assets/projects/module-format/tsconfig.unsupported-preserve.json new file mode 100644 index 0000000..35bcb52 --- /dev/null +++ b/test/assets/projects/module-format/tsconfig.unsupported-preserve.json @@ -0,0 +1,11 @@ +{ + "extends": "./tsconfig", + "compilerOptions": { + "plugins": [ + { + "transform": "./transformers/unsupported/plugin.ts", + "tsConfig": "./transformers/unsupported/tsconfig.preserve.json" + } + ] + } +} diff --git a/test/assets/projects/module-format/tsconfig.unsupported-system.json b/test/assets/projects/module-format/tsconfig.unsupported-system.json new file mode 100644 index 0000000..48996dd --- /dev/null +++ b/test/assets/projects/module-format/tsconfig.unsupported-system.json @@ -0,0 +1,11 @@ +{ + "extends": "./tsconfig", + "compilerOptions": { + "plugins": [ + { + "transform": "./transformers/unsupported/plugin.ts", + "tsConfig": "./transformers/unsupported/tsconfig.system.json" + } + ] + } +} diff --git a/test/assets/projects/module-format/tsconfig.unsupported-umd.json b/test/assets/projects/module-format/tsconfig.unsupported-umd.json new file mode 100644 index 0000000..c573d48 --- /dev/null +++ b/test/assets/projects/module-format/tsconfig.unsupported-umd.json @@ -0,0 +1,11 @@ +{ + "extends": "./tsconfig", + "compilerOptions": { + "plugins": [ + { + "transform": "./transformers/unsupported/plugin.ts", + "tsConfig": "./transformers/unsupported/tsconfig.umd.json" + } + ] + } +} diff --git a/test/assets/projects/package-config/tsconfig.json b/test/assets/projects/package-config/tsconfig.json index 82d7fd4..9c089c3 100644 --- a/test/assets/projects/package-config/tsconfig.json +++ b/test/assets/projects/package-config/tsconfig.json @@ -2,8 +2,11 @@ "include": [ "src" ], "compilerOptions": { "outDir": "dist", + "rootDir": "src", "module": "commonjs", "target": "esnext", + "ignoreDeprecations": "6.0", + "types": [], "noEmit": true, "plugins" : [ { "transform": "./plugin" } diff --git a/test/assets/projects/path-mapping/package.json b/test/assets/projects/path-mapping/package.json index 49d7651..aceaf53 100644 --- a/test/assets/projects/path-mapping/package.json +++ b/test/assets/projects/path-mapping/package.json @@ -2,7 +2,6 @@ "name": "path-mapping-test", "main": "src/index.ts", "dependencies": { - "ts-node" : "^10.9.1", "tsconfig-paths" : "^4.2.0" } } diff --git a/test/assets/projects/path-mapping/tsconfig.json b/test/assets/projects/path-mapping/tsconfig.json index 7b8f8b1..a73623f 100644 --- a/test/assets/projects/path-mapping/tsconfig.json +++ b/test/assets/projects/path-mapping/tsconfig.json @@ -5,6 +5,7 @@ "moduleResolution" : "node", "module": "commonjs", "target": "ES2020", + "ignoreDeprecations": "6.0", "noEmit": false, "plugins" : [ { diff --git a/test/assets/projects/path-mapping/tsconfig.plugin.json b/test/assets/projects/path-mapping/tsconfig.plugin.json index 2773420..7568b98 100644 --- a/test/assets/projects/path-mapping/tsconfig.plugin.json +++ b/test/assets/projects/path-mapping/tsconfig.plugin.json @@ -4,6 +4,7 @@ "outDir": "dist", "module": "commonjs", "target": "ES2020", + "ignoreDeprecations": "6.0", "noEmit": true, "baseUrl" : "src", "paths": { diff --git a/test/assets/projects/program-transformer/package.json b/test/assets/projects/program-transformer/package.json new file mode 100644 index 0000000..d342d40 --- /dev/null +++ b/test/assets/projects/program-transformer/package.json @@ -0,0 +1,4 @@ +{ + "name": "program-transformer-tspatch-project", + "version": "1.0.0" +} diff --git a/test/assets/projects/program-transformer/run-case.js b/test/assets/projects/program-transformer/run-case.js new file mode 100644 index 0000000..58e6502 --- /dev/null +++ b/test/assets/projects/program-transformer/run-case.js @@ -0,0 +1,53 @@ +const path = require('path'); + +process.env.TSP_SKIP_CACHE = true; +const tsInstance = require('ts-patch/compiler'); + +const caseName = process.argv[2]; +if (!caseName) throw new Error('Missing case name'); + +globalThis.__tspProgramTransformerState = undefined; + +const configPath = path.join(__dirname, `tsconfig.${caseName}.json`); +const parsedConfig = getParsedConfig(configPath); +const program = tsInstance.createProgram({ + rootNames: parsedConfig.fileNames, + options: parsedConfig.options, +}); + +const result = { + addedOne: hasSourceFile(program, 'src/added-one.ts'), + addedTwo: hasSourceFile(program, 'src/added-two.ts'), + recursiveAdded: hasSourceFile(program, 'src/recursive-added.ts'), + state: globalThis.__tspProgramTransformerState +}; + +process.stdout.write(JSON.stringify(result, null, 2)); + +function hasSourceFile(program, relativePath) { + return !!program.getSourceFile(path.resolve(__dirname, relativePath)); +} + +function getParsedConfig(configPath) { + const configFile = tsInstance.readConfigFile(configPath, tsInstance.sys.readFile); + if (configFile.error) throw new Error(tsInstance.formatDiagnostic(configFile.error, diagnosticHost())); + + const parsedConfig = tsInstance.parseJsonConfigFileContent( + configFile.config, + tsInstance.sys, + __dirname, + undefined, + configPath + ); + if (parsedConfig.errors.length) throw new Error(tsInstance.formatDiagnostics(parsedConfig.errors, diagnosticHost())); + + return parsedConfig; +} + +function diagnosticHost() { + return { + getCurrentDirectory: () => __dirname, + getCanonicalFileName: fileName => fileName, + getNewLine: () => tsInstance.sys.newLine, + }; +} diff --git a/test/assets/projects/program-transformer/src/added-one.ts b/test/assets/projects/program-transformer/src/added-one.ts new file mode 100644 index 0000000..7a1786d --- /dev/null +++ b/test/assets/projects/program-transformer/src/added-one.ts @@ -0,0 +1 @@ +export const addedOne = 'added-one'; diff --git a/test/assets/projects/program-transformer/src/added-two.ts b/test/assets/projects/program-transformer/src/added-two.ts new file mode 100644 index 0000000..2ba91bc --- /dev/null +++ b/test/assets/projects/program-transformer/src/added-two.ts @@ -0,0 +1 @@ +export const addedTwo = 'added-two'; diff --git a/test/assets/projects/program-transformer/src/index.ts b/test/assets/projects/program-transformer/src/index.ts new file mode 100644 index 0000000..736e965 --- /dev/null +++ b/test/assets/projects/program-transformer/src/index.ts @@ -0,0 +1 @@ +export const base = 'base'; diff --git a/test/assets/projects/program-transformer/src/recursive-added.ts b/test/assets/projects/program-transformer/src/recursive-added.ts new file mode 100644 index 0000000..4479cb7 --- /dev/null +++ b/test/assets/projects/program-transformer/src/recursive-added.ts @@ -0,0 +1 @@ +export const recursiveAdded = 'recursive-added'; diff --git a/test/assets/projects/program-transformer/transformers/program.ts b/test/assets/projects/program-transformer/transformers/program.ts new file mode 100644 index 0000000..98a1861 --- /dev/null +++ b/test/assets/projects/program-transformer/transformers/program.ts @@ -0,0 +1,104 @@ +import path from 'path'; +import type * as ts from 'typescript'; +import type { PluginConfig, ProgramTransformerExtras } from 'ts-patch'; + +type State = { + addOne: number; + addTwo: number; + recursive: number; + addTwoSawAddOne: boolean; + originalCreateProgramAvailable: boolean; +} + +declare global { + // eslint-disable-next-line no-var + var __tspProgramTransformerState: State | undefined; +} + +function getState(): State { + return globalThis.__tspProgramTransformerState ??= { + addOne: 0, + addTwo: 0, + recursive: 0, + addTwoSawAddOne: false, + originalCreateProgramAvailable: false + }; +} + +function fixturePath(...parts: string[]) { + return path.resolve(__dirname, '..', ...parts); +} + +function addRoot(rootNames: readonly string[], filePath: string) { + return rootNames.includes(filePath) ? rootNames.slice() : rootNames.concat(filePath); +} + +function recreateProgram( + program: ts.Program, + host: ts.CompilerHost | undefined, + tsInstance: typeof ts, + rootNames: readonly string[], + createProgram: typeof ts.createProgram = tsInstance.originalCreateProgram +) { + return createProgram( + rootNames.slice(), + program.getCompilerOptions(), + host ?? tsInstance.createCompilerHost(program.getCompilerOptions()), + program + ); +} + +export function addOne( + program: ts.Program, + host: ts.CompilerHost | undefined, + _config: PluginConfig, + { ts: tsInstance }: ProgramTransformerExtras +) { + getState().addOne++; + return recreateProgram( + program, + host, + tsInstance, + addRoot(program.getRootFileNames(), fixturePath('src', 'added-one.ts')) + ); +} + +export function addTwo( + program: ts.Program, + host: ts.CompilerHost | undefined, + _config: PluginConfig, + { ts: tsInstance }: ProgramTransformerExtras +) { + const state = getState(); + state.addTwo++; + state.addTwoSawAddOne = !!program.getSourceFile(fixturePath('src', 'added-one.ts')); + if (!state.addTwoSawAddOne) throw new Error('addTwo did not receive the program produced by addOne'); + + return recreateProgram( + program, + host, + tsInstance, + addRoot(program.getRootFileNames(), fixturePath('src', 'added-two.ts')) + ); +} + +export function recursive( + program: ts.Program, + host: ts.CompilerHost | undefined, + _config: PluginConfig, + { ts: tsInstance }: ProgramTransformerExtras +) { + const state = getState(); + state.recursive++; + state.originalCreateProgramAvailable = typeof tsInstance.originalCreateProgram === 'function'; + + if (state.recursive > 1) throw new Error('recursive program transformer re-entered'); + + return recreateProgram( + program, + host, + tsInstance, + addRoot(program.getRootFileNames(), fixturePath('src', 'recursive-added.ts')), + tsInstance.createProgram + ); +} diff --git a/test/assets/projects/program-transformer/tsconfig.chain.json b/test/assets/projects/program-transformer/tsconfig.chain.json new file mode 100644 index 0000000..31a783c --- /dev/null +++ b/test/assets/projects/program-transformer/tsconfig.chain.json @@ -0,0 +1,9 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "plugins": [ + { "transform": "./transformers/program.ts", "transformProgram": true, "import": "addOne" }, + { "transform": "./transformers/program.ts", "transformProgram": true, "import": "addTwo" } + ] + } +} diff --git a/test/assets/projects/program-transformer/tsconfig.json b/test/assets/projects/program-transformer/tsconfig.json new file mode 100644 index 0000000..0df551e --- /dev/null +++ b/test/assets/projects/program-transformer/tsconfig.json @@ -0,0 +1,12 @@ +{ + "include": [ "src/index.ts" ], + "compilerOptions": { + "target": "ES2018", + "module": "CommonJS", + "moduleResolution": "Node", + "lib": [ "ES2018" ], + "types": [], + "skipLibCheck": true, + "noEmit": false + } +} diff --git a/test/assets/projects/program-transformer/tsconfig.recursive.json b/test/assets/projects/program-transformer/tsconfig.recursive.json new file mode 100644 index 0000000..5b6e30d --- /dev/null +++ b/test/assets/projects/program-transformer/tsconfig.recursive.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "plugins": [ + { "transform": "./transformers/program.ts", "transformProgram": true, "import": "recursive" } + ] + } +} diff --git a/test/assets/projects/transform/package.json b/test/assets/projects/transform/package.json index 3b537e6..051ae0d 100644 --- a/test/assets/projects/transform/package.json +++ b/test/assets/projects/transform/package.json @@ -2,8 +2,6 @@ "name": "minimal-ts-patch", "main": "src/index.ts", "dependencies": { - "esm": "^3.2.25", - "ts-node" : "^10.9.1", "semver" : "^7.6.3" } } diff --git a/test/assets/projects/transform/run-custom-transformers.js b/test/assets/projects/transform/run-custom-transformers.js new file mode 100644 index 0000000..ad271fb --- /dev/null +++ b/test/assets/projects/transform/run-custom-transformers.js @@ -0,0 +1,67 @@ +const path = require('path'); + +process.env.TSP_SKIP_CACHE = true; +const tsInstance = require('ts-patch/compiler'); + +const configPath = path.join(__dirname, 'tsconfig.cts.json'); +const parsedConfig = getParsedConfig(configPath); + +Object.assign(parsedConfig.options, { + noEmit: false, + skipLibCheck: true, + outDir: 'dist', +}); + +const program = tsInstance.createProgram({ + rootNames: [ path.join(__dirname, 'src', 'index.ts') ], + options: parsedConfig.options, +}); + +const emittedFiles = new Map(); +program.emit( + undefined, + (fileName, content) => emittedFiles.set(fileName, content), + undefined, + false, + { before: [ customTransformer ] } +); + +process.stdout.write(emittedFiles.get('dist/index.js') || emittedFiles.get(path.join('dist', 'src', 'index.js')) || ''); + +function customTransformer(ctx) { + const { factory } = ctx; + + function visit(node) { + if (tsInstance.isStringLiteral(node) && node.text === 'after-cts') { + return factory.createStringLiteral('after-custom'); + } + + return tsInstance.visitEachChild(node, visit, ctx); + } + + return sourceFile => tsInstance.visitNode(sourceFile, visit); +} + +function getParsedConfig(configPath) { + const configFile = tsInstance.readConfigFile(configPath, tsInstance.sys.readFile); + if (configFile.error) throw new Error(tsInstance.formatDiagnostic(configFile.error, diagnosticHost())); + + const parsedConfig = tsInstance.parseJsonConfigFileContent( + configFile.config, + tsInstance.sys, + __dirname, + undefined, + configPath + ); + if (parsedConfig.errors.length) throw new Error(tsInstance.formatDiagnostics(parsedConfig.errors, diagnosticHost())); + + return parsedConfig; +} + +function diagnosticHost() { + return { + getCurrentDirectory: () => __dirname, + getCanonicalFileName: fileName => fileName, + getNewLine: () => tsInstance.sys.newLine, + }; +} diff --git a/test/assets/projects/transform/run-transform.js b/test/assets/projects/transform/run-transform.js index 6f9231c..667a300 100644 --- a/test/assets/projects/transform/run-transform.js +++ b/test/assets/projects/transform/run-transform.js @@ -44,7 +44,7 @@ function getTransformedFile(transformerKind) { program.emit(undefined, writeFile); - return emittedFiles.get('dist/index.js'); + return emittedFiles.get('dist/index.js') || emittedFiles.get(path.join('dist', 'src', 'index.js')); } diff --git a/test/assets/projects/transform/run-transpile.js b/test/assets/projects/transform/run-transpile.js new file mode 100644 index 0000000..72ae03e --- /dev/null +++ b/test/assets/projects/transform/run-transpile.js @@ -0,0 +1,37 @@ +const path = require('path'); + +process.env.TSP_SKIP_CACHE = true; +const tsInstance = require('ts-patch/compiler'); + +const configPath = path.join(__dirname, 'tsconfig.cts.json'); +const parsedConfig = getParsedConfig(configPath); + +const result = tsInstance.transpileModule('const a = "before";', { + compilerOptions: parsedConfig.options, +}); + +process.stdout.write(result.outputText); + +function getParsedConfig(configPath) { + const configFile = tsInstance.readConfigFile(configPath, tsInstance.sys.readFile); + if (configFile.error) throw new Error(tsInstance.formatDiagnostic(configFile.error, diagnosticHost())); + + const parsedConfig = tsInstance.parseJsonConfigFileContent( + configFile.config, + tsInstance.sys, + __dirname, + undefined, + configPath + ); + if (parsedConfig.errors.length) throw new Error(tsInstance.formatDiagnostics(parsedConfig.errors, diagnosticHost())); + + return parsedConfig; +} + +function diagnosticHost() { + return { + getCurrentDirectory: () => __dirname, + getCanonicalFileName: fileName => fileName, + getNewLine: () => tsInstance.sys.newLine, + }; +} diff --git a/test/assets/projects/transform/transformers/cjs/bad-plugin.ts b/test/assets/projects/transform/transformers/cjs/bad-plugin.ts new file mode 100644 index 0000000..29d48b9 --- /dev/null +++ b/test/assets/projects/transform/transformers/cjs/bad-plugin.ts @@ -0,0 +1 @@ +export default function broken( { diff --git a/test/assets/projects/transform/transformers/cjs/nested-helper.ts b/test/assets/projects/transform/transformers/cjs/nested-helper.ts new file mode 100644 index 0000000..fe901b7 --- /dev/null +++ b/test/assets/projects/transform/transformers/cjs/nested-helper.ts @@ -0,0 +1 @@ +export const nestedCjsValue = 'cjs-nested-ok'; diff --git a/test/assets/projects/transform/transformers/cjs/plugin.cts b/test/assets/projects/transform/transformers/cjs/plugin.cts index 7808fac..d6f1f3e 100644 --- a/test/assets/projects/transform/transformers/cjs/plugin.cts +++ b/test/assets/projects/transform/transformers/cjs/plugin.cts @@ -1,5 +1,8 @@ import type * as ts from 'typescript'; +const nested = require('./nested-helper'); +if (nested.nestedCjsValue !== 'cjs-nested-ok') throw new Error('Nested CJS TS helper did not load'); + export default function (program: ts.Program, _, { ts: tsInstance }: { ts: typeof ts }) { return (ctx: ts.TransformationContext) => { const factory = ctx.factory; diff --git a/test/assets/projects/transform/transformers/esm/nested-helper.mts b/test/assets/projects/transform/transformers/esm/nested-helper.mts new file mode 100644 index 0000000..ce4165b --- /dev/null +++ b/test/assets/projects/transform/transformers/esm/nested-helper.mts @@ -0,0 +1 @@ +export const nestedMtsValue = 'mts-nested-ok'; diff --git a/test/assets/projects/transform/transformers/esm/nested-ts.ts b/test/assets/projects/transform/transformers/esm/nested-ts.ts new file mode 100644 index 0000000..dcc1281 --- /dev/null +++ b/test/assets/projects/transform/transformers/esm/nested-ts.ts @@ -0,0 +1 @@ +export const nestedTsValue = 'ts-nested-ok'; diff --git a/test/assets/projects/transform/transformers/esm/plugin.mts b/test/assets/projects/transform/transformers/esm/plugin.mts index faeadbf..b8953c4 100644 --- a/test/assets/projects/transform/transformers/esm/plugin.mts +++ b/test/assets/projects/transform/transformers/esm/plugin.mts @@ -1,6 +1,11 @@ import type * as ts from 'typescript'; +import { nestedMtsValue } from './nested-helper.mts'; +import { nestedTsValue } from './nested-ts.js'; if (!import.meta.url) throw new Error('Not handled as esm'); +if (nestedMtsValue !== 'mts-nested-ok' || nestedTsValue !== 'ts-nested-ok') { + throw new Error('Nested ESM TS helpers did not load'); +} export default function (program: ts.Program, _, { ts: tsInstance }: { ts: typeof ts }) { return (ctx: ts.TransformationContext) => { diff --git a/test/assets/projects/transform/transformers/esm/plugin.ts b/test/assets/projects/transform/transformers/esm/plugin.ts index eced594..253be6e 100644 --- a/test/assets/projects/transform/transformers/esm/plugin.ts +++ b/test/assets/projects/transform/transformers/esm/plugin.ts @@ -1,6 +1,8 @@ import type * as ts from 'typescript'; +import { nestedTsValue } from './nested-ts.js'; if (!import.meta.url) throw new Error('Not handled as esm'); +if (nestedTsValue !== 'ts-nested-ok') throw new Error('Nested ESM .ts helper did not load'); export default function (program: ts.Program, _, { ts: tsInstance }: { ts: typeof ts }) { return (ctx: ts.TransformationContext) => { diff --git a/test/assets/projects/transform/transformers/node-next/package.json b/test/assets/projects/transform/transformers/node-next/package.json new file mode 100644 index 0000000..3dbc1ca --- /dev/null +++ b/test/assets/projects/transform/transformers/node-next/package.json @@ -0,0 +1,3 @@ +{ + "type": "module" +} diff --git a/test/assets/projects/transform/transformers/node-next/plugin.ts b/test/assets/projects/transform/transformers/node-next/plugin.ts new file mode 100644 index 0000000..60b8f5d --- /dev/null +++ b/test/assets/projects/transform/transformers/node-next/plugin.ts @@ -0,0 +1,19 @@ +import type * as ts from 'typescript'; + +if (!import.meta.url) throw new Error('NodeNext transformer was not handled as esm'); + +export default function (program: ts.Program, _, { ts: tsInstance }: { ts: typeof ts }) { + return (ctx: ts.TransformationContext) => { + const factory = ctx.factory; + + return (sourceFile: ts.SourceFile) => { + function visit(node: ts.Node): ts.Node { + if (tsInstance.isStringLiteral(node) && node.text === 'before') { + return factory.createStringLiteral('after-node-next'); + } + return tsInstance.visitEachChild(node, visit, ctx); + } + return tsInstance.visitNode(sourceFile, visit); + }; + }; +} diff --git a/test/assets/projects/transform/transformers/node-next/tsconfig.json b/test/assets/projects/transform/transformers/node-next/tsconfig.json new file mode 100644 index 0000000..a07e9bb --- /dev/null +++ b/test/assets/projects/transform/transformers/node-next/tsconfig.json @@ -0,0 +1,7 @@ +{ + "extends" : "../../tsconfig.json", + "include" : [ "." ], + "compilerOptions" : { + "module" : "NodeNext" + } +} diff --git a/test/assets/projects/transform/tsconfig.bad.json b/test/assets/projects/transform/tsconfig.bad.json new file mode 100644 index 0000000..d060932 --- /dev/null +++ b/test/assets/projects/transform/tsconfig.bad.json @@ -0,0 +1,11 @@ +{ + "extends" : "./tsconfig", + "compilerOptions" : { + "plugins": [ + { + "transform": "./transformers/cjs/bad-plugin.ts", + "tsConfig": "./transformers/cjs/tsconfig.json" + } + ] + } +} diff --git a/test/assets/projects/transform/tsconfig.json b/test/assets/projects/transform/tsconfig.json index a810423..f62ebae 100644 --- a/test/assets/projects/transform/tsconfig.json +++ b/test/assets/projects/transform/tsconfig.json @@ -4,6 +4,7 @@ "outDir": "dist", "module": "commonjs", "target": "esnext", + "ignoreDeprecations": "6.0", "noEmit": true } } diff --git a/test/assets/projects/transform/tsconfig.node-next.json b/test/assets/projects/transform/tsconfig.node-next.json new file mode 100644 index 0000000..241d9d7 --- /dev/null +++ b/test/assets/projects/transform/tsconfig.node-next.json @@ -0,0 +1,11 @@ +{ + "extends" : "./tsconfig", + "compilerOptions" : { + "plugins": [ + { + "transform": "./transformers/node-next/plugin.ts", + "tsConfig": "./transformers/node-next/tsconfig.json" + } + ] + } +} diff --git a/test/assets/projects/webpack/hide-module.js b/test/assets/projects/webpack/hide-module.js deleted file mode 100644 index 8e0b604..0000000 --- a/test/assets/projects/webpack/hide-module.js +++ /dev/null @@ -1,24 +0,0 @@ -const Module = require('module'); - - -/* ****************************************************************************************************************** * - * Config - * ****************************************************************************************************************** */ - -const hiddenModules = (process.env.HIDE_MODULES || '').split(',').map(str => str.trim()); - - -/* ****************************************************************************************************************** * - * Entry - * ****************************************************************************************************************** */ - -const originalRequire = Module.prototype.require; -Module.prototype.require = function(requestedModule) { - if (hiddenModules.includes(requestedModule)) { - const error = new Error(`Cannot find module '${requestedModule}'`); - error.code = 'MODULE_NOT_FOUND'; - throw error; - } - - return originalRequire.call(this, requestedModule); -}; diff --git a/test/assets/projects/webpack/package.json b/test/assets/projects/webpack/package.json index ad637d0..d8e41b6 100644 --- a/test/assets/projects/webpack/package.json +++ b/test/assets/projects/webpack/package.json @@ -7,8 +7,6 @@ "devDependencies" : { "ts-loader": "^9.4.2", "webpack": "^5.79.0", - "webpack-cli": "^5.0.1", - "esm": "^3.2.25", - "ts-node" : "^10.9.1" + "webpack-cli": "^5.0.1" } } diff --git a/test/assets/projects/webpack/webpack.config.js b/test/assets/projects/webpack/webpack.config.js index 97f9899..a962ca7 100644 --- a/test/assets/projects/webpack/webpack.config.js +++ b/test/assets/projects/webpack/webpack.config.js @@ -1,4 +1,5 @@ const path = require('path'); +const configFile = process.env.TS_CONFIG || 'tsconfig.json'; module.exports = { mode: 'development', @@ -13,7 +14,11 @@ module.exports = { test: /\.(ts|tsx)$/, loader: require.resolve('ts-loader'), options: { - compiler: 'ts-patch/typescript' + compiler: 'ts-patch/compiler', + configFile, + compilerOptions: { + noEmit: false + } } } ] diff --git a/test/package.json b/test/package.json index f0426ff..6e12f35 100644 --- a/test/package.json +++ b/test/package.json @@ -1,14 +1,14 @@ { "private": true, "scripts" : { - "perf": "ts-node -T --project tsconfig.json --files ./src/perf.ts" + "perf": "tsx --tsconfig tsconfig.json ./src/perf.ts" }, "dependencies": { - "ts-latest": "npm:typescript@beta", - "ts-node": "latest", + "ts-latest": "npm:typescript@6.0.3", + "tsx": "^4.21.0", "ts-patch": "link:../dist", "tsconfig-paths": "latest", - "fs-extra": "^10.0.0", - "@types/fs-extra": "^9.0.13" + "fs-extra": "^11.3.4", + "@types/fs-extra": "^11.0.4" } } diff --git a/test/src/project.ts b/test/src/project.ts index 87ca194..8f8a14a 100644 --- a/test/src/project.ts +++ b/test/src/project.ts @@ -49,7 +49,7 @@ export namespace PrepareOptions { export const getDefaults = () => ({ packageManager: 'npm', - tsVersion: 'beta' + tsVersion: '6.0.3' }) satisfies Partial; } diff --git a/test/tests/actions.test.ts b/test/tests/actions.test.ts index f555951..fc89fc5 100644 --- a/test/tests/actions.test.ts +++ b/test/tests/actions.test.ts @@ -1,15 +1,14 @@ import fs from 'fs'; -import { check } from '../../dist/actions'; -import { TsModule } from '../../dist/module'; -import { defaultInstallLibraries } from '../../dist/config'; +import path from 'path'; +import ts from 'typescript'; +import { check, install, patch, uninstall, unpatch } from '../../dist/actions'; +import { getModuleFile, getTsModule, TsModule } from '../../dist/module'; import { getTsPackage, TsPackage } from '../../dist/ts-package'; +import { LogLevel, PatchError } from '../../dist/system'; +import { InstallerOptions } from '../../dist'; import { PackageManager } from '../src/config'; import { prepareTestProject } from '../src/project'; -import path from 'path'; -import { InstallerOptions } from '../../dist'; -import { LogLevel } from '../../dist/system'; import { execSync } from 'child_process'; -import ts from 'typescript'; /* ****************************************************************************************************************** */ @@ -17,9 +16,7 @@ import ts from 'typescript'; /* ****************************************************************************************************************** */ const verboseMode = !!process.env.VERBOSE; -// const verboseMode = true; -/* Options to use with install/uninstall */ const testingPackageManagers = [ 'npm', 'yarn', @@ -32,6 +29,8 @@ const tspOptions: Partial = { silent: !verboseMode }; +const patchableModuleNames = [ ...TsModule.patchableNames ]; + // endregion @@ -39,12 +38,10 @@ const tspOptions: Partial = { // region: Helpers /* ****************************************************************************************************************** */ -function getModulesSources(tsPackage: TsPackage, moduleNames?: string[]) { - moduleNames ??= defaultInstallLibraries; +function getModulesSources(tsPackage: TsPackage, moduleNames = patchableModuleNames) { return new Map(moduleNames.map(name => { const modulePath = tsPackage.getModulePath(name); const dtsPath = modulePath.replace(/\.js$/, '.d.ts'); - const moduleContentPath = TsModule.getContentFilePathForModulePath(modulePath); const js = fs.readFileSync(moduleContentPath, 'utf-8'); @@ -54,68 +51,22 @@ function getModulesSources(tsPackage: TsPackage, moduleNames?: string[]) { })); } -function updatePackageJson(pkgPath: string, cb: (pkgJson: any) => void) { - let pkgJson = JSON.parse(fs.readFileSync(pkgPath, 'utf-8')); - cb(pkgJson); - fs.writeFileSync(pkgPath, JSON.stringify(pkgJson, null, 2)); -} - -function resetRequireCache(dir: string) { - dir = path.dirname(require.resolve(dir)); - for (const key in require.cache) { - if (key.startsWith(dir)) { - delete require.cache[key]; - } - } +function getModules(tsPackage: TsPackage, moduleNames = patchableModuleNames) { + return moduleNames.map(name => getTsModule(tsPackage, name, { skipCache: true })); } -function runAction(tspDir: string, kind: 'api' | 'cli', cmd: string) { - switch (kind) { - case 'api': - const scriptCode = ` - require('ts-patch').${cmd} - `; - - fs.writeFileSync(path.join(tspDir, 'run-cmd.js'), scriptCode, 'utf-8'); - execSync(`node run-cmd.js`, { cwd: tspDir }); - break; - case 'cli': - const flags = verboseMode ? `--verbose` : '--silent'; - execSync(`ts-patch ${cmd} ${flags}`, { cwd: tspDir }); - } - - resetRequireCache(tspDir); - const { getTsPackage } = require(path.join(tspDir, 'ts-package.js')); - const { getTsModule } = require(path.join(tspDir, 'module')); - const tsPackage = getTsPackage(); - const modules = defaultInstallLibraries.map((m: any) => getTsModule(tsPackage, m)); - - return { modules, tsPackage }; -} - -function runInstall(tspDir: string, kind: 'api' | 'cli') { - let cmd: string; - if (kind === 'api') { - cmd = `install(${JSON.stringify(tspOptions)})`; - } else { - cmd = `install ${verboseMode ? '--verbose' : '--silent'}`; - } - - return runAction(tspDir, kind, cmd); +function getOptions(tsDir: string): Partial { + return { ...tspOptions, dir: tsDir }; } -function runUninstall(tspDir: string, kind: 'api' | 'cli') { - let cmd: string; - if (kind === 'api') { - const tspOptions: Partial = { - logLevel: LogLevel.verbose, - }; - cmd = `uninstall(${JSON.stringify(tspOptions)})`; - } else { - cmd = `uninstall --verbose`; +function expectUnsupportedTarget(fn: () => unknown) { + try { + fn(); + throw new Error('Expected unsupported target error'); + } catch (e) { + expect(e).toBeInstanceOf(PatchError); + expect((e as PatchError).code).toBe('PATCH_TARGET_UNSUPPORTED'); } - - return runAction(tspDir, kind, cmd); } // endregion @@ -126,125 +77,97 @@ function runUninstall(tspDir: string, kind: 'api' | 'cli') { * ********************************************************************************************************************/ describe(`TSP Actions`, () => { - // TODO - Parallelize describe.each(testingPackageManagers)(`%s`, (packageManager) => { - /* Install */ - describe(`Install`, () => { - let projectPath: string; - let tmpProjectPath: string; - let tspDir: string; + describe(`install`, () => { let tsDir: string; - let cachePath: string; + let tsPackage: TsPackage; + let modules: TsModule[]; let originalModulesSrc: Map; - beforeAll(() => { - const prepRes = prepareTestProject({ projectName: 'main', packageManager }); - projectPath = prepRes.projectPath; - tmpProjectPath = prepRes.tmpProjectPath; - const tsPackage = getTsPackage(tsDir); + beforeAll(() => { + const { tmpProjectPath } = prepareTestProject({ projectName: 'main', packageManager }); + tsDir = path.resolve(tmpProjectPath, 'node_modules', 'typescript'); + tsPackage = getTsPackage(tsDir); originalModulesSrc = getModulesSources(tsPackage); - tspDir = path.resolve(tmpProjectPath, 'node_modules', 'ts-patch'); - tsDir = path.resolve(tmpProjectPath, 'node_modules', 'typescript'); - cachePath = path.resolve(tspDir, '../.cache/ts-patch'); + const res = install(getOptions(tsDir)); + expect(res).toBe(true); + + tsPackage = getTsPackage(tsDir); + modules = getModules(tsPackage); }); - describe.each([ [ '', '0.0.0' ], [ ' (overwrite w/ higher version)', '1.1.1' ] ])(`Install %s`, (caption, installedTspVersion) => { - let tsPackage: TsPackage; - let modules: TsModule[]; - beforeAll(() => { - /* Set version */ - updatePackageJson(path.join(tspDir, 'package.json'), (pkgData) => pkgData.version = installedTspVersion); + test(`Original modules backed up`, () => { + for (const m of modules) { + const origSrcEntry = originalModulesSrc.get(m.moduleName)!; - tsPackage = getTsPackage(tsDir); + if (m.dtsPath) { + const backupSrc = fs.readFileSync(m.backupCachePaths.dts!, 'utf-8'); + expect(backupSrc).toBe(origSrcEntry.dts); + } - /* Install */ - const runRes = runInstall(tspDir, 'api'); + const backupSrc = fs.readFileSync(m.backupCachePaths.js, 'utf-8'); + expect(backupSrc).toBe(origSrcEntry.js); + } + }); - modules = runRes.modules; + test(`Patchable modules installed`, () => { + modules.forEach(m => { + expect(m.isPatched).toBe(true); + expect(m.moduleFile.patchDetail?.moduleName).toBe(m.moduleName); }); + }); - test(`Original modules backed up`, () => { - for (const m of modules) { - const origSrcEntry = originalModulesSrc.get(m.moduleName)!; - if (m.dtsPath) { - const backupSrc = fs.readFileSync(m.backupCachePaths.dts!, 'utf-8'); - expect(backupSrc).toBe(origSrcEntry.dts); - } + test(`Service modules are not persistent patch targets`, () => { + for (const moduleName of TsModule.legacyServiceNames) { + const modulePath = tsPackage.getModulePath(moduleName); + expect(getModuleFile(modulePath).patchDetail).toBeUndefined(); + } + }); - const backupSrc = fs.readFileSync(m.backupCachePaths.js!, 'utf-8'); - expect(backupSrc).toBe(origSrcEntry.js); - } - }); + test(`check() reports patchable modules only`, () => { + const checkResult = check(undefined, getOptions(tsDir)); + expect(Object.keys(checkResult).sort()).toEqual([ ...patchableModuleNames ].sort()); + patchableModuleNames.forEach(m => expect(checkResult[m]?.moduleName).toBe(m)); + }); - test(`All modules patched`, () => { - modules.forEach(m => { - expect(m.isPatched).toBe(true); - expect(m.moduleFile.patchDetail?.tspVersion).toBe(installedTspVersion); - }) - }); + test(`No semantic errors in typescript.d.ts`, () => { + const dtsFilePath = path.join(tsDir, 'typescript.d.ts'); - test(`check() is accurate`, () => { - const checkResult = check(undefined, tspOptions); - const unpatchedModuleNames = tsPackage.moduleNames.filter(m => !defaultInstallLibraries.includes(m)); - unpatchedModuleNames.forEach(m => expect(checkResult[m]).toBeUndefined()); - defaultInstallLibraries.forEach(m => expect(checkResult[m]?.tspVersion).toBe(installedTspVersion)); + const compilerOptions = Object.assign(ts.getDefaultCompilerOptions(), { + target: ts.ScriptTarget.ES2018, + lib: [ 'es2018' ], + skipDefaultLibCheck: true }); + const program = ts.createProgram([ dtsFilePath ], compilerOptions); + const diagnostics = program.getSemanticDiagnostics(); - test(`No semantic errors in typescript.d.ts`, () => { - const dtsFilePath = path.join(tsDir, 'typescript.d.ts'); - - const compilerOptions = Object.assign(ts.getDefaultCompilerOptions(), { - target: ts.ScriptTarget.ES2018, - lib: [ 'es2018' ], - skipDefaultLibCheck: true - }); - - const program = ts.createProgram([ dtsFilePath ], compilerOptions); - const diagnostics = program.getSemanticDiagnostics(); - - // Using toHaveLength causes indefinite hang - expect(diagnostics.length).toBe(0); - }); + // Using toHaveLength causes indefinite hang + expect(diagnostics.length).toBe(0); }); }); - /* Uninstall */ - describe(`Uninstall`, () => { - let projectPath: string; - let tmpProjectPath: string; - let tspDir: string; + describe(`uninstall`, () => { let tsDir: string; - let cachePath: string; + let tsPackage: TsPackage; let modules: TsModule[]; let originalModulesSrc: Map; - let tsPackage: TsPackage; - beforeAll(() => { - const prepRes = prepareTestProject({ projectName: 'main', packageManager }); - projectPath = prepRes.projectPath; - tmpProjectPath = prepRes.tmpProjectPath; + beforeAll(() => { + const { tmpProjectPath } = prepareTestProject({ projectName: 'main', packageManager }); + tsDir = path.resolve(tmpProjectPath, 'node_modules', 'typescript'); tsPackage = getTsPackage(tsDir); originalModulesSrc = getModulesSources(tsPackage); - tspDir = path.resolve(tmpProjectPath, 'node_modules', 'ts-patch'); - tsDir = path.resolve(tmpProjectPath, 'node_modules', 'typescript'); - cachePath = path.resolve(tspDir, '../.cache/ts-patch'); + expect(install(getOptions(tsDir))).toBe(true); + expect(uninstall(getOptions(tsDir))).toBe(true); - /* Install */ - let runRes = runInstall(tspDir, 'api'); - modules = runRes.modules; - modules.forEach(m => { - expect(m.isPatched).toBe(true); - }); - - /* Uninstall */ - runRes = runUninstall(tspDir, 'api'); - modules = runRes.modules; + tsPackage = getTsPackage(tsDir); + modules = getModules(tsPackage); }); - test(`All modules unpatched`, () => { + test(`Patchable modules uninstalled`, () => { modules.forEach(m => { expect(m.isPatched).toBe(false); expect(m.moduleFile.patchDetail).toBeUndefined(); @@ -254,6 +177,7 @@ describe(`TSP Actions`, () => { test(`All files match originals`, () => { for (const m of modules) { const origSrcEntry = originalModulesSrc.get(m.moduleName)!; + if (m.dtsPath) { const src = fs.readFileSync(m.dtsPath, 'utf-8'); expect(src).toBe(origSrcEntry.dts); @@ -266,9 +190,39 @@ describe(`TSP Actions`, () => { }); test(`check() is accurate`, () => { - const checkResult = check(undefined, tspOptions); - tsPackage.moduleNames.forEach(m => expect(checkResult[m]).toBeUndefined()); + const checkResult = check(undefined, getOptions(tsDir)); + patchableModuleNames.forEach(m => expect(checkResult[m]).toBeUndefined()); }); }); }); + + test(`CLI install and uninstall patch only patchable modules`, () => { + const { tmpProjectPath } = prepareTestProject({ projectName: 'main', packageManager: 'npm' }); + const tsDir = path.resolve(tmpProjectPath, 'node_modules', 'typescript'); + const binPath = path.resolve(tmpProjectPath, 'node_modules', '.bin', 'ts-patch'); + + execSync(`${binPath} install --silent`, { cwd: tmpProjectPath }); + + let tsPackage = getTsPackage(tsDir); + for (const moduleName of patchableModuleNames) { + expect(getTsModule(tsPackage, moduleName, { skipCache: true }).isPatched).toBe(true); + } + for (const moduleName of TsModule.legacyServiceNames) { + expect(getModuleFile(tsPackage.getModulePath(moduleName)).patchDetail).toBeUndefined(); + } + + execSync(`${binPath} uninstall --silent`, { cwd: tmpProjectPath }); + + tsPackage = getTsPackage(tsDir); + for (const moduleName of patchableModuleNames) { + expect(getTsModule(tsPackage, moduleName, { skipCache: true }).isPatched).toBe(false); + } + }); + + test(`service modules are rejected by patch APIs`, () => { + expectUnsupportedTarget(() => patch('tsserver', tspOptions)); + expectUnsupportedTarget(() => patch('tsserverlibrary', tspOptions)); + expectUnsupportedTarget(() => unpatch('tsserver', tspOptions)); + expectUnsupportedTarget(() => check('tsserver', tspOptions)); + }); }); diff --git a/test/tests/diagnostics.test.ts b/test/tests/diagnostics.test.ts new file mode 100644 index 0000000..74c5d83 --- /dev/null +++ b/test/tests/diagnostics.test.ts @@ -0,0 +1,56 @@ +import { execSync } from 'child_process'; +import path from 'path'; +import { prepareTestProject } from '../src/project'; + + +/* ****************************************************************************************************************** */ +// region: Helpers +/* ****************************************************************************************************************** */ + +function execAndGetErrorOutput(cmd: string, cwd: string) { + try { + execSync(cmd, { cwd, stdio: [ 'ignore', 'pipe', 'pipe' ] }); + return ''; + } catch (e) { + const error = e as { stdout?: Buffer, stderr?: Buffer }; + return `${error.stdout?.toString('utf8') || ''}${error.stderr?.toString('utf8') || ''}`; + } +} + +// endregion + + +/* ****************************************************************************************************************** * + * Tests + * ****************************************************************************************************************** */ + +describe('Transformer diagnostics', () => { + let projectPath: string; + + beforeAll(() => { + const prepRes = prepareTestProject({ projectName: 'diagnostics', packageManager: 'npm' }); + projectPath = prepRes.tmpProjectPath; + }); + + test('tspc prints added diagnostics and honors removed diagnostics', () => { + const output = execAndGetErrorOutput( + `${path.join(projectPath, 'node_modules', '.bin', 'tspc')} --pretty false`, + projectPath + ); + + expect(output).toContain('TS1337'); + expect(output).toContain('DIAG_ARRAY=true'); + expect(output).toContain('FOUND_ORIGINAL=true'); + expect(output).toContain('LIBRARY=tsc'); + expect(output).not.toContain('TS2339'); + }); + + test('compiler API emit result includes added diagnostics', () => { + const output = execSync(`node run-emit.js`, { cwd: projectPath }).toString('utf8'); + const diagnostics = JSON.parse(output) as Array<{ code: number, message: string }>; + const diagnostic = diagnostics.find(({ code }) => code === 1337); + + expect(diagnostic?.message).toContain('DIAG_ARRAY=true'); + expect(diagnostic?.message).toContain('LIBRARY=typescript'); + }); +}); diff --git a/test/tests/live-router.test.ts b/test/tests/live-router.test.ts new file mode 100644 index 0000000..285aa79 --- /dev/null +++ b/test/tests/live-router.test.ts @@ -0,0 +1,30 @@ +import { getLiveModule } from '../../dist/module'; + + +/* ****************************************************************************************************************** */ +// region: Tests +/* ****************************************************************************************************************** */ + +describe('live compiler routes', () => { + test('compiler route exposes patched TypeScript', () => { + const ts = require('../../dist/compiler'); + expect(typeof ts.createProgram).toBe('function'); + expect(typeof ts.originalCreateProgram).toBe('function'); + }); + + test('tsserverlibrary route exposes patched TypeScript with service identity', () => { + const tsserverLibrary = require('../../dist/compiler/tsserverlibrary'); + expect(typeof tsserverLibrary.createProgram).toBe('function'); + expect(typeof tsserverLibrary.originalCreateProgram).toBe('function'); + + const { js } = getLiveModule('typescript.js', { libraryName: 'tsserverlibrary' }); + expect(js).toContain(`tsp.currentLibrary = 'tsserverlibrary'`); + }); + + test('tsserver live route can generate a patched TypeScript dependency with service identity', () => { + const { js } = getLiveModule('typescript.js', { libraryName: 'tsserver' }); + expect(js).toContain(`tsp.currentLibrary = 'tsserver'`); + }); +}); + +// endregion diff --git a/test/tests/module-format.test.ts b/test/tests/module-format.test.ts new file mode 100644 index 0000000..c01156e --- /dev/null +++ b/test/tests/module-format.test.ts @@ -0,0 +1,88 @@ +import { execSync } from 'child_process'; +import { prepareTestProject } from '../src/project'; + + +/* ****************************************************************************************************************** */ +// region: Helpers +/* ****************************************************************************************************************** */ + +function execCase(projectPath: string, caseName: string) { + return execSync( + `node run-case.js ${caseName}`, + { cwd: projectPath, stdio: [ 'ignore', 'pipe', 'pipe' ] } + ).toString('utf8'); +} + +function execCaseError(projectPath: string, caseName: string) { + try { + execCase(projectPath, caseName); + return ''; + } catch (e) { + const error = e as { stdout?: Buffer, stderr?: Buffer }; + return `${error.stdout?.toString('utf8') || ''}${error.stderr?.toString('utf8') || ''}`; + } +} + +// endregion + + +/* ****************************************************************************************************************** * + * Tests + * ****************************************************************************************************************** */ + +describe('Transformer module format detection', () => { + let projectPath: string; + + beforeAll(() => { + const prepRes = prepareTestProject({ projectName: 'module-format', packageManager: 'npm' }); + projectPath = prepRes.tmpProjectPath; + }); + + test.each([ + [ 'default-cjs' ], + [ 'package-module-ts' ], + [ 'explicit-esnext-ts' ], + [ 'explicit-commonjs-ts' ], + [ 'node-next-default-cjs' ], + [ 'node-next-package-module' ], + [ 'mts-commonjs' ], + [ 'cts-esnext' ], + ])('%s loads with the TypeScript emit format', (caseName) => { + expect(execCase(projectPath, caseName)).toMatch(new RegExp(`const value = "${caseName}";?$`, 'm')); + }); + + test.each([ + [ 'unsupported-preserve', 'Preserve' ], + [ 'unsupported-amd', 'AMD' ], + [ 'unsupported-umd', 'UMD' ], + [ 'unsupported-system', 'System' ], + ])('%s rejects unsupported Node runtime emit format', (caseName, moduleKind) => { + const output = execCaseError(projectPath, caseName); + expect(output).toContain(`module" setting "${moduleKind}"`); + expect(output).toContain('not loadable in Node'); + }); + + test(`entry import.meta CommonJS runtime failure gets a ts-patch hint`, () => { + const output = execCaseError(projectPath, 'import-meta-cjs'); + expect(output).toContain('uses "import.meta" but was loaded as CommonJS'); + expect(output).toContain('Rename the transformer or helper to ".mts"'); + }); + + test(`lazy import.meta CommonJS runtime failure gets a ts-patch hint`, () => { + const output = execCaseError(projectPath, 'lazy-import-meta-cjs'); + expect(output).toContain('uses "import.meta" but was loaded as CommonJS'); + expect(output).toContain('Rename the transformer or helper to ".mts"'); + }); + + test(`top-level await CommonJS runtime failure gets a ts-patch hint`, () => { + const output = execCaseError(projectPath, 'top-level-await-cjs'); + expect(output).toContain('uses top-level "await" but was loaded as CommonJS'); + expect(output).toContain('Rename the transformer or helper to ".mts"'); + }); + + test(`top-level await ESM require failure gets a ts-patch hint`, () => { + const output = execCaseError(projectPath, 'async-esm-entry'); + expect(output).toContain('contains top-level "await" in its ESM graph'); + expect(output).toContain('cannot be loaded synchronously with require()'); + }); +}); diff --git a/test/tests/module-hooks.test.ts b/test/tests/module-hooks.test.ts new file mode 100644 index 0000000..a8b6d01 --- /dev/null +++ b/test/tests/module-hooks.test.ts @@ -0,0 +1,47 @@ +import fs from 'fs'; +import os from 'os'; +import path from 'path'; +import { pathToFileURL, fileURLToPath } from 'url'; + + +describe('Node module hooks', () => { + test('synchronous registerHooks supports transformer loader requirements', () => { + const moduleApi = require('node:module'); + const { registerHooks } = moduleApi; + + expect(typeof registerHooks).toBe('function'); + + const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'tsp-hooks-test-')); + fs.writeFileSync(path.join(dir, 'entry.cjs'), 'module.exports = require("./helper.ts").value;'); + fs.writeFileSync(path.join(dir, 'esm.mts'), 'export default 42;'); + + const hooks = registerHooks({ + resolve(specifier: string, context: any, nextResolve: Function) { + if (specifier.endsWith('.ts') || specifier.endsWith('.mts')) { + const parentURL = context.parentURL || pathToFileURL(path.join(dir, 'root.cjs')).href; + return { url: new URL(specifier, parentURL).href, shortCircuit: true }; + } + return nextResolve(specifier, context); + }, + load(fileURL: string, context: any, nextLoad: Function) { + if (!fileURL.startsWith('file:')) return nextLoad(fileURL, context); + const filePath = fileURLToPath(fileURL); + if (filePath.endsWith('helper.ts')) { + return { format: 'commonjs', source: 'module.exports = { value: 42 };', shortCircuit: true }; + } + if (filePath.endsWith('esm.mts')) { + return { format: 'module', source: fs.readFileSync(filePath, 'utf8'), shortCircuit: true }; + } + return nextLoad(fileURL, context); + } + }); + + try { + expect(typeof hooks.deregister).toBe('function'); + expect((moduleApi as any)._load(path.join(dir, 'entry.cjs'), module, false)).toBe(42); + expect((moduleApi as any)._load(path.join(dir, 'esm.mts'), module, false).default).toBe(42); + } finally { + hooks.deregister(); + } + }); +}); diff --git a/test/tests/program-transformer.test.ts b/test/tests/program-transformer.test.ts new file mode 100644 index 0000000..94f02ac --- /dev/null +++ b/test/tests/program-transformer.test.ts @@ -0,0 +1,65 @@ +import { execSync } from 'child_process'; +import { prepareTestProject } from '../src/project'; + + +/* ****************************************************************************************************************** */ +// region: Helpers +/* ****************************************************************************************************************** */ + +interface ProgramTransformerCaseResult { + addedOne: boolean; + addedTwo: boolean; + recursiveAdded: boolean; + state: { + addOne: number; + addTwo: number; + recursive: number; + addTwoSawAddOne: boolean; + originalCreateProgramAvailable: boolean; + }; +} + +function execCase(projectPath: string, caseName: string): ProgramTransformerCaseResult { + return JSON.parse(execSync( + `node run-case.js ${caseName}`, + { + cwd: projectPath, + timeout: 10000, + stdio: [ 'ignore', 'pipe', 'pipe' ] + } + ).toString('utf8')); +} + +// endregion + + +/* ****************************************************************************************************************** * + * Tests + * ****************************************************************************************************************** */ + +describe('Program transformers', () => { + let projectPath: string; + + beforeAll(() => { + const prepRes = prepareTestProject({ projectName: 'program-transformer', packageManager: 'npm' }); + projectPath = prepRes.tmpProjectPath; + }); + + test('program transformers chain and receive replaced programs', () => { + const result = execCase(projectPath, 'chain'); + + expect(result.addedOne).toBe(true); + expect(result.addedTwo).toBe(true); + expect(result.state.addOne).toBe(1); + expect(result.state.addTwo).toBe(1); + expect(result.state.addTwoSawAddOne).toBe(true); + }); + + test('recursive createProgram calls do not re-enter the active transformer', () => { + const result = execCase(projectPath, 'recursive'); + + expect(result.recursiveAdded).toBe(true); + expect(result.state.recursive).toBe(1); + expect(result.state.originalCreateProgramAvailable).toBe(true); + }); +}); diff --git a/test/tests/transformer.test.ts b/test/tests/transformer.test.ts index df7f193..566c9e2 100644 --- a/test/tests/transformer.test.ts +++ b/test/tests/transformer.test.ts @@ -7,13 +7,24 @@ import { execSync } from 'child_process'; /* ****************************************************************************************************************** */ const transformerKinds = [ + 'cts', + 'cjs', 'mts', 'ts', - 'cts', - 'mjs', - 'cjs' + 'node-next', + 'mjs' ]; +function execAndGetErrorOutput(cmd: string, cwd: string) { + try { + execSync(cmd, { cwd, stdio: [ 'ignore', 'pipe', 'pipe' ] }); + return ''; + } catch (e) { + const error = e as { stdout?: Buffer, stderr?: Buffer }; + return `${error.stdout?.toString('utf8') || ''}${error.stderr?.toString('utf8') || ''}`; + } +} + // endregion @@ -29,7 +40,6 @@ describe(`Transformer`, () => { const prepRes = prepareTestProject({ projectName: 'transform', packageManager: 'yarn', - tsVersion: '5.5.2', }); projectPath = prepRes.tmpProjectPath; loaderResolve(); @@ -41,4 +51,25 @@ describe(`Transformer`, () => { const res = execSync(`node run-transform.js ${transformerKind}`, { cwd: projectPath }); expect(res.toString('utf8')).toMatch(new RegExp(`^(?:var|const) a = "after-${transformerKind}";?$`, 'm')); }); + + test(`transformer compile errors surface as ts-patch errors`, async () => { + await loaderPromise; + + expect(execAndGetErrorOutput(`node run-transform.js bad`, projectPath)).toMatch(/Unable to compile TypeScript transformer/); + }); + + test(`transpileModule applies ts-patch plugins`, async () => { + await loaderPromise; + + const res = execSync(`node run-transpile.js`, { cwd: projectPath }); + expect(res.toString('utf8')).toMatch(/(?:var|const) a = "after-cts";?/); + }); + + test(`custom transformers are merged with ts-patch transformers`, async () => { + await loaderPromise; + + const res = execSync(`node run-custom-transformers.js`, { cwd: projectPath }); + expect(res.toString('utf8')).toMatch(/(?:var|const) a = "after-custom";?/); + }); + }); diff --git a/test/tests/webpack.test.ts b/test/tests/webpack.test.ts index 453d0c6..0f1a010 100644 --- a/test/tests/webpack.test.ts +++ b/test/tests/webpack.test.ts @@ -1,4 +1,4 @@ -import { execSync, ExecSyncOptions } from 'child_process'; +import { execSync } from 'child_process'; import { prepareTestProject } from '../src/project'; @@ -6,22 +6,18 @@ import { prepareTestProject } from '../src/project'; // region: Helpers /* ****************************************************************************************************************** */ -function execAndGetErr(projectPath: string, projectFile: string = '', hideModules?: string) { - const extraOpts: ExecSyncOptions = { - ...(hideModules ? { env: { ...process.env, HIDE_MODULES: hideModules } } : {}) - }; - - const cmd = `ts-node ${hideModules ? '-r ./hide-module.js' : ''} -C ts-patch/compiler${projectFile ? ` -P ${projectFile}` : ''}` +function execAndGetErr(projectPath: string, projectFile = 'tsconfig.json') { + const cmd = `node ./node_modules/webpack/bin/webpack.js --config webpack.config.js`; try { execSync( cmd, { cwd: projectPath, stdio: [ 'ignore', 'pipe', 'pipe' ], - ...extraOpts + env: { ...process.env, TS_CONFIG: projectFile } }); } catch (e) { - return e.stderr.toString(); + return `${e.stdout.toString()}${e.stderr.toString()}`; } throw new Error('Expected error to be thrown, but none was'); @@ -47,17 +43,12 @@ describe('Webpack', () => { }); test(`Compiler with ESM TS transformer works`, () => { - const err = execAndGetErr(projectPath, './tsconfig.esmts.json'); + const err = execAndGetErr(projectPath, 'tsconfig.esmts.json'); expect(err).toContain('Error: ts-patch worked (esmts)'); }); test(`Compiler with ESM JS transformer works`, () => { - const err = execAndGetErr(projectPath, './tsconfig.esm.json'); + const err = execAndGetErr(projectPath, 'tsconfig.esm.json'); expect(err).toContain('Error: ts-patch worked (esm)'); }); - - test(`Compiler with ESM transformer throws if no ESM package`, () => { - const err = execAndGetErr(projectPath, './tsconfig.esm.json', 'esm'); - expect(err).toContain('To enable experimental ESM support, install the \'esm\' package'); - }); }); diff --git a/test/tsconfig.json b/test/tsconfig.json index e82a65c..68af06f 100644 --- a/test/tsconfig.json +++ b/test/tsconfig.json @@ -5,6 +5,7 @@ "compilerOptions": { "noEmit": true, "target": "ESNext", + "types": [ "node", "jest" ], "skipDefaultLibCheck": true, "skipLibCheck": true } diff --git a/tsconfig.base.json b/tsconfig.base.json index ca7ceca..e7fafb2 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -12,6 +12,7 @@ "target": "ES2020", "module": "CommonJS", "moduleResolution": "node", + "ignoreDeprecations": "6.0", "newLine": "LF", "allowJs": false, diff --git a/yarn.lock b/yarn.lock index 5e8eee2..9b2a19d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10,7 +10,7 @@ "@jridgewell/gen-mapping" "^0.3.5" "@jridgewell/trace-mapping" "^0.3.24" -"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.25.9", "@babel/code-frame@^7.26.0", "@babel/code-frame@^7.26.2": +"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.25.9", "@babel/code-frame@^7.26.0", "@babel/code-frame@^7.26.2": version "7.26.2" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.26.2.tgz#4b5fab97d33338eff916235055f0ebc21e573a85" integrity sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ== @@ -19,12 +19,26 @@ js-tokens "^4.0.0" picocolors "^1.0.0" +"@babel/code-frame@^7.27.1", "@babel/code-frame@^7.28.6", "@babel/code-frame@^7.29.0": + version "7.29.0" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.29.0.tgz#7cd7a59f15b3cc0dcd803038f7792712a7d0b15c" + integrity sha512-9NhCeYjq9+3uxgdtp20LSiJXJvN0FeCtNGpJxuMFZ1Kv3cWUNb6DOhJwUvcVCzKGR66cw4njwM6hrJLqgOwbcw== + dependencies: + "@babel/helper-validator-identifier" "^7.28.5" + js-tokens "^4.0.0" + picocolors "^1.1.1" + "@babel/compat-data@^7.25.9": version "7.26.3" resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.26.3.tgz#99488264a56b2aded63983abd6a417f03b92ed02" integrity sha512-nHIxvKPniQXpmQLb0vhY3VaFb3S0YrTAwpOWJZh1wn3oJPjJk9Asva204PsBdmAE8vpzfHudT8DB0scYvy9q0g== -"@babel/core@^7.11.6", "@babel/core@^7.12.3", "@babel/core@^7.23.9": +"@babel/compat-data@^7.28.6": + version "7.29.3" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.29.3.tgz#e3f5347f0589596c91d227ccb6a541d37fb1307b" + integrity sha512-LIVqM46zQWZhj17qA8wb4nW/ixr2y1Nw+r1etiAWgRM6U1IqP+LNhL1yg440jYZR72jCWcWbLWzIosH+uP1fqg== + +"@babel/core@^7.23.9": version "7.26.0" resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.26.0.tgz#d78b6023cc8f3114ccf049eb219613f74a747b40" integrity sha512-i1SLeK+DzNnQ3LL/CswPCa/E5u4lh1k6IAEphON8F+cXt0t9euTshDru0q7/IqMa1PMPz5RnHuHscF8/ZJsStg== @@ -45,7 +59,28 @@ json5 "^2.2.3" semver "^6.3.1" -"@babel/generator@^7.26.0", "@babel/generator@^7.26.3", "@babel/generator@^7.7.2": +"@babel/core@^7.27.4": + version "7.29.0" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.29.0.tgz#5286ad785df7f79d656e88ce86e650d16ca5f322" + integrity sha512-CGOfOJqWjg2qW/Mb6zNsDm+u5vFQ8DxXfbM09z69p5Z6+mE1ikP2jUXw+j42Pf1XTYED2Rni5f95npYeuwMDQA== + dependencies: + "@babel/code-frame" "^7.29.0" + "@babel/generator" "^7.29.0" + "@babel/helper-compilation-targets" "^7.28.6" + "@babel/helper-module-transforms" "^7.28.6" + "@babel/helpers" "^7.28.6" + "@babel/parser" "^7.29.0" + "@babel/template" "^7.28.6" + "@babel/traverse" "^7.29.0" + "@babel/types" "^7.29.0" + "@jridgewell/remapping" "^2.3.5" + convert-source-map "^2.0.0" + debug "^4.1.0" + gensync "^1.0.0-beta.2" + json5 "^2.2.3" + semver "^6.3.1" + +"@babel/generator@^7.26.0", "@babel/generator@^7.26.3": version "7.26.3" resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.26.3.tgz#ab8d4360544a425c90c248df7059881f4b2ce019" integrity sha512-6FF/urZvD0sTeO7k6/B15pMLC4CHUv1426lzr3N01aHJTl046uCAh9LXW/fzeXXjPNCJ6iABW5XaWOsIZB93aQ== @@ -56,6 +91,17 @@ "@jridgewell/trace-mapping" "^0.3.25" jsesc "^3.0.2" +"@babel/generator@^7.27.5", "@babel/generator@^7.29.0": + version "7.29.1" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.29.1.tgz#d09876290111abbb00ef962a7b83a5307fba0d50" + integrity sha512-qsaF+9Qcm2Qv8SRIMMscAvG4O3lJ0F1GuMo5HR/Bp02LopNgnZBC/EkbevHFeGs4ls/oPz9v+Bsmzbkbe+0dUw== + dependencies: + "@babel/parser" "^7.29.0" + "@babel/types" "^7.29.0" + "@jridgewell/gen-mapping" "^0.3.12" + "@jridgewell/trace-mapping" "^0.3.28" + jsesc "^3.0.2" + "@babel/helper-compilation-targets@^7.25.9": version "7.25.9" resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.25.9.tgz#55af025ce365be3cdc0c1c1e56c6af617ce88875" @@ -67,6 +113,22 @@ lru-cache "^5.1.1" semver "^6.3.1" +"@babel/helper-compilation-targets@^7.28.6": + version "7.28.6" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.28.6.tgz#32c4a3f41f12ed1532179b108a4d746e105c2b25" + integrity sha512-JYtls3hqi15fcx5GaSNL7SCTJ2MNmjrkHXg4FSpOA/grxK8KwyZ5bubHsCq8FXCkua6xhuaaBit+3b7+VZRfcA== + dependencies: + "@babel/compat-data" "^7.28.6" + "@babel/helper-validator-option" "^7.27.1" + browserslist "^4.24.0" + lru-cache "^5.1.1" + semver "^6.3.1" + +"@babel/helper-globals@^7.28.0": + version "7.28.0" + resolved "https://registry.yarnpkg.com/@babel/helper-globals/-/helper-globals-7.28.0.tgz#b9430df2aa4e17bc28665eadeae8aa1d985e6674" + integrity sha512-+W6cISkXFa1jXsDEdYA8HeevQT/FULhxzR99pxphltZcVaugps53THCeiWA8SguxxpSp3gKPiuYfSWopkLQ4hw== + "@babel/helper-module-imports@^7.25.9": version "7.25.9" resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.25.9.tgz#e7f8d20602ebdbf9ebbea0a0751fb0f2a4141715" @@ -75,6 +137,14 @@ "@babel/traverse" "^7.25.9" "@babel/types" "^7.25.9" +"@babel/helper-module-imports@^7.28.6": + version "7.28.6" + resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.28.6.tgz#60632cbd6ffb70b22823187201116762a03e2d5c" + integrity sha512-l5XkZK7r7wa9LucGw9LwZyyCUscb4x37JWTPz7swwFE/0FMQAGpiWUZn8u9DzkSBWEcK25jmvubfpw2dnAMdbw== + dependencies: + "@babel/traverse" "^7.28.6" + "@babel/types" "^7.28.6" + "@babel/helper-module-transforms@^7.26.0": version "7.26.0" resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.26.0.tgz#8ce54ec9d592695e58d84cd884b7b5c6a2fdeeae" @@ -84,26 +154,55 @@ "@babel/helper-validator-identifier" "^7.25.9" "@babel/traverse" "^7.25.9" +"@babel/helper-module-transforms@^7.28.6": + version "7.28.6" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.28.6.tgz#9312d9d9e56edc35aeb6e95c25d4106b50b9eb1e" + integrity sha512-67oXFAYr2cDLDVGLXTEABjdBJZ6drElUSI7WKp70NrpyISso3plG9SAGEF6y7zbha/wOzUByWWTJvEDVNIUGcA== + dependencies: + "@babel/helper-module-imports" "^7.28.6" + "@babel/helper-validator-identifier" "^7.28.5" + "@babel/traverse" "^7.28.6" + "@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.25.9", "@babel/helper-plugin-utils@^7.8.0": version "7.25.9" resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.25.9.tgz#9cbdd63a9443a2c92a725cca7ebca12cc8dd9f46" integrity sha512-kSMlyUVdWe25rEsRGviIgOWnoT/nfABVWlqt9N19/dIPWViAOW2s9wznP5tURbs/IDuNk4gPy3YdYRgH3uxhBw== +"@babel/helper-plugin-utils@^7.28.6": + version "7.28.6" + resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.28.6.tgz#6f13ea251b68c8532e985fd532f28741a8af9ac8" + integrity sha512-S9gzZ/bz83GRysI7gAD4wPT/AI3uCnY+9xn+Mx/KPs2JwHJIz1W8PZkg2cqyt3RNOBM8ejcXhV6y8Og7ly/Dug== + "@babel/helper-string-parser@^7.25.9": version "7.25.9" resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.25.9.tgz#1aabb72ee72ed35789b4bbcad3ca2862ce614e8c" integrity sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA== +"@babel/helper-string-parser@^7.27.1": + version "7.27.1" + resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz#54da796097ab19ce67ed9f88b47bb2ec49367687" + integrity sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA== + "@babel/helper-validator-identifier@^7.25.9": version "7.25.9" resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz#24b64e2c3ec7cd3b3c547729b8d16871f22cbdc7" integrity sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ== +"@babel/helper-validator-identifier@^7.28.5": + version "7.28.5" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.28.5.tgz#010b6938fab7cb7df74aa2bbc06aa503b8fe5fb4" + integrity sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q== + "@babel/helper-validator-option@^7.25.9": version "7.25.9" resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.25.9.tgz#86e45bd8a49ab7e03f276577f96179653d41da72" integrity sha512-e/zv1co8pp55dNdEcCynfj9X7nyUKUXoUEwfXqaZt0omVOmDe9oOTdKStH4GmAw6zxMFs50ZayuMfHDKlO7Tfw== +"@babel/helper-validator-option@^7.27.1": + version "7.27.1" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.27.1.tgz#fa52f5b1e7db1ab049445b421c4471303897702f" + integrity sha512-YvjJow9FxbhFFKDSuFnVCe2WxXk1zWc22fFePVNEaWJEu8IrZVlda6N0uHwzZrUM1il7NC9Mlp4MaJYbYd9JSg== + "@babel/helpers@^7.26.0": version "7.26.0" resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.26.0.tgz#30e621f1eba5aa45fe6f4868d2e9154d884119a4" @@ -112,13 +211,28 @@ "@babel/template" "^7.25.9" "@babel/types" "^7.26.0" -"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.23.9", "@babel/parser@^7.25.9", "@babel/parser@^7.26.0", "@babel/parser@^7.26.3": +"@babel/helpers@^7.28.6": + version "7.29.2" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.29.2.tgz#9cfbccb02b8e229892c0b07038052cc1a8709c49" + integrity sha512-HoGuUs4sCZNezVEKdVcwqmZN8GoHirLUcLaYVNBK2J0DadGtdcqgr3BCbvH8+XUo4NGjNl3VOtSjEKNzqfFgKw== + dependencies: + "@babel/template" "^7.28.6" + "@babel/types" "^7.29.0" + +"@babel/parser@^7.1.0", "@babel/parser@^7.20.7", "@babel/parser@^7.23.9", "@babel/parser@^7.25.9", "@babel/parser@^7.26.0", "@babel/parser@^7.26.3": version "7.26.3" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.26.3.tgz#8c51c5db6ddf08134af1ddbacf16aaab48bac234" integrity sha512-WJ/CvmY8Mea8iDXo6a7RK2wbmJITT5fN3BEkRuFlxVyNx8jOKIIhmC4fSkTcPcf8JyavbBwIe6OpiCOBXt/IcA== dependencies: "@babel/types" "^7.26.3" +"@babel/parser@^7.28.6", "@babel/parser@^7.29.0": + version "7.29.3" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.29.3.tgz#116f70a77958307fceac27747573032f8a62f88e" + integrity sha512-b3ctpQwp+PROvU/cttc4OYl4MzfJUWy6FZg+PMXfzmt/+39iHVF0sDfqay8TQM3JA2EUOyKcFZt75jWriQijsA== + dependencies: + "@babel/types" "^7.29.0" + "@babel/plugin-syntax-async-generators@^7.8.4": version "7.8.4" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz#a983fb1aeb2ec3f6ed042a210f640e90e786fe0d" @@ -168,12 +282,12 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.0" -"@babel/plugin-syntax-jsx@^7.7.2": - version "7.25.9" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.25.9.tgz#a34313a178ea56f1951599b929c1ceacee719290" - integrity sha512-ld6oezHQMZsZfp6pWtbjaNDF2tiiCYYDqQszHt5VV437lewP9aSi2Of99CK0D0XB21k7FLgnLcmQKyKzynfeAA== +"@babel/plugin-syntax-jsx@^7.27.1": + version "7.28.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.28.6.tgz#f8ca28bbd84883b5fea0e447c635b81ba73997ee" + integrity sha512-wgEmr06G6sIpqr8YDwA2dSRTE3bJ+V0IfpzfSY3Lfgd7YWOaAdlykvJi13ZKBt8cZHfgH1IXN+CL656W3uUa4w== dependencies: - "@babel/helper-plugin-utils" "^7.25.9" + "@babel/helper-plugin-utils" "^7.28.6" "@babel/plugin-syntax-logical-assignment-operators@^7.10.4": version "7.10.4" @@ -231,14 +345,14 @@ dependencies: "@babel/helper-plugin-utils" "^7.14.5" -"@babel/plugin-syntax-typescript@^7.7.2": - version "7.25.9" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.25.9.tgz#67dda2b74da43727cf21d46cf9afef23f4365399" - integrity sha512-hjMgRy5hb8uJJjUcdWunWVcoi9bGpJp8p5Ol1229PoN6aytsLwNMgmdftO23wnCLMfVmTwZDWMPNq/D1SY60JQ== +"@babel/plugin-syntax-typescript@^7.27.1": + version "7.28.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.28.6.tgz#c7b2ddf1d0a811145b1de800d1abd146af92e3a2" + integrity sha512-+nDNmQye7nlnuuHDboPbGm00Vqg3oO8niRRL27/4LYHUsHYh0zJ1xWOz0uRwNFmM1Avzk8wZbc6rdiYhomzv/A== dependencies: - "@babel/helper-plugin-utils" "^7.25.9" + "@babel/helper-plugin-utils" "^7.28.6" -"@babel/template@^7.25.9", "@babel/template@^7.3.3": +"@babel/template@^7.25.9": version "7.25.9" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.25.9.tgz#ecb62d81a8a6f5dc5fe8abfc3901fc52ddf15016" integrity sha512-9DGttpmPvIxBb/2uwpVo3dqJ+O6RooAFOS+lB+xDqoE2PVCE8nfoHMdZLpfCQRLwvohzXISPZcgxt80xLfsuwg== @@ -247,6 +361,15 @@ "@babel/parser" "^7.25.9" "@babel/types" "^7.25.9" +"@babel/template@^7.28.6": + version "7.28.6" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.28.6.tgz#0e7e56ecedb78aeef66ce7972b082fce76a23e57" + integrity sha512-YA6Ma2KsCdGb+WC6UpBVFJGXL58MDA6oyONbjyF/+5sBgxY/dwkhLogbMT2GXXyU84/IhRw/2D1Os1B/giz+BQ== + dependencies: + "@babel/code-frame" "^7.28.6" + "@babel/parser" "^7.28.6" + "@babel/types" "^7.28.6" + "@babel/traverse@^7.25.9": version "7.26.3" resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.26.3.tgz#1ebfc75bd748d8f96b3cc63af5e82ebd4c37ba35" @@ -260,7 +383,20 @@ debug "^4.3.1" globals "^11.1.0" -"@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.25.9", "@babel/types@^7.26.0", "@babel/types@^7.26.3", "@babel/types@^7.3.3": +"@babel/traverse@^7.28.6", "@babel/traverse@^7.29.0": + version "7.29.0" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.29.0.tgz#f323d05001440253eead3c9c858adbe00b90310a" + integrity sha512-4HPiQr0X7+waHfyXPZpWPfWL/J7dcN1mx9gL6WdQVMbPnF3+ZhSMs8tCxN7oHddJE9fhNE7+lxdnlyemKfJRuA== + dependencies: + "@babel/code-frame" "^7.29.0" + "@babel/generator" "^7.29.0" + "@babel/helper-globals" "^7.28.0" + "@babel/parser" "^7.29.0" + "@babel/template" "^7.28.6" + "@babel/types" "^7.29.0" + debug "^4.3.1" + +"@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.25.9", "@babel/types@^7.26.0", "@babel/types@^7.26.3": version "7.26.3" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.26.3.tgz#37e79830f04c2b5687acc77db97fbc75fb81f3c0" integrity sha512-vN5p+1kl59GVKMvTHt55NzzmYVxprfJD+ql7U9NFIfKCBkYE55LYtS+WtPlaYOyzydrKI8Nezd+aZextrd+FMA== @@ -268,6 +404,14 @@ "@babel/helper-string-parser" "^7.25.9" "@babel/helper-validator-identifier" "^7.25.9" +"@babel/types@^7.27.3", "@babel/types@^7.28.6", "@babel/types@^7.29.0": + version "7.29.0" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.29.0.tgz#9f5b1e838c446e72cf3cd4b918152b8c605e37c7" + integrity sha512-LwdZHpScM4Qz8Xw2iKSzS+cfglZzJGvofQICy7W7v4caru4EaAmyUuO6BGrbyQ2mYV11W0U8j5mBhd14dd3B0A== + dependencies: + "@babel/helper-string-parser" "^7.27.1" + "@babel/helper-validator-identifier" "^7.28.5" + "@bcoe/v8-coverage@^0.2.3": version "0.2.3" resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" @@ -280,6 +424,28 @@ dependencies: "@jridgewell/trace-mapping" "0.3.9" +"@emnapi/core@^1.4.3": + version "1.10.0" + resolved "https://registry.yarnpkg.com/@emnapi/core/-/core-1.10.0.tgz#380ccc8f2412ea22d1d972df7f8ee23a3b9c7467" + integrity sha512-yq6OkJ4p82CAfPl0u9mQebQHKPJkY7WrIuk205cTYnYe+k2Z8YBh11FrbRG/H6ihirqcacOgl2BIO8oyMQLeXw== + dependencies: + "@emnapi/wasi-threads" "1.2.1" + tslib "^2.4.0" + +"@emnapi/runtime@^1.4.3": + version "1.10.0" + resolved "https://registry.yarnpkg.com/@emnapi/runtime/-/runtime-1.10.0.tgz#4b260c0d3534204e98c6110b8db1a987d26ec87c" + integrity sha512-ewvYlk86xUoGI0zQRNq/mC+16R1QeDlKQy21Ki3oSYXNgLb45GV1P6A0M+/s6nyCuNDqe5VpaY84BzXGwVbwFA== + dependencies: + tslib "^2.4.0" + +"@emnapi/wasi-threads@1.2.1": + version "1.2.1" + resolved "https://registry.yarnpkg.com/@emnapi/wasi-threads/-/wasi-threads-1.2.1.tgz#28fed21a1ba1ce797c44a070abc94d42f3ae8548" + integrity sha512-uTII7OYF+/Mes/MrcIOYp5yOtSMLBWSIoLPpcgwipoiKbli6k322tcoFsxoIIxPDqW01SQGAgko4EzZi2BNv2w== + dependencies: + tslib "^2.4.0" + "@hutson/parse-repository-url@^3.0.0": version "3.0.2" resolved "https://registry.yarnpkg.com/@hutson/parse-repository-url/-/parse-repository-url-3.0.2.tgz#98c23c950a3d9b6c8f0daed06da6c3af06981340" @@ -313,197 +479,231 @@ resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.3.tgz#e45e384e4b8ec16bce2fd903af78450f6bf7ec98" integrity sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA== -"@jest/console@^29.7.0": - version "29.7.0" - resolved "https://registry.yarnpkg.com/@jest/console/-/console-29.7.0.tgz#cd4822dbdb84529265c5a2bdb529a3c9cc950ffc" - integrity sha512-5Ni4CU7XHQi32IJ398EEP4RrB8eV09sXP2ROqD4bksHrnTree52PsxvX8tpL8LvTZ3pFzXyPbNQReSN41CAhOg== +"@jest/console@30.3.0": + version "30.3.0" + resolved "https://registry.yarnpkg.com/@jest/console/-/console-30.3.0.tgz#42ccc3f995d400a8fe35b8850cfe10a8d4804cdf" + integrity sha512-PAwCvFJ4696XP2qZj+LAn1BWjZaJ6RjG6c7/lkMaUJnkyMS34ucuIsfqYvfskVNvUI27R/u4P1HMYFnlVXG/Ww== dependencies: - "@jest/types" "^29.6.3" + "@jest/types" "30.3.0" "@types/node" "*" - chalk "^4.0.0" - jest-message-util "^29.7.0" - jest-util "^29.7.0" + chalk "^4.1.2" + jest-message-util "30.3.0" + jest-util "30.3.0" slash "^3.0.0" -"@jest/core@^29.7.0": - version "29.7.0" - resolved "https://registry.yarnpkg.com/@jest/core/-/core-29.7.0.tgz#b6cccc239f30ff36609658c5a5e2291757ce448f" - integrity sha512-n7aeXWKMnGtDA48y8TLWJPJmLmmZ642Ceo78cYWEpiD7FzDgmNDV/GCVRorPABdXLJZ/9wzzgZAlHjXjxDHGsg== - dependencies: - "@jest/console" "^29.7.0" - "@jest/reporters" "^29.7.0" - "@jest/test-result" "^29.7.0" - "@jest/transform" "^29.7.0" - "@jest/types" "^29.6.3" +"@jest/core@30.3.0": + version "30.3.0" + resolved "https://registry.yarnpkg.com/@jest/core/-/core-30.3.0.tgz#d06bb8456f35350f6494fd2405bcec4abb97b994" + integrity sha512-U5mVPsBxLSO6xYbf+tgkymLx+iAhvZX43/xI1+ej2ZOPnPdkdO1CzDmFKh2mZBn2s4XZixszHeQnzp1gm/DIxw== + dependencies: + "@jest/console" "30.3.0" + "@jest/pattern" "30.0.1" + "@jest/reporters" "30.3.0" + "@jest/test-result" "30.3.0" + "@jest/transform" "30.3.0" + "@jest/types" "30.3.0" "@types/node" "*" - ansi-escapes "^4.2.1" - chalk "^4.0.0" - ci-info "^3.2.0" - exit "^0.1.2" - graceful-fs "^4.2.9" - jest-changed-files "^29.7.0" - jest-config "^29.7.0" - jest-haste-map "^29.7.0" - jest-message-util "^29.7.0" - jest-regex-util "^29.6.3" - jest-resolve "^29.7.0" - jest-resolve-dependencies "^29.7.0" - jest-runner "^29.7.0" - jest-runtime "^29.7.0" - jest-snapshot "^29.7.0" - jest-util "^29.7.0" - jest-validate "^29.7.0" - jest-watcher "^29.7.0" - micromatch "^4.0.4" - pretty-format "^29.7.0" + ansi-escapes "^4.3.2" + chalk "^4.1.2" + ci-info "^4.2.0" + exit-x "^0.2.2" + graceful-fs "^4.2.11" + jest-changed-files "30.3.0" + jest-config "30.3.0" + jest-haste-map "30.3.0" + jest-message-util "30.3.0" + jest-regex-util "30.0.1" + jest-resolve "30.3.0" + jest-resolve-dependencies "30.3.0" + jest-runner "30.3.0" + jest-runtime "30.3.0" + jest-snapshot "30.3.0" + jest-util "30.3.0" + jest-validate "30.3.0" + jest-watcher "30.3.0" + pretty-format "30.3.0" slash "^3.0.0" - strip-ansi "^6.0.0" -"@jest/environment@^29.7.0": - version "29.7.0" - resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-29.7.0.tgz#24d61f54ff1f786f3cd4073b4b94416383baf2a7" - integrity sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw== +"@jest/diff-sequences@30.3.0": + version "30.3.0" + resolved "https://registry.yarnpkg.com/@jest/diff-sequences/-/diff-sequences-30.3.0.tgz#25b0818d3d83f00b9c7b04e069b8810f9014b143" + integrity sha512-cG51MVnLq1ecVUaQ3fr6YuuAOitHK1S4WUJHnsPFE/quQr33ADUx1FfrTCpMCRxvy0Yr9BThKpDjSlcTi91tMA== + +"@jest/environment@30.3.0": + version "30.3.0" + resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-30.3.0.tgz#b0657c2944b6ef3352f7b25903cc3a23e6ab70f6" + integrity sha512-SlLSF4Be735yQXyh2+mctBOzNDx5s5uLv88/j8Qn1wH679PDcwy67+YdADn8NJnGjzlXtN62asGH/T4vWOkfaw== dependencies: - "@jest/fake-timers" "^29.7.0" - "@jest/types" "^29.6.3" + "@jest/fake-timers" "30.3.0" + "@jest/types" "30.3.0" "@types/node" "*" - jest-mock "^29.7.0" + jest-mock "30.3.0" -"@jest/expect-utils@^29.7.0": - version "29.7.0" - resolved "https://registry.yarnpkg.com/@jest/expect-utils/-/expect-utils-29.7.0.tgz#023efe5d26a8a70f21677d0a1afc0f0a44e3a1c6" - integrity sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA== +"@jest/expect-utils@30.3.0": + version "30.3.0" + resolved "https://registry.yarnpkg.com/@jest/expect-utils/-/expect-utils-30.3.0.tgz#c45b2da9802ffed33bf43b3e019ddb95e5ad95e8" + integrity sha512-j0+W5iQQ8hBh7tHZkTQv3q2Fh/M7Je72cIsYqC4OaktgtO7v1So9UTjp6uPBHIaB6beoF/RRsCgMJKvti0wADA== dependencies: - jest-get-type "^29.6.3" + "@jest/get-type" "30.1.0" -"@jest/expect@^29.7.0": - version "29.7.0" - resolved "https://registry.yarnpkg.com/@jest/expect/-/expect-29.7.0.tgz#76a3edb0cb753b70dfbfe23283510d3d45432bf2" - integrity sha512-8uMeAMycttpva3P1lBHB8VciS9V0XAr3GymPpipdyQXbBcuhkLQOSe8E/p92RyAdToS6ZD1tFkX+CkhoECE0dQ== +"@jest/expect@30.3.0": + version "30.3.0" + resolved "https://registry.yarnpkg.com/@jest/expect/-/expect-30.3.0.tgz#08ee7f5b610167b0068743246c0b568f4c40c773" + integrity sha512-76Nlh4xJxk2D/9URCn3wFi98d2hb19uWE1idLsTt2ywhvdOldbw3S570hBgn25P4ICUZ/cBjybrBex2g17IDbg== dependencies: - expect "^29.7.0" - jest-snapshot "^29.7.0" + expect "30.3.0" + jest-snapshot "30.3.0" -"@jest/fake-timers@^29.7.0": - version "29.7.0" - resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-29.7.0.tgz#fd91bf1fffb16d7d0d24a426ab1a47a49881a565" - integrity sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ== +"@jest/fake-timers@30.3.0": + version "30.3.0" + resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-30.3.0.tgz#2b2868130c1d28233a79566874c42cae1c5a70bc" + integrity sha512-WUQDs8SOP9URStX1DzhD425CqbN/HxUYCTwVrT8sTVBfMvFqYt/s61EK5T05qnHu0po6RitXIvP9otZxYDzTGQ== dependencies: - "@jest/types" "^29.6.3" - "@sinonjs/fake-timers" "^10.0.2" + "@jest/types" "30.3.0" + "@sinonjs/fake-timers" "^15.0.0" "@types/node" "*" - jest-message-util "^29.7.0" - jest-mock "^29.7.0" - jest-util "^29.7.0" - -"@jest/globals@^29.7.0": - version "29.7.0" - resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-29.7.0.tgz#8d9290f9ec47ff772607fa864ca1d5a2efae1d4d" - integrity sha512-mpiz3dutLbkW2MNFubUGUEVLkTGiqW6yLVTA+JbP6fI6J5iL9Y0Nlg8k95pcF8ctKwCS7WVxteBs29hhfAotzQ== + jest-message-util "30.3.0" + jest-mock "30.3.0" + jest-util "30.3.0" + +"@jest/get-type@30.1.0": + version "30.1.0" + resolved "https://registry.yarnpkg.com/@jest/get-type/-/get-type-30.1.0.tgz#4fcb4dc2ebcf0811be1c04fd1cb79c2dba431cbc" + integrity sha512-eMbZE2hUnx1WV0pmURZY9XoXPkUYjpc55mb0CrhtdWLtzMQPFvu/rZkTLZFTsdaVQa+Tr4eWAteqcUzoawq/uA== + +"@jest/globals@30.3.0": + version "30.3.0" + resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-30.3.0.tgz#40f4c90e5602629ecda1ca773a8fb21575bb64ea" + integrity sha512-+owLCBBdfpgL3HU+BD5etr1SvbXpSitJK0is1kiYjJxAAJggYMRQz5hSdd5pq1sSggfxPbw2ld71pt4x5wwViA== + dependencies: + "@jest/environment" "30.3.0" + "@jest/expect" "30.3.0" + "@jest/types" "30.3.0" + jest-mock "30.3.0" + +"@jest/pattern@30.0.1": + version "30.0.1" + resolved "https://registry.yarnpkg.com/@jest/pattern/-/pattern-30.0.1.tgz#d5304147f49a052900b4b853dedb111d080e199f" + integrity sha512-gWp7NfQW27LaBQz3TITS8L7ZCQ0TLvtmI//4OwlQRx4rnWxcPNIYjxZpDcN4+UlGxgm3jS5QPz8IPTCkb59wZA== dependencies: - "@jest/environment" "^29.7.0" - "@jest/expect" "^29.7.0" - "@jest/types" "^29.6.3" - jest-mock "^29.7.0" + "@types/node" "*" + jest-regex-util "30.0.1" -"@jest/reporters@^29.7.0": - version "29.7.0" - resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-29.7.0.tgz#04b262ecb3b8faa83b0b3d321623972393e8f4c7" - integrity sha512-DApq0KJbJOEzAFYjHADNNxAE3KbhxQB1y5Kplb5Waqw6zVbuWatSnMjE5gs8FUgEPmNsnZA3NCWl9NG0ia04Pg== +"@jest/reporters@30.3.0": + version "30.3.0" + resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-30.3.0.tgz#0c1065f6c892665e5a051df22b19df4466ed816b" + integrity sha512-a09z89S+PkQnL055bVj8+pe2Caed2PBOaczHcXCykW5ngxX9EWx/1uAwncxc/HiU0oZqfwseMjyhxgRjS49qPw== dependencies: "@bcoe/v8-coverage" "^0.2.3" - "@jest/console" "^29.7.0" - "@jest/test-result" "^29.7.0" - "@jest/transform" "^29.7.0" - "@jest/types" "^29.6.3" - "@jridgewell/trace-mapping" "^0.3.18" + "@jest/console" "30.3.0" + "@jest/test-result" "30.3.0" + "@jest/transform" "30.3.0" + "@jest/types" "30.3.0" + "@jridgewell/trace-mapping" "^0.3.25" "@types/node" "*" - chalk "^4.0.0" - collect-v8-coverage "^1.0.0" - exit "^0.1.2" - glob "^7.1.3" - graceful-fs "^4.2.9" + chalk "^4.1.2" + collect-v8-coverage "^1.0.2" + exit-x "^0.2.2" + glob "^10.5.0" + graceful-fs "^4.2.11" istanbul-lib-coverage "^3.0.0" istanbul-lib-instrument "^6.0.0" istanbul-lib-report "^3.0.0" - istanbul-lib-source-maps "^4.0.0" + istanbul-lib-source-maps "^5.0.0" istanbul-reports "^3.1.3" - jest-message-util "^29.7.0" - jest-util "^29.7.0" - jest-worker "^29.7.0" + jest-message-util "30.3.0" + jest-util "30.3.0" + jest-worker "30.3.0" slash "^3.0.0" - string-length "^4.0.1" - strip-ansi "^6.0.0" + string-length "^4.0.2" v8-to-istanbul "^9.0.1" -"@jest/schemas@^29.6.3": - version "29.6.3" - resolved "https://registry.yarnpkg.com/@jest/schemas/-/schemas-29.6.3.tgz#430b5ce8a4e0044a7e3819663305a7b3091c8e03" - integrity sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA== +"@jest/schemas@30.0.5": + version "30.0.5" + resolved "https://registry.yarnpkg.com/@jest/schemas/-/schemas-30.0.5.tgz#7bdf69fc5a368a5abdb49fd91036c55225846473" + integrity sha512-DmdYgtezMkh3cpU8/1uyXakv3tJRcmcXxBOcO0tbaozPwpmh4YMsnWrQm9ZmZMfa5ocbxzbFk6O4bDPEc/iAnA== dependencies: - "@sinclair/typebox" "^0.27.8" + "@sinclair/typebox" "^0.34.0" -"@jest/source-map@^29.6.3": - version "29.6.3" - resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-29.6.3.tgz#d90ba772095cf37a34a5eb9413f1b562a08554c4" - integrity sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw== +"@jest/snapshot-utils@30.3.0": + version "30.3.0" + resolved "https://registry.yarnpkg.com/@jest/snapshot-utils/-/snapshot-utils-30.3.0.tgz#ca003c91a3e1e4e4956dee716a2aaf04b6707f31" + integrity sha512-ORbRN9sf5PP82v3FXNSwmO1OTDR2vzR2YTaR+E3VkSBZ8zadQE6IqYdYEeFH1NIkeB2HIGdF02dapb6K0Mj05g== dependencies: - "@jridgewell/trace-mapping" "^0.3.18" - callsites "^3.0.0" - graceful-fs "^4.2.9" - -"@jest/test-result@^29.7.0": - version "29.7.0" - resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-29.7.0.tgz#8db9a80aa1a097bb2262572686734baed9b1657c" - integrity sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA== - dependencies: - "@jest/console" "^29.7.0" - "@jest/types" "^29.6.3" - "@types/istanbul-lib-coverage" "^2.0.0" - collect-v8-coverage "^1.0.0" + "@jest/types" "30.3.0" + chalk "^4.1.2" + graceful-fs "^4.2.11" + natural-compare "^1.4.0" -"@jest/test-sequencer@^29.7.0": - version "29.7.0" - resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-29.7.0.tgz#6cef977ce1d39834a3aea887a1726628a6f072ce" - integrity sha512-GQwJ5WZVrKnOJuiYiAF52UNUJXgTZx1NHjFSEB0qEMmSZKAkdMoIzw/Cj6x6NF4AvV23AUqDpFzQkN/eYCYTxw== +"@jest/source-map@30.0.1": + version "30.0.1" + resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-30.0.1.tgz#305ebec50468f13e658b3d5c26f85107a5620aaa" + integrity sha512-MIRWMUUR3sdbP36oyNyhbThLHyJ2eEDClPCiHVbrYAe5g3CHRArIVpBw7cdSB5fr+ofSfIb2Tnsw8iEHL0PYQg== dependencies: - "@jest/test-result" "^29.7.0" - graceful-fs "^4.2.9" - jest-haste-map "^29.7.0" + "@jridgewell/trace-mapping" "^0.3.25" + callsites "^3.1.0" + graceful-fs "^4.2.11" + +"@jest/test-result@30.3.0": + version "30.3.0" + resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-30.3.0.tgz#cd8882d683d467fcffb98c09501a65687a76aae9" + integrity sha512-e/52nJGuD74AKTSe0P4y5wFRlaXP0qmrS17rqOMHeSwm278VyNyXE3gFO/4DTGF9w+65ra3lo3VKj0LBrzmgdQ== + dependencies: + "@jest/console" "30.3.0" + "@jest/types" "30.3.0" + "@types/istanbul-lib-coverage" "^2.0.6" + collect-v8-coverage "^1.0.2" + +"@jest/test-sequencer@30.3.0": + version "30.3.0" + resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-30.3.0.tgz#27002b2093f4e0d9e0e1ebb0bc274a242fdadc14" + integrity sha512-dgbWy9b8QDlQeRZcv7LNF+/jFiiYHTKho1xirauZ7kVwY7avjFF6uTT0RqlgudB5OuIPagFdVtfFMosjVbk1eA== + dependencies: + "@jest/test-result" "30.3.0" + graceful-fs "^4.2.11" + jest-haste-map "30.3.0" slash "^3.0.0" -"@jest/transform@^29.7.0": - version "29.7.0" - resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-29.7.0.tgz#df2dd9c346c7d7768b8a06639994640c642e284c" - integrity sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw== +"@jest/transform@30.3.0": + version "30.3.0" + resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-30.3.0.tgz#9e6f78ffa205449bf956e269fd707c160f47ce2f" + integrity sha512-TLKY33fSLVd/lKB2YI1pH69ijyUblO/BQvCj566YvnwuzoTNr648iE0j22vRvVNk2HsPwByPxATg3MleS3gf5A== dependencies: - "@babel/core" "^7.11.6" - "@jest/types" "^29.6.3" - "@jridgewell/trace-mapping" "^0.3.18" - babel-plugin-istanbul "^6.1.1" - chalk "^4.0.0" + "@babel/core" "^7.27.4" + "@jest/types" "30.3.0" + "@jridgewell/trace-mapping" "^0.3.25" + babel-plugin-istanbul "^7.0.1" + chalk "^4.1.2" convert-source-map "^2.0.0" fast-json-stable-stringify "^2.1.0" - graceful-fs "^4.2.9" - jest-haste-map "^29.7.0" - jest-regex-util "^29.6.3" - jest-util "^29.7.0" - micromatch "^4.0.4" - pirates "^4.0.4" + graceful-fs "^4.2.11" + jest-haste-map "30.3.0" + jest-regex-util "30.0.1" + jest-util "30.3.0" + pirates "^4.0.7" slash "^3.0.0" - write-file-atomic "^4.0.2" + write-file-atomic "^5.0.1" -"@jest/types@^29.6.3": - version "29.6.3" - resolved "https://registry.yarnpkg.com/@jest/types/-/types-29.6.3.tgz#1131f8cf634e7e84c5e77bab12f052af585fba59" - integrity sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw== +"@jest/types@30.3.0": + version "30.3.0" + resolved "https://registry.yarnpkg.com/@jest/types/-/types-30.3.0.tgz#cada800d323cb74945c24ac74615fdb312a6c85f" + integrity sha512-JHm87k7bA33hpBngtU8h6UBub/fqqA9uXfw+21j5Hmk7ooPHlboRNxHq0JcMtC+n8VJGP1mcfnD3Mk+XKe1oSw== dependencies: - "@jest/schemas" "^29.6.3" - "@types/istanbul-lib-coverage" "^2.0.0" - "@types/istanbul-reports" "^3.0.0" + "@jest/pattern" "30.0.1" + "@jest/schemas" "30.0.5" + "@types/istanbul-lib-coverage" "^2.0.6" + "@types/istanbul-reports" "^3.0.4" "@types/node" "*" - "@types/yargs" "^17.0.8" - chalk "^4.0.0" + "@types/yargs" "^17.0.33" + chalk "^4.1.2" + +"@jridgewell/gen-mapping@^0.3.12": + version "0.3.13" + resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz#6342a19f44347518c93e43b1ac69deb3c4656a1f" + integrity sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA== + dependencies: + "@jridgewell/sourcemap-codec" "^1.5.0" + "@jridgewell/trace-mapping" "^0.3.24" "@jridgewell/gen-mapping@^0.3.5": version "0.3.5" @@ -514,6 +714,14 @@ "@jridgewell/sourcemap-codec" "^1.4.10" "@jridgewell/trace-mapping" "^0.3.24" +"@jridgewell/remapping@^2.3.5": + version "2.3.5" + resolved "https://registry.yarnpkg.com/@jridgewell/remapping/-/remapping-2.3.5.tgz#375c476d1972947851ba1e15ae8f123047445aa1" + integrity sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ== + dependencies: + "@jridgewell/gen-mapping" "^0.3.5" + "@jridgewell/trace-mapping" "^0.3.24" + "@jridgewell/resolve-uri@^3.0.3", "@jridgewell/resolve-uri@^3.1.0": version "3.1.2" resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz#7a0ee601f60f99a20c7c7c5ff0c80388c1189bd6" @@ -529,6 +737,11 @@ resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz#3188bcb273a414b0d215fd22a58540b989b9409a" integrity sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ== +"@jridgewell/sourcemap-codec@^1.5.0": + version "1.5.5" + resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz#6912b00d2c631c0d15ce1a7ab57cd657f2a8f8ba" + integrity sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og== + "@jridgewell/trace-mapping@0.3.9": version "0.3.9" resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz#6534fd5933a53ba7cbf3a17615e273a0d1273ff9" @@ -537,7 +750,7 @@ "@jridgewell/resolve-uri" "^3.0.3" "@jridgewell/sourcemap-codec" "^1.4.10" -"@jridgewell/trace-mapping@^0.3.12", "@jridgewell/trace-mapping@^0.3.18", "@jridgewell/trace-mapping@^0.3.24", "@jridgewell/trace-mapping@^0.3.25": +"@jridgewell/trace-mapping@^0.3.12", "@jridgewell/trace-mapping@^0.3.24", "@jridgewell/trace-mapping@^0.3.25": version "0.3.25" resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz#15f190e98895f3fc23276ee14bc76b675c2e50f0" integrity sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ== @@ -545,34 +758,77 @@ "@jridgewell/resolve-uri" "^3.1.0" "@jridgewell/sourcemap-codec" "^1.4.14" +"@jridgewell/trace-mapping@^0.3.23", "@jridgewell/trace-mapping@^0.3.28": + version "0.3.31" + resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz#db15d6781c931f3a251a3dac39501c98a6082fd0" + integrity sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw== + dependencies: + "@jridgewell/resolve-uri" "^3.1.0" + "@jridgewell/sourcemap-codec" "^1.4.14" + +"@napi-rs/wasm-runtime@^0.2.11": + version "0.2.12" + resolved "https://registry.yarnpkg.com/@napi-rs/wasm-runtime/-/wasm-runtime-0.2.12.tgz#3e78a8b96e6c33a6c517e1894efbd5385a7cb6f2" + integrity sha512-ZVWUcfwY4E/yPitQJl481FjFo3K22D6qF0DuFH6Y/nbnE11GY5uguDxZMGXPQ8WQ0128MXQD7TnfHyK4oWoIJQ== + dependencies: + "@emnapi/core" "^1.4.3" + "@emnapi/runtime" "^1.4.3" + "@tybys/wasm-util" "^0.10.0" + +"@nodelib/fs.scandir@2.1.5": + version "2.1.5" + resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" + integrity sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g== + dependencies: + "@nodelib/fs.stat" "2.0.5" + run-parallel "^1.1.9" + +"@nodelib/fs.stat@2.0.5", "@nodelib/fs.stat@^2.0.2": + version "2.0.5" + resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b" + integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== + +"@nodelib/fs.walk@^1.2.3": + version "1.2.8" + resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz#e95737e8bb6746ddedf69c556953494f196fe69a" + integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== + dependencies: + "@nodelib/fs.scandir" "2.1.5" + fastq "^1.6.0" + "@pkgjs/parseargs@^0.11.0": version "0.11.0" resolved "https://registry.yarnpkg.com/@pkgjs/parseargs/-/parseargs-0.11.0.tgz#a77ea742fab25775145434eb1d2328cf5013ac33" integrity sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg== -"@sinclair/typebox@^0.27.8": - version "0.27.8" - resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.27.8.tgz#6667fac16c436b5434a387a34dedb013198f6e6e" - integrity sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA== +"@pkgr/core@^0.2.9": + version "0.2.9" + resolved "https://registry.yarnpkg.com/@pkgr/core/-/core-0.2.9.tgz#d229a7b7f9dac167a156992ef23c7f023653f53b" + integrity sha512-QNqXyfVS2wm9hweSYD2O7F0G06uurj9kZ96TRQE5Y9hU7+tgdZwIkbAKc5Ocy1HxEY2kuDQa6cQ1WRs/O5LFKA== -"@sinonjs/commons@^3.0.0": +"@sinclair/typebox@^0.34.0": + version "0.34.49" + resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.34.49.tgz#4f1369234f2ecf693866476c3b2e1b54d2a9d68e" + integrity sha512-brySQQs7Jtn0joV8Xh9ZV/hZb9Ozb0pmazDIASBkYKCjXrXU3mpcFahmK/z4YDhGkQvP9mWJbVyahdtU5wQA+A== + +"@sinonjs/commons@^3.0.1": version "3.0.1" resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-3.0.1.tgz#1029357e44ca901a615585f6d27738dbc89084cd" integrity sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ== dependencies: type-detect "4.0.8" -"@sinonjs/fake-timers@^10.0.2": - version "10.3.0" - resolved "https://registry.yarnpkg.com/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz#55fdff1ecab9f354019129daf4df0dd4d923ea66" - integrity sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA== +"@sinonjs/fake-timers@^15.0.0": + version "15.3.2" + resolved "https://registry.yarnpkg.com/@sinonjs/fake-timers/-/fake-timers-15.3.2.tgz#afecc36681e26aab9e0fe809fd9ad578096a3058" + integrity sha512-mrn35Jl2pCpns+mE3HaZa1yPN5EYCRgiMI+135COjr2hr8Cls9DXqIZ57vZe2cz7y2XVSq92tcs6kGQcT1J8Rw== dependencies: - "@sinonjs/commons" "^3.0.0" + "@sinonjs/commons" "^3.0.1" "@tsconfig/node10@^1.0.7": - version "1.0.11" - resolved "https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.11.tgz#6ee46400685f130e278128c7b38b7e031ff5b2f2" - integrity sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw== + version "1.0.12" + resolved "https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.12.tgz#be57ceac1e4692b41be9de6be8c32a106636dba4" + integrity sha512-UCYBaeFvM11aU2y3YPZ//O5Rhj+xKyzy7mvcIoAjASbigy8mHMryP5cK7dgjlz2hWxh1g5pLw084E0a/wlUSFQ== "@tsconfig/node12@^1.0.7": version "1.0.11" @@ -589,7 +845,14 @@ resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.4.tgz#0b92dcc0cc1c81f6f306a381f28e31b1a56536e9" integrity sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA== -"@types/babel__core@^7.1.14": +"@tybys/wasm-util@^0.10.0": + version "0.10.1" + resolved "https://registry.yarnpkg.com/@tybys/wasm-util/-/wasm-util-0.10.1.tgz#ecddd3205cf1e2d5274649ff0eedd2991ed7f414" + integrity sha512-9tTaPJLSiejZKx+Bmog4uSubteqTvFrVrURwkmHixBo0G4seD0zUxp98E1DzUBJxLQ3NPwXrGKDiVjwx/DpPsg== + dependencies: + tslib "^2.4.0" + +"@types/babel__core@^7.20.5": version "7.20.5" resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.20.5.tgz#3df15f27ba85319caa07ba08d0721889bb39c017" integrity sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA== @@ -615,36 +878,14 @@ "@babel/parser" "^7.1.0" "@babel/types" "^7.0.0" -"@types/babel__traverse@*", "@types/babel__traverse@^7.0.6": +"@types/babel__traverse@*": version "7.20.6" resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.20.6.tgz#8dc9f0ae0f202c08d8d4dab648912c8d6038e3f7" integrity sha512-r1bzfrm0tomOI8g1SzvCaQHo6Lcv6zu0EA+W2kHrt8dyrHQxGzBBL4kdkzIS+jBMV+EYcMAEAqXqYaLJq5rOZg== dependencies: "@babel/types" "^7.20.7" -"@types/esm@^3.2.2": - version "3.2.2" - resolved "https://registry.yarnpkg.com/@types/esm/-/esm-3.2.2.tgz#dd2de62e3e1d8b6ba3e835435d089928a090faa0" - integrity sha512-l3IQQD2sChjNiQVNf28qq+sY9Sjvz7HrcOO3g4ZeSaiQRXQccBaR6cpqXPpzJ3QYCt6UF7+4ugabMRsQTPV+Eg== - dependencies: - "@types/node" "*" - -"@types/glob@~7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@types/glob/-/glob-7.2.0.tgz#bc1b5bf3aa92f25bd5dd39f35c57361bdce5b2eb" - integrity sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA== - dependencies: - "@types/minimatch" "*" - "@types/node" "*" - -"@types/graceful-fs@^4.1.3": - version "4.1.9" - resolved "https://registry.yarnpkg.com/@types/graceful-fs/-/graceful-fs-4.1.9.tgz#2a06bc0f68a20ab37b3e36aa238be6abdf49e8b4" - integrity sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ== - dependencies: - "@types/node" "*" - -"@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0", "@types/istanbul-lib-coverage@^2.0.1": +"@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.1", "@types/istanbul-lib-coverage@^2.0.6": version "2.0.6" resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz#7739c232a1fee9b4d3ce8985f314c0c6d33549d7" integrity sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w== @@ -656,25 +897,20 @@ dependencies: "@types/istanbul-lib-coverage" "*" -"@types/istanbul-reports@^3.0.0": +"@types/istanbul-reports@^3.0.4": version "3.0.4" resolved "https://registry.yarnpkg.com/@types/istanbul-reports/-/istanbul-reports-3.0.4.tgz#0f03e3d2f670fbdac586e34b433783070cc16f54" integrity sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ== dependencies: "@types/istanbul-lib-report" "*" -"@types/jest@^29.5.10": - version "29.5.14" - resolved "https://registry.yarnpkg.com/@types/jest/-/jest-29.5.14.tgz#2b910912fa1d6856cadcd0c1f95af7df1d6049e5" - integrity sha512-ZN+4sdnLUbo8EVvVc2ao0GFW6oVrQRPn4K2lglySj7APvSrgzxHiNNK99us4WDMi57xxA2yggblIAMNhXOotLQ== +"@types/jest@^30.0.0": + version "30.0.0" + resolved "https://registry.yarnpkg.com/@types/jest/-/jest-30.0.0.tgz#5e85ae568006712e4ad66f25433e9bdac8801f1d" + integrity sha512-XTYugzhuwqWjws0CVz8QpM36+T+Dz5mTEBKhNs/esGLnCIlGdRy+Dq78NRjd7ls7r8BC8ZRMOrKlkO1hU0JOwA== dependencies: - expect "^29.0.0" - pretty-format "^29.0.0" - -"@types/minimatch@*": - version "5.1.2" - resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-5.1.2.tgz#07508b45797cb81ec3f273011b054cd0755eddca" - integrity sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA== + expect "^30.0.0" + pretty-format "^30.0.0" "@types/minimist@^1.2.0", "@types/minimist@^1.2.2": version "1.2.5" @@ -695,10 +931,12 @@ dependencies: undici-types "~6.20.0" -"@types/node@^16.11.5": - version "16.18.121" - resolved "https://registry.yarnpkg.com/@types/node/-/node-16.18.121.tgz#88c4e91474b1eb4ae68e39cec8b274e9c792650a" - integrity sha512-Gk/pOy8H0cvX8qNrwzElYIECpcUn87w4EAEFXFvPJ8qsP9QR/YqukUORSy0zmyDyvdo149idPpy4W6iC5aSbQA== +"@types/node@^25.6.0": + version "25.6.0" + resolved "https://registry.yarnpkg.com/@types/node/-/node-25.6.0.tgz#4e09bad9b469871f2d0f68140198cbd714f4edca" + integrity sha512-+qIYRKdNYJwY3vRCZMdJbPLJAtGjQBudzZzdzwQYkEPQd+PJGixUL5QfvCLDaULoLv+RhT3LDkwEfKaAkgSmNQ== + dependencies: + undici-types "~7.19.0" "@types/normalize-package-data@^2.4.0": version "2.4.4" @@ -710,20 +948,20 @@ resolved "https://registry.yarnpkg.com/@types/resolve/-/resolve-1.20.6.tgz#e6e60dad29c2c8c206c026e6dd8d6d1bdda850b8" integrity sha512-A4STmOXPhMUtHH+S6ymgE2GiBSMqf4oTvcQZMcHzokuTLVYzXTB8ttjcgxOVaAp2lGwEdzZ0J+cRbbeevQj1UQ== -"@types/semver@^7.3.13": - version "7.5.8" - resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.5.8.tgz#8268a8c57a3e4abd25c165ecd36237db7948a55e" - integrity sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ== +"@types/semver@^7.7.1": + version "7.7.1" + resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.7.1.tgz#3ce3af1a5524ef327d2da9e4fd8b6d95c8d70528" + integrity sha512-FmgJfu+MOcQ370SD0ev7EI8TlCAfKYU+B4m5T3yXc1CiRN94g/SZPtsCkk506aUDtlMnFZvasDwHHUcZUEaYuA== -"@types/shelljs@^0.8.9": - version "0.8.15" - resolved "https://registry.yarnpkg.com/@types/shelljs/-/shelljs-0.8.15.tgz#22c6ab9dfe05cec57d8e6cb1a95ea173aee9fcac" - integrity sha512-vzmnCHl6hViPu9GNLQJ+DZFd6BQI2DBTUeOvYHqkWQLMfKAAQYMb/xAmZkTogZI/vqXHCWkqDRymDI5p0QTi5Q== +"@types/shelljs@^0.10.0": + version "0.10.0" + resolved "https://registry.yarnpkg.com/@types/shelljs/-/shelljs-0.10.0.tgz#c5a5cb47f9bac25de535ffe8b77a32c0f7ed8e83" + integrity sha512-OEfyhE5Ox+FeoHbhrEDwm0kXxntO6nsyMRCFvNsIBHPZu5rV1w2OjPcLclaC/IZ1TlzZPgbeMfwAZEi5N238yQ== dependencies: - "@types/glob" "~7.2.0" "@types/node" "*" + fast-glob "^3.3.2" -"@types/stack-utils@^2.0.0": +"@types/stack-utils@^2.0.3": version "2.0.3" resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-2.0.3.tgz#6209321eb2c1712a7e7466422b8cb1fc0d9dd5d8" integrity sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw== @@ -733,13 +971,115 @@ resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-21.0.3.tgz#815e30b786d2e8f0dcd85fd5bcf5e1a04d008f15" integrity sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ== -"@types/yargs@^17.0.8": - version "17.0.33" - resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-17.0.33.tgz#8c32303da83eec050a84b3c7ae7b9f922d13e32d" - integrity sha512-WpxBCKWPLr4xSsHgz511rFJAM+wS28w2zEO1QDNY5zM/S8ok70NNfztH0xwhqKyaK0OHCbN98LDAZuy1ctxDkA== +"@types/yargs@^17.0.33": + version "17.0.35" + resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-17.0.35.tgz#07013e46aa4d7d7d50a49e15604c1c5340d4eb24" + integrity sha512-qUHkeCyQFxMXg79wQfTtfndEC+N9ZZg76HJftDJp+qH2tV7Gj4OJi7l+PiWwJ+pWtW8GwSmqsDj/oymhrTWXjg== dependencies: "@types/yargs-parser" "*" +"@ungap/structured-clone@^1.3.0": + version "1.3.0" + resolved "https://registry.yarnpkg.com/@ungap/structured-clone/-/structured-clone-1.3.0.tgz#d06bbb384ebcf6c505fde1c3d0ed4ddffe0aaff8" + integrity sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g== + +"@unrs/resolver-binding-android-arm-eabi@1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@unrs/resolver-binding-android-arm-eabi/-/resolver-binding-android-arm-eabi-1.11.1.tgz#9f5b04503088e6a354295e8ea8fe3cb99e43af81" + integrity sha512-ppLRUgHVaGRWUx0R0Ut06Mjo9gBaBkg3v/8AxusGLhsIotbBLuRk51rAzqLC8gq6NyyAojEXglNjzf6R948DNw== + +"@unrs/resolver-binding-android-arm64@1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@unrs/resolver-binding-android-arm64/-/resolver-binding-android-arm64-1.11.1.tgz#7414885431bd7178b989aedc4d25cccb3865bc9f" + integrity sha512-lCxkVtb4wp1v+EoN+HjIG9cIIzPkX5OtM03pQYkG+U5O/wL53LC4QbIeazgiKqluGeVEeBlZahHalCaBvU1a2g== + +"@unrs/resolver-binding-darwin-arm64@1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@unrs/resolver-binding-darwin-arm64/-/resolver-binding-darwin-arm64-1.11.1.tgz#b4a8556f42171fb9c9f7bac8235045e82aa0cbdf" + integrity sha512-gPVA1UjRu1Y/IsB/dQEsp2V1pm44Of6+LWvbLc9SDk1c2KhhDRDBUkQCYVWe6f26uJb3fOK8saWMgtX8IrMk3g== + +"@unrs/resolver-binding-darwin-x64@1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@unrs/resolver-binding-darwin-x64/-/resolver-binding-darwin-x64-1.11.1.tgz#fd4d81257b13f4d1a083890a6a17c00de571f0dc" + integrity sha512-cFzP7rWKd3lZaCsDze07QX1SC24lO8mPty9vdP+YVa3MGdVgPmFc59317b2ioXtgCMKGiCLxJ4HQs62oz6GfRQ== + +"@unrs/resolver-binding-freebsd-x64@1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@unrs/resolver-binding-freebsd-x64/-/resolver-binding-freebsd-x64-1.11.1.tgz#d2513084d0f37c407757e22f32bd924a78cfd99b" + integrity sha512-fqtGgak3zX4DCB6PFpsH5+Kmt/8CIi4Bry4rb1ho6Av2QHTREM+47y282Uqiu3ZRF5IQioJQ5qWRV6jduA+iGw== + +"@unrs/resolver-binding-linux-arm-gnueabihf@1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@unrs/resolver-binding-linux-arm-gnueabihf/-/resolver-binding-linux-arm-gnueabihf-1.11.1.tgz#844d2605d057488d77fab09705f2866b86164e0a" + integrity sha512-u92mvlcYtp9MRKmP+ZvMmtPN34+/3lMHlyMj7wXJDeXxuM0Vgzz0+PPJNsro1m3IZPYChIkn944wW8TYgGKFHw== + +"@unrs/resolver-binding-linux-arm-musleabihf@1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@unrs/resolver-binding-linux-arm-musleabihf/-/resolver-binding-linux-arm-musleabihf-1.11.1.tgz#204892995cefb6bd1d017d52d097193bc61ddad3" + integrity sha512-cINaoY2z7LVCrfHkIcmvj7osTOtm6VVT16b5oQdS4beibX2SYBwgYLmqhBjA1t51CarSaBuX5YNsWLjsqfW5Cw== + +"@unrs/resolver-binding-linux-arm64-gnu@1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@unrs/resolver-binding-linux-arm64-gnu/-/resolver-binding-linux-arm64-gnu-1.11.1.tgz#023eb0c3aac46066a10be7a3f362e7b34f3bdf9d" + integrity sha512-34gw7PjDGB9JgePJEmhEqBhWvCiiWCuXsL9hYphDF7crW7UgI05gyBAi6MF58uGcMOiOqSJ2ybEeCvHcq0BCmQ== + +"@unrs/resolver-binding-linux-arm64-musl@1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@unrs/resolver-binding-linux-arm64-musl/-/resolver-binding-linux-arm64-musl-1.11.1.tgz#9e6f9abb06424e3140a60ac996139786f5d99be0" + integrity sha512-RyMIx6Uf53hhOtJDIamSbTskA99sPHS96wxVE/bJtePJJtpdKGXO1wY90oRdXuYOGOTuqjT8ACccMc4K6QmT3w== + +"@unrs/resolver-binding-linux-ppc64-gnu@1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@unrs/resolver-binding-linux-ppc64-gnu/-/resolver-binding-linux-ppc64-gnu-1.11.1.tgz#b111417f17c9d1b02efbec8e08398f0c5527bb44" + integrity sha512-D8Vae74A4/a+mZH0FbOkFJL9DSK2R6TFPC9M+jCWYia/q2einCubX10pecpDiTmkJVUH+y8K3BZClycD8nCShA== + +"@unrs/resolver-binding-linux-riscv64-gnu@1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@unrs/resolver-binding-linux-riscv64-gnu/-/resolver-binding-linux-riscv64-gnu-1.11.1.tgz#92ffbf02748af3e99873945c9a8a5ead01d508a9" + integrity sha512-frxL4OrzOWVVsOc96+V3aqTIQl1O2TjgExV4EKgRY09AJ9leZpEg8Ak9phadbuX0BA4k8U5qtvMSQQGGmaJqcQ== + +"@unrs/resolver-binding-linux-riscv64-musl@1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@unrs/resolver-binding-linux-riscv64-musl/-/resolver-binding-linux-riscv64-musl-1.11.1.tgz#0bec6f1258fc390e6b305e9ff44256cb207de165" + integrity sha512-mJ5vuDaIZ+l/acv01sHoXfpnyrNKOk/3aDoEdLO/Xtn9HuZlDD6jKxHlkN8ZhWyLJsRBxfv9GYM2utQ1SChKew== + +"@unrs/resolver-binding-linux-s390x-gnu@1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@unrs/resolver-binding-linux-s390x-gnu/-/resolver-binding-linux-s390x-gnu-1.11.1.tgz#577843a084c5952f5906770633ccfb89dac9bc94" + integrity sha512-kELo8ebBVtb9sA7rMe1Cph4QHreByhaZ2QEADd9NzIQsYNQpt9UkM9iqr2lhGr5afh885d/cB5QeTXSbZHTYPg== + +"@unrs/resolver-binding-linux-x64-gnu@1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@unrs/resolver-binding-linux-x64-gnu/-/resolver-binding-linux-x64-gnu-1.11.1.tgz#36fb318eebdd690f6da32ac5e0499a76fa881935" + integrity sha512-C3ZAHugKgovV5YvAMsxhq0gtXuwESUKc5MhEtjBpLoHPLYM+iuwSj3lflFwK3DPm68660rZ7G8BMcwSro7hD5w== + +"@unrs/resolver-binding-linux-x64-musl@1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@unrs/resolver-binding-linux-x64-musl/-/resolver-binding-linux-x64-musl-1.11.1.tgz#bfb9af75f783f98f6a22c4244214efe4df1853d6" + integrity sha512-rV0YSoyhK2nZ4vEswT/QwqzqQXw5I6CjoaYMOX0TqBlWhojUf8P94mvI7nuJTeaCkkds3QE4+zS8Ko+GdXuZtA== + +"@unrs/resolver-binding-wasm32-wasi@1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@unrs/resolver-binding-wasm32-wasi/-/resolver-binding-wasm32-wasi-1.11.1.tgz#752c359dd875684b27429500d88226d7cc72f71d" + integrity sha512-5u4RkfxJm+Ng7IWgkzi3qrFOvLvQYnPBmjmZQ8+szTK/b31fQCnleNl1GgEt7nIsZRIf5PLhPwT0WM+q45x/UQ== + dependencies: + "@napi-rs/wasm-runtime" "^0.2.11" + +"@unrs/resolver-binding-win32-arm64-msvc@1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@unrs/resolver-binding-win32-arm64-msvc/-/resolver-binding-win32-arm64-msvc-1.11.1.tgz#ce5735e600e4c2fbb409cd051b3b7da4a399af35" + integrity sha512-nRcz5Il4ln0kMhfL8S3hLkxI85BXs3o8EYoattsJNdsX4YUU89iOkVn7g0VHSRxFuVMdM4Q1jEpIId1Ihim/Uw== + +"@unrs/resolver-binding-win32-ia32-msvc@1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@unrs/resolver-binding-win32-ia32-msvc/-/resolver-binding-win32-ia32-msvc-1.11.1.tgz#72fc57bc7c64ec5c3de0d64ee0d1810317bc60a6" + integrity sha512-DCEI6t5i1NmAZp6pFonpD5m7i6aFrpofcp4LA2i8IIq60Jyo28hamKBxNrZcyOwVOZkgsRp9O2sXWBWP8MnvIQ== + +"@unrs/resolver-binding-win32-x64-msvc@1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@unrs/resolver-binding-win32-x64-msvc/-/resolver-binding-win32-x64-msvc-1.11.1.tgz#538b1e103bf8d9864e7b85cc96fa8d6fb6c40777" + integrity sha512-lrW200hZdbfRtztbygyaq/6jP6AKE8qQN2KvPcJ+x7wiD038YtnYtZ82IMNJ69GJibV7bwL3y9FgK+5w/pYt6g== + JSONStream@^1.0.4: version "1.3.5" resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.5.tgz#3208c1f08d3a4d99261ab64f92302bc15e111ca0" @@ -749,23 +1089,23 @@ JSONStream@^1.0.4: through ">=2.2.7 <3" acorn-walk@^8.1.1: - version "8.3.4" - resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.3.4.tgz#794dd169c3977edf4ba4ea47583587c5866236b7" - integrity sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g== + version "8.3.5" + resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.3.5.tgz#8a6b8ca8fc5b34685af15dabb44118663c296496" + integrity sha512-HEHNfbars9v4pgpW6SO1KSPkfoS0xVOM/9UzkJltjlsHZmJasxg8aXkuZa7SMf8vKGIBhpUsPluQSqhJFCqebw== dependencies: acorn "^8.11.0" acorn@^8.11.0, acorn@^8.4.1: - version "8.14.0" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.14.0.tgz#063e2c70cac5fb4f6467f0b11152e04c682795b0" - integrity sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA== + version "8.16.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.16.0.tgz#4ce79c89be40afe7afe8f3adb902a1f1ce9ac08a" + integrity sha512-UVJyE9MttOsBQIDKw1skb9nAwQuR5wuGD3+82K6JgJlm/Y+KI92oNsMNGZCYdDsVtRHSak0pcV5Dno5+4jh9sw== add-stream@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/add-stream/-/add-stream-1.0.0.tgz#6a7990437ca736d5e1288db92bd3266d5f5cb2aa" integrity sha512-qQLMr+8o0WC4FZGQTcJiKBVC59JylcPSrTtk6usvmIDFUOCKegapy1VHQwRbFMOFyb/inzUVqHs+eMYKDM1YeQ== -ansi-escapes@^4.2.1: +ansi-escapes@^4.3.2: version "4.3.2" resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.2.tgz#6b2291d1db7d98b6521d5f1efa42d0f3a9feb65e" integrity sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ== @@ -796,7 +1136,7 @@ ansi-styles@^4.0.0, ansi-styles@^4.1.0: dependencies: color-convert "^2.0.1" -ansi-styles@^5.0.0: +ansi-styles@^5.2.0: version "5.2.0" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-5.2.0.tgz#07449690ad45777d1924ac2abb2fc8895dba836b" integrity sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA== @@ -806,7 +1146,7 @@ ansi-styles@^6.1.0: resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-6.2.1.tgz#0e62320cf99c21afff3b3012192546aacbfb05c5" integrity sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug== -anymatch@^3.0.3: +anymatch@^3.1.3: version "3.1.3" resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.3.tgz#790c58b19ba1720a84205b57c618d5ad8524973e" integrity sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw== @@ -836,49 +1176,41 @@ arrify@^1.0.1: resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" integrity sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA== -async@^3.2.3: - version "3.2.6" - resolved "https://registry.yarnpkg.com/async/-/async-3.2.6.tgz#1b0728e14929d51b85b449b7f06e27c1145e38ce" - integrity sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA== - -babel-jest@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-29.7.0.tgz#f4369919225b684c56085998ac63dbd05be020d5" - integrity sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg== - dependencies: - "@jest/transform" "^29.7.0" - "@types/babel__core" "^7.1.14" - babel-plugin-istanbul "^6.1.1" - babel-preset-jest "^29.6.3" - chalk "^4.0.0" - graceful-fs "^4.2.9" +babel-jest@30.3.0: + version "30.3.0" + resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-30.3.0.tgz#3ff5553fa3bcbb8738d2d7335a4dbdc3bd1a0eb5" + integrity sha512-gRpauEU2KRrCox5Z296aeVHR4jQ98BCnu0IO332D/xpHNOsIH/bgSRk9k6GbKIbBw8vFeN6ctuu6tV8WOyVfYQ== + dependencies: + "@jest/transform" "30.3.0" + "@types/babel__core" "^7.20.5" + babel-plugin-istanbul "^7.0.1" + babel-preset-jest "30.3.0" + chalk "^4.1.2" + graceful-fs "^4.2.11" slash "^3.0.0" -babel-plugin-istanbul@^6.1.1: - version "6.1.1" - resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz#fa88ec59232fd9b4e36dbbc540a8ec9a9b47da73" - integrity sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA== +babel-plugin-istanbul@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-7.0.1.tgz#d8b518c8ea199364cf84ccc82de89740236daf92" + integrity sha512-D8Z6Qm8jCvVXtIRkBnqNHX0zJ37rQcFJ9u8WOS6tkYOsRdHBzypCstaxWiu5ZIlqQtviRYbgnRLSoCEvjqcqbA== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@istanbuljs/load-nyc-config" "^1.0.0" - "@istanbuljs/schema" "^0.1.2" - istanbul-lib-instrument "^5.0.4" + "@istanbuljs/schema" "^0.1.3" + istanbul-lib-instrument "^6.0.2" test-exclude "^6.0.0" -babel-plugin-jest-hoist@^29.6.3: - version "29.6.3" - resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.6.3.tgz#aadbe943464182a8922c3c927c3067ff40d24626" - integrity sha512-ESAc/RJvGTFEzRwOTT4+lNDk/GNHMkKbNzsvT0qKRfDyyYTskxB5rnU2njIDYVxXCBHHEI1c0YwHob3WaYujOg== +babel-plugin-jest-hoist@30.3.0: + version "30.3.0" + resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-30.3.0.tgz#235ad714a45c18b12566becf439e1c604e277015" + integrity sha512-+TRkByhsws6sfPjVaitzadk1I0F5sPvOVUH5tyTSzhePpsGIVrdeunHSw/C36QeocS95OOk8lunc4rlu5Anwsg== dependencies: - "@babel/template" "^7.3.3" - "@babel/types" "^7.3.3" - "@types/babel__core" "^7.1.14" - "@types/babel__traverse" "^7.0.6" + "@types/babel__core" "^7.20.5" -babel-preset-current-node-syntax@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.1.0.tgz#9a929eafece419612ef4ae4f60b1862ebad8ef30" - integrity sha512-ldYss8SbBlWva1bs28q78Ju5Zq1F+8BrqBZZ0VFhLBvhh6lCpC2o3gDJi/5DRLs9FgYZCnmPYIVFU4lRXCkyUw== +babel-preset-current-node-syntax@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.2.0.tgz#20730d6cdc7dda5d89401cab10ac6a32067acde6" + integrity sha512-E/VlAEzRrsLEb2+dv8yp3bo4scof3l9nR4lrld+Iy5NyVqgVYUJnDAmunkhPMisRI32Qc4iRiz425d8vM++2fg== dependencies: "@babel/plugin-syntax-async-generators" "^7.8.4" "@babel/plugin-syntax-bigint" "^7.8.3" @@ -896,19 +1228,24 @@ babel-preset-current-node-syntax@^1.0.0: "@babel/plugin-syntax-private-property-in-object" "^7.14.5" "@babel/plugin-syntax-top-level-await" "^7.14.5" -babel-preset-jest@^29.6.3: - version "29.6.3" - resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-29.6.3.tgz#fa05fa510e7d493896d7b0dd2033601c840f171c" - integrity sha512-0B3bhxR6snWXJZtR/RliHTDPRgn1sNHOR0yVtq/IiQFyuOVjFS+wuio/R4gSNkyYmKmJB4wGZv2NZanmKmTnNA== +babel-preset-jest@30.3.0: + version "30.3.0" + resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-30.3.0.tgz#21cf3d19a6f5e9924426c879ee0b7f092636d043" + integrity sha512-6ZcUbWHC+dMz2vfzdNwi87Z1gQsLNK2uLuK1Q89R11xdvejcivlYYwDlEv0FHX3VwEXpbBQ9uufB/MUNpZGfhQ== dependencies: - babel-plugin-jest-hoist "^29.6.3" - babel-preset-current-node-syntax "^1.0.0" + babel-plugin-jest-hoist "30.3.0" + babel-preset-current-node-syntax "^1.2.0" balanced-match@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== +balanced-match@^4.0.2: + version "4.0.4" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-4.0.4.tgz#bfb10662feed8196a2c62e7c68e17720c274179a" + integrity sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA== + brace-expansion@^1.1.7: version "1.1.11" resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" @@ -924,6 +1261,13 @@ brace-expansion@^2.0.1: dependencies: balanced-match "^1.0.0" +brace-expansion@^5.0.5: + version "5.0.5" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-5.0.5.tgz#dcc3a37116b79f3e1b46db994ced5d570e930fdb" + integrity sha512-VZznLgtwhn+Mact9tfiwx64fA9erHH/MCXEUfB/0bX/6Fz6ny5EGTXYltMocqg4xFAQZtnO3DHWWXi8RiuN7cQ== + dependencies: + balanced-match "^4.0.2" + braces@^3.0.3: version "3.0.3" resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.3.tgz#490332f40919452272d55a8480adc0c441358789" @@ -960,7 +1304,7 @@ buffer-from@^1.0.0: resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== -callsites@^3.0.0: +callsites@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== @@ -979,7 +1323,7 @@ camelcase@^5.3.1: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== -camelcase@^6.2.0: +camelcase@^6.3.0: version "6.3.0" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== @@ -998,7 +1342,7 @@ chalk@^2.4.2: escape-string-regexp "^1.0.5" supports-color "^5.3.0" -chalk@^4.0.0, chalk@^4.0.2, chalk@^4.1.2: +chalk@^4.1.2: version "4.1.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== @@ -1011,15 +1355,15 @@ char-regex@^1.0.2: resolved "https://registry.yarnpkg.com/char-regex/-/char-regex-1.0.2.tgz#d744358226217f981ed58f479b1d6bcc29545dcf" integrity sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw== -ci-info@^3.2.0: - version "3.9.0" - resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.9.0.tgz#4279a62028a7b1f262f3473fc9605f5e218c59b4" - integrity sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ== +ci-info@^4.2.0: + version "4.4.0" + resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-4.4.0.tgz#7d54eff9f54b45b62401c26032696eb59c8bd18c" + integrity sha512-77PSwercCZU2Fc4sX94eF8k8Pxte6JAwL4/ICZLFjJLqegs7kCuAsqqj/70NQF6TvDpgFjkubQB2FW2ZZddvQg== -cjs-module-lexer@^1.0.0: - version "1.4.1" - resolved "https://registry.yarnpkg.com/cjs-module-lexer/-/cjs-module-lexer-1.4.1.tgz#707413784dbb3a72aa11c2f2b042a0bef4004170" - integrity sha512-cuSVIHi9/9E/+821Qjdvngor+xpnlwnuwIyZOaLmHBVdXL+gP+I6QQB9VkO7RI77YIcTV+S1W9AreJ5eN63JBA== +cjs-module-lexer@^2.1.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/cjs-module-lexer/-/cjs-module-lexer-2.2.0.tgz#b3ca5101843389259ade7d88c77bd06ce55849ca" + integrity sha512-4bHTS2YuzUvtoLjdy+98ykbNB5jS0+07EvFNXerqZQJ89F7DI6ET7OQo/HJuW6K0aVsKA9hj9/RVb2kQVOrPDQ== cliui@^7.0.2: version "7.0.4" @@ -1044,10 +1388,10 @@ co@^4.6.0: resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" integrity sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ== -collect-v8-coverage@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/collect-v8-coverage/-/collect-v8-coverage-1.0.2.tgz#c0b29bcd33bcd0779a1344c2136051e6afd3d9e9" - integrity sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q== +collect-v8-coverage@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/collect-v8-coverage/-/collect-v8-coverage-1.0.3.tgz#cc1f01eb8d02298cbc9a437c74c70ab4e5210b80" + integrity sha512-1L5aqIkwPfiodaMgQunkF1zRhNqifHBmtbbbxcr6yVxxBnliw4TDOW6NxpO8DJLgJ16OT+Y4ztZqP6p/FtXnAw== color-convert@^1.9.0: version "1.9.3" @@ -1269,19 +1613,6 @@ core-util-is@~1.0.0: resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.3.tgz#a6042d3634c2b27e9328f837b965fac83808db85" integrity sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ== -create-jest@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/create-jest/-/create-jest-29.7.0.tgz#a355c5b3cb1e1af02ba177fe7afd7feee49a5320" - integrity sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q== - dependencies: - "@jest/types" "^29.6.3" - chalk "^4.0.0" - exit "^0.1.2" - graceful-fs "^4.2.9" - jest-config "^29.7.0" - jest-util "^29.7.0" - prompts "^2.0.1" - create-require@^1.1.0: version "1.1.1" resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333" @@ -1326,12 +1657,12 @@ decamelize@^1.1.0: resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" integrity sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA== -dedent@^1.0.0: - version "1.5.3" - resolved "https://registry.yarnpkg.com/dedent/-/dedent-1.5.3.tgz#99aee19eb9bae55a67327717b6e848d0bf777e5a" - integrity sha512-NHQtfOOW68WD8lgypbLA5oT+Bt0xXJhiYvoR6SmmNXZfpzOGXwdKWmcwG8N7PwVVWV3eF/68nmD9BaJSsTBhyQ== +dedent@^1.6.0: + version "1.7.2" + resolved "https://registry.yarnpkg.com/dedent/-/dedent-1.7.2.tgz#34e2264ab538301e27cf7b07bf2369c19baa8dd9" + integrity sha512-WzMx3mW98SN+zn3hgemf4OzdmyNhhhKz5Ay0pUfQiMQ3e1g+xmTJWp/pKdwKVXhdSkAEGIIzqeuWrL3mV/AXbA== -deepmerge@^4.2.2: +deepmerge@^4.3.1: version "4.3.1" resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.3.1.tgz#44b5f2147cd3b00d4b56137685966f26fd25dd4a" integrity sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A== @@ -1341,20 +1672,15 @@ detect-indent@^6.0.0: resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-6.1.0.tgz#592485ebbbf6b3b1ab2be175c8393d04ca0d57e6" integrity sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA== -detect-newline@^3.0.0, detect-newline@^3.1.0: +detect-newline@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-3.1.0.tgz#576f5dfc63ae1a192ff192d8ad3af6308991b651" integrity sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA== -diff-sequences@^29.6.3: - version "29.6.3" - resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-29.6.3.tgz#4deaf894d11407c51efc8418012f9e70b84ea921" - integrity sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q== - diff@^4.0.1: - version "4.0.2" - resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" - integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A== + version "4.0.4" + resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.4.tgz#7a6dbfda325f25f07517e9b518f897c08332e07d" + integrity sha512-X07nttJQkwkfKfvTPG/KSnE2OMdcUCao6+eXF3wmnIQRn2aPAHH3VxDbDOdegkd6JbPsXqShpvEOHfAT+nCNwQ== dot-prop@^5.1.0: version "5.3.0" @@ -1376,13 +1702,6 @@ eastasianwidth@^0.2.0: resolved "https://registry.yarnpkg.com/eastasianwidth/-/eastasianwidth-0.2.0.tgz#696ce2ec0aa0e6ea93a397ffcf24aa7840c827cb" integrity sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA== -ejs@^3.1.10: - version "3.1.10" - resolved "https://registry.yarnpkg.com/ejs/-/ejs-3.1.10.tgz#69ab8358b14e896f80cc39e62087b88500c3ac3b" - integrity sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA== - dependencies: - jake "^10.8.5" - electron-to-chromium@^1.5.41: version "1.5.68" resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.68.tgz#4f46be4d465ef00e2100d5557b66f4af70e3ce6c" @@ -1410,6 +1729,11 @@ error-ex@^1.3.1: dependencies: is-arrayish "^0.2.1" +es-errors@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/es-errors/-/es-errors-1.3.0.tgz#05f75a25dab98e4fb1dcd5e1472c0546d5057c8f" + integrity sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw== + escalade@^3.1.1, escalade@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.2.0.tgz#011a3f69856ba189dffa7dc8fcce99d2a87903e5" @@ -1425,17 +1749,12 @@ escape-string-regexp@^2.0.0: resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz#a30304e99daa32e23b2fd20f51babd07cffca344" integrity sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w== -esm@^3.2.25: - version "3.2.25" - resolved "https://registry.yarnpkg.com/esm/-/esm-3.2.25.tgz#342c18c29d56157688ba5ce31f8431fbb795cc10" - integrity sha512-U1suiZ2oDVWv4zPO56S0NcR5QriEahGtdN2OR6FiOG4WJvcjBVFB0qI4+eKoWFH483PKGuLuu6V8Z4T5g63UVA== - esprima@^4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== -execa@^5.0.0: +execa@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/execa/-/execa-5.1.1.tgz#f80ad9cbf4298f7bd1d4c9555c21e93741c411dd" integrity sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg== @@ -1450,28 +1769,47 @@ execa@^5.0.0: signal-exit "^3.0.3" strip-final-newline "^2.0.0" -exit@^0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" - integrity sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ== - -expect@^29.0.0, expect@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/expect/-/expect-29.7.0.tgz#578874590dcb3214514084c08115d8aee61e11bc" - integrity sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw== - dependencies: - "@jest/expect-utils" "^29.7.0" - jest-get-type "^29.6.3" - jest-matcher-utils "^29.7.0" - jest-message-util "^29.7.0" - jest-util "^29.7.0" +exit-x@^0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/exit-x/-/exit-x-0.2.2.tgz#1f9052de3b8d99a696b10dad5bced9bdd5c3aa64" + integrity sha512-+I6B/IkJc1o/2tiURyz/ivu/O0nKNEArIUB5O7zBrlDVJr22SCLH3xTeEry428LvFhRzIA1g8izguxJ/gbNcVQ== + +expect@30.3.0, expect@^30.0.0: + version "30.3.0" + resolved "https://registry.yarnpkg.com/expect/-/expect-30.3.0.tgz#1b82111517d1ab030f3db0cf1b4061c8aa644f61" + integrity sha512-1zQrciTiQfRdo7qJM1uG4navm8DayFa2TgCSRlzUyNkhcJ6XUZF3hjnpkyr3VhAqPH7i/9GkG7Tv5abz6fqz0Q== + dependencies: + "@jest/expect-utils" "30.3.0" + "@jest/get-type" "30.1.0" + jest-matcher-utils "30.3.0" + jest-message-util "30.3.0" + jest-mock "30.3.0" + jest-util "30.3.0" + +fast-glob@^3.3.2: + version "3.3.3" + resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.3.tgz#d06d585ce8dba90a16b0505c543c3ccfb3aeb818" + integrity sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg== + dependencies: + "@nodelib/fs.stat" "^2.0.2" + "@nodelib/fs.walk" "^1.2.3" + glob-parent "^5.1.2" + merge2 "^1.3.0" + micromatch "^4.0.8" fast-json-stable-stringify@2.x, fast-json-stable-stringify@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== -fb-watchman@^2.0.0: +fastq@^1.6.0: + version "1.20.1" + resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.20.1.tgz#ca750a10dc925bc8b18839fd203e3ef4b3ced675" + integrity sha512-GGToxJ/w1x32s/D2EKND7kTil4n8OVk/9mycTc4VDza13lOvpUZTGX3mFSCtV9ksdGBVzvsyAVLM6mHFThxXxw== + dependencies: + reusify "^1.0.4" + +fb-watchman@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/fb-watchman/-/fb-watchman-2.0.2.tgz#e9524ee6b5c77e9e5001af0f85f3adbb8623255c" integrity sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA== @@ -1485,13 +1823,6 @@ figures@^3.1.0: dependencies: escape-string-regexp "^1.0.5" -filelist@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/filelist/-/filelist-1.0.4.tgz#f78978a1e944775ff9e62e744424f215e58352b5" - integrity sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q== - dependencies: - minimatch "^5.0.1" - fill-range@^7.1.1: version "7.1.1" resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.1.1.tgz#44265d3cac07e3ea7dc247516380643754a05292" @@ -1542,7 +1873,7 @@ fs.realpath@^1.0.0: resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== -fsevents@^2.3.2: +fsevents@^2.3.3: version "2.3.3" resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6" integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw== @@ -1616,10 +1947,17 @@ gitconfiglocal@^1.0.0: dependencies: ini "^1.3.2" -glob@^10.3.7: - version "10.4.5" - resolved "https://registry.yarnpkg.com/glob/-/glob-10.4.5.tgz#f4d9f0b90ffdbab09c9d77f5f29b4262517b0956" - integrity sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg== +glob-parent@^5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" + integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== + dependencies: + is-glob "^4.0.1" + +glob@^10.5.0: + version "10.5.0" + resolved "https://registry.yarnpkg.com/glob/-/glob-10.5.0.tgz#8ec0355919cd3338c28428a23d4f24ecc5fe738c" + integrity sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg== dependencies: foreground-child "^3.1.0" jackspeak "^3.1.2" @@ -1628,7 +1966,16 @@ glob@^10.3.7: package-json-from-dist "^1.0.0" path-scurry "^1.11.1" -glob@^7.0.0, glob@^7.1.3, glob@^7.1.4: +glob@^13.0.3: + version "13.0.6" + resolved "https://registry.yarnpkg.com/glob/-/glob-13.0.6.tgz#078666566a425147ccacfbd2e332deb66a2be71d" + integrity sha512-Wjlyrolmm8uDpm/ogGyXZXb1Z+Ca2B8NbJwqBVg0axK9GbBeoS7yGV6vjXnYdGm6X53iehEuxxbyiKp8QmN4Vw== + dependencies: + minimatch "^10.2.2" + minipass "^7.1.3" + path-scurry "^2.0.2" + +glob@^7.1.4: version "7.2.3" resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== @@ -1654,7 +2001,7 @@ globals@^11.1.0: resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== -graceful-fs@^4.1.2, graceful-fs@^4.2.9: +graceful-fs@^4.1.2, graceful-fs@^4.2.11: version "4.2.11" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== @@ -1671,6 +2018,18 @@ handlebars@^4.7.7: optionalDependencies: uglify-js "^3.1.4" +handlebars@^4.7.9: + version "4.7.9" + resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.9.tgz#6f139082ab58dc4e5a0e51efe7db5ae890d56a0f" + integrity sha512-4E71E0rpOaQuJR2A3xDZ+GM1HyWYv1clR58tC8emQNeQe3RH7MAzSbat+V0wG78LQBo6m6bzSG/L4pBuCsgnUQ== + dependencies: + minimist "^1.2.5" + neo-async "^2.6.2" + source-map "^0.6.1" + wordwrap "^1.0.0" + optionalDependencies: + uglify-js "^3.1.4" + hard-rejection@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/hard-rejection/-/hard-rejection-2.1.0.tgz#1c6eda5c1685c63942766d79bb40ae773cecd883" @@ -1715,7 +2074,7 @@ human-signals@^2.1.0: resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== -import-local@^3.0.2: +import-local@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/import-local/-/import-local-3.2.0.tgz#c3d5c745798c02a6f8b897726aba5100186ee260" integrity sha512-2SPlun1JUPWoM6t3F0dw0FkCF/jWY8kttcY4f599GLTSjh2OCuuhdTkJQsEcZzBqbXZGKMK2OqW1oZsjtf/gQA== @@ -1756,11 +2115,6 @@ ini@^4.1.3: resolved "https://registry.yarnpkg.com/ini/-/ini-4.1.3.tgz#4c359675a6071a46985eb39b14e4a2c0ec98a795" integrity sha512-X7rqawQBvfdjS10YU1y1YVreA3SsLrW9dX2CewP2EbBJM4ypVNLDkO5y04gejPwKIY9lR+7r9gn3rFPt/kmWFg== -interpret@^1.0.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.4.0.tgz#665ab8bc4da27a774a40584e812e3e0fa45b1a1e" - integrity sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA== - is-arrayish@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" @@ -1773,16 +2127,35 @@ is-core-module@^2.13.0, is-core-module@^2.5.0: dependencies: hasown "^2.0.2" +is-core-module@^2.16.1: + version "2.16.1" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.16.1.tgz#2a98801a849f43e2add644fbb6bc6229b19a4ef4" + integrity sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w== + dependencies: + hasown "^2.0.2" + +is-extglob@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" + integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== + is-fullwidth-code-point@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== -is-generator-fn@^2.0.0: +is-generator-fn@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/is-generator-fn/-/is-generator-fn-2.1.0.tgz#7d140adc389aaf3011a8f2a2a4cfa6faadffb118" integrity sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ== +is-glob@^4.0.1: + version "4.0.3" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" + integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== + dependencies: + is-extglob "^2.1.1" + is-number@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" @@ -1830,18 +2203,7 @@ istanbul-lib-coverage@^3.0.0, istanbul-lib-coverage@^3.2.0: resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz#2d166c4b0644d43a39f04bf6c2edd1e585f31756" integrity sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg== -istanbul-lib-instrument@^5.0.4: - version "5.2.1" - resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz#d10c8885c2125574e1c231cacadf955675e1ce3d" - integrity sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg== - dependencies: - "@babel/core" "^7.12.3" - "@babel/parser" "^7.14.7" - "@istanbuljs/schema" "^0.1.2" - istanbul-lib-coverage "^3.2.0" - semver "^6.3.0" - -istanbul-lib-instrument@^6.0.0: +istanbul-lib-instrument@^6.0.0, istanbul-lib-instrument@^6.0.2: version "6.0.3" resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.3.tgz#fa15401df6c15874bcb2105f773325d78c666765" integrity sha512-Vtgk7L/R2JHyyGW07spoFlB8/lpjiOLTjMdms6AFMraYt3BaJauod/NGrfnVG/y4Ix1JEuMRPDPEj2ua+zz1/Q== @@ -1861,14 +2223,14 @@ istanbul-lib-report@^3.0.0: make-dir "^4.0.0" supports-color "^7.1.0" -istanbul-lib-source-maps@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz#895f3a709fcfba34c6de5a42939022f3e4358551" - integrity sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw== +istanbul-lib-source-maps@^5.0.0: + version "5.0.6" + resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-5.0.6.tgz#acaef948df7747c8eb5fbf1265cb980f6353a441" + integrity sha512-yg2d+Em4KizZC5niWhQaIomgf5WlL4vOOjZ5xGCmF8SnPE/mDWWXgvRExdcpCgh9lLRRa1/fSYp2ymmbJ1pI+A== dependencies: + "@jridgewell/trace-mapping" "^0.3.23" debug "^4.1.1" istanbul-lib-coverage "^3.0.0" - source-map "^0.6.1" istanbul-reports@^3.1.3: version "3.1.7" @@ -1887,373 +2249,360 @@ jackspeak@^3.1.2: optionalDependencies: "@pkgjs/parseargs" "^0.11.0" -jake@^10.8.5: - version "10.9.2" - resolved "https://registry.yarnpkg.com/jake/-/jake-10.9.2.tgz#6ae487e6a69afec3a5e167628996b59f35ae2b7f" - integrity sha512-2P4SQ0HrLQ+fw6llpLnOaGAvN2Zu6778SJMrCUwns4fOoG9ayrTiZk3VV8sCPkVZF8ab0zksVpS8FDY5pRCNBA== - dependencies: - async "^3.2.3" - chalk "^4.0.2" - filelist "^1.0.4" - minimatch "^3.1.2" - -jest-changed-files@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-29.7.0.tgz#1c06d07e77c78e1585d020424dedc10d6e17ac3a" - integrity sha512-fEArFiwf1BpQ+4bXSprcDc3/x4HSzL4al2tozwVpDFpsxALjLYdyiIK4e5Vz66GQJIbXJ82+35PtysofptNX2w== +jest-changed-files@30.3.0: + version "30.3.0" + resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-30.3.0.tgz#055849df695f9a9fcde0ae44024f815bbc627f3a" + integrity sha512-B/7Cny6cV5At6M25EWDgf9S617lHivamL8vl6KEpJqkStauzcG4e+WPfDgMMF+H4FVH4A2PLRyvgDJan4441QA== dependencies: - execa "^5.0.0" - jest-util "^29.7.0" + execa "^5.1.1" + jest-util "30.3.0" p-limit "^3.1.0" -jest-circus@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-circus/-/jest-circus-29.7.0.tgz#b6817a45fcc835d8b16d5962d0c026473ee3668a" - integrity sha512-3E1nCMgipcTkCocFwM90XXQab9bS+GMsjdpmPrlelaxwD93Ad8iVEjX/vvHPdLPnFf+L40u+5+iutRdA1N9myw== +jest-circus@30.3.0: + version "30.3.0" + resolved "https://registry.yarnpkg.com/jest-circus/-/jest-circus-30.3.0.tgz#153614c11ab35867f371bd93496ecb9690b92077" + integrity sha512-PyXq5szeSfR/4f1lYqCmmQjh0vqDkURUYi9N6whnHjlRz4IUQfMcXkGLeEoiJtxtyPqgUaUUfyQlApXWBSN1RA== dependencies: - "@jest/environment" "^29.7.0" - "@jest/expect" "^29.7.0" - "@jest/test-result" "^29.7.0" - "@jest/types" "^29.6.3" + "@jest/environment" "30.3.0" + "@jest/expect" "30.3.0" + "@jest/test-result" "30.3.0" + "@jest/types" "30.3.0" "@types/node" "*" - chalk "^4.0.0" + chalk "^4.1.2" co "^4.6.0" - dedent "^1.0.0" - is-generator-fn "^2.0.0" - jest-each "^29.7.0" - jest-matcher-utils "^29.7.0" - jest-message-util "^29.7.0" - jest-runtime "^29.7.0" - jest-snapshot "^29.7.0" - jest-util "^29.7.0" + dedent "^1.6.0" + is-generator-fn "^2.1.0" + jest-each "30.3.0" + jest-matcher-utils "30.3.0" + jest-message-util "30.3.0" + jest-runtime "30.3.0" + jest-snapshot "30.3.0" + jest-util "30.3.0" p-limit "^3.1.0" - pretty-format "^29.7.0" - pure-rand "^6.0.0" + pretty-format "30.3.0" + pure-rand "^7.0.0" slash "^3.0.0" - stack-utils "^2.0.3" - -jest-cli@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-29.7.0.tgz#5592c940798e0cae677eec169264f2d839a37995" - integrity sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg== - dependencies: - "@jest/core" "^29.7.0" - "@jest/test-result" "^29.7.0" - "@jest/types" "^29.6.3" - chalk "^4.0.0" - create-jest "^29.7.0" - exit "^0.1.2" - import-local "^3.0.2" - jest-config "^29.7.0" - jest-util "^29.7.0" - jest-validate "^29.7.0" - yargs "^17.3.1" - -jest-config@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-29.7.0.tgz#bcbda8806dbcc01b1e316a46bb74085a84b0245f" - integrity sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ== - dependencies: - "@babel/core" "^7.11.6" - "@jest/test-sequencer" "^29.7.0" - "@jest/types" "^29.6.3" - babel-jest "^29.7.0" - chalk "^4.0.0" - ci-info "^3.2.0" - deepmerge "^4.2.2" - glob "^7.1.3" - graceful-fs "^4.2.9" - jest-circus "^29.7.0" - jest-environment-node "^29.7.0" - jest-get-type "^29.6.3" - jest-regex-util "^29.6.3" - jest-resolve "^29.7.0" - jest-runner "^29.7.0" - jest-util "^29.7.0" - jest-validate "^29.7.0" - micromatch "^4.0.4" + stack-utils "^2.0.6" + +jest-cli@30.3.0: + version "30.3.0" + resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-30.3.0.tgz#5ed75a337f486a1f1c5acbb2de8acddb106ead6c" + integrity sha512-l6Tqx+j1fDXJEW5bqYykDQQ7mQg+9mhWXtnj+tQZrTWYHyHoi6Be8HPumDSA+UiX2/2buEgjA58iJzdj146uCw== + dependencies: + "@jest/core" "30.3.0" + "@jest/test-result" "30.3.0" + "@jest/types" "30.3.0" + chalk "^4.1.2" + exit-x "^0.2.2" + import-local "^3.2.0" + jest-config "30.3.0" + jest-util "30.3.0" + jest-validate "30.3.0" + yargs "^17.7.2" + +jest-config@30.3.0: + version "30.3.0" + resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-30.3.0.tgz#b969e0aaaf5964419e62953bb712c16d15972425" + integrity sha512-WPMAkMAtNDY9P/oKObtsRG/6KTrhtgPJoBTmk20uDn4Uy6/3EJnnaZJre/FMT1KVRx8cve1r7/FlMIOfRVWL4w== + dependencies: + "@babel/core" "^7.27.4" + "@jest/get-type" "30.1.0" + "@jest/pattern" "30.0.1" + "@jest/test-sequencer" "30.3.0" + "@jest/types" "30.3.0" + babel-jest "30.3.0" + chalk "^4.1.2" + ci-info "^4.2.0" + deepmerge "^4.3.1" + glob "^10.5.0" + graceful-fs "^4.2.11" + jest-circus "30.3.0" + jest-docblock "30.2.0" + jest-environment-node "30.3.0" + jest-regex-util "30.0.1" + jest-resolve "30.3.0" + jest-runner "30.3.0" + jest-util "30.3.0" + jest-validate "30.3.0" parse-json "^5.2.0" - pretty-format "^29.7.0" + pretty-format "30.3.0" slash "^3.0.0" strip-json-comments "^3.1.1" -jest-diff@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-29.7.0.tgz#017934a66ebb7ecf6f205e84699be10afd70458a" - integrity sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw== - dependencies: - chalk "^4.0.0" - diff-sequences "^29.6.3" - jest-get-type "^29.6.3" - pretty-format "^29.7.0" - -jest-docblock@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-29.7.0.tgz#8fddb6adc3cdc955c93e2a87f61cfd350d5d119a" - integrity sha512-q617Auw3A612guyaFgsbFeYpNP5t2aoUNLwBUbc/0kD1R4t9ixDbyFTHd1nok4epoVFpr7PmeWHrhvuV3XaJ4g== - dependencies: - detect-newline "^3.0.0" - -jest-each@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-29.7.0.tgz#162a9b3f2328bdd991beaabffbb74745e56577d1" - integrity sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ== - dependencies: - "@jest/types" "^29.6.3" - chalk "^4.0.0" - jest-get-type "^29.6.3" - jest-util "^29.7.0" - pretty-format "^29.7.0" - -jest-environment-node@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-29.7.0.tgz#0b93e111dda8ec120bc8300e6d1fb9576e164376" - integrity sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw== - dependencies: - "@jest/environment" "^29.7.0" - "@jest/fake-timers" "^29.7.0" - "@jest/types" "^29.6.3" - "@types/node" "*" - jest-mock "^29.7.0" - jest-util "^29.7.0" +jest-diff@30.3.0: + version "30.3.0" + resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-30.3.0.tgz#e0a4c84ef350ffd790ffd5b0016acabeecf5f759" + integrity sha512-n3q4PDQjS4LrKxfWB3Z5KNk1XjXtZTBwQp71OP0Jo03Z6V60x++K5L8k6ZrW8MY8pOFylZvHM0zsjS1RqlHJZQ== + dependencies: + "@jest/diff-sequences" "30.3.0" + "@jest/get-type" "30.1.0" + chalk "^4.1.2" + pretty-format "30.3.0" -jest-get-type@^29.6.3: - version "29.6.3" - resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-29.6.3.tgz#36f499fdcea197c1045a127319c0481723908fd1" - integrity sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw== +jest-docblock@30.2.0: + version "30.2.0" + resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-30.2.0.tgz#42cd98d69f887e531c7352309542b1ce4ee10256" + integrity sha512-tR/FFgZKS1CXluOQzZvNH3+0z9jXr3ldGSD8bhyuxvlVUwbeLOGynkunvlTMxchC5urrKndYiwCFC0DLVjpOCA== + dependencies: + detect-newline "^3.1.0" -jest-haste-map@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-29.7.0.tgz#3c2396524482f5a0506376e6c858c3bbcc17b104" - integrity sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA== +jest-each@30.3.0: + version "30.3.0" + resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-30.3.0.tgz#faa7229bf7a9fa6426dc604057a7d2a173493b1e" + integrity sha512-V8eMndg/aZ+3LnCJgSm13IxS5XSBM22QSZc9BtPK8Dek6pm+hfUNfwBdvsB3d342bo1q7wnSkC38zjX259qZNA== dependencies: - "@jest/types" "^29.6.3" - "@types/graceful-fs" "^4.1.3" + "@jest/get-type" "30.1.0" + "@jest/types" "30.3.0" + chalk "^4.1.2" + jest-util "30.3.0" + pretty-format "30.3.0" + +jest-environment-node@30.3.0: + version "30.3.0" + resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-30.3.0.tgz#aa8a57c5d0c4af0f8b1f7403ba737fec6b3aabbe" + integrity sha512-4i6HItw/JSiJVsC5q0hnKIe/hbYfZLVG9YJ/0pU9Hz2n/9qZe3Rhn5s5CUZA5ORZlcdT/vmAXRMyONXJwPrmYQ== + dependencies: + "@jest/environment" "30.3.0" + "@jest/fake-timers" "30.3.0" + "@jest/types" "30.3.0" "@types/node" "*" - anymatch "^3.0.3" - fb-watchman "^2.0.0" - graceful-fs "^4.2.9" - jest-regex-util "^29.6.3" - jest-util "^29.7.0" - jest-worker "^29.7.0" - micromatch "^4.0.4" + jest-mock "30.3.0" + jest-util "30.3.0" + jest-validate "30.3.0" + +jest-haste-map@30.3.0: + version "30.3.0" + resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-30.3.0.tgz#1ea6843e6e45c077d91270666a4fcba958c24cd5" + integrity sha512-mMi2oqG4KRU0R9QEtscl87JzMXfUhbKaFqOxmjb2CKcbHcUGFrJCBWHmnTiUqi6JcnzoBlO4rWfpdl2k/RfLCA== + dependencies: + "@jest/types" "30.3.0" + "@types/node" "*" + anymatch "^3.1.3" + fb-watchman "^2.0.2" + graceful-fs "^4.2.11" + jest-regex-util "30.0.1" + jest-util "30.3.0" + jest-worker "30.3.0" + picomatch "^4.0.3" walker "^1.0.8" optionalDependencies: - fsevents "^2.3.2" - -jest-leak-detector@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-29.7.0.tgz#5b7ec0dadfdfec0ca383dc9aa016d36b5ea4c728" - integrity sha512-kYA8IJcSYtST2BY9I+SMC32nDpBT3J2NvWJx8+JCuCdl/CR1I4EKUJROiP8XtCcxqgTTBGJNdbB1A8XRKbTetw== - dependencies: - jest-get-type "^29.6.3" - pretty-format "^29.7.0" - -jest-matcher-utils@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-29.7.0.tgz#ae8fec79ff249fd592ce80e3ee474e83a6c44f12" - integrity sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g== - dependencies: - chalk "^4.0.0" - jest-diff "^29.7.0" - jest-get-type "^29.6.3" - pretty-format "^29.7.0" - -jest-message-util@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-29.7.0.tgz#8bc392e204e95dfe7564abbe72a404e28e51f7f3" - integrity sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w== - dependencies: - "@babel/code-frame" "^7.12.13" - "@jest/types" "^29.6.3" - "@types/stack-utils" "^2.0.0" - chalk "^4.0.0" - graceful-fs "^4.2.9" - micromatch "^4.0.4" - pretty-format "^29.7.0" + fsevents "^2.3.3" + +jest-leak-detector@30.3.0: + version "30.3.0" + resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-30.3.0.tgz#a695a851e353f517a554a2f5c91c2742fc131c98" + integrity sha512-cuKmUUGIjfXZAiGJ7TbEMx0bcqNdPPI6P1V+7aF+m/FUJqFDxkFR4JqkTu8ZOiU5AaX/x0hZ20KaaIPXQzbMGQ== + dependencies: + "@jest/get-type" "30.1.0" + pretty-format "30.3.0" + +jest-matcher-utils@30.3.0: + version "30.3.0" + resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-30.3.0.tgz#d6c739fec1ecd33809f2d2b1348f6ab01d2f2493" + integrity sha512-HEtc9uFQgaUHkC7nLSlQL3Tph4Pjxt/yiPvkIrrDCt9jhoLIgxaubo1G+CFOnmHYMxHwwdaSN7mkIFs6ZK8OhA== + dependencies: + "@jest/get-type" "30.1.0" + chalk "^4.1.2" + jest-diff "30.3.0" + pretty-format "30.3.0" + +jest-message-util@30.3.0: + version "30.3.0" + resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-30.3.0.tgz#4d723544d36890ba862ac3961db52db5b0d1ba39" + integrity sha512-Z/j4Bo+4ySJ+JPJN3b2Qbl9hDq3VrXmnjjGEWD/x0BCXeOXPTV1iZYYzl2X8c1MaCOL+ewMyNBcm88sboE6YWw== + dependencies: + "@babel/code-frame" "^7.27.1" + "@jest/types" "30.3.0" + "@types/stack-utils" "^2.0.3" + chalk "^4.1.2" + graceful-fs "^4.2.11" + picomatch "^4.0.3" + pretty-format "30.3.0" slash "^3.0.0" - stack-utils "^2.0.3" + stack-utils "^2.0.6" -jest-mock@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-29.7.0.tgz#4e836cf60e99c6fcfabe9f99d017f3fdd50a6347" - integrity sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw== +jest-mock@30.3.0: + version "30.3.0" + resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-30.3.0.tgz#e0fa4184a596a6c4fdec53d4f412158418923747" + integrity sha512-OTzICK8CpE+t4ndhKrwlIdbM6Pn8j00lvmSmq5ejiO+KxukbLjgOflKWMn3KE34EZdQm5RqTuKj+5RIEniYhog== dependencies: - "@jest/types" "^29.6.3" + "@jest/types" "30.3.0" "@types/node" "*" - jest-util "^29.7.0" + jest-util "30.3.0" -jest-pnp-resolver@^1.2.2: +jest-pnp-resolver@^1.2.3: version "1.2.3" resolved "https://registry.yarnpkg.com/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz#930b1546164d4ad5937d5540e711d4d38d4cad2e" integrity sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w== -jest-regex-util@^29.6.3: - version "29.6.3" - resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-29.6.3.tgz#4a556d9c776af68e1c5f48194f4d0327d24e8a52" - integrity sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg== - -jest-resolve-dependencies@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-29.7.0.tgz#1b04f2c095f37fc776ff40803dc92921b1e88428" - integrity sha512-un0zD/6qxJ+S0et7WxeI3H5XSe9lTBBR7bOHCHXkKR6luG5mwDDlIzVQ0V5cZCuoTgEdcdwzTghYkTWfubi+nA== - dependencies: - jest-regex-util "^29.6.3" - jest-snapshot "^29.7.0" - -jest-resolve@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-29.7.0.tgz#64d6a8992dd26f635ab0c01e5eef4399c6bcbc30" - integrity sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA== - dependencies: - chalk "^4.0.0" - graceful-fs "^4.2.9" - jest-haste-map "^29.7.0" - jest-pnp-resolver "^1.2.2" - jest-util "^29.7.0" - jest-validate "^29.7.0" - resolve "^1.20.0" - resolve.exports "^2.0.0" - slash "^3.0.0" +jest-regex-util@30.0.1: + version "30.0.1" + resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-30.0.1.tgz#f17c1de3958b67dfe485354f5a10093298f2a49b" + integrity sha512-jHEQgBXAgc+Gh4g0p3bCevgRCVRkB4VB70zhoAE48gxeSr1hfUOsM/C2WoJgVL7Eyg//hudYENbm3Ne+/dRVVA== + +jest-resolve-dependencies@30.3.0: + version "30.3.0" + resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-30.3.0.tgz#4d638c9f0d93a62a6ed25dec874bfd7e756c8ce5" + integrity sha512-9ev8s3YN6Hsyz9LV75XUwkCVFlwPbaFn6Wp75qnI0wzAINYWY8Fb3+6y59Rwd3QaS3kKXffHXsZMziMavfz/nw== + dependencies: + jest-regex-util "30.0.1" + jest-snapshot "30.3.0" -jest-runner@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-29.7.0.tgz#809af072d408a53dcfd2e849a4c976d3132f718e" - integrity sha512-fsc4N6cPCAahybGBfTRcq5wFR6fpLznMg47sY5aDpsoejOcVYFb07AHuSnR0liMcPTgBsA3ZJL6kFOjPdoNipQ== +jest-resolve@30.3.0: + version "30.3.0" + resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-30.3.0.tgz#b7bee9927279805b1b50715d2170a545553b87ff" + integrity sha512-NRtTAHQlpd15F9rUR36jqwelbrDV/dY4vzNte3S2kxCKUJRYNd5/6nTSbYiak1VX5g8IoFF23Uj5TURkUW8O5g== dependencies: - "@jest/console" "^29.7.0" - "@jest/environment" "^29.7.0" - "@jest/test-result" "^29.7.0" - "@jest/transform" "^29.7.0" - "@jest/types" "^29.6.3" + chalk "^4.1.2" + graceful-fs "^4.2.11" + jest-haste-map "30.3.0" + jest-pnp-resolver "^1.2.3" + jest-util "30.3.0" + jest-validate "30.3.0" + slash "^3.0.0" + unrs-resolver "^1.7.11" + +jest-runner@30.3.0: + version "30.3.0" + resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-30.3.0.tgz#fa970fc4e45d418ad7e7d581b24cac7af5944cb7" + integrity sha512-gDv6C9LGKWDPLia9TSzZwf4h3kMQCqyTpq+95PODnTRDO0g9os48XIYYkS6D236vjpBir2fF63YmJFtqkS5Duw== + dependencies: + "@jest/console" "30.3.0" + "@jest/environment" "30.3.0" + "@jest/test-result" "30.3.0" + "@jest/transform" "30.3.0" + "@jest/types" "30.3.0" "@types/node" "*" - chalk "^4.0.0" + chalk "^4.1.2" emittery "^0.13.1" - graceful-fs "^4.2.9" - jest-docblock "^29.7.0" - jest-environment-node "^29.7.0" - jest-haste-map "^29.7.0" - jest-leak-detector "^29.7.0" - jest-message-util "^29.7.0" - jest-resolve "^29.7.0" - jest-runtime "^29.7.0" - jest-util "^29.7.0" - jest-watcher "^29.7.0" - jest-worker "^29.7.0" + exit-x "^0.2.2" + graceful-fs "^4.2.11" + jest-docblock "30.2.0" + jest-environment-node "30.3.0" + jest-haste-map "30.3.0" + jest-leak-detector "30.3.0" + jest-message-util "30.3.0" + jest-resolve "30.3.0" + jest-runtime "30.3.0" + jest-util "30.3.0" + jest-watcher "30.3.0" + jest-worker "30.3.0" p-limit "^3.1.0" source-map-support "0.5.13" -jest-runtime@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-29.7.0.tgz#efecb3141cf7d3767a3a0cc8f7c9990587d3d817" - integrity sha512-gUnLjgwdGqW7B4LvOIkbKs9WGbn+QLqRQQ9juC6HndeDiezIwhDP+mhMwHWCEcfQ5RUXa6OPnFF8BJh5xegwwQ== - dependencies: - "@jest/environment" "^29.7.0" - "@jest/fake-timers" "^29.7.0" - "@jest/globals" "^29.7.0" - "@jest/source-map" "^29.6.3" - "@jest/test-result" "^29.7.0" - "@jest/transform" "^29.7.0" - "@jest/types" "^29.6.3" +jest-runtime@30.3.0: + version "30.3.0" + resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-30.3.0.tgz#1a9bec7a9b68db12dfe4136bbe41ab883ea2c996" + integrity sha512-CgC+hIBJbuh78HEffkhNKcbXAytQViplcl8xupqeIWyKQF50kCQA8J7GeJCkjisC6hpnC9Muf8jV5RdtdFbGng== + dependencies: + "@jest/environment" "30.3.0" + "@jest/fake-timers" "30.3.0" + "@jest/globals" "30.3.0" + "@jest/source-map" "30.0.1" + "@jest/test-result" "30.3.0" + "@jest/transform" "30.3.0" + "@jest/types" "30.3.0" "@types/node" "*" - chalk "^4.0.0" - cjs-module-lexer "^1.0.0" - collect-v8-coverage "^1.0.0" - glob "^7.1.3" - graceful-fs "^4.2.9" - jest-haste-map "^29.7.0" - jest-message-util "^29.7.0" - jest-mock "^29.7.0" - jest-regex-util "^29.6.3" - jest-resolve "^29.7.0" - jest-snapshot "^29.7.0" - jest-util "^29.7.0" + chalk "^4.1.2" + cjs-module-lexer "^2.1.0" + collect-v8-coverage "^1.0.2" + glob "^10.5.0" + graceful-fs "^4.2.11" + jest-haste-map "30.3.0" + jest-message-util "30.3.0" + jest-mock "30.3.0" + jest-regex-util "30.0.1" + jest-resolve "30.3.0" + jest-snapshot "30.3.0" + jest-util "30.3.0" slash "^3.0.0" strip-bom "^4.0.0" -jest-snapshot@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-29.7.0.tgz#c2c574c3f51865da1bb329036778a69bf88a6be5" - integrity sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw== - dependencies: - "@babel/core" "^7.11.6" - "@babel/generator" "^7.7.2" - "@babel/plugin-syntax-jsx" "^7.7.2" - "@babel/plugin-syntax-typescript" "^7.7.2" - "@babel/types" "^7.3.3" - "@jest/expect-utils" "^29.7.0" - "@jest/transform" "^29.7.0" - "@jest/types" "^29.6.3" - babel-preset-current-node-syntax "^1.0.0" - chalk "^4.0.0" - expect "^29.7.0" - graceful-fs "^4.2.9" - jest-diff "^29.7.0" - jest-get-type "^29.6.3" - jest-matcher-utils "^29.7.0" - jest-message-util "^29.7.0" - jest-util "^29.7.0" - natural-compare "^1.4.0" - pretty-format "^29.7.0" - semver "^7.5.3" - -jest-util@^29.0.0, jest-util@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-29.7.0.tgz#23c2b62bfb22be82b44de98055802ff3710fc0bc" - integrity sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA== - dependencies: - "@jest/types" "^29.6.3" +jest-snapshot@30.3.0: + version "30.3.0" + resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-30.3.0.tgz#6e7ea75069dda86e36311a0f73189e830d4f51ad" + integrity sha512-f14c7atpb4O2DeNhwcvS810Y63wEn8O1HqK/luJ4F6M4NjvxmAKQwBUWjbExUtMxWJQ0wVgmCKymeJK6NZMnfQ== + dependencies: + "@babel/core" "^7.27.4" + "@babel/generator" "^7.27.5" + "@babel/plugin-syntax-jsx" "^7.27.1" + "@babel/plugin-syntax-typescript" "^7.27.1" + "@babel/types" "^7.27.3" + "@jest/expect-utils" "30.3.0" + "@jest/get-type" "30.1.0" + "@jest/snapshot-utils" "30.3.0" + "@jest/transform" "30.3.0" + "@jest/types" "30.3.0" + babel-preset-current-node-syntax "^1.2.0" + chalk "^4.1.2" + expect "30.3.0" + graceful-fs "^4.2.11" + jest-diff "30.3.0" + jest-matcher-utils "30.3.0" + jest-message-util "30.3.0" + jest-util "30.3.0" + pretty-format "30.3.0" + semver "^7.7.2" + synckit "^0.11.8" + +jest-util@30.3.0: + version "30.3.0" + resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-30.3.0.tgz#95a4fbacf2dac20e768e2f1744b70519f2ba7980" + integrity sha512-/jZDa00a3Sz7rdyu55NLrQCIrbyIkbBxareejQI315f/i8HjYN+ZWsDLLpoQSiUIEIyZF/R8fDg3BmB8AtHttg== + dependencies: + "@jest/types" "30.3.0" "@types/node" "*" - chalk "^4.0.0" - ci-info "^3.2.0" - graceful-fs "^4.2.9" - picomatch "^2.2.3" - -jest-validate@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-29.7.0.tgz#7bf705511c64da591d46b15fce41400d52147d9c" - integrity sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw== - dependencies: - "@jest/types" "^29.6.3" - camelcase "^6.2.0" - chalk "^4.0.0" - jest-get-type "^29.6.3" + chalk "^4.1.2" + ci-info "^4.2.0" + graceful-fs "^4.2.11" + picomatch "^4.0.3" + +jest-validate@30.3.0: + version "30.3.0" + resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-30.3.0.tgz#215e11b8fcc5e2ca4b99ea5d730a5b4c969e4355" + integrity sha512-I/xzC8h5G+SHCb2P2gWkJYrNiTbeL47KvKeW5EzplkyxzBRBw1ssSHlI/jXec0ukH2q7x2zAWQm7015iusg62Q== + dependencies: + "@jest/get-type" "30.1.0" + "@jest/types" "30.3.0" + camelcase "^6.3.0" + chalk "^4.1.2" leven "^3.1.0" - pretty-format "^29.7.0" + pretty-format "30.3.0" -jest-watcher@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-29.7.0.tgz#7810d30d619c3a62093223ce6bb359ca1b28a2f2" - integrity sha512-49Fg7WXkU3Vl2h6LbLtMQ/HyB6rXSIX7SqvBLQmssRBGN9I0PNvPmAmCWSOY6SOvrjhI/F7/bGAv9RtnsPA03g== +jest-watcher@30.3.0: + version "30.3.0" + resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-30.3.0.tgz#3afa1af355b9fe80f0261eb8a23981a315858596" + integrity sha512-PJ1d9ThtTR8aMiBWUdcownq9mDdLXsQzJayTk4kmaBRHKvwNQn+ANveuhEBUyNI2hR1TVhvQ8D5kHubbzBHR/w== dependencies: - "@jest/test-result" "^29.7.0" - "@jest/types" "^29.6.3" + "@jest/test-result" "30.3.0" + "@jest/types" "30.3.0" "@types/node" "*" - ansi-escapes "^4.2.1" - chalk "^4.0.0" + ansi-escapes "^4.3.2" + chalk "^4.1.2" emittery "^0.13.1" - jest-util "^29.7.0" - string-length "^4.0.1" + jest-util "30.3.0" + string-length "^4.0.2" -jest-worker@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-29.7.0.tgz#acad073acbbaeb7262bd5389e1bcf43e10058d4a" - integrity sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw== +jest-worker@30.3.0: + version "30.3.0" + resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-30.3.0.tgz#ae4dc1f1d93d0cba1415624fcedaec40ea764f14" + integrity sha512-DrCKkaQwHexjRUFTmPzs7sHQe0TSj9nvDALKGdwmK5mW9v7j90BudWirKAJHt3QQ9Dhrg1F7DogPzhChppkJpQ== dependencies: "@types/node" "*" - jest-util "^29.7.0" + "@ungap/structured-clone" "^1.3.0" + jest-util "30.3.0" merge-stream "^2.0.0" - supports-color "^8.0.0" + supports-color "^8.1.1" -jest@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest/-/jest-29.7.0.tgz#994676fc24177f088f1c5e3737f5697204ff2613" - integrity sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw== +jest@^30.3.0: + version "30.3.0" + resolved "https://registry.yarnpkg.com/jest/-/jest-30.3.0.tgz#6460b889dd805e9677400505f16f1d9b14c285a3" + integrity sha512-AkXIIFcaazymvey2i/+F94XRnM6TsVLZDhBMLsd1Sf/W0wzsvvpjeyUrCZD6HGG4SDYPgDJDBKeiJTBb10WzMg== dependencies: - "@jest/core" "^29.7.0" - "@jest/types" "^29.6.3" - import-local "^3.0.2" - jest-cli "^29.7.0" + "@jest/core" "30.3.0" + "@jest/types" "30.3.0" + import-local "^3.2.0" + jest-cli "30.3.0" js-tokens@^4.0.0: version "4.0.0" @@ -2303,11 +2652,6 @@ kind-of@^6.0.3: resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== -kleur@^3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e" - integrity sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w== - leven@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/leven/-/leven-3.1.0.tgz#77891de834064cccba82ae7842bb6b14a13ed7f2" @@ -2378,6 +2722,11 @@ lru-cache@^10.2.0: resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-10.4.3.tgz#410fc8a17b70e598013df257c2446b7f3383f119" integrity sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ== +lru-cache@^11.0.0: + version "11.3.5" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-11.3.5.tgz#29047d348c0b2793e3112a01c739bb7c6d855637" + integrity sha512-NxVFwLAnrd9i7KUBxC4DrUhmgjzOs+1Qm50D3oF1/oL+r1NpZ4gA7xvG0/zJ8evR7zIKn4vLf7qTNduWFtCrRw== + lru-cache@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" @@ -2443,7 +2792,12 @@ merge-stream@^2.0.0: resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== -micromatch@^4.0.4: +merge2@^1.3.0: + version "1.4.1" + resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" + integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== + +micromatch@^4.0.8: version "4.0.8" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.8.tgz#d66fa18f3a47076789320b9b1af32bd86d9fa202" integrity sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA== @@ -2461,20 +2815,20 @@ min-indent@^1.0.0: resolved "https://registry.yarnpkg.com/min-indent/-/min-indent-1.0.1.tgz#a63f681673b30571fbe8bc25686ae746eefa9869" integrity sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg== -minimatch@^3.0.4, minimatch@^3.1.1, minimatch@^3.1.2: +minimatch@^10.2.2: + version "10.2.5" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-10.2.5.tgz#bd48687a0be38ed2961399105600f832095861d1" + integrity sha512-MULkVLfKGYDFYejP07QOurDLLQpcjk7Fw+7jXS2R2czRQzR56yHRveU5NDJEOviH+hETZKSkIk5c+T23GjFUMg== + dependencies: + brace-expansion "^5.0.5" + +minimatch@^3.0.4, minimatch@^3.1.1: version "3.1.2" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== dependencies: brace-expansion "^1.1.7" -minimatch@^5.0.1: - version "5.1.6" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.1.6.tgz#1cfcb8cf5522ea69952cd2af95ae09477f122a96" - integrity sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g== - dependencies: - brace-expansion "^2.0.1" - minimatch@^9.0.4: version "9.0.5" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.5.tgz#d74f9dd6b57d83d8e98cfb82133b03978bc929e5" @@ -2501,6 +2855,11 @@ minimist@^1.2.5, minimist@^1.2.6, minimist@^1.2.8: resolved "https://registry.yarnpkg.com/minipass/-/minipass-7.1.2.tgz#93a9626ce5e5e66bd4db86849e7515e92340a707" integrity sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw== +minipass@^7.1.3: + version "7.1.3" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-7.1.3.tgz#79389b4eb1bb2d003a9bba87d492f2bd37bdc65b" + integrity sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A== + modify-values@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/modify-values/-/modify-values-1.0.1.tgz#b3939fa605546474e3e3e3c63d64bd43b4ee6022" @@ -2511,6 +2870,11 @@ ms@^2.1.3: resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== +napi-postinstall@^0.3.0: + version "0.3.4" + resolved "https://registry.yarnpkg.com/napi-postinstall/-/napi-postinstall-0.3.4.tgz#7af256d6588b5f8e952b9190965d6b019653bbb9" + integrity sha512-PHI5f1O0EP5xJ9gQmFGMS6IZcrVvTjpXjz7Na41gTE7eE2hK11lg04CECCYEEjdc17EV4DO+fkGEtt7TpTaTiQ== + natural-compare@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" @@ -2636,7 +3000,7 @@ p-try@^2.0.0: resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== -package-json-from-dist@^1.0.0: +package-json-from-dist@^1.0.0, package-json-from-dist@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz#4f1471a010827a86f94cfd9b0727e36d267de505" integrity sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw== @@ -2692,6 +3056,14 @@ path-scurry@^1.11.1: lru-cache "^10.2.0" minipass "^5.0.0 || ^6.0.2 || ^7.0.0" +path-scurry@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/path-scurry/-/path-scurry-2.0.2.tgz#6be0d0ee02a10d9e0de7a98bae65e182c9061f85" + integrity sha512-3O/iVVsJAPsOnpwWIeD+d6z/7PmqApyQePUtCndjatj/9I5LylHvt5qluFaBT3I5h3r1ejfR056c+FCv+NnNXg== + dependencies: + lru-cache "^11.0.0" + minipass "^7.1.2" + path-type@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/path-type/-/path-type-3.0.0.tgz#cef31dc8e0a1a3bb0d105c0cd97cf3bf47f4e36f" @@ -2699,16 +3071,21 @@ path-type@^3.0.0: dependencies: pify "^3.0.0" -picocolors@^1.0.0, picocolors@^1.1.0: +picocolors@^1.0.0, picocolors@^1.1.0, picocolors@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.1.1.tgz#3d321af3eab939b083c8f929a1d12cda81c26b6b" integrity sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA== -picomatch@^2.0.4, picomatch@^2.2.3, picomatch@^2.3.1: +picomatch@^2.0.4, picomatch@^2.3.1: version "2.3.1" resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== +picomatch@^4.0.3: + version "4.0.4" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-4.0.4.tgz#fd6f5e00a143086e074dffe4c924b8fb293b0589" + integrity sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A== + pify@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" @@ -2719,10 +3096,10 @@ pify@^3.0.0: resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176" integrity sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg== -pirates@^4.0.4: - version "4.0.6" - resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.6.tgz#3018ae32ecfcff6c29ba2267cbf21166ac1f36b9" - integrity sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg== +pirates@^4.0.7: + version "4.0.7" + resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.7.tgz#643b4a18c4257c8a65104b73f3049ce9a0a15e22" + integrity sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA== pkg-dir@^4.2.0: version "4.2.0" @@ -2731,44 +3108,41 @@ pkg-dir@^4.2.0: dependencies: find-up "^4.0.0" -pretty-format@^29.0.0, pretty-format@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-29.7.0.tgz#ca42c758310f365bfa71a0bda0a807160b776812" - integrity sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ== +pretty-format@30.3.0, pretty-format@^30.0.0: + version "30.3.0" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-30.3.0.tgz#e977eed4bcd1b6195faed418af8eac68b9ea1f29" + integrity sha512-oG4T3wCbfeuvljnyAzhBvpN45E8iOTXCU/TD3zXW80HA3dQ4ahdqMkWGiPWZvjpQwlbyHrPTWUAqUzGzv4l1JQ== dependencies: - "@jest/schemas" "^29.6.3" - ansi-styles "^5.0.0" - react-is "^18.0.0" + "@jest/schemas" "30.0.5" + ansi-styles "^5.2.0" + react-is "^18.3.1" process-nextick-args@~2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== -prompts@^2.0.1: - version "2.4.2" - resolved "https://registry.yarnpkg.com/prompts/-/prompts-2.4.2.tgz#7b57e73b3a48029ad10ebd44f74b01722a4cb069" - integrity sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q== - dependencies: - kleur "^3.0.3" - sisteransi "^1.0.5" - -pure-rand@^6.0.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/pure-rand/-/pure-rand-6.1.0.tgz#d173cf23258231976ccbdb05247c9787957604f2" - integrity sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA== +pure-rand@^7.0.0: + version "7.0.1" + resolved "https://registry.yarnpkg.com/pure-rand/-/pure-rand-7.0.1.tgz#6f53a5a9e3e4a47445822af96821ca509ed37566" + integrity sha512-oTUZM/NAZS8p7ANR3SHh30kXB+zK2r2BPcEn/awJIbOvq82WoMN4p62AWWp3Hhw50G0xMsw1mhIBLqHw64EcNQ== q@^1.5.1: version "1.5.1" resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7" integrity sha512-kV/CThkXo6xyFEZUugw/+pIOywXcDbFYgSct5cT3gqlbkBE1SJdwy6UQoZvodiWF/ckQLZyDE/Bu1M6gVu5lVw== +queue-microtask@^1.2.2: + version "1.2.3" + resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" + integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== + quick-lru@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-4.0.1.tgz#5b8878f113a58217848c6482026c73e1ba57727f" integrity sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g== -react-is@^18.0.0: +react-is@^18.3.1: version "18.3.1" resolved "https://registry.yarnpkg.com/react-is/-/react-is-18.3.1.tgz#e83557dc12eae63a99e003a46388b1dcbb44db7e" integrity sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg== @@ -2831,13 +3205,6 @@ readable-stream@~2.3.6: string_decoder "~1.1.1" util-deprecate "~1.0.1" -rechoir@^0.6.2: - version "0.6.2" - resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384" - integrity sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw== - dependencies: - resolve "^1.1.6" - redent@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/redent/-/redent-3.0.0.tgz#e557b7998316bb53c9f1f56fa626352c6963059f" @@ -2863,12 +3230,7 @@ resolve-from@^5.0.0: resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69" integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== -resolve.exports@^2.0.0: - version "2.0.3" - resolved "https://registry.yarnpkg.com/resolve.exports/-/resolve.exports-2.0.3.tgz#41955e6f1b4013b7586f873749a635dea07ebe3f" - integrity sha512-OcXjMsGdhL4XnbShKpAcSqPMzQoYkYyhbEaeSko47MjRP9NfEQMhZkXL1DoFlt9LWQn4YttrdnV6X2OiyzBi+A== - -resolve@^1.1.6, resolve@^1.10.0, resolve@^1.20.0, resolve@^1.22.2: +resolve@^1.10.0, resolve@^1.22.2: version "1.22.8" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.8.tgz#b6c87a9f2aa06dfab52e3d70ac8cde321fa5a48d" integrity sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw== @@ -2877,12 +3239,35 @@ resolve@^1.1.6, resolve@^1.10.0, resolve@^1.20.0, resolve@^1.22.2: path-parse "^1.0.7" supports-preserve-symlinks-flag "^1.0.0" -rimraf@^5.0.7: - version "5.0.10" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-5.0.10.tgz#23b9843d3dc92db71f96e1a2ce92e39fd2a8221c" - integrity sha512-l0OE8wL34P4nJH/H2ffoaniAokM2qSmrtXHmlpvYr5AVVX8msAyW0l8NVJFDxlSK4u3Uh/f41cQheDVdnYijwQ== +resolve@^1.22.12: + version "1.22.12" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.12.tgz#f5b2a680897c69c238a13cd16b15671f8b73549f" + integrity sha512-TyeJ1zif53BPfHootBGwPRYT1RUt6oGWsaQr8UyZW/eAm9bKoijtvruSDEmZHm92CwS9nj7/fWttqPCgzep8CA== + dependencies: + es-errors "^1.3.0" + is-core-module "^2.16.1" + path-parse "^1.0.7" + supports-preserve-symlinks-flag "^1.0.0" + +reusify@^1.0.4: + version "1.1.0" + resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.1.0.tgz#0fe13b9522e1473f51b558ee796e08f11f9b489f" + integrity sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw== + +rimraf@^6.1.3: + version "6.1.3" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-6.1.3.tgz#afbee236b3bd2be331d4e7ce4493bac1718981af" + integrity sha512-LKg+Cr2ZF61fkcaK1UdkH2yEBBKnYjTyWzTJT6KNPcSPaiT7HSdhtMXQuN5wkTX0Xu72KQ1l8S42rlmexS2hSA== + dependencies: + glob "^13.0.3" + package-json-from-dist "^1.0.1" + +run-parallel@^1.1.9: + version "1.2.0" + resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" + integrity sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA== dependencies: - glob "^10.3.7" + queue-microtask "^1.2.2" safe-buffer@~5.1.0, safe-buffer@~5.1.1: version "5.1.2" @@ -2899,7 +3284,7 @@ safe-buffer@~5.2.0: resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.2.tgz#48d55db737c3287cd4835e17fa13feace1c41ef8" integrity sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g== -semver@^6.0.0, semver@^6.3.0, semver@^6.3.1: +semver@^6.0.0, semver@^6.3.1: version "6.3.1" resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== @@ -2909,6 +3294,11 @@ semver@^7.1.1, semver@^7.3.4, semver@^7.5.3, semver@^7.5.4, semver@^7.6.3: resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.3.tgz#980f7b5550bc175fb4dc09403085627f9eb33143" integrity sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A== +semver@^7.7.2, semver@^7.7.4: + version "7.7.4" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.7.4.tgz#28464e36060e991fa7a11d0279d2d3f3b57a7e8a" + integrity sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA== + shebang-command@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" @@ -2921,16 +3311,15 @@ shebang-regex@^3.0.0: resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== -shelljs@^0.8.5: - version "0.8.5" - resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.8.5.tgz#de055408d8361bed66c669d2f000538ced8ee20c" - integrity sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow== +shelljs@^0.10.0: + version "0.10.0" + resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.10.0.tgz#e3bbae99b0f3f0cc5dce05b46a346fae2090e883" + integrity sha512-Jex+xw5Mg2qMZL3qnzXIfaxEtBaC4n7xifqaqtrZDdlheR70OGkydrPJWT0V1cA1k3nanC86x9FwAmQl6w3Klw== dependencies: - glob "^7.0.0" - interpret "^1.0.0" - rechoir "^0.6.2" + execa "^5.1.1" + fast-glob "^3.3.2" -signal-exit@^3.0.3, signal-exit@^3.0.7: +signal-exit@^3.0.3: version "3.0.7" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== @@ -2940,11 +3329,6 @@ signal-exit@^4.0.1: resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-4.1.0.tgz#952188c1cbd546070e2dd20d0f41c0ae0530cb04" integrity sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw== -sisteransi@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-1.0.5.tgz#134d681297756437cc05ca01370d3a7a571075ed" - integrity sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg== - slash@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" @@ -3008,7 +3392,7 @@ sprintf-js@~1.0.2: resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" integrity sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g== -stack-utils@^2.0.3: +stack-utils@^2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-2.0.6.tgz#aaf0748169c02fc33c8232abccf933f54a1cc34f" integrity sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ== @@ -3035,7 +3419,7 @@ standard-version@^9.5.0: stringify-package "^1.0.1" yargs "^16.0.0" -string-length@^4.0.1: +string-length@^4.0.2: version "4.0.2" resolved "https://registry.yarnpkg.com/string-length/-/string-length-4.0.2.tgz#a8a8dc7bd5c1a82b9b3c8b87e125f66871b6e57a" integrity sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ== @@ -3151,7 +3535,7 @@ supports-color@^7.1.0: dependencies: has-flag "^4.0.0" -supports-color@^8.0.0: +supports-color@^8.1.1: version "8.1.1" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== @@ -3163,6 +3547,13 @@ supports-preserve-symlinks-flag@^1.0.0: resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== +synckit@^0.11.8: + version "0.11.12" + resolved "https://registry.yarnpkg.com/synckit/-/synckit-0.11.12.tgz#abe74124264fbc00a48011b0d98bdc1cffb64a7b" + integrity sha512-Bh7QjT8/SuKUIfObSXNHNSK6WHo6J1tHCqJsuaFDP7gP0fkzSfTxI8y85JrppZ0h8l0maIgc2tfuZQ6/t3GtnQ== + dependencies: + "@pkgr/core" "^0.2.9" + test-exclude@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-6.0.0.tgz#04a8698661d805ea6fa293b6cb9e63ac044ef15e" @@ -3214,30 +3605,30 @@ trim-newlines@^3.0.0: resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-3.0.1.tgz#260a5d962d8b752425b32f3a7db0dcacd176c144" integrity sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw== -"ts-expose-internals@npm:ts-expose-internals@5.4.5": - version "5.4.5" - resolved "https://registry.yarnpkg.com/ts-expose-internals/-/ts-expose-internals-5.4.5.tgz#94da2b665627135ad1281d98af3ccb08cb4c1950" - integrity sha512-0HfRwjgSIOyuDlHzkFedMWU4aHWq9pu4MUKHgH75U+L76wCAtK5WB0rc/dAIhulMRcPUlcKONeiiR5Sxy/7XcA== +"ts-expose-internals@npm:ts-expose-internals@5.6.3": + version "5.6.3" + resolved "https://registry.yarnpkg.com/ts-expose-internals/-/ts-expose-internals-5.6.3.tgz#d7ed7ca8bd6ff28460adb7120b8331e7d6dfeeae" + integrity sha512-reb+7TXGaC0odGjywnLocM4f2i8mBhSEjc3gnKqdM21wDy8FcGGVjKbtMNjn17hka34CrwvqNREs0R7CGIeH3w== -ts-jest@^29.1.1: - version "29.2.5" - resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-29.2.5.tgz#591a3c108e1f5ebd013d3152142cb5472b399d63" - integrity sha512-KD8zB2aAZrcKIdGk4OwpJggeLcH1FgrICqDSROWqlnJXGCXK4Mn6FcdK2B6670Xr73lHMG1kHw8R87A0ecZ+vA== +ts-jest@^29.4.9: + version "29.4.9" + resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-29.4.9.tgz#47dc33d0f5c36bddcedd16afefae285e0b049d2d" + integrity sha512-LTb9496gYPMCqjeDLdPrKuXtncudeV1yRZnF4Wo5l3SFi0RYEnYRNgMrFIdg+FHvfzjCyQk1cLncWVqiSX+EvQ== dependencies: bs-logger "^0.2.6" - ejs "^3.1.10" fast-json-stable-stringify "^2.1.0" - jest-util "^29.0.0" + handlebars "^4.7.9" json5 "^2.2.3" lodash.memoize "^4.1.2" make-error "^1.3.6" - semver "^7.6.3" + semver "^7.7.4" + type-fest "^4.41.0" yargs-parser "^21.1.1" -"ts-next@npm:typescript@beta": - version "5.7.0-beta" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.7.0-beta.tgz#aa00db901d281b09d9456e6a281d8df4a2de77ab" - integrity sha512-opDlmEnzKdl082N5piLS43lsyugg0aORdv+XnNzMv5yP5VtBWuZhFDxU8lizmhW+PEFa/fZiShYRBxKsrkTDMQ== +"ts-next@npm:typescript@6.0.3": + version "6.0.3" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-6.0.3.tgz#90251dc007916e972786cb94d74d15b185577d21" + integrity sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw== ts-node@^10.9.1: version "10.9.2" @@ -3279,6 +3670,11 @@ tsconfig-paths@^4.2.0: minimist "^1.2.6" strip-bom "^3.0.0" +tslib@^2.4.0: + version "2.8.1" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.8.1.tgz#612efe4ed235d567e8aba5f2a5fab70280ade83f" + integrity sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w== + type-detect@4.0.8: version "4.0.8" resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" @@ -3304,15 +3700,20 @@ type-fest@^0.8.1: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.8.1.tgz#09e249ebde851d3b1e48d27c105444667f17b83d" integrity sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA== +type-fest@^4.41.0: + version "4.41.0" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-4.41.0.tgz#6ae1c8e5731273c2bf1f58ad39cbae2c91a46c58" + integrity sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA== + typedarray@^0.0.6: version "0.0.6" resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA== -typescript@5.7.2: - version "5.7.2" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.7.2.tgz#3169cf8c4c8a828cde53ba9ecb3d2b1d5dd67be6" - integrity sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg== +typescript@6.0.3: + version "6.0.3" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-6.0.3.tgz#90251dc007916e972786cb94d74d15b185577d21" + integrity sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw== uglify-js@^3.1.4: version "3.19.3" @@ -3324,6 +3725,38 @@ undici-types@~6.20.0: resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.20.0.tgz#8171bf22c1f588d1554d55bf204bc624af388433" integrity sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg== +undici-types@~7.19.0: + version "7.19.2" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-7.19.2.tgz#1b67fc26d0f157a0cba3a58a5b5c1e2276b8ba2a" + integrity sha512-qYVnV5OEm2AW8cJMCpdV20CDyaN3g0AjDlOGf1OW4iaDEx8MwdtChUp4zu4H0VP3nDRF/8RKWH+IPp9uW0YGZg== + +unrs-resolver@^1.7.11: + version "1.11.1" + resolved "https://registry.yarnpkg.com/unrs-resolver/-/unrs-resolver-1.11.1.tgz#be9cd8686c99ef53ecb96df2a473c64d304048a9" + integrity sha512-bSjt9pjaEBnNiGgc9rUiHGKv5l4/TGzDmYw3RhnkJGtLhbnnA/5qJj7x3dNDCRx/PJxu774LlH8lCOlB4hEfKg== + dependencies: + napi-postinstall "^0.3.0" + optionalDependencies: + "@unrs/resolver-binding-android-arm-eabi" "1.11.1" + "@unrs/resolver-binding-android-arm64" "1.11.1" + "@unrs/resolver-binding-darwin-arm64" "1.11.1" + "@unrs/resolver-binding-darwin-x64" "1.11.1" + "@unrs/resolver-binding-freebsd-x64" "1.11.1" + "@unrs/resolver-binding-linux-arm-gnueabihf" "1.11.1" + "@unrs/resolver-binding-linux-arm-musleabihf" "1.11.1" + "@unrs/resolver-binding-linux-arm64-gnu" "1.11.1" + "@unrs/resolver-binding-linux-arm64-musl" "1.11.1" + "@unrs/resolver-binding-linux-ppc64-gnu" "1.11.1" + "@unrs/resolver-binding-linux-riscv64-gnu" "1.11.1" + "@unrs/resolver-binding-linux-riscv64-musl" "1.11.1" + "@unrs/resolver-binding-linux-s390x-gnu" "1.11.1" + "@unrs/resolver-binding-linux-x64-gnu" "1.11.1" + "@unrs/resolver-binding-linux-x64-musl" "1.11.1" + "@unrs/resolver-binding-wasm32-wasi" "1.11.1" + "@unrs/resolver-binding-win32-arm64-msvc" "1.11.1" + "@unrs/resolver-binding-win32-ia32-msvc" "1.11.1" + "@unrs/resolver-binding-win32-x64-msvc" "1.11.1" + update-browserslist-db@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.1.1.tgz#80846fba1d79e82547fb661f8d141e0945755fe5" @@ -3417,13 +3850,13 @@ wrappy@1: resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== -write-file-atomic@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-4.0.2.tgz#a9df01ae5b77858a027fd2e80768ee433555fcfd" - integrity sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg== +write-file-atomic@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-5.0.1.tgz#68df4717c55c6fa4281a7860b4c2ba0a6d2b11e7" + integrity sha512-+QU2zd6OTD8XWIJCbffaiQeH9U73qIqafo1x6V1snCWYGJf6cVE0cDR4D8xRzcEnfI21IFrUPzPGtcPf8AC+Rw== dependencies: imurmurhash "^0.1.4" - signal-exit "^3.0.7" + signal-exit "^4.0.1" xtend@~4.0.1: version "4.0.2" @@ -3468,7 +3901,7 @@ yargs@^16.0.0, yargs@^16.2.0: y18n "^5.0.5" yargs-parser "^20.2.2" -yargs@^17.3.1: +yargs@^17.7.2: version "17.7.2" resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.7.2.tgz#991df39aca675a192b816e1e0363f9d75d2aa269" integrity sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==