diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d895df888..f198744ed 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -78,6 +78,41 @@ jobs: path: packages/*/dist key: build-vue-i18n-os-${{ matrix.os }}-${{ github.sha }} + build-rolldown: + name: Build with rolldown + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + node: [18] + + runs-on: ${{ matrix.os }} + + steps: + - name: Checkout codes + uses: actions/checkout@v4 + + - name: Enable corepack + run: corepack enable + + - name: Setup node + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node }} + cache: 'pnpm' + + - name: Install dependencies + run: pnpm install --no-frozen-lockfile + + - name: Build codes + run: | + pnpm build:rolldown --withTypes + + - name: Cache dist + uses: actions/cache@v4 + with: + path: packages/*/dist + key: build-rolldown-vue-i18n-os-${{ matrix.os }}-${{ github.sha }} + test-unit: name: Unit test strategy: @@ -147,3 +182,44 @@ jobs: - name: Run e2e tests run: pnpm test:e2e + + # test-e2e-rolldown: + # name: E2E test for rolldown build + + # needs: + # - build-rolldown + + # strategy: + # matrix: + # os: [ubuntu-latest, windows-latest, macos-latest] + # node: [18.19, 20, 22] + + # runs-on: ${{ matrix.os }} + + # steps: + # - name: Checkout codes + # uses: actions/checkout@v4 + + # - name: Enable corepack + # run: corepack enable + + # - name: Setup node + # uses: actions/setup-node@v4 + # with: + # node-version: ${{ matrix.node }} + # cache: 'pnpm' + + # - name: Install dependencies + # run: pnpm install --no-frozen-lockfile + + # - name: Install Playwright + # run: pnpm playwright-core install chromium + + # - name: Restore dist cache + # uses: actions/cache@v4 + # with: + # path: packages/*/dist + # key: build-rolldown-vue-i18n-os-${{ matrix.os }}-${{ github.sha }} + + # - name: Run e2e tests + # run: pnpm test:e2e diff --git a/.prettierignore b/.prettierignore index a41a93d2d..d8f25524a 100644 --- a/.prettierignore +++ b/.prettierignore @@ -4,4 +4,5 @@ docs coverage tsconfig.json api-extractor.json -README.md \ No newline at end of file +README.md +temp diff --git a/api-extractor.json b/api-extractor.json index 3261413ed..66d483c65 100644 --- a/api-extractor.json +++ b/api-extractor.json @@ -303,7 +303,7 @@ * * DEFAULT VALUE: "warning" */ - "logLevel": "warning", + "logLevel": "none", /* FIXME: Change to "warning" */ /** * When addToApiReportFile is true: If API Extractor is configured to write an API report file (.api.md), diff --git a/eslint.config.mjs b/eslint.config.mjs index f80384985..add504a49 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -93,9 +93,12 @@ export default [ '**/test/**', '**/examples/**', 'shim.d.ts', + 'temp/**', '.eslintcache', '.eslintrc.cjs', + 'packages/*/vite.config.ts', 'packages/*/index.js', + 'packages/vue-i18n-core/petite.js', 'docsgen.config.js', 'scripts/api/*.js' ] diff --git a/package.json b/package.json index 870447fca..48bab14f6 100644 --- a/package.json +++ b/package.json @@ -24,6 +24,7 @@ "bench:simple-jit-aot": "node --expose-gc ./benchmark/simple-jit-aot.mjs", "build": "tsx ./scripts/build.ts", "build:explorer": "pnpm --filter @intlify/message-format-explorer build", + "build:rolldown": "tsx ./scripts/build-rolldown.ts", "build:size": "pnpm build && run-p build:size-*", "build:size-core": "pnpm --filter @intlify/size-check-core build", "build:size-petite-vue-i18n": "pnpm --filter @intlify/size-check-petite-vue-i18n build", @@ -84,16 +85,18 @@ "@eslint/js": "^9.9.1", "@intlify/core-base": "workspace:*", "@intlify/message-compiler": "workspace:*", + "@intlify/vue-i18n-core": "workspace:*", "@microsoft/api-extractor": "7.15.2", + "@rolldown/plugin-node-polyfills": "^1.0.0", "@rollup/plugin-commonjs": "^25.0.0", "@rollup/plugin-json": "^6.0.0", "@rollup/plugin-node-resolve": "^15.0.2", "@rollup/plugin-replace": "^5.0.2", "@rollup/plugin-terser": "^0.4.3", "@secretlint/secretlint-rule-preset-recommend": "^3.1.0", + "@swc/core": "^1.10.4", "@textlint-rule/textlint-rule-no-unmatched-pair": "^2.0.0", "@types/eslint": "^9.6.1", - "@types/js-yaml": "^4.0.5", "@types/jsdom": "^21.1.1", "@types/node": "^22.10.3", "@types/rc": "^1.2.4", @@ -106,25 +109,28 @@ "eslint-config-prettier": "^9.1.0", "eslint-plugin-vue": "^9.28.0", "execa": "^9.3.0", + "fast-glob": "^3.3.3", "fixpack": "^4.0.0", "get-port-please": "^3.1.2", "globals": "^15.9.0", - "globby": "^14.0.1", - "js-yaml": "^4.1.0", "jsdom": "^24.0.0", "lint-staged": "^15.2.2", "listhen": "^1.7.2", + "magic-string": "^0.30.17", "markdown-table": "^3.0.4", "mitata": "^1.0.20", "npm-run-all2": "^7.0.0", "opener": "^1.5.2", - "pathe": "^1.1.2", + "oxc-parser": "^0.44.0", + "oxc-transform": "^0.44.0", "picocolors": "^1.0.0", "pkg-pr-new": "^0.0.37", "playwright-core": "^1.45.3", "prettier": "^3.3.3", "rc": "^1.2.8", + "rolldown": "1.0.0-beta.1", "rollup": "^4.21.2", + "rollup-plugin-dts": "^6.1.1", "rollup-plugin-node-builtins": "^2.1.2", "rollup-plugin-node-globals": "^1.4.0", "rollup-plugin-typescript2": "^0.36.0", @@ -150,7 +156,7 @@ "trash-cli": "^6.0.0", "tslib": "^2.6.2", "tsx": "^4.11.2", - "typescript": "^5.5.3", + "typescript": "^5.6.3", "typescript-eslint": "^8.4.0", "vitepress": "1.5.0", "vitest": "^2.1.5", diff --git a/packages/core-base/src/context.ts b/packages/core-base/src/context.ts index dcfe923f3..4a49ea0a1 100644 --- a/packages/core-base/src/context.ts +++ b/packages/core-base/src/context.ts @@ -333,7 +333,7 @@ export interface CoreInternalContext { * Intlify core-base version * @internal */ -export const VERSION = __VERSION__ +export const VERSION: string = __VERSION__ export const NOT_REOSLVED = -1 diff --git a/packages/core-base/src/datetime.ts b/packages/core-base/src/datetime.ts index 9bd98f4c4..2ba5d145d 100644 --- a/packages/core-base/src/datetime.ts +++ b/packages/core-base/src/datetime.ts @@ -295,7 +295,7 @@ export function datetime< } /** @internal */ -export const DATETIME_FORMAT_OPTIONS_KEYS = [ +export const DATETIME_FORMAT_OPTIONS_KEYS: string[] = [ 'localeMatcher', 'weekday', 'era', diff --git a/packages/core-base/src/devtools.ts b/packages/core-base/src/devtools.ts index 20b0f26db..ababcdabd 100644 --- a/packages/core-base/src/devtools.ts +++ b/packages/core-base/src/devtools.ts @@ -30,10 +30,14 @@ export function initI18nDevTools( }) } -export const translateDevTools = +export const translateDevTools: ReturnType = /* #__PURE__*/ createDevToolsHook('function:translate') -function createDevToolsHook(hook: IntlifyDevToolsHooks) { +function createDevToolsHook( + hook: IntlifyDevToolsHooks +): ( + payloads: IntlifyDevToolsHookPayloads[IntlifyDevToolsHooks] +) => void | null { return (payloads: IntlifyDevToolsHookPayloads[IntlifyDevToolsHooks]) => devtools && devtools.emit(hook, payloads) } diff --git a/packages/core-base/src/errors.ts b/packages/core-base/src/errors.ts index d63ed43f9..2cbadfc83 100644 --- a/packages/core-base/src/errors.ts +++ b/packages/core-base/src/errors.ts @@ -8,7 +8,7 @@ import type { BaseError } from '@intlify/shared' export interface CoreError extends BaseError {} export const CoreErrorCodes = { - INVALID_ARGUMENT: COMPILE_ERROR_CODES_EXTEND_POINT, // 17 + INVALID_ARGUMENT: COMPILE_ERROR_CODES_EXTEND_POINT as number, // 17 INVALID_DATE_ARGUMENT: 18, INVALID_ISO_DATE_ARGUMENT: 19, NOT_SUPPORT_NON_STRING_MESSAGE: 20, diff --git a/packages/core-base/src/fallbacker.ts b/packages/core-base/src/fallbacker.ts index 4f9eeb3c6..67e9ba103 100644 --- a/packages/core-base/src/fallbacker.ts +++ b/packages/core-base/src/fallbacker.ts @@ -35,7 +35,7 @@ export function getLocale( let _resolveLocale: string /** @internal */ -export function resolveLocale(locale: Locale | LocaleDetector) { +export function resolveLocale(locale: Locale | LocaleDetector): string { if (isString(locale)) { return locale } else { diff --git a/packages/core-base/src/format.ts b/packages/core-base/src/format.ts index fba8eed02..95eb7f770 100644 --- a/packages/core-base/src/format.ts +++ b/packages/core-base/src/format.ts @@ -163,7 +163,7 @@ export function formatMessagePart( const PROPS_TYPE = ['t', 'type'] -export function resolveType(node: Node) { +export function resolveType(node: Node): ReturnType { return resolveProps(node, PROPS_TYPE) } diff --git a/packages/core-base/src/index.ts b/packages/core-base/src/index.ts index bf4a71ec1..0ce608303 100644 --- a/packages/core-base/src/index.ts +++ b/packages/core-base/src/index.ts @@ -1,21 +1,17 @@ import { initFeatureFlags } from './misc' -export { +export { createCompileError } from '@intlify/message-compiler' +export type { CompileError, CompileErrorCodes, - createCompileError, ResourceNode } from '@intlify/message-compiler' export * from './compilation' export * from './context' export * from './datetime' export * from './devtools' -export { - CORE_ERROR_CODES_EXTEND_POINT, - CoreError, - CoreErrorCodes, - createCoreError -} from './errors' +export { CORE_ERROR_CODES_EXTEND_POINT, createCoreError } from './errors' +export type { CoreError, CoreErrorCodes } from './errors' export * from './fallbacker' export * from './number' export * from './resolver' diff --git a/packages/core-base/src/number.ts b/packages/core-base/src/number.ts index fb70d60b8..0ef5aea1b 100644 --- a/packages/core-base/src/number.ts +++ b/packages/core-base/src/number.ts @@ -290,7 +290,7 @@ export function number< } /** @internal */ -export const NUMBER_FORMAT_OPTIONS_KEYS = [ +export const NUMBER_FORMAT_OPTIONS_KEYS: string[] = [ 'localeMatcher', 'style', 'currency', diff --git a/packages/core-base/src/warnings.ts b/packages/core-base/src/warnings.ts index 8c53ec2ac..3b0e2adc1 100644 --- a/packages/core-base/src/warnings.ts +++ b/packages/core-base/src/warnings.ts @@ -10,7 +10,7 @@ export const CoreWarnCodes = { EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER: 7 } as const -export const CORE_WARN_CODES_EXTEND_POINT = 8 +export const CORE_WARN_CODES_EXTEND_POINT: number = 8 export type CoreWarnCodes = (typeof CoreWarnCodes)[keyof typeof CoreWarnCodes] diff --git a/packages/format-explorer/src/theme.ts b/packages/format-explorer/src/theme.ts index 99da1081a..9e1b2f67e 100644 --- a/packages/format-explorer/src/theme.ts +++ b/packages/format-explorer/src/theme.ts @@ -241,4 +241,4 @@ export default { 'editorCursor.foreground': '#AEAFAD', 'editorWhitespace.foreground': '#4B4E55' } -} +} as const diff --git a/packages/message-compiler/src/errors.ts b/packages/message-compiler/src/errors.ts index 07b711c44..ce64eb727 100644 --- a/packages/message-compiler/src/errors.ts +++ b/packages/message-compiler/src/errors.ts @@ -48,7 +48,7 @@ export const CompileErrorCodes = { // Special value for higher-order compilers to pick up the last code // to avoid collision of error codes. // This should always be kept as the last item. -export const COMPILE_ERROR_CODES_EXTEND_POINT = 17 +export const COMPILE_ERROR_CODES_EXTEND_POINT: number = 17 export type CompileErrorCodes = (typeof CompileErrorCodes)[keyof typeof CompileErrorCodes] diff --git a/packages/message-compiler/src/mangler.ts b/packages/message-compiler/src/mangler.ts index d8ab6189a..f23bd4265 100644 --- a/packages/message-compiler/src/mangler.ts +++ b/packages/message-compiler/src/mangler.ts @@ -19,7 +19,7 @@ const ERROR_DOMAIN = 'minifier' /* eslint-disable @typescript-eslint/no-explicit-any */ -export function mangle(node: Node) { +export function mangle(node: Node): void { node.t = node.type switch (node.type) { diff --git a/packages/message-compiler/src/scanner.ts b/packages/message-compiler/src/scanner.ts index 09496337d..bcd73a061 100644 --- a/packages/message-compiler/src/scanner.ts +++ b/packages/message-compiler/src/scanner.ts @@ -16,8 +16,10 @@ export interface Scanner { export const CHAR_SP = ' ' export const CHAR_CR = '\r' export const CHAR_LF = '\n' -export const CHAR_LS = String.fromCharCode(0x2028) -export const CHAR_PS = String.fromCharCode(0x2029) +export const CHAR_LS: ReturnType = + String.fromCharCode(0x2028) +export const CHAR_PS: ReturnType = + String.fromCharCode(0x2029) export function createScanner(str: string): Scanner { const _buf = str diff --git a/packages/petite-vue-i18n/package.json b/packages/petite-vue-i18n/package.json index ccb15b1d8..97162f603 100644 --- a/packages/petite-vue-i18n/package.json +++ b/packages/petite-vue-i18n/package.json @@ -37,6 +37,7 @@ "dependencies": { "@intlify/core-base": "workspace:*", "@intlify/shared": "workspace:*", + "@intlify/vue-i18n-core": "workspace:*", "@vue/devtools-api": "^6.5.0" }, "devDependencies": { diff --git a/packages/petite-vue-i18n/src/index.ts b/packages/petite-vue-i18n/src/index.ts index 9f3895960..5c4b915cb 100644 --- a/packages/petite-vue-i18n/src/index.ts +++ b/packages/petite-vue-i18n/src/index.ts @@ -4,7 +4,7 @@ import { setDevToolsHook } from '@intlify/core-base' import { getGlobalThis } from '@intlify/shared' -import { initDev, initFeatureFlags } from '../../vue-i18n-core/src/misc' +import { initDev, initFeatureFlags } from '@intlify/vue-i18n-core/petite' if (__ESM_BUNDLER__ && !__TEST__) { initFeatureFlags() @@ -13,7 +13,7 @@ if (__ESM_BUNDLER__ && !__TEST__) { // register message compiler at petite-vue-i18n registerMessageCompiler(compile) -export { +export type { CompileError, DateTimeOptions, FallbackLocale, @@ -47,10 +47,13 @@ export { RemovedIndexResources, TranslateOptions } from '@intlify/core-base' -export { +export { createI18n, useI18n, VERSION } from '@intlify/vue-i18n-core/petite' +export type { Composer, + ComposerAdditionalOptions, ComposerCustom, ComposerDateTimeFormatting, + ComposerExtender, ComposerNumberFormatting, ComposerOptions, ComposerResolveLocaleMessageTranslation, @@ -63,23 +66,20 @@ export { DefineDateTimeFormat, DefineLocaleMessage, DefineNumberFormat, - MissingHandler, - VueMessageType -} from '../../vue-i18n-core/src/composer' -export { - ComposerAdditionalOptions, - ComposerExtender, - createI18n, + Disposer, ExportedGlobalComposer, I18n, I18nAdditionalOptions, I18nMode, I18nOptions, + I18nPluginOptions, I18nScope, - useI18n, - UseI18nOptions -} from '../../vue-i18n-core/src/i18n' -export { + MissingHandler, + UseI18nOptions, + VueMessageType +} from '@intlify/vue-i18n-core/petite' + +export type { Choice, DateTimeFormatResult, LocaleMessageObject, @@ -94,10 +94,7 @@ export { VueI18nResolveLocaleMessageTranslation, VueI18nTranslation, WarnHtmlInMessageLevel -} from '../../vue-i18n-core/src/legacy' -export { I18nPluginOptions } from '../../vue-i18n-core/src/plugin' -export { VERSION } from './../../vue-i18n-core/src/misc' -export { Disposer } from './../../vue-i18n-core/src/types' +} from '@intlify/vue-i18n-core/petite' export type { IsEmptyObject, diff --git a/packages/petite-vue-i18n/src/runtime.ts b/packages/petite-vue-i18n/src/runtime.ts index a2898353f..d9d40abb9 100644 --- a/packages/petite-vue-i18n/src/runtime.ts +++ b/packages/petite-vue-i18n/src/runtime.ts @@ -4,7 +4,7 @@ import { setDevToolsHook } from '@intlify/core-base' import { getGlobalThis } from '@intlify/shared' -import { initDev, initFeatureFlags } from '../../vue-i18n-core/src/misc' +import { initDev, initFeatureFlags } from '@intlify/vue-i18n-core/petite' if (__ESM_BUNDLER__ && !__TEST__) { initFeatureFlags() @@ -13,7 +13,7 @@ if (__ESM_BUNDLER__ && !__TEST__) { // register message compiler for jit compilation registerMessageCompiler(compile) -export { +export type { CompileError, DateTimeOptions, FallbackLocale, @@ -46,45 +46,41 @@ export { RemovedIndexResources, TranslateOptions } from '@intlify/core-base' -export { +export { createI18n, useI18n, VERSION } from '@intlify/vue-i18n-core/petite' +export type { + Choice, Composer, + ComposerAdditionalOptions, ComposerCustom, ComposerDateTimeFormatting, + ComposerExtender, ComposerNumberFormatting, ComposerOptions, ComposerResolveLocaleMessageTranslation, ComposerTranslation, CustomBlock, CustomBlocks, + DateTimeFormatResult, DefaultDateTimeFormatSchema, DefaultLocaleMessageSchema, DefaultNumberFormatSchema, DefineDateTimeFormat, DefineLocaleMessage, DefineNumberFormat, - MissingHandler, - VueMessageType -} from '../../vue-i18n-core/src/composer' -export { - ComposerAdditionalOptions, - ComposerExtender, - createI18n, + Disposer, ExportedGlobalComposer, I18n, I18nAdditionalOptions, I18nMode, I18nOptions, + I18nPluginOptions, I18nScope, - useI18n, - UseI18nOptions -} from '../../vue-i18n-core/src/i18n' -export { - Choice, - DateTimeFormatResult, LocaleMessageObject, + MissingHandler, NumberFormatResult, PluralizationRulesMap, TranslateResult, + UseI18nOptions, VueI18n, VueI18nDateTimeFormatting, VueI18nExtender, @@ -92,11 +88,9 @@ export { VueI18nOptions, VueI18nResolveLocaleMessageTranslation, VueI18nTranslation, + VueMessageType, WarnHtmlInMessageLevel -} from '../../vue-i18n-core/src/legacy' -export { I18nPluginOptions } from '../../vue-i18n-core/src/plugin' -export { VERSION } from './../../vue-i18n-core/src/misc' -export { Disposer } from './../../vue-i18n-core/src/types' +} from '@intlify/vue-i18n-core/petite' export type { IsEmptyObject, diff --git a/packages/petite-vue-i18n/src/vue.d.ts b/packages/petite-vue-i18n/src/vue.d.ts index 862d9e77c..296f85541 100644 --- a/packages/petite-vue-i18n/src/vue.d.ts +++ b/packages/petite-vue-i18n/src/vue.d.ts @@ -1,22 +1,23 @@ -import type { NamedValue, JsonPaths } from '@intlify/core-base' import type { - TranslateOptions, + IsEmptyObject, IsNever, - IsEmptyObject + NamedValue, + TranslateOptions } from '@intlify/core-base' -import type { CustomBlocks } from '../../vue-i18n-core/src/composer' import type { + CustomBlocks, DefineLocaleMessage, - RemovedIndexResources -} from '../../vue-i18n-core/src/composer' -import type { + ExportedGlobalComposer, + RemovedIndexResources, + TranslateResult, VueI18n, - VueI18nOptions, - TranslateResult -} from '../../vue-i18n-core/src/legacy' -import type { ExportedGlobalComposer } from '../../vue-i18n-core/src/i18n' + VueI18nOptions +} from '@intlify/vue-i18n-core/petite' // --- THE CONTENT BELOW THIS LINE WILL BE APPENDED TO DTS FILE IN DIST DIRECTORY --- // + +import type { JsonPaths } from '@intlify/core-base' + declare module 'vue' { /** * Component Custom Options for Vue I18n diff --git a/packages/shared/src/utils.ts b/packages/shared/src/utils.ts index f967df0cf..7323ca921 100644 --- a/packages/shared/src/utils.ts +++ b/packages/shared/src/utils.ts @@ -3,7 +3,7 @@ * written by kazuya kawaguchi */ -export const inBrowser = typeof window !== 'undefined' +export const inBrowser: boolean = typeof window !== 'undefined' export let mark: (tag: string) => void | undefined export let measure: ( @@ -79,7 +79,7 @@ export const isRegExp = (val: unknown): val is RegExp => export const isEmptyObject = (val: unknown): val is boolean => isPlainObject(val) && Object.keys(val).length === 0 -export const assign = Object.assign +export const assign: typeof Object.assign = Object.assign const _create = Object.create export const create = (obj: object | null = null): object => _create(obj) @@ -124,7 +124,7 @@ export function hasOwn(obj: object | Array, key: string): boolean { * https://github.com/vuejs/vue-next/blob/master/packages/shared/src/index.ts * https://github.com/vuejs/vue-next/blob/master/packages/shared/src/codeframe.ts */ -export const isArray = Array.isArray +export const isArray: typeof Array.isArray = Array.isArray export const isFunction = (val: unknown): val is Function => typeof val === 'function' export const isString = (val: unknown): val is string => typeof val === 'string' @@ -140,7 +140,8 @@ export const isPromise = (val: unknown): val is Promise => { return isObject(val) && isFunction(val.then) && isFunction(val.catch) } -export const objectToString = Object.prototype.toString +export const objectToString: typeof Object.prototype.toString = + Object.prototype.toString export const toTypeString = (value: unknown): string => objectToString.call(value) @@ -167,8 +168,8 @@ const RANGE = 2 export function generateCodeFrame( source: string, - start = 0, - end = source.length + start: number = 0, + end: number = source.length ): string { const lines = source.split(/\r?\n/) let count = 0 diff --git a/packages/shared/src/warn.ts b/packages/shared/src/warn.ts index 332be0018..771d8b091 100644 --- a/packages/shared/src/warn.ts +++ b/packages/shared/src/warn.ts @@ -10,7 +10,7 @@ export function warn(msg: string, err?: Error): void { const hasWarned: Record = {} -export function warnOnce(msg: string) { +export function warnOnce(msg: string): void { if (!hasWarned[msg]) { hasWarned[msg] = true warn(msg) diff --git a/packages/vue-i18n-core/api-extractor-petite.json b/packages/vue-i18n-core/api-extractor-petite.json new file mode 100644 index 000000000..c5afc490a --- /dev/null +++ b/packages/vue-i18n-core/api-extractor-petite.json @@ -0,0 +1,7 @@ +{ + "extends": "../../api-extractor.json", + "mainEntryPointFilePath": "./dist/packages//src/petite.d.ts", + "dtsRollup": { + "publicTrimmedFilePath": "./dist/petite-vue-i18n-core.d.ts" + } +} diff --git a/packages/vue-i18n-core/package.json b/packages/vue-i18n-core/package.json index 25fea6c07..c83192054 100644 --- a/packages/vue-i18n-core/package.json +++ b/packages/vue-i18n-core/package.json @@ -59,6 +59,7 @@ }, "exports": { ".": { + "types": "./dist/vue-i18n-core.d.ts", "import": "./dist/vue-i18n-core.mjs", "browser": "./dist/vue-i18n-core.esm-browser.js", "node": { @@ -74,6 +75,23 @@ } } }, + "./petite": { + "types": "./dist/petite-vue-i18n-core.d.ts", + "import": "./dist/petite-vue-i18n-core.mjs", + "browser": "./dist/petite-vue-i18n-core.esm-browser.js", + "node": { + "import": { + "production": "./petite-dist/vue-i18n-core.prod.cjs", + "development": "./petite-dist/vue-i18n-core.mjs", + "default": "./dist/petite-vue-i18n-core.mjs" + }, + "require": { + "production": "./dist/petite-vue-i18n-core.prod.cjs", + "development": "./dist/petite-vue-i18n-core.cjs", + "default": "./petite.js" + } + } + }, "./dist/*": "./dist/*", "./package.json": "./package.json" }, diff --git a/packages/vue-i18n-core/petite.js b/packages/vue-i18n-core/petite.js new file mode 100644 index 000000000..44e0a7a2b --- /dev/null +++ b/packages/vue-i18n-core/petite.js @@ -0,0 +1,7 @@ +'use strict' + +if (process.env.NODE_ENV === 'production') { + module.exports = require('./dist/petite-vue-i18n-core.prod.cjs') +} else { + module.exports = require('./dist/petite-vue-i18n-core.cjs') +} diff --git a/packages/vue-i18n-core/src/components/DatetimeFormat.ts b/packages/vue-i18n-core/src/components/DatetimeFormat.ts index 1a98b6e80..f9cb9667f 100644 --- a/packages/vue-i18n-core/src/components/DatetimeFormat.ts +++ b/packages/vue-i18n-core/src/components/DatetimeFormat.ts @@ -3,11 +3,11 @@ import { assign } from '@intlify/shared' import { defineComponent } from 'vue' import { useI18n } from '../i18n' import { DatetimePartsSymbol } from '../symbols' -import { baseFormatProps } from './base' +import { BaseFormatPropsValidators } from './base' import { renderFormatter } from './formatRenderer' import type { DateTimeOptions } from '@intlify/core-base' -import type { VNodeProps } from 'vue' +import type { ComponentOptions, SetupContext, VNodeProps } from 'vue' import type { Composer, ComposerInternal } from '../composer' import type { BaseFormatProps } from './base' import type { FormattableProps } from './formatRenderer' @@ -22,47 +22,47 @@ export type DatetimeFormatProps = FormattableProps< Intl.DateTimeFormatOptions > -export const DatetimeFormatImpl = /* #__PURE__*/ defineComponent({ - /* eslint-disable */ - name: 'i18n-d', - props: assign( - { - value: { - type: [Number, Date], - required: true +// TODO: +export const DatetimeFormatImpl: ComponentOptions = + /* #__PURE__*/ defineComponent({ + name: 'i18n-d', // eslint-disable-line vue/component-definition-name-casing + props: /*#__PURE__*/ assign( + { + value: { + type: [Number, Date], + required: true + }, + format: { + type: [String, Object] + } }, - format: { - type: [String, Object] - } - }, - baseFormatProps - ), - /* eslint-enable */ - // eslint-disable-next-line @typescript-eslint/no-explicit-any - setup(props: any, context: any): any { - const i18n = - props.i18n || - (useI18n({ - useScope: props.scope as 'global' | 'parent', - __useComponent: true - }) as unknown as Composer & ComposerInternal) + BaseFormatPropsValidators + ), - return renderFormatter< - FormattableProps, - number | Date, - Intl.DateTimeFormatOptions, - DateTimeOptions, - Intl.DateTimeFormatPart - >( - props as DatetimeFormatProps, - context, - DATETIME_FORMAT_OPTIONS_KEYS, - (...args: unknown[]) => - // eslint-disable-next-line @typescript-eslint/no-explicit-any - (i18n as any)[DatetimePartsSymbol](...args) - ) - } -}) + setup(props: DatetimeFormatProps, context: SetupContext) { + const i18n = + props.i18n || + (useI18n({ + useScope: props.scope as 'global' | 'parent', + __useComponent: true + }) as unknown as Composer & ComposerInternal) + + return renderFormatter< + FormattableProps, + number | Date, + Intl.DateTimeFormatOptions, + DateTimeOptions, + Intl.DateTimeFormatPart + >( + props as DatetimeFormatProps, + context, + DATETIME_FORMAT_OPTIONS_KEYS, + (...args: unknown[]) => + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (i18n as any)[DatetimePartsSymbol](...args) + ) + } + }) /** * Datetime Format Component @@ -87,4 +87,4 @@ export const DatetimeFormat = DatetimeFormatImpl as unknown as { } } -export const I18nD = DatetimeFormat +export const I18nD: typeof DatetimeFormat = DatetimeFormat diff --git a/packages/vue-i18n-core/src/components/NumberFormat.ts b/packages/vue-i18n-core/src/components/NumberFormat.ts index 75cf887af..65748fb0e 100644 --- a/packages/vue-i18n-core/src/components/NumberFormat.ts +++ b/packages/vue-i18n-core/src/components/NumberFormat.ts @@ -3,11 +3,11 @@ import { assign } from '@intlify/shared' import { defineComponent } from 'vue' import { useI18n } from '../i18n' import { NumberPartsSymbol } from '../symbols' -import { baseFormatProps } from './base' +import { BaseFormatPropsValidators } from './base' import { renderFormatter } from './formatRenderer' import type { NumberOptions } from '@intlify/core-base' -import type { VNodeProps } from 'vue' +import type { ComponentOptions, SetupContext, VNodeProps } from 'vue' import type { Composer, ComposerInternal } from '../composer' import type { BaseFormatProps } from './base' import type { FormattableProps } from './formatRenderer' @@ -22,47 +22,46 @@ export type NumberFormatProps = FormattableProps< Intl.NumberFormatOptions > -export const NumberFormatImpl = /*#__PURE__*/ defineComponent({ - /* eslint-disable */ - name: 'i18n-n', - props: assign( - { - value: { - type: Number, - required: true +// TODO: +export const NumberFormatImpl: ComponentOptions = + /*#__PURE__*/ defineComponent({ + name: 'i18n-n', // eslint-disable-line vue/component-definition-name-casing + props: /*#__PURE__*/ assign( + { + value: { + type: Number, + required: true + }, + format: { + type: [String, Object] + } }, - format: { - type: [String, Object] - } - }, - baseFormatProps - ), - /* eslint-enable */ - // eslint-disable-next-line @typescript-eslint/no-explicit-any - setup(props: any, context: any): any { - const i18n = - props.i18n || - (useI18n({ - useScope: props.scope as 'global' | 'parent', - __useComponent: true - }) as unknown as Composer & ComposerInternal) + BaseFormatPropsValidators + ), + setup(props: NumberFormatProps, context: SetupContext) { + const i18n = + props.i18n || + (useI18n({ + useScope: props.scope as 'global' | 'parent', + __useComponent: true + }) as unknown as Composer & ComposerInternal) - return renderFormatter< - FormattableProps, - number, - Intl.NumberFormatOptions, - NumberOptions, - Intl.NumberFormatPart - >( - props as NumberFormatProps, - context, - NUMBER_FORMAT_OPTIONS_KEYS, - (...args: unknown[]) => - // eslint-disable-next-line @typescript-eslint/no-explicit-any - (i18n as any)[NumberPartsSymbol](...args) - ) - } -}) + return renderFormatter< + FormattableProps, + number, + Intl.NumberFormatOptions, + NumberOptions, + Intl.NumberFormatPart + >( + props as NumberFormatProps, + context, + NUMBER_FORMAT_OPTIONS_KEYS, + (...args: unknown[]) => + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (i18n as any)[NumberPartsSymbol](...args) + ) + } + }) /** * export the public type for h/tsx inference @@ -92,4 +91,4 @@ export const NumberFormat = NumberFormatImpl as unknown as { } } -export const I18nN = NumberFormat +export const I18nN: typeof NumberFormat = NumberFormat diff --git a/packages/vue-i18n-core/src/components/Translation.ts b/packages/vue-i18n-core/src/components/Translation.ts index bb11b3a94..661e925ed 100644 --- a/packages/vue-i18n-core/src/components/Translation.ts +++ b/packages/vue-i18n-core/src/components/Translation.ts @@ -2,11 +2,16 @@ import { assign, create, isNumber, isObject, isString } from '@intlify/shared' import { defineComponent, h } from 'vue' import { useI18n } from '../i18n' import { TranslateVNodeSymbol } from '../symbols' -import { baseFormatProps } from './base' +import { BaseFormatPropsValidators } from './base' import { getFragmentableTag, getInterpolateArg } from './utils' import type { TranslateOptions } from '@intlify/core-base' -import type { VNodeChild, VNodeProps } from 'vue' +import type { + ComponentOptions, + SetupContext, + VNodeChild, + VNodeProps +} from 'vue' import type { Composer, ComposerInternal } from '../composer' import type { BaseFormatProps } from './base' @@ -28,60 +33,59 @@ export interface TranslationProps extends BaseFormatProps { plural?: number | string } -export const TranslationImpl = /*#__PURE__*/ defineComponent({ - /* eslint-disable */ - name: 'i18n-t', - props: assign( - { - keypath: { - type: String, - required: true +export const TranslationImpl: ComponentOptions = + /*#__PURE__*/ defineComponent({ + name: 'i18n-t', // eslint-disable-line vue/component-definition-name-casing + props: /*#__PURE__*/ assign( + {}, + { + keypath: { + type: String, + required: true + }, + plural: { + type: [Number, String], + // eslint-disable-next-line @typescript-eslint/no-explicit-any + validator: (val: any): boolean => isNumber(val) || !isNaN(val) + } }, - plural: { - type: [Number, String], + BaseFormatPropsValidators + ), + setup(props: TranslationProps, context: SetupContext) { + const { slots, attrs } = context + // NOTE: avoid https://github.com/microsoft/rushstack/issues/1050 + const i18n = + props.i18n || + (useI18n({ + useScope: props.scope as 'global' | 'parent', + __useComponent: true + }) as unknown as Composer & ComposerInternal) - validator: (val: any): boolean => isNumber(val) || !isNaN(val) + return (): VNodeChild => { + const keys = Object.keys(slots).filter(key => key !== '_') + const options = create() as TranslateOptions + if (props.locale) { + options.locale = props.locale + } + if (props.plural !== undefined) { + options.plural = isString(props.plural) ? +props.plural : props.plural + } + const arg = getInterpolateArg(context, keys) + // eslint-disable-next-line @typescript-eslint/no-explicit-any + const children = (i18n as any)[TranslateVNodeSymbol]( + props.keypath, + arg, + options + ) + const assignedAttrs = assign(create(), attrs) + const tag = + isString(props.tag) || isObject(props.tag) + ? props.tag + : getFragmentableTag() + return h(tag, assignedAttrs, children) } - }, - baseFormatProps - ), - /* eslint-enable */ - // eslint-disable-next-line @typescript-eslint/no-explicit-any - setup(props: any, context: any): any { - const { slots, attrs } = context - // NOTE: avoid https://github.com/microsoft/rushstack/issues/1050 - const i18n = - props.i18n || - (useI18n({ - useScope: props.scope as 'global' | 'parent', - __useComponent: true - }) as unknown as Composer & ComposerInternal) - - return (): VNodeChild => { - const keys = Object.keys(slots).filter(key => key !== '_') - const options = create() as TranslateOptions - if (props.locale) { - options.locale = props.locale - } - if (props.plural !== undefined) { - options.plural = isString(props.plural) ? +props.plural : props.plural - } - const arg = getInterpolateArg(context, keys) - // eslint-disable-next-line @typescript-eslint/no-explicit-any - const children = (i18n as any)[TranslateVNodeSymbol]( - props.keypath, - arg, - options - ) - const assignedAttrs = assign(create(), attrs) - const tag = - isString(props.tag) || isObject(props.tag) - ? props.tag - : getFragmentableTag() - return h(tag, assignedAttrs, children) } - } -}) + }) /** * export the public type for h/tsx inference @@ -143,4 +147,4 @@ export const Translation = TranslationImpl as unknown as { } } -export const I18nT = Translation +export const I18nT: typeof Translation = Translation diff --git a/packages/vue-i18n-core/src/components/base.ts b/packages/vue-i18n-core/src/components/base.ts index 40ed4c40f..776ee9be1 100644 --- a/packages/vue-i18n-core/src/components/base.ts +++ b/packages/vue-i18n-core/src/components/base.ts @@ -48,7 +48,8 @@ export interface BaseFormatProps { i18n?: Composer } -export const baseFormatProps = { +// eslint-disable-next-line @typescript-eslint/no-explicit-any +export const BaseFormatPropsValidators: Record = { tag: { type: [String, Object] }, diff --git a/packages/vue-i18n-core/src/errors.ts b/packages/vue-i18n-core/src/errors.ts index c9cc541b1..961d62c9b 100644 --- a/packages/vue-i18n-core/src/errors.ts +++ b/packages/vue-i18n-core/src/errors.ts @@ -1,6 +1,6 @@ import { - createCompileError, - CORE_ERROR_CODES_EXTEND_POINT + CORE_ERROR_CODES_EXTEND_POINT, + createCompileError } from '@intlify/core-base' import type { BaseError } from '@intlify/shared' @@ -9,7 +9,7 @@ export interface I18nError extends BaseError {} export const I18nErrorCodes = { // composer module errors - UNEXPECTED_RETURN_TYPE: CORE_ERROR_CODES_EXTEND_POINT, // 24 + UNEXPECTED_RETURN_TYPE: CORE_ERROR_CODES_EXTEND_POINT as number, // 24 // legacy module errors INVALID_ARGUMENT: 25, // i18n module errors diff --git a/packages/vue-i18n-core/src/i18n.ts b/packages/vue-i18n-core/src/i18n.ts index d4f2f4649..84ca4818b 100644 --- a/packages/vue-i18n-core/src/i18n.ts +++ b/packages/vue-i18n-core/src/i18n.ts @@ -60,25 +60,6 @@ import type { } from './legacy' import type { Disposer } from './types' -declare module 'vue' { - // eslint-disable-next-line - interface App { - __VUE_I18N__?: I18n & I18nInternal - __VUE_I18N_SYMBOL__?: InjectionKey | string - } -} - -// internal Component Instance API isCE -declare module 'vue' { - export interface ComponentInternalInstance { - /** - * @internal - * is custom element? - */ - isCE?: boolean - } -} - /** * I18n Options for `createI18n` * diff --git a/packages/vue-i18n-core/src/index.ts b/packages/vue-i18n-core/src/index.ts index 0543dc82a..e4cfeb26d 100644 --- a/packages/vue-i18n-core/src/index.ts +++ b/packages/vue-i18n-core/src/index.ts @@ -2,7 +2,7 @@ import { setDevToolsHook } from '@intlify/core-base' import { getGlobalThis } from '@intlify/shared' import { initDev, initFeatureFlags } from './misc' -export { +export type { CompileError, DateTimeOptions, FallbackLocale, @@ -36,7 +36,7 @@ export { SchemaParams, TranslateOptions } from '@intlify/core-base' -export { +export type { BaseFormatProps, ComponentI18nScope, DatetimeFormat, @@ -50,7 +50,7 @@ export { Translation, TranslationProps } from './components' -export { +export type { Composer, ComposerCustom, ComposerDateTimeFormatting, @@ -69,21 +69,19 @@ export { MissingHandler, VueMessageType } from './composer' -export { +export { createI18n, I18nInjectionKey, useI18n } from './i18n' +export type { ComposerAdditionalOptions, ComposerExtender, - createI18n, ExportedGlobalComposer, I18n, I18nAdditionalOptions, - I18nInjectionKey, I18nMode, I18nOptions, I18nScope, - useI18n, UseI18nOptions } from './i18n' -export { +export type { Choice, DateTimeFormatResult, LocaleMessageObject, @@ -99,9 +97,9 @@ export { VueI18nTranslation, WarnHtmlInMessageLevel } from './legacy' -export { VERSION } from './misc' -export { I18nPluginOptions } from './plugin' -export { Disposer } from './types' +export { initDev, initFeatureFlags, VERSION } from './misc' +export type { I18nPluginOptions } from './plugin' +export type { Disposer } from './types' export type { IsEmptyObject, diff --git a/packages/vue-i18n-core/src/misc.ts b/packages/vue-i18n-core/src/misc.ts index fb4af9b94..67640a09c 100644 --- a/packages/vue-i18n-core/src/misc.ts +++ b/packages/vue-i18n-core/src/misc.ts @@ -8,10 +8,12 @@ import { getGlobalThis } from '@intlify/shared' * * @VueI18nGeneral */ -export const VERSION = __VERSION__ +export const VERSION: string = __VERSION__ /** * This is only called in esm-bundler builds. + * @description **Don't use this function in your application code.** + * * istanbul-ignore-next */ export function initFeatureFlags(): void { @@ -34,6 +36,8 @@ export function initFeatureFlags(): void { /** * This is only called development env + * @description **Don't use this function in your application code.** + * * istanbul-ignore-next */ export function initDev(): void { diff --git a/packages/vue-i18n-core/src/petite.ts b/packages/vue-i18n-core/src/petite.ts new file mode 100644 index 000000000..bb80756fd --- /dev/null +++ b/packages/vue-i18n-core/src/petite.ts @@ -0,0 +1,92 @@ +export type { + CompileError, + DateTimeOptions, + FallbackLocale, + DateTimeFormat as IntlDateTimeFormat, + DateTimeFormats as IntlDateTimeFormats, + FormatMatcher as IntlFormatMatcher, + LocaleMatcher as IntlLocaleMatcher, + NumberFormat as IntlNumberFormat, + NumberFormats as IntlNumberFormats, + LinkedModifiers, + Locale, + LocaleMessage, + LocaleMessageDictionary, + LocaleMessages, + LocaleMessageType, + LocaleMessageValue, + LocaleParams, + MessageCompiler, + MessageCompilerContext, + MessageContext, + MessageFunction, + MessageFunctions, + MessageResolver, + NamedValue, + NumberOptions, + Path, + PathValue, + PluralizationRule, + PostTranslationHandler, + RemovedIndexResources, + SchemaParams, + TranslateOptions +} from '@intlify/core-base' +export type { + Composer, + ComposerCustom, + ComposerDateTimeFormatting, + ComposerNumberFormatting, + ComposerOptions, + ComposerResolveLocaleMessageTranslation, + ComposerTranslation, + CustomBlock, + CustomBlocks, + DefaultDateTimeFormatSchema, + DefaultLocaleMessageSchema, + DefaultNumberFormatSchema, + DefineDateTimeFormat, + DefineLocaleMessage, + DefineNumberFormat, + MissingHandler, + VueMessageType +} from './composer' +export { createI18n, useI18n } from './i18n' +export type { + ComposerAdditionalOptions, + ComposerExtender, + ExportedGlobalComposer, + I18n, + I18nAdditionalOptions, + I18nMode, + I18nOptions, + I18nScope, + UseI18nOptions +} from './i18n' +export type { + Choice, + DateTimeFormatResult, + LocaleMessageObject, + NumberFormatResult, + PluralizationRulesMap, + TranslateResult, + VueI18n, + VueI18nDateTimeFormatting, + VueI18nExtender, + VueI18nNumberFormatting, + VueI18nOptions, + VueI18nResolveLocaleMessageTranslation, + VueI18nTranslation, + WarnHtmlInMessageLevel +} from './legacy' +export { initDev, initFeatureFlags, VERSION } from './misc' +export type { I18nPluginOptions } from './plugin' +export type { Disposer } from './types' + +export type { + IsEmptyObject, + IsNever, + PickupFormatPathKeys, + PickupKeys, + PickupPaths +} from '@intlify/core-base' diff --git a/packages/vue-i18n-core/src/symbols.ts b/packages/vue-i18n-core/src/symbols.ts index 6f93a04dc..c1c7b8f3f 100644 --- a/packages/vue-i18n-core/src/symbols.ts +++ b/packages/vue-i18n-core/src/symbols.ts @@ -1,14 +1,18 @@ import { makeSymbol } from '@intlify/shared' -export const TranslateVNodeSymbol = +export const TranslateVNodeSymbol: symbol = /* #__PURE__*/ makeSymbol('__translateVNode') -export const DatetimePartsSymbol = /* #__PURE__*/ makeSymbol('__datetimeParts') -export const NumberPartsSymbol = /* #__PURE__*/ makeSymbol('__numberParts') -export const EnableEmitter = /* #__PURE__*/ makeSymbol('__enableEmitter') -export const DisableEmitter = /* #__PURE__*/ makeSymbol('__disableEmitter') -export const SetPluralRulesSymbol = makeSymbol('__setPluralRules') -export const DevToolsMetaSymbol = makeSymbol('__intlifyMeta') -export const InejctWithOptionSymbol = +export const DatetimePartsSymbol: symbol = + /* #__PURE__*/ makeSymbol('__datetimeParts') +export const NumberPartsSymbol: symbol = + /* #__PURE__*/ makeSymbol('__numberParts') +export const EnableEmitter: symbol = + /* #__PURE__*/ makeSymbol('__enableEmitter') +export const DisableEmitter: symbol = + /* #__PURE__*/ makeSymbol('__disableEmitter') +export const SetPluralRulesSymbol: symbol = makeSymbol('__setPluralRules') +export const DevToolsMetaSymbol: symbol = makeSymbol('__intlifyMeta') +export const InejctWithOptionSymbol: symbol = /* #__PURE__*/ makeSymbol('__injectWithOption') -export const ExtendSymbol = /* #__PURE__*/ makeSymbol('__extend') -export const DisposeSymbol = /* #__PURE__*/ makeSymbol('__dispose') +export const ExtendSymbol: symbol = /* #__PURE__*/ makeSymbol('__extend') +export const DisposeSymbol: symbol = /* #__PURE__*/ makeSymbol('__dispose') diff --git a/packages/vue-i18n-core/src/vue.d.ts b/packages/vue-i18n-core/src/vue.d.ts new file mode 100644 index 000000000..237f9b4ae --- /dev/null +++ b/packages/vue-i18n-core/src/vue.d.ts @@ -0,0 +1,21 @@ +import type { InjectionKey } from 'vue' +import type { I18n, I18nInternal } from './i18n' + +declare module 'vue' { + // eslint-disable-next-line + export interface App { + __VUE_I18N__?: I18n & I18nInternal + __VUE_I18N_SYMBOL__?: InjectionKey | string + } +} + +// internal Component Instance API isCE +declare module 'vue' { + export interface ComponentInternalInstance { + /** + * @internal + * iskk custom element? + */ + isCE?: boolean + } +} diff --git a/packages/vue-i18n-core/src/warnings.ts b/packages/vue-i18n-core/src/warnings.ts index 5cea1f658..9bdd104a7 100644 --- a/packages/vue-i18n-core/src/warnings.ts +++ b/packages/vue-i18n-core/src/warnings.ts @@ -2,7 +2,7 @@ import { CORE_WARN_CODES_EXTEND_POINT } from '@intlify/core-base' import { format } from '@intlify/shared' export const I18nWarnCodes = { - FALLBACK_TO_ROOT: CORE_WARN_CODES_EXTEND_POINT, // 8 + FALLBACK_TO_ROOT: CORE_WARN_CODES_EXTEND_POINT as number, // 8 NOT_FOUND_PARENT_SCOPE: 9, IGNORE_OBJ_FLATTEN: 10, /** diff --git a/packages/vue-i18n/package.json b/packages/vue-i18n/package.json index 412b87024..052543701 100644 --- a/packages/vue-i18n/package.json +++ b/packages/vue-i18n/package.json @@ -37,6 +37,7 @@ "dependencies": { "@intlify/core-base": "workspace:*", "@intlify/shared": "workspace:*", + "@intlify/vue-i18n-core": "workspace:*", "@vue/devtools-api": "^6.5.0" }, "devDependencies": { diff --git a/packages/vue-i18n/src/index.ts b/packages/vue-i18n/src/index.ts index a614a9d44..f690fb6e1 100644 --- a/packages/vue-i18n/src/index.ts +++ b/packages/vue-i18n/src/index.ts @@ -8,7 +8,7 @@ import { setDevToolsHook } from '@intlify/core-base' import { getGlobalThis } from '@intlify/shared' -import { initDev, initFeatureFlags } from '../../vue-i18n-core/src/misc' +import { initDev, initFeatureFlags } from '@intlify/vue-i18n-core' if (__ESM_BUNDLER__ && !__TEST__) { initFeatureFlags() @@ -23,7 +23,7 @@ registerMessageResolver(resolveValue) // register fallback locale at vue-i18n registerLocaleFallbacker(fallbackWithLocaleChain) -export { +export type { CompileError, DateTimeOptions, FallbackLocale, @@ -56,59 +56,57 @@ export { TranslateOptions } from '@intlify/core-base' export { + createI18n, + I18nInjectionKey, + useI18n, + VERSION +} from '@intlify/vue-i18n-core' +export type { BaseFormatProps, + Choice, ComponentI18nScope, - DatetimeFormat, - DatetimeFormatProps, - FormattableProps, - I18nD, - I18nN, - I18nT, - NumberFormat, - NumberFormatProps, - Translation, - TranslationProps -} from '../../vue-i18n-core/src/components' -export { Composer, + ComposerAdditionalOptions, ComposerCustom, ComposerDateTimeFormatting, + ComposerExtender, ComposerNumberFormatting, ComposerOptions, ComposerResolveLocaleMessageTranslation, ComposerTranslation, CustomBlock, CustomBlocks, + DatetimeFormat, + DatetimeFormatProps, + DateTimeFormatResult, DefaultDateTimeFormatSchema, DefaultLocaleMessageSchema, DefaultNumberFormatSchema, DefineDateTimeFormat, DefineLocaleMessage, DefineNumberFormat, - MissingHandler, - VueMessageType -} from '../../vue-i18n-core/src/composer' -export { - ComposerAdditionalOptions, - ComposerExtender, - createI18n, + Disposer, ExportedGlobalComposer, + FormattableProps, I18n, I18nAdditionalOptions, - I18nInjectionKey, + I18nD, I18nMode, + I18nN, I18nOptions, + I18nPluginOptions, I18nScope, - useI18n, - UseI18nOptions -} from '../../vue-i18n-core/src/i18n' -export { - Choice, - DateTimeFormatResult, + I18nT, LocaleMessageObject, + MissingHandler, + NumberFormat, + NumberFormatProps, NumberFormatResult, PluralizationRulesMap, TranslateResult, + Translation, + TranslationProps, + UseI18nOptions, VueI18n, VueI18nDateTimeFormatting, VueI18nExtender, @@ -116,11 +114,9 @@ export { VueI18nOptions, VueI18nResolveLocaleMessageTranslation, VueI18nTranslation, + VueMessageType, WarnHtmlInMessageLevel -} from '../../vue-i18n-core/src/legacy' -export { I18nPluginOptions } from '../../vue-i18n-core/src/plugin' -export { VERSION } from './../../vue-i18n-core/src/misc' -export { Disposer } from './../../vue-i18n-core/src/types' +} from '@intlify/vue-i18n-core' export type { IsEmptyObject, diff --git a/packages/vue-i18n/src/runtime.ts b/packages/vue-i18n/src/runtime.ts index 16df9e3f6..76e24f07f 100644 --- a/packages/vue-i18n/src/runtime.ts +++ b/packages/vue-i18n/src/runtime.ts @@ -8,7 +8,7 @@ import { setDevToolsHook } from '@intlify/core-base' import { getGlobalThis } from '@intlify/shared' -import { initDev, initFeatureFlags } from '../../vue-i18n-core/src/misc' +import { initDev, initFeatureFlags } from '@intlify/vue-i18n-core' if (__ESM_BUNDLER__ && !__TEST__) { initFeatureFlags() @@ -23,7 +23,7 @@ registerMessageResolver(resolveValue) // register fallback locale at vue-i18n registerLocaleFallbacker(fallbackWithLocaleChain) -export { +export type { CompileError, DateTimeOptions, FallbackLocale, @@ -55,59 +55,57 @@ export { TranslateOptions } from '@intlify/core-base' export { + createI18n, + I18nInjectionKey, + useI18n, + VERSION +} from '@intlify/vue-i18n-core' +export type { BaseFormatProps, + Choice, ComponentI18nScope, - DatetimeFormat, - DatetimeFormatProps, - FormattableProps, - I18nD, - I18nN, - I18nT, - NumberFormat, - NumberFormatProps, - Translation, - TranslationProps -} from '../../vue-i18n-core/src/components' -export { Composer, + ComposerAdditionalOptions, ComposerCustom, ComposerDateTimeFormatting, + ComposerExtender, ComposerNumberFormatting, ComposerOptions, ComposerResolveLocaleMessageTranslation, ComposerTranslation, CustomBlock, CustomBlocks, + DatetimeFormat, + DatetimeFormatProps, + DateTimeFormatResult, DefaultDateTimeFormatSchema, DefaultLocaleMessageSchema, DefaultNumberFormatSchema, DefineDateTimeFormat, DefineLocaleMessage, DefineNumberFormat, - MissingHandler, - VueMessageType -} from '../../vue-i18n-core/src/composer' -export { - ComposerAdditionalOptions, - ComposerExtender, - createI18n, + Disposer, ExportedGlobalComposer, + FormattableProps, I18n, I18nAdditionalOptions, - I18nInjectionKey, + I18nD, I18nMode, + I18nN, I18nOptions, + I18nPluginOptions, I18nScope, - useI18n, - UseI18nOptions -} from '../../vue-i18n-core/src/i18n' -export { - Choice, - DateTimeFormatResult, + I18nT, LocaleMessageObject, + MissingHandler, + NumberFormat, + NumberFormatProps, NumberFormatResult, PluralizationRulesMap, TranslateResult, + Translation, + TranslationProps, + UseI18nOptions, VueI18n, VueI18nDateTimeFormatting, VueI18nExtender, @@ -115,11 +113,9 @@ export { VueI18nOptions, VueI18nResolveLocaleMessageTranslation, VueI18nTranslation, + VueMessageType, WarnHtmlInMessageLevel -} from '../../vue-i18n-core/src/legacy' -export { I18nPluginOptions } from '../../vue-i18n-core/src/plugin' -export { VERSION } from './../../vue-i18n-core/src/misc' -export { Disposer } from './../../vue-i18n-core/src/types' +} from '@intlify/vue-i18n-core' export type { IsEmptyObject, diff --git a/packages/vue-i18n/src/vue.d.ts b/packages/vue-i18n/src/vue.d.ts index adee667c2..5d0986d9d 100644 --- a/packages/vue-i18n/src/vue.d.ts +++ b/packages/vue-i18n/src/vue.d.ts @@ -2,7 +2,6 @@ import type { DateTimeOptions, IsEmptyObject, IsNever, - JsonPaths, Locale, LocaleMessageValue, MessageFunction, @@ -11,28 +10,27 @@ import type { PickupFormatPathKeys, TranslateOptions } from '@intlify/core-base' -import type { - DatetimeFormat, - NumberFormat, - Translation -} from '../../vue-i18n-core/src/components' import type { CustomBlocks, + DatetimeFormat, + DateTimeFormatResult, DefineDateTimeFormat, DefineLocaleMessage, - RemovedIndexResources, - VueMessageType -} from '../../vue-i18n-core/src/composer' -import type { ExportedGlobalComposer } from '../../vue-i18n-core/src/i18n' -import type { - DateTimeFormatResult, + ExportedGlobalComposer, + NumberFormat, NumberFormatResult, + RemovedIndexResources, TranslateResult, + Translation, VueI18n, - VueI18nOptions -} from '../../vue-i18n-core/src/legacy' + VueI18nOptions, + VueMessageType +} from '@intlify/vue-i18n-core' // --- THE CONTENT BELOW THIS LINE WILL BE APPENDED TO DTS FILE IN DIST DIRECTORY --- // + +import type { JsonPaths } from '@intlify/core-base' + declare module 'vue' { /** * Component Custom Options for Vue I18n diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index bd07c7e11..e8a360168 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -21,9 +21,15 @@ importers: '@intlify/message-compiler': specifier: workspace:* version: link:packages/message-compiler + '@intlify/vue-i18n-core': + specifier: workspace:* + version: link:packages/vue-i18n-core '@microsoft/api-extractor': specifier: 7.15.2 version: 7.15.2 + '@rolldown/plugin-node-polyfills': + specifier: ^1.0.0 + version: 1.0.0 '@rollup/plugin-commonjs': specifier: ^25.0.0 version: 25.0.7(rollup@4.22.4) @@ -42,15 +48,15 @@ importers: '@secretlint/secretlint-rule-preset-recommend': specifier: ^3.1.0 version: 3.3.0 + '@swc/core': + specifier: ^1.10.4 + version: 1.10.4 '@textlint-rule/textlint-rule-no-unmatched-pair': specifier: ^2.0.0 version: 2.0.2 '@types/eslint': specifier: ^9.6.1 version: 9.6.1 - '@types/js-yaml': - specifier: ^4.0.5 - version: 4.0.9 '@types/jsdom': specifier: ^21.1.1 version: 21.1.6 @@ -87,6 +93,9 @@ importers: execa: specifier: ^9.3.0 version: 9.3.0 + fast-glob: + specifier: ^3.3.3 + version: 3.3.3 fixpack: specifier: ^4.0.0 version: 4.0.0 @@ -96,12 +105,6 @@ importers: globals: specifier: ^15.9.0 version: 15.9.0 - globby: - specifier: ^14.0.1 - version: 14.0.1 - js-yaml: - specifier: ^4.1.0 - version: 4.1.0 jsdom: specifier: ^24.0.0 version: 24.0.0 @@ -111,6 +114,9 @@ importers: listhen: specifier: ^1.7.2 version: 1.7.2 + magic-string: + specifier: ^0.30.17 + version: 0.30.17 markdown-table: specifier: ^3.0.4 version: 3.0.4 @@ -123,9 +129,12 @@ importers: opener: specifier: ^1.5.2 version: 1.5.2 - pathe: - specifier: ^1.1.2 - version: 1.1.2 + oxc-parser: + specifier: ^0.44.0 + version: 0.44.0 + oxc-transform: + specifier: ^0.44.0 + version: 0.44.0 picocolors: specifier: ^1.0.0 version: 1.0.0 @@ -141,9 +150,15 @@ importers: rc: specifier: ^1.2.8 version: 1.2.8 + rolldown: + specifier: 1.0.0-beta.1 + version: 1.0.0-beta.1 rollup: specifier: ^4.21.2 version: 4.22.4 + rollup-plugin-dts: + specifier: ^6.1.1 + version: 6.1.1(rollup@4.22.4)(typescript@5.7.2) rollup-plugin-node-builtins: specifier: ^2.1.2 version: 2.1.2 @@ -152,7 +167,7 @@ importers: version: 1.4.0 rollup-plugin-typescript2: specifier: ^0.36.0 - version: 0.36.0(rollup@4.22.4)(typescript@5.5.4) + version: 0.36.0(rollup@4.22.4)(typescript@5.7.2) secretlint: specifier: ^3.2.0 version: 3.3.0 @@ -220,20 +235,20 @@ importers: specifier: ^4.11.2 version: 4.11.2 typescript: - specifier: ^5.5.3 - version: 5.5.4 + specifier: ^5.6.3 + version: 5.7.2 typescript-eslint: specifier: ^8.4.0 - version: 8.4.0(eslint@9.9.1(jiti@1.21.0))(typescript@5.5.4) + version: 8.4.0(eslint@9.9.1(jiti@1.21.0))(typescript@5.7.2) vitepress: specifier: 1.5.0 - version: 1.5.0(@algolia/client-search@4.23.2)(@types/node@22.10.3)(@vue/composition-api@1.7.2(vue@3.5.13(typescript@5.5.4)))(jiti@1.21.0)(postcss@8.4.49)(search-insights@2.13.0)(terser@5.27.0)(tsx@4.11.2)(typescript@5.5.4)(yaml@2.3.4) + version: 1.5.0(@algolia/client-search@4.23.2)(@types/node@22.10.3)(@vue/composition-api@1.7.2(vue@3.5.13(typescript@5.7.2)))(jiti@1.21.0)(postcss@8.4.49)(search-insights@2.13.0)(terser@5.27.0)(tsx@4.11.2)(typescript@5.7.2)(yaml@2.3.4) vitest: specifier: ^2.1.5 version: 2.1.5(@types/node@22.10.3)(jiti@1.21.0)(jsdom@24.0.0)(terser@5.27.0)(tsx@4.11.2)(yaml@2.3.4) vue: specifier: 3.5.13 - version: 3.5.13(typescript@5.5.4) + version: 3.5.13(typescript@5.7.2) vue-i18n: specifier: workspace:* version: link:packages/vue-i18n @@ -319,17 +334,17 @@ importers: dependencies: vue: specifier: 3.5.13 - version: 3.5.13(typescript@5.5.4) + version: 3.5.13(typescript@5.7.2) vue-i18n: specifier: workspace:* version: link:../../../packages/vue-i18n vue-router: specifier: ^4.0.5 - version: 4.2.5(vue@3.5.13(typescript@5.5.4)) + version: 4.2.5(vue@3.5.13(typescript@5.7.2)) devDependencies: '@intlify/vue-i18n-loader': specifier: ^3.2.0 - version: 3.3.0(vue@3.5.13(typescript@5.5.4)) + version: 3.3.0(vue@3.5.13(typescript@5.7.2)) '@vue/compiler-sfc': specifier: ^3.2.0 version: 3.4.19 @@ -347,7 +362,7 @@ importers: version: 4.1.1(file-loader@6.2.0(webpack@4.47.0(webpack-cli@3.3.12)))(webpack@4.47.0(webpack-cli@3.3.12)) vue-loader: specifier: ^16.8.0 - version: 16.8.3(@vue/compiler-sfc@3.4.19)(vue@3.5.13(typescript@5.5.4))(webpack@4.47.0(webpack-cli@3.3.12)) + version: 16.8.3(@vue/compiler-sfc@3.4.19)(vue@3.5.13(typescript@5.7.2))(webpack@4.47.0(webpack-cli@3.3.12)) webpack: specifier: ^4.44.0 version: 4.47.0(webpack-cli@3.3.12) @@ -391,17 +406,17 @@ importers: dependencies: vue: specifier: 3.5.13 - version: 3.5.13(typescript@5.5.4) + version: 3.5.13(typescript@5.7.2) vue-i18n: specifier: workspace:* version: link:../../packages/vue-i18n devDependencies: '@vitejs/plugin-vue': specifier: ^4.2.3 - version: 4.6.2(vite@6.0.0(@types/node@22.10.3)(jiti@1.21.0)(terser@5.27.0)(tsx@4.11.2)(yaml@2.3.4))(vue@3.5.13(typescript@5.5.4)) + version: 4.6.2(vite@6.0.0(@types/node@22.10.3)(jiti@1.21.0)(terser@5.27.0)(tsx@4.11.2)(yaml@2.3.4))(vue@3.5.13(typescript@5.7.2)) '@vitejs/plugin-vue-jsx': specifier: ^3.0.2 - version: 3.1.0(vite@6.0.0(@types/node@22.10.3)(jiti@1.21.0)(terser@5.27.0)(tsx@4.11.2)(yaml@2.3.4))(vue@3.5.13(typescript@5.5.4)) + version: 3.1.0(vite@6.0.0(@types/node@22.10.3)(jiti@1.21.0)(terser@5.27.0)(tsx@4.11.2)(yaml@2.3.4))(vue@3.5.13(typescript@5.7.2)) '@vue/compiler-sfc': specifier: ^3.3.4 version: 3.4.19 @@ -410,7 +425,7 @@ importers: version: 6.0.0(@types/node@22.10.3)(jiti@1.21.0)(terser@5.27.0)(tsx@4.11.2)(yaml@2.3.4) vue-tsc: specifier: ^1.8.5 - version: 1.8.27(typescript@5.5.4) + version: 1.8.27(typescript@5.7.2) examples/type-safe/global-type-definition: dependencies: @@ -528,11 +543,11 @@ importers: version: 1.0.2 vue: specifier: 3.5.13 - version: 3.5.13(typescript@5.5.4) + version: 3.5.13(typescript@5.7.2) devDependencies: '@vitejs/plugin-vue': specifier: ^5.0.0 - version: 5.0.4(vite@6.0.0(@types/node@22.10.3)(jiti@1.21.0)(terser@5.27.0)(tsx@4.11.2)(yaml@2.3.4))(vue@3.5.13(typescript@5.5.4)) + version: 5.0.4(vite@6.0.0(@types/node@22.10.3)(jiti@1.21.0)(terser@5.27.0)(tsx@4.11.2)(yaml@2.3.4))(vue@3.5.13(typescript@5.7.2)) '@vue/compiler-sfc': specifier: ^3.3.4 version: 3.4.19 @@ -541,7 +556,7 @@ importers: version: 6.0.0(@types/node@22.10.3)(jiti@1.21.0)(terser@5.27.0)(tsx@4.11.2)(yaml@2.3.4) vue-tsc: specifier: ^2.0.0 - version: 2.0.0(typescript@5.5.4) + version: 2.0.0(typescript@5.7.2) packages/message-compiler: dependencies: @@ -560,12 +575,15 @@ importers: '@intlify/shared': specifier: workspace:* version: link:../shared + '@intlify/vue-i18n-core': + specifier: workspace:* + version: link:../vue-i18n-core '@vue/devtools-api': specifier: ^6.5.0 version: 6.5.1 vue: specifier: 3.5.13 - version: 3.5.13(typescript@5.5.4) + version: 3.5.13(typescript@5.7.2) devDependencies: '@intlify/devtools-types': specifier: workspace:* @@ -590,11 +608,11 @@ importers: version: link:../petite-vue-i18n vue: specifier: 3.5.13 - version: 3.5.13(typescript@5.5.4) + version: 3.5.13(typescript@5.7.2) devDependencies: '@vitejs/plugin-vue': specifier: ^5.0.0 - version: 5.0.4(vite@6.0.0(@types/node@22.10.3)(jiti@1.21.0)(terser@5.27.0)(tsx@4.11.2)(yaml@2.3.4))(vue@3.5.13(typescript@5.5.4)) + version: 5.0.4(vite@6.0.0(@types/node@22.10.3)(jiti@1.21.0)(terser@5.27.0)(tsx@4.11.2)(yaml@2.3.4))(vue@3.5.13(typescript@5.7.2)) '@vue/compiler-sfc': specifier: ^3.3.4 version: 3.4.19 @@ -603,20 +621,20 @@ importers: version: 6.0.0(@types/node@22.10.3)(jiti@1.21.0)(terser@5.27.0)(tsx@4.11.2)(yaml@2.3.4) vue-tsc: specifier: ^2.0.0 - version: 2.0.0(typescript@5.5.4) + version: 2.0.0(typescript@5.7.2) packages/size-check-vue-i18n: dependencies: vue: specifier: 3.5.13 - version: 3.5.13(typescript@5.5.4) + version: 3.5.13(typescript@5.7.2) vue-i18n: specifier: workspace:* version: link:../vue-i18n devDependencies: '@vitejs/plugin-vue': specifier: ^5.0.0 - version: 5.0.4(vite@6.0.0(@types/node@22.10.3)(jiti@1.21.0)(terser@5.27.0)(tsx@4.11.2)(yaml@2.3.4))(vue@3.5.13(typescript@5.5.4)) + version: 5.0.4(vite@6.0.0(@types/node@22.10.3)(jiti@1.21.0)(terser@5.27.0)(tsx@4.11.2)(yaml@2.3.4))(vue@3.5.13(typescript@5.7.2)) '@vue/compiler-sfc': specifier: ^3.3.4 version: 3.4.19 @@ -625,7 +643,7 @@ importers: version: 6.0.0(@types/node@22.10.3)(jiti@1.21.0)(terser@5.27.0)(tsx@4.11.2)(yaml@2.3.4) vue-tsc: specifier: ^2.0.0 - version: 2.0.0(typescript@5.5.4) + version: 2.0.0(typescript@5.7.2) packages/vue-i18n: dependencies: @@ -635,12 +653,15 @@ importers: '@intlify/shared': specifier: workspace:* version: link:../shared + '@intlify/vue-i18n-core': + specifier: workspace:* + version: link:../vue-i18n-core '@vue/devtools-api': specifier: ^6.5.0 version: 6.5.1 vue: specifier: 3.5.13 - version: 3.5.13(typescript@5.5.4) + version: 3.5.13(typescript@5.7.2) devDependencies: '@intlify/devtools-types': specifier: workspace:* @@ -659,7 +680,7 @@ importers: version: 6.5.1 vue: specifier: 3.5.13 - version: 3.5.13(typescript@5.5.4) + version: 3.5.13(typescript@5.7.2) devDependencies: '@intlify/devtools-types': specifier: workspace:* @@ -769,6 +790,10 @@ packages: resolution: {integrity: sha512-CgH3s1a96LipHCmSUmYFPwY7MNx8C3avkq7i4Wl3cfa662ldtUe4VM1TPXX70pfmrlWTb6jLqTYrZyT2ZTJBgA==} engines: {node: '>=6.9.0'} + '@babel/code-frame@7.26.2': + resolution: {integrity: sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==} + engines: {node: '>=6.9.0'} + '@babel/compat-data@7.23.5': resolution: {integrity: sha512-uU27kfDRlhfKl+w1U6vp16IuvSLtjAxdArVXPa9BvLkrr7CYIsxH5adpHObeAGY/41+syctUWOZ140a2Rvkgjw==} engines: {node: '>=6.9.0'} @@ -855,14 +880,14 @@ packages: resolution: {integrity: sha512-pO9KhhRcuUyGnJWwyEgnRJTSIZHiT+vMD0kPeD+so0l7mxkMT19g3pjY9GTnHySck/hDzq+dtW/4VgnMkippsQ==} engines: {node: '>=6.9.0'} - '@babel/helper-validator-identifier@7.22.20': - resolution: {integrity: sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==} - engines: {node: '>=6.9.0'} - '@babel/helper-validator-identifier@7.24.7': resolution: {integrity: sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==} engines: {node: '>=6.9.0'} + '@babel/helper-validator-identifier@7.25.9': + resolution: {integrity: sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==} + engines: {node: '>=6.9.0'} + '@babel/helper-validator-option@7.23.5': resolution: {integrity: sha512-85ttAOMLsr53VgXkTbkx8oA6YTfT4q7/HzXSLEYmjcSTJPMPQtvq1BD79Byep5xMUYbGRzEpDsjUf3dyp54IKw==} engines: {node: '>=6.9.0'} @@ -945,6 +970,15 @@ packages: search-insights: optional: true + '@emnapi/core@1.3.1': + resolution: {integrity: sha512-pVGjBIt1Y6gg3EJN8jTcfpP/+uuRksIo055oE/OBkDNcjZqVbfkWCksG1Jp4yZnj3iKWyWX8fdG/j6UDYPbFog==} + + '@emnapi/runtime@1.3.1': + resolution: {integrity: sha512-kEBmG8KyqtxJZv+ygbEim+KCGtIq1fC22Ms3S4ziXmYKm8uyoLX0MHONVKwp+9opg390VaKRNt4a7A9NwmpNhw==} + + '@emnapi/wasi-threads@1.0.1': + resolution: {integrity: sha512-iIBu7mwkq4UQGeMEM8bLwNK962nXdhodeScX4slfQnRhEMMzvYivHhutCIk8uojvmASXXPC2WNEjwxFWk72Oqw==} + '@esbuild/aix-ppc64@0.20.2': resolution: {integrity: sha512-D+EBOJHXdNZcLJRBkhENNG8Wji2kgc9AZ9KiPr1JuZjsNtyHzrsfLRrY0tk2H2aoFu6RANO1y1iPPUCDYWkb5g==} engines: {node: '>=12'} @@ -1418,9 +1452,6 @@ packages: '@jridgewell/source-map@0.3.5': resolution: {integrity: sha512-UTYAUj/wviwdsMfzoSJspJxbkH5o1snzwX0//0ENX1u/55kkZZkcTZP6u9bwKGkv+dkk9at4m1Cpt0uY80kcpQ==} - '@jridgewell/sourcemap-codec@1.4.15': - resolution: {integrity: sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==} - '@jridgewell/sourcemap-codec@1.5.0': resolution: {integrity: sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==} @@ -1456,6 +1487,9 @@ packages: '@microsoft/tsdoc@0.14.2': resolution: {integrity: sha512-9b8mPpKrfeGRuhFH5iO1iwCLeIIsV6+H1sRfxbkoGXIyQE2BTsPd9zqSqQJ+pv5sJ/hT5M1zvOFL02MnEezFug==} + '@napi-rs/wasm-runtime@0.2.6': + resolution: {integrity: sha512-z8YVS3XszxFTO73iwvFDNpQIzdMmSDTP/mB3E/ucR37V3Sx57hSExcXyMoNwaucWxnsWf4xfbZv0iZ30jr0M4Q==} + '@nodelib/fs.scandir@2.1.5': resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} engines: {node: '>= 8'} @@ -1524,6 +1558,89 @@ packages: '@octokit/types@13.5.0': resolution: {integrity: sha512-HdqWTf5Z3qwDVlzCrP8UJquMwunpDiMPt5er+QjGzL4hqr/vBVY/MauQgS1xWxCDT1oMx1EULyqxncdCY/NVSQ==} + '@oxc-parser/binding-darwin-arm64@0.44.0': + resolution: {integrity: sha512-JioiiO64lejtmmwTBImSGYBAZiYywK+hj79NgQyMt5G+is+kQF2jRZMuvbRQZr7ewGh2QA70Sw+wlf4wbwQWnw==} + cpu: [arm64] + os: [darwin] + + '@oxc-parser/binding-darwin-x64@0.44.0': + resolution: {integrity: sha512-STXi4QwBhqnqR0AhkFGkh83If1lDS6YHH1v9itmiQgIga545pNywpS7eiJa129whUPk129wg0KuVrx5G8ffOgw==} + cpu: [x64] + os: [darwin] + + '@oxc-parser/binding-linux-arm64-gnu@0.44.0': + resolution: {integrity: sha512-XHzPke9TUD1QD8PZPEYSO/TlHqiYjTH/wqSiWy8v1ZaQv+OPaE/V3WQl9hj7PKy9gOOa1Io66ssfWBbd1miRrQ==} + cpu: [arm64] + os: [linux] + + '@oxc-parser/binding-linux-arm64-musl@0.44.0': + resolution: {integrity: sha512-tMjg+K1rFcABdw8mC4+8DJdhxmcB5VflN66YJ4v76Bf2nzi14Ceegw1Bc8nbbp6u0oe24kd5pJkrxQtOeYQrlA==} + cpu: [arm64] + os: [linux] + + '@oxc-parser/binding-linux-x64-gnu@0.44.0': + resolution: {integrity: sha512-Mg4FLd/aoYIt37akmWQmVqCLxmDIVVkqTxGFp8AiwVjy0DPLWRTX51sqwzaJi8PU/nqUamPdhofPPhEnrudDNQ==} + cpu: [x64] + os: [linux] + + '@oxc-parser/binding-linux-x64-musl@0.44.0': + resolution: {integrity: sha512-NTiHusZP0fWiVskHn4LIA1U5qaC360owCj26Qcx4XLSV5at3rcxsssE+wRtWUpzhAO+PKB4riQ8fDPDJNXzAtw==} + cpu: [x64] + os: [linux] + + '@oxc-parser/binding-win32-arm64-msvc@0.44.0': + resolution: {integrity: sha512-7FaJZcvFtf+Ht1akywBKLwbDC9YHh/+bIFFlF2Mi/SF4RUNzjnYIbgzNhcG4V5dtlQLB6JDe28dIFKM9UZAL5A==} + cpu: [arm64] + os: [win32] + + '@oxc-parser/binding-win32-x64-msvc@0.44.0': + resolution: {integrity: sha512-ShIawSz6LxxF/6IhyxAjeB7dkyqyqE/121lIyhn8WGPtW8kbZgIcfb/WU7T7CVaLMwuBOe5fAQvSk3wOiqoh1w==} + cpu: [x64] + os: [win32] + + '@oxc-project/types@0.44.0': + resolution: {integrity: sha512-2apz8ZnFX2vuZn7qnNY5feVjuT4MGyoirt9tmJCoYMQBeHFaDRpOlqbgZ3N+ICFc5fxdpQK6EMP4kOXtUejOeg==} + + '@oxc-transform/binding-darwin-arm64@0.44.0': + resolution: {integrity: sha512-bgJg3+TypUMDAWTMKXws2TL45FcTOAtYJObuXvPTyanUDR16Lgara+lCWZkJQDrq+WngNdzYBkTn6gJZwlcS8g==} + cpu: [arm64] + os: [darwin] + + '@oxc-transform/binding-darwin-x64@0.44.0': + resolution: {integrity: sha512-+YR/7VWCakghk8RGa9KTAB6+ZCLUMdk6TCpch8aYrP7QKZqHBFkzJr4e+Ewhhxuqc+ULQ/eA4B7TZzd/LkTj2w==} + cpu: [x64] + os: [darwin] + + '@oxc-transform/binding-linux-arm64-gnu@0.44.0': + resolution: {integrity: sha512-xNBejh63+V/xwZlwDzzvSje9M1EYajedLYewxXeA0oH+AxwMK24jgn5qhXi38kp28Mhn/PNNss2UETTCpNJGGg==} + cpu: [arm64] + os: [linux] + + '@oxc-transform/binding-linux-arm64-musl@0.44.0': + resolution: {integrity: sha512-19/jSDBV9+/JtFCg2FMoP4hjibNV4PskTkgzuxpktbJWZnQiDEbbTuOE7MFKZqTXd3okEZ2NqhMNeQEVj1+ULg==} + cpu: [arm64] + os: [linux] + + '@oxc-transform/binding-linux-x64-gnu@0.44.0': + resolution: {integrity: sha512-OuZlXynZdr2PPBIdZ0jA8sWYrhYTKW2m+9sYAtgHNHiKeJr7NGTxyTLfjNaLNt0Ji71z6X5eVX4QRVFwnfoEQg==} + cpu: [x64] + os: [linux] + + '@oxc-transform/binding-linux-x64-musl@0.44.0': + resolution: {integrity: sha512-lDIh5r2atVR72iPsBuhPbM3B67rINakWMMUDa64eJtJcvlgIaqyybQhiRWCbzUErE5cSBnvXgViJLsq7PRrtEA==} + cpu: [x64] + os: [linux] + + '@oxc-transform/binding-win32-arm64-msvc@0.44.0': + resolution: {integrity: sha512-JKmmVMw+c+cG0wnCkOUavNGoFqbGggk1RjRC7UGYWrFK10YS48Wyg4pXAW4XwYTzWD4N15ooSO6c6lO40uCEog==} + cpu: [arm64] + os: [win32] + + '@oxc-transform/binding-win32-x64-msvc@0.44.0': + resolution: {integrity: sha512-jeUzJE32z4j/9tVlrVGiIgLRzHMbBAGl47GGQhFpjS2s9+lXxT0PubosMKbFAPnlbUPJTDusebttA+DWhWgFuA==} + cpu: [x64] + os: [win32] + '@parcel/watcher-android-arm64@2.4.1': resolution: {integrity: sha512-LOi/WTbbh3aTn2RYddrO8pnapixAziFl6SMxHM69r3tvdSm94JtCenaKgk1GRg5FJ5wpMCpHeW+7yqPlvZv7kg==} engines: {node: '>= 10.0.0'} @@ -1610,6 +1727,69 @@ packages: resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} engines: {node: '>=14'} + '@rolldown/binding-darwin-arm64@1.0.0-beta.1': + resolution: {integrity: sha512-e4QpTp7eu61JilK958i21RK/HniwVLjZgfShqoQY1VM+KDYz90cNuopKQ3Z3oCkvyAN3xI8IaRhy02nlxdR/DA==} + cpu: [arm64] + os: [darwin] + + '@rolldown/binding-darwin-x64@1.0.0-beta.1': + resolution: {integrity: sha512-+WHRLrogJl99EQ6HtYhy7EwIZ1wicD0RSX2T5mjfOM6AmPwPTXQ0n6MKOs1abU6ZyCj5Izlo6rLsao0h9FMUDA==} + cpu: [x64] + os: [darwin] + + '@rolldown/binding-freebsd-x64@1.0.0-beta.1': + resolution: {integrity: sha512-ZP9Q1q4IfvJ8dfWTHOF3cquNpAKuQQ+kZJQTxo85fGnKqtqMWFNouaBVd79pqCxU3w4oIjuZ8o55qNDomMTbVA==} + cpu: [x64] + os: [freebsd] + + '@rolldown/binding-linux-arm-gnueabihf@1.0.0-beta.1': + resolution: {integrity: sha512-B/R4Vt8f8z/WmW9Y9NMgA+t5bCfRLmgZohs5mWf8KoD5FRlpvJtCo/SnD7fEg9npHEP5A28+Cikiyd7aCcKPSA==} + cpu: [arm] + os: [linux] + + '@rolldown/binding-linux-arm64-gnu@1.0.0-beta.1': + resolution: {integrity: sha512-xkGD+YLH+vQZiqxKEsXe8xS/owQXkyARaNB9NfFrAacLoNIRZM5UEZGNKxXyRWd1kSEkYkJ3/WiqvGGCcqUg1A==} + cpu: [arm64] + os: [linux] + + '@rolldown/binding-linux-arm64-musl@1.0.0-beta.1': + resolution: {integrity: sha512-Ey2UxKFL74JuWpdNl9stpV0kxHZIgCWCEUnDnpQ1hcBwO9KwDM5qicLtXfsjozD6vt+xzbrL2D/uTrziYZ7IDQ==} + cpu: [arm64] + os: [linux] + + '@rolldown/binding-linux-x64-gnu@1.0.0-beta.1': + resolution: {integrity: sha512-a8QP35x/3mggWqCpFtaF3/PbWl5P9QKpP/muk3iMPgzrXto8zPsEl3imsP3EBh4KwanBVHIf8pEkBQ+/7iMTgQ==} + cpu: [x64] + os: [linux] + + '@rolldown/binding-linux-x64-musl@1.0.0-beta.1': + resolution: {integrity: sha512-uIqKwnkZjTY8FmqGMaSjwtWlCdV88LV9bjdkv+mb7I+BBw+9cJlIQy0P8YnGEOEcnDPis/SiraCpkJ/eHYaSZw==} + cpu: [x64] + os: [linux] + + '@rolldown/binding-wasm32-wasi@1.0.0-beta.1': + resolution: {integrity: sha512-RB+gbhwZtTbKbvHzUcaRFva2ONCUTuxDEb/b3/rd3O82OTPUZzOY24mqreiXH1XG09p6WFXSE8dzUrN120Q29w==} + engines: {node: '>=14.21.3'} + cpu: [wasm32] + + '@rolldown/binding-win32-arm64-msvc@1.0.0-beta.1': + resolution: {integrity: sha512-NSccQD7+9vhEfDMc8HyODuUU1jLYEsEiICc1zwmbeg0FXx1pwpFpZZQby4bAMnK2obav7D9FfsruYWodhNdIqQ==} + cpu: [arm64] + os: [win32] + + '@rolldown/binding-win32-ia32-msvc@1.0.0-beta.1': + resolution: {integrity: sha512-bUQOqqHfqgX9gHGZFGVYQRtc4+9diFDS/f85dKrzzUg7MF91ZU9mJUoemL4eyyj3B83N3FlHZtAPvDX3N2Zz8A==} + cpu: [ia32] + os: [win32] + + '@rolldown/binding-win32-x64-msvc@1.0.0-beta.1': + resolution: {integrity: sha512-k8Ld05OlxkzR/+Ob8+IESaZ4uFcgLwbbwtUZLoryn3S6lCogkclcN/4m1wo/PyWtUAWF5mdz83SrkRL8dS4AqA==} + cpu: [x64] + os: [win32] + + '@rolldown/plugin-node-polyfills@1.0.0': + resolution: {integrity: sha512-JUmEhvz+B6+0AaeUGvZ7SnJec7wpwYqZ+FcAng1I3UVGYKA1uSmE1H4vKHUewU665Nb37znDd9N4o/iImmKeVg==} + '@rollup/plugin-commonjs@25.0.7': resolution: {integrity: sha512-nEvcR+LRjEjsaSsc4x3XZfCCvZIaSMenZu/OiwOKGN2UhQpAYI7ru7czFvyWbErlpoGjnSX3D5Ch5FcMA3kRWQ==} engines: {node: '>=14.0.0'} @@ -1932,10 +2112,6 @@ packages: resolution: {integrity: sha512-SME/vtXaJcnQ/HpeV6P82Egy+jThn11IKfwW8+/XVoRD0rmPHVTeKMtww1oWdVnMykzVPjmrDN9S8NBndPEHCQ==} engines: {node: '>=8'} - '@sindresorhus/merge-streams@2.2.0': - resolution: {integrity: sha512-UTce8mUwUW0RikMb/eseJ7ys0BRkZVFB86orHzrfW12ZmFtym5zua8joZ4L7okH2dDFHkcFjqnZ5GocWBXOFtA==} - engines: {node: '>=18'} - '@sindresorhus/merge-streams@4.0.0': resolution: {integrity: sha512-tlqY9xq5ukxTUZBmoOp+m61cqwQD5pHJtFY3Mn8CA8ps6yghLH/Hw8UPdqg4OLmFW3IFlcXnQNmo/dh8HzXYIQ==} engines: {node: '>=18'} @@ -1944,6 +2120,81 @@ packages: resolution: {integrity: sha512-X1Iui3FUNZP18EUvysTHxt+Avu2nlVzyf90YM8OYgP6SGzTzzX/0JgObfO1AQQDzuZtNNz29bVh8h5R97JrjxA==} engines: {node: '>=8'} + '@swc/core-darwin-arm64@1.10.4': + resolution: {integrity: sha512-sV/eurLhkjn/197y48bxKP19oqcLydSel42Qsy2zepBltqUx+/zZ8+/IS0Bi7kaWVFxerbW1IPB09uq8Zuvm3g==} + engines: {node: '>=10'} + cpu: [arm64] + os: [darwin] + + '@swc/core-darwin-x64@1.10.4': + resolution: {integrity: sha512-gjYNU6vrAUO4+FuovEo9ofnVosTFXkF0VDuo1MKPItz6e2pxc2ale4FGzLw0Nf7JB1sX4a8h06CN16/pLJ8Q2w==} + engines: {node: '>=10'} + cpu: [x64] + os: [darwin] + + '@swc/core-linux-arm-gnueabihf@1.10.4': + resolution: {integrity: sha512-zd7fXH5w8s+Sfvn2oO464KDWl+ZX1MJiVmE4Pdk46N3PEaNwE0koTfgx2vQRqRG4vBBobzVvzICC3618WcefOA==} + engines: {node: '>=10'} + cpu: [arm] + os: [linux] + + '@swc/core-linux-arm64-gnu@1.10.4': + resolution: {integrity: sha512-+UGfoHDxsMZgFD3tABKLeEZHqLNOkxStu+qCG7atGBhS4Slri6h6zijVvf4yI5X3kbXdvc44XV/hrP/Klnui2A==} + engines: {node: '>=10'} + cpu: [arm64] + os: [linux] + + '@swc/core-linux-arm64-musl@1.10.4': + resolution: {integrity: sha512-cDDj2/uYsOH0pgAnDkovLZvKJpFmBMyXkxEG6Q4yw99HbzO6QzZ5HDGWGWVq/6dLgYKlnnmpjZCPPQIu01mXEg==} + engines: {node: '>=10'} + cpu: [arm64] + os: [linux] + + '@swc/core-linux-x64-gnu@1.10.4': + resolution: {integrity: sha512-qJXh9D6Kf5xSdGWPINpLGixAbB5JX8JcbEJpRamhlDBoOcQC79dYfOMEIxWPhTS1DGLyFakAx2FX/b2VmQmj0g==} + engines: {node: '>=10'} + cpu: [x64] + os: [linux] + + '@swc/core-linux-x64-musl@1.10.4': + resolution: {integrity: sha512-A76lIAeyQnHCVt0RL/pG+0er8Qk9+acGJqSZOZm67Ve3B0oqMd871kPtaHBM0BW3OZAhoILgfHW3Op9Q3mx3Cw==} + engines: {node: '>=10'} + cpu: [x64] + os: [linux] + + '@swc/core-win32-arm64-msvc@1.10.4': + resolution: {integrity: sha512-e6j5kBu4fIY7fFxFxnZI0MlEovRvp50Lg59Fw+DVbtqHk3C85dckcy5xKP+UoXeuEmFceauQDczUcGs19SRGSQ==} + engines: {node: '>=10'} + cpu: [arm64] + os: [win32] + + '@swc/core-win32-ia32-msvc@1.10.4': + resolution: {integrity: sha512-RSYHfdKgNXV/amY5Tqk1EWVsyQnhlsM//jeqMLw5Fy9rfxP592W9UTumNikNRPdjI8wKKzNMXDb1U29tQjN0dg==} + engines: {node: '>=10'} + cpu: [ia32] + os: [win32] + + '@swc/core-win32-x64-msvc@1.10.4': + resolution: {integrity: sha512-1ujYpaqfqNPYdwKBlvJnOqcl+Syn3UrQ4XE0Txz6zMYgyh6cdU6a3pxqLqIUSJ12MtXRA9ZUhEz1ekU3LfLWXw==} + engines: {node: '>=10'} + cpu: [x64] + os: [win32] + + '@swc/core@1.10.4': + resolution: {integrity: sha512-ut3zfiTLORMxhr6y/GBxkHmzcGuVpwJYX4qyXWuBKkpw/0g0S5iO1/wW7RnLnZbAi8wS/n0atRZoaZlXWBkeJg==} + engines: {node: '>=10'} + peerDependencies: + '@swc/helpers': '*' + peerDependenciesMeta: + '@swc/helpers': + optional: true + + '@swc/counter@0.1.3': + resolution: {integrity: sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ==} + + '@swc/types@0.1.17': + resolution: {integrity: sha512-V5gRru+aD8YVyCOMAjMpWR1Ui577DD5KSJsHP8RAxopAH22jFz6GZd/qxqjO6MJHQhcsjvjOFXyDhyLQUnMveQ==} + '@textlint-rule/textlint-rule-no-unmatched-pair@2.0.2': resolution: {integrity: sha512-oE7vVmjCsKcbLy2/igBh0qvDmfbcAgjFfOCbhaOxxgXqD9hDKbnG+vxIPmRl27u2PwijZCQI+5r7FyiVVS/kyw==} @@ -2014,6 +2265,9 @@ packages: '@textlint/utils@12.6.1': resolution: {integrity: sha512-HJkqYXT2FAAHDM5XLFpQLF/CEdm8c2ltMeKmPBSSty1VfPXQMi8tGPT1b58b8KWh6dVmi7w0YYB7NrquuzXOKA==} + '@tybys/wasm-util@0.9.0': + resolution: {integrity: sha512-6+7nlbMVX/PVDCwaIQ8nTOPveOcFLSt8GcXdx8hD0bt39uWxYT88uXzqTd4fTvqta7oeUJqudepapKNt2DYJFw==} + '@types/argparse@1.0.38': resolution: {integrity: sha512-ebDJ9b0e702Yr7pWgB0jzm+CX4Srzz8RcXtLJDJB+BSccqMa36uyH/zUsSYao5+BD1ytv3k3rPYCq4mAE1hsXA==} @@ -2047,9 +2301,6 @@ packages: '@types/http-errors@2.0.4': resolution: {integrity: sha512-D0CFMMtydbJAegzOyHjtiKPLlvnm3iTZyZRSZoLq2mRhDdmLfIWOCYPfQJ4cu2erKghU++QvjcUjp/5h7hESpA==} - '@types/js-yaml@4.0.9': - resolution: {integrity: sha512-k4MGaQl5TGo/iipqb2UDG2UwjXziSWkh0uysQelTlJpX1qGlpUZYm8PnO4DxG1qBomtJUdYJ6qR6xdIah10JLg==} - '@types/jsdom@21.1.6': resolution: {integrity: sha512-/7kkMsC+/kMs7gAYmmBR9P0vGTnOoLhQhyhQJSlXGI5bzTHp6xdo0TtKWQAsz6pmSAeVqKSbqeyP6hytqr9FDw==} @@ -2823,6 +3074,10 @@ packages: resolution: {integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==} engines: {node: '>=8'} + braces@3.0.3: + resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} + engines: {node: '>=8'} + brorand@1.1.0: resolution: {integrity: sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==} @@ -3761,6 +4016,10 @@ packages: resolution: {integrity: sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==} engines: {node: '>=8.6.0'} + fast-glob@3.3.3: + resolution: {integrity: sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==} + engines: {node: '>=8.6.0'} + fast-json-stable-stringify@2.1.0: resolution: {integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==} @@ -3818,6 +4077,10 @@ packages: resolution: {integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==} engines: {node: '>=8'} + fill-range@7.1.1: + resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==} + engines: {node: '>=8'} + filter-obj@5.1.0: resolution: {integrity: sha512-qWeTREPoT7I0bifpPUXtxkZJ1XJzxWtfoWWkdVGqa+eCr3SHW/Ocp89o8vLvbUuQnadybJpjOKu4V+RwO6sGng==} engines: {node: '>=14.16'} @@ -4093,10 +4356,6 @@ packages: resolution: {integrity: sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==} engines: {node: '>=10'} - globby@14.0.1: - resolution: {integrity: sha512-jOMLD2Z7MAhyG8aJpNOpmziMOP4rPLcc95oQPKXBazW82z+CEgPFBQvEpRUa1KeIMUJo4Wsm+q6uzO/Q/4BksQ==} - engines: {node: '>=18'} - globby@6.1.0: resolution: {integrity: sha512-KVbFv2TQtbzCoxAnfD6JcHZTYCzyliEaaeM/gH8qQdkKr5s0OP9scEgvdcngyk7AVdY6YVW/TJHd+lQ/Df3Daw==} engines: {node: '>=0.10.0'} @@ -4974,9 +5233,8 @@ packages: magic-string@0.30.12: resolution: {integrity: sha512-Ea8I3sQMVXr8JhN4z+H/d8zwo+tYDgHE9+5G4Wnrwhs0gaK9fXTKx0Tw5Xwsd/bCPTTZNRAdpyzvoeORe9LYpw==} - magic-string@0.30.7: - resolution: {integrity: sha512-8vBuFF/I/+OSLRmdf2wwFCJCz+nSn0m6DPvGH1fS/KiQoSaR+sETbov0eIk9KhEKy8CYqIkIAnbohxT/4H0kuA==} - engines: {node: '>=12'} + magic-string@0.30.17: + resolution: {integrity: sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA==} magicast@0.3.5: resolution: {integrity: sha512-L0WhttDl+2BOsybvEOLK7fW3UA0OQ0IQ2d6Zl2x/a6vVRs3bAY0ECOSHHeL5jD+SbOpOCUEi0y1DgHEn9Qn1AQ==} @@ -5156,6 +5414,10 @@ packages: resolution: {integrity: sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==} engines: {node: '>=8.6'} + micromatch@4.0.8: + resolution: {integrity: sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==} + engines: {node: '>=8.6'} + miller-rabin@4.0.1: resolution: {integrity: sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==} hasBin: true @@ -5524,6 +5786,12 @@ packages: resolution: {integrity: sha512-B5JU3cabzk8c67mRRd3ECmROafjYMXbuzlwtqdM8IbS8ktlTix8aFGb2bAGKrSRIlnfKwovGUUr72JUPyOb6kQ==} engines: {node: '>=0.10.0'} + oxc-parser@0.44.0: + resolution: {integrity: sha512-AlYw0Gmw38Q4fL2q09T1qdrA6hgP7IMl69Yu5Eb7RMsncTHyU3rfhqoXYjjudLYvqArjk6zKlCYT8qB4cd+/SQ==} + + oxc-transform@0.44.0: + resolution: {integrity: sha512-T9o8PWvhYCJWK25MD0qmAQTeIgMkD7NvCFzzqzdFSDHP03wh6B6yy+7nLn1Scw+TsT82QQaaaD5bRl/ATLaPdQ==} + p-finally@1.0.0: resolution: {integrity: sha512-LICb2p9CB7FS+0eR1oqWnHhp0FljGLZCWBE9aix0Uye9W8LTQPwMTYVGWQWIw9RdQiDg4+epXQODwIYJtSJaow==} engines: {node: '>=4'} @@ -5708,10 +5976,6 @@ packages: resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} engines: {node: '>=8'} - path-type@5.0.0: - resolution: {integrity: sha512-5HviZNaZcfqP95rwpv+1HDgUamezbqdSYTyzjTvwtJSnIH+3vnbmWsItli8OFEndS984VT55M3jduxZbX351gg==} - engines: {node: '>=12'} - pathe@1.1.2: resolution: {integrity: sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==} @@ -6173,6 +6437,22 @@ packages: ripemd160@2.0.2: resolution: {integrity: sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==} + rolldown@1.0.0-beta.1: + resolution: {integrity: sha512-19B2HoY3zcR7Um+zVDOvV1gQ1d6acUIouCUMGxvlZ/0kTjcMSFr8tuLWmRRYIV7y1mrgPbJRd1cPFVd4p1l8nQ==} + hasBin: true + peerDependencies: + '@babel/runtime': '>=7' + peerDependenciesMeta: + '@babel/runtime': + optional: true + + rollup-plugin-dts@6.1.1: + resolution: {integrity: sha512-aSHRcJ6KG2IHIioYlvAOcEq6U99sVtqDDKVhnwt70rW6tsz3tv5OSjEiWcgzfsHdLyGXZ/3b/7b/+Za3Y6r1XA==} + engines: {node: '>=16'} + peerDependencies: + rollup: ^3.29.4 || ^4 + typescript: ^4.5 || ^5.0 + rollup-plugin-node-builtins@2.1.2: resolution: {integrity: sha512-bxdnJw8jIivr2yEyt8IZSGqZkygIJOGAWypXvHXnwKAbUcN4Q/dGTx7K0oAJryC/m6aq6tKutltSeXtuogU6sw==} @@ -6398,10 +6678,6 @@ packages: resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} engines: {node: '>=8'} - slash@5.1.0: - resolution: {integrity: sha512-ZA6oR3T/pEyuqwMgAKT0/hAv8oAXckzbkmR0UkUosQ+Mc4RxGoJkRmwHgHufaenlyAgE1Mxgpdcrf75y6XcnDg==} - engines: {node: '>=14.16'} - slice-ansi@0.0.4: resolution: {integrity: sha512-up04hB2hR92PgjpyU3y/eg91yIBILyjVY26NvvciY3EVVPjybkMszMpXQ9QAkcS3I5rtJBDLoTxxg+qvW8c7rw==} engines: {node: '>=0.10.0'} @@ -7027,8 +7303,8 @@ packages: engines: {node: '>=14.17'} hasBin: true - typescript@5.5.4: - resolution: {integrity: sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==} + typescript@5.7.2: + resolution: {integrity: sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg==} engines: {node: '>=14.17'} hasBin: true @@ -7057,10 +7333,6 @@ packages: unenv@1.9.0: resolution: {integrity: sha512-QKnFNznRxmbOF1hDgzpqrlIf6NC5sbZ2OJ+5Wl3OX8uM+LUJXbj4TXvLJCtwbPTmbMHCLIz6JLKNinNsMShK9g==} - unicorn-magic@0.1.0: - resolution: {integrity: sha512-lRfVq8fE8gz6QMBuDM6a+LO3IAzTi05H6gCVaUpir2E1Rwpo4ZUog45KpNXKC/Mn3Yb9UDuHumeFTo9iV/D9FQ==} - engines: {node: '>=18'} - unified@8.4.2: resolution: {integrity: sha512-JCrmN13jI4+h9UAyKEoGcDZV+i1E7BLFuG7OsaDvTXI5P0qhHX+vZO/kOhz9jn8HGENDKbwSeB0nVOg4gVStGA==} @@ -7816,6 +8088,13 @@ snapshots: '@babel/highlight': 7.23.4 chalk: 2.4.2 + '@babel/code-frame@7.26.2': + dependencies: + '@babel/helper-validator-identifier': 7.25.9 + js-tokens: 4.0.0 + picocolors: 1.1.1 + optional: true + '@babel/compat-data@7.23.5': {} '@babel/core@7.23.9': @@ -7896,7 +8175,7 @@ snapshots: '@babel/helper-module-imports': 7.22.15 '@babel/helper-simple-access': 7.22.5 '@babel/helper-split-export-declaration': 7.22.6 - '@babel/helper-validator-identifier': 7.22.20 + '@babel/helper-validator-identifier': 7.24.7 '@babel/helper-optimise-call-expression@7.22.5': dependencies: @@ -7927,10 +8206,11 @@ snapshots: '@babel/helper-string-parser@7.24.8': {} - '@babel/helper-validator-identifier@7.22.20': {} - '@babel/helper-validator-identifier@7.24.7': {} + '@babel/helper-validator-identifier@7.25.9': + optional: true + '@babel/helper-validator-option@7.23.5': {} '@babel/helpers@7.23.9': @@ -7943,7 +8223,7 @@ snapshots: '@babel/highlight@7.23.4': dependencies: - '@babel/helper-validator-identifier': 7.22.20 + '@babel/helper-validator-identifier': 7.24.7 chalk: 2.4.2 js-tokens: 4.0.0 @@ -7997,7 +8277,7 @@ snapshots: '@babel/types@7.23.9': dependencies: '@babel/helper-string-parser': 7.23.4 - '@babel/helper-validator-identifier': 7.22.20 + '@babel/helper-validator-identifier': 7.24.7 to-fast-properties: 2.0.0 '@babel/types@7.25.6': @@ -8032,6 +8312,22 @@ snapshots: transitivePeerDependencies: - '@algolia/client-search' + '@emnapi/core@1.3.1': + dependencies: + '@emnapi/wasi-threads': 1.0.1 + tslib: 2.6.2 + optional: true + + '@emnapi/runtime@1.3.1': + dependencies: + tslib: 2.6.2 + optional: true + + '@emnapi/wasi-threads@1.0.1': + dependencies: + tslib: 2.6.2 + optional: true + '@esbuild/aix-ppc64@0.20.2': optional: true @@ -8259,7 +8555,7 @@ snapshots: escodegen: 2.1.0 estree-walker: 2.0.2 jsonc-eslint-parser: 1.4.1 - magic-string: 0.30.7 + magic-string: 0.30.12 mlly: 1.6.1 source-map: 0.6.1 yaml-eslint-parser: 0.3.2 @@ -8275,7 +8571,7 @@ snapshots: escodegen: 2.1.0 estree-walker: 2.0.2 jsonc-eslint-parser: 2.4.0 - magic-string: 0.30.7 + magic-string: 0.30.12 mlly: 1.6.1 source-map-js: 1.0.2 yaml-eslint-parser: 1.2.2 @@ -8351,14 +8647,14 @@ snapshots: - rollup - supports-color - '@intlify/vue-i18n-loader@3.3.0(vue@3.5.13(typescript@5.5.4))': + '@intlify/vue-i18n-loader@3.3.0(vue@3.5.13(typescript@5.7.2))': dependencies: '@intlify/bundle-utils': 1.0.0 '@intlify/shared': 9.11.0 js-yaml: 4.1.0 json5: 2.2.3 loader-utils: 2.0.4 - vue: 3.5.13(typescript@5.5.4) + vue: 3.5.13(typescript@5.7.2) '@isaacs/cliui@8.0.2': dependencies: @@ -8394,8 +8690,6 @@ snapshots: '@jridgewell/gen-mapping': 0.3.3 '@jridgewell/trace-mapping': 0.3.22 - '@jridgewell/sourcemap-codec@1.4.15': {} - '@jridgewell/sourcemap-codec@1.5.0': {} '@jridgewell/trace-mapping@0.3.22': @@ -8462,6 +8756,13 @@ snapshots: '@microsoft/tsdoc@0.14.2': {} + '@napi-rs/wasm-runtime@0.2.6': + dependencies: + '@emnapi/core': 1.3.1 + '@emnapi/runtime': 1.3.1 + '@tybys/wasm-util': 0.9.0 + optional: true + '@nodelib/fs.scandir@2.1.5': dependencies: '@nodelib/fs.stat': 2.0.5 @@ -8546,6 +8847,56 @@ snapshots: dependencies: '@octokit/openapi-types': 22.2.0 + '@oxc-parser/binding-darwin-arm64@0.44.0': + optional: true + + '@oxc-parser/binding-darwin-x64@0.44.0': + optional: true + + '@oxc-parser/binding-linux-arm64-gnu@0.44.0': + optional: true + + '@oxc-parser/binding-linux-arm64-musl@0.44.0': + optional: true + + '@oxc-parser/binding-linux-x64-gnu@0.44.0': + optional: true + + '@oxc-parser/binding-linux-x64-musl@0.44.0': + optional: true + + '@oxc-parser/binding-win32-arm64-msvc@0.44.0': + optional: true + + '@oxc-parser/binding-win32-x64-msvc@0.44.0': + optional: true + + '@oxc-project/types@0.44.0': {} + + '@oxc-transform/binding-darwin-arm64@0.44.0': + optional: true + + '@oxc-transform/binding-darwin-x64@0.44.0': + optional: true + + '@oxc-transform/binding-linux-arm64-gnu@0.44.0': + optional: true + + '@oxc-transform/binding-linux-arm64-musl@0.44.0': + optional: true + + '@oxc-transform/binding-linux-x64-gnu@0.44.0': + optional: true + + '@oxc-transform/binding-linux-x64-musl@0.44.0': + optional: true + + '@oxc-transform/binding-win32-arm64-msvc@0.44.0': + optional: true + + '@oxc-transform/binding-win32-x64-msvc@0.44.0': + optional: true + '@parcel/watcher-android-arm64@2.4.1': optional: true @@ -8610,6 +8961,46 @@ snapshots: '@pkgjs/parseargs@0.11.0': optional: true + '@rolldown/binding-darwin-arm64@1.0.0-beta.1': + optional: true + + '@rolldown/binding-darwin-x64@1.0.0-beta.1': + optional: true + + '@rolldown/binding-freebsd-x64@1.0.0-beta.1': + optional: true + + '@rolldown/binding-linux-arm-gnueabihf@1.0.0-beta.1': + optional: true + + '@rolldown/binding-linux-arm64-gnu@1.0.0-beta.1': + optional: true + + '@rolldown/binding-linux-arm64-musl@1.0.0-beta.1': + optional: true + + '@rolldown/binding-linux-x64-gnu@1.0.0-beta.1': + optional: true + + '@rolldown/binding-linux-x64-musl@1.0.0-beta.1': + optional: true + + '@rolldown/binding-wasm32-wasi@1.0.0-beta.1': + dependencies: + '@napi-rs/wasm-runtime': 0.2.6 + optional: true + + '@rolldown/binding-win32-arm64-msvc@1.0.0-beta.1': + optional: true + + '@rolldown/binding-win32-ia32-msvc@1.0.0-beta.1': + optional: true + + '@rolldown/binding-win32-x64-msvc@1.0.0-beta.1': + optional: true + + '@rolldown/plugin-node-polyfills@1.0.0': {} + '@rollup/plugin-commonjs@25.0.7(rollup@4.22.4)': dependencies: '@rollup/pluginutils': 5.1.0(rollup@4.22.4) @@ -8617,7 +9008,7 @@ snapshots: estree-walker: 2.0.2 glob: 8.1.0 is-reference: 1.2.1 - magic-string: 0.30.7 + magic-string: 0.30.17 optionalDependencies: rollup: 4.22.4 @@ -8641,7 +9032,7 @@ snapshots: '@rollup/plugin-replace@5.0.5(rollup@4.22.4)': dependencies: '@rollup/pluginutils': 5.1.0(rollup@4.22.4) - magic-string: 0.30.7 + magic-string: 0.30.17 optionalDependencies: rollup: 4.22.4 @@ -8965,12 +9356,62 @@ snapshots: dependencies: execa: 2.1.0 - '@sindresorhus/merge-streams@2.2.0': {} - '@sindresorhus/merge-streams@4.0.0': {} '@stroncium/procfs@1.2.1': {} + '@swc/core-darwin-arm64@1.10.4': + optional: true + + '@swc/core-darwin-x64@1.10.4': + optional: true + + '@swc/core-linux-arm-gnueabihf@1.10.4': + optional: true + + '@swc/core-linux-arm64-gnu@1.10.4': + optional: true + + '@swc/core-linux-arm64-musl@1.10.4': + optional: true + + '@swc/core-linux-x64-gnu@1.10.4': + optional: true + + '@swc/core-linux-x64-musl@1.10.4': + optional: true + + '@swc/core-win32-arm64-msvc@1.10.4': + optional: true + + '@swc/core-win32-ia32-msvc@1.10.4': + optional: true + + '@swc/core-win32-x64-msvc@1.10.4': + optional: true + + '@swc/core@1.10.4': + dependencies: + '@swc/counter': 0.1.3 + '@swc/types': 0.1.17 + optionalDependencies: + '@swc/core-darwin-arm64': 1.10.4 + '@swc/core-darwin-x64': 1.10.4 + '@swc/core-linux-arm-gnueabihf': 1.10.4 + '@swc/core-linux-arm64-gnu': 1.10.4 + '@swc/core-linux-arm64-musl': 1.10.4 + '@swc/core-linux-x64-gnu': 1.10.4 + '@swc/core-linux-x64-musl': 1.10.4 + '@swc/core-win32-arm64-msvc': 1.10.4 + '@swc/core-win32-ia32-msvc': 1.10.4 + '@swc/core-win32-x64-msvc': 1.10.4 + + '@swc/counter@0.1.3': {} + + '@swc/types@0.1.17': + dependencies: + '@swc/counter': 0.1.3 + '@textlint-rule/textlint-rule-no-unmatched-pair@2.0.2': dependencies: sentence-splitter: 5.0.0 @@ -9138,6 +9579,11 @@ snapshots: '@textlint/utils@12.6.1': {} + '@tybys/wasm-util@0.9.0': + dependencies: + tslib: 2.6.2 + optional: true + '@types/argparse@1.0.38': {} '@types/body-parser@1.19.5': @@ -9183,8 +9629,6 @@ snapshots: '@types/http-errors@2.0.4': {} - '@types/js-yaml@4.0.9': {} - '@types/jsdom@21.1.6': dependencies: '@types/node': 22.10.3 @@ -9263,34 +9707,34 @@ snapshots: '@types/web-bluetooth@0.0.20': {} - '@typescript-eslint/eslint-plugin@8.4.0(@typescript-eslint/parser@8.4.0(eslint@9.9.1(jiti@1.21.0))(typescript@5.5.4))(eslint@9.9.1(jiti@1.21.0))(typescript@5.5.4)': + '@typescript-eslint/eslint-plugin@8.4.0(@typescript-eslint/parser@8.4.0(eslint@9.9.1(jiti@1.21.0))(typescript@5.7.2))(eslint@9.9.1(jiti@1.21.0))(typescript@5.7.2)': dependencies: '@eslint-community/regexpp': 4.10.0 - '@typescript-eslint/parser': 8.4.0(eslint@9.9.1(jiti@1.21.0))(typescript@5.5.4) + '@typescript-eslint/parser': 8.4.0(eslint@9.9.1(jiti@1.21.0))(typescript@5.7.2) '@typescript-eslint/scope-manager': 8.4.0 - '@typescript-eslint/type-utils': 8.4.0(eslint@9.9.1(jiti@1.21.0))(typescript@5.5.4) - '@typescript-eslint/utils': 8.4.0(eslint@9.9.1(jiti@1.21.0))(typescript@5.5.4) + '@typescript-eslint/type-utils': 8.4.0(eslint@9.9.1(jiti@1.21.0))(typescript@5.7.2) + '@typescript-eslint/utils': 8.4.0(eslint@9.9.1(jiti@1.21.0))(typescript@5.7.2) '@typescript-eslint/visitor-keys': 8.4.0 eslint: 9.9.1(jiti@1.21.0) graphemer: 1.4.0 ignore: 5.3.1 natural-compare: 1.4.0 - ts-api-utils: 1.3.0(typescript@5.5.4) + ts-api-utils: 1.3.0(typescript@5.7.2) optionalDependencies: - typescript: 5.5.4 + typescript: 5.7.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.4.0(eslint@9.9.1(jiti@1.21.0))(typescript@5.5.4)': + '@typescript-eslint/parser@8.4.0(eslint@9.9.1(jiti@1.21.0))(typescript@5.7.2)': dependencies: '@typescript-eslint/scope-manager': 8.4.0 '@typescript-eslint/types': 8.4.0 - '@typescript-eslint/typescript-estree': 8.4.0(typescript@5.5.4) + '@typescript-eslint/typescript-estree': 8.4.0(typescript@5.7.2) '@typescript-eslint/visitor-keys': 8.4.0 debug: 4.3.7(supports-color@6.1.0) eslint: 9.9.1(jiti@1.21.0) optionalDependencies: - typescript: 5.5.4 + typescript: 5.7.2 transitivePeerDependencies: - supports-color @@ -9299,41 +9743,41 @@ snapshots: '@typescript-eslint/types': 8.4.0 '@typescript-eslint/visitor-keys': 8.4.0 - '@typescript-eslint/type-utils@8.4.0(eslint@9.9.1(jiti@1.21.0))(typescript@5.5.4)': + '@typescript-eslint/type-utils@8.4.0(eslint@9.9.1(jiti@1.21.0))(typescript@5.7.2)': dependencies: - '@typescript-eslint/typescript-estree': 8.4.0(typescript@5.5.4) - '@typescript-eslint/utils': 8.4.0(eslint@9.9.1(jiti@1.21.0))(typescript@5.5.4) + '@typescript-eslint/typescript-estree': 8.4.0(typescript@5.7.2) + '@typescript-eslint/utils': 8.4.0(eslint@9.9.1(jiti@1.21.0))(typescript@5.7.2) debug: 4.3.7(supports-color@6.1.0) - ts-api-utils: 1.3.0(typescript@5.5.4) + ts-api-utils: 1.3.0(typescript@5.7.2) optionalDependencies: - typescript: 5.5.4 + typescript: 5.7.2 transitivePeerDependencies: - eslint - supports-color '@typescript-eslint/types@8.4.0': {} - '@typescript-eslint/typescript-estree@8.4.0(typescript@5.5.4)': + '@typescript-eslint/typescript-estree@8.4.0(typescript@5.7.2)': dependencies: '@typescript-eslint/types': 8.4.0 '@typescript-eslint/visitor-keys': 8.4.0 debug: 4.3.7(supports-color@6.1.0) - fast-glob: 3.3.2 + fast-glob: 3.3.3 is-glob: 4.0.3 minimatch: 9.0.5 semver: 7.6.3 - ts-api-utils: 1.3.0(typescript@5.5.4) + ts-api-utils: 1.3.0(typescript@5.7.2) optionalDependencies: - typescript: 5.5.4 + typescript: 5.7.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.4.0(eslint@9.9.1(jiti@1.21.0))(typescript@5.5.4)': + '@typescript-eslint/utils@8.4.0(eslint@9.9.1(jiti@1.21.0))(typescript@5.7.2)': dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@9.9.1(jiti@1.21.0)) '@typescript-eslint/scope-manager': 8.4.0 '@typescript-eslint/types': 8.4.0 - '@typescript-eslint/typescript-estree': 8.4.0(typescript@5.5.4) + '@typescript-eslint/typescript-estree': 8.4.0(typescript@5.7.2) eslint: 9.9.1(jiti@1.21.0) transitivePeerDependencies: - supports-color @@ -9346,13 +9790,13 @@ snapshots: '@ungap/structured-clone@1.2.0': {} - '@vitejs/plugin-vue-jsx@3.1.0(vite@6.0.0(@types/node@22.10.3)(jiti@1.21.0)(terser@5.27.0)(tsx@4.11.2)(yaml@2.3.4))(vue@3.5.13(typescript@5.5.4))': + '@vitejs/plugin-vue-jsx@3.1.0(vite@6.0.0(@types/node@22.10.3)(jiti@1.21.0)(terser@5.27.0)(tsx@4.11.2)(yaml@2.3.4))(vue@3.5.13(typescript@5.7.2))': dependencies: '@babel/core': 7.23.9 '@babel/plugin-transform-typescript': 7.23.6(@babel/core@7.23.9) '@vue/babel-plugin-jsx': 1.2.1(@babel/core@7.23.9) vite: 6.0.0(@types/node@22.10.3)(jiti@1.21.0)(terser@5.27.0)(tsx@4.11.2)(yaml@2.3.4) - vue: 3.5.13(typescript@5.5.4) + vue: 3.5.13(typescript@5.7.2) transitivePeerDependencies: - supports-color @@ -9361,20 +9805,20 @@ snapshots: vite: 6.0.0(@types/node@22.10.3)(jiti@1.21.0)(terser@5.27.0)(tsx@4.11.2)(yaml@2.3.4) vue: 3.5.13(typescript@5.3.3) - '@vitejs/plugin-vue@4.6.2(vite@6.0.0(@types/node@22.10.3)(jiti@1.21.0)(terser@5.27.0)(tsx@4.11.2)(yaml@2.3.4))(vue@3.5.13(typescript@5.5.4))': + '@vitejs/plugin-vue@4.6.2(vite@6.0.0(@types/node@22.10.3)(jiti@1.21.0)(terser@5.27.0)(tsx@4.11.2)(yaml@2.3.4))(vue@3.5.13(typescript@5.7.2))': dependencies: vite: 6.0.0(@types/node@22.10.3)(jiti@1.21.0)(terser@5.27.0)(tsx@4.11.2)(yaml@2.3.4) - vue: 3.5.13(typescript@5.5.4) + vue: 3.5.13(typescript@5.7.2) - '@vitejs/plugin-vue@5.0.4(vite@6.0.0(@types/node@22.10.3)(jiti@1.21.0)(terser@5.27.0)(tsx@4.11.2)(yaml@2.3.4))(vue@3.5.13(typescript@5.5.4))': + '@vitejs/plugin-vue@5.0.4(vite@6.0.0(@types/node@22.10.3)(jiti@1.21.0)(terser@5.27.0)(tsx@4.11.2)(yaml@2.3.4))(vue@3.5.13(typescript@5.7.2))': dependencies: vite: 6.0.0(@types/node@22.10.3)(jiti@1.21.0)(terser@5.27.0)(tsx@4.11.2)(yaml@2.3.4) - vue: 3.5.13(typescript@5.5.4) + vue: 3.5.13(typescript@5.7.2) - '@vitejs/plugin-vue@5.1.4(vite@6.0.0(@types/node@22.10.3)(jiti@1.21.0)(terser@5.27.0)(tsx@4.11.2)(yaml@2.3.4))(vue@3.5.13(typescript@5.5.4))': + '@vitejs/plugin-vue@5.1.4(vite@6.0.0(@types/node@22.10.3)(jiti@1.21.0)(terser@5.27.0)(tsx@4.11.2)(yaml@2.3.4))(vue@3.5.13(typescript@5.7.2))': dependencies: vite: 6.0.0(@types/node@22.10.3)(jiti@1.21.0)(terser@5.27.0)(tsx@4.11.2)(yaml@2.3.4) - vue: 3.5.13(typescript@5.5.4) + vue: 3.5.13(typescript@5.7.2) '@vitest/coverage-v8@2.1.5(vitest@2.1.5(@types/node@22.10.3)(jiti@1.21.0)(jsdom@24.0.0)(terser@5.27.0)(tsx@4.11.2)(yaml@2.3.4))': dependencies: @@ -9385,7 +9829,7 @@ snapshots: istanbul-lib-report: 3.0.1 istanbul-lib-source-maps: 5.0.6 istanbul-reports: 3.1.7 - magic-string: 0.30.12 + magic-string: 0.30.17 magicast: 0.3.5 std-env: 3.8.0 test-exclude: 7.0.1 @@ -9405,7 +9849,7 @@ snapshots: dependencies: '@vitest/spy': 2.1.5 estree-walker: 3.0.3 - magic-string: 0.30.12 + magic-string: 0.30.17 optionalDependencies: vite: 6.0.0(@types/node@22.10.3)(jiti@1.21.0)(terser@5.27.0)(tsx@4.11.2)(yaml@2.3.4) @@ -9421,7 +9865,7 @@ snapshots: '@vitest/snapshot@2.1.5': dependencies: '@vitest/pretty-format': 2.1.5 - magic-string: 0.30.12 + magic-string: 0.30.17 pathe: 1.1.2 '@vitest/spy@2.1.5': @@ -9536,7 +9980,7 @@ snapshots: '@vue/compiler-ssr': 3.4.19 '@vue/shared': 3.4.19 estree-walker: 2.0.2 - magic-string: 0.30.7 + magic-string: 0.30.12 postcss: 8.4.35 source-map-js: 1.0.2 @@ -9579,9 +10023,9 @@ snapshots: '@vue/compiler-dom': 3.5.13 '@vue/shared': 3.5.13 - '@vue/composition-api@1.7.2(vue@3.5.13(typescript@5.5.4))': + '@vue/composition-api@1.7.2(vue@3.5.13(typescript@5.7.2))': dependencies: - vue: 3.5.13(typescript@5.5.4) + vue: 3.5.13(typescript@5.7.2) optional: true '@vue/devtools-api@6.5.1': {} @@ -9621,7 +10065,7 @@ snapshots: optionalDependencies: typescript: 5.3.3 - '@vue/language-core@1.8.27(typescript@5.5.4)': + '@vue/language-core@1.8.27(typescript@5.7.2)': dependencies: '@volar/language-core': 1.11.1 '@volar/source-map': 1.11.1 @@ -9633,9 +10077,9 @@ snapshots: path-browserify: 1.0.1 vue-template-compiler: 2.7.16 optionalDependencies: - typescript: 5.5.4 + typescript: 5.7.2 - '@vue/language-core@2.0.0(typescript@5.5.4)': + '@vue/language-core@2.0.0(typescript@5.7.2)': dependencies: '@volar/language-core': 2.1.0 '@vue/compiler-dom': 3.5.12 @@ -9645,7 +10089,7 @@ snapshots: path-browserify: 1.0.1 vue-template-compiler: 2.7.16 optionalDependencies: - typescript: 5.5.4 + typescript: 5.7.2 '@vue/reactivity@3.5.13': dependencies: @@ -9669,11 +10113,11 @@ snapshots: '@vue/shared': 3.5.13 vue: 3.5.13(typescript@5.3.3) - '@vue/server-renderer@3.5.13(vue@3.5.13(typescript@5.5.4))': + '@vue/server-renderer@3.5.13(vue@3.5.13(typescript@5.7.2))': dependencies: '@vue/compiler-ssr': 3.5.13 '@vue/shared': 3.5.13 - vue: 3.5.13(typescript@5.5.4) + vue: 3.5.13(typescript@5.7.2) '@vue/shared@3.4.19': {} @@ -9681,21 +10125,21 @@ snapshots: '@vue/shared@3.5.13': {} - '@vueuse/core@11.1.0(@vue/composition-api@1.7.2(vue@3.5.13(typescript@5.5.4)))(vue@3.5.13(typescript@5.5.4))': + '@vueuse/core@11.1.0(@vue/composition-api@1.7.2(vue@3.5.13(typescript@5.7.2)))(vue@3.5.13(typescript@5.7.2))': dependencies: '@types/web-bluetooth': 0.0.20 '@vueuse/metadata': 11.1.0 - '@vueuse/shared': 11.1.0(@vue/composition-api@1.7.2(vue@3.5.13(typescript@5.5.4)))(vue@3.5.13(typescript@5.5.4)) - vue-demi: 0.14.10(@vue/composition-api@1.7.2(vue@3.5.13(typescript@5.5.4)))(vue@3.5.13(typescript@5.5.4)) + '@vueuse/shared': 11.1.0(@vue/composition-api@1.7.2(vue@3.5.13(typescript@5.7.2)))(vue@3.5.13(typescript@5.7.2)) + vue-demi: 0.14.10(@vue/composition-api@1.7.2(vue@3.5.13(typescript@5.7.2)))(vue@3.5.13(typescript@5.7.2)) transitivePeerDependencies: - '@vue/composition-api' - vue - '@vueuse/integrations@11.1.0(@vue/composition-api@1.7.2(vue@3.5.13(typescript@5.5.4)))(focus-trap@7.6.0)(vue@3.5.13(typescript@5.5.4))': + '@vueuse/integrations@11.1.0(@vue/composition-api@1.7.2(vue@3.5.13(typescript@5.7.2)))(focus-trap@7.6.0)(vue@3.5.13(typescript@5.7.2))': dependencies: - '@vueuse/core': 11.1.0(@vue/composition-api@1.7.2(vue@3.5.13(typescript@5.5.4)))(vue@3.5.13(typescript@5.5.4)) - '@vueuse/shared': 11.1.0(@vue/composition-api@1.7.2(vue@3.5.13(typescript@5.5.4)))(vue@3.5.13(typescript@5.5.4)) - vue-demi: 0.14.10(@vue/composition-api@1.7.2(vue@3.5.13(typescript@5.5.4)))(vue@3.5.13(typescript@5.5.4)) + '@vueuse/core': 11.1.0(@vue/composition-api@1.7.2(vue@3.5.13(typescript@5.7.2)))(vue@3.5.13(typescript@5.7.2)) + '@vueuse/shared': 11.1.0(@vue/composition-api@1.7.2(vue@3.5.13(typescript@5.7.2)))(vue@3.5.13(typescript@5.7.2)) + vue-demi: 0.14.10(@vue/composition-api@1.7.2(vue@3.5.13(typescript@5.7.2)))(vue@3.5.13(typescript@5.7.2)) optionalDependencies: focus-trap: 7.6.0 transitivePeerDependencies: @@ -9704,9 +10148,9 @@ snapshots: '@vueuse/metadata@11.1.0': {} - '@vueuse/shared@11.1.0(@vue/composition-api@1.7.2(vue@3.5.13(typescript@5.5.4)))(vue@3.5.13(typescript@5.5.4))': + '@vueuse/shared@11.1.0(@vue/composition-api@1.7.2(vue@3.5.13(typescript@5.7.2)))(vue@3.5.13(typescript@5.7.2))': dependencies: - vue-demi: 0.14.10(@vue/composition-api@1.7.2(vue@3.5.13(typescript@5.5.4)))(vue@3.5.13(typescript@5.5.4)) + vue-demi: 0.14.10(@vue/composition-api@1.7.2(vue@3.5.13(typescript@5.7.2)))(vue@3.5.13(typescript@5.7.2)) transitivePeerDependencies: - '@vue/composition-api' - vue @@ -10170,6 +10614,10 @@ snapshots: dependencies: fill-range: 7.0.1 + braces@3.0.3: + dependencies: + fill-range: 7.1.1 + brorand@1.1.0: {} browserify-aes@1.2.0: @@ -10251,7 +10699,7 @@ snapshots: '@jsdevtools/ez-spawn': 3.0.4 c12: 1.7.0 cac: 6.7.14 - fast-glob: 3.3.2 + fast-glob: 3.3.3 js-yaml: 4.1.0 prompts: 2.4.2 semver: 7.6.0 @@ -11351,6 +11799,14 @@ snapshots: merge2: 1.4.1 micromatch: 4.0.5 + fast-glob@3.3.3: + dependencies: + '@nodelib/fs.stat': 2.0.5 + '@nodelib/fs.walk': 1.2.8 + glob-parent: 5.1.2 + merge2: 1.4.1 + micromatch: 4.0.8 + fast-json-stable-stringify@2.1.0: {} fast-levenshtein@2.0.6: {} @@ -11405,6 +11861,10 @@ snapshots: dependencies: to-regex-range: 5.0.1 + fill-range@7.1.1: + dependencies: + to-regex-range: 5.0.1 + filter-obj@5.1.0: {} finalhandler@1.2.0(supports-color@6.1.0): @@ -11719,20 +12179,11 @@ snapshots: dependencies: array-union: 2.1.0 dir-glob: 3.0.1 - fast-glob: 3.3.2 + fast-glob: 3.3.3 ignore: 5.3.1 merge2: 1.4.1 slash: 3.0.0 - globby@14.0.1: - dependencies: - '@sindresorhus/merge-streams': 2.2.0 - fast-glob: 3.3.2 - ignore: 5.3.1 - path-type: 5.0.0 - slash: 5.1.0 - unicorn-magic: 0.1.0 - globby@6.1.0: dependencies: array-union: 1.0.2 @@ -12668,9 +13119,9 @@ snapshots: dependencies: '@jridgewell/sourcemap-codec': 1.5.0 - magic-string@0.30.7: + magic-string@0.30.17: dependencies: - '@jridgewell/sourcemap-codec': 1.4.15 + '@jridgewell/sourcemap-codec': 1.5.0 magicast@0.3.5: dependencies: @@ -12943,6 +13394,11 @@ snapshots: braces: 3.0.2 picomatch: 2.3.1 + micromatch@4.0.8: + dependencies: + braces: 3.0.3 + picomatch: 2.3.1 + miller-rabin@4.0.1: dependencies: bn.js: 4.12.0 @@ -13334,6 +13790,30 @@ snapshots: os-homedir@1.0.2: {} + oxc-parser@0.44.0: + dependencies: + '@oxc-project/types': 0.44.0 + optionalDependencies: + '@oxc-parser/binding-darwin-arm64': 0.44.0 + '@oxc-parser/binding-darwin-x64': 0.44.0 + '@oxc-parser/binding-linux-arm64-gnu': 0.44.0 + '@oxc-parser/binding-linux-arm64-musl': 0.44.0 + '@oxc-parser/binding-linux-x64-gnu': 0.44.0 + '@oxc-parser/binding-linux-x64-musl': 0.44.0 + '@oxc-parser/binding-win32-arm64-msvc': 0.44.0 + '@oxc-parser/binding-win32-x64-msvc': 0.44.0 + + oxc-transform@0.44.0: + optionalDependencies: + '@oxc-transform/binding-darwin-arm64': 0.44.0 + '@oxc-transform/binding-darwin-x64': 0.44.0 + '@oxc-transform/binding-linux-arm64-gnu': 0.44.0 + '@oxc-transform/binding-linux-arm64-musl': 0.44.0 + '@oxc-transform/binding-linux-x64-gnu': 0.44.0 + '@oxc-transform/binding-linux-x64-musl': 0.44.0 + '@oxc-transform/binding-win32-arm64-msvc': 0.44.0 + '@oxc-transform/binding-win32-x64-msvc': 0.44.0 + p-finally@1.0.0: {} p-finally@2.0.1: {} @@ -13492,8 +13972,6 @@ snapshots: path-type@4.0.0: {} - path-type@5.0.0: {} - pathe@1.1.2: {} pathval@2.0.0: {} @@ -14002,6 +14480,31 @@ snapshots: hash-base: 3.1.0 inherits: 2.0.4 + rolldown@1.0.0-beta.1: + dependencies: + zod: 3.23.8 + optionalDependencies: + '@rolldown/binding-darwin-arm64': 1.0.0-beta.1 + '@rolldown/binding-darwin-x64': 1.0.0-beta.1 + '@rolldown/binding-freebsd-x64': 1.0.0-beta.1 + '@rolldown/binding-linux-arm-gnueabihf': 1.0.0-beta.1 + '@rolldown/binding-linux-arm64-gnu': 1.0.0-beta.1 + '@rolldown/binding-linux-arm64-musl': 1.0.0-beta.1 + '@rolldown/binding-linux-x64-gnu': 1.0.0-beta.1 + '@rolldown/binding-linux-x64-musl': 1.0.0-beta.1 + '@rolldown/binding-wasm32-wasi': 1.0.0-beta.1 + '@rolldown/binding-win32-arm64-msvc': 1.0.0-beta.1 + '@rolldown/binding-win32-ia32-msvc': 1.0.0-beta.1 + '@rolldown/binding-win32-x64-msvc': 1.0.0-beta.1 + + rollup-plugin-dts@6.1.1(rollup@4.22.4)(typescript@5.7.2): + dependencies: + magic-string: 0.30.17 + rollup: 4.22.4 + typescript: 5.7.2 + optionalDependencies: + '@babel/code-frame': 7.26.2 + rollup-plugin-node-builtins@2.1.2: dependencies: browserify-fs: 1.0.0 @@ -14018,7 +14521,7 @@ snapshots: process-es6: 0.11.6 rollup-pluginutils: 2.8.2 - rollup-plugin-typescript2@0.36.0(rollup@4.22.4)(typescript@5.5.4): + rollup-plugin-typescript2@0.36.0(rollup@4.22.4)(typescript@5.7.2): dependencies: '@rollup/pluginutils': 4.2.1 find-cache-dir: 3.3.2 @@ -14026,7 +14529,7 @@ snapshots: rollup: 4.22.4 semver: 7.6.0 tslib: 2.6.2 - typescript: 5.5.4 + typescript: 5.7.2 rollup-pluginutils@2.8.2: dependencies: @@ -14330,8 +14833,6 @@ snapshots: slash@3.0.0: {} - slash@5.1.0: {} - slice-ansi@0.0.4: {} slice-ansi@4.0.0: @@ -14953,9 +15454,9 @@ snapshots: try-resolve@1.0.1: {} - ts-api-utils@1.3.0(typescript@5.5.4): + ts-api-utils@1.3.0(typescript@5.7.2): dependencies: - typescript: 5.5.4 + typescript: 5.7.2 tslib@2.6.2: {} @@ -15024,13 +15525,13 @@ snapshots: typedarray@0.0.6: {} - typescript-eslint@8.4.0(eslint@9.9.1(jiti@1.21.0))(typescript@5.5.4): + typescript-eslint@8.4.0(eslint@9.9.1(jiti@1.21.0))(typescript@5.7.2): dependencies: - '@typescript-eslint/eslint-plugin': 8.4.0(@typescript-eslint/parser@8.4.0(eslint@9.9.1(jiti@1.21.0))(typescript@5.5.4))(eslint@9.9.1(jiti@1.21.0))(typescript@5.5.4) - '@typescript-eslint/parser': 8.4.0(eslint@9.9.1(jiti@1.21.0))(typescript@5.5.4) - '@typescript-eslint/utils': 8.4.0(eslint@9.9.1(jiti@1.21.0))(typescript@5.5.4) + '@typescript-eslint/eslint-plugin': 8.4.0(@typescript-eslint/parser@8.4.0(eslint@9.9.1(jiti@1.21.0))(typescript@5.7.2))(eslint@9.9.1(jiti@1.21.0))(typescript@5.7.2) + '@typescript-eslint/parser': 8.4.0(eslint@9.9.1(jiti@1.21.0))(typescript@5.7.2) + '@typescript-eslint/utils': 8.4.0(eslint@9.9.1(jiti@1.21.0))(typescript@5.7.2) optionalDependencies: - typescript: 5.5.4 + typescript: 5.7.2 transitivePeerDependencies: - eslint - supports-color @@ -15039,7 +15540,7 @@ snapshots: typescript@5.3.3: {} - typescript@5.5.4: {} + typescript@5.7.2: {} ufo@1.4.0: {} @@ -15068,8 +15569,6 @@ snapshots: node-fetch-native: 1.6.2 pathe: 1.1.2 - unicorn-magic@0.1.0: {} - unified@8.4.2: dependencies: '@types/unist': 2.0.10 @@ -15314,7 +15813,7 @@ snapshots: tsx: 4.11.2 yaml: 2.3.4 - vitepress@1.5.0(@algolia/client-search@4.23.2)(@types/node@22.10.3)(@vue/composition-api@1.7.2(vue@3.5.13(typescript@5.5.4)))(jiti@1.21.0)(postcss@8.4.49)(search-insights@2.13.0)(terser@5.27.0)(tsx@4.11.2)(typescript@5.5.4)(yaml@2.3.4): + vitepress@1.5.0(@algolia/client-search@4.23.2)(@types/node@22.10.3)(@vue/composition-api@1.7.2(vue@3.5.13(typescript@5.7.2)))(jiti@1.21.0)(postcss@8.4.49)(search-insights@2.13.0)(terser@5.27.0)(tsx@4.11.2)(typescript@5.7.2)(yaml@2.3.4): dependencies: '@docsearch/css': 3.6.2 '@docsearch/js': 3.6.2(@algolia/client-search@4.23.2)(search-insights@2.13.0) @@ -15323,17 +15822,17 @@ snapshots: '@shikijs/transformers': 1.22.2 '@shikijs/types': 1.22.2 '@types/markdown-it': 14.1.2 - '@vitejs/plugin-vue': 5.1.4(vite@6.0.0(@types/node@22.10.3)(jiti@1.21.0)(terser@5.27.0)(tsx@4.11.2)(yaml@2.3.4))(vue@3.5.13(typescript@5.5.4)) + '@vitejs/plugin-vue': 5.1.4(vite@6.0.0(@types/node@22.10.3)(jiti@1.21.0)(terser@5.27.0)(tsx@4.11.2)(yaml@2.3.4))(vue@3.5.13(typescript@5.7.2)) '@vue/devtools-api': 7.6.3 '@vue/shared': 3.5.12 - '@vueuse/core': 11.1.0(@vue/composition-api@1.7.2(vue@3.5.13(typescript@5.5.4)))(vue@3.5.13(typescript@5.5.4)) - '@vueuse/integrations': 11.1.0(@vue/composition-api@1.7.2(vue@3.5.13(typescript@5.5.4)))(focus-trap@7.6.0)(vue@3.5.13(typescript@5.5.4)) + '@vueuse/core': 11.1.0(@vue/composition-api@1.7.2(vue@3.5.13(typescript@5.7.2)))(vue@3.5.13(typescript@5.7.2)) + '@vueuse/integrations': 11.1.0(@vue/composition-api@1.7.2(vue@3.5.13(typescript@5.7.2)))(focus-trap@7.6.0)(vue@3.5.13(typescript@5.7.2)) focus-trap: 7.6.0 mark.js: 8.11.1 minisearch: 7.1.0 shiki: 1.22.2 vite: 6.0.0(@types/node@22.10.3)(jiti@1.21.0)(terser@5.27.0)(tsx@4.11.2)(yaml@2.3.4) - vue: 3.5.13(typescript@5.5.4) + vue: 3.5.13(typescript@5.7.2) optionalDependencies: postcss: 8.4.49 transitivePeerDependencies: @@ -15379,7 +15878,7 @@ snapshots: chai: 5.1.2 debug: 4.3.7(supports-color@6.1.0) expect-type: 1.1.0 - magic-string: 0.30.12 + magic-string: 0.30.17 pathe: 1.1.2 std-env: 3.8.0 tinybench: 2.9.0 @@ -15410,11 +15909,11 @@ snapshots: vm-browserify@1.1.2: {} - vue-demi@0.14.10(@vue/composition-api@1.7.2(vue@3.5.13(typescript@5.5.4)))(vue@3.5.13(typescript@5.5.4)): + vue-demi@0.14.10(@vue/composition-api@1.7.2(vue@3.5.13(typescript@5.7.2)))(vue@3.5.13(typescript@5.7.2)): dependencies: - vue: 3.5.13(typescript@5.5.4) + vue: 3.5.13(typescript@5.7.2) optionalDependencies: - '@vue/composition-api': 1.7.2(vue@3.5.13(typescript@5.5.4)) + '@vue/composition-api': 1.7.2(vue@3.5.13(typescript@5.7.2)) vue-eslint-parser@9.4.3(eslint@9.9.1(jiti@1.21.0)): dependencies: @@ -15429,7 +15928,7 @@ snapshots: transitivePeerDependencies: - supports-color - vue-loader@16.8.3(@vue/compiler-sfc@3.4.19)(vue@3.5.13(typescript@5.5.4))(webpack@4.47.0(webpack-cli@3.3.12)): + vue-loader@16.8.3(@vue/compiler-sfc@3.4.19)(vue@3.5.13(typescript@5.7.2))(webpack@4.47.0(webpack-cli@3.3.12)): dependencies: chalk: 4.1.2 hash-sum: 2.0.0 @@ -15437,17 +15936,17 @@ snapshots: webpack: 4.47.0(webpack-cli@3.3.12) optionalDependencies: '@vue/compiler-sfc': 3.4.19 - vue: 3.5.13(typescript@5.5.4) + vue: 3.5.13(typescript@5.7.2) vue-router@4.2.5(vue@3.5.13(typescript@5.3.3)): dependencies: '@vue/devtools-api': 6.5.1 vue: 3.5.13(typescript@5.3.3) - vue-router@4.2.5(vue@3.5.13(typescript@5.5.4)): + vue-router@4.2.5(vue@3.5.13(typescript@5.7.2)): dependencies: '@vue/devtools-api': 6.5.1 - vue: 3.5.13(typescript@5.5.4) + vue: 3.5.13(typescript@5.7.2) vue-template-compiler@2.7.16: dependencies: @@ -15461,19 +15960,19 @@ snapshots: semver: 7.6.0 typescript: 5.3.3 - vue-tsc@1.8.27(typescript@5.5.4): + vue-tsc@1.8.27(typescript@5.7.2): dependencies: '@volar/typescript': 1.11.1 - '@vue/language-core': 1.8.27(typescript@5.5.4) + '@vue/language-core': 1.8.27(typescript@5.7.2) semver: 7.6.0 - typescript: 5.5.4 + typescript: 5.7.2 - vue-tsc@2.0.0(typescript@5.5.4): + vue-tsc@2.0.0(typescript@5.7.2): dependencies: '@volar/typescript': 2.1.0 - '@vue/language-core': 2.0.0(typescript@5.5.4) + '@vue/language-core': 2.0.0(typescript@5.7.2) semver: 7.6.0 - typescript: 5.5.4 + typescript: 5.7.2 vue@3.5.13(typescript@5.3.3): dependencies: @@ -15485,15 +15984,15 @@ snapshots: optionalDependencies: typescript: 5.3.3 - vue@3.5.13(typescript@5.5.4): + vue@3.5.13(typescript@5.7.2): dependencies: '@vue/compiler-dom': 3.5.13 '@vue/compiler-sfc': 3.5.13 '@vue/runtime-dom': 3.5.13 - '@vue/server-renderer': 3.5.13(vue@3.5.13(typescript@5.5.4)) + '@vue/server-renderer': 3.5.13(vue@3.5.13(typescript@5.7.2)) '@vue/shared': 3.5.13 optionalDependencies: - typescript: 5.5.4 + typescript: 5.7.2 w3c-xmlserializer@5.0.0: dependencies: diff --git a/rollup.config.mjs b/rollup.config.mjs index 2110de3e9..d017270bb 100644 --- a/rollup.config.mjs +++ b/rollup.config.mjs @@ -32,71 +32,99 @@ const banner = `/*! // ensure TS checks only once for each build let hasTSChecked = false -const stubs = { - [`dist/${name}.cjs`]: `${name}.cjs.js`, - [`dist/${name}.mjs`]: `${name}.esm-bundler.js`, - [`dist/${name}.runtime.mjs`]: `${name}.runtime.esm-bundler.js`, - [`dist/${name}.prod.cjs`]: `${name}.cjs.prod.js` +function resolveStubs(name, ns = '') { + return { + [`dist/${ns}${name}.cjs`]: `${ns}${name}.cjs.js`, + [`dist/${ns}${name}.mjs`]: `${ns}${name}.esm-bundler.js`, + [`dist/${ns}${name}.runtime.mjs`]: `${ns}${name}.runtime.esm-bundler.js`, + [`dist/${ns}${name}.prod.cjs`]: `${ns}${name}.cjs.prod.js` + } } -const outputConfigs = { - mjs: { - file: `dist/${name}.mjs`, - format: `es` - }, - 'mjs-node': { - file: `dist/${name}.node.mjs`, - format: `es` - }, - browser: { - file: `dist/${name}.esm-browser.js`, - format: `es` - }, - cjs: { - // file: `dist/${name}.cjs.js`, - file: `dist/${name}.cjs`, - format: `cjs` - }, - global: { - file: `dist/${name}.global.js`, - format: `iife` - }, - // runtime-only builds, for '@intlify/core' and 'vue-i18n' package only - 'mjs-runtime': { - file: `dist/${name}.runtime.mjs`, - format: `es` - }, - 'mjs-node-runtime': { - file: `dist/${name}.runtime.node.mjs`, - format: `es` - }, - 'browser-runtime': { - file: `dist/${name}.runtime.esm-browser.js`, - format: 'es' - }, - 'global-runtime': { - file: `dist/${name}.runtime.global.js`, - format: 'iife' +function resolveOutputConfigs(name, ns = '') { + return { + mjs: { + file: `dist/${ns}${name}.mjs`, + format: `es` + }, + 'mjs-node': { + file: `dist/${ns}${name}.node.mjs`, + format: `es` + }, + browser: { + file: `dist/${ns}${name}.esm-browser.js`, + format: `es` + }, + cjs: { + file: `dist/${ns}${name}.cjs`, + format: `cjs` + }, + global: { + file: `dist/${ns}${name}.global.js`, + format: `iife` + }, + // runtime-only builds, for '@intlify/core' and 'vue-i18n' package only + 'mjs-runtime': { + file: `dist/${ns}${name}.runtime.mjs`, + format: `es` + }, + 'mjs-node-runtime': { + file: `dist/${ns}${name}.runtime.node.mjs`, + format: `es` + }, + 'browser-runtime': { + file: `dist/${ns}${name}.runtime.esm-browser.js`, + format: 'es' + }, + 'global-runtime': { + file: `dist/${ns}${name}.runtime.global.js`, + format: 'iife' + } } } +const outputConfigs = resolveOutputConfigs(name) const defaultFormats = ['esm-bundler', 'cjs'] const inlineFormats = process.env.FORMATS && process.env.FORMATS.split(',') const packageFormats = inlineFormats || packageOptions.formats || defaultFormats -const packageConfigs = process.env.PROD_ONLY + +let packageConfigs = process.env.PROD_ONLY ? [] : packageFormats.map(format => createConfig(format, outputConfigs[format])) +const petiteOutputConfigs = + name === 'vue-i18n-core' ? resolveOutputConfigs(name, 'petite-') : {} + +if (name === 'vue-i18n-core') { + packageConfigs = [ + ...packageConfigs, + ...packageFormats.map(format => + createConfig(format, petiteOutputConfigs[format]) + ) + ] +} + +let stubs = resolveStubs(name) +stubs = Object.assign({}, stubs, resolveStubs(name, 'petite-')) + if (process.env.NODE_ENV === 'production') { packageFormats.forEach(format => { if (packageOptions.prod === false) { return } if (format === 'cjs') { - packageConfigs.push(createProductionConfig(format)) + packageConfigs.push(createProductionConfig(format, name)) + if (name === 'vue-i18n-core') { + packageConfigs.push(createProductionConfig(format, name, 'petite-')) + } } if (/^(global|browser)(-runtime)?/.test(format)) { - packageConfigs.push(createMinifiedConfig(format)) + packageConfigs.push(createMinifiedConfig(format, outputConfigs[format])) + if (name === 'vue-i18n-core') { + packageConfigs.push( + createMinifiedConfig(format, petiteOutputConfigs[format]) + ) + } } }) } @@ -130,12 +158,10 @@ function createConfig(format, _output, plugins = []) { process.env.__DEV__ === 'false' || /\.prod\.[cm]?js$/.test(output.file) const isBundlerESMBuild = /mjs/.test(format) const isBrowserESMBuild = /browser/.test(format) - // const isNodeBuild = format === 'cjs' || format === 'cjs-lite' - const isNodeBuild = - output.file.includes('.node.') || format === 'cjs' || format === 'cjs-lite' + const isNodeBuild = output.file.includes('.node.') || format === 'cjs' const isGlobalBuild = /global/.test(format) const isRuntimeOnlyBuild = /runtime/.test(format) - const isLite = /petite-vue-i18n/.test(name) + const isLite = /petite-vue-i18n/.test(output.file) if (isGlobalBuild) { output.name = packageOptions.name @@ -162,7 +188,14 @@ function createConfig(format, _output, plugins = []) { // during a single build. hasTSChecked = true - const entryFile = /runtime/.test(format) ? `src/runtime.ts` : `src/index.ts` + const entryFile = + name !== 'vue-i18n-core' + ? /runtime/.test(format) + ? `src/runtime.ts` + : `src/index.ts` + : !/petite-vue-i18n/.test(output.file) + ? `src/index.ts` + : `src/petite.ts` const external = isGlobalBuild || isBrowserESMBuild @@ -263,7 +296,13 @@ function createConfig(format, _output, plugins = []) { ], output, onwarn: (msg, warn) => { - if (!/Circular/.test(msg)) { + if ( + !( + msg.code == 'CIRCULAR_DEPENDENCY' || + msg.code == 'EMPTY_BUNDLE' || + msg.code == 'UNRESOLVED_IMPORT' + ) + ) { warn(msg) } }, @@ -355,32 +394,27 @@ function createReplacePlugin( }) } -function createProductionConfig(format) { - // const extension = format === 'cjs' ? 'cjs' : 'js' - // const descriptor = format === 'cjs' ? '' : `.${format}` +function createProductionConfig(format, name, ns = '') { const extension = format === 'cjs' || format === 'mjs' ? format : 'js' const descriptor = format === 'cjs' || format === 'mjs' ? '' : `.${format}` return createConfig(format, { - file: `dist/${name}${descriptor}.prod.${extension}`, + file: `dist/${ns}${name}${descriptor}.prod.${extension}`, format: outputConfigs[format].format }) } -function createMinifiedConfig(format) { - return createConfig( - format, - { - file: outputConfigs[format].file.replace(/\.js$/, '.prod.js'), - format: outputConfigs[format].format - }, - [ - terser({ - module: /^esm/.test(format), - compress: { - ecma: 2015 - }, - safari10: true - }) - ] - ) +function createMinifiedConfig(format, output) { + const newOutput = { + file: output.file.replace(/\.js$/, '.prod.js'), + format: output.format + } + return createConfig(format, newOutput, [ + terser({ + module: /^esm/.test(format), + compress: { + ecma: 2015 + }, + safari10: true + }) + ]) } diff --git a/scripts/build-rolldown.ts b/scripts/build-rolldown.ts new file mode 100644 index 000000000..9ad6198c9 --- /dev/null +++ b/scripts/build-rolldown.ts @@ -0,0 +1,340 @@ +/* +Produces production builds and stitches together d.ts files. + +To specify the package to build, simply pass its name and the desired build +formats to output (defaults to `buildOptions.formats` specified in that package, +or "esm,cjs"): + +``` +# name supports fuzzy match. will build all packages with name containing "core-base": +pnpm build core-base + +# specify the format to output +pnpm build core --formats cjs +``` +*/ + +import { spawnSync } from 'node:child_process' +import { existsSync, promises as fs } from 'node:fs' +import path from 'node:path' +import { fileURLToPath } from 'node:url' +import { parseArgs } from 'node:util' +import { brotliCompressSync, gzipSync } from 'node:zlib' +import pc from 'picocolors' +import { rolldown } from 'rolldown' +import { buildTypings } from './build-types' +import { createConfigsForPackage } from './rolldown' +import { + targets as allTargets, + checkSizeDistFiles, + displaySize, + fuzzyMatchTarget, + readJson +} from './utils' + +import type { OutputOptions } from 'rolldown' + +const __dirname = fileURLToPath(new URL('.', import.meta.url)) +const commit = spawnSync('git', ['rev-parse', '--short=7', 'HEAD']) + .stdout.toString() + .trim() + +const { values, positionals: targets } = parseArgs({ + allowPositionals: true, + options: { + formats: { + type: 'string', + short: 'f' + }, + devOnly: { + type: 'boolean', + short: 'd' + }, + prodOnly: { + type: 'boolean', + short: 'p' + }, + withTypes: { + type: 'boolean', + short: 't' + }, + sourceMap: { + type: 'boolean', + short: 's' + }, + release: { + type: 'boolean' + }, + all: { + type: 'boolean', + short: 'a' + }, + size: { + type: 'boolean' + } + } +}) + +const { + formats: rawFormats, + all: buildAllMatching, + devOnly, + prodOnly, + withTypes: buildTypes, + sourceMap, + release: isRelease, + size +} = values + +const formats = rawFormats?.split(',') +const sizeDir = path.resolve(__dirname, '../temp/size') + +async function main() { + await run() + + async function run() { + if (size) { + await fs.mkdir(sizeDir, { recursive: true }) + } + + // const rtsCachePath = path.resolve(__dirname, './node_modules/.rts2_cache') + // if (isRelease && existsSync(rtsCachePath)) { + // // remove build cache for release builds to avoid outdated enum values + // await fs.rm(rtsCachePath, { recursive: true }) + // } + + const resolvedTargets = targets.length + ? await fuzzyMatchTarget(targets, buildAllMatching) + : await allTargets() + await buildAll(resolvedTargets) + + if (size) { + await checkAllSizes(resolvedTargets) + } + + if (buildTypes) { + await buildTypings(resolvedTargets) + } + } + + async function buildAll(targets: string[]) { + const start = performance.now() + const all = [] + let count = 0 + for (const target of targets) { + const configs = await createConfigsForTarget(target) + if (configs) { + all.push( + Promise.all( + configs.map(c => + rolldown(c).then(bundle => { + return bundle.write(c.output as OutputOptions).then(() => { + return path.join( + 'packages', + target, + 'dist', + // @ts-expect-error + path.basename(c.output.file) + ) + }) + }) + ) + ).then(files => { + files.forEach(f => { + count++ + console.log(pc.gray('built: ') + pc.green(f)) + }) + }) + ) + } + } + await Promise.all(all) + console.log( + `\n${count} files built in ${(performance.now() - start).toFixed(2)}ms.` + ) + } + + async function createConfigsForTarget(target: string) { + const pkgDir = path.resolve(__dirname, `../packages/${target}`) + const pkg = await readJson(`${pkgDir}/package.json`) + + // only build published packages for release + if (isRelease && pkg.private) { + return + } + + // if building a specific format, do not remove dist. + if (!formats && existsSync(`${pkgDir}/dist`)) { + await fs.rm(`${pkgDir}/dist`, { recursive: true }) + } + + return createConfigsForPackage({ + target, + commit, + formats, + prodOnly, + sourceMap + }) + // const env = + // (pkg.buildOptions && pkg.buildOptions.env) || + // (devOnly ? 'development' : 'production') + // await execa( + // 'rollup', + // [ + // '-c', + // '--environment', + // [ + // `COMMIT:${commit}`, + // `NODE_ENV:${env}`, + // `TARGET:${target}`, + // formats ? `FORMATS:${formats}` : ``, + // buildTypes ? `TYPES:true` : ``, + // prodOnly ? `PROD_ONLY:true` : ``, + // sourceMap ? `SOURCE_MAP:true` : `` + // ] + // .filter(Boolean) + // .join(',') + // ], + // { stdio: 'inherit' } + // ) + + /* + if (buildTypes && pkg.types) { + console.log() + console.log( + pc.bold(pc.yellow(`Rolling up type definitions for ${target}...`)) + ) + + // build types + const extractorConfigPath = path.resolve(pkgDir, `api-extractor.json`) + const extractorConfig = + ExtractorConfig.loadFileAndPrepare(extractorConfigPath) + const extractorResult = Extractor.invoke(extractorConfig, { + localBuild: true, + showVerboseMessages: true + }) + + if (extractorResult.succeeded) { + // concat additional d.ts to rolled-up dts + const typesDir = path.resolve(pkgDir, 'types') + if (existsSync(typesDir)) { + const dtsPath = path.resolve(pkgDir, pkg.types) + const existing = await fs.readFile(dtsPath, 'utf-8') + const typeFiles = await fs.readdir(typesDir) + const toAdd = await Promise.all( + typeFiles.map(file => + fs.readFile(path.resolve(typesDir, file), 'utf-8') + ) + ) + await fs.writeFile(dtsPath, existing + '\n' + toAdd.join('\n')) + } + console.log(pc.bold(pc.green(`API Extractor completed successfully.`))) + } else { + console.error( + `API Extractor completed with ${extractorResult.errorCount} errors` + + ` and ${extractorResult.warningCount} warnings` + ) + process.exitCode = 1 + } + + if (['vue-i18n', 'petite-vue-i18n'].includes(target)) { + console.log() + console.log( + pc.bold(pc.yellow(`Appending Vue type definitions for ${target}...`)) + ) + + let content = '' + + try { + content = await fs.readFile( + path.resolve(pkgDir, 'src/vue.d.ts'), + 'utf-8' + ) + } catch (e) { + console.error( + `Failed in opening Vue type definition file with error code: ${(e as NodeJS.ErrnoException).code}` + ) + process.exitCode = 1 + } + + try { + const marker = + '// --- THE CONTENT BELOW THIS LINE WILL BE APPENDED TO DTS FILE IN DIST DIRECTORY --- //' + const data = content.slice(content.indexOf(marker) + marker.length) + + await fs.appendFile(path.resolve(pkgDir, `dist/${target}.d.ts`), data) + } catch (e) { + console.error('Failed in appending Vue type definitions', e) + process.exitCode = 1 + } + + console.log( + pc.bold( + pc.green(`Appending Vue type definitions completed successfully.`) + ) + ) + } + + await fs.rm(`${pkgDir}/dist/packages`, { recursive: true }) + } + */ + } + + async function checkAllSizes(targets: string[]) { + if (devOnly) { + return + } + console.log() + for (const target of targets) { + await checkSize(target) + } + console.log() + } + + async function checkSize(target: string) { + const pkgDir = path.resolve(`packages/${target}`) + const files = await checkSizeDistFiles(pkgDir) + for (const file of files) { + await checkFileSize(`${pkgDir}/dist/${file}`) + } + } + + async function checkFileSize(filePath: string) { + if (!existsSync(filePath)) { + return + } + const file = await fs.readFile(filePath) + const filename = path.basename(filePath) + + const gzipped = gzipSync(file) + const brotli = brotliCompressSync(file) + console.log( + `📦 ${pc.green( + pc.bold(path.basename(filePath)) + )} - min: ${displaySize(file.length)} / gzip: ${displaySize(gzipped.length)} / brotli: ${displaySize(brotli.length)}` + ) + + if (size) { + const sizeContents = JSON.stringify( + { + file: filename, + size: file.length, + gzip: gzipped.length, + brotli: brotli.length + }, + null, + 2 + ) + await fs.writeFile( + path.resolve(sizeDir, `${filename}.json`), + sizeContents, + 'utf-8' + ) + } + } +} + +main().catch(err => { + console.error(err) + process.exit(1) +}) diff --git a/scripts/build-types.ts b/scripts/build-types.ts new file mode 100644 index 000000000..42eed7bd9 --- /dev/null +++ b/scripts/build-types.ts @@ -0,0 +1,113 @@ +import { glob } from 'fast-glob' +import { existsSync, promises as fs } from 'node:fs' +import path from 'node:path' +import { fileURLToPath } from 'node:url' +import { isolatedDeclaration } from 'oxc-transform' +import pc from 'picocolors' +import { rollup } from 'rollup' +import { createDtsConfig } from './dts' + +const __dirname = fileURLToPath(new URL('.', import.meta.url)) + +const IGNORES = [ + /format-explorer/, + /size-check-core/, + /size-check-vue-i18n/, + /size-check-vue-i18n/ +] + +function isIgnore(file: string) { + let ignored = false + for (const ignore of IGNORES) { + if (ignore.test(file)) { + ignored = true + break + } + } + return ignored +} + +export async function buildTypings(targets: string[]) { + if (existsSync(path.resolve(__dirname, '../temp/packages'))) { + await fs.rm(path.resolve(__dirname, '../temp/packages'), { + recursive: true + }) + } + + let errs = '' + let start = performance.now() + let count = 0 + + for (const file of await glob('packages/*/src/**/*.ts')) { + if (isIgnore(file)) { + continue + } + + const ts = await fs.readFile(file, 'utf-8') + const dts = isolatedDeclaration(file, ts, { + sourcemap: false, + stripInternal: true + }) + if (dts.errors.length) { + dts.errors.forEach(err => { + // temporary workaround for https://github.com/oxc-project/oxc/issues/5668 + if (!err.message.includes('set value(_: S)')) { + console.error(err) + } + errs += err.message + '\n' + }) + } + + const filepath = /\.d\.ts$/.test(file) + ? file + : file.replace(/\.ts$/, '.d.ts') + await write(path.join('temp', filepath), dts.code) + count++ + } + + console.log( + `\n${count} isolated dts files generated in ${(performance.now() - start).toFixed(2)}ms.` + ) + + if (errs) { + await write(path.join('temp', 'oxc-iso-decl-errors.txt'), errs) + } + + console.log('bundling dts ...') + + // bundle with rollup-plugin-dts + const rollupConfigs = await createDtsConfig(targets) + + start = performance.now() + + const all: Promise[] = [] + for (const [dtsPath, config] of Object.entries(rollupConfigs)) { + const s = rollup(config).then(bundle => { + if (config.output == null) { + throw new Error('output is required') + } + if (Array.isArray(config.output)) { + throw new Error('output must be an object') + } + const output = config.output + return bundle.write(output).then(() => { + console.log(pc.gray('built: ') + pc.blue(dtsPath)) + return dtsPath + }) + }) + all.push(s) + } + await Promise.all(all) + + console.log( + `${all.length} bundled dts generated in ${(performance.now() - start).toFixed(2)}ms.` + ) +} + +async function write(file: string, content: string) { + const dir = path.dirname(file) + if (!existsSync(dir)) { + await fs.mkdir(dir, { recursive: true }) + } + await fs.writeFile(file, content) +} diff --git a/scripts/build.ts b/scripts/build.ts index bc6e37285..3ca8614c8 100644 --- a/scripts/build.ts +++ b/scripts/build.ts @@ -109,6 +109,10 @@ async function main() { if (size) { await checkAllSizes(resolvedTargets) } + + if (buildTypes) { + await buildTypingsAll(resolvedTargets) + } } async function buildAll(targets: string[]) { @@ -117,6 +121,12 @@ async function main() { console.log(`\nbuilt in ${(performance.now() - start).toFixed(2)}ms.`) } + async function buildTypingsAll(targets: string[]) { + const start = performance.now() + await runParallel(os.cpus().length, targets, buildTypings) + console.log(`\nbundle dts in ${(performance.now() - start).toFixed(2)}ms.`) + } + async function runParallel( maxConcurrency: number, source: string[], @@ -176,43 +186,63 @@ async function main() { ], { stdio: 'inherit' } ) + } + + async function buildTypings(target: string) { + const pkgDir = path.resolve(__dirname, `../packages/${target}`) + const pkg = await readJson(`${pkgDir}/package.json`) + + // only build published packages for release + if (isRelease && pkg.private) { + return + } - if (buildTypes && pkg.types) { + if (pkg.types) { console.log() console.log( pc.bold(pc.yellow(`Rolling up type definitions for ${target}...`)) ) - // build types - const extractorConfigPath = path.resolve(pkgDir, `api-extractor.json`) - const extractorConfig = - ExtractorConfig.loadFileAndPrepare(extractorConfigPath) - const extractorResult = Extractor.invoke(extractorConfig, { - localBuild: true, - showVerboseMessages: true - }) - - if (extractorResult.succeeded) { - // concat additional d.ts to rolled-up dts - const typesDir = path.resolve(pkgDir, 'types') - if (existsSync(typesDir)) { - const dtsPath = path.resolve(pkgDir, pkg.types) - const existing = await fs.readFile(dtsPath, 'utf-8') - const typeFiles = await fs.readdir(typesDir) - const toAdd = await Promise.all( - typeFiles.map(file => - fs.readFile(path.resolve(typesDir, file), 'utf-8') + const _extractorConfigPath = path.resolve(pkgDir, `api-extractor.json`) + const extractorConfigPaths = [_extractorConfigPath] + if (target === 'vue-i18n-core') { + extractorConfigPaths.push( + path.resolve(pkgDir, `api-extractor-petite.json`) + ) + } + + for (const extractorConfigPath of extractorConfigPaths) { + const extractorConfig = + ExtractorConfig.loadFileAndPrepare(extractorConfigPath) + const extractorResult = Extractor.invoke(extractorConfig, { + localBuild: true, + showVerboseMessages: true + }) + + if (extractorResult.succeeded) { + // concat additional d.ts to rolled-up dts + const typesDir = path.resolve(pkgDir, 'types') + if (existsSync(typesDir)) { + const dtsPath = path.resolve(pkgDir, pkg.types) + const existing = await fs.readFile(dtsPath, 'utf-8') + const typeFiles = await fs.readdir(typesDir) + const toAdd = await Promise.all( + typeFiles.map(file => + fs.readFile(path.resolve(typesDir, file), 'utf-8') + ) ) + await fs.writeFile(dtsPath, existing + '\n' + toAdd.join('\n')) + } + console.log( + pc.bold(pc.green(`API Extractor completed successfully.`)) + ) + } else { + console.error( + `API Extractor completed with ${extractorResult.errorCount} errors` + + ` and ${extractorResult.warningCount} warnings` ) - await fs.writeFile(dtsPath, existing + '\n' + toAdd.join('\n')) + process.exitCode = 1 } - console.log(pc.bold(pc.green(`API Extractor completed successfully.`))) - } else { - console.error( - `API Extractor completed with ${extractorResult.errorCount} errors` + - ` and ${extractorResult.warningCount} warnings` - ) - process.exitCode = 1 } if (['vue-i18n', 'petite-vue-i18n'].includes(target)) { diff --git a/scripts/bump.ts b/scripts/bump.ts deleted file mode 100644 index 5c01a5ec7..000000000 --- a/scripts/bump.ts +++ /dev/null @@ -1,150 +0,0 @@ -import { promises as fs } from 'node:fs' -import { execSync } from 'node:child_process' -import { resolve, dirname } from 'node:path' -import { fileURLToPath } from 'node:url' -import { globby } from 'globby' -import yaml from 'js-yaml' - -const __dirname = dirname(fileURLToPath(new URL('.', import.meta.url))) - -type Deps = { - name: string - range: string - type: string -} -type DepsReviver = (deps: Deps) => Deps | void - -async function loadPackage(dir: string) { - const pkgPath = resolve(dir, 'package.json') - const data = JSON.parse(await fs.readFile(pkgPath, 'utf-8').catch(() => '{}')) - const save = () => fs.writeFile(pkgPath, JSON.stringify(data, null, 2) + '\n') - // const save = () => - // console.log(`package: ${dir}`, JSON.stringify(data, null, 2)) - - const updateDeps = (reviver: DepsReviver) => { - for (const type of [ - 'dependencies', - 'devDependencies', - 'optionalDependencies', - 'peerDependencies' - ]) { - if (!data[type]) { - continue - } - for (const e of Object.entries(data[type])) { - const dep = { name: e[0], range: e[1] as string, type } - delete data[type][dep.name] - const updated = reviver(dep) || dep - data[updated.type] = data[updated.type] || {} - data[updated.type][updated.name] = updated.range - } - } - } - - return { - dir, - data, - save, - updateDeps - } -} - -type ThenArg = T extends PromiseLike ? U : T -type Package = ThenArg> -type WorkspaceData = { - packages: string[] -} - -async function loadWorkspaceData(path: string): Promise { - const workspacesYaml = await fs.readFile(path, 'utf-8') - const data = (yaml.load(workspacesYaml) as WorkspaceData).packages - return Array.isArray(data) ? data : [] -} - -async function loadWorkspace(dir: string, workspaces?: string[]) { - const workspacePkg = await loadPackage(dir) - if (workspaces) { - workspacePkg.data.workspaces = [...workspaces] - } else { - const workspacesYaml = await loadWorkspaceData( - resolve(__dirname, './pnpm-workspace.yaml') - ) - workspacePkg.data.workspaces = [...workspacesYaml] - } - - const pkgDirs = await globby(workspacePkg.data.workspaces, { - onlyDirectories: true - }) - - const packages: Package[] = [] - - for (const pkgDir of pkgDirs) { - const pkg = await loadPackage(pkgDir) - if (!pkg.data.name) { - continue - } - packages.push(pkg) - } - - const find = (name: string) => { - const pkg = packages.find(pkg => pkg.data.name === name) - if (!pkg) { - throw new Error('Workspace package not found: ' + name) - } - return pkg - } - - const rename = (from: string, to: string) => { - find(from).data.name = to - for (const pkg of packages) { - pkg.updateDeps(dep => { - if (dep.name === from && !dep.range.startsWith('npm:')) { - dep.range = 'npm:' + to + '@' + dep.range - } - }) - } - } - - const setVersion = (name: string, newVersion: string) => { - find(name).data.version = newVersion - for (const pkg of packages.filter(p => !p.data.private)) { - pkg.updateDeps(dep => { - if (dep.name === name) { - dep.range = newVersion - } - }) - } - } - - const save = async () => Promise.all(packages.map(pkg => pkg.save())) - - return { - dir, - workspacePkg, - packages, - save, - find, - rename, - setVersion - } -} - -async function main() { - const workspace = await loadWorkspace(process.cwd(), ['packages/*']) - - const commit = execSync('git rev-parse --short HEAD').toString('utf-8').trim() - const release = `${workspace.workspacePkg.data.version}-${commit}` - - for (const pkg of workspace.packages.filter(p => !p.data.private)) { - workspace.setVersion(pkg.data.name, release) - const newname = pkg.data.name + '-nightly' - workspace.rename(pkg.data.name, newname) - } - - await workspace.save() -} - -main().catch(err => { - console.error(err) - process.exit(1) -}) diff --git a/scripts/dts.ts b/scripts/dts.ts new file mode 100644 index 000000000..c98745dce --- /dev/null +++ b/scripts/dts.ts @@ -0,0 +1,85 @@ +import MagicString from 'magic-string' +import { existsSync, promises as fs } from 'node:fs' +import path from 'node:path' +import { fileURLToPath } from 'node:url' +import dts from 'rollup-plugin-dts' + +import type { Plugin, RollupOptions } from 'rollup' + +const __dirname = fileURLToPath(new URL('.', import.meta.url)) + +export async function createDtsConfig(targets: string[]) { + if (!existsSync(path.resolve(__dirname, '../temp/packages'))) { + console.warn('no temp dts files found. run `pnpm build:rolldown` first') + process.exit(1) + } + + const packages = await fs.readdir(path.resolve(__dirname, '../temp/packages')) + const targetPackages = targets + ? packages.filter(pkg => targets.includes(pkg)) + : packages + + return targetPackages.reduce( + (acc, pkg) => { + const key = `packages/${pkg}/dist/${pkg}.d.ts` + acc[key] = { + input: path.resolve( + __dirname, + `../temp/packages/${pkg}/src/index.d.ts` + ), + output: { + file: path.resolve(__dirname, `../packages/${pkg}/dist/${pkg}.d.ts`), + format: 'es' + }, + plugins: [ + dts(), + ...(pkg === 'vue-i18n' || pkg === 'petite-vue-i18n' + ? [appendTypes(pkg)] + : []), + ...(pkg === 'vue-i18n-core' ? [copyDts()] : []) + ], + onwarn(warning, warn) { + if ( + warning.code === 'UNRESOLVED_IMPORT' && + !warning.exporter?.startsWith('.') + ) { + return + } + warn(warning) + } + } + return acc + }, + {} as Record + ) +} + +function appendTypes(pkg: string): Plugin { + return { + name: 'append-types', + async renderChunk(code) { + const template = path.resolve( + __dirname, + `../packages/${pkg}/src/vue.d.ts` + ) + const s = new MagicString(code) + const ts = await fs.readFile(template, 'utf-8') + s.prepend(ts + `\n`) + return s.toString() + } + } +} + +function copyDts(): Plugin { + return { + name: 'copy-dts', + async writeBundle(_, output) { + const s = output['vue-i18n-core.d.ts'] as { code: string } + const petiteDts = path.resolve( + __dirname, + `../packages/vue-i18n-core/dist/petite-vue-i18n-core.d.ts` + ) + await fs.writeFile(petiteDts, s.code, 'utf8') + } + } +} diff --git a/scripts/rolldown.ts b/scripts/rolldown.ts new file mode 100644 index 000000000..456070030 --- /dev/null +++ b/scripts/rolldown.ts @@ -0,0 +1,420 @@ +import polyfillNode from '@rolldown/plugin-node-polyfills' +import { minify as minifySwc } from '@swc/core' +import { promises as fs } from 'node:fs' +import { createRequire } from 'node:module' +import path from 'node:path' +import { fileURLToPath } from 'node:url' +import pc from 'picocolors' +import { entries } from './aliases' +// @ts-expect-error -- experimental +import { replacePlugin } from 'rolldown/experimental' + +import type { OutputOptions, Plugin, RolldownOptions } from 'rolldown' + +const require = createRequire(import.meta.url) +const __dirname = fileURLToPath(new URL('.', import.meta.url)) + +const masterVersion = require('../package.json').version +const packagesDir = path.resolve(__dirname, '../packages') + +export function createConfigsForPackage({ + target, + commit, + formats, + devOnly = false, + prodOnly = false, + sourceMap = false + // localDev = false, + // inlineDeps = false +}: { + target: string + commit: string + formats?: string[] + devOnly?: boolean + prodOnly?: boolean + sourceMap?: boolean + localDev?: boolean + inlineDeps?: boolean +}) { + const packageDir = path.resolve(packagesDir, target) + const resolve = (p: string) => path.resolve(packageDir, p) + const pkg = require(resolve(`package.json`)) + const packageOptions = (pkg.buildOptions || {}) as { + name: string + formats?: string[] + prod?: boolean + enableNonBrowserBranches?: boolean + } + const name = path.basename(packageDir) + + const banner = `/*! +* ${pkg.name} v${pkg.version} +* (c) 2016-present ${pkg.author.name} and contributors +* Released under the ${pkg.license} License. +*/` + + function resolveStubs(name: string, ns = '') { + return { + [`dist/${ns}${name}.cjs`]: `${ns}${name}.cjs.js`, + [`dist/${ns}${name}.mjs`]: `${ns}${name}.esm-bundler.js`, + [`dist/${ns}${name}.runtime.mjs`]: `${ns}${name}.runtime.esm-bundler.js`, + [`dist/${ns}${name}.prod.cjs`]: `${ns}${name}.cjs.prod.js` + } + } + + function resolveOutputConfigs( + name: string, + ns = '' + ): Record { + return { + mjs: { + file: resolve(`dist/${ns}${name}.mjs`), + format: `es` + }, + 'mjs-node': { + file: resolve(`dist/${ns}${name}.node.mjs`), + format: `es` + }, + browser: { + file: resolve(`dist/${ns}${name}.esm-browser.js`), + format: `es` + }, + cjs: { + file: resolve(`dist/${ns}${name}.cjs`), + format: `cjs` + }, + global: { + file: resolve(`dist/${ns}${name}.global.js`), + format: `iife` + }, + // runtime-only builds, for '@intlify/core' and 'vue-i18n' package only + 'mjs-runtime': { + file: resolve(`dist/${ns}${name}.runtime.mjs`), + format: `es` + }, + 'mjs-node-runtime': { + file: resolve(`dist/${ns}${name}.runtime.node.mjs`), + format: `es` + }, + 'browser-runtime': { + file: resolve(`dist/${ns}${name}.runtime.esm-browser.js`), + format: 'es' + }, + 'global-runtime': { + file: resolve(`dist/${ns}${name}.runtime.global.js`), + format: 'iife' + } + } + } + + let stubs = resolveStubs(name) + if (name === 'vue-i18n-core') { + stubs = Object.assign({}, stubs, resolveStubs(name, 'petite-')) + } + + const outputConfigs = resolveOutputConfigs(name) + + const resolvedFormats = ( + formats || + packageOptions.formats || ['esm-bundler', 'cjs'] + ) + .filter(Boolean) + .filter((format: string) => outputConfigs[format]) + + let packageConfigs = prodOnly + ? [] + : resolvedFormats.map((format: string) => + createConfig(format, outputConfigs[format]) + ) + + const petiteOutputConfigs = + name === 'vue-i18n-core' ? resolveOutputConfigs(name, 'petite-') : {} + + if (name === 'vue-i18n-core') { + packageConfigs = [ + ...packageConfigs, + ...resolvedFormats.map(format => + createConfig(format, petiteOutputConfigs[format]) + ) + ] + } + + if (!devOnly) { + resolvedFormats.forEach((format: string) => { + if (packageOptions.prod === false) { + return + } + if (format === 'cjs') { + packageConfigs.push(createProductionConfig(format, name)) + if (name === 'vue-i18n-core') { + packageConfigs.push(createProductionConfig(format, name, 'petite-')) + } + } + if (/^(global|browser)(-runtime)?/.test(format)) { + packageConfigs.push(createMinifiedConfig(format, outputConfigs[format])) + if (name === 'vue-i18n-core') { + packageConfigs.push( + createMinifiedConfig(format, petiteOutputConfigs[format]) + ) + } + } + }) + } + + function createConfig( + format: string, + output: OutputOptions, + plugins: Plugin[] = [] + ): RolldownOptions { + if (!output) { + console.log(pc.yellow(`invalid format: "${format}"`)) + process.exit(1) + } + const rawFile = output.file + + const isProductionBuild = + process.env.__DEV__ === 'false' || + /\.prod\.[cm]?js$/.test(String(output.file) || '') + const isBundlerESMBuild = /mjs/.test(format) + const isBrowserESMBuild = + /browser/.test(format) && !packageOptions.enableNonBrowserBranches + // const isCJSBuild = format === 'cjs' + const isNodeBuild = + String(output.file).includes('.node.') || format === 'cjs' + const isGlobalBuild = /global/.test(format) + const isRuntimeOnlyBuild = /runtime/.test(format) + const isLite = /petite-vue-i18n/.test(String(output.file)) + + // output.dir = resolve('dist') + output.sourcemap = sourceMap + output.banner = banner + output.externalLiveBindings = false + // if (isCJSBuild) { + // output.esModule = true + // } + if ( + name === 'vue-i18n' || + name === 'vue-i18n-core' || + name === 'petite-vue-i18n' + ) { + output.globals = { + vue: 'Vue', + '@vue/devtools-api': 'VueDevtoolsApi' + } + } + if (isGlobalBuild) { + output.name = packageOptions.name + } + + const entryFile = + name !== 'vue-i18n-core' + ? /runtime/.test(format) + ? `src/runtime.ts` + : `src/index.ts` + : !/petite-vue-i18n/.test(String(output.file)) + ? `src/index.ts` + : `src/petite.ts` + + function resolveDefine() { + const defines: Record = { + __COMMIT__: `"${commit}"`, + __VERSION__: `'${masterVersion}'`, + // this is only used during Vue's internal tests + __TEST__: `false`, + // If the build is expected to run directly in the browser (global / esm builds) + __BROWSER__: String(isBrowserESMBuild), + __GLOBAL__: String(isGlobalBuild), + // for runtime only + __RUNTIME__: String(isRuntimeOnlyBuild), + // bundle filename + // __BUNDLE_FILENAME__: `'${path.parse(String(output.file || '')).base || ''}'`, + __ESM_BUNDLER__: String(isBundlerESMBuild), + __ESM_BROWSER__: String(isBrowserESMBuild), + // is targeting Node (SSR)? + __NODE_JS__: String(isNodeBuild), + // for lite version + __LITE__: String(isLite), + // feature flags + __FEATURE_FULL_INSTALL__: isBundlerESMBuild + ? `__VUE_I18N_FULL_INSTALL__` + : `true`, + __FEATURE_LEGACY_API__: isBundlerESMBuild + ? `__VUE_I18N_LEGACY_API__` + : `true`, + __FEATURE_PROD_VUE_DEVTOOLS__: + ['vue-i18n', 'petite-vue-i18n'].includes(name) && isNodeBuild + ? 'false' // tree-shake devtools + : isBundlerESMBuild + ? `__VUE_PROD_DEVTOOLS__` + : `false`, + __FEATURE_PROD_INTLIFY_DEVTOOLS__: isBundlerESMBuild + ? `__INTLIFY_PROD_DEVTOOLS__` + : `false`, + __FEATURE_DROP_MESSAGE_COMPILER__: isBundlerESMBuild + ? `__INTLIFY_DROP_MESSAGE_COMPILER__` + : `false` + } + + if (!isBundlerESMBuild) { + // hard coded dev/prod builds + defines.__DEV__ = String(!isProductionBuild) + } + + // allow inline overrides like + //__LITE__=true pnpm build core-base + Object.keys(defines).forEach(key => { + if (key in process.env) { + const value = process.env[key] + assert(typeof value === 'string') + defines[key] = value + } + }) + + return defines + } + + function resolveReplace() { + const replacements: Record = {} + + if (isBundlerESMBuild) { + Object.assign(replacements, { + // preserve to be handled by bundlers + __DEV__: + ['vue-i18n', 'petite-vue-i18n'].includes(name) && isNodeBuild + ? 'false' // tree-shake devtools + : isBundlerESMBuild + ? // preserve to be handled by bundlers + `(process.env.NODE_ENV !== 'production')` + : // hard coded dev/prod builds + !isProductionBuild + }) + } + + if (isProductionBuild && isBrowserESMBuild) { + Object.assign(replacements, { + 'emitError(': `/*#__PURE__*/ emitError(`, + 'createCompileError(': `/*#__PURE__*/ createCompileError(`, + 'throw createCoreError(': `throw Error(`, + 'throw createI18nError(': `throw Error(` + }) + } + + if (Object.keys(replacements).length) { + return [replacePlugin(replacements)] + } else { + return [] + } + } + + function resolveExternal() { + return isGlobalBuild || isBrowserESMBuild + ? ['vue'] // packageOptions.enableNonBrowserBranches + : // ? packageOptions.enableFullBundleForEsmBrowser && isBrowserESMBuild + // ? [] + // : ['vue'] // packageOptions.enableNonBrowserBranches + // Node / esm-bundler builds. Externalize everything. + [ + ...Object.keys(pkg.dependencies || {}), + ...Object.keys(pkg.peerDependencies || {}) + ] + } + + function resolveNodePlugins() { + const nodePlugins = + (format === 'cjs' && Object.keys(pkg.devDependencies || {}).length) || + packageOptions.enableNonBrowserBranches + ? [...(format === 'cjs' ? [] : [polyfillNode()])] + : [] + return nodePlugins + } + + return { + input: resolve(entryFile), + // Global and Browser ESM builds inlines everything so that they can be + // used alone. + external: resolveExternal(), + define: resolveDefine(), + platform: format === 'cjs' ? 'node' : 'browser', + resolve: { + alias: entries + }, + plugins: [ + ...resolveReplace(), + ...resolveNodePlugins(), + ...plugins, + { + name: 'write-stub', + async writeBundle() { + if (rawFile == null) { + return + } + const stub = stubs[rawFile] + if (!stub) { + return + } + + const filename = path.basename(rawFile) + const contents = + format === 'cjs' + ? `module.exports = require('./${filename}')` + : `export * from './${filename}'` + + await fs.writeFile(stub, contents) + // console.log(`created stub ${pc.bold(path.join('packages', target, 'dist', path.basename(stub)))}`) + } + } + ], + output, + treeshake: { + // https://github.com/rolldown/rolldown/issues/1917 + moduleSideEffects: false + } + } + } + + function createProductionConfig( + format: string, + name: string, + ns = '' + ): RolldownOptions { + const extension = format === 'cjs' || format === 'mjs' ? format : 'js' + const descriptor = format === 'cjs' || format === 'mjs' ? '' : `.${format}` + return createConfig(format, { + file: resolve(`dist/${ns}${name}${descriptor}.prod.${extension}`), + format: outputConfigs[format].format + }) + } + + function createMinifiedConfig( + format: string, + output: OutputOptions + ): RolldownOptions { + const newOutput = { + file: String(output.file).replace(/\.js$/, '.prod.js'), + format: output.format + } + return createConfig(format, newOutput, [ + { + name: 'swc-minify', + async renderChunk(contents, _, { format }) { + const { code } = await minifySwc(contents, { + module: format === 'es', + format: { + comments: false + }, + compress: { + ecma: 2016, + pure_getters: true + }, + safari10: true, + mangle: true + }) + // swc removes banner + return { code: banner + code, map: null } + } + } + ]) + } + + return packageConfigs +} diff --git a/tsconfig.json b/tsconfig.json index 5b8c3cde8..5755a65c7 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -43,6 +43,7 @@ "baseUrl": ".", /* Base directory to resolve non-absolute module names. */ "paths": { "@intlify/*": ["packages/*/src"], + "@intlify/vue-i18n-core/petite": ["packages/vue-i18n-core/src/petite"], "vue-i18n": ["packages/vue-i18n/src"] }, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ @@ -53,6 +54,7 @@ // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ "resolveJsonModule": true, /* Include modules imported with '.json' extension. */ + // "isolatedDeclarations": true, /* Source Map Options */ // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ @@ -73,7 +75,7 @@ "packages/global.d.ts", "packages/*/src", "packages/*/test", - "packages/*/*.config.ts", + // TODO: "packages/*/*.config.ts", "scripts", "e2e", "shim.d.ts",