diff --git a/config/plugins/esbuild/graphQLImportPlugin.ts b/config/plugins/esbuild/graphQLImportPlugin.ts deleted file mode 100644 index f5f592454..000000000 --- a/config/plugins/esbuild/graphQLImportPlugin.ts +++ /dev/null @@ -1,34 +0,0 @@ -import fs from 'node:fs' -import type { Plugin } from 'esbuild' - -/** - * A plugin to replace `require('graphql')` statements with `await import('graphql')` - * only for ESM bundles. This makes the GraphQL module to be imported lazily - * while maintaining the CommonJS compatibility. - * @see https://github.com/mswjs/msw/issues/2254 - */ -export function graphqlImportPlugin(): Plugin { - return { - name: 'graphql-import-plugin', - setup(build) { - if (build.initialOptions.format !== 'esm') { - return - } - - build.onLoad({ filter: /\.ts$/ }, async (args) => { - const contents = await fs.promises.readFile(args.path, 'utf-8') - const match = /require\(['"]graphql['"]\)/g.exec(contents) - - if (match) { - return { - loader: 'ts', - contents: - contents.slice(0, match.index - 1) + - `await import('graphql').catch((error) => {console.error('[MSW] Failed to parse a GraphQL query: cannot import the "graphql" module. Please make sure you install it if you wish to intercept GraphQL requests. See the original import error below.'); throw error})` + - contents.slice(match.index + match[0].length), - } - } - }) - }, - } -} diff --git a/config/plugins/esbuild/resolveCoreImportsPlugin.ts b/config/plugins/esbuild/resolveCoreImportsPlugin.ts deleted file mode 100644 index 027dfd303..000000000 --- a/config/plugins/esbuild/resolveCoreImportsPlugin.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { Plugin } from 'esbuild' -import { replaceCoreImports } from '../../replaceCoreImports.js' -import { ESM_EXTENSION } from './forceEsmExtensionsPlugin.js' - -export function resolveCoreImportsPlugin(): Plugin { - return { - name: 'resolveCoreImportsPlugin', - setup(build) { - build.onEnd(async (result) => { - if (result.errors.length > 0) { - return - } - - for (const outputFile of result.outputFiles || []) { - const isEsm = outputFile.path.endsWith(ESM_EXTENSION) - const fileContents = outputFile.text - const nextFileContents = replaceCoreImports( - outputFile.path, - fileContents, - isEsm, - ) - - outputFile.contents = Buffer.from(nextFileContents) - } - }) - }, - } -} diff --git a/config/plugins/esbuild/copyWorkerPlugin.ts b/config/plugins/rolldown/copyWorkerPlugin.ts similarity index 51% rename from config/plugins/esbuild/copyWorkerPlugin.ts rename to config/plugins/rolldown/copyWorkerPlugin.ts index 9b4020709..8fa98ed5a 100644 --- a/config/plugins/esbuild/copyWorkerPlugin.ts +++ b/config/plugins/rolldown/copyWorkerPlugin.ts @@ -3,8 +3,8 @@ import path from 'node:path' import crypto from 'crypto' import minify from 'babel-minify' import { invariant } from 'outvariant' -import type { Plugin } from 'esbuild' -import copyServiceWorker from '../../copyServiceWorker.js' +import type { TsdownPlugin } from 'tsdown' +import copyServiceWorker from '../../copyServiceWorker.ts' const SERVICE_WORKER_ENTRY_PATH = path.resolve( process.cwd(), @@ -27,15 +27,16 @@ export function getWorkerChecksum(): string { return getChecksum(workerContents) } -export function copyWorkerPlugin(checksum: string): Plugin { +export function copyWorkerPlugin(checksum: string): TsdownPlugin { return { name: 'copyWorkerPlugin', - async setup(build) { + async buildStart() { invariant( SERVICE_WORKER_ENTRY_PATH, 'Failed to locate the worker script source file', ) - + }, + async writeBundle() { if (fs.existsSync(SERVICE_WORKER_OUTPUT_PATH)) { console.warn( 'Skipped copying the worker script to "%s": already exists', @@ -44,31 +45,14 @@ export function copyWorkerPlugin(checksum: string): Plugin { return } - // Generate the checksum from the worker script's contents. - // const workerContents = await fs.readFile(workerSourcePath, 'utf8') - // const checksum = getChecksum(workerContents) - - build.onLoad({ filter: /mockServiceWorker\.js$/ }, async () => { - return { - // Prevent the worker script from being transpiled. - // But, generally, the worker script is not in the entrypoints. - contents: '', - } - }) + // eslint-disable-next-line no-console + console.log('worker script checksum:', checksum) - build.onEnd(() => { - // eslint-disable-next-line no-console - console.log('worker script checksum:', checksum) - - // Copy the worker script on the next tick. - process.nextTick(async () => { - await copyServiceWorker( - SERVICE_WORKER_ENTRY_PATH, - SERVICE_WORKER_OUTPUT_PATH, - checksum, - ) - }) - }) + await copyServiceWorker( + SERVICE_WORKER_ENTRY_PATH, + SERVICE_WORKER_OUTPUT_PATH, + checksum, + ) }, } } diff --git a/config/plugins/esbuild/forceEsmExtensionsPlugin.ts b/config/plugins/rolldown/forceFileExtensionsPlugin.ts similarity index 55% rename from config/plugins/esbuild/forceEsmExtensionsPlugin.ts rename to config/plugins/rolldown/forceFileExtensionsPlugin.ts index 856ce3a9e..bf8ac2a27 100644 --- a/config/plugins/esbuild/forceEsmExtensionsPlugin.ts +++ b/config/plugins/rolldown/forceFileExtensionsPlugin.ts @@ -1,37 +1,24 @@ -import { type Plugin } from 'esbuild' +import type { TsdownPlugin } from 'tsdown' export const ESM_EXTENSION = '.mjs' export const CJS_EXTENSION = '.js' -export function forceEsmExtensionsPlugin(): Plugin { +export function forceFileExtensionsPlugin(): TsdownPlugin { return { - name: 'forceEsmExtensionsPlugin', - setup(build) { - const isEsm = build.initialOptions.format === 'esm' - - build.onEnd(async (result) => { - if (result.errors.length > 0) { - return - } - - for (const outputFile of result.outputFiles || []) { - // Only target CJS/ESM files. - // This ignores additional files emitted, like sourcemaps ("*.js.map"). - if ( - !( - outputFile.path.endsWith(ESM_EXTENSION) || - outputFile.path.endsWith('.mjs') - ) - ) { - continue - } - - const fileContents = outputFile.text - const nextFileContents = modifyRelativeImports(fileContents, isEsm) + name: 'forceFileExtensionsPlugin', + renderChunk(code, chunk, outputOptions) { + const isEsm = + outputOptions.format === 'es' || + chunk.fileName.endsWith(ESM_EXTENSION) + + if (!isEsm) { + return + } - outputFile.contents = Buffer.from(nextFileContents) - } - }) + return { + code: modifyRelativeImports(code, isEsm), + map: null, + } }, } } diff --git a/config/plugins/rolldown/graphQLImportPlugin.ts b/config/plugins/rolldown/graphQLImportPlugin.ts new file mode 100644 index 000000000..5caee1f6d --- /dev/null +++ b/config/plugins/rolldown/graphQLImportPlugin.ts @@ -0,0 +1,26 @@ +import type { TsdownPlugin } from 'tsdown' + +/** + * A plugin to replace `require('graphql')` statements with `await import('graphql')` + * only for ESM bundles. This makes the GraphQL module to be imported lazily + * while maintaining the CommonJS compatibility. + * @see https://github.com/mswjs/msw/issues/2254 + */ +export function graphqlImportPlugin(): TsdownPlugin { + return { + name: 'graphql-import-plugin', + transform(code, id) { + if (!id.endsWith('.ts') || !code.includes(`require('graphql')`)) { + return + } + + return { + code: code.replace( + /require\(['"]graphql['"]\)/g, + `await import('graphql').catch((error) => {console.error('[MSW] Failed to parse a GraphQL query: cannot import the "graphql" module. Please make sure you install it if you wish to intercept GraphQL requests. See the original import error below.'); throw error})`, + ), + map: null, + } + }, + } +} diff --git a/config/plugins/rolldown/resolveCoreImportsPlugin.ts b/config/plugins/rolldown/resolveCoreImportsPlugin.ts new file mode 100644 index 000000000..93f9250bd --- /dev/null +++ b/config/plugins/rolldown/resolveCoreImportsPlugin.ts @@ -0,0 +1,19 @@ +import path from 'node:path' +import type { TsdownPlugin } from 'tsdown' +import { replaceCoreImports } from '../../replaceCoreImports.js' +import { ESM_EXTENSION } from './forceFileExtensionsPlugin.ts' + +export function resolveCoreImportsPlugin(): TsdownPlugin { + return { + name: 'resolveCoreImportsPlugin', + renderChunk(code, chunk, outputOptions) { + const isEsm = chunk.fileName.endsWith(ESM_EXTENSION) + const moduleFilePath = path.resolve(outputOptions.dir!, chunk.fileName) + + return { + code: replaceCoreImports(moduleFilePath, code, isEsm), + map: null, + } + }, + } +} diff --git a/package.json b/package.json index 6d34a87f9..e7ae2e4b7 100644 --- a/package.json +++ b/package.json @@ -177,10 +177,10 @@ "node": ">=22" }, "scripts": { - "start": "tsup --watch", + "start": "tsdown --watch", "clean": "rimraf ./lib", "lint": "oxlint ./cli ./src ./test", - "build": "pnpm clean && cross-env NODE_ENV=production tsup && pnpm patch:dts", + "build": "pnpm clean && cross-env NODE_ENV=production tsdown && pnpm patch:dts", "patch:dts": "node \"./config/scripts/patch-ts.js\"", "publint": "publint", "test": "pnpm test:unit && pnpm test:node && pnpm test:browser && pnpm test:native && pnpm test:memory", @@ -303,7 +303,7 @@ "regenerator-runtime": "^0.14.1", "rimraf": "^6.1.3", "simple-git-hooks": "^2.13.1", - "tsup": "^8.5.1", + "tsdown": "^0.22.3", "typescript": "^5.9.3", "undici": "^8.7.0", "url-loader": "^4.1.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 69d312b7b..1c418345a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -125,7 +125,7 @@ importers: version: 0.28.1 esbuild-loader: specifier: ^4.4.3 - version: 4.5.0(webpack@5.108.4(esbuild@0.28.1)(postcss@8.5.16)) + version: 4.5.0(webpack@5.108.4(esbuild@0.28.1)) express: specifier: ^5.2.1 version: 5.2.1 @@ -158,7 +158,7 @@ importers: version: 1.73.0 page-with: specifier: ^0.6.1 - version: 0.6.1(esbuild@0.28.1)(postcss@8.5.16) + version: 0.6.1(esbuild@0.28.1) prettier: specifier: ^3.8.3 version: 3.9.4 @@ -174,9 +174,9 @@ importers: simple-git-hooks: specifier: ^2.13.1 version: 2.13.1 - tsup: - specifier: ^8.5.1 - version: 8.5.1(jiti@2.7.0)(postcss@8.5.16)(typescript@5.9.3)(yaml@2.9.0) + tsdown: + specifier: ^0.22.3 + version: 0.22.3(oxc-resolver@11.21.3)(publint@0.3.21)(typescript@5.9.3) typescript: specifier: ^5.9.3 version: 5.9.3 @@ -185,16 +185,16 @@ importers: version: 8.7.0 url-loader: specifier: ^4.1.1 - version: 4.1.1(webpack@5.108.4(esbuild@0.28.1)(postcss@8.5.16)) + version: 4.1.1(webpack@5.108.4(esbuild@0.28.1)) vitest: specifier: ^4.1.4 version: 4.1.10(@types/node@22.19.21)(jsdom@25.0.1)(msw@)(vite@8.1.3(@types/node@22.19.21)(esbuild@0.28.1)(jiti@2.7.0)(terser@5.48.0)(yaml@2.9.0)) webpack: specifier: ^5.106.2 - version: 5.108.4(esbuild@0.28.1)(postcss@8.5.16) + version: 5.108.4(esbuild@0.28.1) webpack-http-server: specifier: ^0.5.0 - version: 0.5.0(esbuild@0.28.1)(postcss@8.5.16) + version: 0.5.0(esbuild@0.28.1) packages: @@ -217,6 +217,10 @@ packages: resolution: {integrity: sha512-DkXD5OJQaAQIdZ1bt3UZdEnHAn9Imd3IVBdX03UFe+ony9Ojw5pzr9YVKGDY1jt+Gcn/FnGkNf8r+Vj5NOJWtQ==} engines: {node: '>=6.9.0'} + '@babel/generator@8.0.0': + resolution: {integrity: sha512-NT9NrVwJsbSV6Y2FSstWa71EETOnzrjkL5/wX3D2mYHtKM+qvqB1DvR4D0Setb/gDBsHzRICifwEWMO8CnTF6g==} + engines: {node: ^22.18.0 || >=24.11.0} + '@babel/helper-compilation-targets@7.29.7': resolution: {integrity: sha512-wem6WaBj4NaVYVdNhLPPVacES6ZJ+KBBfSkTMD3YZxbP3rm3Di85tJU5ljaUNhaOynt+Aj0xruhYuzQBt8n71g==} engines: {node: '>=6.9.0'} @@ -239,10 +243,18 @@ packages: resolution: {integrity: sha512-Pb5ijPrZ89GDH8223L4UP8i6QApWxs04RbPQJTeWDV0/keR2E36MeKnyr6LYmUUvqRRI+Iv87SuF1W6ErINzYw==} engines: {node: '>=6.9.0'} + '@babel/helper-string-parser@8.0.0': + resolution: {integrity: sha512-6mJgmFFFIIO82vvoLt9XtRC7/TkzXfts1t/SpRX4IHSzMgqoPYCWesVu1udUPUWioAE/2fcG6WuI8zrkE1gwrg==} + engines: {node: ^22.18.0 || >=24.11.0} + '@babel/helper-validator-identifier@7.29.7': resolution: {integrity: sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg==} engines: {node: '>=6.9.0'} + '@babel/helper-validator-identifier@8.0.2': + resolution: {integrity: sha512-9Fr9QeyCAyi1BR1jKZ6uYQ24EIhQUx5ReHfQU7drOE+TPOb+w11/dsqLkMOT2U29OdCT71XajrOT8xDc1C7orA==} + engines: {node: ^22.18.0 || >=24.11.0} + '@babel/helper-validator-option@7.29.7': resolution: {integrity: sha512-N9ZErrD+yW5geCDtBqnOoxmR8+tNKiGuxKlDpuJxfsqpa2dFcexaziGAE/qoHLiDDreVNMupxGmSoNlyvsA3gw==} engines: {node: '>=6.9.0'} @@ -256,6 +268,11 @@ packages: engines: {node: '>=6.0.0'} hasBin: true + '@babel/parser@8.0.0': + resolution: {integrity: sha512-aLxAE+imI9bCcyaPrUDjBv3uSkWieifjLe0kuFOZF0zli0L6GCsTmsePnTr55adbIAgYz2zhN1vnFimCBUYcRQ==} + engines: {node: ^22.18.0 || >=24.11.0} + hasBin: true + '@babel/template@7.29.7': resolution: {integrity: sha512-puq+Gf35oI24FeN11LkoUQFqv9uwNeWpxXZi/Ji3rRIoKAzKnxRaZ+Gkj0vKS9ZCiTESfng1N9LyOyXvo+m+Gg==} engines: {node: '>=6.9.0'} @@ -268,6 +285,10 @@ packages: resolution: {integrity: sha512-4zBIxpPzowiZpusoFkyGVwakdRJUyuH5PxQ/PrqghfdFWWasvnCdPfQXHrenDai+gyLARulZjZowCOj6fjT4pA==} engines: {node: '>=6.9.0'} + '@babel/types@8.0.0': + resolution: {integrity: sha512-K8ponJDxBwDHigkeFqaqT5wLGl4bTlwMafR8k7b5CPxr6Ww+UG9ls8Yx6Tcpboxu97eeGVEEyKcHmEyOwN1vSw==} + engines: {node: ^22.18.0 || >=24.11.0} + '@commitlint/cli@20.5.3': resolution: {integrity: sha512-OJdL0EXWD5y9LPa0nr/geOwzaS8BsdaybKkcloB0JgsguGxNv2R+hC2FTPqrAcprg35zF33KOQerY0x8W1aesA==} engines: {node: '>=v18'} @@ -419,312 +440,156 @@ packages: resolution: {integrity: sha512-n6+dZKI2I3J8f3vjIFAYh5trgAJl0crji76+K1aoiRJqEYjdsCX/nVgBrkBCwPpBqhv9NZ1XlMqzfOafkqY5EQ==} engines: {node: '>=20'} - '@esbuild/aix-ppc64@0.27.7': - resolution: {integrity: sha512-EKX3Qwmhz1eMdEJokhALr0YiD0lhQNwDqkPYyPhiSwKrh7/4KRjQc04sZ8db+5DVVnZ1LmbNDI1uAMPEUBnQPg==} - engines: {node: '>=18'} - cpu: [ppc64] - os: [aix] - '@esbuild/aix-ppc64@0.28.1': resolution: {integrity: sha512-Svl7tq8k/08+p6CXPpRjQ1fKX+1odH/BQbb48fV6fj3CWHhsoIOoY87w1oHXm0qEpkIK3ZfVgp0hed3XBXzXMQ==} engines: {node: '>=18'} cpu: [ppc64] os: [aix] - '@esbuild/android-arm64@0.27.7': - resolution: {integrity: sha512-62dPZHpIXzvChfvfLJow3q5dDtiNMkwiRzPylSCfriLvZeq0a1bWChrGx/BbUbPwOrsWKMn8idSllklzBy+dgQ==} - engines: {node: '>=18'} - cpu: [arm64] - os: [android] - '@esbuild/android-arm64@0.28.1': resolution: {integrity: sha512-34EGEbCIAgosYz6goLcopX6Mo7NyGv9tfwEM2/7Ce2VcVRk568iSvniGWcUXIy7wEDR1wzolcxcriFVrWYcwBg==} engines: {node: '>=18'} cpu: [arm64] os: [android] - '@esbuild/android-arm@0.27.7': - resolution: {integrity: sha512-jbPXvB4Yj2yBV7HUfE2KHe4GJX51QplCN1pGbYjvsyCZbQmies29EoJbkEc+vYuU5o45AfQn37vZlyXy4YJ8RQ==} - engines: {node: '>=18'} - cpu: [arm] - os: [android] - '@esbuild/android-arm@0.28.1': resolution: {integrity: sha512-0k2F129Xdio1TdJfzJ8sy1Q47vUD2NnwdhiAf7drUN1EBTfPf4hsFCtmMgu/6m8JSzsBrlmVjudMBQqOfG8usQ==} engines: {node: '>=18'} cpu: [arm] os: [android] - '@esbuild/android-x64@0.27.7': - resolution: {integrity: sha512-x5VpMODneVDb70PYV2VQOmIUUiBtY3D3mPBG8NxVk5CogneYhkR7MmM3yR/uMdITLrC1ml/NV1rj4bMJuy9MCg==} - engines: {node: '>=18'} - cpu: [x64] - os: [android] - '@esbuild/android-x64@0.28.1': resolution: {integrity: sha512-dbwY7ltSMDWsRatcRpCnES4F+im88OCUgGZjy52shC7GqHRE/cYlxNbB4Z4UpJswpcc4Qxd2oE/ufM0p61IKng==} engines: {node: '>=18'} cpu: [x64] os: [android] - '@esbuild/darwin-arm64@0.27.7': - resolution: {integrity: sha512-5lckdqeuBPlKUwvoCXIgI2D9/ABmPq3Rdp7IfL70393YgaASt7tbju3Ac+ePVi3KDH6N2RqePfHnXkaDtY9fkw==} - engines: {node: '>=18'} - cpu: [arm64] - os: [darwin] - '@esbuild/darwin-arm64@0.28.1': resolution: {integrity: sha512-TZbWkQY7kvTAXbXUT7uVACR5cMHsDiSz9z7ZKAX/RTq/WJEk3QyRr0wZpNhBDX+/0CtdqUIJlOiodQcta6tY3Q==} engines: {node: '>=18'} cpu: [arm64] os: [darwin] - '@esbuild/darwin-x64@0.27.7': - resolution: {integrity: sha512-rYnXrKcXuT7Z+WL5K980jVFdvVKhCHhUwid+dDYQpH+qu+TefcomiMAJpIiC2EM3Rjtq0sO3StMV/+3w3MyyqQ==} - engines: {node: '>=18'} - cpu: [x64] - os: [darwin] - '@esbuild/darwin-x64@0.28.1': resolution: {integrity: sha512-zfdzgK9ACBNZLI/CyHTOx81SyNbM6YXn7rxSgX97VjyiPl9W1i4Ka4fgKECEoFCKGpvBj5qArWIGgQjOwkgskQ==} engines: {node: '>=18'} cpu: [x64] os: [darwin] - '@esbuild/freebsd-arm64@0.27.7': - resolution: {integrity: sha512-B48PqeCsEgOtzME2GbNM2roU29AMTuOIN91dsMO30t+Ydis3z/3Ngoj5hhnsOSSwNzS+6JppqWsuhTp6E82l2w==} - engines: {node: '>=18'} - cpu: [arm64] - os: [freebsd] - '@esbuild/freebsd-arm64@0.28.1': resolution: {integrity: sha512-wG2EA8ENdEI0qhkSZMjfqrdY+ziCYCPMmtZjjIwOmXFjmyzEHn+UUxk5of+SYsjtfs3VpnlC7QLzSI5hY/rOAw==} engines: {node: '>=18'} cpu: [arm64] os: [freebsd] - '@esbuild/freebsd-x64@0.27.7': - resolution: {integrity: sha512-jOBDK5XEjA4m5IJK3bpAQF9/Lelu/Z9ZcdhTRLf4cajlB+8VEhFFRjWgfy3M1O4rO2GQ/b2dLwCUGpiF/eATNQ==} - engines: {node: '>=18'} - cpu: [x64] - os: [freebsd] - '@esbuild/freebsd-x64@0.28.1': resolution: {integrity: sha512-i7dZ9vQgnvSCzi/rYCXNgtF/U+eKZNJBzu3eTQbRgHnM7tNSizLOkRFAl3qzVc/Op/u5YkHHa4pf/3DOYHthLQ==} engines: {node: '>=18'} cpu: [x64] os: [freebsd] - '@esbuild/linux-arm64@0.27.7': - resolution: {integrity: sha512-RZPHBoxXuNnPQO9rvjh5jdkRmVizktkT7TCDkDmQ0W2SwHInKCAV95GRuvdSvA7w4VMwfCjUiPwDi0ZO6Nfe9A==} - engines: {node: '>=18'} - cpu: [arm64] - os: [linux] - '@esbuild/linux-arm64@0.28.1': resolution: {integrity: sha512-yHs+0uc8+nvEAfAfxrWQKK5peSNzBc4PegcMO0EJ2hT71uA7vB8Ihg2e77R2P7SG5uYjPbHlLLmve4LLLRCf0g==} engines: {node: '>=18'} cpu: [arm64] os: [linux] - '@esbuild/linux-arm@0.27.7': - resolution: {integrity: sha512-RkT/YXYBTSULo3+af8Ib0ykH8u2MBh57o7q/DAs3lTJlyVQkgQvlrPTnjIzzRPQyavxtPtfg0EopvDyIt0j1rA==} - engines: {node: '>=18'} - cpu: [arm] - os: [linux] - '@esbuild/linux-arm@0.28.1': resolution: {integrity: sha512-qVXBOHQS+d5Y722GwJzJUtOLlX7km3CraOaGormF1pDtPd2C/l1SHRPgjLunLGe51Sh5YYWKMFDyV4SxgMQYTQ==} engines: {node: '>=18'} cpu: [arm] os: [linux] - '@esbuild/linux-ia32@0.27.7': - resolution: {integrity: sha512-GA48aKNkyQDbd3KtkplYWT102C5sn/EZTY4XROkxONgruHPU72l+gW+FfF8tf2cFjeHaRbWpOYa/uRBz/Xq1Pg==} - engines: {node: '>=18'} - cpu: [ia32] - os: [linux] - '@esbuild/linux-ia32@0.28.1': resolution: {integrity: sha512-d1z4ZuP0ajrfz/FhGT4vv278rX8KnPPJx8i5+AtK7TYbx9Le9F1hyzurZpkEyjkGa9dUGhQow4C1NmeGvqxN2w==} engines: {node: '>=18'} cpu: [ia32] os: [linux] - '@esbuild/linux-loong64@0.27.7': - resolution: {integrity: sha512-a4POruNM2oWsD4WKvBSEKGIiWQF8fZOAsycHOt6JBpZ+JN2n2JH9WAv56SOyu9X5IqAjqSIPTaJkqN8F7XOQ5Q==} - engines: {node: '>=18'} - cpu: [loong64] - os: [linux] - '@esbuild/linux-loong64@0.28.1': resolution: {integrity: sha512-M5sRjUVZrkm1OAPR3dlOYzNmN+loZKGVi1VUQGrwuqLcbR6qeAz+famMhjASeH3YVKvZz+zT1jlh/keC3Rj/lg==} engines: {node: '>=18'} cpu: [loong64] os: [linux] - '@esbuild/linux-mips64el@0.27.7': - resolution: {integrity: sha512-KabT5I6StirGfIz0FMgl1I+R1H73Gp0ofL9A3nG3i/cYFJzKHhouBV5VWK1CSgKvVaG4q1RNpCTR2LuTVB3fIw==} - engines: {node: '>=18'} - cpu: [mips64el] - os: [linux] - '@esbuild/linux-mips64el@0.28.1': resolution: {integrity: sha512-mRObBZeHh2OxcBFPWE/FjylkRgZdYuiTR3vaTozquCGOH14iP9oN4x4Ge81CoIDYQrXmIxpFumJBu5MtZpnQJQ==} engines: {node: '>=18'} cpu: [mips64el] os: [linux] - '@esbuild/linux-ppc64@0.27.7': - resolution: {integrity: sha512-gRsL4x6wsGHGRqhtI+ifpN/vpOFTQtnbsupUF5R5YTAg+y/lKelYR1hXbnBdzDjGbMYjVJLJTd2OFmMewAgwlQ==} - engines: {node: '>=18'} - cpu: [ppc64] - os: [linux] - '@esbuild/linux-ppc64@0.28.1': resolution: {integrity: sha512-slScBsMAb3GFDcdrCgLwZtPYRoH2H/youv10QiZyRjmsP48fznoveWytSgCI/R0ZcUgpc0ZhIUEx6LHts8yrfQ==} engines: {node: '>=18'} cpu: [ppc64] os: [linux] - '@esbuild/linux-riscv64@0.27.7': - resolution: {integrity: sha512-hL25LbxO1QOngGzu2U5xeXtxXcW+/GvMN3ejANqXkxZ/opySAZMrc+9LY/WyjAan41unrR3YrmtTsUpwT66InQ==} - engines: {node: '>=18'} - cpu: [riscv64] - os: [linux] - '@esbuild/linux-riscv64@0.28.1': resolution: {integrity: sha512-kw0owk1o0GFETUJyW0jc0G4Yzs0BHZn0JDZ8JRT088vjJYX777BAs1fDGxAC+q831qOs2DTC96mNsG2opdfyyQ==} engines: {node: '>=18'} cpu: [riscv64] os: [linux] - '@esbuild/linux-s390x@0.27.7': - resolution: {integrity: sha512-2k8go8Ycu1Kb46vEelhu1vqEP+UeRVj2zY1pSuPdgvbd5ykAw82Lrro28vXUrRmzEsUV0NzCf54yARIK8r0fdw==} - engines: {node: '>=18'} - cpu: [s390x] - os: [linux] - '@esbuild/linux-s390x@0.28.1': resolution: {integrity: sha512-/lAIjX8aYFRByhh6L5rYtPEDRqa9de/4V/juOXcta5frjvzXO4/sqEtyytse0g3zZFuWu5cDN0MkLz2qRDD2Ag==} engines: {node: '>=18'} cpu: [s390x] os: [linux] - '@esbuild/linux-x64@0.27.7': - resolution: {integrity: sha512-hzznmADPt+OmsYzw1EE33ccA+HPdIqiCRq7cQeL1Jlq2gb1+OyWBkMCrYGBJ+sxVzve2ZJEVeePbLM2iEIZSxA==} - engines: {node: '>=18'} - cpu: [x64] - os: [linux] - '@esbuild/linux-x64@0.28.1': resolution: {integrity: sha512-u/anNYF2mmVOEDwLtnQ1wOr3EZ9sTNGLWrsYGYwHWzGA3Si84IOkHXlbWTD1NB+9/1lcnweYKO54uhxZydNzfA==} engines: {node: '>=18'} cpu: [x64] os: [linux] - '@esbuild/netbsd-arm64@0.27.7': - resolution: {integrity: sha512-b6pqtrQdigZBwZxAn1UpazEisvwaIDvdbMbmrly7cDTMFnw/+3lVxxCTGOrkPVnsYIosJJXAsILG9XcQS+Yu6w==} - engines: {node: '>=18'} - cpu: [arm64] - os: [netbsd] - '@esbuild/netbsd-arm64@0.28.1': resolution: {integrity: sha512-oks0DYbLwWMmaakTsCb+zL4E+aHRVLom9IJZOAthMQEPiQmydXHkziYEsGYRx0uNV/IjEKGAV941JzH02pflqw==} engines: {node: '>=18'} cpu: [arm64] os: [netbsd] - '@esbuild/netbsd-x64@0.27.7': - resolution: {integrity: sha512-OfatkLojr6U+WN5EDYuoQhtM+1xco+/6FSzJJnuWiUw5eVcicbyK3dq5EeV/QHT1uy6GoDhGbFpprUiHUYggrw==} - engines: {node: '>=18'} - cpu: [x64] - os: [netbsd] - '@esbuild/netbsd-x64@0.28.1': resolution: {integrity: sha512-aeL6lAnN89Hz43Mlh1G8ARasbuoYvSITDEx0tHh5b7jJnHcssqgjy9Yx430GDpmCa6OyrKoS0aNRjKundRizGg==} engines: {node: '>=18'} cpu: [x64] os: [netbsd] - '@esbuild/openbsd-arm64@0.27.7': - resolution: {integrity: sha512-AFuojMQTxAz75Fo8idVcqoQWEHIXFRbOc1TrVcFSgCZtQfSdc1RXgB3tjOn/krRHENUB4j00bfGjyl2mJrU37A==} - engines: {node: '>=18'} - cpu: [arm64] - os: [openbsd] - '@esbuild/openbsd-arm64@0.28.1': resolution: {integrity: sha512-MEFJe5C3R8pwXdZ5Y21oo6m7ePiS0d9pWucn99O/wvyJZChoIQKrQDxKrGeW8F5+T0okTHesAmDeiHDTIq0V/Q==} engines: {node: '>=18'} cpu: [arm64] os: [openbsd] - '@esbuild/openbsd-x64@0.27.7': - resolution: {integrity: sha512-+A1NJmfM8WNDv5CLVQYJ5PshuRm/4cI6WMZRg1by1GwPIQPCTs1GLEUHwiiQGT5zDdyLiRM/l1G0Pv54gvtKIg==} - engines: {node: '>=18'} - cpu: [x64] - os: [openbsd] - '@esbuild/openbsd-x64@0.28.1': resolution: {integrity: sha512-i/ZLIOafE0Z8cI/XANJAixoJL/uRAoS2xOA3rb0xN+KK0K177cMAsQYkzHtBrtMXAKuAc7HGgcWiZ/sRC1Nxgw==} engines: {node: '>=18'} cpu: [x64] os: [openbsd] - '@esbuild/openharmony-arm64@0.27.7': - resolution: {integrity: sha512-+KrvYb/C8zA9CU/g0sR6w2RBw7IGc5J2BPnc3dYc5VJxHCSF1yNMxTV5LQ7GuKteQXZtspjFbiuW5/dOj7H4Yw==} - engines: {node: '>=18'} - cpu: [arm64] - os: [openharmony] - '@esbuild/openharmony-arm64@0.28.1': resolution: {integrity: sha512-ge+Z7EXFNt2BO1oAMsVpiQ8EwndV9i1xXerAeTIK7AtPs3bKFXQM7nlRxDSIUIMeueR1CNXxqztLzdNeReKBJg==} engines: {node: '>=18'} cpu: [arm64] os: [openharmony] - '@esbuild/sunos-x64@0.27.7': - resolution: {integrity: sha512-ikktIhFBzQNt/QDyOL580ti9+5mL/YZeUPKU2ivGtGjdTYoqz6jObj6nOMfhASpS4GU4Q/Clh1QtxWAvcYKamA==} - engines: {node: '>=18'} - cpu: [x64] - os: [sunos] - '@esbuild/sunos-x64@0.28.1': resolution: {integrity: sha512-BEjgtECkL3vY+SaSQ6nzVfiALUeFxpawyp8Jmf5PtYhf1Ug40N1h/hxlhts+f1FvSvarEigdxS3BlSMI2PJLcQ==} engines: {node: '>=18'} cpu: [x64] os: [sunos] - '@esbuild/win32-arm64@0.27.7': - resolution: {integrity: sha512-7yRhbHvPqSpRUV7Q20VuDwbjW5kIMwTHpptuUzV+AA46kiPze5Z7qgt6CLCK3pWFrHeNfDd1VKgyP4O+ng17CA==} - engines: {node: '>=18'} - cpu: [arm64] - os: [win32] - '@esbuild/win32-arm64@0.28.1': resolution: {integrity: sha512-lCv9eK/H6ZJWbE7bh2nw54CZ9M2nupBxJcTsdk/QQnWkdSjKGuxmmH8/GWrlT1eMmZfn4dGcCjRte397WqfQXA==} engines: {node: '>=18'} cpu: [arm64] os: [win32] - '@esbuild/win32-ia32@0.27.7': - resolution: {integrity: sha512-SmwKXe6VHIyZYbBLJrhOoCJRB/Z1tckzmgTLfFYOfpMAx63BJEaL9ExI8x7v0oAO3Zh6D/Oi1gVxEYr5oUCFhw==} - engines: {node: '>=18'} - cpu: [ia32] - os: [win32] - '@esbuild/win32-ia32@0.28.1': resolution: {integrity: sha512-zvb/mB2bSCoJOpoCBgYKKpX6YM6mJBlBUVUtVj41DlZJVEB6/0CKlRYxP5wWl1C1ILiCoAU5wZZ4q1P3qeS6Eg==} engines: {node: '>=18'} cpu: [ia32] os: [win32] - '@esbuild/win32-x64@0.27.7': - resolution: {integrity: sha512-56hiAJPhwQ1R4i+21FVF7V8kSD5zZTdHcVuRFMW0hn753vVfQN8xlx4uOPT4xoGH0Z/oVATuR82AiqSTDIpaHg==} - engines: {node: '>=18'} - cpu: [x64] - os: [win32] - '@esbuild/win32-x64@0.28.1': resolution: {integrity: sha512-bm4Mowrv+GXMlpWX++EcXw/iLyd1o3+bJkC2DkWXYVvgZCqD/bSj9ctZeAMC3cIxgjRVR2Dufaiu4YPxr5gW1A==} engines: {node: '>=18'} @@ -1224,6 +1089,9 @@ packages: resolution: {integrity: sha512-edgyN2pP07uXiP4tJs0s8KVmU8M8i60YPbbI0/WDeok1mIJHRXz+CgD8I0nelwDkoCh3EWL/G5kGfbuHjsdbvw==} engines: {node: '>=18'} + '@quansync/fs@1.0.0': + resolution: {integrity: sha512-4TJ3DFtlf1L5LDMaM6CanJ/0lckGNtJcMjQ1NAV6zDmA0tEHKZtxNKin8EgPaVX1YzljbxckyT2tJrpQKAtngQ==} + '@rolldown/binding-android-arm64@1.1.4': resolution: {integrity: sha512-EZLpf/8y7GXkkra90ML47kzik/GMP3EMcE9bPyHmRfxLC6z9+aW5A8poCsoxjrT5GfEcNAAvWwUHjvP1pUQkfw==} engines: {node: ^20.19.0 || >=22.12.0} @@ -1537,6 +1405,9 @@ packages: '@types/issue-parser@3.0.5': resolution: {integrity: sha512-fvOrnb7uS6qRme16tfyxy9SjOgx47Krkt/ilLS7axP3SWtJb9GZlduWX2bAsJOnr1HuCwJh88rCidzCZ1LwuZg==} + '@types/jsesc@2.5.1': + resolution: {integrity: sha512-9VN+6yxLOPLOav+7PwjZbxiID2bVaeq0ED4qSQmdQTdjnXJSaCVKTR58t15oqH1H5t8Ng2ZX1SabJVoN9Q34bw==} + '@types/json-bigint@1.0.4': resolution: {integrity: sha512-ydHooXLbOmxBbubnA7Eh+RpBzuaIiQjh8WGJYQB50JFGFrdxW7JzVlyEV7fAXw0T2sqJ1ysTneJbiyNLqZRAag==} @@ -1809,8 +1680,9 @@ packages: resolution: {integrity: sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==} engines: {node: '>=12'} - any-promise@1.3.0: - resolution: {integrity: sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==} + ansis@4.3.1: + resolution: {integrity: sha512-BJ8/l4R5LRE7hW9WdSuGYrLSHi2ynxeFpDFbH0K/CgNeY/tyhk+vO6TYxXC5r5CpUhNVX310xzPsN/H9lCdfOA==} + engines: {node: '>=14'} argparse@2.0.1: resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} @@ -1852,6 +1724,10 @@ packages: resolution: {integrity: sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==} engines: {node: '>=12'} + ast-kit@3.0.0: + resolution: {integrity: sha512-8OG92q3R35qjC/4i6BLBMg8IB+fClWu/1PEwg2Z9Rn+BuNaiEgJzpzn+pxWOdHJWDCAwu2JP0wCDTozAM4QirQ==} + engines: {node: ^22.18.0 || >=24.11.0} + async-function@1.0.0: resolution: {integrity: sha512-hsU18Ae8CDTR6Kgu9DYf0EbCr/a5iGL0rytQDobUcdpYOKokk8LEjVphnXkDkgpi0wYVsqrXuP0bZxJaTqdgoA==} engines: {node: '>= 0.4'} @@ -1999,6 +1875,9 @@ packages: bignumber.js@9.3.1: resolution: {integrity: sha512-Ko0uX15oIUS7wJ3Rb30Fs6SkVbLmPBAKdlm7q9+ak9bbIeFf0MwuBsQV6z7+X768/cHsfg+WlysDWJcmthjsjQ==} + birpc@4.0.0: + resolution: {integrity: sha512-LShSxJP0KTmd101b6DRyGBj57LZxSDYWKitQNW/mi8GRMvZb078Uf9+pveax1DrVL89vm7mWe+TovdI/UDOuPw==} + bl@4.1.0: resolution: {integrity: sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==} @@ -2032,19 +1911,13 @@ packages: buffer@5.7.1: resolution: {integrity: sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==} - bundle-require@5.1.0: - resolution: {integrity: sha512-3WrrOuZiyaaZPWiEt4G3+IffISVC9HYlWueJEBWED4ZH4aIAC2PnkdnuRrR94M+w6yGWn4AglWtJtBI8YqvgoA==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - peerDependencies: - esbuild: '>=0.18' - bytes@3.1.2: resolution: {integrity: sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==} engines: {node: '>= 0.8'} - cac@6.7.14: - resolution: {integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==} - engines: {node: '>=8'} + cac@7.0.0: + resolution: {integrity: sha512-tixWYgm5ZoOD+3g6UTea91eow5z6AAHaho3g0V9CNSNb45gM8SmflpAc+GRd1InC4AqN/07Unrgp56Y94N9hJQ==} + engines: {node: '>=20.19.0'} cache-content-type@1.0.1: resolution: {integrity: sha512-IKufZ1o4Ut42YUrZSo8+qnMTrFuKkvyoLXUywKz9GJ5BrhOFGhLdkx9sG4KAnVvbY6kEcSFjLQul+DVmBm2bgA==} @@ -2195,10 +2068,6 @@ packages: commander@2.20.3: resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==} - commander@4.1.1: - resolution: {integrity: sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==} - engines: {node: '>= 6'} - commitizen@4.3.2: resolution: {integrity: sha512-1Zs37z9JPvAcuTSSricZZwBhOPVNNxJouuY4yDEt+eD70EoxT2TU9kViG8CuB/PmVg2G4XsAGQiK4YCst97aDQ==} engines: {node: '>= 18'} @@ -2210,16 +2079,9 @@ packages: concat-map@0.0.1: resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} - confbox@0.1.8: - resolution: {integrity: sha512-RMtmw0iFkeR4YV+fUOSucriAQNb9g8zFR52MWCtl+cCZOFRNL6zeB395vPzFhEjjn4fMxXudmELnl/KF/WrK6w==} - config-chain@1.1.13: resolution: {integrity: sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ==} - consola@3.4.2: - resolution: {integrity: sha512-5IKcdX0nnYavi6G7TtOhwkYzyjfJlatbjMjuLSfE2kYT5pMDOilZ4OvMhi637CcDICTmz3wARPoyhqyX1Y+XvA==} - engines: {node: ^14.18.0 || >=16.10.0} - content-disposition@0.5.4: resolution: {integrity: sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==} engines: {node: '>= 0.6'} @@ -2410,6 +2272,9 @@ packages: resolution: {integrity: sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==} engines: {node: '>= 0.4'} + defu@6.1.7: + resolution: {integrity: sha512-7z22QmUWiQ/2d0KkdYmANbRUVABpZ9SNYyH5vx6PZ+nE5bcC0l7uFvEfHlyld/HcGBFTL536ClDt3DEcSlEJAQ==} + delayed-stream@1.0.0: resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==} engines: {node: '>=0.4.0'} @@ -2449,6 +2314,15 @@ packages: resolution: {integrity: sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==} engines: {node: '>=8'} + dts-resolver@3.0.0: + resolution: {integrity: sha512-1T1f+z+4tl9XD+m+0HBgWoL/nm0bOIffyWaUuUSBlFg/86IWvfx+wjNaO/ybU0AJzG9/Mi5hBUgGV6zCmWEN7Q==} + engines: {node: ^22.18.0 || >=24.0.0} + peerDependencies: + oxc-resolver: '>=11.0.0' + peerDependenciesMeta: + oxc-resolver: + optional: true + dunder-proto@1.0.1: resolution: {integrity: sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==} engines: {node: '>= 0.4'} @@ -2475,6 +2349,10 @@ packages: resolution: {integrity: sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==} engines: {node: '>= 4'} + empathic@2.0.1: + resolution: {integrity: sha512-YGRs8knHhKHVShLkFET/rWAU8kmHbOV5LwN938RHI0pljAJ1Gf6SzXsSmRaEzcXTtOOmVqJ5+WtQPL5uigY50Q==} + engines: {node: '>=14'} + encodeurl@1.0.2: resolution: {integrity: sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==} engines: {node: '>= 0.8'} @@ -2558,11 +2436,6 @@ packages: peerDependencies: webpack: ^4.40.0 || ^5.0.0 - esbuild@0.27.7: - resolution: {integrity: sha512-IxpibTjyVnmrIQo5aqNpCgoACA/dTKLTlhMHihVHhdkxKyPO1uBBthumT0rdHmcsk9uMonIWS0m4FljWzILh3w==} - engines: {node: '>=18'} - hasBin: true - esbuild@0.28.1: resolution: {integrity: sha512-HrJrvZv5ayxBzPfwphOoNzkzOIIlifzk0KJrGK2c8R4+LKpMtpYLQeUdjnwjWv/LZlkH2laZk+4w78pi99D4Vw==} engines: {node: '>=18'} @@ -2725,9 +2598,6 @@ packages: resolution: {integrity: sha512-6jvvn/12IC4quLBL1KNokxC7wWTvYncaVUYSoxWw7YykPLuRrnv4qdHcSOywOI5RpkOVGeQRtWM8/q+G6W6qfQ==} engines: {node: '>= 8'} - fix-dts-default-cjs-exports@1.0.1: - resolution: {integrity: sha512-pVIECanWFC61Hzl2+oOCtoJ3F17kglZC/6N94eRWycFgBH35hHx0Li604ZIzhseh97mf2p0cv7vVrOZGoqhlEg==} - flat@5.0.2: resolution: {integrity: sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==} hasBin: true @@ -2841,6 +2711,10 @@ packages: get-tsconfig@4.14.0: resolution: {integrity: sha512-yTb+8DXzDREzgvYmh6s9vHsSVCHeC0G3PI5bEXNBHtmshPnO+S5O7qgLEOn0I5QvMy6kpZN8K1NKGyilLb93wA==} + get-tsconfig@5.0.0-beta.5: + resolution: {integrity: sha512-/6gFNr0N04nob252sTQxyFLi3eKFRqIg1I87YcqAMT1i6SQrSF6KujUEQrtrjMV0H/eejTCltLdDSTEMzHbnsQ==} + engines: {node: '>=20.20.0'} + git-log-parser@1.2.1: resolution: {integrity: sha512-PI+sPDvHXNPl5WNOErAK05s3j0lgwUzMN6o8cyQrDaKfT3qd7TmNJKeXX+SknI5I0QhG5fVPAEwSY4tRGDtYoQ==} @@ -2933,6 +2807,9 @@ packages: resolution: {integrity: sha512-YwUvVpSF7m1yOblFPrU3Hbo8XhPheBoiyfGuII6z19LnOr6JpDnyyp7LFNrfV56wS8tpvtBFGRISHN02pDdLOA==} engines: {node: '>=16.9.0'} + hookable@6.1.1: + resolution: {integrity: sha512-U9LYDy1CwhMCnprUfeAZWZGByVbhd54hwepegYTK7Pi5NvqEj63ifz5z+xukznehT7i6NIZRu89Ay1AZmRsLEQ==} + html-encoding-sniffer@4.0.0: resolution: {integrity: sha512-Y22oTqIU4uuPgEemfz7NDJz6OeKf12Lsu+QC+s3BVpda64lTiMYCyGwg5ki4vFxkMwQdeZDl2adZoqUgdFuTgQ==} engines: {node: '>=18'} @@ -2991,6 +2868,10 @@ packages: import-meta-resolve@4.2.0: resolution: {integrity: sha512-Iqv2fzaTQN28s/FwZAoFq0ZSs/7hMAHJVX+w8PZl3cY19Pxk6jFFalxQoIfW2826i/fDLXv8IiEZRIT0lDuWcg==} + import-without-cache@0.4.0: + resolution: {integrity: sha512-NkJQA7oZ4YHQhd2+H3BoRFKF3d/XNsiKpHZCQEMH9pDX27hQQLsTyOocyRgaIVtf8gHX3Nt3LPkR4e5EdtPAGQ==} + engines: {node: ^22.18.0 || >=24.0.0} + inflight@1.0.6: resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} deprecated: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. @@ -3396,10 +3277,6 @@ packages: resolution: {integrity: sha512-NXYBzinNrblfraPGyrbPoD19C1h9lfI/1mzgWYvXUTe414Gz/X1FD2XBZSZM7rRTrMA8JL3OtAaGifrIKhQ5yQ==} engines: {node: '>= 12.0.0'} - lilconfig@3.1.3: - resolution: {integrity: sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw==} - engines: {node: '>=14'} - lines-and-columns@1.2.4: resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} @@ -3412,10 +3289,6 @@ packages: resolution: {integrity: sha512-ME4Fb83LgEgwNw96RKNvKV4VTLuXfoKudAmm2lP8Kk87KaMK0/Xrx/aAkMWmT8mDb+3MlFDspfbCs7adjRxA2g==} engines: {node: '>=20.0.0'} - load-tsconfig@0.2.5: - resolution: {integrity: sha512-IXO6OCs9yg8tMKzfPZ1YmheJbZCiEsnBdcB03l0OcfK9prKnJb96siuHCr5Fl37/yo9DnKU+TLpxzTUspw9shg==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - loader-runner@4.3.2: resolution: {integrity: sha512-DFEqQ3ihfS9blba08cLfYf1NRAIEm+dDjic073DRDc3/JspI/8wYmtDsHwd3+4hwvdxSK7PGaElfTmm0awWJ4w==} engines: {node: '>=6.11.5'} @@ -3612,9 +3485,6 @@ packages: resolution: {integrity: sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==} hasBin: true - mlly@1.8.2: - resolution: {integrity: sha512-d+ObxMQFmbt10sretNDytwt85VrbkhhUA/JBGm1MPaWJ65Cl4wOgLaB1NYvJSZ0Ef03MMEU/0xpPMXUIQ29UfA==} - mri@1.1.4: resolution: {integrity: sha512-6y7IjGPm8AzlvoUrwAaw1tLnUBudaS3752vcd8JtrpGGQn+rXIe63LFVHm/YMwtqAuh+LJPCFdlLYPWM1nYn6w==} engines: {node: '>=4'} @@ -3640,9 +3510,6 @@ packages: resolution: {integrity: sha512-dkEJPVvun4FryqBmZ5KhDo0K9iDXAwn08tMLDinNdRBNPcYEDiWYysLcc6k3mjTMlbP9KyylvRpd4wFtwrT9rw==} engines: {node: ^20.17.0 || >=22.9.0} - mz@2.7.0: - resolution: {integrity: sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==} - nanocolors@0.2.13: resolution: {integrity: sha512-0n3mSAQLPpGLV9ORXT5+C/D4mwew7Ebws69Hx4E2sgz2ZA5+32Q80B9tL8PbL7XHnRDiAxH/pnrUJ9a4fkTNTA==} @@ -3868,13 +3735,6 @@ packages: resolution: {integrity: sha512-dMACeu63HtRLmCG8VKdy4cShCPKaYDR4youZqoSWLxl5Gu99HUw8bw75thbPv9Nip+H+QYX8o3ZJbTdVZZ2TVg==} hasBin: true - pirates@4.0.7: - resolution: {integrity: sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA==} - engines: {node: '>= 6'} - - pkg-types@1.3.1: - resolution: {integrity: sha512-/Jm5M4RvtBFVkKWRu2BLUTNP8/M2a+UwuAX+ae4770q1qVGtfjG+WTCupoZixokjmHiry8uI+dlY8KXYV5HVVQ==} - playwright-core@1.61.1: resolution: {integrity: sha512-h7Qlt6m4REp25qvIdvbDtVmD4LqVXfpRxhORv9L0jzETM05p4fuPJ3dKyuSXQxDSbXnmS79HAgi9589lGSpLkg==} engines: {node: '>=18'} @@ -3893,24 +3753,6 @@ packages: resolution: {integrity: sha512-/+5VFTchJDoVj3bhoqi6UeymcD00DAwb1nJwamzPvHEszJ4FpF6SNNbUbOS8yI56qHzdV8eK0qEfOSiodkTdxg==} engines: {node: '>= 0.4'} - postcss-load-config@6.0.1: - resolution: {integrity: sha512-oPtTM4oerL+UXmx+93ytZVN82RrlY/wPUV8IeDxFrzIjXOLF1pN+EmKPLbubvKHT2HC20xXsCAH2Z+CKV6Oz/g==} - engines: {node: '>= 18'} - peerDependencies: - jiti: '>=1.21.0' - postcss: '>=8.0.9' - tsx: ^4.8.1 - yaml: ^2.4.2 - peerDependenciesMeta: - jiti: - optional: true - postcss: - optional: true - tsx: - optional: true - yaml: - optional: true - postcss@8.5.16: resolution: {integrity: sha512-vuwillviilfKZsg0VGj5R/YwwcHx4SLsIOI/7K6mQkWx+l5cUHTjj5g0AasTBcyXsbfTgrwsUNmVUb5xVwyPwg==} engines: {node: ^10 || ^12 || >=14} @@ -3959,6 +3801,9 @@ packages: resolution: {integrity: sha512-O9gl3zCl5h5blw1KGUzQKhA5oUXSl8rwUIM5o0S3nCXMliSvy5Dzx7/DJcI+SwgICv+IneSZwhBh1oSyEHA71A==} engines: {node: '>=0.6'} + quansync@1.0.0: + resolution: {integrity: sha512-5xZacEEufv3HSTPQuchrvV6soaiACMFnq1H8wkVioctoH3TRha9Sz66lOxRwPK/qZj7HPiSveih9yAyh98gvqA==} + quick-format-unescaped@4.0.4: resolution: {integrity: sha512-tYC1Q1hgyRuHgloV/YXs2w15unPVh8qfu/qCTfhTYamaw7fyhumKa2yGpdSo87vY32rIclj+4fWYQXUMs9EHvg==} @@ -4078,6 +3923,25 @@ packages: engines: {node: 20 || >=22} hasBin: true + rolldown-plugin-dts@0.26.0: + resolution: {integrity: sha512-e+kEPtUiDES0htk5iqkSeF4EzAV7R+vugGB44iPDuw1Kw9E+WyL1VG7PaV0IIjGHLiacztMBcMTyrr8ON9CT1Q==} + engines: {node: ^22.18.0 || >=24.11.0} + peerDependencies: + '@ts-macro/tsc': ^0.3.6 + '@typescript/native-preview': '>=7.0.0-dev.20260325.1' + rolldown: ^1.0.0 + typescript: ^5.0.0 || ^6.0.0 + vue-tsc: ~3.2.0 || ~3.3.0 + peerDependenciesMeta: + '@ts-macro/tsc': + optional: true + '@typescript/native-preview': + optional: true + typescript: + optional: true + vue-tsc: + optional: true + rolldown@1.1.4: resolution: {integrity: sha512-IjZYiLxZwpnhwhdBH2ugdTGVSdhCQUmLxLoqyjiL0JxYjyRst+5a0P3xfrTxJ5F638j4Mvvw5FAX5XE6eHpXbA==} engines: {node: ^20.19.0 || >=22.12.0} @@ -4287,10 +4151,6 @@ packages: resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} engines: {node: '>=0.10.0'} - source-map@0.7.6: - resolution: {integrity: sha512-i5uvt8C3ikiWeNZSVZNWcfZPItFQOsYTUAOkcUPGd8DqDy1uOUikjt5dG+uRlwyvR108Fb9DOd4GvXfT0N2/uQ==} - engines: {node: '>= 12'} - spawn-error-forwarder@1.0.0: resolution: {integrity: sha512-gRjMgK5uFjbCvdibeGJuy3I5OYz6VLoVdsOJdA6wV0WlfQVLFueoqMxwwYD9RODdgb6oUIvlRlsyFSiQkMKu0g==} @@ -4390,11 +4250,6 @@ packages: resolution: {integrity: sha512-1tB5mhVo7U+ETBKNf92xT4hrQa3pm0MZ0PQvuDnWgAAGHDsfp4lPSpiS6psrSiet87wyGPh9ft6wmhOMQ0hDiw==} engines: {node: '>=14.16'} - sucrase@3.35.1: - resolution: {integrity: sha512-DhuTmvZWux4H1UOnWMB3sk0sbaCVOoQZjv8u1rDoTV0HTdGem9hkAZtl4JZy8P2z4Bg0nT+YMeOFyVr4zcG5Tw==} - engines: {node: '>=16 || 14 >=14.17'} - hasBin: true - supports-color@5.5.0: resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==} engines: {node: '>=4'} @@ -4431,13 +4286,6 @@ packages: engines: {node: '>=10'} hasBin: true - thenify-all@1.6.0: - resolution: {integrity: sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==} - engines: {node: '>=0.8'} - - thenify@3.3.1: - resolution: {integrity: sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==} - thread-stream@0.15.2: resolution: {integrity: sha512-UkEhKIg2pD+fjkHQKyJO3yoIvAP3N6RlNFt2dUhcS1FGvCD1cQa1M/PGknCLFIyZdtJOWQjejp7bdNqmN7zwdA==} @@ -4454,9 +4302,6 @@ packages: tinybench@2.9.0: resolution: {integrity: sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==} - tinyexec@0.3.2: - resolution: {integrity: sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==} - tinyexec@1.2.4: resolution: {integrity: sha512-SHf/r48b7vOrjve9PxJo3MN5v5yuyjHvdUcrQffT3WXMUfnGmHDVbC4k3sHJaJTgZCwpUplIaAo5ANtMyp3YHg==} engines: {node: '>=18'} @@ -4518,34 +4363,46 @@ packages: resolution: {integrity: sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==} hasBin: true - ts-interface-checker@0.1.13: - resolution: {integrity: sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==} - - tslib@2.8.1: - resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==} - - tsscmp@1.0.6: - resolution: {integrity: sha512-LxhtAkPDTkVCMQjt2h6eBVY28KCjikZqZfMcC15YBeNjkgUpdCfBu5HoiOTDu86v6smE8yOjyEktJ8hlbANHQA==} - engines: {node: '>=0.6.x'} - - tsup@8.5.1: - resolution: {integrity: sha512-xtgkqwdhpKWr3tKPmCkvYmS9xnQK3m3XgxZHwSUjvfTjp7YfXe5tT3GgWi0F2N+ZSMsOeWeZFh7ZZFg5iPhing==} - engines: {node: '>=18'} + tsdown@0.22.3: + resolution: {integrity: sha512-louqbfA8Qf//B9jTTL0FPtXTNpjCWv1VPkbcmQMph2pTpzs+LnB1tbe4tDDRVpo2BjF5SgUXaTZe45SxB8pWHg==} + engines: {node: ^22.18.0 || >=24.11.0} hasBin: true peerDependencies: - '@microsoft/api-extractor': ^7.36.0 - '@swc/core': ^1 - postcss: ^8.4.12 - typescript: '>=4.5.0' + '@arethetypeswrong/core': ^0.18.1 + '@tsdown/css': 0.22.3 + '@tsdown/exe': 0.22.3 + '@vitejs/devtools': '*' + publint: ^0.3.8 + tsx: '*' + typescript: ^5.0.0 || ^6.0.0 + unplugin-unused: ^0.5.0 + unrun: '*' peerDependenciesMeta: - '@microsoft/api-extractor': + '@arethetypeswrong/core': optional: true - '@swc/core': + '@tsdown/css': optional: true - postcss: + '@tsdown/exe': + optional: true + '@vitejs/devtools': + optional: true + publint: + optional: true + tsx: optional: true typescript: optional: true + unplugin-unused: + optional: true + unrun: + optional: true + + tslib@2.8.1: + resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==} + + tsscmp@1.0.6: + resolution: {integrity: sha512-LxhtAkPDTkVCMQjt2h6eBVY28KCjikZqZfMcC15YBeNjkgUpdCfBu5HoiOTDu86v6smE8yOjyEktJ8hlbANHQA==} + engines: {node: '>=0.6.x'} type-fest@0.21.3: resolution: {integrity: sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==} @@ -4592,9 +4449,6 @@ packages: resolution: {integrity: sha512-ya4mg/30vm+DOWfBg4YK3j2WD6TWtRkCbasOJr40CseYENzCUby/7rIvXA99JGsQHeNxLbnXdyLLxKSv3tauFw==} engines: {node: '>=12.17'} - ufo@1.6.4: - resolution: {integrity: sha512-JFNbkD1Svwe0KvGi8GOeLcP4kAWQ609twvCdcHxq1oSL8svv39ZuSvajcD8B+5D0eL4+s1Is2D/O6KN3qcTeRA==} - unbash@4.0.2: resolution: {integrity: sha512-8gwNZ29+0/3zmXw7ToIHZtg6wK37xnniRUdBt7B27xZxaxfgR5tGMaGHT0t0dLtBV9fXE7zurh0s6Z1DHVjfWg==} engines: {node: '>=14'} @@ -4603,6 +4457,9 @@ packages: resolution: {integrity: sha512-nWJ91DjeOkej/TA8pXQ3myruKpKEYgqvpw9lz4OPHj/NWFNluYrjbz9j01CJ8yKQd2g4jFoOkINCTW2I5LEEyw==} engines: {node: '>= 0.4'} + unconfig-core@7.5.0: + resolution: {integrity: sha512-Su3FauozOGP44ZmKdHy2oE6LPjk51M/TRRjHv2HNCWiDvfvCoxC2lno6jevMA91MYAdCdwP05QnWdWpSbncX/w==} + undici-types@6.21.0: resolution: {integrity: sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==} @@ -4981,6 +4838,15 @@ snapshots: '@jridgewell/trace-mapping': 0.3.31 jsesc: 3.1.0 + '@babel/generator@8.0.0': + dependencies: + '@babel/parser': 8.0.0 + '@babel/types': 8.0.0 + '@jridgewell/gen-mapping': 0.3.13 + '@jridgewell/trace-mapping': 0.3.31 + '@types/jsesc': 2.5.1 + jsesc: 3.1.0 + '@babel/helper-compilation-targets@7.29.7': dependencies: '@babel/compat-data': 7.29.7 @@ -5009,8 +4875,12 @@ snapshots: '@babel/helper-string-parser@7.29.7': {} + '@babel/helper-string-parser@8.0.0': {} + '@babel/helper-validator-identifier@7.29.7': {} + '@babel/helper-validator-identifier@8.0.2': {} + '@babel/helper-validator-option@7.29.7': {} '@babel/helpers@7.29.7': @@ -5022,6 +4892,10 @@ snapshots: dependencies: '@babel/types': 7.29.7 + '@babel/parser@8.0.0': + dependencies: + '@babel/types': 8.0.0 + '@babel/template@7.29.7': dependencies: '@babel/code-frame': 7.29.7 @@ -5045,6 +4919,11 @@ snapshots: '@babel/helper-string-parser': 7.29.7 '@babel/helper-validator-identifier': 7.29.7 + '@babel/types@8.0.0': + dependencies: + '@babel/helper-string-parser': 8.0.0 + '@babel/helper-validator-identifier': 8.0.2 + '@commitlint/cli@20.5.3(@types/node@22.19.21)(conventional-commits-parser@6.4.0)(typescript@5.9.3)': dependencies: '@commitlint/format': 20.5.0 @@ -5264,159 +5143,81 @@ snapshots: - bufferutil - utf-8-validate - '@esbuild/aix-ppc64@0.27.7': - optional: true - '@esbuild/aix-ppc64@0.28.1': optional: true - '@esbuild/android-arm64@0.27.7': - optional: true - '@esbuild/android-arm64@0.28.1': optional: true - '@esbuild/android-arm@0.27.7': - optional: true - '@esbuild/android-arm@0.28.1': optional: true - '@esbuild/android-x64@0.27.7': - optional: true - '@esbuild/android-x64@0.28.1': optional: true - '@esbuild/darwin-arm64@0.27.7': - optional: true - '@esbuild/darwin-arm64@0.28.1': optional: true - '@esbuild/darwin-x64@0.27.7': - optional: true - '@esbuild/darwin-x64@0.28.1': optional: true - '@esbuild/freebsd-arm64@0.27.7': - optional: true - '@esbuild/freebsd-arm64@0.28.1': optional: true - '@esbuild/freebsd-x64@0.27.7': - optional: true - '@esbuild/freebsd-x64@0.28.1': optional: true - '@esbuild/linux-arm64@0.27.7': - optional: true - '@esbuild/linux-arm64@0.28.1': optional: true - '@esbuild/linux-arm@0.27.7': - optional: true - '@esbuild/linux-arm@0.28.1': optional: true - '@esbuild/linux-ia32@0.27.7': - optional: true - '@esbuild/linux-ia32@0.28.1': optional: true - '@esbuild/linux-loong64@0.27.7': - optional: true - '@esbuild/linux-loong64@0.28.1': optional: true - '@esbuild/linux-mips64el@0.27.7': - optional: true - '@esbuild/linux-mips64el@0.28.1': optional: true - '@esbuild/linux-ppc64@0.27.7': - optional: true - '@esbuild/linux-ppc64@0.28.1': optional: true - '@esbuild/linux-riscv64@0.27.7': - optional: true - '@esbuild/linux-riscv64@0.28.1': optional: true - '@esbuild/linux-s390x@0.27.7': - optional: true - '@esbuild/linux-s390x@0.28.1': optional: true - '@esbuild/linux-x64@0.27.7': - optional: true - '@esbuild/linux-x64@0.28.1': optional: true - '@esbuild/netbsd-arm64@0.27.7': - optional: true - '@esbuild/netbsd-arm64@0.28.1': optional: true - '@esbuild/netbsd-x64@0.27.7': - optional: true - '@esbuild/netbsd-x64@0.28.1': optional: true - '@esbuild/openbsd-arm64@0.27.7': - optional: true - '@esbuild/openbsd-arm64@0.28.1': optional: true - '@esbuild/openbsd-x64@0.27.7': - optional: true - '@esbuild/openbsd-x64@0.28.1': optional: true - '@esbuild/openharmony-arm64@0.27.7': - optional: true - '@esbuild/openharmony-arm64@0.28.1': optional: true - '@esbuild/sunos-x64@0.27.7': - optional: true - '@esbuild/sunos-x64@0.28.1': optional: true - '@esbuild/win32-arm64@0.27.7': - optional: true - '@esbuild/win32-arm64@0.28.1': optional: true - '@esbuild/win32-ia32@0.27.7': - optional: true - '@esbuild/win32-ia32@0.28.1': optional: true - '@esbuild/win32-x64@0.27.7': - optional: true - '@esbuild/win32-x64@0.28.1': optional: true @@ -5808,6 +5609,10 @@ snapshots: dependencies: tinyexec: 1.2.4 + '@quansync/fs@1.0.0': + dependencies: + quansync: 1.0.0 + '@rolldown/binding-android-arm64@1.1.4': optional: true @@ -6048,6 +5853,8 @@ snapshots: '@types/issue-parser@3.0.5': {} + '@types/jsesc@2.5.1': {} + '@types/json-bigint@1.0.4': {} '@types/json-schema@7.0.15': {} @@ -6404,7 +6211,7 @@ snapshots: ansi-styles@6.2.3: {} - any-promise@1.3.0: {} + ansis@4.3.1: {} argparse@2.0.1: {} @@ -6453,6 +6260,12 @@ snapshots: assertion-error@2.0.1: {} + ast-kit@3.0.0: + dependencies: + '@babel/parser': 8.0.0 + estree-walker: 3.0.3 + pathe: 2.0.3 + async-function@1.0.0: {} async@3.2.6: {} @@ -6617,6 +6430,8 @@ snapshots: bignumber.js@9.3.1: {} + birpc@4.0.0: {} + bl@4.1.0: dependencies: buffer: 5.7.1 @@ -6682,14 +6497,9 @@ snapshots: base64-js: 1.5.1 ieee754: 1.2.1 - bundle-require@5.1.0(esbuild@0.27.7): - dependencies: - esbuild: 0.27.7 - load-tsconfig: 0.2.5 - bytes@3.1.2: {} - cac@6.7.14: {} + cac@7.0.0: {} cache-content-type@1.0.1: dependencies: @@ -6829,8 +6639,6 @@ snapshots: commander@2.20.3: {} - commander@4.1.1: {} - commitizen@4.3.2(@types/node@22.19.21)(typescript@5.9.3): dependencies: cachedir: 2.4.0 @@ -6858,15 +6666,11 @@ snapshots: concat-map@0.0.1: {} - confbox@0.1.8: {} - config-chain@1.1.13: dependencies: ini: 1.3.8 proto-list: 1.2.4 - consola@3.4.2: {} - content-disposition@0.5.4: dependencies: safe-buffer: 5.2.1 @@ -7045,6 +6849,8 @@ snapshots: has-property-descriptors: 1.0.2 object-keys: 1.1.1 + defu@6.1.7: {} + delayed-stream@1.0.0: {} delegates@1.0.0: {} @@ -7067,6 +6873,10 @@ snapshots: dependencies: is-obj: 2.0.0 + dts-resolver@3.0.0(oxc-resolver@11.21.3): + optionalDependencies: + oxc-resolver: 11.21.3 + dunder-proto@1.0.1: dependencies: call-bind-apply-helpers: 1.0.2 @@ -7094,6 +6904,8 @@ snapshots: emojis-list@3.0.0: {} + empathic@2.0.1: {} + encodeurl@1.0.2: {} encodeurl@2.0.0: {} @@ -7232,43 +7044,14 @@ snapshots: es-toolkit@1.49.0: {} - esbuild-loader@4.5.0(webpack@5.108.4(esbuild@0.28.1)(postcss@8.5.16)): + esbuild-loader@4.5.0(webpack@5.108.4(esbuild@0.28.1)): dependencies: esbuild: 0.28.1 get-tsconfig: 4.14.0 loader-utils: 2.0.4 - webpack: 5.108.4(esbuild@0.28.1)(postcss@8.5.16) + webpack: 5.108.4(esbuild@0.28.1) webpack-sources: 3.5.1 - esbuild@0.27.7: - optionalDependencies: - '@esbuild/aix-ppc64': 0.27.7 - '@esbuild/android-arm': 0.27.7 - '@esbuild/android-arm64': 0.27.7 - '@esbuild/android-x64': 0.27.7 - '@esbuild/darwin-arm64': 0.27.7 - '@esbuild/darwin-x64': 0.27.7 - '@esbuild/freebsd-arm64': 0.27.7 - '@esbuild/freebsd-x64': 0.27.7 - '@esbuild/linux-arm': 0.27.7 - '@esbuild/linux-arm64': 0.27.7 - '@esbuild/linux-ia32': 0.27.7 - '@esbuild/linux-loong64': 0.27.7 - '@esbuild/linux-mips64el': 0.27.7 - '@esbuild/linux-ppc64': 0.27.7 - '@esbuild/linux-riscv64': 0.27.7 - '@esbuild/linux-s390x': 0.27.7 - '@esbuild/linux-x64': 0.27.7 - '@esbuild/netbsd-arm64': 0.27.7 - '@esbuild/netbsd-x64': 0.27.7 - '@esbuild/openbsd-arm64': 0.27.7 - '@esbuild/openbsd-x64': 0.27.7 - '@esbuild/openharmony-arm64': 0.27.7 - '@esbuild/sunos-x64': 0.27.7 - '@esbuild/win32-arm64': 0.27.7 - '@esbuild/win32-ia32': 0.27.7 - '@esbuild/win32-x64': 0.27.7 - esbuild@0.28.1: optionalDependencies: '@esbuild/aix-ppc64': 0.28.1 @@ -7540,12 +7323,6 @@ snapshots: micromatch: 4.0.8 resolve-dir: 1.0.1 - fix-dts-default-cjs-exports@1.0.1: - dependencies: - magic-string: 0.30.21 - mlly: 1.8.2 - rollup: 4.62.2 - flat@5.0.2: {} follow-redirects@1.16.0: {} @@ -7656,6 +7433,10 @@ snapshots: dependencies: resolve-pkg-maps: 1.0.0 + get-tsconfig@5.0.0-beta.5: + dependencies: + resolve-pkg-maps: 1.0.0 + git-log-parser@1.2.1: dependencies: argv-formatter: 1.0.0 @@ -7756,6 +7537,8 @@ snapshots: hono@4.12.28: {} + hookable@6.1.1: {} + html-encoding-sniffer@4.0.0: dependencies: whatwg-encoding: 3.1.1 @@ -7832,6 +7615,8 @@ snapshots: import-meta-resolve@4.2.0: {} + import-without-cache@0.4.0: {} + inflight@1.0.6: dependencies: once: 1.4.0 @@ -8261,8 +8046,6 @@ snapshots: lightningcss-win32-arm64-msvc: 1.32.0 lightningcss-win32-x64-msvc: 1.32.0 - lilconfig@3.1.3: {} - lines-and-columns@1.2.4: {} lint-staged@16.4.0: @@ -8283,8 +8066,6 @@ snapshots: rfdc: 1.4.1 wrap-ansi: 9.0.2 - load-tsconfig@0.2.5: {} - loader-runner@4.3.2: {} loader-utils@2.0.4: @@ -8396,16 +8177,15 @@ snapshots: minimist@1.2.8: {} - minimizer-webpack-plugin@5.6.1(esbuild@0.28.1)(postcss@8.5.16)(webpack@5.108.4(esbuild@0.28.1)(postcss@8.5.16)): + minimizer-webpack-plugin@5.6.1(esbuild@0.28.1)(webpack@5.108.4(esbuild@0.28.1)): dependencies: '@jridgewell/trace-mapping': 0.3.31 jest-worker: 27.5.1 schema-utils: 4.3.3 terser: 5.48.0 - webpack: 5.108.4(esbuild@0.28.1)(postcss@8.5.16) + webpack: 5.108.4(esbuild@0.28.1) optionalDependencies: esbuild: 0.28.1 - postcss: 8.5.16 minipass@7.1.3: {} @@ -8413,13 +8193,6 @@ snapshots: dependencies: minimist: 1.2.8 - mlly@1.8.2: - dependencies: - acorn: 8.17.0 - pathe: 2.0.3 - pkg-types: 1.3.1 - ufo: 1.6.4 - mri@1.1.4: {} mri@1.2.0: {} @@ -8434,12 +8207,6 @@ snapshots: mute-stream@3.0.0: {} - mz@2.7.0: - dependencies: - any-promise: 1.3.0 - object-assign: 4.1.1 - thenify-all: 1.6.0 - nanocolors@0.2.13: {} nanoid@3.3.15: {} @@ -8620,7 +8387,7 @@ snapshots: package-manager-detector@1.7.0: {} - page-with@0.6.1(esbuild@0.28.1)(postcss@8.5.16): + page-with@0.6.1(esbuild@0.28.1): dependencies: '@open-draft/until': 2.1.0 '@types/debug': 4.1.13 @@ -8634,7 +8401,7 @@ snapshots: mustache: 4.2.0 playwright: 1.61.1 uuid: 8.3.2 - webpack: 5.108.4(esbuild@0.28.1)(postcss@8.5.16) + webpack: 5.108.4(esbuild@0.28.1) webpack-merge: 5.10.0 transitivePeerDependencies: - '@minify-html/node' @@ -8753,14 +8520,6 @@ snapshots: sonic-boom: 2.8.0 thread-stream: 0.15.2 - pirates@4.0.7: {} - - pkg-types@1.3.1: - dependencies: - confbox: 0.1.8 - mlly: 1.8.2 - pathe: 2.0.3 - playwright-core@1.61.1: {} playwright@1.61.1: @@ -8778,14 +8537,6 @@ snapshots: possible-typed-array-names@1.1.0: {} - postcss-load-config@6.0.1(jiti@2.7.0)(postcss@8.5.16)(yaml@2.9.0): - dependencies: - lilconfig: 3.1.3 - optionalDependencies: - jiti: 2.7.0 - postcss: 8.5.16 - yaml: 2.9.0 - postcss@8.5.16: dependencies: nanoid: 3.3.15 @@ -8830,6 +8581,8 @@ snapshots: es-define-property: 1.0.1 side-channel: 1.1.1 + quansync@1.0.0: {} + quick-format-unescaped@4.0.4: {} range-parser@1.2.1: {} @@ -8957,6 +8710,22 @@ snapshots: glob: 13.0.6 package-json-from-dist: 1.0.1 + rolldown-plugin-dts@0.26.0(oxc-resolver@11.21.3)(rolldown@1.1.4)(typescript@5.9.3): + dependencies: + '@babel/generator': 8.0.0 + '@babel/helper-validator-identifier': 8.0.2 + '@babel/parser': 8.0.0 + ast-kit: 3.0.0 + birpc: 4.0.0 + dts-resolver: 3.0.0(oxc-resolver@11.21.3) + get-tsconfig: 5.0.0-beta.5 + obug: 2.1.3 + rolldown: 1.1.4 + optionalDependencies: + typescript: 5.9.3 + transitivePeerDependencies: + - oxc-resolver + rolldown@1.1.4: dependencies: '@oxc-project/types': 0.138.0 @@ -9276,8 +9045,6 @@ snapshots: source-map@0.6.1: {} - source-map@0.7.6: {} - spawn-error-forwarder@1.0.0: {} split2@1.0.0: @@ -9377,16 +9144,6 @@ snapshots: strip-json-comments@5.0.3: {} - sucrase@3.35.1: - dependencies: - '@jridgewell/gen-mapping': 0.3.13 - commander: 4.1.1 - lines-and-columns: 1.2.4 - mz: 2.7.0 - pirates: 4.0.7 - tinyglobby: 0.2.17 - ts-interface-checker: 0.1.13 - supports-color@5.5.0: dependencies: has-flag: 3.0.0 @@ -9419,14 +9176,6 @@ snapshots: commander: 2.20.3 source-map-support: 0.5.21 - thenify-all@1.6.0: - dependencies: - thenify: 3.3.1 - - thenify@3.3.1: - dependencies: - any-promise: 1.3.0 - thread-stream@0.15.2: dependencies: real-require: 0.1.0 @@ -9444,8 +9193,6 @@ snapshots: tinybench@2.9.0: {} - tinyexec@0.3.2: {} - tinyexec@1.2.4: {} tinyglobby@0.2.17: @@ -9493,39 +9240,35 @@ snapshots: tree-kill@1.2.2: {} - ts-interface-checker@0.1.13: {} - - tslib@2.8.1: {} - - tsscmp@1.0.6: {} - - tsup@8.5.1(jiti@2.7.0)(postcss@8.5.16)(typescript@5.9.3)(yaml@2.9.0): + tsdown@0.22.3(oxc-resolver@11.21.3)(publint@0.3.21)(typescript@5.9.3): dependencies: - bundle-require: 5.1.0(esbuild@0.27.7) - cac: 6.7.14 - chokidar: 4.0.3 - consola: 3.4.2 - debug: 4.4.3 - esbuild: 0.27.7 - fix-dts-default-cjs-exports: 1.0.1 - joycon: 3.1.1 - picocolors: 1.1.1 - postcss-load-config: 6.0.1(jiti@2.7.0)(postcss@8.5.16)(yaml@2.9.0) - resolve-from: 5.0.0 - rollup: 4.62.2 - source-map: 0.7.6 - sucrase: 3.35.1 - tinyexec: 0.3.2 + ansis: 4.3.1 + cac: 7.0.0 + defu: 6.1.7 + empathic: 2.0.1 + hookable: 6.1.1 + import-without-cache: 0.4.0 + obug: 2.1.3 + picomatch: 4.0.5 + rolldown: 1.1.4 + rolldown-plugin-dts: 0.26.0(oxc-resolver@11.21.3)(rolldown@1.1.4)(typescript@5.9.3) + semver: 7.8.5 + tinyexec: 1.2.4 tinyglobby: 0.2.17 tree-kill: 1.2.2 + unconfig-core: 7.5.0 optionalDependencies: - postcss: 8.5.16 + publint: 0.3.21 typescript: 5.9.3 transitivePeerDependencies: - - jiti - - supports-color - - tsx - - yaml + - '@ts-macro/tsc' + - '@typescript/native-preview' + - oxc-resolver + - vue-tsc + + tslib@2.8.1: {} + + tsscmp@1.0.6: {} type-fest@0.21.3: {} @@ -9583,8 +9326,6 @@ snapshots: typical@7.3.0: {} - ufo@1.6.4: {} - unbash@4.0.2: {} unbox-primitive@1.1.0: @@ -9594,6 +9335,11 @@ snapshots: has-symbols: 1.1.0 which-boxed-primitive: 1.1.1 + unconfig-core@7.5.0: + dependencies: + '@quansync/fs': 1.0.0 + quansync: 1.0.0 + undici-types@6.21.0: {} undici-types@7.18.2: {} @@ -9616,12 +9362,12 @@ snapshots: dependencies: punycode: 2.3.1 - url-loader@4.1.1(webpack@5.108.4(esbuild@0.28.1)(postcss@8.5.16)): + url-loader@4.1.1(webpack@5.108.4(esbuild@0.28.1)): dependencies: loader-utils: 2.0.4 mime-types: 2.1.35 schema-utils: 3.3.0 - webpack: 5.108.4(esbuild@0.28.1)(postcss@8.5.16) + webpack: 5.108.4(esbuild@0.28.1) util-deprecate@1.0.2: {} @@ -9707,7 +9453,7 @@ snapshots: webidl-conversions@7.0.0: {} - webpack-http-server@0.5.0(esbuild@0.28.1)(postcss@8.5.16): + webpack-http-server@0.5.0(esbuild@0.28.1): dependencies: '@types/express': 4.17.25 '@types/mustache': 4.2.6 @@ -9715,7 +9461,7 @@ snapshots: memfs: 3.5.3 mustache: 4.2.0 outvariant: 1.4.3 - webpack: 5.108.4(esbuild@0.28.1)(postcss@8.5.16) + webpack: 5.108.4(esbuild@0.28.1) transitivePeerDependencies: - '@minify-html/node' - '@swc/core' @@ -9740,7 +9486,7 @@ snapshots: webpack-sources@3.5.1: {} - webpack@5.108.4(esbuild@0.28.1)(postcss@8.5.16): + webpack@5.108.4(esbuild@0.28.1): dependencies: '@types/estree': 1.0.9 '@types/json-schema': 7.0.15 @@ -9758,7 +9504,7 @@ snapshots: graceful-fs: 4.2.11 loader-runner: 4.3.2 mime-db: 1.54.0 - minimizer-webpack-plugin: 5.6.1(esbuild@0.28.1)(postcss@8.5.16)(webpack@5.108.4(esbuild@0.28.1)(postcss@8.5.16)) + minimizer-webpack-plugin: 5.6.1(esbuild@0.28.1)(webpack@5.108.4(esbuild@0.28.1)) neo-async: 2.6.2 schema-utils: 4.3.3 tapable: 2.3.3 diff --git a/tsdown.config.mts b/tsdown.config.mts new file mode 100644 index 000000000..5e8bdb6cd --- /dev/null +++ b/tsdown.config.mts @@ -0,0 +1,212 @@ +import fs from 'node:fs' +import * as path from 'node:path' +import { fileURLToPath } from 'node:url' +import { defineConfig, type UserConfig } from 'tsdown' +import * as glob from 'glob' +import { + getWorkerChecksum, + copyWorkerPlugin, +} from './config/plugins/rolldown/copyWorkerPlugin.ts' +import { resolveCoreImportsPlugin } from './config/plugins/rolldown/resolveCoreImportsPlugin.ts' +import { forceFileExtensionsPlugin } from './config/plugins/rolldown/forceFileExtensionsPlugin.ts' +import { graphqlImportPlugin } from './config/plugins/rolldown/graphQLImportPlugin.ts' + +const __dirname = path.dirname(fileURLToPath(import.meta.url)) +const packageJson = JSON.parse( + fs.readFileSync(new URL('./package.json', import.meta.url), 'utf8'), +) as { dependencies: Record } + +const ecosystemDependencies = /^@mswjs\/(.+)$/ +const mswCore = /#core(\/.+)?$/ +const SERVICE_WORKER_CHECKSUM = getWorkerChecksum() + +const commonConfig = { + target: 'esnext', + fixedExtension: false, + hash: false, + report: false, + clean: false, +} satisfies UserConfig + +const shimConfigs: UserConfig[] = glob + .sync('./src/shims/**/*.ts', { + posix: true, + dotRelative: true, + }) + .map((entry) => ({ + ...commonConfig, + name: `shims:${path.basename(entry, '.ts')}`, + platform: 'neutral', + entry: [entry], + format: ['esm', 'cjs'], + deps: { + alwaysBundle: Object.keys(packageJson.dependencies), + onlyBundle: false, + }, + inputOptions: { + resolve: { + mainFields: ['main', 'module'], + }, + }, + outputOptions: { + codeSplitting: false, + }, + outDir: './lib/shims', + unbundle: false, + sourcemap: false, + dts: { build: true }, + })) + +const coreConfig: UserConfig = { + ...commonConfig, + name: 'core', + platform: 'neutral', + entry: glob.sync('./src/core/**/*.ts', { + ignore: '**/*.test.ts', + posix: true, + dotRelative: true, + }), + deps: { + neverBundle: [ecosystemDependencies, /shims\/(cookie|statuses)$/], + onlyBundle: false, + }, + format: { + esm: { + plugins: [graphqlImportPlugin(), forceFileExtensionsPlugin()], + }, + cjs: { + plugins: [forceFileExtensionsPlugin()], + }, + }, + outDir: './lib/core', + unbundle: true, + sourcemap: true, + dts: { build: true }, + tsconfig: path.resolve(__dirname, 'src/tsconfig.core.build.json'), +} + +const nodeConfig: UserConfig = { + ...commonConfig, + name: 'node', + platform: 'node', + entry: ['./src/node/index.ts'], + inputOptions: { + transform: { + inject: { + setTimeout: ['./config/polyfills-node.ts', 'setTimeout'], + }, + }, + }, + deps: { + neverBundle: [mswCore, ecosystemDependencies], + onlyBundle: false, + }, + format: ['esm', 'cjs'], + outDir: './lib/node', + unbundle: false, + outputOptions: { + codeSplitting: false, + }, + sourcemap: true, + dts: { build: true }, + tsconfig: path.resolve(__dirname, 'src/tsconfig.node.build.json'), + plugins: [resolveCoreImportsPlugin(), forceFileExtensionsPlugin()], +} + +const browserConfig: UserConfig = { + ...commonConfig, + name: 'browser', + platform: 'browser', + entry: ['./src/browser/index.ts'], + deps: { + neverBundle: [mswCore, ecosystemDependencies], + alwaysBundle: Object.keys(packageJson.dependencies).filter( + (packageName) => { + return !ecosystemDependencies.test(packageName) + }, + ), + onlyBundle: false, + }, + format: ['esm', 'cjs'], + outDir: './lib/browser', + unbundle: false, + outputOptions: { + codeSplitting: false, + }, + sourcemap: true, + dts: { build: true }, + tsconfig: path.resolve(__dirname, 'src/browser/tsconfig.browser.build.json'), + define: { + SERVICE_WORKER_CHECKSUM: JSON.stringify(SERVICE_WORKER_CHECKSUM), + }, + plugins: [ + resolveCoreImportsPlugin(), + forceFileExtensionsPlugin(), + copyWorkerPlugin(SERVICE_WORKER_CHECKSUM), + ], +} + +const reactNativeConfig: UserConfig = { + ...commonConfig, + name: 'react-native', + platform: 'node', + entry: ['./src/native/index.ts'], + deps: { + neverBundle: [ + 'picocolors', + 'util', + 'events', + mswCore, + ecosystemDependencies, + ], + onlyBundle: false, + }, + format: ['esm', 'cjs'], + outDir: './lib/native', + unbundle: false, + outputOptions: { + codeSplitting: false, + }, + sourcemap: true, + dts: { build: true }, + tsconfig: path.resolve(__dirname, 'src/tsconfig.node.build.json'), + plugins: [resolveCoreImportsPlugin(), forceFileExtensionsPlugin()], +} + +const iifeConfig: UserConfig = { + ...commonConfig, + name: 'iife', + platform: 'browser', + globalName: 'MockServiceWorker', + entry: ['./src/iife/index.ts'], + deps: { + alwaysBundle: [ + ...Object.keys(packageJson.dependencies), + ecosystemDependencies, + ], + onlyBundle: false, + }, + outDir: './lib/iife', + format: ['iife'], + unbundle: false, + outputOptions: { + entryFileNames: 'index.js', + chunkFileNames: '[name].js', + codeSplitting: false, + }, + sourcemap: true, + dts: false, + tsconfig: path.resolve(__dirname, 'src/browser/tsconfig.browser.build.json'), + define: { + SERVICE_WORKER_CHECKSUM: JSON.stringify(SERVICE_WORKER_CHECKSUM), + }, +} + +export default defineConfig([ + ...shimConfigs, + coreConfig, + nodeConfig, + reactNativeConfig, + browserConfig, + iifeConfig, +]) diff --git a/tsup.config.ts b/tsup.config.ts deleted file mode 100644 index 29bfc6d2f..000000000 --- a/tsup.config.ts +++ /dev/null @@ -1,164 +0,0 @@ -import * as path from 'node:path' -import { defineConfig, Options } from 'tsup' -import * as glob from 'glob' -import { - getWorkerChecksum, - copyWorkerPlugin, -} from './config/plugins/esbuild/copyWorkerPlugin' -import { resolveCoreImportsPlugin } from './config/plugins/esbuild/resolveCoreImportsPlugin' -import { forceEsmExtensionsPlugin } from './config/plugins/esbuild/forceEsmExtensionsPlugin' -import { graphqlImportPlugin } from './config/plugins/esbuild/graphQLImportPlugin' -import packageJson from './package.json' - -// Externalize the in-house dependencies so that the user -// would get the latest published version automatically. -const ecosystemDependencies = /^@mswjs\/(.+)$/ - -// Externalize the core functionality (reused across environments) -// so that it can be shared between the environments. -const mswCore = /#core(\/.+)?$/ - -const SERVICE_WORKER_CHECKSUM = getWorkerChecksum() - -/** - * A designated configuration for CJS shims. - * This bundles the shims so CJS modules could be used - * in the browser. - */ -const shimConfig: Options = { - name: 'shims', - platform: 'neutral', - entry: glob.sync('./src/shims/**/*.ts', { - posix: true, - dotRelative: true, - }), - format: ['esm', 'cjs'], - noExternal: Object.keys(packageJson.dependencies), - outDir: './lib/shims', - bundle: true, - splitting: false, - sourcemap: false, - dts: true, -} - -const coreConfig: Options = { - name: 'core', - platform: 'neutral', - entry: glob.sync('./src/core/**/*.ts', { - ignore: '**/*.test.ts', - posix: true, - dotRelative: true, - }), - external: [ecosystemDependencies], - noExternal: ['cookie'], - format: ['esm', 'cjs'], - outDir: './lib/core', - bundle: false, - splitting: false, - sourcemap: true, - dts: true, - tsconfig: path.resolve(__dirname, 'src/tsconfig.core.build.json'), - esbuildPlugins: [graphqlImportPlugin(), forceEsmExtensionsPlugin()], -} - -const nodeConfig: Options = { - name: 'node', - platform: 'node', - entry: ['./src/node/index.ts'], - inject: ['./config/polyfills-node.ts'], - external: [mswCore, ecosystemDependencies], - format: ['esm', 'cjs'], - outDir: './lib/node', - bundle: true, - splitting: false, - sourcemap: true, - dts: true, - tsconfig: path.resolve(__dirname, 'src/tsconfig.node.build.json'), - esbuildPlugins: [resolveCoreImportsPlugin(), forceEsmExtensionsPlugin()], -} - -const browserConfig: Options = { - name: 'browser', - platform: 'browser', - entry: ['./src/browser/index.ts'], - external: [mswCore, ecosystemDependencies], - format: ['esm', 'cjs'], - outDir: './lib/browser', - bundle: true, - splitting: false, - sourcemap: true, - dts: true, - noExternal: Object.keys(packageJson.dependencies).filter((packageName) => { - /** - * @note Never bundle MSW core so all builds reference the *same* - * JavaScript and TypeScript core files. This way types across - * export paths remain compatible: - * import { http } from 'msw' // <- core - * import { setupWorker } from 'msw/browser' // <- /browser - * setupWorker(http.get(path, resolver)) // OK - */ - return !mswCore.test(packageName) - }), - /** - * @note Use a proxy TypeScript configuration where the "compilerOptions.composite" - * option is set to false. - * @see https://github.com/egoist/tsup/issues/571 - */ - tsconfig: path.resolve(__dirname, 'src/browser/tsconfig.browser.build.json'), - define: { - SERVICE_WORKER_CHECKSUM: JSON.stringify(SERVICE_WORKER_CHECKSUM), - }, - esbuildPlugins: [ - resolveCoreImportsPlugin(), - forceEsmExtensionsPlugin(), - copyWorkerPlugin(SERVICE_WORKER_CHECKSUM), - ], -} - -const reactNativeConfig: Options = { - name: 'react-native', - platform: 'node', - entry: ['./src/native/index.ts'], - external: ['picocolors', 'util', 'events', mswCore, ecosystemDependencies], - format: ['esm', 'cjs'], - outDir: './lib/native', - bundle: true, - splitting: false, - sourcemap: true, - dts: true, - tsconfig: path.resolve(__dirname, 'src/tsconfig.node.build.json'), - esbuildPlugins: [resolveCoreImportsPlugin(), forceEsmExtensionsPlugin()], -} - -const iifeConfig: Options = { - name: 'iife', - platform: 'browser', - globalName: 'MockServiceWorker', - entry: ['./src/iife/index.ts'], - /** - * @note Legacy output format will automatically create - * a "iife" directory under the "outDir". - */ - outDir: './lib', - format: ['iife'], - legacyOutput: true, - bundle: true, - splitting: false, - sourcemap: true, - dts: false, - tsconfig: path.resolve(__dirname, 'src/browser/tsconfig.browser.build.json'), - define: { - // Sign the IIFE build as well because any bundle containing - // the worker API must have the the integrity checksum defined. - SERVICE_WORKER_CHECKSUM: JSON.stringify(SERVICE_WORKER_CHECKSUM), - }, -} - -export default defineConfig([ - shimConfig, - coreConfig, - nodeConfig, - reactNativeConfig, - browserConfig, - iifeConfig, -])