From 454e2d1089d5979f7f4c3597fc24ac60183b109d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BF=A0=20/=20green?= Date: Wed, 29 May 2024 23:47:51 +0900 Subject: [PATCH] refactor: remove acorn (#16238) --- package.json | 17 +- packages/vite/LICENSE.md | 58 ------ packages/vite/package.json | 2 - .../plugins/importGlob/parse.spec.ts | 2 +- .../src/node/plugins/dynamicImportVars.ts | 9 +- .../vite/src/node/plugins/importAnalysis.ts | 29 +-- .../vite/src/node/plugins/importMetaGlob.ts | 99 ++++----- patches/acorn@8.11.3.patch | 12 ++ pnpm-lock.yaml | 196 ++++++++---------- 9 files changed, 177 insertions(+), 247 deletions(-) create mode 100644 patches/acorn@8.11.3.patch diff --git a/package.json b/package.json index 79a6715587ae0e..859284831cdf8a 100644 --- a/package.json +++ b/package.json @@ -104,22 +104,11 @@ "overrides": { "vite": "workspace:*" }, - "packageExtensions": { - "acorn-walk": { - "peerDependencies": { - "acorn": "*" - }, - "peerDependenciesMeta": { - "acorn": { - "optional": true - } - } - } - }, "patchedDependencies": { + "acorn@8.11.3": "patches/acorn@8.11.3.patch", "chokidar@3.6.0": "patches/chokidar@3.6.0.patch", - "sirv@2.0.4": "patches/sirv@2.0.4.patch", - "http-proxy@1.18.1": "patches/http-proxy@1.18.1.patch" + "http-proxy@1.18.1": "patches/http-proxy@1.18.1.patch", + "sirv@2.0.4": "patches/sirv@2.0.4.patch" }, "peerDependencyRules": { "allowedVersions": { diff --git a/packages/vite/LICENSE.md b/packages/vite/LICENSE.md index a0bb20bc76e943..e7c1df60e8cdf6 100644 --- a/packages/vite/LICENSE.md +++ b/packages/vite/LICENSE.md @@ -587,64 +587,6 @@ Repository: rollup/plugins --------------------------------------- -## acorn -License: MIT -By: Marijn Haverbeke, Ingvar Stepanyan, Adrian Heine -Repository: https://github.com/acornjs/acorn.git - -> MIT License -> -> Copyright (C) 2012-2022 by various contributors (see AUTHORS) -> -> Permission is hereby granted, free of charge, to any person obtaining a copy -> of this software and associated documentation files (the "Software"), to deal -> in the Software without restriction, including without limitation the rights -> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -> copies of the Software, and to permit persons to whom the Software is -> furnished to do so, subject to the following conditions: -> -> The above copyright notice and this permission notice shall be included in -> all copies or substantial portions of the Software. -> -> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -> THE SOFTWARE. - ---------------------------------------- - -## acorn-walk -License: MIT -By: Marijn Haverbeke, Ingvar Stepanyan, Adrian Heine -Repository: https://github.com/acornjs/acorn.git - -> MIT License -> -> Copyright (C) 2012-2020 by various contributors (see AUTHORS) -> -> Permission is hereby granted, free of charge, to any person obtaining a copy -> of this software and associated documentation files (the "Software"), to deal -> in the Software without restriction, including without limitation the rights -> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -> copies of the Software, and to permit persons to whom the Software is -> furnished to do so, subject to the following conditions: -> -> The above copyright notice and this permission notice shall be included in -> all copies or substantial portions of the Software. -> -> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -> THE SOFTWARE. - ---------------------------------------- - ## ansi-regex License: MIT By: Sindre Sorhus diff --git a/packages/vite/package.json b/packages/vite/package.json index 4b4be1a6a92b4b..8633409aed9870 100644 --- a/packages/vite/package.json +++ b/packages/vite/package.json @@ -106,8 +106,6 @@ "@rollup/pluginutils": "^5.1.0", "@types/escape-html": "^1.0.4", "@types/pnpapi": "^0.0.5", - "acorn": "^8.11.3", - "acorn-walk": "^8.3.2", "artichokie": "^0.2.1", "cac": "^6.7.14", "chokidar": "^3.6.0", diff --git a/packages/vite/src/node/__tests__/plugins/importGlob/parse.spec.ts b/packages/vite/src/node/__tests__/plugins/importGlob/parse.spec.ts index e5ebe729d96504..de52b8eb1ae470 100644 --- a/packages/vite/src/node/__tests__/plugins/importGlob/parse.spec.ts +++ b/packages/vite/src/node/__tests__/plugins/importGlob/parse.spec.ts @@ -237,7 +237,7 @@ describe('parse positives', async () => { describe('parse negatives', async () => { it('syntax error', async () => { expect(await runError('import.meta.glob(')).toMatchInlineSnapshot( - '[SyntaxError: Unexpected token (1:17)]', + '[Error: Invalid glob import syntax: Close parenthesis not found]', ) }) diff --git a/packages/vite/src/node/plugins/dynamicImportVars.ts b/packages/vite/src/node/plugins/dynamicImportVars.ts index ba3958460a5f63..8c55632a78f234 100644 --- a/packages/vite/src/node/plugins/dynamicImportVars.ts +++ b/packages/vite/src/node/plugins/dynamicImportVars.ts @@ -2,7 +2,7 @@ import { posix } from 'node:path' import MagicString from 'magic-string' import { init, parse as parseImports } from 'es-module-lexer' import type { ImportSpecifier } from 'es-module-lexer' -import { parse as parseJS } from 'acorn' +import { parseAst } from 'rollup/parseAst' import { dynamicImportToGlob } from '@rollup/plugin-dynamic-import-vars' import type { Plugin } from '../plugin' import type { ResolvedConfig } from '../config' @@ -68,12 +68,7 @@ function parseDynamicImportPattern( strings: string, ): DynamicImportPattern | null { const filename = strings.slice(1, -1) - const ast = ( - parseJS(strings, { - ecmaVersion: 'latest', - sourceType: 'module', - }) as any - ).body[0].expression + const ast = (parseAst(strings).body[0] as any).expression const userPatternQuery = dynamicImportToGlob(ast, filename) if (!userPatternQuery) { diff --git a/packages/vite/src/node/plugins/importAnalysis.ts b/packages/vite/src/node/plugins/importAnalysis.ts index f7fe6940ac9ef3..754a800f0b55b2 100644 --- a/packages/vite/src/node/plugins/importAnalysis.ts +++ b/packages/vite/src/node/plugins/importAnalysis.ts @@ -8,9 +8,9 @@ import type { ImportSpecifier, } from 'es-module-lexer' import { init, parse as parseImports } from 'es-module-lexer' -import { parse as parseJS } from 'acorn' -import type { Node } from 'estree' -import { findStaticImports, parseStaticImport } from 'mlly' +import { parseAst } from 'rollup/parseAst' +import type { StaticImport } from 'mlly' +import { ESM_STATIC_IMPORT_RE, parseStaticImport } from 'mlly' import { makeLegalIdentifier } from '@rollup/pluginutils' import type { ViteDevServer } from '..' import { @@ -119,11 +119,21 @@ function extractImportedBindings( } const exp = source.slice(importSpec.ss, importSpec.se) - const [match0] = findStaticImports(exp) - if (!match0) { + ESM_STATIC_IMPORT_RE.lastIndex = 0 + const match = ESM_STATIC_IMPORT_RE.exec(exp) + if (!match) { return } - const parsed = parseStaticImport(match0) + + const staticImport: StaticImport = { + type: 'static', + code: match[0], + start: match.index, + end: match.index + match[0].length, + imports: match.groups!.imports, + specifier: match.groups!.specifier, + } + const parsed = parseStaticImport(staticImport) if (!parsed) { return } @@ -934,12 +944,7 @@ export function transformCjsImport( importer: string, config: ResolvedConfig, ): string | undefined { - const node = ( - parseJS(importExp, { - ecmaVersion: 'latest', - sourceType: 'module', - }) as any - ).body[0] as Node + const node = parseAst(importExp).body[0] // `export * from '...'` may cause unexpected problem, so give it a warning if ( diff --git a/packages/vite/src/node/plugins/importMetaGlob.ts b/packages/vite/src/node/plugins/importMetaGlob.ts index 413c60f785a514..8f2475709003c0 100644 --- a/packages/vite/src/node/plugins/importMetaGlob.ts +++ b/packages/vite/src/node/plugins/importMetaGlob.ts @@ -4,22 +4,18 @@ import { stripLiteral } from 'strip-literal' import colors from 'picocolors' import type { ArrayExpression, - CallExpression, Expression, Literal, - MemberExpression, Node, - SequenceExpression, SpreadElement, TemplateLiteral, } from 'estree' -import { parseExpressionAt } from 'acorn' -import type { CustomPluginOptions, RollupError } from 'rollup' -import { findNodeAt } from 'acorn-walk' +import type { CustomPluginOptions, RollupAstNode, RollupError } from 'rollup' import MagicString from 'magic-string' import fg from 'fast-glob' import { stringifyQuery } from 'ufo' import type { GeneralImportGlobOptions } from 'types/importGlob' +import { parseAstAsync } from 'rollup/parseAst' import type { Plugin } from '../plugin' import type { ViteDevServer } from '../server' import type { ModuleNode } from '../server/moduleGraph' @@ -218,7 +214,7 @@ export async function parseImportGlob( resolveId: IdResolver, logger?: Logger, ): Promise { - let cleanCode + let cleanCode: string try { cleanCode = stripLiteral(code) } catch (e) { @@ -236,51 +232,30 @@ export async function parseImportGlob( return e } - let ast: CallExpression | SequenceExpression | MemberExpression - let lastTokenPos: number | undefined - - try { - ast = parseExpressionAt(code, start, { - ecmaVersion: 'latest', - sourceType: 'module', - ranges: true, - onToken: (token) => { - lastTokenPos = token.end - }, - }) as any - } catch (e) { - const _e = e as any - if (_e.message && _e.message.startsWith('Unterminated string constant')) - return undefined! - if (lastTokenPos == null || lastTokenPos <= start) throw _e - - // tailing comma in object or array will make the parser think it's a comma operation - // we try to parse again removing the comma - try { - const statement = code.slice(start, lastTokenPos).replace(/[,\s]*$/, '') - ast = parseExpressionAt( - ' '.repeat(start) + statement, // to keep the ast position - start, - { - ecmaVersion: 'latest', - sourceType: 'module', - ranges: true, - }, - ) as any - } catch { - throw _e - } + const end = + findCorrespondingCloseParenthesisPosition( + cleanCode, + start + match[0].length, + ) + 1 + if (end <= 0) { + throw err('Close parenthesis not found') } - const found = findNodeAt(ast as any, start, undefined, 'CallExpression') - if (!found) throw err(`Expect CallExpression, got ${ast.type}`) - ast = found.node as unknown as CallExpression + const statementCode = code.slice(start, end) + const rootAst = (await parseAstAsync(statementCode)).body[0] + if (rootAst.type !== 'ExpressionStatement') { + throw err(`Expect CallExpression, got ${rootAst.type}`) + } + const ast = rootAst.expression + if (ast.type !== 'CallExpression') { + throw err(`Expect CallExpression, got ${ast.type}`) + } if (ast.arguments.length < 1 || ast.arguments.length > 2) throw err(`Expected 1-2 arguments, but got ${ast.arguments.length}`) const arg1 = ast.arguments[0] as ArrayExpression | Literal | TemplateLiteral - const arg2 = ast.arguments[1] as Node | undefined + const arg2 = ast.arguments[1] as RollupAstNode | undefined const globs: string[] = [] @@ -321,14 +296,12 @@ export async function parseImportGlob( ) options = parseGlobOptions( - code.slice(arg2.range![0], arg2.range![1]), - arg2.range![0], + code.slice(start + arg2.start, start + arg2.end), + start + arg2.start, logger, ) } - const end = ast.range![1] - const globsResolved = await Promise.all( globs.map((glob) => toAbsoluteGlob(glob, root, importer, resolveId)), ) @@ -348,6 +321,34 @@ export async function parseImportGlob( return (await Promise.all(tasks)).filter(Boolean) } +function findCorrespondingCloseParenthesisPosition( + cleanCode: string, + openPos: number, +) { + const closePos = cleanCode.indexOf(')', openPos) + if (closePos < 0) return -1 + + if (!cleanCode.slice(openPos, closePos).includes('(')) return closePos + + let remainingParenthesisCount = 0 + const cleanCodeLen = cleanCode.length + for (let pos = openPos; pos < cleanCodeLen; pos++) { + switch (cleanCode[pos]) { + case '(': { + remainingParenthesisCount++ + break + } + case ')': { + remainingParenthesisCount-- + if (remainingParenthesisCount <= 0) { + return pos + } + } + } + } + return -1 +} + const importPrefix = '__vite_glob_' const { basename, dirname, relative, join } = posix diff --git a/patches/acorn@8.11.3.patch b/patches/acorn@8.11.3.patch new file mode 100644 index 00000000000000..af0b6b8724d08b --- /dev/null +++ b/patches/acorn@8.11.3.patch @@ -0,0 +1,12 @@ +diff --git a/package.json b/package.json +index 1b8dc76afc3cf5890cc3693c2975577fd3117dd6..9ac3a4d813fda1be476bd896a8f6168b3a459e41 100644 +--- a/package.json ++++ b/package.json +@@ -46,5 +46,6 @@ + }, + "bin": { + "acorn": "./bin/acorn" +- } ++ }, ++ "sideEffects": false + } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6b8df3d3b06d4a..a912f701863eff 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -7,9 +7,10 @@ settings: overrides: vite: workspace:* -packageExtensionsChecksum: 4e49e84b7a11dfd4895fbffb006a7015 - patchedDependencies: + acorn@8.11.3: + hash: updblechagntmruccl446lr76a + path: patches/acorn@8.11.3.patch chokidar@3.6.0: hash: bckcfsslxcffppz65mxcq6naau path: patches/chokidar@3.6.0.patch @@ -219,7 +220,7 @@ importers: devDependencies: acorn: specifier: ^8.11.3 - version: 8.11.3 + version: 8.11.3(patch_hash=updblechagntmruccl446lr76a) picocolors: specifier: ^1.0.1 version: 1.0.1 @@ -234,7 +235,7 @@ importers: dependencies: esbuild: specifier: ^0.21.3 - version: 0.21.3 + version: 0.21.4 postcss: specifier: ^8.4.38 version: 8.4.38 @@ -285,12 +286,6 @@ importers: '@types/pnpapi': specifier: ^0.0.5 version: 0.0.5 - acorn: - specifier: ^8.11.3 - version: 8.11.3 - acorn-walk: - specifier: ^8.3.2 - version: 8.3.2(acorn@8.11.3) artichokie: specifier: ^0.2.1 version: 0.2.1 @@ -395,7 +390,7 @@ importers: version: 6.1.1(rollup@4.13.0)(typescript@5.2.2) rollup-plugin-esbuild: specifier: ^6.1.1 - version: 6.1.1(esbuild@0.21.3)(rollup@4.13.0) + version: 6.1.1(esbuild@0.21.4)(rollup@4.13.0) rollup-plugin-license: specifier: ^3.4.0 version: 3.4.0(rollup@4.13.0) @@ -3036,8 +3031,8 @@ packages: dev: true optional: true - /@esbuild/aix-ppc64@0.21.3: - resolution: {integrity: sha512-yTgnwQpFVYfvvo4SvRFB0SwrW8YjOxEoT7wfMT7Ol5v7v5LDNvSGo67aExmxOb87nQNeWPVvaGBNfQ7BXcrZ9w==} + /@esbuild/aix-ppc64@0.21.4: + resolution: {integrity: sha512-Zrm+B33R4LWPLjDEVnEqt2+SLTATlru1q/xYKVn8oVTbiRBGmK2VIMoIYGJDGyftnGaC788IuzGFAlb7IQ0Y8A==} engines: {node: '>=12'} cpu: [ppc64] os: [aix] @@ -3071,8 +3066,8 @@ packages: dev: true optional: true - /@esbuild/android-arm64@0.21.3: - resolution: {integrity: sha512-c+ty9necz3zB1Y+d/N+mC6KVVkGUUOcm4ZmT5i/Fk5arOaY3i6CA3P5wo/7+XzV8cb4GrI/Zjp8NuOQ9Lfsosw==} + /@esbuild/android-arm64@0.21.4: + resolution: {integrity: sha512-fYFnz+ObClJ3dNiITySBUx+oNalYUT18/AryMxfovLkYWbutXsct3Wz2ZWAcGGppp+RVVX5FiXeLYGi97umisA==} engines: {node: '>=12'} cpu: [arm64] os: [android] @@ -3106,8 +3101,8 @@ packages: dev: true optional: true - /@esbuild/android-arm@0.21.3: - resolution: {integrity: sha512-bviJOLMgurLJtF1/mAoJLxDZDL6oU5/ztMHnJQRejbJrSc9FFu0QoUoFhvi6qSKJEw9y5oGyvr9fuDtzJ30rNQ==} + /@esbuild/android-arm@0.21.4: + resolution: {integrity: sha512-E7H/yTd8kGQfY4z9t3nRPk/hrhaCajfA3YSQSBrst8B+3uTcgsi8N+ZWYCaeIDsiVs6m65JPCaQN/DxBRclF3A==} engines: {node: '>=12'} cpu: [arm] os: [android] @@ -3141,8 +3136,8 @@ packages: dev: true optional: true - /@esbuild/android-x64@0.21.3: - resolution: {integrity: sha512-JReHfYCRK3FVX4Ra+y5EBH1b9e16TV2OxrPAvzMsGeES0X2Ndm9ImQRI4Ket757vhc5XBOuGperw63upesclRw==} + /@esbuild/android-x64@0.21.4: + resolution: {integrity: sha512-mDqmlge3hFbEPbCWxp4fM6hqq7aZfLEHZAKGP9viq9wMUBVQx202aDIfc3l+d2cKhUJM741VrCXEzRFhPDKH3Q==} engines: {node: '>=12'} cpu: [x64] os: [android] @@ -3176,8 +3171,8 @@ packages: dev: true optional: true - /@esbuild/darwin-arm64@0.21.3: - resolution: {integrity: sha512-U3fuQ0xNiAkXOmQ6w5dKpEvXQRSpHOnbw7gEfHCRXPeTKW9sBzVck6C5Yneb8LfJm0l6le4NQfkNPnWMSlTFUQ==} + /@esbuild/darwin-arm64@0.21.4: + resolution: {integrity: sha512-72eaIrDZDSiWqpmCzVaBD58c8ea8cw/U0fq/PPOTqE3c53D0xVMRt2ooIABZ6/wj99Y+h4ksT/+I+srCDLU9TA==} engines: {node: '>=12'} cpu: [arm64] os: [darwin] @@ -3211,8 +3206,8 @@ packages: dev: true optional: true - /@esbuild/darwin-x64@0.21.3: - resolution: {integrity: sha512-3m1CEB7F07s19wmaMNI2KANLcnaqryJxO1fXHUV5j1rWn+wMxdUYoPyO2TnAbfRZdi7ADRwJClmOwgT13qlP3Q==} + /@esbuild/darwin-x64@0.21.4: + resolution: {integrity: sha512-uBsuwRMehGmw1JC7Vecu/upOjTsMhgahmDkWhGLWxIgUn2x/Y4tIwUZngsmVb6XyPSTXJYS4YiASKPcm9Zitag==} engines: {node: '>=12'} cpu: [x64] os: [darwin] @@ -3246,8 +3241,8 @@ packages: dev: true optional: true - /@esbuild/freebsd-arm64@0.21.3: - resolution: {integrity: sha512-fsNAAl5pU6wmKHq91cHWQT0Fz0vtyE1JauMzKotrwqIKAswwP5cpHUCxZNSTuA/JlqtScq20/5KZ+TxQdovU/g==} + /@esbuild/freebsd-arm64@0.21.4: + resolution: {integrity: sha512-8JfuSC6YMSAEIZIWNL3GtdUT5NhUA/CMUCpZdDRolUXNAXEE/Vbpe6qlGLpfThtY5NwXq8Hi4nJy4YfPh+TwAg==} engines: {node: '>=12'} cpu: [arm64] os: [freebsd] @@ -3281,8 +3276,8 @@ packages: dev: true optional: true - /@esbuild/freebsd-x64@0.21.3: - resolution: {integrity: sha512-tci+UJ4zP5EGF4rp8XlZIdq1q1a/1h9XuronfxTMCNBslpCtmk97Q/5qqy1Mu4zIc0yswN/yP/BLX+NTUC1bXA==} + /@esbuild/freebsd-x64@0.21.4: + resolution: {integrity: sha512-8d9y9eQhxv4ef7JmXny7591P/PYsDFc4+STaxC1GBv0tMyCdyWfXu2jBuqRsyhY8uL2HU8uPyscgE2KxCY9imQ==} engines: {node: '>=12'} cpu: [x64] os: [freebsd] @@ -3316,8 +3311,8 @@ packages: dev: true optional: true - /@esbuild/linux-arm64@0.21.3: - resolution: {integrity: sha512-vvG6R5g5ieB4eCJBQevyDMb31LMHthLpXTc2IGkFnPWS/GzIFDnaYFp558O+XybTmYrVjxnryru7QRleJvmZ6Q==} + /@esbuild/linux-arm64@0.21.4: + resolution: {integrity: sha512-/GLD2orjNU50v9PcxNpYZi+y8dJ7e7/LhQukN3S4jNDXCKkyyiyAz9zDw3siZ7Eh1tRcnCHAo/WcqKMzmi4eMQ==} engines: {node: '>=12'} cpu: [arm64] os: [linux] @@ -3351,8 +3346,8 @@ packages: dev: true optional: true - /@esbuild/linux-arm@0.21.3: - resolution: {integrity: sha512-f6kz2QpSuyHHg01cDawj0vkyMwuIvN62UAguQfnNVzbge2uWLhA7TCXOn83DT0ZvyJmBI943MItgTovUob36SQ==} + /@esbuild/linux-arm@0.21.4: + resolution: {integrity: sha512-2rqFFefpYmpMs+FWjkzSgXg5vViocqpq5a1PSRgT0AvSgxoXmGF17qfGAzKedg6wAwyM7UltrKVo9kxaJLMF/g==} engines: {node: '>=12'} cpu: [arm] os: [linux] @@ -3386,8 +3381,8 @@ packages: dev: true optional: true - /@esbuild/linux-ia32@0.21.3: - resolution: {integrity: sha512-HjCWhH7K96Na+66TacDLJmOI9R8iDWDDiqe17C7znGvvE4sW1ECt9ly0AJ3dJH62jHyVqW9xpxZEU1jKdt+29A==} + /@esbuild/linux-ia32@0.21.4: + resolution: {integrity: sha512-pNftBl7m/tFG3t2m/tSjuYeWIffzwAZT9m08+9DPLizxVOsUl8DdFzn9HvJrTQwe3wvJnwTdl92AonY36w/25g==} engines: {node: '>=12'} cpu: [ia32] os: [linux] @@ -3421,8 +3416,8 @@ packages: dev: true optional: true - /@esbuild/linux-loong64@0.21.3: - resolution: {integrity: sha512-BGpimEccmHBZRcAhdlRIxMp7x9PyJxUtj7apL2IuoG9VxvU/l/v1z015nFs7Si7tXUwEsvjc1rOJdZCn4QTU+Q==} + /@esbuild/linux-loong64@0.21.4: + resolution: {integrity: sha512-cSD2gzCK5LuVX+hszzXQzlWya6c7hilO71L9h4KHwqI4qeqZ57bAtkgcC2YioXjsbfAv4lPn3qe3b00Zt+jIfQ==} engines: {node: '>=12'} cpu: [loong64] os: [linux] @@ -3456,8 +3451,8 @@ packages: dev: true optional: true - /@esbuild/linux-mips64el@0.21.3: - resolution: {integrity: sha512-5rMOWkp7FQGtAH3QJddP4w3s47iT20hwftqdm7b+loe95o8JU8ro3qZbhgMRy0VuFU0DizymF1pBKkn3YHWtsw==} + /@esbuild/linux-mips64el@0.21.4: + resolution: {integrity: sha512-qtzAd3BJh7UdbiXCrg6npWLYU0YpufsV9XlufKhMhYMJGJCdfX/G6+PNd0+v877X1JG5VmjBLUiFB0o8EUSicA==} engines: {node: '>=12'} cpu: [mips64el] os: [linux] @@ -3491,8 +3486,8 @@ packages: dev: true optional: true - /@esbuild/linux-ppc64@0.21.3: - resolution: {integrity: sha512-h0zj1ldel89V5sjPLo5H1SyMzp4VrgN1tPkN29TmjvO1/r0MuMRwJxL8QY05SmfsZRs6TF0c/IDH3u7XYYmbAg==} + /@esbuild/linux-ppc64@0.21.4: + resolution: {integrity: sha512-yB8AYzOTaL0D5+2a4xEy7OVvbcypvDR05MsB/VVPVA7nL4hc5w5Dyd/ddnayStDgJE59fAgNEOdLhBxjfx5+dg==} engines: {node: '>=12'} cpu: [ppc64] os: [linux] @@ -3526,8 +3521,8 @@ packages: dev: true optional: true - /@esbuild/linux-riscv64@0.21.3: - resolution: {integrity: sha512-dkAKcTsTJ+CRX6bnO17qDJbLoW37npd5gSNtSzjYQr0svghLJYGYB0NF1SNcU1vDcjXLYS5pO4qOW4YbFama4A==} + /@esbuild/linux-riscv64@0.21.4: + resolution: {integrity: sha512-Y5AgOuVzPjQdgU59ramLoqSSiXddu7F3F+LI5hYy/d1UHN7K5oLzYBDZe23QmQJ9PIVUXwOdKJ/jZahPdxzm9w==} engines: {node: '>=12'} cpu: [riscv64] os: [linux] @@ -3561,8 +3556,8 @@ packages: dev: true optional: true - /@esbuild/linux-s390x@0.21.3: - resolution: {integrity: sha512-vnD1YUkovEdnZWEuMmy2X2JmzsHQqPpZElXx6dxENcIwTu+Cu5ERax6+Ke1QsE814Zf3c6rxCfwQdCTQ7tPuXA==} + /@esbuild/linux-s390x@0.21.4: + resolution: {integrity: sha512-Iqc/l/FFwtt8FoTK9riYv9zQNms7B8u+vAI/rxKuN10HgQIXaPzKZc479lZ0x6+vKVQbu55GdpYpeNWzjOhgbA==} engines: {node: '>=12'} cpu: [s390x] os: [linux] @@ -3596,8 +3591,8 @@ packages: dev: true optional: true - /@esbuild/linux-x64@0.21.3: - resolution: {integrity: sha512-IOXOIm9WaK7plL2gMhsWJd+l2bfrhfilv0uPTptoRoSb2p09RghhQQp9YY6ZJhk/kqmeRt6siRdMSLLwzuT0KQ==} + /@esbuild/linux-x64@0.21.4: + resolution: {integrity: sha512-Td9jv782UMAFsuLZINfUpoF5mZIbAj+jv1YVtE58rFtfvoKRiKSkRGQfHTgKamLVT/fO7203bHa3wU122V/Bdg==} engines: {node: '>=12'} cpu: [x64] os: [linux] @@ -3631,8 +3626,8 @@ packages: dev: true optional: true - /@esbuild/netbsd-x64@0.21.3: - resolution: {integrity: sha512-uTgCwsvQ5+vCQnqM//EfDSuomo2LhdWhFPS8VL8xKf+PKTCrcT/2kPPoWMTs22aB63MLdGMJiE3f1PHvCDmUOw==} + /@esbuild/netbsd-x64@0.21.4: + resolution: {integrity: sha512-Awn38oSXxsPMQxaV0Ipb7W/gxZtk5Tx3+W+rAPdZkyEhQ6968r9NvtkjhnhbEgWXYbgV+JEONJ6PcdBS+nlcpA==} engines: {node: '>=12'} cpu: [x64] os: [netbsd] @@ -3666,8 +3661,8 @@ packages: dev: true optional: true - /@esbuild/openbsd-x64@0.21.3: - resolution: {integrity: sha512-vNAkR17Ub2MgEud2Wag/OE4HTSI6zlb291UYzHez/psiKarp0J8PKGDnAhMBcHFoOHMXHfExzmjMojJNbAStrQ==} + /@esbuild/openbsd-x64@0.21.4: + resolution: {integrity: sha512-IsUmQeCY0aU374R82fxIPu6vkOybWIMc3hVGZ3ChRwL9hA1TwY+tS0lgFWV5+F1+1ssuvvXt3HFqe8roCip8Hg==} engines: {node: '>=12'} cpu: [x64] os: [openbsd] @@ -3701,8 +3696,8 @@ packages: dev: true optional: true - /@esbuild/sunos-x64@0.21.3: - resolution: {integrity: sha512-W8H9jlGiSBomkgmouaRoTXo49j4w4Kfbl6I1bIdO/vT0+0u4f20ko3ELzV3hPI6XV6JNBVX+8BC+ajHkvffIJA==} + /@esbuild/sunos-x64@0.21.4: + resolution: {integrity: sha512-hsKhgZ4teLUaDA6FG/QIu2q0rI6I36tZVfM4DBZv3BG0mkMIdEnMbhc4xwLvLJSS22uWmaVkFkqWgIS0gPIm+A==} engines: {node: '>=12'} cpu: [x64] os: [sunos] @@ -3736,8 +3731,8 @@ packages: dev: true optional: true - /@esbuild/win32-arm64@0.21.3: - resolution: {integrity: sha512-EjEomwyLSCg8Ag3LDILIqYCZAq/y3diJ04PnqGRgq8/4O3VNlXyMd54j/saShaN4h5o5mivOjAzmU6C3X4v0xw==} + /@esbuild/win32-arm64@0.21.4: + resolution: {integrity: sha512-UUfMgMoXPoA/bvGUNfUBFLCh0gt9dxZYIx9W4rfJr7+hKe5jxxHmfOK8YSH4qsHLLN4Ck8JZ+v7Q5fIm1huErg==} engines: {node: '>=12'} cpu: [arm64] os: [win32] @@ -3771,8 +3766,8 @@ packages: dev: true optional: true - /@esbuild/win32-ia32@0.21.3: - resolution: {integrity: sha512-WGiE/GgbsEwR33++5rzjiYsKyHywE8QSZPF7Rfx9EBfK3Qn3xyR6IjyCr5Uk38Kg8fG4/2phN7sXp4NPWd3fcw==} + /@esbuild/win32-ia32@0.21.4: + resolution: {integrity: sha512-yIxbspZb5kGCAHWm8dexALQ9en1IYDfErzjSEq1KzXFniHv019VT3mNtTK7t8qdy4TwT6QYHI9sEZabONHg+aw==} engines: {node: '>=12'} cpu: [ia32] os: [win32] @@ -3806,8 +3801,8 @@ packages: dev: true optional: true - /@esbuild/win32-x64@0.21.3: - resolution: {integrity: sha512-xRxC0jaJWDLYvcUvjQmHCJSfMrgmUuvsoXgDeU/wTorQ1ngDdUBuFtgY3W1Pc5sprGAvZBtWdJX7RPg/iZZUqA==} + /@esbuild/win32-x64@0.21.4: + resolution: {integrity: sha512-sywLRD3UK/qRJt0oBwdpYLBibk7KiRfbswmWRDabuncQYSlf8aLEEUor/oP6KRz8KEG+HoiVLBhPRD5JWjS8Sg==} engines: {node: '>=12'} cpu: [x64] os: [win32] @@ -5114,19 +5109,12 @@ packages: peerDependencies: acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: - acorn: 8.11.3 + acorn: 8.11.3(patch_hash=updblechagntmruccl446lr76a) dev: true - /acorn-walk@8.3.2(acorn@8.11.3): + /acorn-walk@8.3.2: resolution: {integrity: sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A==} engines: {node: '>=0.4.0'} - peerDependencies: - acorn: '*' - peerDependenciesMeta: - acorn: - optional: true - dependencies: - acorn: 8.11.3 /acorn@7.4.1: resolution: {integrity: sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==} @@ -5134,10 +5122,11 @@ packages: hasBin: true dev: true - /acorn@8.11.3: + /acorn@8.11.3(patch_hash=updblechagntmruccl446lr76a): resolution: {integrity: sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==} engines: {node: '>=0.4.0'} hasBin: true + patched: true /add-stream@1.0.0: resolution: {integrity: sha512-qQLMr+8o0WC4FZGQTcJiKBVC59JylcPSrTtk6usvmIDFUOCKegapy1VHQwRbFMOFyb/inzUVqHs+eMYKDM1YeQ==} @@ -6282,35 +6271,35 @@ packages: '@esbuild/win32-x64': 0.20.2 dev: true - /esbuild@0.21.3: - resolution: {integrity: sha512-Kgq0/ZsAPzKrbOjCQcjoSmPoWhlcVnGAUo7jvaLHoxW1Drto0KGkR1xBNg2Cp43b9ImvxmPEJZ9xkfcnqPsfBw==} + /esbuild@0.21.4: + resolution: {integrity: sha512-sFMcNNrj+Q0ZDolrp5pDhH0nRPN9hLIM3fRPwgbLYJeSHHgnXSnbV3xYgSVuOeLWH9c73VwmEverVzupIv5xuA==} engines: {node: '>=12'} hasBin: true requiresBuild: true optionalDependencies: - '@esbuild/aix-ppc64': 0.21.3 - '@esbuild/android-arm': 0.21.3 - '@esbuild/android-arm64': 0.21.3 - '@esbuild/android-x64': 0.21.3 - '@esbuild/darwin-arm64': 0.21.3 - '@esbuild/darwin-x64': 0.21.3 - '@esbuild/freebsd-arm64': 0.21.3 - '@esbuild/freebsd-x64': 0.21.3 - '@esbuild/linux-arm': 0.21.3 - '@esbuild/linux-arm64': 0.21.3 - '@esbuild/linux-ia32': 0.21.3 - '@esbuild/linux-loong64': 0.21.3 - '@esbuild/linux-mips64el': 0.21.3 - '@esbuild/linux-ppc64': 0.21.3 - '@esbuild/linux-riscv64': 0.21.3 - '@esbuild/linux-s390x': 0.21.3 - '@esbuild/linux-x64': 0.21.3 - '@esbuild/netbsd-x64': 0.21.3 - '@esbuild/openbsd-x64': 0.21.3 - '@esbuild/sunos-x64': 0.21.3 - '@esbuild/win32-arm64': 0.21.3 - '@esbuild/win32-ia32': 0.21.3 - '@esbuild/win32-x64': 0.21.3 + '@esbuild/aix-ppc64': 0.21.4 + '@esbuild/android-arm': 0.21.4 + '@esbuild/android-arm64': 0.21.4 + '@esbuild/android-x64': 0.21.4 + '@esbuild/darwin-arm64': 0.21.4 + '@esbuild/darwin-x64': 0.21.4 + '@esbuild/freebsd-arm64': 0.21.4 + '@esbuild/freebsd-x64': 0.21.4 + '@esbuild/linux-arm': 0.21.4 + '@esbuild/linux-arm64': 0.21.4 + '@esbuild/linux-ia32': 0.21.4 + '@esbuild/linux-loong64': 0.21.4 + '@esbuild/linux-mips64el': 0.21.4 + '@esbuild/linux-ppc64': 0.21.4 + '@esbuild/linux-riscv64': 0.21.4 + '@esbuild/linux-s390x': 0.21.4 + '@esbuild/linux-x64': 0.21.4 + '@esbuild/netbsd-x64': 0.21.4 + '@esbuild/openbsd-x64': 0.21.4 + '@esbuild/sunos-x64': 0.21.4 + '@esbuild/win32-arm64': 0.21.4 + '@esbuild/win32-ia32': 0.21.4 + '@esbuild/win32-x64': 0.21.4 /escalade@3.1.1: resolution: {integrity: sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==} @@ -6523,7 +6512,7 @@ packages: resolution: {integrity: sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: - acorn: 8.11.3 + acorn: 8.11.3(patch_hash=updblechagntmruccl446lr76a) acorn-jsx: 5.3.2(acorn@8.11.3) eslint-visitor-keys: 3.4.3 dev: true @@ -8231,8 +8220,8 @@ packages: hasBin: true dependencies: '@cspotcode/source-map-support': 0.8.1 - acorn: 8.11.3 - acorn-walk: 8.3.2(acorn@8.11.3) + acorn: 8.11.3(patch_hash=updblechagntmruccl446lr76a) + acorn-walk: 8.3.2 capnp-ts: 0.7.0 exit-hook: 2.2.1 glob-to-regexp: 0.4.1 @@ -8338,7 +8327,7 @@ packages: /mlly@1.4.2: resolution: {integrity: sha512-i/Ykufi2t1EZ6NaPLdfnZk2AX8cs0d+mTzVKuPfqPKPatxLApaBoxJQ9x1/uckXtrS/U5oisPMDkNs0yQTaBRg==} dependencies: - acorn: 8.11.3 + acorn: 8.11.3(patch_hash=updblechagntmruccl446lr76a) pathe: 1.1.2 pkg-types: 1.0.3 ufo: 1.5.3 @@ -8347,7 +8336,7 @@ packages: /mlly@1.7.0: resolution: {integrity: sha512-U9SDaXGEREBYQgfejV97coK0UL1r+qnF2SyO9A3qcI8MzKnsIFKHNVEkrDyNncQTKQQumsasmeq84eNMdBfsNQ==} dependencies: - acorn: 8.11.3 + acorn: 8.11.3(patch_hash=updblechagntmruccl446lr76a) pathe: 1.1.2 pkg-types: 1.1.0 ufo: 1.5.3 @@ -9384,7 +9373,7 @@ packages: '@babel/code-frame': 7.24.6 dev: true - /rollup-plugin-esbuild@6.1.1(esbuild@0.21.3)(rollup@4.13.0): + /rollup-plugin-esbuild@6.1.1(esbuild@0.21.4)(rollup@4.13.0): resolution: {integrity: sha512-CehMY9FAqJD5OUaE/Mi1r5z0kNeYxItmRO2zG4Qnv2qWKF09J2lTy5GUzjJR354ZPrLkCj4fiBN41lo8PzBUhw==} engines: {node: '>=14.18.0'} peerDependencies: @@ -9394,7 +9383,7 @@ packages: '@rollup/pluginutils': 5.1.0(rollup@4.13.0) debug: 4.3.4 es-module-lexer: 1.5.3 - esbuild: 0.21.3 + esbuild: 0.21.4 get-tsconfig: 4.7.2 rollup: 4.13.0 transitivePeerDependencies: @@ -9957,7 +9946,7 @@ packages: hasBin: true dependencies: '@jridgewell/source-map': 0.3.3 - acorn: 8.11.3 + acorn: 8.11.3(patch_hash=updblechagntmruccl446lr76a) commander: 2.20.3 source-map-support: 0.5.21 dev: true @@ -10057,8 +10046,8 @@ packages: '@tsconfig/node14': 1.0.1 '@tsconfig/node16': 1.0.2 '@types/node': 20.12.12 - acorn: 8.11.3 - acorn-walk: 8.3.2(acorn@8.11.3) + acorn: 8.11.3(patch_hash=updblechagntmruccl446lr76a) + acorn-walk: 8.3.2 arg: 4.1.3 create-require: 1.1.1 diff: 4.0.2 @@ -10488,7 +10477,7 @@ packages: '@vitest/snapshot': 1.6.0 '@vitest/spy': 1.6.0 '@vitest/utils': 1.6.0 - acorn-walk: 8.3.2(acorn@8.11.3) + acorn-walk: 8.3.2 chai: 4.3.10 debug: 4.3.4 execa: 8.0.1 @@ -10504,7 +10493,6 @@ packages: vite-node: 1.6.0 why-is-node-running: 2.2.2 transitivePeerDependencies: - - acorn - supports-color dev: true