diff --git a/packages/cli/package.json b/packages/cli/package.json index ba6041259..fe6a994c1 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -65,7 +65,7 @@ "commander": "^10.0.0", "convert-source-map": "^2.0.0", "date-fns": "^2.16.1", - "esbuild": "^0.17.10", + "esbuild": "^0.21.5", "glob": "^7.1.4", "inquirer": "^7.3.3", "micromatch": "4.0.2", diff --git a/packages/cli/src/api/extractors/babel.ts b/packages/cli/src/api/extractors/babel.ts index 2dd2ed7c9..e7d7aa6b9 100644 --- a/packages/cli/src/api/extractors/babel.ts +++ b/packages/cli/src/api/extractors/babel.ts @@ -6,14 +6,19 @@ import type { } from "@lingui/babel-plugin-extract-messages" import linguiExtractMessages from "@lingui/babel-plugin-extract-messages" -import type { ExtractorType } from "@lingui/conf" +import { + ExtractorType, + LinguiConfig, + ExtractedMessage, + ExtractorCtx, +} from "@lingui/conf" import { ParserPlugin } from "@babel/parser" -import { type LinguiPluginOpts } from "@lingui/babel-plugin-lingui-macro" -import linguiMacroPlugin from "@lingui/babel-plugin-lingui-macro" -import { ExtractedMessage, ExtractorCtx } from "@lingui/conf" +import linguiMacroPlugin, { + type LinguiPluginOpts, +} from "@lingui/babel-plugin-lingui-macro" -const babelRe = new RegExp( +export const babelRe = new RegExp( "\\.(" + [...DEFAULT_EXTENSIONS, ".ts", ".mts", ".cts", ".tsx"] .map((ext) => ext.slice(1)) @@ -103,7 +108,8 @@ export async function extractFromFileWithBabel( code: string, onMessageExtracted: (msg: ExtractedMessage) => void, ctx: ExtractorCtx, - parserOpts: ParserOptions + parserOpts: ParserOptions, + skipMacroPlugin = false ) { const mapper = await createSourceMapper(code, ctx?.sourceMaps) @@ -120,13 +126,17 @@ export async function extractFromFileWithBabel( parserOpts, plugins: [ - [ - linguiMacroPlugin, - { - extract: true, - linguiConfig: ctx.linguiConfig, - } satisfies LinguiPluginOpts, - ], + ...(!skipMacroPlugin + ? [ + [ + linguiMacroPlugin, + { + extract: true, + linguiConfig: ctx.linguiConfig, + } satisfies LinguiPluginOpts, + ], + ] + : []), [ linguiExtractMessages, { @@ -144,6 +154,35 @@ export async function extractFromFileWithBabel( mapper.destroy() } +export function getBabelParserOptions( + filename: string, + parserOptions: LinguiConfig["extractorParserOptions"] +) { + // https://babeljs.io/docs/en/babel-parser#latest-ecmascript-features + const parserPlugins: ParserPlugin[] = [] + + if ([/\.ts$/, /\.mts$/, /\.cts$/, /\.tsx$/].some((r) => filename.match(r))) { + parserPlugins.push("typescript") + if (parserOptions.tsExperimentalDecorators) { + parserPlugins.push("decorators-legacy") + } else { + parserPlugins.push("decorators") + } + } else { + parserPlugins.push("decorators") + + if (parserOptions?.flow) { + parserPlugins.push("flow") + } + } + + if ([/\.js$/, /\.jsx$/, /\.tsx$/].some((r) => filename.match(r))) { + parserPlugins.push("jsx") + } + + return parserPlugins +} + const extractor: ExtractorType = { match(filename) { return babelRe.test(filename) @@ -152,32 +191,8 @@ const extractor: ExtractorType = { async extract(filename, code, onMessageExtracted, ctx) { const parserOptions = ctx.linguiConfig.extractorParserOptions - // https://babeljs.io/docs/en/babel-parser#latest-ecmascript-features - const parserPlugins: ParserPlugin[] = [] - - if ( - [/\.ts$/, /\.mts$/, /\.cts$/, /\.tsx$/].some((r) => filename.match(r)) - ) { - parserPlugins.push("typescript") - if (parserOptions.tsExperimentalDecorators) { - parserPlugins.push("decorators-legacy") - } else { - parserPlugins.push("decorators") - } - } else { - parserPlugins.push("decorators") - - if (parserOptions?.flow) { - parserPlugins.push("flow") - } - } - - if ([/\.js$/, /\.jsx$/, /\.tsx$/].some((r) => filename.match(r))) { - parserPlugins.push("jsx") - } - return extractFromFileWithBabel(filename, code, onMessageExtracted, ctx, { - plugins: parserPlugins, + plugins: getBabelParserOptions(filename, parserOptions), }) }, } diff --git a/packages/cli/src/extract-experimental/buildExternalizeFilter.test.ts b/packages/cli/src/extract-experimental/buildExternalizeFilter.test.ts deleted file mode 100644 index 77052d1a7..000000000 --- a/packages/cli/src/extract-experimental/buildExternalizeFilter.test.ts +++ /dev/null @@ -1,84 +0,0 @@ -import { buildExternalizeFilter } from "./buildExternalizeFilter" - -describe("buildExternalizeFilter", () => { - it("should exclude packages from package.json", () => { - const isExternal = buildExternalizeFilter({ - includeDeps: [], - excludeDeps: [], - packageJson: { - dependencies: { - next: "*", - }, - devDependencies: {}, - optionalDependencies: {}, - peerDependencies: {}, - }, - }) - - expect(isExternal("foo")).toBeFalsy() - expect(isExternal("next")).toBeTruthy() - expect(isExternal("next/head")).toBeTruthy() - expect(isExternal("@next/head")).toBeFalsy() - }) - - it("should respect all packageJson dependencies", () => { - const isExternal = buildExternalizeFilter({ - includeDeps: [], - excludeDeps: [], - packageJson: { - dependencies: { - package1: "*", - }, - devDependencies: { - package2: "*", - }, - optionalDependencies: { - package3: "*", - }, - peerDependencies: { - package4: "*", - }, - }, - }) - - expect(isExternal("non-deps")).toBeFalsy() - expect(isExternal("package1")).toBeTruthy() - expect(isExternal("package2")).toBeTruthy() - expect(isExternal("package3")).toBeTruthy() - expect(isExternal("package4")).toBeTruthy() - }) - - it("should not externalize packages from includeDeps", () => { - const isExternal = buildExternalizeFilter({ - includeDeps: ["package1"], - excludeDeps: [], - packageJson: { - dependencies: { - package1: "*", - package2: "*", - }, - }, - }) - - expect(isExternal("package1")).toBeFalsy() - expect(isExternal("package2")).toBeTruthy() - }) - - it("should externalize deps from excludeDeps", () => { - const isExternal = buildExternalizeFilter({ - includeDeps: ["package1"], - excludeDeps: ["package2"], - packageJson: { - dependencies: { - package1: "*", - package3: "*", - }, - }, - }) - - expect(isExternal("package1")).toBeFalsy() - expect(isExternal("package2")).toBeTruthy() - expect(isExternal("package3")).toBeTruthy() - expect(isExternal("non-deps")).toBeFalsy() - }) -}) diff --git a/packages/cli/src/extract-experimental/buildExternalizeFilter.ts b/packages/cli/src/extract-experimental/buildExternalizeFilter.ts deleted file mode 100644 index 81b4cffb0..000000000 --- a/packages/cli/src/extract-experimental/buildExternalizeFilter.ts +++ /dev/null @@ -1,70 +0,0 @@ -import fs from "node:fs" - -type PackageJson = { - dependencies?: Record - devDependencies?: Record - peerDependencies?: Record - optionalDependencies?: Record -} - -function createPackageRegExp(packageName: string) { - return new RegExp("^" + packageName + "(?:\\/.+)?") -} - -function packages( - packages: Record, - includeDeps: string[] -): RegExp[] { - return Object.keys(packages || {}) - .filter((packageName) => { - return !includeDeps.some((incl) => packageName.startsWith(incl)) - }) - .map(createPackageRegExp) -} - -export function buildExternalizeFilter({ - includeDeps, - excludeDeps, - packageJson, -}: { - includeDeps: string[] - excludeDeps: string[] - packageJson: PackageJson -}) { - const external = [ - ...packages(packageJson.dependencies, includeDeps), - ...packages(packageJson.devDependencies, includeDeps), - ...packages(packageJson.peerDependencies, includeDeps), - ...packages(packageJson.optionalDependencies, includeDeps), - ...excludeDeps.map(createPackageRegExp), - ] - - return (id: string) => - external.some((regExp) => { - return regExp.test(id) - }) -} - -export async function getPackageJson(rootDir: string): Promise { - const { default: pkgUp } = await import("pkg-up") - const packageJsonPath = await pkgUp({ - cwd: rootDir, - }) - - if (!packageJsonPath) { - throw new Error( - "We could not able to find your package.json file. " + - "Check that `rootDir` is pointing to the folder with package.json" - ) - } - - try { - return JSON.parse(await fs.promises.readFile(packageJsonPath, "utf-8")) - } catch (e) { - throw new Error( - `Unable to read package.json file at path ${packageJsonPath}. \n\n Error: ${ - (e as Error).message - }` - ) - } -} diff --git a/packages/cli/src/extract-experimental/bundleSource.ts b/packages/cli/src/extract-experimental/bundleSource.ts index dd3e9a551..26adc817f 100644 --- a/packages/cli/src/extract-experimental/bundleSource.ts +++ b/packages/cli/src/extract-experimental/bundleSource.ts @@ -1,22 +1,20 @@ -import { ExperimentalExtractorOptions } from "@lingui/conf" +import { LinguiConfigNormalized } from "@lingui/conf" import { BuildOptions } from "esbuild" -import { - buildExternalizeFilter, - getPackageJson, -} from "./buildExternalizeFilter" +import { pluginLinguiMacro } from "./linguiEsbuildPlugin" function createExtRegExp(extensions: string[]) { return new RegExp("\\.(?:" + extensions.join("|") + ")(?:\\?.*)?$") } export async function bundleSource( - config: ExperimentalExtractorOptions, + linguiConfig: LinguiConfigNormalized, entryPoints: string[], outDir: string, rootDir: string ) { const esbuild = await import("esbuild") + const config = linguiConfig.experimental.extractor const excludeExtensions = config.excludeExtensions || [ "ico", "pot", @@ -36,8 +34,6 @@ export async function bundleSource( "jpg", ] - const packageJson = await getPackageJson(rootDir) - const esbuildOptions: BuildOptions = { entryPoints: entryPoints, outExtension: { ".js": ".jsx" }, @@ -52,28 +48,12 @@ export async function bundleSource( sourcemap: "inline", sourceRoot: outDir, sourcesContent: false, + packages: "external", outbase: rootDir, metafile: true, - plugins: [ - { - name: "externalize-deps", - setup(build) { - const isExternal = buildExternalizeFilter({ - includeDeps: config.includeDeps || [], - excludeDeps: config.excludeDeps || [], - packageJson, - }) - // externalize bare imports - build.onResolve({ filter: /^[^.].*/ }, async ({ path: id }) => { - if (isExternal(id)) { - return { - external: true, - } - } - }) - }, - }, + plugins: [ + pluginLinguiMacro({ linguiConfig }), { name: "externalize-files", setup(build) { diff --git a/packages/cli/src/extract-experimental/linguiEsbuildPlugin.ts b/packages/cli/src/extract-experimental/linguiEsbuildPlugin.ts new file mode 100644 index 000000000..b678201d8 --- /dev/null +++ b/packages/cli/src/extract-experimental/linguiEsbuildPlugin.ts @@ -0,0 +1,56 @@ +import { transformAsync } from "@babel/core" +import fs from "fs" +import path from "path" +import { Plugin } from "esbuild" +import { babelRe, getBabelParserOptions } from "../api/extractors/babel" +import linguiMacroPlugin, { + type LinguiPluginOpts, +} from "@lingui/babel-plugin-lingui-macro" +import { LinguiConfigNormalized } from "@lingui/conf" + +export const pluginLinguiMacro = (options: { + linguiConfig: LinguiConfigNormalized +}): Plugin => ({ + name: "linguiMacro", + setup(build) { + build.onLoad({ filter: babelRe, namespace: "" }, async (args) => { + const filename = path.relative(process.cwd(), args.path) + + const contents = await fs.promises.readFile(args.path, "utf8") + + const hasMacroRe = /from ["']@lingui(\/.+)?\/macro["']/g + + if (!hasMacroRe.test(contents)) { + // let esbuild process file as usual + return undefined + } + + const result = await transformAsync(contents, { + babelrc: false, + configFile: false, + + filename: filename, + + sourceMaps: "inline", + parserOpts: { + plugins: getBabelParserOptions( + filename, + options.linguiConfig.extractorParserOptions + ), + }, + + plugins: [ + [ + linguiMacroPlugin, + { + extract: true, + linguiConfig: options.linguiConfig, + } satisfies LinguiPluginOpts, + ], + ], + }) + + return { contents: result.code, loader: "jsx" } + }) + }, +}) diff --git a/packages/cli/src/lingui-extract-experimental.ts b/packages/cli/src/lingui-extract-experimental.ts index 6324a05a7..310268bf4 100644 --- a/packages/cli/src/lingui-extract-experimental.ts +++ b/packages/cli/src/lingui-extract-experimental.ts @@ -14,6 +14,10 @@ import { } from "./extract-experimental/writeCatalogs" import { getEntryPoints } from "./extract-experimental/getEntryPoints" import chalk from "chalk" +import { + extractFromFileWithBabel, + getBabelParserOptions, +} from "./api/extractors/babel" export type CliExtractTemplateOptions = { verbose: boolean @@ -55,7 +59,7 @@ export default async function command( await fs.rm(tempDir, { recursive: true, force: true }) const bundleResult = await bundleSource( - config, + linguiConfig, getEntryPoints(config.entries), tempDir, linguiConfig.rootDir @@ -70,6 +74,29 @@ export default async function command( linguiConfig.sourceLocale ) + linguiConfig.extractors = [ + { + match(_filename: string) { + return true + }, + + async extract(filename, code, onMessageExtracted, ctx) { + const parserOptions = ctx.linguiConfig.extractorParserOptions + + return extractFromFileWithBabel( + filename, + code, + onMessageExtracted, + ctx, + { + plugins: getBabelParserOptions(filename, parserOptions), + }, + true + ) + }, + }, + ] + for (const outFile of Object.keys(bundleResult.metafile.outputs)) { const messages = await extractFromFiles([outFile], linguiConfig) diff --git a/packages/cli/test/extractor-experimental/expected/about.page.en.js b/packages/cli/test/extractor-experimental/expected/about.page.en.js index 0df9724f1..9ee743742 100644 --- a/packages/cli/test/extractor-experimental/expected/about.page.en.js +++ b/packages/cli/test/extractor-experimental/expected/about.page.en.js @@ -1 +1 @@ -/*eslint-disable*/module.exports={messages:JSON.parse("{\"u5PTM8\":\"about page message\",\"LGGfGX\":\"header message\"}")}; \ No newline at end of file +/*eslint-disable*/module.exports={messages:JSON.parse("{\"u5PTM8\":\"about page message\",\"VmkjGB\":\"Green\",\"LGGfGX\":\"header message\"}")}; \ No newline at end of file diff --git a/packages/cli/test/extractor-experimental/expected/about.page.en.po b/packages/cli/test/extractor-experimental/expected/about.page.en.po index 8417afc5a..2261b786a 100644 --- a/packages/cli/test/extractor-experimental/expected/about.page.en.po +++ b/packages/cli/test/extractor-experimental/expected/about.page.en.po @@ -13,10 +13,14 @@ msgstr "" "Language-Team: \n" "Plural-Forms: \n" -#: fixtures/pages/about.page.ts:4 +#: fixtures/pages/about.page.ts:5 msgid "about page message" msgstr "about page message" +#: fixtures/constants/green.ts:3 +msgid "Green" +msgstr "Green" + #: fixtures/components/header.ts:3 msgid "header message" msgstr "header message" diff --git a/packages/cli/test/extractor-experimental/expected/about.page.pl.js b/packages/cli/test/extractor-experimental/expected/about.page.pl.js index c582c8d5c..3bf052cc0 100644 --- a/packages/cli/test/extractor-experimental/expected/about.page.pl.js +++ b/packages/cli/test/extractor-experimental/expected/about.page.pl.js @@ -1 +1 @@ -/*eslint-disable*/module.exports={messages:JSON.parse("{\"u5PTM8\":\"about page message\",\"LGGfGX\":\"translation: header message\",\"nPi9F1\":\"this should be marked as obsolete\"}")}; \ No newline at end of file +/*eslint-disable*/module.exports={messages:JSON.parse("{\"u5PTM8\":\"about page message\",\"VmkjGB\":\"Green\",\"LGGfGX\":\"translation: header message\",\"nPi9F1\":\"this should be marked as obsolete\"}")}; \ No newline at end of file diff --git a/packages/cli/test/extractor-experimental/expected/about.page.pl.po b/packages/cli/test/extractor-experimental/expected/about.page.pl.po index de338c4ef..1ad9cf5be 100644 --- a/packages/cli/test/extractor-experimental/expected/about.page.pl.po +++ b/packages/cli/test/extractor-experimental/expected/about.page.pl.po @@ -13,10 +13,14 @@ msgstr "" "Language-Team: \n" "Plural-Forms: \n" -#: fixtures/pages/about.page.ts:4 +#: fixtures/pages/about.page.ts:5 msgid "about page message" msgstr "" +#: fixtures/constants/green.ts:3 +msgid "Green" +msgstr "" + #: fixtures/components/header.ts:3 msgid "header message" msgstr "translation: header message" diff --git a/packages/cli/test/extractor-experimental/expected/index.page.en.js b/packages/cli/test/extractor-experimental/expected/index.page.en.js index 2a705af1b..528094523 100644 --- a/packages/cli/test/extractor-experimental/expected/index.page.en.js +++ b/packages/cli/test/extractor-experimental/expected/index.page.en.js @@ -1 +1 @@ -/*eslint-disable*/module.exports={messages:JSON.parse("{\"D+XV65\":\"index page message\"}")}; \ No newline at end of file +/*eslint-disable*/module.exports={messages:JSON.parse("{\"D+XV65\":\"index page message\",\"wRTiSD\":\"Red\"}")}; \ No newline at end of file diff --git a/packages/cli/test/extractor-experimental/expected/index.page.en.po b/packages/cli/test/extractor-experimental/expected/index.page.en.po index f04623b36..c2bfa8dcf 100644 --- a/packages/cli/test/extractor-experimental/expected/index.page.en.po +++ b/packages/cli/test/extractor-experimental/expected/index.page.en.po @@ -13,6 +13,10 @@ msgstr "" "Language-Team: \n" "Plural-Forms: \n" -#: fixtures/pages/index.page.ts:3 +#: fixtures/pages/index.page.ts:4 msgid "index page message" msgstr "index page message" + +#: fixtures/constants/red.ts:3 +msgid "Red" +msgstr "Red" diff --git a/packages/cli/test/extractor-experimental/expected/index.page.pl.js b/packages/cli/test/extractor-experimental/expected/index.page.pl.js index 2a705af1b..528094523 100644 --- a/packages/cli/test/extractor-experimental/expected/index.page.pl.js +++ b/packages/cli/test/extractor-experimental/expected/index.page.pl.js @@ -1 +1 @@ -/*eslint-disable*/module.exports={messages:JSON.parse("{\"D+XV65\":\"index page message\"}")}; \ No newline at end of file +/*eslint-disable*/module.exports={messages:JSON.parse("{\"D+XV65\":\"index page message\",\"wRTiSD\":\"Red\"}")}; \ No newline at end of file diff --git a/packages/cli/test/extractor-experimental/expected/index.page.pl.po b/packages/cli/test/extractor-experimental/expected/index.page.pl.po index 2709ea96a..4114710e0 100644 --- a/packages/cli/test/extractor-experimental/expected/index.page.pl.po +++ b/packages/cli/test/extractor-experimental/expected/index.page.pl.po @@ -13,6 +13,10 @@ msgstr "" "Language-Team: \n" "Plural-Forms: \n" -#: fixtures/pages/index.page.ts:3 +#: fixtures/pages/index.page.ts:4 msgid "index page message" msgstr "" + +#: fixtures/constants/red.ts:3 +msgid "Red" +msgstr "" diff --git a/packages/cli/test/extractor-experimental/fixtures/constants/green.ts b/packages/cli/test/extractor-experimental/fixtures/constants/green.ts new file mode 100644 index 000000000..61dea9952 --- /dev/null +++ b/packages/cli/test/extractor-experimental/fixtures/constants/green.ts @@ -0,0 +1,3 @@ +import { msg } from "@lingui/core/macro" + +export const GREEN = msg`Green` diff --git a/packages/cli/test/extractor-experimental/fixtures/constants/index.ts b/packages/cli/test/extractor-experimental/fixtures/constants/index.ts new file mode 100644 index 000000000..9bc4841d5 --- /dev/null +++ b/packages/cli/test/extractor-experimental/fixtures/constants/index.ts @@ -0,0 +1,3 @@ +// test tree-shaking from barrel files +export * from "./red" +export * from "./green" diff --git a/packages/cli/test/extractor-experimental/fixtures/constants/red.ts b/packages/cli/test/extractor-experimental/fixtures/constants/red.ts new file mode 100644 index 000000000..381c817c5 --- /dev/null +++ b/packages/cli/test/extractor-experimental/fixtures/constants/red.ts @@ -0,0 +1,3 @@ +import { msg } from "@lingui/core/macro" + +export const RED = msg`Red` diff --git a/packages/cli/test/extractor-experimental/fixtures/pages/about.page.ts b/packages/cli/test/extractor-experimental/fixtures/pages/about.page.ts index 51d7d2db0..29775088f 100644 --- a/packages/cli/test/extractor-experimental/fixtures/pages/about.page.ts +++ b/packages/cli/test/extractor-experimental/fixtures/pages/about.page.ts @@ -1,6 +1,8 @@ import { t } from "@lingui/core/macro" import { msg as headerMsg } from "../components/header" +import { GREEN } from "../constants" const msg = t`about page message` console.log(msg, headerMsg) +console.log(GREEN) diff --git a/packages/cli/test/extractor-experimental/fixtures/pages/index.page.ts b/packages/cli/test/extractor-experimental/fixtures/pages/index.page.ts index 223a82385..7a39f67bf 100644 --- a/packages/cli/test/extractor-experimental/fixtures/pages/index.page.ts +++ b/packages/cli/test/extractor-experimental/fixtures/pages/index.page.ts @@ -1,4 +1,6 @@ import { t } from "@lingui/core/macro" +import { RED } from "../constants" const msg = t`index page message` console.log(msg) +console.log(RED) diff --git a/packages/cli/test/index.test.ts b/packages/cli/test/index.test.ts index 1bac33ec5..caef0d81a 100644 --- a/packages/cli/test/index.test.ts +++ b/packages/cli/test/index.test.ts @@ -211,16 +211,16 @@ describe("E2E Extractor Test", () => { ┌─────────────┬─────────────┬─────────┐ │ Language │ Total count │ Missing │ ├─────────────┼─────────────┼─────────┤ - │ en (source) │ 2 │ - │ - │ pl │ 3 │ 2 │ + │ en (source) │ 3 │ - │ + │ pl │ 4 │ 3 │ └─────────────┴─────────────┴─────────┘ Catalog statistics for fixtures/pages/index.page.ts: ┌─────────────┬─────────────┬─────────┐ │ Language │ Total count │ Missing │ ├─────────────┼─────────────┼─────────┤ - │ en (source) │ 1 │ - │ - │ pl │ 1 │ 1 │ + │ en (source) │ 2 │ - │ + │ pl │ 2 │ 2 │ └─────────────┴─────────────┴─────────┘ Compiling message catalogs… diff --git a/yarn.lock b/yarn.lock index 7e67dcda8..0ab61c922 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2162,16 +2162,16 @@ __metadata: languageName: node linkType: hard -"@esbuild/android-arm64@npm:0.16.17": - version: 0.16.17 - resolution: "@esbuild/android-arm64@npm:0.16.17" - conditions: os=android & cpu=arm64 +"@esbuild/aix-ppc64@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/aix-ppc64@npm:0.21.5" + conditions: os=aix & cpu=ppc64 languageName: node linkType: hard -"@esbuild/android-arm64@npm:0.17.11": - version: 0.17.11 - resolution: "@esbuild/android-arm64@npm:0.17.11" +"@esbuild/android-arm64@npm:0.16.17": + version: 0.16.17 + resolution: "@esbuild/android-arm64@npm:0.16.17" conditions: os=android & cpu=arm64 languageName: node linkType: hard @@ -2197,16 +2197,16 @@ __metadata: languageName: node linkType: hard -"@esbuild/android-arm@npm:0.16.17": - version: 0.16.17 - resolution: "@esbuild/android-arm@npm:0.16.17" - conditions: os=android & cpu=arm +"@esbuild/android-arm64@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/android-arm64@npm:0.21.5" + conditions: os=android & cpu=arm64 languageName: node linkType: hard -"@esbuild/android-arm@npm:0.17.11": - version: 0.17.11 - resolution: "@esbuild/android-arm@npm:0.17.11" +"@esbuild/android-arm@npm:0.16.17": + version: 0.16.17 + resolution: "@esbuild/android-arm@npm:0.16.17" conditions: os=android & cpu=arm languageName: node linkType: hard @@ -2232,16 +2232,16 @@ __metadata: languageName: node linkType: hard -"@esbuild/android-x64@npm:0.16.17": - version: 0.16.17 - resolution: "@esbuild/android-x64@npm:0.16.17" - conditions: os=android & cpu=x64 +"@esbuild/android-arm@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/android-arm@npm:0.21.5" + conditions: os=android & cpu=arm languageName: node linkType: hard -"@esbuild/android-x64@npm:0.17.11": - version: 0.17.11 - resolution: "@esbuild/android-x64@npm:0.17.11" +"@esbuild/android-x64@npm:0.16.17": + version: 0.16.17 + resolution: "@esbuild/android-x64@npm:0.16.17" conditions: os=android & cpu=x64 languageName: node linkType: hard @@ -2267,16 +2267,16 @@ __metadata: languageName: node linkType: hard -"@esbuild/darwin-arm64@npm:0.16.17": - version: 0.16.17 - resolution: "@esbuild/darwin-arm64@npm:0.16.17" - conditions: os=darwin & cpu=arm64 +"@esbuild/android-x64@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/android-x64@npm:0.21.5" + conditions: os=android & cpu=x64 languageName: node linkType: hard -"@esbuild/darwin-arm64@npm:0.17.11": - version: 0.17.11 - resolution: "@esbuild/darwin-arm64@npm:0.17.11" +"@esbuild/darwin-arm64@npm:0.16.17": + version: 0.16.17 + resolution: "@esbuild/darwin-arm64@npm:0.16.17" conditions: os=darwin & cpu=arm64 languageName: node linkType: hard @@ -2302,16 +2302,16 @@ __metadata: languageName: node linkType: hard -"@esbuild/darwin-x64@npm:0.16.17": - version: 0.16.17 - resolution: "@esbuild/darwin-x64@npm:0.16.17" - conditions: os=darwin & cpu=x64 +"@esbuild/darwin-arm64@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/darwin-arm64@npm:0.21.5" + conditions: os=darwin & cpu=arm64 languageName: node linkType: hard -"@esbuild/darwin-x64@npm:0.17.11": - version: 0.17.11 - resolution: "@esbuild/darwin-x64@npm:0.17.11" +"@esbuild/darwin-x64@npm:0.16.17": + version: 0.16.17 + resolution: "@esbuild/darwin-x64@npm:0.16.17" conditions: os=darwin & cpu=x64 languageName: node linkType: hard @@ -2337,16 +2337,16 @@ __metadata: languageName: node linkType: hard -"@esbuild/freebsd-arm64@npm:0.16.17": - version: 0.16.17 - resolution: "@esbuild/freebsd-arm64@npm:0.16.17" - conditions: os=freebsd & cpu=arm64 +"@esbuild/darwin-x64@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/darwin-x64@npm:0.21.5" + conditions: os=darwin & cpu=x64 languageName: node linkType: hard -"@esbuild/freebsd-arm64@npm:0.17.11": - version: 0.17.11 - resolution: "@esbuild/freebsd-arm64@npm:0.17.11" +"@esbuild/freebsd-arm64@npm:0.16.17": + version: 0.16.17 + resolution: "@esbuild/freebsd-arm64@npm:0.16.17" conditions: os=freebsd & cpu=arm64 languageName: node linkType: hard @@ -2372,16 +2372,16 @@ __metadata: languageName: node linkType: hard -"@esbuild/freebsd-x64@npm:0.16.17": - version: 0.16.17 - resolution: "@esbuild/freebsd-x64@npm:0.16.17" - conditions: os=freebsd & cpu=x64 +"@esbuild/freebsd-arm64@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/freebsd-arm64@npm:0.21.5" + conditions: os=freebsd & cpu=arm64 languageName: node linkType: hard -"@esbuild/freebsd-x64@npm:0.17.11": - version: 0.17.11 - resolution: "@esbuild/freebsd-x64@npm:0.17.11" +"@esbuild/freebsd-x64@npm:0.16.17": + version: 0.16.17 + resolution: "@esbuild/freebsd-x64@npm:0.16.17" conditions: os=freebsd & cpu=x64 languageName: node linkType: hard @@ -2407,16 +2407,16 @@ __metadata: languageName: node linkType: hard -"@esbuild/linux-arm64@npm:0.16.17": - version: 0.16.17 - resolution: "@esbuild/linux-arm64@npm:0.16.17" - conditions: os=linux & cpu=arm64 +"@esbuild/freebsd-x64@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/freebsd-x64@npm:0.21.5" + conditions: os=freebsd & cpu=x64 languageName: node linkType: hard -"@esbuild/linux-arm64@npm:0.17.11": - version: 0.17.11 - resolution: "@esbuild/linux-arm64@npm:0.17.11" +"@esbuild/linux-arm64@npm:0.16.17": + version: 0.16.17 + resolution: "@esbuild/linux-arm64@npm:0.16.17" conditions: os=linux & cpu=arm64 languageName: node linkType: hard @@ -2442,16 +2442,16 @@ __metadata: languageName: node linkType: hard -"@esbuild/linux-arm@npm:0.16.17": - version: 0.16.17 - resolution: "@esbuild/linux-arm@npm:0.16.17" - conditions: os=linux & cpu=arm +"@esbuild/linux-arm64@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/linux-arm64@npm:0.21.5" + conditions: os=linux & cpu=arm64 languageName: node linkType: hard -"@esbuild/linux-arm@npm:0.17.11": - version: 0.17.11 - resolution: "@esbuild/linux-arm@npm:0.17.11" +"@esbuild/linux-arm@npm:0.16.17": + version: 0.16.17 + resolution: "@esbuild/linux-arm@npm:0.16.17" conditions: os=linux & cpu=arm languageName: node linkType: hard @@ -2477,16 +2477,16 @@ __metadata: languageName: node linkType: hard -"@esbuild/linux-ia32@npm:0.16.17": - version: 0.16.17 - resolution: "@esbuild/linux-ia32@npm:0.16.17" - conditions: os=linux & cpu=ia32 +"@esbuild/linux-arm@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/linux-arm@npm:0.21.5" + conditions: os=linux & cpu=arm languageName: node linkType: hard -"@esbuild/linux-ia32@npm:0.17.11": - version: 0.17.11 - resolution: "@esbuild/linux-ia32@npm:0.17.11" +"@esbuild/linux-ia32@npm:0.16.17": + version: 0.16.17 + resolution: "@esbuild/linux-ia32@npm:0.16.17" conditions: os=linux & cpu=ia32 languageName: node linkType: hard @@ -2512,16 +2512,16 @@ __metadata: languageName: node linkType: hard -"@esbuild/linux-loong64@npm:0.16.17": - version: 0.16.17 - resolution: "@esbuild/linux-loong64@npm:0.16.17" - conditions: os=linux & cpu=loong64 +"@esbuild/linux-ia32@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/linux-ia32@npm:0.21.5" + conditions: os=linux & cpu=ia32 languageName: node linkType: hard -"@esbuild/linux-loong64@npm:0.17.11": - version: 0.17.11 - resolution: "@esbuild/linux-loong64@npm:0.17.11" +"@esbuild/linux-loong64@npm:0.16.17": + version: 0.16.17 + resolution: "@esbuild/linux-loong64@npm:0.16.17" conditions: os=linux & cpu=loong64 languageName: node linkType: hard @@ -2547,16 +2547,16 @@ __metadata: languageName: node linkType: hard -"@esbuild/linux-mips64el@npm:0.16.17": - version: 0.16.17 - resolution: "@esbuild/linux-mips64el@npm:0.16.17" - conditions: os=linux & cpu=mips64el +"@esbuild/linux-loong64@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/linux-loong64@npm:0.21.5" + conditions: os=linux & cpu=loong64 languageName: node linkType: hard -"@esbuild/linux-mips64el@npm:0.17.11": - version: 0.17.11 - resolution: "@esbuild/linux-mips64el@npm:0.17.11" +"@esbuild/linux-mips64el@npm:0.16.17": + version: 0.16.17 + resolution: "@esbuild/linux-mips64el@npm:0.16.17" conditions: os=linux & cpu=mips64el languageName: node linkType: hard @@ -2582,16 +2582,16 @@ __metadata: languageName: node linkType: hard -"@esbuild/linux-ppc64@npm:0.16.17": - version: 0.16.17 - resolution: "@esbuild/linux-ppc64@npm:0.16.17" - conditions: os=linux & cpu=ppc64 +"@esbuild/linux-mips64el@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/linux-mips64el@npm:0.21.5" + conditions: os=linux & cpu=mips64el languageName: node linkType: hard -"@esbuild/linux-ppc64@npm:0.17.11": - version: 0.17.11 - resolution: "@esbuild/linux-ppc64@npm:0.17.11" +"@esbuild/linux-ppc64@npm:0.16.17": + version: 0.16.17 + resolution: "@esbuild/linux-ppc64@npm:0.16.17" conditions: os=linux & cpu=ppc64 languageName: node linkType: hard @@ -2617,16 +2617,16 @@ __metadata: languageName: node linkType: hard -"@esbuild/linux-riscv64@npm:0.16.17": - version: 0.16.17 - resolution: "@esbuild/linux-riscv64@npm:0.16.17" - conditions: os=linux & cpu=riscv64 +"@esbuild/linux-ppc64@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/linux-ppc64@npm:0.21.5" + conditions: os=linux & cpu=ppc64 languageName: node linkType: hard -"@esbuild/linux-riscv64@npm:0.17.11": - version: 0.17.11 - resolution: "@esbuild/linux-riscv64@npm:0.17.11" +"@esbuild/linux-riscv64@npm:0.16.17": + version: 0.16.17 + resolution: "@esbuild/linux-riscv64@npm:0.16.17" conditions: os=linux & cpu=riscv64 languageName: node linkType: hard @@ -2652,16 +2652,16 @@ __metadata: languageName: node linkType: hard -"@esbuild/linux-s390x@npm:0.16.17": - version: 0.16.17 - resolution: "@esbuild/linux-s390x@npm:0.16.17" - conditions: os=linux & cpu=s390x +"@esbuild/linux-riscv64@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/linux-riscv64@npm:0.21.5" + conditions: os=linux & cpu=riscv64 languageName: node linkType: hard -"@esbuild/linux-s390x@npm:0.17.11": - version: 0.17.11 - resolution: "@esbuild/linux-s390x@npm:0.17.11" +"@esbuild/linux-s390x@npm:0.16.17": + version: 0.16.17 + resolution: "@esbuild/linux-s390x@npm:0.16.17" conditions: os=linux & cpu=s390x languageName: node linkType: hard @@ -2687,16 +2687,16 @@ __metadata: languageName: node linkType: hard -"@esbuild/linux-x64@npm:0.16.17": - version: 0.16.17 - resolution: "@esbuild/linux-x64@npm:0.16.17" - conditions: os=linux & cpu=x64 +"@esbuild/linux-s390x@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/linux-s390x@npm:0.21.5" + conditions: os=linux & cpu=s390x languageName: node linkType: hard -"@esbuild/linux-x64@npm:0.17.11": - version: 0.17.11 - resolution: "@esbuild/linux-x64@npm:0.17.11" +"@esbuild/linux-x64@npm:0.16.17": + version: 0.16.17 + resolution: "@esbuild/linux-x64@npm:0.16.17" conditions: os=linux & cpu=x64 languageName: node linkType: hard @@ -2722,16 +2722,16 @@ __metadata: languageName: node linkType: hard -"@esbuild/netbsd-x64@npm:0.16.17": - version: 0.16.17 - resolution: "@esbuild/netbsd-x64@npm:0.16.17" - conditions: os=netbsd & cpu=x64 +"@esbuild/linux-x64@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/linux-x64@npm:0.21.5" + conditions: os=linux & cpu=x64 languageName: node linkType: hard -"@esbuild/netbsd-x64@npm:0.17.11": - version: 0.17.11 - resolution: "@esbuild/netbsd-x64@npm:0.17.11" +"@esbuild/netbsd-x64@npm:0.16.17": + version: 0.16.17 + resolution: "@esbuild/netbsd-x64@npm:0.16.17" conditions: os=netbsd & cpu=x64 languageName: node linkType: hard @@ -2757,16 +2757,16 @@ __metadata: languageName: node linkType: hard -"@esbuild/openbsd-x64@npm:0.16.17": - version: 0.16.17 - resolution: "@esbuild/openbsd-x64@npm:0.16.17" - conditions: os=openbsd & cpu=x64 +"@esbuild/netbsd-x64@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/netbsd-x64@npm:0.21.5" + conditions: os=netbsd & cpu=x64 languageName: node linkType: hard -"@esbuild/openbsd-x64@npm:0.17.11": - version: 0.17.11 - resolution: "@esbuild/openbsd-x64@npm:0.17.11" +"@esbuild/openbsd-x64@npm:0.16.17": + version: 0.16.17 + resolution: "@esbuild/openbsd-x64@npm:0.16.17" conditions: os=openbsd & cpu=x64 languageName: node linkType: hard @@ -2792,16 +2792,16 @@ __metadata: languageName: node linkType: hard -"@esbuild/sunos-x64@npm:0.16.17": - version: 0.16.17 - resolution: "@esbuild/sunos-x64@npm:0.16.17" - conditions: os=sunos & cpu=x64 +"@esbuild/openbsd-x64@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/openbsd-x64@npm:0.21.5" + conditions: os=openbsd & cpu=x64 languageName: node linkType: hard -"@esbuild/sunos-x64@npm:0.17.11": - version: 0.17.11 - resolution: "@esbuild/sunos-x64@npm:0.17.11" +"@esbuild/sunos-x64@npm:0.16.17": + version: 0.16.17 + resolution: "@esbuild/sunos-x64@npm:0.16.17" conditions: os=sunos & cpu=x64 languageName: node linkType: hard @@ -2827,16 +2827,16 @@ __metadata: languageName: node linkType: hard -"@esbuild/win32-arm64@npm:0.16.17": - version: 0.16.17 - resolution: "@esbuild/win32-arm64@npm:0.16.17" - conditions: os=win32 & cpu=arm64 +"@esbuild/sunos-x64@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/sunos-x64@npm:0.21.5" + conditions: os=sunos & cpu=x64 languageName: node linkType: hard -"@esbuild/win32-arm64@npm:0.17.11": - version: 0.17.11 - resolution: "@esbuild/win32-arm64@npm:0.17.11" +"@esbuild/win32-arm64@npm:0.16.17": + version: 0.16.17 + resolution: "@esbuild/win32-arm64@npm:0.16.17" conditions: os=win32 & cpu=arm64 languageName: node linkType: hard @@ -2862,16 +2862,16 @@ __metadata: languageName: node linkType: hard -"@esbuild/win32-ia32@npm:0.16.17": - version: 0.16.17 - resolution: "@esbuild/win32-ia32@npm:0.16.17" - conditions: os=win32 & cpu=ia32 +"@esbuild/win32-arm64@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/win32-arm64@npm:0.21.5" + conditions: os=win32 & cpu=arm64 languageName: node linkType: hard -"@esbuild/win32-ia32@npm:0.17.11": - version: 0.17.11 - resolution: "@esbuild/win32-ia32@npm:0.17.11" +"@esbuild/win32-ia32@npm:0.16.17": + version: 0.16.17 + resolution: "@esbuild/win32-ia32@npm:0.16.17" conditions: os=win32 & cpu=ia32 languageName: node linkType: hard @@ -2897,16 +2897,16 @@ __metadata: languageName: node linkType: hard -"@esbuild/win32-x64@npm:0.16.17": - version: 0.16.17 - resolution: "@esbuild/win32-x64@npm:0.16.17" - conditions: os=win32 & cpu=x64 +"@esbuild/win32-ia32@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/win32-ia32@npm:0.21.5" + conditions: os=win32 & cpu=ia32 languageName: node linkType: hard -"@esbuild/win32-x64@npm:0.17.11": - version: 0.17.11 - resolution: "@esbuild/win32-x64@npm:0.17.11" +"@esbuild/win32-x64@npm:0.16.17": + version: 0.16.17 + resolution: "@esbuild/win32-x64@npm:0.16.17" conditions: os=win32 & cpu=x64 languageName: node linkType: hard @@ -2932,6 +2932,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/win32-x64@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/win32-x64@npm:0.21.5" + conditions: os=win32 & cpu=x64 + languageName: node + linkType: hard + "@eslint/eslintrc@npm:^0.4.3": version: 0.4.3 resolution: "@eslint/eslintrc@npm:0.4.3" @@ -3441,7 +3448,7 @@ __metadata: commander: ^10.0.0 convert-source-map: ^2.0.0 date-fns: ^2.16.1 - esbuild: ^0.17.10 + esbuild: ^0.21.5 glob: ^7.1.4 inquirer: ^7.3.3 micromatch: 4.0.2 @@ -7751,83 +7758,6 @@ __metadata: languageName: node linkType: hard -"esbuild@npm:^0.17.10": - version: 0.17.11 - resolution: "esbuild@npm:0.17.11" - dependencies: - "@esbuild/android-arm": 0.17.11 - "@esbuild/android-arm64": 0.17.11 - "@esbuild/android-x64": 0.17.11 - "@esbuild/darwin-arm64": 0.17.11 - "@esbuild/darwin-x64": 0.17.11 - "@esbuild/freebsd-arm64": 0.17.11 - "@esbuild/freebsd-x64": 0.17.11 - "@esbuild/linux-arm": 0.17.11 - "@esbuild/linux-arm64": 0.17.11 - "@esbuild/linux-ia32": 0.17.11 - "@esbuild/linux-loong64": 0.17.11 - "@esbuild/linux-mips64el": 0.17.11 - "@esbuild/linux-ppc64": 0.17.11 - "@esbuild/linux-riscv64": 0.17.11 - "@esbuild/linux-s390x": 0.17.11 - "@esbuild/linux-x64": 0.17.11 - "@esbuild/netbsd-x64": 0.17.11 - "@esbuild/openbsd-x64": 0.17.11 - "@esbuild/sunos-x64": 0.17.11 - "@esbuild/win32-arm64": 0.17.11 - "@esbuild/win32-ia32": 0.17.11 - "@esbuild/win32-x64": 0.17.11 - dependenciesMeta: - "@esbuild/android-arm": - optional: true - "@esbuild/android-arm64": - optional: true - "@esbuild/android-x64": - optional: true - "@esbuild/darwin-arm64": - optional: true - "@esbuild/darwin-x64": - optional: true - "@esbuild/freebsd-arm64": - optional: true - "@esbuild/freebsd-x64": - optional: true - "@esbuild/linux-arm": - optional: true - "@esbuild/linux-arm64": - optional: true - "@esbuild/linux-ia32": - optional: true - "@esbuild/linux-loong64": - optional: true - "@esbuild/linux-mips64el": - optional: true - "@esbuild/linux-ppc64": - optional: true - "@esbuild/linux-riscv64": - optional: true - "@esbuild/linux-s390x": - optional: true - "@esbuild/linux-x64": - optional: true - "@esbuild/netbsd-x64": - optional: true - "@esbuild/openbsd-x64": - optional: true - "@esbuild/sunos-x64": - optional: true - "@esbuild/win32-arm64": - optional: true - "@esbuild/win32-ia32": - optional: true - "@esbuild/win32-x64": - optional: true - bin: - esbuild: bin/esbuild - checksum: febf218155513bb9c9c970508c03ec58e0aacfdc23394f425836a09f1da0dae0afa12949274adfd382782eef097f86b2d6b3032293062291f2f471de204f77ec - languageName: node - linkType: hard - "esbuild@npm:^0.17.2": version: 0.17.4 resolution: "esbuild@npm:0.17.4" @@ -8059,6 +7989,86 @@ __metadata: languageName: node linkType: hard +"esbuild@npm:^0.21.5": + version: 0.21.5 + resolution: "esbuild@npm:0.21.5" + dependencies: + "@esbuild/aix-ppc64": 0.21.5 + "@esbuild/android-arm": 0.21.5 + "@esbuild/android-arm64": 0.21.5 + "@esbuild/android-x64": 0.21.5 + "@esbuild/darwin-arm64": 0.21.5 + "@esbuild/darwin-x64": 0.21.5 + "@esbuild/freebsd-arm64": 0.21.5 + "@esbuild/freebsd-x64": 0.21.5 + "@esbuild/linux-arm": 0.21.5 + "@esbuild/linux-arm64": 0.21.5 + "@esbuild/linux-ia32": 0.21.5 + "@esbuild/linux-loong64": 0.21.5 + "@esbuild/linux-mips64el": 0.21.5 + "@esbuild/linux-ppc64": 0.21.5 + "@esbuild/linux-riscv64": 0.21.5 + "@esbuild/linux-s390x": 0.21.5 + "@esbuild/linux-x64": 0.21.5 + "@esbuild/netbsd-x64": 0.21.5 + "@esbuild/openbsd-x64": 0.21.5 + "@esbuild/sunos-x64": 0.21.5 + "@esbuild/win32-arm64": 0.21.5 + "@esbuild/win32-ia32": 0.21.5 + "@esbuild/win32-x64": 0.21.5 + dependenciesMeta: + "@esbuild/aix-ppc64": + optional: true + "@esbuild/android-arm": + optional: true + "@esbuild/android-arm64": + optional: true + "@esbuild/android-x64": + optional: true + "@esbuild/darwin-arm64": + optional: true + "@esbuild/darwin-x64": + optional: true + "@esbuild/freebsd-arm64": + optional: true + "@esbuild/freebsd-x64": + optional: true + "@esbuild/linux-arm": + optional: true + "@esbuild/linux-arm64": + optional: true + "@esbuild/linux-ia32": + optional: true + "@esbuild/linux-loong64": + optional: true + "@esbuild/linux-mips64el": + optional: true + "@esbuild/linux-ppc64": + optional: true + "@esbuild/linux-riscv64": + optional: true + "@esbuild/linux-s390x": + optional: true + "@esbuild/linux-x64": + optional: true + "@esbuild/netbsd-x64": + optional: true + "@esbuild/openbsd-x64": + optional: true + "@esbuild/sunos-x64": + optional: true + "@esbuild/win32-arm64": + optional: true + "@esbuild/win32-ia32": + optional: true + "@esbuild/win32-x64": + optional: true + bin: + esbuild: bin/esbuild + checksum: 2911c7b50b23a9df59a7d6d4cdd3a4f85855787f374dce751148dbb13305e0ce7e880dde1608c2ab7a927fc6cec3587b80995f7fc87a64b455f8b70b55fd8ec1 + languageName: node + linkType: hard + "escalade@npm:^3.1.1": version: 3.1.1 resolution: "escalade@npm:3.1.1"