diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index eae277b5..488415f3 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -17,12 +17,13 @@ env:
jobs:
test:
- name: 'Test on Node.js ${{ matrix.node }} OS: ${{matrix.os}}'
+ name: 'Test on Node.js ${{ matrix.node }} OS: ${{matrix.os}} (${{ matrix.framework }})'
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
node: [18, 20, 22]
+ framework: ['vite', 'rspack', 'webpack']
steps:
- name: Checkout
uses: actions/checkout@v4
@@ -58,3 +59,5 @@ jobs:
- name: Testing
run: pnpm test
+ env:
+ TEST_FRAMEWORK: ${{ matrix.framework }}
diff --git a/examples/rspack/index.html b/examples/rspack/index.html
new file mode 100644
index 00000000..ccf0accf
--- /dev/null
+++ b/examples/rspack/index.html
@@ -0,0 +1,13 @@
+
+
+
+
+ unplugin-vue-i18n example for rspack
+
+
+
+
+
+
diff --git a/examples/rspack/rspack.config.js b/examples/rspack/rspack.config.js
new file mode 100644
index 00000000..f627867c
--- /dev/null
+++ b/examples/rspack/rspack.config.js
@@ -0,0 +1,71 @@
+// @ts-check
+const path = require('path')
+const { VueLoaderPlugin } = require('vue-loader')
+const VueI18nPlugin = require('../../packages/unplugin-vue-i18n/lib/rspack.cjs')
+
+function transformI18nBlock(source) {
+ const sourceCopy = source
+ const block = JSON.parse(
+ sourceCopy.replace(/[\n\s]/g, '').replace(/,\]$/, ']')
+ )
+ if (Array.isArray(block)) {
+ const transformedBlock = JSON.stringify({
+ en: {
+ language: 'Language',
+ hello: 'hello, world!'
+ },
+ ja: {
+ language: '言語',
+ hello: 'こんにちは、世界!'
+ }
+ })
+ return transformedBlock
+ }
+ return source
+}
+
+/**
+ * @type {import('@rspack/core').RspackOptions}
+ **/
+module.exports = {
+ mode: 'development',
+ devtool: 'source-map',
+ entry: path.resolve(__dirname, './src/main.js'),
+ output: {
+ path: path.resolve(__dirname, 'dist'),
+ filename: '[name].js',
+ publicPath: '/dist/'
+ },
+ resolve: {
+ alias: {
+ vue: path.resolve(
+ __dirname,
+ '../../node_modules/vue/dist/vue.esm-bundler.js'
+ )
+ }
+ },
+ devServer: {
+ static: {
+ directory: path.join(__dirname, './')
+ }
+ },
+ module: {
+ rules: [
+ {
+ test: /\.vue$/,
+ loader: 'vue-loader'
+ },
+ {
+ test: /\.js$/,
+ loader: 'babel-loader'
+ }
+ ]
+ },
+ plugins: [
+ new VueLoaderPlugin(),
+ VueI18nPlugin({
+ include: [path.resolve(__dirname, './src/locales/**')],
+ transformI18nBlock: transformI18nBlock
+ })
+ ]
+}
diff --git a/examples/rspack/src/App.vue b/examples/rspack/src/App.vue
new file mode 100644
index 00000000..dcf4deca
--- /dev/null
+++ b/examples/rspack/src/App.vue
@@ -0,0 +1,46 @@
+
+
+ {{ t('hello') }}
+
+
+
+
+
+
+
+{
+ "en": {
+ "language": "Language",
+ "hello": "hello, world!"
+ },
+ "ja": {
+ "language": "言語",
+ "hello": "こんにちは、世界!"
+ }
+}
+
diff --git a/examples/rspack/src/Apple.vue b/examples/rspack/src/Apple.vue
new file mode 100644
index 00000000..f8d965c4
--- /dev/null
+++ b/examples/rspack/src/Apple.vue
@@ -0,0 +1,26 @@
+
+ {{ t('language') }}
+ {{ t('hello') }}
+
+
+
+
+
+[
+ "language",
+ "hello",
+]
+
diff --git a/examples/rspack/src/Banana.vue b/examples/rspack/src/Banana.vue
new file mode 100644
index 00000000..ea0664df
--- /dev/null
+++ b/examples/rspack/src/Banana.vue
@@ -0,0 +1,29 @@
+
+
+ {{ t('fruits.banana', select, { n: select }) }}
+
+
+
diff --git a/examples/rspack/src/locales/en.yaml b/examples/rspack/src/locales/en.yaml
new file mode 100644
index 00000000..85d055d8
--- /dev/null
+++ b/examples/rspack/src/locales/en.yaml
@@ -0,0 +1,3 @@
+select: Do you want banana?
+fruits:
+ banana: 'no bananas | {n} banana | {n} bananas'
diff --git a/examples/rspack/src/locales/ja.json b/examples/rspack/src/locales/ja.json
new file mode 100644
index 00000000..df96dc6f
--- /dev/null
+++ b/examples/rspack/src/locales/ja.json
@@ -0,0 +1,6 @@
+{
+ "select": "バナナが欲しい?",
+ "fruits": {
+ "banana": "バナナがない | バナナ {n} 個"
+ }
+}
diff --git a/examples/rspack/src/main.js b/examples/rspack/src/main.js
new file mode 100644
index 00000000..621e22bc
--- /dev/null
+++ b/examples/rspack/src/main.js
@@ -0,0 +1,19 @@
+import { createApp } from 'vue'
+import { createI18n } from 'vue-i18n'
+import App from './App.vue'
+
+import ja from './locales/ja.json'
+import en from './locales/en.yaml'
+
+const i18n = createI18n({
+ locale: 'ja',
+ messages: {
+ en,
+ ja
+ }
+})
+
+const app = createApp(App)
+
+app.use(i18n)
+app.mount('#app')
diff --git a/package.json b/package.json
index d1b646df..0bdcda67 100644
--- a/package.json
+++ b/package.json
@@ -33,6 +33,8 @@
"@rollup/plugin-node-resolve": "^13.0.0",
"@rollup/plugin-replace": "^2.4.2",
"@rollup/pluginutils": "^4.1.0",
+ "@rspack/cli": "^1.2.7",
+ "@rspack/core": "^1.2.7",
"@types/debug": "^4.1.5",
"@types/eslint": "^9.6.1",
"@types/js-yaml": "^4.0.3",
@@ -109,8 +111,10 @@
"build:example": "run-s \"build:example:vite {@}\" \"build:example:webpack\" --",
"build:example:vite": "cd examples/vite && vite build --config ./vite.config.ts --outDir ./dist",
"build:example:webpack": "pnpm build && webpack --config ./examples/webpack/webpack.config.js",
+ "build:example:rspack": "pnpm build && rspack --config ./examples/rspack/rsbuild.config.js",
"play:vite": "vite examples/vite -c examples/vite/vite.config.ts",
"play:webpack": "pnpm run build:unplugin && webpack serve --config ./examples/webpack/webpack.config.js",
+ "play:rspack": "rspack dev --config ./examples/rspack/rspack.config.js",
"preview:vite": "vite preview examples/vite --outDir dist",
"check-install": "jiti scripts/playwright.ts",
"clean": "run-p \"clean:*\"",
@@ -133,10 +137,14 @@
"test:e2e:vite": "pnpm --filter @intlify/vite-plugin-vue-i18n test:e2e",
"test:e2e:webpack": "pnpm --filter @intlify/vue-i18n-loader test:e2e",
"test:e2e:unplugin": "pnpm --filter @intlify/unplugin-vue-i18n test:e2e",
- "test:unit": "run-s \"test:unit:utils {@}\" \"test:unit:unplugin {@}\" --",
+ "test:unit": "run-s \"test:unit:utils {@}\" \"test:unit:unplugin\" --",
"test:unit:utils": "vitest run packages/bundle-utils",
"test:unit:rollup": "vitest run packages/rollup-plugin-vue-i18n/test",
"test:unit:unplugin": "vitest run packages/unplugin-vue-i18n/test",
+ "test:unit:unplugin-all": "run-s \"test:unit:unplugin:*\"",
+ "test:unit:unplugin:vite": "TEST_FRAMEWORK=vite vitest run packages/unplugin-vue-i18n/test",
+ "test:unit:unplugin:webpack": "TEST_FRAMEWORK=webpack vitest run packages/unplugin-vue-i18n/test",
+ "test:unit:unplugin:rspack": "TEST_FRAMEWORK=rspack vitest run packages/unplugin-vue-i18n/test",
"changelog": "jiti ./scripts/changelog.ts",
"changelog:utils": "pnpm --filter @intlify/bundle-utils changelog",
"changelog:rollup": "pnpm --filter @intlify/rollup-plugin-vue-i18n changelog",
diff --git a/packages/unplugin-vue-i18n/README.md b/packages/unplugin-vue-i18n/README.md
index c462c6d6..ba720f95 100644
--- a/packages/unplugin-vue-i18n/README.md
+++ b/packages/unplugin-vue-i18n/README.md
@@ -59,6 +59,25 @@ module.exports = {
+
+Rspack
+
+```ts
+const VueI18nPlugin = require('@intlify/unplugin-vue-i18n/rspack')
+
+// rspack.config.js
+module.exports = {
+ /* ... */
+ plugins: [
+ VueI18nPlugin({
+ /* options */
+ })
+ ]
+}
+```
+
+
+
Nuxt
@@ -379,7 +398,7 @@ If you are using petite-vue-i18n, you will need to set this value.
Whether locale messages should be compiled by JIT (Just in Time) compilation with vue-i18n's message compiler.
-JIT compilation has been supported since vue-i18n v9.3. This means that since v9 was released until now, the message compiler compiles to executable JavaScript code, however it did not work in the CSP environment. Also, since this was an AOT (Ahead of Time) compilation, it was not possible to dynamically retrieve locale messages from the back-end Database and compose locale messages with programatic.
+JIT compilation has been supported since vue-i18n v9.3. This means that since v9 was released until now, the message compiler compiles to executable JavaScript code, however it did not work in the CSP environment. Also, since this was an AOT (Ahead of Time) compilation, it was not possible to dynamically retrieve locale messages from the back-end Database and compose locale messages with programmatic.
> [!WARNING]
> Enabling JIT compilation causes the message compiler to generate AST objects for locale messages instead of JavaScript code. If you pre-compile locale messages with a tool such as the [Intlify CLI](https://github.com/intlify/cli) and import them dynamically, you need to rebuild that resource.
@@ -424,6 +443,7 @@ If do you will use this option, you need to enable `jitCompilation` option.
```
- vite config: `resolve.alias`
- webpack config: `resolve.alias`
+ - rspack config: `resolve.alias`
```
If `false` is specified, Vue I18n (vue-i18n) package.json `module` field will be used.
diff --git a/packages/unplugin-vue-i18n/build.config.ts b/packages/unplugin-vue-i18n/build.config.ts
index a5f0d98e..c5b98501 100644
--- a/packages/unplugin-vue-i18n/build.config.ts
+++ b/packages/unplugin-vue-i18n/build.config.ts
@@ -24,18 +24,22 @@ export default defineBuildConfig({
{
name: 'webpack',
input: 'src/webpack'
+ },
+ {
+ name: 'rspack',
+ input: 'src/rspack'
}
],
rollup: {
emitCJS: true
},
- externals: ['vite', 'webpack'],
+ externals: ['vite', 'webpack', '@rspack/core'],
hooks: {
'build:done': async () => {
await Promise.all([
rm(resolve(lib, 'types.cjs')),
rm(resolve(lib, 'types.mjs')),
- ...['vite', 'webpack'].map(async name => {
+ ...['vite', 'webpack', 'rspack'].map(async name => {
for (const ext of ['d.ts', 'd.cts']) {
const path = resolve(lib, `${name}.${ext}`)
const content = await readFile(path, 'utf-8')
diff --git a/packages/unplugin-vue-i18n/package.json b/packages/unplugin-vue-i18n/package.json
index 6d9dd8c6..a95a343d 100644
--- a/packages/unplugin-vue-i18n/package.json
+++ b/packages/unplugin-vue-i18n/package.json
@@ -38,12 +38,12 @@
"pathe": "^1.0.0",
"picocolors": "^1.0.0",
"source-map-js": "^1.0.2",
- "unplugin": "^1.1.0",
+ "unplugin": "^2.2.0",
"vue": "^3.4"
},
"devDependencies": {
- "unbuild": "^2.0.0",
- "@types/node": "^20.14.8"
+ "@types/node": "^20.14.8",
+ "unbuild": "^2.0.0"
},
"engines": {
"node": ">= 18"
@@ -59,6 +59,7 @@
"unplugin",
"transform",
"webpack",
+ "rspack",
"vite",
"vue",
"vue-i18n"
@@ -80,6 +81,10 @@
"import": "./lib/webpack.mjs",
"require": "./lib/webpack.cjs"
},
+ "./rspack": {
+ "import": "./lib/rspack.mjs",
+ "require": "./lib/rspack.cjs"
+ },
"./types": {
"import": {
"types": "./lib/types.d.mts"
diff --git a/packages/unplugin-vue-i18n/rspack.d.ts b/packages/unplugin-vue-i18n/rspack.d.ts
new file mode 100644
index 00000000..52359273
--- /dev/null
+++ b/packages/unplugin-vue-i18n/rspack.d.ts
@@ -0,0 +1 @@
+export { default } from './lib/rspack'
diff --git a/packages/unplugin-vue-i18n/src/core/resource.ts b/packages/unplugin-vue-i18n/src/core/resource.ts
index a90364d4..31bfb086 100644
--- a/packages/unplugin-vue-i18n/src/core/resource.ts
+++ b/packages/unplugin-vue-i18n/src/core/resource.ts
@@ -243,56 +243,31 @@ export function resourcePlugin(
},
webpack(compiler) {
- isProduction = compiler.options.mode !== 'development'
- sourceMap = !!compiler.options.devtool
- debug(`webpack: isProduction = ${isProduction}, sourceMap = ${sourceMap}`)
-
- compiler.options.resolve = normalizeConfigResolveAlias(
- compiler.options.resolve,
- meta.framework
- )
- ;(compiler.options.resolve!.alias as any)[vueI18nAliasName] =
- getVueI18nAliasPath({
- ssr: ssrBuild,
- runtimeOnly
- })
- debug(
- `set ${vueI18nAliasName}: ${getVueI18nAliasPath({
- ssr: ssrBuild,
- runtimeOnly
- })}`
- )
-
- loadWebpack().then(webpack => {
- if (webpack) {
- compiler.options.plugins!.push(
- new webpack.DefinePlugin({
- __VUE_I18N_FULL_INSTALL__: JSON.stringify(fullInstall),
- __INTLIFY_PROD_DEVTOOLS__: 'false'
- })
- )
- debug(`set __VUE_I18N_FULL_INSTALL__ is '${fullInstall}'`)
- } else {
- debug('ignore vue-i18n feature flags with webpack.DefinePlugin')
- }
+ webpackLike(compiler, 'webpack', {
+ isProduction,
+ meta,
+ sourceMap,
+ getVueI18nAliasPath,
+ vueI18nAliasName,
+ ssrBuild,
+ runtimeOnly,
+ fullInstall,
+ filter
})
+ },
- /**
- * NOTE:
- * After i18n resources are transformed into javascript by transform, avoid further transforming by webpack.
- */
- if (compiler.options.module) {
- compiler.options.module.rules.push({
- test: /\.(json5?|ya?ml)$/,
- type: 'javascript/auto',
- include(resource: string) {
- return filter(resource)
- }
- })
- }
-
- // TODO:
- // HMR for webpack
+ rspack(compiler) {
+ webpackLike(compiler, 'rspack', {
+ isProduction,
+ meta,
+ sourceMap,
+ getVueI18nAliasPath,
+ vueI18nAliasName,
+ ssrBuild,
+ runtimeOnly,
+ fullInstall,
+ filter
+ })
},
resolveId(id: string, importer: string) {
@@ -302,6 +277,10 @@ export function resourcePlugin(
}
},
+ loadInclude(id: string) {
+ return INTLIFY_BUNDLE_IMPORT_ID === getVirtualId(id, meta.framework)
+ },
+
async load(id: string) {
debug('load', id)
if (
@@ -477,6 +456,90 @@ function getGenerator(ext: string, defaultGen = generateJSON) {
: defaultGen
}
+function webpackLike(
+ compiler:
+ | Parameters>[0]
+ | Parameters>[0],
+ framework: 'webpack' | 'rspack',
+ {
+ isProduction,
+ sourceMap,
+ meta,
+ getVueI18nAliasPath,
+ vueI18nAliasName,
+ ssrBuild,
+ runtimeOnly,
+ fullInstall,
+ filter
+ }: Pick & {
+ meta: UnpluginContextMeta
+ isProduction: boolean
+ sourceMap: boolean
+ vueI18nAliasName: string
+ getVueI18nAliasPath: (opts: {
+ ssr?: boolean | undefined
+ runtimeOnly?: boolean | undefined
+ }) => string
+ // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents
+ filter: (id: string | unknown) => boolean
+ }
+) {
+ isProduction = compiler.options.mode !== 'development'
+ sourceMap = !!compiler.options.devtool
+ debug(
+ `${framework}: isProduction = ${isProduction}, sourceMap = ${sourceMap}`
+ )
+
+ compiler.options.resolve = normalizeConfigResolveAlias(
+ compiler.options.resolve,
+ meta.framework
+ )
+ ;(compiler.options.resolve!.alias as any)[vueI18nAliasName] =
+ getVueI18nAliasPath({
+ ssr: ssrBuild,
+ runtimeOnly
+ })
+ debug(
+ `set ${vueI18nAliasName}: ${getVueI18nAliasPath({
+ ssr: ssrBuild,
+ runtimeOnly
+ })}`
+ )
+
+ const loader = framework === 'webpack' ? loadWebpack : loadRspack
+ loader().then(mod => {
+ if (mod) {
+ compiler.options.plugins!.push(
+ // @ts-expect-error type issue
+ new mod.DefinePlugin({
+ __VUE_I18N_FULL_INSTALL__: JSON.stringify(fullInstall),
+ __INTLIFY_PROD_DEVTOOLS__: 'false'
+ })
+ )
+ debug(`set __VUE_I18N_FULL_INSTALL__ is '${fullInstall}'`)
+ } else {
+ debug(`ignore vue-i18n feature flags with ${framework}.DefinePlugin`)
+ }
+ })
+
+ /**
+ * NOTE:
+ * After i18n resources are transformed into javascript by transform, avoid further transforming by webpack.
+ */
+ if (compiler.options.module) {
+ compiler.options.module.rules.push({
+ test: /\.(json5?|ya?ml)$/,
+ type: 'javascript/auto',
+ include(resource: string) {
+ return filter(resource)
+ }
+ })
+ }
+
+ // TODO:
+ // HMR for webpack
+}
+
function normalizeConfigResolveAlias(
resolve: any,
framework: UnpluginContextMeta['framework']
@@ -485,17 +548,19 @@ function normalizeConfigResolveAlias(
return resolve
}
+ const webpackLike = framework === 'webpack' || framework === 'rspack'
+
if (!resolve) {
if (framework === 'vite') {
return { alias: [] }
- } else if (framework === 'webpack') {
+ } else if (webpackLike) {
return { alias: {} }
}
} else if (!resolve.alias) {
if (framework === 'vite') {
resolve.alias = []
return resolve
- } else if (framework === 'webpack') {
+ } else if (webpackLike) {
resolve.alias = {}
return resolve
}
@@ -503,13 +568,23 @@ function normalizeConfigResolveAlias(
}
async function loadWebpack() {
- let webpack = null
try {
- webpack = await import('webpack').then(m => m.default || m)
+ const mod = await import('webpack')
+ return mod.default || mod
} catch (_e) {
warn(`webpack not found, please install webpack.`)
}
- return webpack
+ return null
+}
+
+async function loadRspack() {
+ try {
+ const { rspack } = await import('@rspack/core')
+ return rspack
+ } catch (_e) {
+ warn(`rspack not found, please install rspack.`)
+ }
+ return null
}
async function generateBundleResources(
@@ -596,10 +671,10 @@ async function getCode(
raiseError(`unexpected index: ${index}`)
}
- if (framework === 'webpack') {
+ if (framework === 'webpack' || framework === 'rspack') {
if (issuerPath) {
// via `src=xxx` of SFC
- debug(`getCode (webpack) ${index} via issuerPath`, issuerPath)
+ debug(`getCode (${framework}) ${index} via issuerPath`, issuerPath)
return await getRaw(filename)
} else {
const result = parser(await getRaw(filename), {
@@ -609,7 +684,7 @@ async function getCode(
const block = result.descriptor.customBlocks[index!]
if (block) {
const code = block.src ? await getRaw(block.src) : block.content
- debug(`getCode (webpack) ${index} from SFC`, code)
+ debug(`getCode (${framework}) ${index} from SFC`, code)
return code
} else {
return source
diff --git a/packages/unplugin-vue-i18n/src/index.ts b/packages/unplugin-vue-i18n/src/index.ts
index 6c8d8ed4..9e69ee5e 100644
--- a/packages/unplugin-vue-i18n/src/index.ts
+++ b/packages/unplugin-vue-i18n/src/index.ts
@@ -16,8 +16,8 @@ export const unpluginFactory: UnpluginFactory = (
) => {
debug('meta framework', meta.framework)
// check bundler type
- if (!['vite', 'webpack'].includes(meta.framework)) {
- raiseError(`This plugin is supported 'vite' and 'webpack' only`)
+ if (!['vite', 'webpack', 'rspack'].includes(meta.framework)) {
+ raiseError(`This plugin is supported 'vite', 'webpack' and 'rspack' only`)
}
debug('plugin options (resolving):', options)
@@ -26,9 +26,9 @@ export const unpluginFactory: UnpluginFactory = (
const plugins = [resourcePlugin(resolvedOptions, meta)]
if (resolvedOptions.optimizeTranslationDirective) {
- if (meta.framework === 'webpack') {
+ if (meta.framework === 'webpack' || meta.framework === 'rspack') {
raiseError(
- `The 'optimizeTranslationDirective' option still is not supported for webpack.\n` +
+ `The 'optimizeTranslationDirective' option still is not supported for ${meta.framework}.\n` +
`We are waiting for your Pull Request 🙂.`
)
}
diff --git a/packages/unplugin-vue-i18n/src/rspack.ts b/packages/unplugin-vue-i18n/src/rspack.ts
new file mode 100644
index 00000000..da3ddc6f
--- /dev/null
+++ b/packages/unplugin-vue-i18n/src/rspack.ts
@@ -0,0 +1,9 @@
+import { createRspackPlugin } from 'unplugin'
+import { unpluginFactory } from '.'
+
+import type { UnpluginInstance } from 'unplugin'
+import type { PluginOptions } from './types'
+
+const rspack: UnpluginInstance['rspack'] =
+ createRspackPlugin(unpluginFactory)
+export default rspack
diff --git a/packages/unplugin-vue-i18n/test/vite/__snapshots__/custom-block.test.ts.snap b/packages/unplugin-vue-i18n/test/__snapshots__/custom-block.test.ts.rspack.snap
similarity index 100%
rename from packages/unplugin-vue-i18n/test/vite/__snapshots__/custom-block.test.ts.snap
rename to packages/unplugin-vue-i18n/test/__snapshots__/custom-block.test.ts.rspack.snap
diff --git a/packages/unplugin-vue-i18n/test/webpack/__snapshots__/custom-block.test.ts.snap b/packages/unplugin-vue-i18n/test/__snapshots__/custom-block.test.ts.vite.snap
similarity index 78%
rename from packages/unplugin-vue-i18n/test/webpack/__snapshots__/custom-block.test.ts.snap
rename to packages/unplugin-vue-i18n/test/__snapshots__/custom-block.test.ts.vite.snap
index 3a623035..4c450944 100644
--- a/packages/unplugin-vue-i18n/test/webpack/__snapshots__/custom-block.test.ts.snap
+++ b/packages/unplugin-vue-i18n/test/__snapshots__/custom-block.test.ts.vite.snap
@@ -1,5 +1,72 @@
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
+exports[`AST 1`] = `
+[
+ {
+ "locale": "",
+ "resource": {
+ "en": {
+ "hello": {
+ "body": {
+ "end": 12,
+ "items": [
+ {
+ "end": 12,
+ "loc": {
+ "end": {
+ "column": 13,
+ "line": 1,
+ "offset": 12,
+ },
+ "start": {
+ "column": 1,
+ "line": 1,
+ "offset": 0,
+ },
+ },
+ "start": 0,
+ "type": 3,
+ },
+ ],
+ "loc": {
+ "end": {
+ "column": 13,
+ "line": 1,
+ "offset": 12,
+ },
+ "start": {
+ "column": 1,
+ "line": 1,
+ "offset": 0,
+ },
+ },
+ "start": 0,
+ "static": "hello world!",
+ "type": 2,
+ },
+ "end": 12,
+ "loc": {
+ "end": {
+ "column": 13,
+ "line": 1,
+ "offset": 12,
+ },
+ "source": "hello world!",
+ "start": {
+ "column": 1,
+ "line": 1,
+ "offset": 0,
+ },
+ },
+ "start": 0,
+ "type": 0,
+ },
+ },
+ },
+ },
+]
+`;
+
exports[`array 1`] = `
[
{
@@ -593,6 +660,86 @@ exports[`import 1`] = `
]
`;
+exports[`json: exclude locales 1`] = `
+[
+ {
+ "locale": "",
+ "resource": {},
+ },
+]
+`;
+
+exports[`json: exclude locales when using mixed locales 1`] = `
+[
+ {
+ "locale": "",
+ "resource": {
+ "en": {
+ "hello": {
+ "body": {
+ "end": 12,
+ "items": [
+ {
+ "end": 12,
+ "loc": {
+ "end": {
+ "column": 13,
+ "line": 1,
+ "offset": 12,
+ },
+ "start": {
+ "column": 1,
+ "line": 1,
+ "offset": 0,
+ },
+ },
+ "start": 0,
+ "type": 3,
+ },
+ ],
+ "loc": {
+ "end": {
+ "column": 13,
+ "line": 1,
+ "offset": 12,
+ },
+ "start": {
+ "column": 1,
+ "line": 1,
+ "offset": 0,
+ },
+ },
+ "start": 0,
+ "static": "hello world!",
+ "type": 2,
+ },
+ "end": 12,
+ "loc": {
+ "end": {
+ "column": 13,
+ "line": 1,
+ "offset": 12,
+ },
+ "source": "hello world!",
+ "start": {
+ "column": 1,
+ "line": 1,
+ "offset": 0,
+ },
+ },
+ "start": 0,
+ "type": 0,
+ },
+ },
+ },
+ },
+ {
+ "locale": "",
+ "resource": {},
+ },
+]
+`;
+
exports[`json5 1`] = `
[
{
@@ -660,6 +807,86 @@ exports[`json5 1`] = `
]
`;
+exports[`json5: exclude locales 1`] = `
+[
+ {
+ "locale": "",
+ "resource": {},
+ },
+]
+`;
+
+exports[`json5: exclude locales when using mixed locales 1`] = `
+[
+ {
+ "locale": "",
+ "resource": {
+ "en": {
+ "hello": {
+ "body": {
+ "end": 12,
+ "items": [
+ {
+ "end": 12,
+ "loc": {
+ "end": {
+ "column": 13,
+ "line": 1,
+ "offset": 12,
+ },
+ "start": {
+ "column": 1,
+ "line": 1,
+ "offset": 0,
+ },
+ },
+ "start": 0,
+ "type": 3,
+ },
+ ],
+ "loc": {
+ "end": {
+ "column": 13,
+ "line": 1,
+ "offset": 12,
+ },
+ "start": {
+ "column": 1,
+ "line": 1,
+ "offset": 0,
+ },
+ },
+ "start": 0,
+ "static": "hello world!",
+ "type": 2,
+ },
+ "end": 12,
+ "loc": {
+ "end": {
+ "column": 13,
+ "line": 1,
+ "offset": 12,
+ },
+ "source": "hello world!",
+ "start": {
+ "column": 1,
+ "line": 1,
+ "offset": 0,
+ },
+ },
+ "start": 0,
+ "type": 0,
+ },
+ },
+ },
+ },
+ {
+ "locale": "",
+ "resource": {},
+ },
+]
+`;
+
exports[`locale attr 1`] = `
[
{
@@ -1239,3 +1466,143 @@ exports[`yaml 1`] = `
},
]
`;
+
+exports[`yaml: exclude locales 1`] = `
+[
+ {
+ "locale": "",
+ "resource": {},
+ },
+ {
+ "locale": "ja",
+ "resource": {
+ "hello": {
+ "body": {
+ "end": 9,
+ "items": [
+ {
+ "end": 9,
+ "loc": {
+ "end": {
+ "column": 10,
+ "line": 1,
+ "offset": 9,
+ },
+ "start": {
+ "column": 1,
+ "line": 1,
+ "offset": 0,
+ },
+ },
+ "start": 0,
+ "type": 3,
+ },
+ ],
+ "loc": {
+ "end": {
+ "column": 10,
+ "line": 1,
+ "offset": 9,
+ },
+ "start": {
+ "column": 1,
+ "line": 1,
+ "offset": 0,
+ },
+ },
+ "start": 0,
+ "static": "こんにちは、世界!",
+ "type": 2,
+ },
+ "end": 9,
+ "loc": {
+ "end": {
+ "column": 10,
+ "line": 1,
+ "offset": 9,
+ },
+ "source": "こんにちは、世界!",
+ "start": {
+ "column": 1,
+ "line": 1,
+ "offset": 0,
+ },
+ },
+ "start": 0,
+ "type": 0,
+ },
+ },
+ },
+]
+`;
+
+exports[`yaml: exclude locales when using mixed locales 1`] = `
+[
+ {
+ "locale": "",
+ "resource": {
+ "en": {
+ "hello": {
+ "body": {
+ "end": 12,
+ "items": [
+ {
+ "end": 12,
+ "loc": {
+ "end": {
+ "column": 13,
+ "line": 1,
+ "offset": 12,
+ },
+ "start": {
+ "column": 1,
+ "line": 1,
+ "offset": 0,
+ },
+ },
+ "start": 0,
+ "type": 3,
+ },
+ ],
+ "loc": {
+ "end": {
+ "column": 13,
+ "line": 1,
+ "offset": 12,
+ },
+ "start": {
+ "column": 1,
+ "line": 1,
+ "offset": 0,
+ },
+ },
+ "start": 0,
+ "static": "hello world!",
+ "type": 2,
+ },
+ "end": 12,
+ "loc": {
+ "end": {
+ "column": 13,
+ "line": 1,
+ "offset": 12,
+ },
+ "source": "hello world!",
+ "start": {
+ "column": 1,
+ "line": 1,
+ "offset": 0,
+ },
+ },
+ "start": 0,
+ "type": 0,
+ },
+ },
+ },
+ },
+ {
+ "locale": "",
+ "resource": {},
+ },
+]
+`;
diff --git a/packages/unplugin-vue-i18n/test/__snapshots__/custom-block.test.ts.webpack.snap b/packages/unplugin-vue-i18n/test/__snapshots__/custom-block.test.ts.webpack.snap
new file mode 100644
index 00000000..4c450944
--- /dev/null
+++ b/packages/unplugin-vue-i18n/test/__snapshots__/custom-block.test.ts.webpack.snap
@@ -0,0 +1,1608 @@
+// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
+
+exports[`AST 1`] = `
+[
+ {
+ "locale": "",
+ "resource": {
+ "en": {
+ "hello": {
+ "body": {
+ "end": 12,
+ "items": [
+ {
+ "end": 12,
+ "loc": {
+ "end": {
+ "column": 13,
+ "line": 1,
+ "offset": 12,
+ },
+ "start": {
+ "column": 1,
+ "line": 1,
+ "offset": 0,
+ },
+ },
+ "start": 0,
+ "type": 3,
+ },
+ ],
+ "loc": {
+ "end": {
+ "column": 13,
+ "line": 1,
+ "offset": 12,
+ },
+ "start": {
+ "column": 1,
+ "line": 1,
+ "offset": 0,
+ },
+ },
+ "start": 0,
+ "static": "hello world!",
+ "type": 2,
+ },
+ "end": 12,
+ "loc": {
+ "end": {
+ "column": 13,
+ "line": 1,
+ "offset": 12,
+ },
+ "source": "hello world!",
+ "start": {
+ "column": 1,
+ "line": 1,
+ "offset": 0,
+ },
+ },
+ "start": 0,
+ "type": 0,
+ },
+ },
+ },
+ },
+]
+`;
+
+exports[`array 1`] = `
+[
+ {
+ "locale": "",
+ "resource": {
+ "en": {
+ "foo": [
+ [
+ {
+ "body": {
+ "end": 3,
+ "items": [
+ {
+ "end": 3,
+ "loc": {
+ "end": {
+ "column": 4,
+ "line": 1,
+ "offset": 3,
+ },
+ "start": {
+ "column": 1,
+ "line": 1,
+ "offset": 0,
+ },
+ },
+ "start": 0,
+ "type": 3,
+ },
+ ],
+ "loc": {
+ "end": {
+ "column": 4,
+ "line": 1,
+ "offset": 3,
+ },
+ "start": {
+ "column": 1,
+ "line": 1,
+ "offset": 0,
+ },
+ },
+ "start": 0,
+ "static": "bar",
+ "type": 2,
+ },
+ "end": 3,
+ "loc": {
+ "end": {
+ "column": 4,
+ "line": 1,
+ "offset": 3,
+ },
+ "source": "bar",
+ "start": {
+ "column": 1,
+ "line": 1,
+ "offset": 0,
+ },
+ },
+ "start": 0,
+ "type": 0,
+ },
+ ],
+ {
+ "body": {
+ "end": 3,
+ "items": [
+ {
+ "end": 3,
+ "loc": {
+ "end": {
+ "column": 4,
+ "line": 1,
+ "offset": 3,
+ },
+ "start": {
+ "column": 1,
+ "line": 1,
+ "offset": 0,
+ },
+ },
+ "start": 0,
+ "type": 3,
+ },
+ ],
+ "loc": {
+ "end": {
+ "column": 4,
+ "line": 1,
+ "offset": 3,
+ },
+ "start": {
+ "column": 1,
+ "line": 1,
+ "offset": 0,
+ },
+ },
+ "start": 0,
+ "static": "baz",
+ "type": 2,
+ },
+ "end": 3,
+ "loc": {
+ "end": {
+ "column": 4,
+ "line": 1,
+ "offset": 3,
+ },
+ "source": "baz",
+ "start": {
+ "column": 1,
+ "line": 1,
+ "offset": 0,
+ },
+ },
+ "start": 0,
+ "type": 0,
+ },
+ ],
+ },
+ },
+ },
+]
+`;
+
+exports[`basic 1`] = `
+[
+ {
+ "locale": "",
+ "resource": {
+ "en": {
+ "hello": {
+ "body": {
+ "end": 12,
+ "items": [
+ {
+ "end": 12,
+ "loc": {
+ "end": {
+ "column": 13,
+ "line": 1,
+ "offset": 12,
+ },
+ "start": {
+ "column": 1,
+ "line": 1,
+ "offset": 0,
+ },
+ },
+ "start": 0,
+ "type": 3,
+ },
+ ],
+ "loc": {
+ "end": {
+ "column": 13,
+ "line": 1,
+ "offset": 12,
+ },
+ "start": {
+ "column": 1,
+ "line": 1,
+ "offset": 0,
+ },
+ },
+ "start": 0,
+ "static": "hello world!",
+ "type": 2,
+ },
+ "end": 12,
+ "loc": {
+ "end": {
+ "column": 13,
+ "line": 1,
+ "offset": 12,
+ },
+ "source": "hello world!",
+ "start": {
+ "column": 1,
+ "line": 1,
+ "offset": 0,
+ },
+ },
+ "start": 0,
+ "type": 0,
+ },
+ },
+ },
+ },
+]
+`;
+
+exports[`default lang 1`] = `
+[
+ {
+ "locale": "",
+ "resource": {
+ "en": {
+ "hello": {
+ "body": {
+ "end": 20,
+ "items": [
+ {
+ "end": 20,
+ "loc": {
+ "end": {
+ "column": 21,
+ "line": 1,
+ "offset": 20,
+ },
+ "start": {
+ "column": 1,
+ "line": 1,
+ "offset": 0,
+ },
+ },
+ "start": 0,
+ "type": 3,
+ },
+ ],
+ "loc": {
+ "end": {
+ "column": 21,
+ "line": 1,
+ "offset": 20,
+ },
+ "start": {
+ "column": 1,
+ "line": 1,
+ "offset": 0,
+ },
+ },
+ "start": 0,
+ "static": "hello from defaults!",
+ "type": 2,
+ },
+ "end": 20,
+ "loc": {
+ "end": {
+ "column": 21,
+ "line": 1,
+ "offset": 20,
+ },
+ "source": "hello from defaults!",
+ "start": {
+ "column": 1,
+ "line": 1,
+ "offset": 0,
+ },
+ },
+ "start": 0,
+ "type": 0,
+ },
+ },
+ },
+ },
+]
+`;
+
+exports[`default lang and global scope 1`] = `
+[
+ {
+ "locale": "",
+ "resource": {
+ "en": {
+ "hello": {
+ "body": {
+ "end": 20,
+ "items": [
+ {
+ "end": 20,
+ "loc": {
+ "end": {
+ "column": 21,
+ "line": 1,
+ "offset": 20,
+ },
+ "start": {
+ "column": 1,
+ "line": 1,
+ "offset": 0,
+ },
+ },
+ "start": 0,
+ "type": 3,
+ },
+ ],
+ "loc": {
+ "end": {
+ "column": 21,
+ "line": 1,
+ "offset": 20,
+ },
+ "start": {
+ "column": 1,
+ "line": 1,
+ "offset": 0,
+ },
+ },
+ "start": 0,
+ "static": "hello from defaults!",
+ "type": 2,
+ },
+ "end": 20,
+ "loc": {
+ "end": {
+ "column": 21,
+ "line": 1,
+ "offset": 20,
+ },
+ "source": "hello from defaults!",
+ "start": {
+ "column": 1,
+ "line": 1,
+ "offset": 0,
+ },
+ },
+ "start": 0,
+ "type": 0,
+ },
+ },
+ },
+ },
+]
+`;
+
+exports[`global 1`] = `
+[
+ {
+ "locale": "ja",
+ "resource": {
+ "hello": {
+ "body": {
+ "end": 12,
+ "items": [
+ {
+ "end": 12,
+ "loc": {
+ "end": {
+ "column": 13,
+ "line": 1,
+ "offset": 12,
+ },
+ "start": {
+ "column": 1,
+ "line": 1,
+ "offset": 0,
+ },
+ },
+ "start": 0,
+ "type": 3,
+ },
+ ],
+ "loc": {
+ "end": {
+ "column": 13,
+ "line": 1,
+ "offset": 12,
+ },
+ "start": {
+ "column": 1,
+ "line": 1,
+ "offset": 0,
+ },
+ },
+ "start": 0,
+ "static": "hello local!",
+ "type": 2,
+ },
+ "end": 12,
+ "loc": {
+ "end": {
+ "column": 13,
+ "line": 1,
+ "offset": 12,
+ },
+ "source": "hello local!",
+ "start": {
+ "column": 1,
+ "line": 1,
+ "offset": 0,
+ },
+ },
+ "start": 0,
+ "type": 0,
+ },
+ },
+ },
+]
+`;
+
+exports[`global 2`] = `
+[
+ {
+ "locale": "",
+ "resource": {
+ "en": {
+ "hello": {
+ "body": {
+ "end": 13,
+ "items": [
+ {
+ "end": 13,
+ "loc": {
+ "end": {
+ "column": 14,
+ "line": 1,
+ "offset": 13,
+ },
+ "start": {
+ "column": 1,
+ "line": 1,
+ "offset": 0,
+ },
+ },
+ "start": 0,
+ "type": 3,
+ },
+ ],
+ "loc": {
+ "end": {
+ "column": 14,
+ "line": 1,
+ "offset": 13,
+ },
+ "start": {
+ "column": 1,
+ "line": 1,
+ "offset": 0,
+ },
+ },
+ "start": 0,
+ "static": "hello global!",
+ "type": 2,
+ },
+ "end": 13,
+ "loc": {
+ "end": {
+ "column": 14,
+ "line": 1,
+ "offset": 13,
+ },
+ "source": "hello global!",
+ "start": {
+ "column": 1,
+ "line": 1,
+ "offset": 0,
+ },
+ },
+ "start": 0,
+ "type": 0,
+ },
+ },
+ },
+ },
+]
+`;
+
+exports[`global scope and import 1`] = `
+[
+ {
+ "locale": "",
+ "resource": {
+ "en": {
+ "hello": {
+ "body": {
+ "end": 12,
+ "items": [
+ {
+ "end": 12,
+ "loc": {
+ "end": {
+ "column": 13,
+ "line": 1,
+ "offset": 12,
+ },
+ "start": {
+ "column": 1,
+ "line": 1,
+ "offset": 0,
+ },
+ },
+ "start": 0,
+ "type": 3,
+ },
+ ],
+ "loc": {
+ "end": {
+ "column": 13,
+ "line": 1,
+ "offset": 12,
+ },
+ "start": {
+ "column": 1,
+ "line": 1,
+ "offset": 0,
+ },
+ },
+ "start": 0,
+ "static": "hello world!",
+ "type": 2,
+ },
+ "end": 12,
+ "loc": {
+ "end": {
+ "column": 13,
+ "line": 1,
+ "offset": 12,
+ },
+ "source": "hello world!",
+ "start": {
+ "column": 1,
+ "line": 1,
+ "offset": 0,
+ },
+ },
+ "start": 0,
+ "type": 0,
+ },
+ },
+ },
+ },
+]
+`;
+
+exports[`import 1`] = `
+[
+ {
+ "locale": "",
+ "resource": {
+ "en": {
+ "hello": {
+ "body": {
+ "end": 12,
+ "items": [
+ {
+ "end": 12,
+ "loc": {
+ "end": {
+ "column": 13,
+ "line": 1,
+ "offset": 12,
+ },
+ "start": {
+ "column": 1,
+ "line": 1,
+ "offset": 0,
+ },
+ },
+ "start": 0,
+ "type": 3,
+ },
+ ],
+ "loc": {
+ "end": {
+ "column": 13,
+ "line": 1,
+ "offset": 12,
+ },
+ "start": {
+ "column": 1,
+ "line": 1,
+ "offset": 0,
+ },
+ },
+ "start": 0,
+ "static": "hello world!",
+ "type": 2,
+ },
+ "end": 12,
+ "loc": {
+ "end": {
+ "column": 13,
+ "line": 1,
+ "offset": 12,
+ },
+ "source": "hello world!",
+ "start": {
+ "column": 1,
+ "line": 1,
+ "offset": 0,
+ },
+ },
+ "start": 0,
+ "type": 0,
+ },
+ },
+ },
+ },
+]
+`;
+
+exports[`json: exclude locales 1`] = `
+[
+ {
+ "locale": "",
+ "resource": {},
+ },
+]
+`;
+
+exports[`json: exclude locales when using mixed locales 1`] = `
+[
+ {
+ "locale": "",
+ "resource": {
+ "en": {
+ "hello": {
+ "body": {
+ "end": 12,
+ "items": [
+ {
+ "end": 12,
+ "loc": {
+ "end": {
+ "column": 13,
+ "line": 1,
+ "offset": 12,
+ },
+ "start": {
+ "column": 1,
+ "line": 1,
+ "offset": 0,
+ },
+ },
+ "start": 0,
+ "type": 3,
+ },
+ ],
+ "loc": {
+ "end": {
+ "column": 13,
+ "line": 1,
+ "offset": 12,
+ },
+ "start": {
+ "column": 1,
+ "line": 1,
+ "offset": 0,
+ },
+ },
+ "start": 0,
+ "static": "hello world!",
+ "type": 2,
+ },
+ "end": 12,
+ "loc": {
+ "end": {
+ "column": 13,
+ "line": 1,
+ "offset": 12,
+ },
+ "source": "hello world!",
+ "start": {
+ "column": 1,
+ "line": 1,
+ "offset": 0,
+ },
+ },
+ "start": 0,
+ "type": 0,
+ },
+ },
+ },
+ },
+ {
+ "locale": "",
+ "resource": {},
+ },
+]
+`;
+
+exports[`json5 1`] = `
+[
+ {
+ "locale": "",
+ "resource": {
+ "en": {
+ "hello": {
+ "body": {
+ "end": 12,
+ "items": [
+ {
+ "end": 12,
+ "loc": {
+ "end": {
+ "column": 13,
+ "line": 1,
+ "offset": 12,
+ },
+ "start": {
+ "column": 1,
+ "line": 1,
+ "offset": 0,
+ },
+ },
+ "start": 0,
+ "type": 3,
+ },
+ ],
+ "loc": {
+ "end": {
+ "column": 13,
+ "line": 1,
+ "offset": 12,
+ },
+ "start": {
+ "column": 1,
+ "line": 1,
+ "offset": 0,
+ },
+ },
+ "start": 0,
+ "static": "hello world!",
+ "type": 2,
+ },
+ "end": 12,
+ "loc": {
+ "end": {
+ "column": 13,
+ "line": 1,
+ "offset": 12,
+ },
+ "source": "hello world!",
+ "start": {
+ "column": 1,
+ "line": 1,
+ "offset": 0,
+ },
+ },
+ "start": 0,
+ "type": 0,
+ },
+ },
+ },
+ },
+]
+`;
+
+exports[`json5: exclude locales 1`] = `
+[
+ {
+ "locale": "",
+ "resource": {},
+ },
+]
+`;
+
+exports[`json5: exclude locales when using mixed locales 1`] = `
+[
+ {
+ "locale": "",
+ "resource": {
+ "en": {
+ "hello": {
+ "body": {
+ "end": 12,
+ "items": [
+ {
+ "end": 12,
+ "loc": {
+ "end": {
+ "column": 13,
+ "line": 1,
+ "offset": 12,
+ },
+ "start": {
+ "column": 1,
+ "line": 1,
+ "offset": 0,
+ },
+ },
+ "start": 0,
+ "type": 3,
+ },
+ ],
+ "loc": {
+ "end": {
+ "column": 13,
+ "line": 1,
+ "offset": 12,
+ },
+ "start": {
+ "column": 1,
+ "line": 1,
+ "offset": 0,
+ },
+ },
+ "start": 0,
+ "static": "hello world!",
+ "type": 2,
+ },
+ "end": 12,
+ "loc": {
+ "end": {
+ "column": 13,
+ "line": 1,
+ "offset": 12,
+ },
+ "source": "hello world!",
+ "start": {
+ "column": 1,
+ "line": 1,
+ "offset": 0,
+ },
+ },
+ "start": 0,
+ "type": 0,
+ },
+ },
+ },
+ },
+ {
+ "locale": "",
+ "resource": {},
+ },
+]
+`;
+
+exports[`locale attr 1`] = `
+[
+ {
+ "locale": "ja",
+ "resource": {
+ "hello": {
+ "body": {
+ "end": 9,
+ "items": [
+ {
+ "end": 9,
+ "loc": {
+ "end": {
+ "column": 10,
+ "line": 1,
+ "offset": 9,
+ },
+ "start": {
+ "column": 1,
+ "line": 1,
+ "offset": 0,
+ },
+ },
+ "start": 0,
+ "type": 3,
+ },
+ ],
+ "loc": {
+ "end": {
+ "column": 10,
+ "line": 1,
+ "offset": 9,
+ },
+ "start": {
+ "column": 1,
+ "line": 1,
+ "offset": 0,
+ },
+ },
+ "start": 0,
+ "static": "こんにちは、世界!",
+ "type": 2,
+ },
+ "end": 9,
+ "loc": {
+ "end": {
+ "column": 10,
+ "line": 1,
+ "offset": 9,
+ },
+ "source": "こんにちは、世界!",
+ "start": {
+ "column": 1,
+ "line": 1,
+ "offset": 0,
+ },
+ },
+ "start": 0,
+ "type": 0,
+ },
+ },
+ },
+]
+`;
+
+exports[`locale attr and basic 1`] = `
+[
+ {
+ "locale": "",
+ "resource": {
+ "en": {
+ "hello": {
+ "body": {
+ "end": 12,
+ "items": [
+ {
+ "end": 12,
+ "loc": {
+ "end": {
+ "column": 13,
+ "line": 1,
+ "offset": 12,
+ },
+ "start": {
+ "column": 1,
+ "line": 1,
+ "offset": 0,
+ },
+ },
+ "start": 0,
+ "type": 3,
+ },
+ ],
+ "loc": {
+ "end": {
+ "column": 13,
+ "line": 1,
+ "offset": 12,
+ },
+ "start": {
+ "column": 1,
+ "line": 1,
+ "offset": 0,
+ },
+ },
+ "start": 0,
+ "static": "hello world!",
+ "type": 2,
+ },
+ "end": 12,
+ "loc": {
+ "end": {
+ "column": 13,
+ "line": 1,
+ "offset": 12,
+ },
+ "source": "hello world!",
+ "start": {
+ "column": 1,
+ "line": 1,
+ "offset": 0,
+ },
+ },
+ "start": 0,
+ "type": 0,
+ },
+ },
+ },
+ },
+ {
+ "locale": "ja",
+ "resource": {
+ "hello": {
+ "body": {
+ "end": 9,
+ "items": [
+ {
+ "end": 9,
+ "loc": {
+ "end": {
+ "column": 10,
+ "line": 1,
+ "offset": 9,
+ },
+ "start": {
+ "column": 1,
+ "line": 1,
+ "offset": 0,
+ },
+ },
+ "start": 0,
+ "type": 3,
+ },
+ ],
+ "loc": {
+ "end": {
+ "column": 10,
+ "line": 1,
+ "offset": 9,
+ },
+ "start": {
+ "column": 1,
+ "line": 1,
+ "offset": 0,
+ },
+ },
+ "start": 0,
+ "static": "こんにちは、世界!",
+ "type": 2,
+ },
+ "end": 9,
+ "loc": {
+ "end": {
+ "column": 10,
+ "line": 1,
+ "offset": 9,
+ },
+ "source": "こんにちは、世界!",
+ "start": {
+ "column": 1,
+ "line": 1,
+ "offset": 0,
+ },
+ },
+ "start": 0,
+ "type": 0,
+ },
+ },
+ },
+]
+`;
+
+exports[`locale attr and import 1`] = `
+[
+ {
+ "locale": "en",
+ "resource": {
+ "hello": {
+ "body": {
+ "end": 12,
+ "items": [
+ {
+ "end": 12,
+ "loc": {
+ "end": {
+ "column": 13,
+ "line": 1,
+ "offset": 12,
+ },
+ "start": {
+ "column": 1,
+ "line": 1,
+ "offset": 0,
+ },
+ },
+ "start": 0,
+ "type": 3,
+ },
+ ],
+ "loc": {
+ "end": {
+ "column": 13,
+ "line": 1,
+ "offset": 12,
+ },
+ "start": {
+ "column": 1,
+ "line": 1,
+ "offset": 0,
+ },
+ },
+ "start": 0,
+ "static": "hello world!",
+ "type": 2,
+ },
+ "end": 12,
+ "loc": {
+ "end": {
+ "column": 13,
+ "line": 1,
+ "offset": 12,
+ },
+ "source": "hello world!",
+ "start": {
+ "column": 1,
+ "line": 1,
+ "offset": 0,
+ },
+ },
+ "start": 0,
+ "type": 0,
+ },
+ },
+ },
+]
+`;
+
+exports[`multiple 1`] = `
+[
+ {
+ "locale": "",
+ "resource": {
+ "en": {
+ "hello": {
+ "body": {
+ "end": 12,
+ "items": [
+ {
+ "end": 12,
+ "loc": {
+ "end": {
+ "column": 13,
+ "line": 1,
+ "offset": 12,
+ },
+ "start": {
+ "column": 1,
+ "line": 1,
+ "offset": 0,
+ },
+ },
+ "start": 0,
+ "type": 3,
+ },
+ ],
+ "loc": {
+ "end": {
+ "column": 13,
+ "line": 1,
+ "offset": 12,
+ },
+ "start": {
+ "column": 1,
+ "line": 1,
+ "offset": 0,
+ },
+ },
+ "start": 0,
+ "static": "hello world!",
+ "type": 2,
+ },
+ "end": 12,
+ "loc": {
+ "end": {
+ "column": 13,
+ "line": 1,
+ "offset": 12,
+ },
+ "source": "hello world!",
+ "start": {
+ "column": 1,
+ "line": 1,
+ "offset": 0,
+ },
+ },
+ "start": 0,
+ "type": 0,
+ },
+ },
+ },
+ },
+ {
+ "locale": "",
+ "resource": {
+ "ja": {
+ "hello": {
+ "body": {
+ "end": 9,
+ "items": [
+ {
+ "end": 9,
+ "loc": {
+ "end": {
+ "column": 10,
+ "line": 1,
+ "offset": 9,
+ },
+ "start": {
+ "column": 1,
+ "line": 1,
+ "offset": 0,
+ },
+ },
+ "start": 0,
+ "type": 3,
+ },
+ ],
+ "loc": {
+ "end": {
+ "column": 10,
+ "line": 1,
+ "offset": 9,
+ },
+ "start": {
+ "column": 1,
+ "line": 1,
+ "offset": 0,
+ },
+ },
+ "start": 0,
+ "static": "こんにちは、世界!",
+ "type": 2,
+ },
+ "end": 9,
+ "loc": {
+ "end": {
+ "column": 10,
+ "line": 1,
+ "offset": 9,
+ },
+ "source": "こんにちは、世界!",
+ "start": {
+ "column": 1,
+ "line": 1,
+ "offset": 0,
+ },
+ },
+ "start": 0,
+ "type": 0,
+ },
+ },
+ },
+ },
+]
+`;
+
+exports[`special characters 1`] = `
+[
+ {
+ "locale": "",
+ "resource": {
+ "en": {
+ "hello": {
+ "body": {
+ "end": 19,
+ "items": [
+ {
+ "end": 19,
+ "loc": {
+ "end": {
+ "column": 14,
+ "line": 2,
+ "offset": 19,
+ },
+ "start": {
+ "column": 1,
+ "line": 1,
+ "offset": 0,
+ },
+ },
+ "start": 0,
+ "type": 3,
+ },
+ ],
+ "loc": {
+ "end": {
+ "column": 14,
+ "line": 2,
+ "offset": 19,
+ },
+ "start": {
+ "column": 1,
+ "line": 1,
+ "offset": 0,
+ },
+ },
+ "start": 0,
+ "static": "hello
+great "world"",
+ "type": 2,
+ },
+ "end": 19,
+ "loc": {
+ "end": {
+ "column": 14,
+ "line": 2,
+ "offset": 19,
+ },
+ "source": "hello
+great "world"",
+ "start": {
+ "column": 1,
+ "line": 1,
+ "offset": 0,
+ },
+ },
+ "start": 0,
+ "type": 0,
+ },
+ },
+ },
+ },
+]
+`;
+
+exports[`yaml 1`] = `
+[
+ {
+ "locale": "en",
+ "resource": {
+ "hello": {
+ "body": {
+ "end": 12,
+ "items": [
+ {
+ "end": 12,
+ "loc": {
+ "end": {
+ "column": 13,
+ "line": 1,
+ "offset": 12,
+ },
+ "start": {
+ "column": 1,
+ "line": 1,
+ "offset": 0,
+ },
+ },
+ "start": 0,
+ "type": 3,
+ },
+ ],
+ "loc": {
+ "end": {
+ "column": 13,
+ "line": 1,
+ "offset": 12,
+ },
+ "start": {
+ "column": 1,
+ "line": 1,
+ "offset": 0,
+ },
+ },
+ "start": 0,
+ "static": "hello world!",
+ "type": 2,
+ },
+ "end": 12,
+ "loc": {
+ "end": {
+ "column": 13,
+ "line": 1,
+ "offset": 12,
+ },
+ "source": "hello world!",
+ "start": {
+ "column": 1,
+ "line": 1,
+ "offset": 0,
+ },
+ },
+ "start": 0,
+ "type": 0,
+ },
+ },
+ },
+ {
+ "locale": "ja",
+ "resource": {
+ "hello": {
+ "body": {
+ "end": 9,
+ "items": [
+ {
+ "end": 9,
+ "loc": {
+ "end": {
+ "column": 10,
+ "line": 1,
+ "offset": 9,
+ },
+ "start": {
+ "column": 1,
+ "line": 1,
+ "offset": 0,
+ },
+ },
+ "start": 0,
+ "type": 3,
+ },
+ ],
+ "loc": {
+ "end": {
+ "column": 10,
+ "line": 1,
+ "offset": 9,
+ },
+ "start": {
+ "column": 1,
+ "line": 1,
+ "offset": 0,
+ },
+ },
+ "start": 0,
+ "static": "こんにちは、世界!",
+ "type": 2,
+ },
+ "end": 9,
+ "loc": {
+ "end": {
+ "column": 10,
+ "line": 1,
+ "offset": 9,
+ },
+ "source": "こんにちは、世界!",
+ "start": {
+ "column": 1,
+ "line": 1,
+ "offset": 0,
+ },
+ },
+ "start": 0,
+ "type": 0,
+ },
+ },
+ },
+]
+`;
+
+exports[`yaml: exclude locales 1`] = `
+[
+ {
+ "locale": "",
+ "resource": {},
+ },
+ {
+ "locale": "ja",
+ "resource": {
+ "hello": {
+ "body": {
+ "end": 9,
+ "items": [
+ {
+ "end": 9,
+ "loc": {
+ "end": {
+ "column": 10,
+ "line": 1,
+ "offset": 9,
+ },
+ "start": {
+ "column": 1,
+ "line": 1,
+ "offset": 0,
+ },
+ },
+ "start": 0,
+ "type": 3,
+ },
+ ],
+ "loc": {
+ "end": {
+ "column": 10,
+ "line": 1,
+ "offset": 9,
+ },
+ "start": {
+ "column": 1,
+ "line": 1,
+ "offset": 0,
+ },
+ },
+ "start": 0,
+ "static": "こんにちは、世界!",
+ "type": 2,
+ },
+ "end": 9,
+ "loc": {
+ "end": {
+ "column": 10,
+ "line": 1,
+ "offset": 9,
+ },
+ "source": "こんにちは、世界!",
+ "start": {
+ "column": 1,
+ "line": 1,
+ "offset": 0,
+ },
+ },
+ "start": 0,
+ "type": 0,
+ },
+ },
+ },
+]
+`;
+
+exports[`yaml: exclude locales when using mixed locales 1`] = `
+[
+ {
+ "locale": "",
+ "resource": {
+ "en": {
+ "hello": {
+ "body": {
+ "end": 12,
+ "items": [
+ {
+ "end": 12,
+ "loc": {
+ "end": {
+ "column": 13,
+ "line": 1,
+ "offset": 12,
+ },
+ "start": {
+ "column": 1,
+ "line": 1,
+ "offset": 0,
+ },
+ },
+ "start": 0,
+ "type": 3,
+ },
+ ],
+ "loc": {
+ "end": {
+ "column": 13,
+ "line": 1,
+ "offset": 12,
+ },
+ "start": {
+ "column": 1,
+ "line": 1,
+ "offset": 0,
+ },
+ },
+ "start": 0,
+ "static": "hello world!",
+ "type": 2,
+ },
+ "end": 12,
+ "loc": {
+ "end": {
+ "column": 13,
+ "line": 1,
+ "offset": 12,
+ },
+ "source": "hello world!",
+ "start": {
+ "column": 1,
+ "line": 1,
+ "offset": 0,
+ },
+ },
+ "start": 0,
+ "type": 0,
+ },
+ },
+ },
+ },
+ {
+ "locale": "",
+ "resource": {},
+ },
+]
+`;
diff --git a/packages/unplugin-vue-i18n/test/__snapshots__/sourcemap.test.ts.rspack.snap b/packages/unplugin-vue-i18n/test/__snapshots__/sourcemap.test.ts.rspack.snap
new file mode 100644
index 00000000..904c94ee
--- /dev/null
+++ b/packages/unplugin-vue-i18n/test/__snapshots__/sourcemap.test.ts.rspack.snap
@@ -0,0 +1,7 @@
+// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
+
+exports[`resource files: json 1`] = `";;;;;;;;AAAA;AACA,cAAc,mCAAmC,SAAS,+BAA+B,QAAQ,iCAAiC,mBAAmB,uBAAuB,GAAG,GAAG,SAAS,GAAG,QAAQ,SAAS,mCAAmC,SAAS,+BAA+B,QAAQ,kCAAkC,WAAW,mCAAmC,SAAS,+BAA+B,QAAQ,kCAAkC,WAAW,mCAAmC,SAAS,+BAA+B,QAAQ,kCAAkC,aAAa,kCAAkC,SAAS,+BAA+B,QAAQ,gCAAgC,gBAAgB,QAAQ,mCAAmC,SAAS,+BAA+B,QAAQ,kCAAkC,sBAAsB,EAAE,EAAE,oCAAoC,SAAS,iCAAiC,QAAQ,kCAAkC,WAAW,oCAAoC,SAAS,iCAAiC,QAAQ,kCAAkC,WAAW,EAAE,oCAAoC,SAAS,iCAAiC,QAAQ,kCAAkC,kBAAkB,EAAE,EAAE,oCAAoC,SAAS,iCAAiC,QAAQ,kCAAkC,WAAW,oCAAoC,SAAS,iCAAiC,QAAQ,kCAAkC,WAA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EAAE;AACrpD;AACA,6DAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACHgB;AACG;;AAElC;AACA,kBAAkB,+CAAS;AAC3B,mBAAmB,oCAAO;AAC1B;;AAEA,6DAAe,+CAAS"`;
diff --git a/packages/unplugin-vue-i18n/test/vite/__snapshots__/sourcemap.test.ts.snap b/packages/unplugin-vue-i18n/test/__snapshots__/sourcemap.test.ts.vite.snap
similarity index 100%
rename from packages/unplugin-vue-i18n/test/vite/__snapshots__/sourcemap.test.ts.snap
rename to packages/unplugin-vue-i18n/test/__snapshots__/sourcemap.test.ts.vite.snap
diff --git a/packages/unplugin-vue-i18n/test/__snapshots__/sourcemap.test.ts.webpack.snap b/packages/unplugin-vue-i18n/test/__snapshots__/sourcemap.test.ts.webpack.snap
new file mode 100644
index 00000000..de569fb4
--- /dev/null
+++ b/packages/unplugin-vue-i18n/test/__snapshots__/sourcemap.test.ts.webpack.snap
@@ -0,0 +1,7 @@
+// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
+
+exports[`resource files: json 1`] = `";;;;;;;;;;;;;;AAAA;AACA,cAAc,mCAAmC,SAAS,+BAA+B,QAAQ,iCAAiC,mBAAmB,uBAAuB,GAAG,GAAG,SAAS,GAAG,QAAQ,SAAS,mCAAmC,SAAS,+BAA+B,QAAQ,kCAAkC,WAAW,mCAAmC,SAAS,+BAA+B,QAAQ,kCAAkC,WAAW,mCAAmC,SAAS,+BAA+B,QAAQ,kCAAkC,aAAa,kCAAkC,SAAS,+BAA+B,QAAQ,gCAAgC,gBAAgB,QAAQ,mCAAmC,SAAS,+BAA+B,QAAQ,kCAAkC,sBAAsB,EAAE,EAAE,oCAAoC,SAAS,iCAAiC,QAAQ,kCAAkC,WAAW,oCAAoC,SAAS,iCAAiC,QAAQ,kCAAkC,WAAW,EAAE,oCAAoC,SAAS,iCAAiC,QAAQ,kCAAkC,kBAAkB,EAAE,E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AA+B,QAAQ,kCAAkC,WAAW,mCAAmC,SAAS,+BAA+B,QAAQ,kCAAkC,aAAa,kCAAkC,SAAS,+BAA+B,QAAQ,gCAAgC,gBAAgB,QAAQ,mCAAmC,SAAS,+BAA+B,QAAQ,kCAAkC,sBAAsB,EAAE,EAAE,oCAAoC,SAAS,iCAAiC,QAAQ,kCAAkC,WAAW,oCAAoC,SAAS,iCAAiC,QAAQ,kCAAkC,WAAW,EAAE,oCAAoC,SAAS,iCAAiC,QAAQ,kCAAkC,kBAAkB,EAAE,EAAE,oCAAoC,SAAS,iCAAiC,QAAQ,kCAAkC,WAAW,oCAAoC,SAAS,iCAAiC,QAAQ,kCAAkC,WAAW,EAAE,oCAAoC,SAAS,iCAAiC,QAAQ,kCAAkC,mBAAmB,EAAE;AACrpD;AACA,iEAAe;;;;;;UCHf;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;;;;;;;;;ACN+B;AACG;;AAElC;AACA,kBAAkB,+CAAS;AAC3B,mBAAmB,oCAAO;AAC1B;;AAEA,iEAAe,+CAAS"`;
diff --git a/packages/unplugin-vue-i18n/test/vite/__snapshots__/translation-directive.test.ts.snap b/packages/unplugin-vue-i18n/test/__snapshots__/translation-directive.test.ts.vite.snap
similarity index 100%
rename from packages/unplugin-vue-i18n/test/vite/__snapshots__/translation-directive.test.ts.snap
rename to packages/unplugin-vue-i18n/test/__snapshots__/translation-directive.test.ts.vite.snap
diff --git a/packages/unplugin-vue-i18n/test/vite/bundle-import.test.ts b/packages/unplugin-vue-i18n/test/bundle-import.test.ts
similarity index 76%
rename from packages/unplugin-vue-i18n/test/vite/bundle-import.test.ts
rename to packages/unplugin-vue-i18n/test/bundle-import.test.ts
index 3e056b99..fe1b9773 100644
--- a/packages/unplugin-vue-i18n/test/vite/bundle-import.test.ts
+++ b/packages/unplugin-vue-i18n/test/bundle-import.test.ts
@@ -1,5 +1,5 @@
import { resolve } from 'pathe'
-import { bundleVite, bundleAndRun } from '../utils'
+import { bundleAndRun, getCurrentTestBundler, isTestFramework } from './utils'
import { createMessageContext, compile } from '@intlify/core-base'
import { expect, test } from 'vitest'
import type { MessageCompilerContext } from '@intlify/core-base'
@@ -10,15 +10,15 @@ import type { MessageCompilerContext } from '@intlify/core-base'
fixture: '@intlify/unplugin-vue-i18n/messages'
}
].forEach(({ testcase, input, fixture }) => {
- test(testcase, async () => {
+ test.skipIf(!isTestFramework('vite'))(testcase, async () => {
const options = {
input,
strictMessage: false,
- include: [resolve(__dirname, '../fixtures/locales/**')]
+ include: [resolve(__dirname, './fixtures/locales/**')]
}
const { exports: messages } = await bundleAndRun(
fixture,
- bundleVite,
+ getCurrentTestBundler(),
options
)
;['en', 'fr', 'ja', 'ko'].forEach(locale => {
diff --git a/packages/unplugin-vue-i18n/test/vite/custom-block.test.ts b/packages/unplugin-vue-i18n/test/custom-block.test.ts
similarity index 89%
rename from packages/unplugin-vue-i18n/test/vite/custom-block.test.ts
rename to packages/unplugin-vue-i18n/test/custom-block.test.ts
index 33a0f2fc..eff3ca49 100644
--- a/packages/unplugin-vue-i18n/test/vite/custom-block.test.ts
+++ b/packages/unplugin-vue-i18n/test/custom-block.test.ts
@@ -1,10 +1,12 @@
import { expect, test } from 'vitest'
-import { bundleVite, bundleAndRun } from '../utils'
+import { bundleAndRun, getCurrentTestBundler } from './utils'
import { createMessageContext, isMessageAST, compile } from '@intlify/core-base'
import type { MessageCompilerContext } from '@intlify/core-base'
+const bundler = getCurrentTestBundler()
+
test('basic', async () => {
- const { module } = await bundleAndRun('basic.vue', bundleVite)
+ const { module } = await bundleAndRun('basic.vue', bundler)
expect(module.__i18n).toMatchSnapshot()
const i18n = module.__i18n.pop()
@@ -14,7 +16,7 @@ test('basic', async () => {
})
test('json: exclude locales', async () => {
- const { module } = await bundleAndRun('basic.vue', bundleVite, {
+ const { module } = await bundleAndRun('basic.vue', bundler, {
onlyLocales: ['ja']
})
expect(module.__i18n).toMatchSnapshot()
@@ -24,7 +26,7 @@ test('json: exclude locales', async () => {
})
test('yaml: exclude locales', async () => {
- const { module } = await bundleAndRun('yaml.vue', bundleVite, {
+ const { module } = await bundleAndRun('yaml.vue', bundler, {
onlyLocales: ['ja']
})
expect(module.__i18n).toMatchSnapshot()
@@ -34,7 +36,7 @@ test('yaml: exclude locales', async () => {
})
test('json5: exclude locales', async () => {
- const { module } = await bundleAndRun('json5.vue', bundleVite, {
+ const { module } = await bundleAndRun('json5.vue', bundler, {
onlyLocales: ['ja']
})
expect(module.__i18n).toMatchSnapshot()
@@ -44,7 +46,7 @@ test('json5: exclude locales', async () => {
})
test('json: exclude locales when using mixed locales', async () => {
- const { module } = await bundleAndRun('locale-mix-json.vue', bundleVite, {
+ const { module } = await bundleAndRun('locale-mix-json.vue', bundler, {
onlyLocales: ['en']
})
expect(module.__i18n).toMatchSnapshot()
@@ -56,7 +58,7 @@ test('json: exclude locales when using mixed locales', async () => {
})
test('yaml: exclude locales when using mixed locales', async () => {
- const { module } = await bundleAndRun('locale-mix-yaml.vue', bundleVite, {
+ const { module } = await bundleAndRun('locale-mix-yaml.vue', bundler, {
onlyLocales: ['en']
})
expect(module.__i18n).toMatchSnapshot()
@@ -68,7 +70,7 @@ test('yaml: exclude locales when using mixed locales', async () => {
})
test('json5: exclude locales when using mixed locales', async () => {
- const { module } = await bundleAndRun('locale-mix.vue', bundleVite, {
+ const { module } = await bundleAndRun('locale-mix.vue', bundler, {
onlyLocales: ['en']
})
expect(module.__i18n).toMatchSnapshot()
@@ -80,7 +82,7 @@ test('json5: exclude locales when using mixed locales', async () => {
})
test('yaml', async () => {
- const { module } = await bundleAndRun('yaml.vue', bundleVite)
+ const { module } = await bundleAndRun('yaml.vue', bundler)
expect(module.__i18n).toMatchSnapshot()
let i18n = module.__i18n.pop()
@@ -99,7 +101,7 @@ test('yaml', async () => {
})
test('json5', async () => {
- const { module } = await bundleAndRun('json5.vue', bundleVite)
+ const { module } = await bundleAndRun('json5.vue', bundler)
expect(module.__i18n).toMatchSnapshot()
const i18n = module.__i18n.pop()
@@ -109,7 +111,7 @@ test('json5', async () => {
})
test('import', async () => {
- const { module } = await bundleAndRun('import.vue', bundleVite)
+ const { module } = await bundleAndRun('import.vue', bundler)
expect(module.__i18n).toMatchSnapshot()
const i18n = module.__i18n.pop()
@@ -119,7 +121,7 @@ test('import', async () => {
})
test('multiple', async () => {
- const { module } = await bundleAndRun('multiple.vue', bundleVite)
+ const { module } = await bundleAndRun('multiple.vue', bundler)
expect(module.__i18n).toMatchSnapshot()
expect(module.__i18n.length).toEqual(2)
@@ -135,7 +137,7 @@ test('multiple', async () => {
})
test('locale attr', async () => {
- const { module } = await bundleAndRun('locale.vue', bundleVite)
+ const { module } = await bundleAndRun('locale.vue', bundler)
expect(module.__i18n).toMatchSnapshot()
const i18n = module.__i18n.pop()
@@ -147,7 +149,7 @@ test('locale attr', async () => {
})
test('locale attr and basic', async () => {
- const { module } = await bundleAndRun('locale-mix.vue', bundleVite)
+ const { module } = await bundleAndRun('locale-mix.vue', bundler)
expect(module.__i18n).toMatchSnapshot()
let i18n = module.__i18n.pop()
@@ -164,7 +166,7 @@ test('locale attr and basic', async () => {
})
test('locale attr and import', async () => {
- const { module } = await bundleAndRun('locale-import.vue', bundleVite)
+ const { module } = await bundleAndRun('locale-import.vue', bundler)
expect(module.__i18n).toMatchSnapshot()
const i18n = module.__i18n.pop()
@@ -176,7 +178,7 @@ test('locale attr and import', async () => {
})
test('special characters', async () => {
- const { module } = await bundleAndRun('special-char.vue', bundleVite)
+ const { module } = await bundleAndRun('special-char.vue', bundler)
expect(module.__i18n).toMatchSnapshot()
const i18n = module.__i18n.pop()
@@ -186,7 +188,7 @@ test('special characters', async () => {
})
test('global', async () => {
- const { module } = await bundleAndRun('global-mix.vue', bundleVite)
+ const { module } = await bundleAndRun('global-mix.vue', bundler)
expect(module.__i18n).toMatchSnapshot()
expect(module.__i18nGlobal).toMatchSnapshot()
@@ -204,7 +206,7 @@ test('global', async () => {
})
test('default lang', async () => {
- const { module } = await bundleAndRun('default-lang.vue', bundleVite, {
+ const { module } = await bundleAndRun('default-lang.vue', bundler, {
defaultSFCLang: 'yml'
})
expect(module.__i18n).toMatchSnapshot()
@@ -215,7 +217,7 @@ test('default lang', async () => {
})
test('default lang and global scope', async () => {
- const { module } = await bundleAndRun('default-lang.vue', bundleVite, {
+ const { module } = await bundleAndRun('default-lang.vue', bundler, {
defaultSFCLang: 'yml',
globalSFCScope: true
})
@@ -227,7 +229,7 @@ test('default lang and global scope', async () => {
})
test('global scope and import', async () => {
- const { module } = await bundleAndRun('global-scope-import.vue', bundleVite, {
+ const { module } = await bundleAndRun('global-scope-import.vue', bundler, {
globalSFCScope: true
})
expect(module.__i18nGlobal).toMatchSnapshot()
@@ -238,7 +240,7 @@ test('global scope and import', async () => {
})
test('array', async () => {
- const { module } = await bundleAndRun('array.vue', bundleVite)
+ const { module } = await bundleAndRun('array.vue', bundler)
expect(module.__i18n).toMatchSnapshot()
const i18n = module.__i18n.pop()
@@ -250,7 +252,7 @@ test('array', async () => {
})
test('AST', async () => {
- const { module } = await bundleAndRun('basic.vue', bundleVite, {
+ const { module } = await bundleAndRun('basic.vue', bundler, {
env: 'production'
})
expect(module.__i18n).toMatchSnapshot()
diff --git a/packages/unplugin-vue-i18n/test/vite/resource-compilation.test.ts b/packages/unplugin-vue-i18n/test/resource-compilation.test.ts
similarity index 77%
rename from packages/unplugin-vue-i18n/test/vite/resource-compilation.test.ts
rename to packages/unplugin-vue-i18n/test/resource-compilation.test.ts
index 344c4ca2..a6ea790e 100644
--- a/packages/unplugin-vue-i18n/test/vite/resource-compilation.test.ts
+++ b/packages/unplugin-vue-i18n/test/resource-compilation.test.ts
@@ -3,7 +3,7 @@ import { vi, expect, test, beforeEach, afterEach } from 'vitest'
import { compile, createMessageContext } from '@intlify/core-base'
import { assign, isFunction } from '@intlify/shared'
import { resolve } from 'pathe'
-import { bundleAndRun, bundleVite } from '../utils'
+import { bundleAndRun, getCurrentTestBundler, isTestFramework } from './utils'
let spyConsoleError: any
beforeEach(() => {
spyConsoleError = vi
@@ -16,65 +16,67 @@ afterEach(() => {
spyConsoleError.mockRestore()
})
+const bundler = getCurrentTestBundler()
+
const options = {
target: './fixtures/locales/',
- include: [resolve(__dirname, '../fixtures/locales/**')]
+ include: [resolve(__dirname, './fixtures/locales/**')]
}
test('json resource', async () => {
- const { module } = await bundleAndRun('ja.json', bundleVite, options)
+ const { module } = await bundleAndRun('ja.json', bundler, options)
const fn = compile(module.message, {} as MessageCompilerContext)
// expect(fn.source).toEqual(`@.caml:{'no apples'} | {0} apple | {n} apples`)
expect(fn(createMessageContext({ named: { n: 3 } }))).toEqual(`3 apples`)
})
test('json5 resource', async () => {
- const { module } = await bundleAndRun('en.json5', bundleVite, options)
+ const { module } = await bundleAndRun('en.json5', bundler, options)
const fn = compile(module.message, {} as MessageCompilerContext)
// expect(fn.source).toEqual(`@.caml:{'no apples'} | {0} apple | {n} apples`)
expect(fn(createMessageContext({ named: { n: 3 } }))).toEqual(`3 apples`)
})
test('yaml resource', async () => {
- const { module } = await bundleAndRun('ko.yaml', bundleVite, options)
+ const { module } = await bundleAndRun('ko.yaml', bundler, options)
const fn = compile(module.message, {} as MessageCompilerContext)
// expect(fn.source).toEqual(`@.caml:{'no apples'} | {0} apple | {n} apples`)
expect(fn(createMessageContext({ named: { n: 3 } }))).toEqual(`3 apples`)
})
test('yml resource', async () => {
- const { module } = await bundleAndRun('fr.yml', bundleVite, options)
+ const { module } = await bundleAndRun('fr.yml', bundler, options)
const fn = compile(module.message, {} as MessageCompilerContext)
// expect(fn.source).toEqual(`@.caml:{'no apples'} | {0} apple | {n} apples`)
expect(fn(createMessageContext({ named: { n: 3 } }))).toEqual(`3 apples`)
})
test('js resource', async () => {
- const { module } = await bundleAndRun('en-KK.mjs', bundleVite, options)
+ const { module } = await bundleAndRun('en-KK.mjs', bundler, options)
const fn = compile(module.message, {} as MessageCompilerContext)
// expect(fn.source).toEqual(`@.caml:{'no apples'} | {0} apple | {n} apples`)
expect(fn(createMessageContext({ named: { n: 3 } }))).toEqual(`3 apples`)
})
-test('ts resource', async () => {
- const { module } = await bundleAndRun('en-GB.ts', bundleVite, options)
+test.skipIf(!isTestFramework('vite'))('ts resource', async () => {
+ const { module } = await bundleAndRun('en-GB.ts', bundler, options)
const fn = compile(module.message, {} as MessageCompilerContext)
// expect(fn.source).toEqual(`@.caml:{'no apples'} | {0} apple | {n} apples`)
expect(fn(createMessageContext({ named: { n: 3 } }))).toEqual(`3 apples`)
})
test('dynamical resource with js / ts', async () => {
- const { module } = await bundleAndRun('ka-JP.ts', bundleVite, {
+ const { module } = await bundleAndRun('ka-JP.ts', bundler, {
allowDynamic: true,
...options
})
expect(isFunction(module)).toBe(true)
})
-test('strict message', async () => {
+test.skipIf(!isTestFramework('vite'))('strict message', async () => {
let occured = false
try {
- await bundleAndRun('html.json', bundleVite, {
+ await bundleAndRun('html.json', bundler, {
...options
})
} catch (_e) {
@@ -86,7 +88,7 @@ test('strict message', async () => {
test('escape message', async () => {
const { module } = await bundleAndRun(
'html.json',
- bundleVite,
+ bundler,
assign(options, {
strictMessage: false,
escapeHtml: true
diff --git a/packages/unplugin-vue-i18n/test/sourcemap.test.ts b/packages/unplugin-vue-i18n/test/sourcemap.test.ts
new file mode 100644
index 00000000..2f5be0f3
--- /dev/null
+++ b/packages/unplugin-vue-i18n/test/sourcemap.test.ts
@@ -0,0 +1,59 @@
+import { resolve } from 'pathe'
+import { expect, test } from 'vitest'
+import { bundleAndRun, getCurrentTestBundler, isTestFramework } from './utils'
+/**
+ * TODO:
+ * custom blocks source map cannot confirm fully supporting
+ * because, seem that vite does not support source map for custom blocks...
+ */
+
+const options = {
+ sourcemap: true,
+ target: './fixtures/locales/',
+ include: [resolve(__dirname, './fixtures/locales/**')]
+}
+
+const bundler = getCurrentTestBundler()
+
+test('resource files: json', async () => {
+ const { map } = await bundleAndRun('ja.json', bundler, options)
+ expect(map.mappings).toMatchSnapshot()
+})
+
+test('resource files: json5', async () => {
+ const { map } = await bundleAndRun('en.json5', bundler, options)
+ expect(map.mappings).toMatchSnapshot()
+})
+
+test('resource files: yaml', async () => {
+ const { map } = await bundleAndRun('ko.yaml', bundler, options)
+ expect(map.mappings).toMatchSnapshot()
+})
+
+test.skipIf(!isTestFramework('vite'))('custom blocks: json', async () => {
+ const { map } = await bundleAndRun('basic.vue', bundler, {
+ sourcemap: true
+ })
+ expect(map.mappings).toMatchSnapshot()
+})
+
+test.skipIf(!isTestFramework('vite'))('custom blocks: yaml', async () => {
+ const { map } = await bundleAndRun('yaml.vue', bundler, {
+ sourcemap: true
+ })
+ expect(map.mappings).toMatchSnapshot()
+})
+
+test.skipIf(!isTestFramework('vite'))('custom blocks: yml', async () => {
+ const { map } = await bundleAndRun('yml.vue', bundler, {
+ sourcemap: true
+ })
+ expect(map.mappings).toMatchSnapshot()
+})
+
+test.skipIf(!isTestFramework('vite'))('custom blocks: json5', async () => {
+ const { map } = await bundleAndRun('json5.vue', bundler, {
+ sourcemap: true
+ })
+ expect(map.mappings).toMatchSnapshot()
+})
diff --git a/packages/unplugin-vue-i18n/test/vite/translation-directive.test.ts b/packages/unplugin-vue-i18n/test/translation-directive.test.ts
similarity index 62%
rename from packages/unplugin-vue-i18n/test/vite/translation-directive.test.ts
rename to packages/unplugin-vue-i18n/test/translation-directive.test.ts
index e64579a2..85356135 100644
--- a/packages/unplugin-vue-i18n/test/vite/translation-directive.test.ts
+++ b/packages/unplugin-vue-i18n/test/translation-directive.test.ts
@@ -1,11 +1,13 @@
import fg from 'fast-glob'
import path from 'node:path'
import { describe, expect, test } from 'vitest'
-import { bundleVite, bundleAndRun } from '../utils'
+import { bundleAndRun, getCurrentTestBundler, isTestFramework } from './utils'
-describe('translation directive', async () => {
+const bundler = getCurrentTestBundler()
+
+describe.skipIf(!isTestFramework('vite'))('translation directive', async () => {
const fixtures = await fg(
- path.resolve(__dirname, '../fixtures/directives/*.vue')
+ path.resolve(__dirname, './fixtures/directives/*.vue')
)
fixtures.forEach(fixture => {
const filename = path.basename(fixture)
@@ -15,7 +17,7 @@ describe('translation directive', async () => {
target: './fixtures/directives/',
optimizeTranslationDirective: true
}
- const mod = await bundleAndRun(filename, bundleVite, options)
+ const mod = await bundleAndRun(filename, bundler, options)
const renderString = mod.module.render.toString() as string
expect(renderString).toMatchSnapshot()
})
diff --git a/packages/unplugin-vue-i18n/test/utils.ts b/packages/unplugin-vue-i18n/test/utils.ts
index d832efe9..c41d88bf 100644
--- a/packages/unplugin-vue-i18n/test/utils.ts
+++ b/packages/unplugin-vue-i18n/test/utils.ts
@@ -10,13 +10,15 @@ import webpack from 'webpack'
import merge from 'webpack-merge'
import vitePlugin from '../src/vite'
import webpackPlugin from '../src/webpack'
+import rspackPlugin from '../src/rspack'
import type { PluginOptions } from '../src/types'
+import rspack, { RspackOptions } from '@rspack/core'
let ignoreIds: string[] | null = null
type BundleResolve = {
- type: 'vite' | 'webpack'
+ type: 'vite' | 'webpack' | 'rspack'
code: string
map?: any
stats?: webpack.Stats
@@ -97,6 +99,23 @@ export async function bundleVite(
export function bundleWebpack(
fixture: string,
options: Record = {}
+) {
+ return bundleWebpackLike(fixture, webpackPlugin, webpack, 'webpack', options)
+}
+
+export function bundleRspack(
+ fixture: string,
+ options: Record = {}
+) {
+ return bundleWebpackLike(fixture, rspackPlugin, rspack, 'rspack', options)
+}
+
+export function bundleWebpackLike(
+ fixture: string,
+ pluginFn: typeof rspackPlugin | typeof webpackPlugin,
+ compilerFn: typeof rspack | typeof webpack,
+ framework: 'webpack' | 'rspack',
+ options: Record = {}
): Promise {
const VueLoader = (
options.vueLoader ? options.vueLoader : VueLoaderPlugin
@@ -111,7 +130,7 @@ export function bundleWebpack(
]
const sourcemap = isBoolean(options.sourcemap) || true
- const baseConfig: webpack.Configuration = {
+ const baseConfig: RspackOptions = {
mode: 'development',
devtool: sourcemap ? 'source-map' : false,
entry: resolve(__dirname, input),
@@ -132,19 +151,19 @@ export function bundleWebpack(
}
]
},
- plugins: [new VueLoader(), webpackPlugin({ include, ...options })]
+ plugins: [new VueLoader(), pluginFn({ include, ...options })]
}
// @ts-ignore
const config = merge({}, baseConfig)
// @ts-ignore
- const compiler = webpack(config)
+ const compiler = compilerFn(config)
const mfs = new memoryfs()
compiler.outputFileSystem = mfs
return new Promise((resolve, reject) => {
- compiler.run((err, stats: any) => {
+ compiler.run((err: Error, stats: any) => {
if (err) {
return reject(err)
}
@@ -152,7 +171,7 @@ export function bundleWebpack(
return reject(new Error(stats.toJson().errors.join(' | ')))
}
resolve({
- type: 'webpack',
+ type: framework,
code: mfs.readFileSync('/bundle.js').toString(),
map: JSON.parse(mfs.readFileSync('/bundle.js.map').toString()),
stats
@@ -161,6 +180,24 @@ export function bundleWebpack(
})
}
+export function isTestFramework(framework: 'vite' | 'webpack' | 'rspack') {
+ return getCurrentTestFramework() === framework
+}
+
+const bundlerMap = {
+ vite: bundleVite,
+ webpack: bundleWebpack,
+ rspack: bundleRspack
+}
+
+export function getCurrentTestFramework() {
+ return (process.env.TEST_FRAMEWORK as keyof typeof bundlerMap) || 'vite'
+}
+
+export function getCurrentTestBundler() {
+ return bundlerMap[getCurrentTestFramework()]
+}
+
export async function bundleAndRun(
fixture: string,
bundler: BundleFunction,
diff --git a/packages/unplugin-vue-i18n/test/vite/sourcemap.test.ts b/packages/unplugin-vue-i18n/test/vite/sourcemap.test.ts
deleted file mode 100644
index 512a8849..00000000
--- a/packages/unplugin-vue-i18n/test/vite/sourcemap.test.ts
+++ /dev/null
@@ -1,57 +0,0 @@
-import { resolve } from 'pathe'
-import { expect, test } from 'vitest'
-import { bundleVite, bundleAndRun } from '../utils'
-/**
- * TODO:
- * custom blocks source map cannot confirm fully supporting
- * because, seem that vite does not support source map for custom blocks...
- */
-
-const options = {
- sourcemap: true,
- target: './fixtures/locales/',
- include: [resolve(__dirname, '../fixtures/locales/**')]
-}
-
-test('resource files: json', async () => {
- const { map } = await bundleAndRun('ja.json', bundleVite, options)
- expect(map.mappings).toMatchSnapshot()
-})
-
-test('resource files: json5', async () => {
- const { map } = await bundleAndRun('en.json5', bundleVite, options)
- expect(map.mappings).toMatchSnapshot()
-})
-
-test('resource files: yaml', async () => {
- const { map } = await bundleAndRun('ko.yaml', bundleVite, options)
- expect(map.mappings).toMatchSnapshot()
-})
-
-test('custom blocks: json', async () => {
- const { map } = await bundleAndRun('basic.vue', bundleVite, {
- sourcemap: true
- })
- expect(map.mappings).toMatchSnapshot()
-})
-
-test('custom blocks: yaml', async () => {
- const { map } = await bundleAndRun('yaml.vue', bundleVite, {
- sourcemap: true
- })
- expect(map.mappings).toMatchSnapshot()
-})
-
-test('custom blocks: yml', async () => {
- const { map } = await bundleAndRun('yml.vue', bundleVite, {
- sourcemap: true
- })
- expect(map.mappings).toMatchSnapshot()
-})
-
-test('custom blocks: json5', async () => {
- const { map } = await bundleAndRun('json5.vue', bundleVite, {
- sourcemap: true
- })
- expect(map.mappings).toMatchSnapshot()
-})
diff --git a/packages/unplugin-vue-i18n/test/webpack/__snapshots__/sourcemap.test.ts.snap b/packages/unplugin-vue-i18n/test/webpack/__snapshots__/sourcemap.test.ts.snap
deleted file mode 100644
index b09a4297..00000000
--- a/packages/unplugin-vue-i18n/test/webpack/__snapshots__/sourcemap.test.ts.snap
+++ /dev/null
@@ -1,15 +0,0 @@
-// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
-
-exports[`custom blocks: json 1`] = `";;;;;;;;;;AAAa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D;AACA;AACA,kBAAe;AACf;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AEVkE;AAClE;AACA;AACA,CAAuE;AACvE,WAAW,yF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AAS,mCAAmC,SAAS,+BAA+B,QAAQ,kCAAkC,WAAW,mCAAmC,SAAS,+BAA+B,QAAQ,kCAAkC,WAAW,mCAAmC,SAAS,+BAA+B,QAAQ,kCAAkC,aAAa,kCAAkC,SAAS,+BAA+B,QAAQ,gCAAgC,gBAAgB,QAAQ,mCAAmC,SAAS,+BAA+B,QAAQ,kCAAkC,sBAAsB,EAAE,EAAE,oCAAoC,SAAS,iCAAiC,QAAQ,kCAAkC,WAAW,oCAAoC,SAAS,iCAAiC,QAAQ,kCAAkC,WAAW,EAAE,oCAAoC,SAAS,iCAAiC,QAAQ,kCAAkC,kBAAkB,EAAE,EAAE,oCAAoC,SAAS,iCAAiC,QAAQ,kCAAkC,WAAW,oCAAoC,SAAS,iCAAiC,QAAQ,kCAAkC,WAAW,EAAE,oCAAoC,SAAS,iCAAiC,QAAQ,kCAAkC,mBAAmB,EAAE;AACrpD;AACA,iEAAe;;;;;;UCHf;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;;;;;;;;;ACN+B;AACG;;AAElC;AACA,kBAAkB,+CAAS;AAC3B,mBAAmB,oCAAO;AAC1B;;AAEA,iEAAe,+CAAS"`;
diff --git a/packages/unplugin-vue-i18n/test/webpack/bundle-import.test.ts b/packages/unplugin-vue-i18n/test/webpack/bundle-import.test.ts
deleted file mode 100644
index 5a3b2ef1..00000000
--- a/packages/unplugin-vue-i18n/test/webpack/bundle-import.test.ts
+++ /dev/null
@@ -1,27 +0,0 @@
-import { createMessageContext } from '@intlify/core-base'
-import { resolve } from 'pathe'
-import { expect, test } from 'vitest'
-import { bundleAndRun, bundleWebpack } from '../utils'
-;[
- {
- testcase: 'import',
- input: './fixtures/bundle-messages.ts',
- fixture: '@intlify/unplugin-vue-i18n/messages'
- }
-].forEach(({ testcase, input, fixture }) => {
- test.skip(testcase, async () => {
- const options = {
- input,
- include: [resolve(__dirname, '../fixtures/locales/**')]
- }
- const { exports: messages } = await bundleAndRun(
- fixture,
- bundleWebpack,
- options
- )
- ;['en', 'fr', 'ja', 'ko'].forEach(locale => {
- const fn = messages[locale].message
- expect(fn(createMessageContext({ named: { n: 3 } }))).toEqual(`3 apples`)
- })
- })
-})
diff --git a/packages/unplugin-vue-i18n/test/webpack/custom-block.test.ts b/packages/unplugin-vue-i18n/test/webpack/custom-block.test.ts
deleted file mode 100644
index d9ab3087..00000000
--- a/packages/unplugin-vue-i18n/test/webpack/custom-block.test.ts
+++ /dev/null
@@ -1,187 +0,0 @@
-import { expect, test } from 'vitest'
-import { bundleWebpack, bundleAndRun } from '../utils'
-import { createMessageContext, compile } from '@intlify/core-base'
-import type { MessageCompilerContext } from '@intlify/core-base'
-
-test('basic', async () => {
- const { module } = await bundleAndRun('basic.vue', bundleWebpack)
- expect(module.__i18n).toMatchSnapshot()
-
- const i18n = module.__i18n.pop()
- expect(i18n.locale).toEqual('')
- const fn = compile(i18n.resource.en.hello, {} as MessageCompilerContext)
- expect(fn(createMessageContext())).toEqual('hello world!')
-})
-
-test('yaml', async () => {
- const { module } = await bundleAndRun('yaml.vue', bundleWebpack)
- expect(module.__i18n).toMatchSnapshot()
-
- let i18n = module.__i18n.pop()
- expect(i18n.locale).toEqual('ja')
- const fn1 = compile(i18n.resource.hello, {
- locale: i18n.locale
- } as MessageCompilerContext)
- expect(fn1(createMessageContext())).toEqual('こんにちは、世界!')
-
- i18n = module.__i18n.pop()
- expect(i18n.locale).toEqual('en')
- const fn2 = compile(i18n.resource.hello, {
- locale: i18n.locale
- } as MessageCompilerContext)
- expect(fn2(createMessageContext())).toEqual('hello world!')
-})
-
-test('json5', async () => {
- const { module } = await bundleAndRun('json5.vue', bundleWebpack)
- expect(module.__i18n).toMatchSnapshot()
-
- const i18n = module.__i18n.pop()
- expect(i18n.locale).toEqual('')
- const fn = compile(i18n.resource.en.hello, {} as MessageCompilerContext)
- expect(fn(createMessageContext())).toEqual('hello world!')
-})
-
-test('import', async () => {
- const { module } = await bundleAndRun('import.vue', bundleWebpack)
- expect(module.__i18n).toMatchSnapshot()
-
- const i18n = module.__i18n.pop()
- expect(i18n.locale).toEqual('')
- const fn = compile(i18n.resource.en.hello, {} as MessageCompilerContext)
- expect(fn(createMessageContext())).toEqual('hello world!')
-})
-
-test('multiple', async () => {
- const { module } = await bundleAndRun('multiple.vue', bundleWebpack)
- expect(module.__i18n).toMatchSnapshot()
- expect(module.__i18n.length).toEqual(2)
-
- let i18n = module.__i18n.pop()
- expect(i18n.locale).toEqual('')
- const fn1 = compile(i18n.resource.ja.hello, {} as MessageCompilerContext)
- expect(fn1(createMessageContext())).toEqual('こんにちは、世界!')
-
- i18n = module.__i18n.pop()
- expect(i18n.locale).toEqual('')
- const fn2 = compile(i18n.resource.en.hello, {} as MessageCompilerContext)
- expect(fn2(createMessageContext())).toEqual('hello world!')
-})
-
-test('locale attr', async () => {
- const { module } = await bundleAndRun('locale.vue', bundleWebpack)
- expect(module.__i18n).toMatchSnapshot()
-
- const i18n = module.__i18n.pop()
- expect(i18n.locale).toEqual('ja')
- const fn = compile(i18n.resource.hello, {
- locale: i18n.locale
- } as MessageCompilerContext)
- expect(fn(createMessageContext())).toEqual('こんにちは、世界!')
-})
-
-test('locale attr and basic', async () => {
- const { module } = await bundleAndRun('locale-mix.vue', bundleWebpack)
- expect(module.__i18n).toMatchSnapshot()
-
- let i18n = module.__i18n.pop()
- expect(i18n.locale).toEqual('ja')
- const fn1 = compile(i18n.resource.hello, {
- locale: i18n.locale
- } as MessageCompilerContext)
- expect(fn1(createMessageContext())).toEqual('こんにちは、世界!')
-
- i18n = module.__i18n.pop()
- expect(i18n.locale).toEqual('')
- const fn2 = compile(i18n.resource.en.hello, {} as MessageCompilerContext)
- expect(fn2(createMessageContext())).toEqual('hello world!')
-})
-
-test('locale attr and import', async () => {
- const { module } = await bundleAndRun('locale-import.vue', bundleWebpack)
- expect(module.__i18n).toMatchSnapshot()
-
- const i18n = module.__i18n.pop()
- expect(i18n.locale).toEqual('en')
- const fn = compile(i18n.resource.hello, {
- locale: i18n.locale
- } as MessageCompilerContext)
- expect(fn(createMessageContext())).toEqual('hello world!')
-})
-
-test('special characters', async () => {
- const { module } = await bundleAndRun('special-char.vue', bundleWebpack)
- expect(module.__i18n).toMatchSnapshot()
-
- const i18n = module.__i18n.pop()
- expect(i18n.locale).toEqual('')
- const fn = compile(i18n.resource.en.hello, {} as MessageCompilerContext)
- expect(fn(createMessageContext())).toEqual('hello\ngreat\t"world"')
-})
-
-test('global', async () => {
- const { module } = await bundleAndRun('global-mix.vue', bundleWebpack)
- expect(module.__i18n).toMatchSnapshot()
- expect(module.__i18nGlobal).toMatchSnapshot()
-
- const l = module.__i18n.pop()
- expect(l.locale).toEqual('ja')
- const fn1 = compile(l.resource.hello, {
- locale: l.locale
- } as MessageCompilerContext)
- expect(fn1(createMessageContext())).toEqual('hello local!')
-
- const g = module.__i18nGlobal.pop()
- expect(g.locale).toEqual('')
- const fn2 = compile(g.resource.en.hello, {
- locale: g.locale
- } as MessageCompilerContext)
- expect(fn2(createMessageContext())).toEqual('hello global!')
-})
-
-test('default lang', async () => {
- const { module } = await bundleAndRun('default-lang.vue', bundleWebpack, {
- defaultSFCLang: 'yml'
- })
- expect(module.__i18n).toMatchSnapshot()
- const l = module.__i18n.pop()
- const fn = compile(l.resource.en.hello, {} as MessageCompilerContext)
- expect(fn(createMessageContext())).toEqual('hello from defaults!')
-})
-
-test('default lang and global scope', async () => {
- const { module } = await bundleAndRun('default-lang.vue', bundleWebpack, {
- defaultSFCLang: 'yml',
- globalSFCScope: true
- })
- expect(module.__i18nGlobal).toMatchSnapshot()
- const g = module.__i18nGlobal.pop()
- const fn = compile(g.resource.en.hello, {} as MessageCompilerContext)
- expect(fn(createMessageContext())).toEqual('hello from defaults!')
-})
-
-test('global scope and import', async () => {
- const { module } = await bundleAndRun(
- 'global-scope-import.vue',
- bundleWebpack,
- {
- globalSFCScope: true
- }
- )
- expect(module.__i18nGlobal).toMatchSnapshot()
- const g = module.__i18nGlobal.pop()
- const fn = compile(g.resource.en.hello, {} as MessageCompilerContext)
- expect(fn(createMessageContext())).toEqual('hello world!')
-})
-
-test('array', async () => {
- const { module } = await bundleAndRun('array.vue', bundleWebpack)
- expect(module.__i18n).toMatchSnapshot()
-
- const i18n = module.__i18n.pop()
- expect(i18n.locale).toEqual('')
- const fn1 = compile(i18n.resource.en.foo[0][0], {} as MessageCompilerContext)
- const fn2 = compile(i18n.resource.en.foo[1], {} as MessageCompilerContext)
- expect(fn1(createMessageContext())).toEqual('bar')
- expect(fn2(createMessageContext())).toEqual('baz')
-})
diff --git a/packages/unplugin-vue-i18n/test/webpack/resource-compilation.test.ts b/packages/unplugin-vue-i18n/test/webpack/resource-compilation.test.ts
deleted file mode 100644
index 2d44c213..00000000
--- a/packages/unplugin-vue-i18n/test/webpack/resource-compilation.test.ts
+++ /dev/null
@@ -1,44 +0,0 @@
-import { resolve } from 'pathe'
-import { expect, test } from 'vitest'
-import { bundleWebpack, bundleAndRun } from '../utils'
-import { createMessageContext, compile } from '@intlify/core-base'
-import type { MessageCompilerContext } from '@intlify/core-base'
-// import { VueLoaderPlugin } from 'vue-loader17'
-
-const options = {
- target: './fixtures/locales',
- include: [resolve(__dirname, '../fixtures/locales/**')]
- // vueLoader: VueLoaderPlugin,
- // vueLoaderPath: resolve(
- // __dirname,
- // '../../../../node_modules/vue-loader17/dist/index.js'
- // )
-}
-
-test('json resource', async () => {
- const { module } = await bundleAndRun('ja.json', bundleWebpack, options)
- const fn = compile(module.message, {} as MessageCompilerContext)
- // expect(fn.source).toEqual(`@.caml:{'no apples'} | {0} apple | {n} apples`)
- expect(fn(createMessageContext({ named: { n: 3 } }))).toEqual(`3 apples`)
-})
-
-test('json5 resource', async () => {
- const { module } = await bundleAndRun('en.json5', bundleWebpack, options)
- const fn = compile(module.message, {} as MessageCompilerContext)
- // expect(fn.source).toEqual(`@.caml:{'no apples'} | {0} apple | {n} apples`)
- expect(fn(createMessageContext({ named: { n: 3 } }))).toEqual(`3 apples`)
-})
-
-test('yaml resource', async () => {
- const { module } = await bundleAndRun('ko.yaml', bundleWebpack, options)
- const fn = compile(module.message, {} as MessageCompilerContext)
- // expect(fn.source).toEqual(`@.caml:{'no apples'} | {0} apple | {n} apples`)
- expect(fn(createMessageContext({ named: { n: 3 } }))).toEqual(`3 apples`)
-})
-
-test('yml resource', async () => {
- const { module } = await bundleAndRun('fr.yml', bundleWebpack, options)
- const fn = compile(module.message, {} as MessageCompilerContext)
- // expect(fn.source).toEqual(`@.caml:{'no apples'} | {0} apple | {n} apples`)
- expect(fn(createMessageContext({ named: { n: 3 } }))).toEqual(`3 apples`)
-})
diff --git a/packages/unplugin-vue-i18n/test/webpack/sourcemap.test.ts b/packages/unplugin-vue-i18n/test/webpack/sourcemap.test.ts
deleted file mode 100644
index 4015f872..00000000
--- a/packages/unplugin-vue-i18n/test/webpack/sourcemap.test.ts
+++ /dev/null
@@ -1,65 +0,0 @@
-import { resolve } from 'pathe'
-import { expect, test } from 'vitest'
-import { bundleAndRun, bundleWebpack } from '../utils'
-
-const options = {
- sourcemap: true,
- target: './fixtures/locales/',
- include: [resolve(__dirname, '../fixtures/locales/**')]
-}
-
-test('resource files: json', async () => {
- const { map } = await bundleAndRun('ja.json', bundleWebpack, options)
- expect(map.mappings).toMatchSnapshot()
-})
-
-test('resource files: json5', async () => {
- const { map } = await bundleAndRun('en.json5', bundleWebpack, options)
- expect(map.mappings).toMatchSnapshot()
-})
-
-test('resource files: yaml', async () => {
- const { map } = await bundleAndRun('ko.yaml', bundleWebpack, options)
- expect(map.mappings).toMatchSnapshot()
-})
-;[
- {
- subject: 'custom blocks: json',
- test: async () => {
- const { map } = await bundleAndRun('basic.vue', bundleWebpack, {
- sourcemap: true
- })
- expect(map.mappings).toMatchSnapshot()
- }
- },
- {
- subject: 'custom blocks: yaml',
- test: async () => {
- const { map } = await bundleAndRun('yaml.vue', bundleWebpack, {
- sourcemap: true
- })
- expect(map.mappings).toMatchSnapshot()
- }
- },
- {
- subject: 'custom blocks: yml',
- test: async () => {
- const { map } = await bundleAndRun('yml.vue', bundleWebpack, {
- sourcemap: true
- })
- expect(map.mappings).toMatchSnapshot()
- }
- },
- {
- subject: 'custom blocks: json5',
- test: async () => {
- const { map } = await bundleAndRun('json5.vue', bundleWebpack, {
- sourcemap: true
- })
- expect(map.mappings).toMatchSnapshot()
- }
- }
-].forEach(item => {
- const _test = process.env.CI ? test : test.skip
- _test(item.subject, item.test)
-})
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index ddfb4227..4790e4fb 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -38,6 +38,12 @@ importers:
'@rollup/pluginutils':
specifier: ^4.1.0
version: 4.2.1
+ '@rspack/cli':
+ specifier: ^1.2.7
+ version: 1.2.7(@rspack/core@1.2.7)(@types/express@4.17.21)(debug@4.3.5)(webpack-cli@5.1.4)(webpack@5.92.0)
+ '@rspack/core':
+ specifier: ^1.2.7
+ version: 1.2.7
'@types/debug':
specifier: ^4.1.5
version: 4.1.12
@@ -166,7 +172,7 @@ importers:
version: 16.8.3(@vue/compiler-sfc@3.4.29)(vue@3.4.29(typescript@5.6.3))(webpack@5.92.0)
vue-loader15:
specifier: npm:vue-loader@15.11.1
- version: vue-loader@15.11.1(@vue/compiler-sfc@3.4.29)(css-loader@7.1.2(webpack@5.92.0))(lodash@4.17.21)(prettier@3.3.2)(vue-template-compiler@2.7.16)(webpack@5.92.0)
+ version: vue-loader@15.11.1(@vue/compiler-sfc@3.4.29)(css-loader@7.1.2(@rspack/core@1.2.7)(webpack@5.92.0))(lodash@4.17.21)(prettier@3.3.2)(vue-template-compiler@2.7.16)(webpack@5.92.0)
vue-loader17:
specifier: npm:vue-loader@17.4.2
version: vue-loader@17.4.2(@vue/compiler-sfc@3.4.29)(vue@3.4.29(typescript@5.6.3))(webpack@5.92.0)
@@ -236,16 +242,16 @@ importers:
version: 4.4.0(eslint@9.14.0(jiti@2.4.2))
'@intlify/bundle-utils':
specifier: ^10.0.0
- version: 10.0.0(petite-vue-i18n@9.13.1(vue@3.4.29(typescript@5.6.3)))(vue-i18n@9.13.1(vue@3.4.29(typescript@5.6.3)))
+ version: 10.0.0(vue-i18n@9.13.1(vue@3.4.29(typescript@5.6.3)))
'@intlify/shared':
specifier: latest
- version: 11.1.1
+ version: 11.1.2
'@intlify/vue-i18n-extensions':
specifier: ^8.0.0
- version: 8.0.0(@intlify/shared@11.1.1)(@vue/compiler-dom@3.4.29)(vue-i18n@9.13.1(vue@3.4.29(typescript@5.6.3)))(vue@3.4.29(typescript@5.6.3))
+ version: 8.0.0(@intlify/shared@11.1.2)(@vue/compiler-dom@3.4.29)(vue-i18n@9.13.1(vue@3.4.29(typescript@5.6.3)))(vue@3.4.29(typescript@5.6.3))
'@rollup/pluginutils':
specifier: ^5.1.0
- version: 5.1.0(rollup@4.34.8)
+ version: 5.1.0(rollup@3.29.4)
'@typescript-eslint/scope-manager':
specifier: ^8.13.0
version: 8.13.0
@@ -277,8 +283,8 @@ importers:
specifier: ^1.0.2
version: 1.2.0
unplugin:
- specifier: ^1.1.0
- version: 1.10.1
+ specifier: ^2.2.0
+ version: 2.2.0
vue:
specifier: ^3.4
version: 3.4.29(typescript@5.6.3)
@@ -928,8 +934,8 @@ packages:
resolution: {integrity: sha512-8tR1xe7ZEbkabTuE/tNhzpolygUn9OaYp9yuYAF4MgDNZg06C3Qny80bes2/e9/Wm3aVkPUlCw6WgU7mQd0yEg==}
engines: {node: '>= 16'}
- '@intlify/shared@11.1.1':
- resolution: {integrity: sha512-2kGiWoXaeV8HZlhU/Nml12oTbhv7j2ufsJ5vQaa0VTjzUmZVdd/nmKFRAOJ/FtjO90Qba5AnZDwsrY7ZND5udA==}
+ '@intlify/shared@11.1.2':
+ resolution: {integrity: sha512-dF2iMMy8P9uKVHV/20LA1ulFLL+MKSbfMiixSmn6fpwqzvix38OIc7ebgnFbBqElvghZCW9ACtzKTGKsTGTWGA==}
engines: {node: '>= 16'}
'@intlify/shared@9.13.1':
@@ -958,6 +964,10 @@ packages:
vue-i18n:
optional: true
+ '@isaacs/cliui@8.0.2':
+ resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==}
+ engines: {node: '>=12'}
+
'@jridgewell/gen-mapping@0.3.5':
resolution: {integrity: sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==}
engines: {node: '>=6.0.0'}
@@ -982,6 +992,24 @@ packages:
'@jridgewell/trace-mapping@0.3.25':
resolution: {integrity: sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==}
+ '@jsonjoy.com/base64@1.1.2':
+ resolution: {integrity: sha512-q6XAnWQDIMA3+FTiOYajoYqySkO+JSat0ytXGSuRdq9uXE7o92gzuQwQM14xaCRlBLGq3v5miDGC4vkVTn54xA==}
+ engines: {node: '>=10.0'}
+ peerDependencies:
+ tslib: '2'
+
+ '@jsonjoy.com/json-pack@1.1.1':
+ resolution: {integrity: sha512-osjeBqMJ2lb/j/M8NCPjs1ylqWIcTRTycIhVB5pt6LgzgeRSb0YRZ7j9RfA8wIUrsr/medIuhVyonXRZWLyfdw==}
+ engines: {node: '>=10.0'}
+ peerDependencies:
+ tslib: '2'
+
+ '@jsonjoy.com/util@1.5.0':
+ resolution: {integrity: sha512-ojoNsrIuPI9g6o8UxhraZQSyF2ByJanAY4cTFbc8Mf2AXEF4aQRGY1dJxyJpuyav8r9FGflEt/Ff3u5Nt6YMPA==}
+ engines: {node: '>=10.0'}
+ peerDependencies:
+ tslib: '2'
+
'@kazupon/eslint-config@0.22.0':
resolution: {integrity: sha512-qkYZ8C9b8BA3cBRRLBtEIePWyfRtTcyEKGpV3qgjDZpwsSwenZGNw/yiLOXTWEbmDUVc1zrD+RKdOew+UN3JYQ==}
engines: {node: '>= 20'}
@@ -1078,6 +1106,21 @@ packages:
'@leichtgewicht/ip-codec@2.0.5':
resolution: {integrity: sha512-Vo+PSpZG2/fmgmiNzYK9qWRh8h/CHrwD0mo1h1DzL4yzHNSfWYujGTYsWGreD000gcgmZ7K4Ys6Tx9TxtsKdDw==}
+ '@module-federation/error-codes@0.8.4':
+ resolution: {integrity: sha512-55LYmrDdKb4jt+qr8qE8U3al62ZANp3FhfVaNPOaAmdTh0jHdD8M3yf5HKFlr5xVkVO4eV/F/J2NCfpbh+pEXQ==}
+
+ '@module-federation/runtime-tools@0.8.4':
+ resolution: {integrity: sha512-fjVOsItJ1u5YY6E9FnS56UDwZgqEQUrWFnouRiPtK123LUuqUI9FH4redZoKWlE1PB0ir1Z3tnqy8eFYzPO38Q==}
+
+ '@module-federation/runtime@0.8.4':
+ resolution: {integrity: sha512-yZeZ7z2Rx4gv/0E97oLTF3V6N25vglmwXGgoeju/W2YjsFvWzVtCDI7zRRb0mJhU6+jmSM8jP1DeQGbea/AiZQ==}
+
+ '@module-federation/sdk@0.8.4':
+ resolution: {integrity: sha512-waABomIjg/5m1rPDBWYG4KUhS5r7OUUY7S+avpaVIY/tkPWB3ibRDKy2dNLLAMaLKq0u+B1qIdEp4NIWkqhqpg==}
+
+ '@module-federation/webpack-bundler-runtime@0.8.4':
+ resolution: {integrity: sha512-HggROJhvHPUX7uqBD/XlajGygMNM1DG0+4OAkk8MBQe4a18QzrRNzZt6XQbRTSG4OaEoyRWhQHvYD3Yps405tQ==}
+
'@napi-rs/wasm-runtime@0.2.7':
resolution: {integrity: sha512-5yximcFK5FNompXfJFoWanu5l8v1hNGqNHh9du1xETp9HWk/B/PzvchX55WYOPaIeNglG8++68AAiauBAtbnzw==}
@@ -1195,10 +1238,17 @@ packages:
'@oxc-project/types@0.51.0':
resolution: {integrity: sha512-rDHFQBU2lS0Fh1t1rgvSWK21OfgkzjIWqj+FKKRJueecgvdZ6hO+qqstwBy2v9lFhg2DPuaDdLyCXZNGwsKjMw==}
+ '@pkgjs/parseargs@0.11.0':
+ resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==}
+ engines: {node: '>=14'}
+
'@pkgr/core@0.1.1':
resolution: {integrity: sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==}
engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0}
+ '@polka/url@1.0.0-next.28':
+ resolution: {integrity: sha512-8LduaNlMZGwdZ6qWrKlfa+2M4gahzFkprZiAt2TF8uS0qQgBizKXpXURqvTJ4WtmupWxaLqjRb2UCTe72mu+Aw==}
+
'@rolldown/binding-darwin-arm64@1.0.0-beta.3':
resolution: {integrity: sha512-qB1ofY+09nDYYaEi5kVsjqy4cKsVPI9E5bkV46CRrQsTF/BBM29wpvaj8qTRQ41qwInFA5kmqnVVr35yfH7ddw==}
cpu: [arm64]
@@ -1531,6 +1581,86 @@ packages:
cpu: [x64]
os: [win32]
+ '@rspack/binding-darwin-arm64@1.2.7':
+ resolution: {integrity: sha512-dT5eSMTknZaI8Djmz8KnaWM68rjZuBZwsKyF144o+ZSJM55vgiNXyL0lQYB8mX9nR3Gck+jKuGUAT2W/EF/t5Q==}
+ cpu: [arm64]
+ os: [darwin]
+
+ '@rspack/binding-darwin-x64@1.2.7':
+ resolution: {integrity: sha512-5n8IhKBxH71d4BUIvyzTwSOAOKNneLPJwLIphSPNIbCMGjLI59/EVpxSQ/AAUfyMkqOs635NNCn0eGQVuzpI/w==}
+ cpu: [x64]
+ os: [darwin]
+
+ '@rspack/binding-linux-arm64-gnu@1.2.7':
+ resolution: {integrity: sha512-DTtFBJmgQQrVWjbklpgJDr3kE9Uf1fHsPh+1GVslsBuyn+o4O7JslrnjuVsQCYKoiEg0Lg4ZPQmwnhJLHssZ5A==}
+ cpu: [arm64]
+ os: [linux]
+
+ '@rspack/binding-linux-arm64-musl@1.2.7':
+ resolution: {integrity: sha512-01/OoQQF9eyDvRKkxj4DzCznfGZIvnzI8qOsrv+M7VBm8FLoKpb3hygXixaGQOXmNL42XTh61qjgm++fBu6aUA==}
+ cpu: [arm64]
+ os: [linux]
+
+ '@rspack/binding-linux-x64-gnu@1.2.7':
+ resolution: {integrity: sha512-lUOAUq0YSsofCXsP6XnlgfH0ZRDZ2X2XqXLXYjqf4xkSxCl5eBmE0EQYjAHF4zjUvU5rVx4a4bDLWv7+t3bOHg==}
+ cpu: [x64]
+ os: [linux]
+
+ '@rspack/binding-linux-x64-musl@1.2.7':
+ resolution: {integrity: sha512-ZrPXfgT30p4DlydYavaTHiluxHkWvZHt7K4q7qNyTfYYowG6jRGwWi/PATdugNICGv027Wsh5nzEO4o27Iuhwg==}
+ cpu: [x64]
+ os: [linux]
+
+ '@rspack/binding-win32-arm64-msvc@1.2.7':
+ resolution: {integrity: sha512-1OzzM+OUSWX39XYcDfxJ8bGX5vNNrRejCMGotBEdP+uQ3KMWCPz0G4KRc3QIjghaLIYk3ofd83hcfUxyk/2Xog==}
+ cpu: [arm64]
+ os: [win32]
+
+ '@rspack/binding-win32-ia32-msvc@1.2.7':
+ resolution: {integrity: sha512-VWlDCV9kDtijk9GK6ZtBQmYoVzKGpnrJB0iI3d2gIEa/2NwikJ89bLMFE4dFx8UNH3p/sSyb5pmPOQnbudFK7Q==}
+ cpu: [ia32]
+ os: [win32]
+
+ '@rspack/binding-win32-x64-msvc@1.2.7':
+ resolution: {integrity: sha512-l/sTdeMsQF1a1aB79cWykDNRZG6nkUA0biJo2/sEARP3ijdr8TuwUdirp2JRDmZfQJkoJnQ2un9y9qyW+TIZzA==}
+ cpu: [x64]
+ os: [win32]
+
+ '@rspack/binding@1.2.7':
+ resolution: {integrity: sha512-QH+kxkG0I9C6lmlwgBUDFsy24ihXMGG5lfiNtQilk4CyBN+AgSWFENcYrnkUaBioZAvMBznQLiccV3X0JeH9iQ==}
+
+ '@rspack/cli@1.2.7':
+ resolution: {integrity: sha512-nUUZuwnSEORqPcknhP+gkQh9YZqeOlmFKJA1YRnZ5QQkzugCehV+xzVjO+Ezd8R1CSMpqdAQq7+pFZ8rpaRymA==}
+ hasBin: true
+ peerDependencies:
+ '@rspack/core': ^1.0.0-alpha || ^1.x
+ '@rspack/tracing': ^1.x
+ peerDependenciesMeta:
+ '@rspack/tracing':
+ optional: true
+
+ '@rspack/core@1.2.7':
+ resolution: {integrity: sha512-Vg7ySflnqI1nNOBPd6VJkQozWADssxn3einbxa9OqDVAB+dGSj8qihTs6rlaTSewidoaYTGIAiTMHO2y+61qqQ==}
+ engines: {node: '>=16.0.0'}
+ peerDependencies:
+ '@rspack/tracing': ^1.x
+ '@swc/helpers': '>=0.5.1'
+ peerDependenciesMeta:
+ '@rspack/tracing':
+ optional: true
+ '@swc/helpers':
+ optional: true
+
+ '@rspack/dev-server@1.0.10':
+ resolution: {integrity: sha512-iDsEtP0jNHRm4LJxL00QFTlOuqkdxIFxnd69h0KrFadmtxAWiDLIe4vYdZXWF74w4MezsJFx6dB2nUM/Ok8utA==}
+ engines: {node: '>= 18.12.0'}
+ peerDependencies:
+ '@rspack/core': '*'
+
+ '@rspack/lite-tapable@1.0.1':
+ resolution: {integrity: sha512-VynGOEsVw2s8TAlLf/uESfrgfrq2+rcXB1muPJYBWbsm1Oa6r5qVQhjA5ggM6z/coYPrsVMgovl3Ff7Q7OCp1w==}
+ engines: {node: '>=16.0.0'}
+
'@rtsao/scc@1.1.0':
resolution: {integrity: sha512-zt6OdqaDoOnJ1ZYsCYGt9YmWzDXl4vQdKTyJev62gFhRGKdx7mcT54V9KIjg+d2wi9EXsPvAPKe7i7WjfVWB8g==}
@@ -1648,6 +1778,9 @@ packages:
'@types/retry@0.12.0':
resolution: {integrity: sha512-wWKOClTTiizcZhXnPY4wikVAwmdYHp8q6DmC+EJUzAMsycb7HB32Kh9RN4+0gExjmPmZSAQjgURXIGATPegAvA==}
+ '@types/retry@0.12.2':
+ resolution: {integrity: sha512-XISRgDJ2Tc5q4TRqvgJtzsRkFYNJzZrhTdtMoGVBttwzzQJkPnS3WWTFc7kuDRoPtPakl+T+OfdEUjYJj7Jbow==}
+
'@types/semver@7.5.8':
resolution: {integrity: sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==}
@@ -1936,6 +2069,10 @@ packages:
peerDependencies:
acorn: ^6.0.0 || ^7.0.0 || ^8.0.0
+ acorn-walk@8.3.4:
+ resolution: {integrity: sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==}
+ engines: {node: '>=0.4.0'}
+
acorn@8.12.0:
resolution: {integrity: sha512-RTvkC4w+KNXrM39/lWCUaG0IbRkWdCv7W/IOW9oU6SawyxulvkQy5HQPVTKxEjczcUvapcrw3cFx/60VN/NRNw==}
engines: {node: '>=0.4.0'}
@@ -2167,6 +2304,10 @@ packages:
resolution: {integrity: sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==}
engines: {node: '>=6'}
+ bundle-name@4.1.0:
+ resolution: {integrity: sha512-tjwM5exMg6BGRI+kNmTntNsvdZS1X8BFYS6tnJ2hdH0kVxM6/eVZ2xy+FqStSWvYmtfFMDLIxurorHwDKfDz5Q==}
+ engines: {node: '>=18'}
+
bytes@3.0.0:
resolution: {integrity: sha512-pMhOfFDPiv9t5jjIXkHosWmkSyQbvsgEVNkz0ERHbuLh2T/7j4Mqqpz523Fe8MVY89KC6Sh/QfS2sM+SjgFDcw==}
engines: {node: '>= 0.8'}
@@ -2201,6 +2342,9 @@ packages:
caniuse-lite@1.0.30001636:
resolution: {integrity: sha512-bMg2vmr8XBsbL6Lr0UHXy/21m84FTxDLWn2FSqMd5PrlbMxwJlQnC2YWYxVgp66PZE+BBNF2jYQUBKCo1FDeZg==}
+ caniuse-lite@1.0.30001702:
+ resolution: {integrity: sha512-LoPe/D7zioC0REI5W73PeR1e1MLCipRGq/VkovJnd6Df+QVqT+vT33OXCp8QUd7kA7RZrHWxb1B36OQKI/0gOA==}
+
ccount@2.0.1:
resolution: {integrity: sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==}
@@ -2569,6 +2713,10 @@ packages:
resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==}
engines: {node: '>= 8'}
+ cross-spawn@7.0.6:
+ resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==}
+ engines: {node: '>= 8'}
+
css-declaration-sorter@7.2.0:
resolution: {integrity: sha512-h70rUM+3PNFuaBDTLe8wF/cdWu+dOZmb7pJt8Z2sedYbAcQVQV/tEchueg3GWxwqS0cxtbxmaHEdkNACqcvsow==}
engines: {node: ^14 || ^16 || >=18}
@@ -2728,6 +2876,14 @@ packages:
resolution: {integrity: sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==}
engines: {node: '>=0.10.0'}
+ default-browser-id@5.0.0:
+ resolution: {integrity: sha512-A6p/pu/6fyBcA1TRz/GqWYPViplrftcW2gZC9q79ngNCKAeR/X3gcEdXQHl4KNXV+3wgIJ1CPkJQ3IHM6lcsyA==}
+ engines: {node: '>=18'}
+
+ default-browser@5.2.1:
+ resolution: {integrity: sha512-WY/3TUME0x3KPYdRRxEJJvXRHV4PyPoUsxtZa78lwItwRQRHhd2U9xOscaT/YTf8uCXIAjeJOFBVEh/7FtD8Xg==}
+ engines: {node: '>=18'}
+
default-gateway@6.0.3:
resolution: {integrity: sha512-fwSOJsbbNzZ/CUFpqFBqYfYNLj1NbMPm8MMCIzHjC83iSJRBEGmDUxU+WP661BaBQImeC2yHwXtz+P/O9o+XEg==}
engines: {node: '>= 10'}
@@ -2740,6 +2896,10 @@ packages:
resolution: {integrity: sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==}
engines: {node: '>=8'}
+ define-lazy-prop@3.0.0:
+ resolution: {integrity: sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg==}
+ engines: {node: '>=12'}
+
define-properties@1.2.1:
resolution: {integrity: sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==}
engines: {node: '>= 0.4'}
@@ -2805,6 +2965,9 @@ packages:
domutils@3.1.0:
resolution: {integrity: sha512-H78uMmQtI2AhgDJjWeQmHwJJ2bLPD3GMmO7Zja/ZZh84wkm+4ut+IUnUdRa8uCGX88DiVx1j6FRe1XfxEgjEZA==}
+ duplexer@0.1.2:
+ resolution: {integrity: sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==}
+
eastasianwidth@0.2.0:
resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==}
@@ -3146,6 +3309,10 @@ packages:
resolution: {integrity: sha512-UduyVP7TLB5IcAQl+OzLyLcS/l32W/GLg+AhHJ+ow40FOk2U3SAllPwR44v4vmdFwIWqpdwxxpQbF1n5ta9seA==}
engines: {node: ^14.18.0 || ^16.14.0 || >=18.0.0}
+ exit-hook@4.0.0:
+ resolution: {integrity: sha512-Fqs7ChZm72y40wKjOFXBKg7nJZvQJmewP5/7LtePDdnah/+FH9Hp5sgMujSCMPXlxOAW2//1jrW9pnsY7o20vQ==}
+ engines: {node: '>=18'}
+
expect-type@1.1.0:
resolution: {integrity: sha512-bFi65yM+xZgk+u/KRIpekdSYkTB5W1pEf0Lt8Q8Msh7b+eQ7LXVtIB1Bkm4fvclDEL1b2CZkMhv2mOeF8tMdkA==}
engines: {node: '>=12.0.0'}
@@ -3243,6 +3410,10 @@ packages:
for-each@0.3.3:
resolution: {integrity: sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==}
+ foreground-child@3.3.1:
+ resolution: {integrity: sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==}
+ engines: {node: '>=14'}
+
form-data@4.0.1:
resolution: {integrity: sha512-tzN8e4TX8+kkxGPK8D5u0FNmjPUjw3lwC9lSLxxoB/+GtsJG91CO8bSWy73APlgAZzZbXEYZJuxjkHH2w+Ezhw==}
engines: {node: '>= 6'}
@@ -3337,6 +3508,10 @@ packages:
glob-to-regexp@0.4.1:
resolution: {integrity: sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==}
+ glob@10.4.5:
+ resolution: {integrity: sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==}
+ hasBin: true
+
glob@7.2.3:
resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==}
deprecated: Glob versions prior to v9 are no longer supported
@@ -3389,6 +3564,10 @@ packages:
graphemer@1.4.0:
resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==}
+ gzip-size@6.0.0:
+ resolution: {integrity: sha512-ax7ZYomf6jqPTQ4+XCpUGyXKHk5WweS+e05MBO4/y3WJ5RkmPXNKvX+bx1behVILVwr6JSQvZAku021CHPXG3Q==}
+ engines: {node: '>=10'}
+
handle-thing@2.0.1:
resolution: {integrity: sha512-9Qn4yBxelxoh2Ow62nP+Ka/kMnOXRi8BXnRaUwezLNhqelnN49xKz4F/dPP8OYLxLxq6JDtZb2i9XznUQbNPTg==}
@@ -3509,6 +3688,10 @@ packages:
humanize-ms@1.2.1:
resolution: {integrity: sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==}
+ hyperdyperid@1.2.0:
+ resolution: {integrity: sha512-Y93lCzHYgGWdrJ66yIktxiaGULYc6oGiABxhcO5AufBeOyoIdZF7bIfLaOrbM0iGIOXQQgxxRrFEnb+Y6w1n4A==}
+ engines: {node: '>=10.18'}
+
iconv-lite@0.4.24:
resolution: {integrity: sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==}
engines: {node: '>=0.10.0'}
@@ -3628,6 +3811,11 @@ packages:
engines: {node: '>=8'}
hasBin: true
+ is-docker@3.0.0:
+ resolution: {integrity: sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ==}
+ engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
+ hasBin: true
+
is-extglob@2.1.1:
resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==}
engines: {node: '>=0.10.0'}
@@ -3648,6 +3836,11 @@ packages:
resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==}
engines: {node: '>=0.10.0'}
+ is-inside-container@1.0.0:
+ resolution: {integrity: sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA==}
+ engines: {node: '>=14.16'}
+ hasBin: true
+
is-lambda@1.0.1:
resolution: {integrity: sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ==}
@@ -3658,6 +3851,10 @@ packages:
resolution: {integrity: sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==}
engines: {node: '>= 0.4'}
+ is-network-error@1.1.0:
+ resolution: {integrity: sha512-tUdRRAnhT+OtCZR/LxZelH/C7QtjtFrTu5tXCA8pl55eTUElUHT+GPYV8MBMBvea/j+NxQqVt3LbWMRir7Gx9g==}
+ engines: {node: '>=16'}
+
is-number-object@1.0.7:
resolution: {integrity: sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==}
engines: {node: '>= 0.4'}
@@ -3719,6 +3916,10 @@ packages:
resolution: {integrity: sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==}
engines: {node: '>=8'}
+ is-wsl@3.1.0:
+ resolution: {integrity: sha512-UcVfVfaK4Sc4m7X3dUSoHoozQGBEFeDC+zVo06t98xe8CzHSZZBekNXH+tu0NalHolcJ/QAGqS46Hef7QXBIMw==}
+ engines: {node: '>=16'}
+
isarray@1.0.0:
resolution: {integrity: sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==}
@@ -3736,6 +3937,13 @@ packages:
resolution: {integrity: sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==}
engines: {node: '>=0.10.0'}
+ isomorphic-rslog@0.0.6:
+ resolution: {integrity: sha512-HM0q6XqQ93psDlqvuViNs/Ea3hAyGDkIdVAHlrEocjjAwGrs1fZ+EdQjS9eUPacnYB7Y8SoDdSY3H8p3ce205A==}
+ engines: {node: '>=14.17.6'}
+
+ jackspeak@3.4.3:
+ resolution: {integrity: sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==}
+
jest-worker@27.5.1:
resolution: {integrity: sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==}
engines: {node: '>= 10.13.0'}
@@ -3894,6 +4102,9 @@ packages:
loupe@3.1.2:
resolution: {integrity: sha512-23I4pFZHmAemUnz8WZXbYRSKYj801VDaNv9ETuMh7IrMc7VuVVSo+Z9iLE3ni30+U48iDWfi30d3twAXBYmnCg==}
+ lru-cache@10.4.3:
+ resolution: {integrity: sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==}
+
lru-cache@4.1.5:
resolution: {integrity: sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==}
@@ -3974,6 +4185,10 @@ packages:
resolution: {integrity: sha512-UERzLsxzllchadvbPs5aolHh65ISpKpM+ccLbOJ8/vvpBKmAWf+la7dXFy7Mr0ySHbdHrFv5kGFCUHHe6GFEmw==}
engines: {node: '>= 4.0.0'}
+ memfs@4.17.0:
+ resolution: {integrity: sha512-4eirfZ7thblFmqFjywlTmuWVSvccHAJbn1r8qQLzmTO11qcqpohOjmY2mFce6x7x7WtskzRqApPD0hv+Oa74jg==}
+ engines: {node: '>= 4.0.0'}
+
memory-fs@0.5.0:
resolution: {integrity: sha512-jA0rdU5KoQMC0e6ppoNRtpp6vjFq6+NY7r8hywnC7V+1Xj/MtHwGIbB1QaK/dunyjWteJzmkpd7ooeWg10T7GA==}
engines: {node: '>=4.3.0 <5.0.0 || >=5.10'}
@@ -4168,6 +4383,10 @@ packages:
resolution: {integrity: sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==}
engines: {node: '>=8'}
+ minipass@7.1.2:
+ resolution: {integrity: sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==}
+ engines: {node: '>=16 || 14 >=14.17'}
+
minizlib@2.1.2:
resolution: {integrity: sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==}
engines: {node: '>= 8'}
@@ -4210,6 +4429,10 @@ packages:
resolution: {integrity: sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==}
engines: {node: '>=4'}
+ mrmime@1.0.1:
+ resolution: {integrity: sha512-hzzEagAgDyoU1Q6yg5uI+AorQgdvMCur3FcKf7NhMKWsaYg+RnbTyHRa/9IlLF9rf455MOCtcqqrQQ83pPP7Uw==}
+ engines: {node: '>=10'}
+
ms@2.0.0:
resolution: {integrity: sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==}
@@ -4332,6 +4555,10 @@ packages:
resolution: {integrity: sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==}
engines: {node: '>=12'}
+ open@10.1.0:
+ resolution: {integrity: sha512-mnkeQ1qP5Ue2wd+aivTD3NHd/lZ96Lu0jgf0pwktLPtx6cTZiH7tyeGRRHs0zX0rbrahXPnXlUnbeXyaBBuIaw==}
+ engines: {node: '>=18'}
+
open@8.4.2:
resolution: {integrity: sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ==}
engines: {node: '>=12'}
@@ -4375,10 +4602,17 @@ packages:
resolution: {integrity: sha512-312Id396EbJdvRONlngUx0NydfrIQ5lsYu0znKVUzVvArzEIt08V1qhtyESbGVd1FGX7UKtiFp5uwKZdM8wIuQ==}
engines: {node: '>=8'}
+ p-retry@6.2.1:
+ resolution: {integrity: sha512-hEt02O4hUct5wtwg4H4KcWgDdm+l1bOaEy/hWzd8xtXB9BqxTWBBhb+2ImAtH4Cv4rPjV76xN3Zumqk3k3AhhQ==}
+ engines: {node: '>=16.17'}
+
p-try@2.2.0:
resolution: {integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==}
engines: {node: '>=6'}
+ package-json-from-dist@1.0.1:
+ resolution: {integrity: sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==}
+
parent-module@1.0.1:
resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==}
engines: {node: '>=6'}
@@ -4429,6 +4663,10 @@ packages:
path-parse@1.0.7:
resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==}
+ path-scurry@1.11.1:
+ resolution: {integrity: sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==}
+ engines: {node: '>=16 || 14 >=14.18'}
+
path-to-regexp@0.1.7:
resolution: {integrity: sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==}
@@ -4900,6 +5138,10 @@ packages:
deprecated: Rimraf versions prior to v4 are no longer supported
hasBin: true
+ rimraf@5.0.10:
+ resolution: {integrity: sha512-l0OE8wL34P4nJH/H2ffoaniAokM2qSmrtXHmlpvYr5AVVX8msAyW0l8NVJFDxlSK4u3Uh/f41cQheDVdnYijwQ==}
+ hasBin: true
+
rolldown@1.0.0-beta.3:
resolution: {integrity: sha512-DBpF1K8tSwU/0dQ7zL9BYcje0/GjO5lgfdEW0rHHFfGjGDh8TBVNlokfEXtdt/IoJOiTdtySfsrgarLJkZmZTQ==}
hasBin: true
@@ -4947,6 +5189,10 @@ packages:
rrweb-cssom@0.7.1:
resolution: {integrity: sha512-TrEMa7JGdVm0UThDJSx7ddw5nVm3UJS9o9CCIZ72B1vSyEZoziDqBYP3XIoi/12lKrJR8rE3jeFHMok2F/Mnsg==}
+ run-applescript@7.0.0:
+ resolution: {integrity: sha512-9by4Ij99JUr/MCFBUkDKLWK3G9HVXmabKz9U5MlIAIuvuzkiOicRYs8XJLxX+xahD+mLiiCYDqF9dKAgtzKP1A==}
+ engines: {node: '>=18'}
+
run-parallel@1.2.0:
resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==}
@@ -5083,6 +5329,14 @@ packages:
signal-exit@3.0.7:
resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==}
+ signal-exit@4.1.0:
+ resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==}
+ engines: {node: '>=14'}
+
+ sirv@1.0.19:
+ resolution: {integrity: sha512-JuLThK3TnZG1TAKDwNIqNq6QA2afLOCcm+iE8D1Kj3GA40pSPsxQjjJl0J8X3tsR7T+CP1GavpzLwYkgVLWrZQ==}
+ engines: {node: '>= 10'}
+
sisteransi@1.0.5:
resolution: {integrity: sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==}
@@ -5327,6 +5581,12 @@ packages:
thenify@3.3.1:
resolution: {integrity: sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==}
+ thingies@1.21.0:
+ resolution: {integrity: sha512-hsqsJsFMsV+aD4s3CWKk85ep/3I9XzYV/IXaSouJMYIoDlgyi11cBhsqYe9/geRfB0YIikBQg6raRaM+nIMP9g==}
+ engines: {node: '>=10.18'}
+ peerDependencies:
+ tslib: ^2
+
thunky@1.1.0:
resolution: {integrity: sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA==}
@@ -5374,6 +5634,10 @@ packages:
resolution: {integrity: sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==}
engines: {node: '>=0.6'}
+ totalist@1.1.0:
+ resolution: {integrity: sha512-gduQwd1rOdDMGxFG1gEvhV88Oirdo2p+KjoYFU7k2g+i7n6AFFbDQ5kMPUsW0pNbfQsB/cwXvT1i4Bue0s9g5g==}
+ engines: {node: '>=6'}
+
tough-cookie@5.0.0:
resolution: {integrity: sha512-FRKsF7cz96xIIeMZ82ehjC3xW2E+O2+v11udrDYewUbszngYhsGa8z6YUMMzO9QJZzzyd0nGGXnML/TReX6W8Q==}
engines: {node: '>=16'}
@@ -5382,6 +5646,12 @@ packages:
resolution: {integrity: sha512-tk2G5R2KRwBd+ZN0zaEXpmzdKyOYksXwywulIX95MBODjSzMIuQnQ3m8JxgbhnL1LeVo7lqQKsYa1O3Htl7K5g==}
engines: {node: '>=18'}
+ tree-dump@1.0.2:
+ resolution: {integrity: sha512-dpev9ABuLWdEubk+cIaI9cHwRNNDjkBBLXTwI4UCUFdQ5xXKqNXoK4FEciw/vxf+NQ7Cb7sGUyeUtORvHIdRXQ==}
+ engines: {node: '>=10.0'}
+ peerDependencies:
+ tslib: '2'
+
ts-api-utils@1.3.0:
resolution: {integrity: sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==}
engines: {node: '>=16'}
@@ -5532,10 +5802,6 @@ packages:
resolution: {integrity: sha512-8U/MtpkPkkk3Atewj1+RcKIjb5WBimZ/WSLhhR3w6SsIj8XJuKTacSP8g+2JhfSGw0Cb125Y+2zA/IzJZDVbhA==}
engines: {node: '>=18.12.0'}
- unplugin@1.10.1:
- resolution: {integrity: sha512-d6Mhq8RJeGA8UfKCu54Um4lFA0eSaRa3XxdAJg8tIdxbu1ubW0hBCZUL7yI2uGyYCRndvbK8FLHzqy2XKfeMsg==}
- engines: {node: '>=14.0.0'}
-
unplugin@2.2.0:
resolution: {integrity: sha512-m1ekpSwuOT5hxkJeZGRxO7gXbXT3gF26NjQ7GdVHoLoF8/nopLcd/QfPigpCy7i51oFHiRJg/CyHhj4vs2+KGw==}
engines: {node: '>=18.12.0'}
@@ -5740,6 +6006,11 @@ packages:
resolution: {integrity: sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==}
engines: {node: '>=12'}
+ webpack-bundle-analyzer@4.6.1:
+ resolution: {integrity: sha512-oKz9Oz9j3rUciLNfpGFjOb49/jEpXNmWdVH8Ls//zNcnLlQdTGXQQMsBbb/gR7Zl8WNLxVCq+0Hqbx3zv6twBw==}
+ engines: {node: '>= 10.13.0'}
+ hasBin: true
+
webpack-cli@5.1.4:
resolution: {integrity: sha512-pIDJHIEI9LR0yxHXQ+Qh95k2EvXpWzZ5l+d+jIo+RdSm9MiHfzazIxwwni/p7+x4eJZuvG1AJwgC4TNQ7NRgsg==}
engines: {node: '>=14.15.0'}
@@ -5763,6 +6034,15 @@ packages:
peerDependencies:
webpack: ^4.0.0 || ^5.0.0
+ webpack-dev-middleware@7.4.2:
+ resolution: {integrity: sha512-xOO8n6eggxnwYpy1NlzUKpvrjfJTvae5/D6WOK0S2LSo7vjmo5gCM1DbLUmFqrMTJP+W/0YZNctm7jasWvLuBA==}
+ engines: {node: '>= 18.12.0'}
+ peerDependencies:
+ webpack: ^5.0.0
+ peerDependenciesMeta:
+ webpack:
+ optional: true
+
webpack-dev-server@4.15.2:
resolution: {integrity: sha512-0XavAZbNJ5sDrCbkpWL8mia0o5WPOd2YGtxrEiZkBK9FjLppIUK2TgxK6qGD2P3hUXTJNNPVibrerKcx5WkR1g==}
engines: {node: '>= 12.13.0'}
@@ -5776,6 +6056,19 @@ packages:
webpack-cli:
optional: true
+ webpack-dev-server@5.0.4:
+ resolution: {integrity: sha512-dljXhUgx3HqKP2d8J/fUMvhxGhzjeNVarDLcbO/EWMSgRizDkxHQDZQaLFL5VJY9tRBj2Gz+rvCEYYvhbqPHNA==}
+ engines: {node: '>= 18.12.0'}
+ hasBin: true
+ peerDependencies:
+ webpack: ^5.0.0
+ webpack-cli: '*'
+ peerDependenciesMeta:
+ webpack:
+ optional: true
+ webpack-cli:
+ optional: true
+
webpack-merge@5.10.0:
resolution: {integrity: sha512-+4zXKdx7UnO+1jaN4l2lHVD+mFvnlZQP/6ljaJVb4SZiwIKeUnrT5l0gkT8z+n4hKpC+jpOv6O9R+gLtag7pSA==}
engines: {node: '>=10.0.0'}
@@ -5865,6 +6158,18 @@ packages:
wrappy@1.0.2:
resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==}
+ ws@7.5.10:
+ resolution: {integrity: sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==}
+ engines: {node: '>=8.3.0'}
+ peerDependencies:
+ bufferutil: ^4.0.1
+ utf-8-validate: ^5.0.2
+ peerDependenciesMeta:
+ bufferutil:
+ optional: true
+ utf-8-validate:
+ optional: true
+
ws@8.17.1:
resolution: {integrity: sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==}
engines: {node: '>=10.0.0'}
@@ -6402,7 +6707,7 @@ snapshots:
'@humanwhocodes/retry@0.4.1': {}
- '@intlify/bundle-utils@10.0.0(petite-vue-i18n@9.13.1(vue@3.4.29(typescript@5.6.3)))(vue-i18n@9.13.1(vue@3.4.29(typescript@5.6.3)))':
+ '@intlify/bundle-utils@10.0.0(vue-i18n@9.13.1(vue@3.4.29(typescript@5.6.3)))':
dependencies:
'@intlify/message-compiler': 11.0.0-rc.1
'@intlify/shared': 11.0.0-rc.1
@@ -6414,7 +6719,6 @@ snapshots:
source-map-js: 1.2.1
yaml-eslint-parser: 1.2.3
optionalDependencies:
- petite-vue-i18n: 9.13.1(vue@3.4.29(typescript@5.6.3))
vue-i18n: 9.13.1(vue@3.4.29(typescript@5.6.3))
'@intlify/core-base@11.0.0-rc.1':
@@ -6439,7 +6743,7 @@ snapshots:
'@intlify/shared@11.0.0-rc.1': {}
- '@intlify/shared@11.1.1': {}
+ '@intlify/shared@11.1.2': {}
'@intlify/shared@9.13.1': {}
@@ -6448,15 +6752,24 @@ snapshots:
'@intlify/core-base': 9.13.1
'@intlify/shared': 9.13.1
- '@intlify/vue-i18n-extensions@8.0.0(@intlify/shared@11.1.1)(@vue/compiler-dom@3.4.29)(vue-i18n@9.13.1(vue@3.4.29(typescript@5.6.3)))(vue@3.4.29(typescript@5.6.3))':
+ '@intlify/vue-i18n-extensions@8.0.0(@intlify/shared@11.1.2)(@vue/compiler-dom@3.4.29)(vue-i18n@9.13.1(vue@3.4.29(typescript@5.6.3)))(vue@3.4.29(typescript@5.6.3))':
dependencies:
'@babel/parser': 7.24.7
optionalDependencies:
- '@intlify/shared': 11.1.1
+ '@intlify/shared': 11.1.2
'@vue/compiler-dom': 3.4.29
vue: 3.4.29(typescript@5.6.3)
vue-i18n: 9.13.1(vue@3.4.29(typescript@5.6.3))
+ '@isaacs/cliui@8.0.2':
+ dependencies:
+ string-width: 5.1.2
+ string-width-cjs: string-width@4.2.3
+ strip-ansi: 7.1.0
+ strip-ansi-cjs: strip-ansi@6.0.1
+ wrap-ansi: 8.1.0
+ wrap-ansi-cjs: wrap-ansi@7.0.0
+
'@jridgewell/gen-mapping@0.3.5':
dependencies:
'@jridgewell/set-array': 1.2.1
@@ -6481,6 +6794,22 @@ snapshots:
'@jridgewell/resolve-uri': 3.1.2
'@jridgewell/sourcemap-codec': 1.4.15
+ '@jsonjoy.com/base64@1.1.2(tslib@2.8.1)':
+ dependencies:
+ tslib: 2.8.1
+
+ '@jsonjoy.com/json-pack@1.1.1(tslib@2.8.1)':
+ dependencies:
+ '@jsonjoy.com/base64': 1.1.2(tslib@2.8.1)
+ '@jsonjoy.com/util': 1.5.0(tslib@2.8.1)
+ hyperdyperid: 1.2.0
+ thingies: 1.21.0(tslib@2.8.1)
+ tslib: 2.8.1
+
+ '@jsonjoy.com/util@1.5.0(tslib@2.8.1)':
+ dependencies:
+ tslib: 2.8.1
+
'@kazupon/eslint-config@0.22.0(vgi2do25ofpnhygoe2vausrklu)':
dependencies:
'@eslint-community/eslint-plugin-eslint-comments': 4.4.1(eslint@9.14.0(jiti@2.4.0))
@@ -6543,6 +6872,27 @@ snapshots:
'@leichtgewicht/ip-codec@2.0.5': {}
+ '@module-federation/error-codes@0.8.4': {}
+
+ '@module-federation/runtime-tools@0.8.4':
+ dependencies:
+ '@module-federation/runtime': 0.8.4
+ '@module-federation/webpack-bundler-runtime': 0.8.4
+
+ '@module-federation/runtime@0.8.4':
+ dependencies:
+ '@module-federation/error-codes': 0.8.4
+ '@module-federation/sdk': 0.8.4
+
+ '@module-federation/sdk@0.8.4':
+ dependencies:
+ isomorphic-rslog: 0.0.6
+
+ '@module-federation/webpack-bundler-runtime@0.8.4':
+ dependencies:
+ '@module-federation/runtime': 0.8.4
+ '@module-federation/sdk': 0.8.4
+
'@napi-rs/wasm-runtime@0.2.7':
dependencies:
'@emnapi/core': 1.3.1
@@ -6656,9 +7006,14 @@ snapshots:
'@oxc-project/types@0.51.0': {}
+ '@pkgjs/parseargs@0.11.0':
+ optional: true
+
'@pkgr/core@0.1.1':
optional: true
+ '@polka/url@1.0.0-next.28': {}
+
'@rolldown/binding-darwin-arm64@1.0.0-beta.3':
optional: true
@@ -6790,14 +7145,6 @@ snapshots:
optionalDependencies:
rollup: 3.29.4
- '@rollup/pluginutils@5.1.0(rollup@4.34.8)':
- dependencies:
- '@types/estree': 1.0.5
- estree-walker: 2.0.2
- picomatch: 2.3.1
- optionalDependencies:
- rollup: 4.34.8
-
'@rollup/rollup-android-arm-eabi@4.24.4':
optional: true
@@ -6909,6 +7256,95 @@ snapshots:
'@rollup/rollup-win32-x64-msvc@4.34.8':
optional: true
+ '@rspack/binding-darwin-arm64@1.2.7':
+ optional: true
+
+ '@rspack/binding-darwin-x64@1.2.7':
+ optional: true
+
+ '@rspack/binding-linux-arm64-gnu@1.2.7':
+ optional: true
+
+ '@rspack/binding-linux-arm64-musl@1.2.7':
+ optional: true
+
+ '@rspack/binding-linux-x64-gnu@1.2.7':
+ optional: true
+
+ '@rspack/binding-linux-x64-musl@1.2.7':
+ optional: true
+
+ '@rspack/binding-win32-arm64-msvc@1.2.7':
+ optional: true
+
+ '@rspack/binding-win32-ia32-msvc@1.2.7':
+ optional: true
+
+ '@rspack/binding-win32-x64-msvc@1.2.7':
+ optional: true
+
+ '@rspack/binding@1.2.7':
+ optionalDependencies:
+ '@rspack/binding-darwin-arm64': 1.2.7
+ '@rspack/binding-darwin-x64': 1.2.7
+ '@rspack/binding-linux-arm64-gnu': 1.2.7
+ '@rspack/binding-linux-arm64-musl': 1.2.7
+ '@rspack/binding-linux-x64-gnu': 1.2.7
+ '@rspack/binding-linux-x64-musl': 1.2.7
+ '@rspack/binding-win32-arm64-msvc': 1.2.7
+ '@rspack/binding-win32-ia32-msvc': 1.2.7
+ '@rspack/binding-win32-x64-msvc': 1.2.7
+
+ '@rspack/cli@1.2.7(@rspack/core@1.2.7)(@types/express@4.17.21)(debug@4.3.5)(webpack-cli@5.1.4)(webpack@5.92.0)':
+ dependencies:
+ '@discoveryjs/json-ext': 0.5.7
+ '@rspack/core': 1.2.7
+ '@rspack/dev-server': 1.0.10(@rspack/core@1.2.7)(@types/express@4.17.21)(debug@4.3.5)(webpack-cli@5.1.4)(webpack@5.92.0)
+ colorette: 2.0.20
+ exit-hook: 4.0.0
+ interpret: 3.1.1
+ rechoir: 0.8.0
+ webpack-bundle-analyzer: 4.6.1
+ yargs: 17.7.2
+ transitivePeerDependencies:
+ - '@types/express'
+ - bufferutil
+ - debug
+ - supports-color
+ - utf-8-validate
+ - webpack
+ - webpack-cli
+
+ '@rspack/core@1.2.7':
+ dependencies:
+ '@module-federation/runtime-tools': 0.8.4
+ '@rspack/binding': 1.2.7
+ '@rspack/lite-tapable': 1.0.1
+ caniuse-lite: 1.0.30001702
+
+ '@rspack/dev-server@1.0.10(@rspack/core@1.2.7)(@types/express@4.17.21)(debug@4.3.5)(webpack-cli@5.1.4)(webpack@5.92.0)':
+ dependencies:
+ '@rspack/core': 1.2.7
+ chokidar: 3.6.0
+ connect-history-api-fallback: 2.0.0
+ express: 4.19.2
+ http-proxy-middleware: 2.0.6(@types/express@4.17.21)(debug@4.3.5)
+ mime-types: 2.1.35
+ p-retry: 4.6.2
+ webpack-dev-middleware: 7.4.2(webpack@5.92.0)
+ webpack-dev-server: 5.0.4(debug@4.3.5)(webpack-cli@5.1.4)(webpack@5.92.0)
+ ws: 8.18.0
+ transitivePeerDependencies:
+ - '@types/express'
+ - bufferutil
+ - debug
+ - supports-color
+ - utf-8-validate
+ - webpack
+ - webpack-cli
+
+ '@rspack/lite-tapable@1.0.1': {}
+
'@rtsao/scc@1.1.0':
optional: true
@@ -7042,6 +7478,8 @@ snapshots:
'@types/retry@0.12.0': {}
+ '@types/retry@0.12.2': {}
+
'@types/semver@7.5.8': {}
'@types/send@0.17.4':
@@ -7488,11 +7926,11 @@ snapshots:
dependencies:
acorn: 8.12.0
- acorn-jsx@5.3.2(acorn@8.12.0):
+ acorn-jsx@5.3.2(acorn@8.14.0):
dependencies:
- acorn: 8.12.0
+ acorn: 8.14.0
- acorn-jsx@5.3.2(acorn@8.14.0):
+ acorn-walk@8.3.4:
dependencies:
acorn: 8.14.0
@@ -7758,6 +8196,10 @@ snapshots:
builtin-modules@3.3.0: {}
+ bundle-name@4.1.0:
+ dependencies:
+ run-applescript: 7.0.0
+
bytes@3.0.0: {}
bytes@3.1.2: {}
@@ -7809,6 +8251,8 @@ snapshots:
caniuse-lite@1.0.30001636: {}
+ caniuse-lite@1.0.30001702: {}
+
ccount@2.0.1:
optional: true
@@ -8031,11 +8475,17 @@ snapshots:
shebang-command: 2.0.0
which: 2.0.2
+ cross-spawn@7.0.6:
+ dependencies:
+ path-key: 3.1.1
+ shebang-command: 2.0.0
+ which: 2.0.2
+
css-declaration-sorter@7.2.0(postcss@8.4.38):
dependencies:
postcss: 8.4.38
- css-loader@7.1.2(webpack@5.92.0):
+ css-loader@7.1.2(@rspack/core@1.2.7)(webpack@5.92.0):
dependencies:
icss-utils: 5.1.0(postcss@8.4.47)
postcss: 8.4.47
@@ -8046,6 +8496,7 @@ snapshots:
postcss-value-parser: 4.2.0
semver: 7.6.3
optionalDependencies:
+ '@rspack/core': 1.2.7
webpack: 5.92.0(webpack-cli@5.1.4)
css-select@5.1.0:
@@ -8192,6 +8643,13 @@ snapshots:
deepmerge@4.3.1: {}
+ default-browser-id@5.0.0: {}
+
+ default-browser@5.2.1:
+ dependencies:
+ bundle-name: 4.1.0
+ default-browser-id: 5.0.0
+
default-gateway@6.0.3:
dependencies:
execa: 5.1.1
@@ -8204,6 +8662,8 @@ snapshots:
define-lazy-prop@2.0.0: {}
+ define-lazy-prop@3.0.0: {}
+
define-properties@1.2.1:
dependencies:
define-data-property: 1.1.4
@@ -8266,6 +8726,8 @@ snapshots:
domelementtype: 2.3.0
domhandler: 5.0.3
+ duplexer@0.1.2: {}
+
eastasianwidth@0.2.0: {}
ee-first@1.1.1: {}
@@ -8517,7 +8979,7 @@ snapshots:
eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@8.13.0(eslint@9.14.0(jiti@2.4.0))(typescript@5.6.3))(eslint-plugin-import@2.31.0)(eslint@9.14.0(jiti@2.4.0)):
dependencies:
'@nolyfill/is-core-module': 1.0.39
- debug: 4.3.7
+ debug: 4.4.0
enhanced-resolve: 5.17.0
eslint: 9.14.0(jiti@2.4.0)
eslint-module-utils: 2.12.0(@typescript-eslint/parser@8.13.0(eslint@9.14.0(jiti@2.4.0))(typescript@5.6.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.3)(eslint@9.14.0(jiti@2.4.0))
@@ -8581,7 +9043,7 @@ snapshots:
'@es-joy/jsdoccomment': 0.49.0
are-docs-informative: 0.0.2
comment-parser: 1.4.1
- debug: 4.3.7
+ debug: 4.4.0
escape-string-regexp: 4.0.0
eslint: 9.14.0(jiti@2.4.0)
espree: 10.3.0
@@ -8647,7 +9109,7 @@ snapshots:
eslint-plugin-yml@1.15.0(eslint@9.14.0(jiti@2.4.0)):
dependencies:
- debug: 4.3.7
+ debug: 4.4.0
eslint: 9.14.0(jiti@2.4.0)
eslint-compat-utils: 0.5.1(eslint@9.14.0(jiti@2.4.0))
lodash: 4.17.21
@@ -8769,8 +9231,8 @@ snapshots:
espree@9.6.1:
dependencies:
- acorn: 8.12.0
- acorn-jsx: 5.3.2(acorn@8.12.0)
+ acorn: 8.14.0
+ acorn-jsx: 5.3.2(acorn@8.14.0)
eslint-visitor-keys: 3.4.3
esprima@4.0.1: {}
@@ -8856,6 +9318,8 @@ snapshots:
signal-exit: 3.0.7
strip-final-newline: 3.0.0
+ exit-hook@4.0.0: {}
+
expect-type@1.1.0: {}
express@4.19.2:
@@ -8984,6 +9448,11 @@ snapshots:
is-callable: 1.2.7
optional: true
+ foreground-child@3.3.1:
+ dependencies:
+ cross-spawn: 7.0.6
+ signal-exit: 4.1.0
+
form-data@4.0.1:
dependencies:
asynckit: 0.4.0
@@ -9076,6 +9545,15 @@ snapshots:
glob-to-regexp@0.4.1: {}
+ glob@10.4.5:
+ dependencies:
+ foreground-child: 3.3.1
+ jackspeak: 3.4.3
+ minimatch: 9.0.4
+ minipass: 7.1.2
+ package-json-from-dist: 1.0.1
+ path-scurry: 1.11.1
+
glob@7.2.3:
dependencies:
fs.realpath: 1.0.0
@@ -9139,6 +9617,10 @@ snapshots:
graphemer@1.4.0: {}
+ gzip-size@6.0.0:
+ dependencies:
+ duplexer: 0.1.2
+
handle-thing@2.0.1: {}
has-bigints@1.0.2:
@@ -9269,6 +9751,8 @@ snapshots:
dependencies:
ms: 2.1.3
+ hyperdyperid@1.2.0: {}
+
iconv-lite@0.4.24:
dependencies:
safer-buffer: 2.1.2
@@ -9381,6 +9865,8 @@ snapshots:
is-docker@2.2.1: {}
+ is-docker@3.0.0: {}
+
is-extglob@2.1.1: {}
is-fullwidth-code-point@2.0.0: {}
@@ -9393,6 +9879,10 @@ snapshots:
dependencies:
is-extglob: 2.1.1
+ is-inside-container@1.0.0:
+ dependencies:
+ is-docker: 3.0.0
+
is-lambda@1.0.1: {}
is-module@1.0.0: {}
@@ -9400,6 +9890,8 @@ snapshots:
is-negative-zero@2.0.3:
optional: true
+ is-network-error@1.1.0: {}
+
is-number-object@1.0.7:
dependencies:
has-tostringtag: 1.0.2
@@ -9460,6 +9952,10 @@ snapshots:
dependencies:
is-docker: 2.2.1
+ is-wsl@3.1.0:
+ dependencies:
+ is-inside-container: 1.0.0
+
isarray@1.0.0: {}
isarray@2.0.5:
@@ -9471,6 +9967,14 @@ snapshots:
isobject@3.0.1: {}
+ isomorphic-rslog@0.0.6: {}
+
+ jackspeak@3.4.3:
+ dependencies:
+ '@isaacs/cliui': 8.0.2
+ optionalDependencies:
+ '@pkgjs/parseargs': 0.11.0
+
jest-worker@27.5.1:
dependencies:
'@types/node': 20.17.6
@@ -9645,6 +10149,8 @@ snapshots:
loupe@3.1.2: {}
+ lru-cache@10.4.3: {}
+
lru-cache@4.1.5:
dependencies:
pseudomap: 1.0.2
@@ -9825,6 +10331,13 @@ snapshots:
dependencies:
fs-monkey: 1.0.6
+ memfs@4.17.0:
+ dependencies:
+ '@jsonjoy.com/json-pack': 1.1.1(tslib@2.8.1)
+ '@jsonjoy.com/util': 1.5.0(tslib@2.8.1)
+ tree-dump: 1.0.2(tslib@2.8.1)
+ tslib: 2.8.1
+
memory-fs@0.5.0:
dependencies:
errno: 0.1.8
@@ -10043,7 +10556,7 @@ snapshots:
micromark@4.0.0:
dependencies:
'@types/debug': 4.1.12
- debug: 4.3.7
+ debug: 4.4.0
decode-named-character-reference: 1.0.2
devlop: 1.1.0
micromark-core-commonmark: 2.0.1
@@ -10141,6 +10654,8 @@ snapshots:
minipass@5.0.0: {}
+ minipass@7.1.2: {}
+
minizlib@2.1.2:
dependencies:
minipass: 3.3.6
@@ -10197,6 +10712,8 @@ snapshots:
mri@1.2.0: {}
+ mrmime@1.0.1: {}
+
ms@2.0.0: {}
ms@2.1.2: {}
@@ -10318,6 +10835,13 @@ snapshots:
dependencies:
mimic-fn: 4.0.0
+ open@10.1.0:
+ dependencies:
+ default-browser: 5.2.1
+ define-lazy-prop: 3.0.0
+ is-inside-container: 1.0.0
+ is-wsl: 3.1.0
+
open@8.4.2:
dependencies:
define-lazy-prop: 2.0.0
@@ -10375,8 +10899,16 @@ snapshots:
'@types/retry': 0.12.0
retry: 0.13.1
+ p-retry@6.2.1:
+ dependencies:
+ '@types/retry': 0.12.2
+ is-network-error: 1.1.0
+ retry: 0.13.1
+
p-try@2.2.0: {}
+ package-json-from-dist@1.0.1: {}
+
parent-module@1.0.1:
dependencies:
callsites: 3.1.0
@@ -10415,6 +10947,11 @@ snapshots:
path-parse@1.0.7: {}
+ path-scurry@1.11.1:
+ dependencies:
+ lru-cache: 10.4.3
+ minipass: 7.1.2
+
path-to-regexp@0.1.7: {}
path-to-regexp@2.2.1: {}
@@ -10842,6 +11379,10 @@ snapshots:
dependencies:
glob: 7.2.3
+ rimraf@5.0.10:
+ dependencies:
+ glob: 10.4.5
+
rolldown@1.0.0-beta.3(typescript@5.6.3):
dependencies:
'@oxc-project/types': 0.46.0
@@ -10951,6 +11492,8 @@ snapshots:
rrweb-cssom@0.7.1: {}
+ run-applescript@7.0.0: {}
+
run-parallel@1.2.0:
dependencies:
queue-microtask: 1.2.3
@@ -11143,6 +11686,14 @@ snapshots:
signal-exit@3.0.7: {}
+ signal-exit@4.1.0: {}
+
+ sirv@1.0.19:
+ dependencies:
+ '@polka/url': 1.0.0-next.28
+ mrmime: 1.0.1
+ totalist: 1.1.0
+
sisteransi@1.0.5: {}
slash@3.0.0: {}
@@ -11396,6 +11947,10 @@ snapshots:
dependencies:
any-promise: 1.3.0
+ thingies@1.21.0(tslib@2.8.1):
+ dependencies:
+ tslib: 2.8.1
+
thunky@1.1.0: {}
tiny-glob@0.2.9:
@@ -11432,6 +11987,8 @@ snapshots:
toidentifier@1.0.1: {}
+ totalist@1.1.0: {}
+
tough-cookie@5.0.0:
dependencies:
tldts: 6.1.58
@@ -11440,6 +11997,10 @@ snapshots:
dependencies:
punycode: 2.3.1
+ tree-dump@1.0.2(tslib@2.8.1):
+ dependencies:
+ tslib: 2.8.1
+
ts-api-utils@1.3.0(typescript@5.6.3):
dependencies:
typescript: 5.6.3
@@ -11474,8 +12035,7 @@ snapshots:
- supports-color
- typescript
- tslib@2.8.1:
- optional: true
+ tslib@2.8.1: {}
type-check@0.4.0:
dependencies:
@@ -11651,13 +12211,6 @@ snapshots:
pathe: 2.0.3
picomatch: 4.0.2
- unplugin@1.10.1:
- dependencies:
- acorn: 8.12.0
- chokidar: 3.6.0
- webpack-sources: 3.2.3
- webpack-virtual-modules: 0.6.2
-
unplugin@2.2.0:
dependencies:
acorn: 8.14.0
@@ -11767,7 +12320,7 @@ snapshots:
vue-eslint-parser@9.4.3(eslint@9.14.0(jiti@2.4.0)):
dependencies:
- debug: 4.3.7
+ debug: 4.4.0
eslint: 9.14.0(jiti@2.4.0)
eslint-scope: 7.2.2
eslint-visitor-keys: 3.4.3
@@ -11795,10 +12348,10 @@ snapshots:
'@vue/devtools-api': 6.6.3
vue: 3.4.29(typescript@5.6.3)
- vue-loader@15.11.1(@vue/compiler-sfc@3.4.29)(css-loader@7.1.2(webpack@5.92.0))(lodash@4.17.21)(prettier@3.3.2)(vue-template-compiler@2.7.16)(webpack@5.92.0):
+ vue-loader@15.11.1(@vue/compiler-sfc@3.4.29)(css-loader@7.1.2(@rspack/core@1.2.7)(webpack@5.92.0))(lodash@4.17.21)(prettier@3.3.2)(vue-template-compiler@2.7.16)(webpack@5.92.0):
dependencies:
'@vue/component-compiler-utils': 3.3.0(lodash@4.17.21)
- css-loader: 7.1.2(webpack@5.92.0)
+ css-loader: 7.1.2(@rspack/core@1.2.7)(webpack@5.92.0)
hash-sum: 1.0.2
loader-utils: 1.4.2
vue-hot-reload-api: 2.3.4
@@ -11925,6 +12478,21 @@ snapshots:
webidl-conversions@7.0.0: {}
+ webpack-bundle-analyzer@4.6.1:
+ dependencies:
+ acorn: 8.14.0
+ acorn-walk: 8.3.4
+ chalk: 4.1.2
+ commander: 7.2.0
+ gzip-size: 6.0.0
+ lodash: 4.17.21
+ opener: 1.5.2
+ sirv: 1.0.19
+ ws: 7.5.10
+ transitivePeerDependencies:
+ - bufferutil
+ - utf-8-validate
+
webpack-cli@5.1.4(webpack-dev-server@4.15.2)(webpack@5.92.0):
dependencies:
'@discoveryjs/json-ext': 0.5.7
@@ -11953,6 +12521,17 @@ snapshots:
schema-utils: 4.2.0
webpack: 5.92.0(webpack-cli@5.1.4)
+ webpack-dev-middleware@7.4.2(webpack@5.92.0):
+ dependencies:
+ colorette: 2.0.20
+ memfs: 4.17.0
+ mime-types: 2.1.35
+ on-finished: 2.4.1
+ range-parser: 1.2.1
+ schema-utils: 4.2.0
+ optionalDependencies:
+ webpack: 5.92.0(webpack-cli@5.1.4)
+
webpack-dev-server@4.15.2(debug@4.3.5)(webpack-cli@5.1.4)(webpack@5.92.0):
dependencies:
'@types/bonjour': 3.5.13
@@ -11994,6 +12573,47 @@ snapshots:
- supports-color
- utf-8-validate
+ webpack-dev-server@5.0.4(debug@4.3.5)(webpack-cli@5.1.4)(webpack@5.92.0):
+ dependencies:
+ '@types/bonjour': 3.5.13
+ '@types/connect-history-api-fallback': 1.5.4
+ '@types/express': 4.17.21
+ '@types/serve-index': 1.9.4
+ '@types/serve-static': 1.15.7
+ '@types/sockjs': 0.3.36
+ '@types/ws': 8.5.10
+ ansi-html-community: 0.0.8
+ bonjour-service: 1.2.1
+ chokidar: 3.6.0
+ colorette: 2.0.20
+ compression: 1.7.4
+ connect-history-api-fallback: 2.0.0
+ default-gateway: 6.0.3
+ express: 4.19.2
+ graceful-fs: 4.2.11
+ html-entities: 2.5.2
+ http-proxy-middleware: 2.0.6(@types/express@4.17.21)(debug@4.3.5)
+ ipaddr.js: 2.2.0
+ launch-editor: 2.7.0
+ open: 10.1.0
+ p-retry: 6.2.1
+ rimraf: 5.0.10
+ schema-utils: 4.2.0
+ selfsigned: 2.4.1
+ serve-index: 1.9.1
+ sockjs: 0.3.24
+ spdy: 4.0.2
+ webpack-dev-middleware: 7.4.2(webpack@5.92.0)
+ ws: 8.18.0
+ optionalDependencies:
+ webpack: 5.92.0(webpack-cli@5.1.4)
+ webpack-cli: 5.1.4(webpack-dev-server@4.15.2)(webpack@5.92.0)
+ transitivePeerDependencies:
+ - bufferutil
+ - debug
+ - supports-color
+ - utf-8-validate
+
webpack-merge@5.10.0:
dependencies:
clone-deep: 4.0.1
@@ -12113,6 +12733,8 @@ snapshots:
wrappy@1.0.2: {}
+ ws@7.5.10: {}
+
ws@8.17.1: {}
ws@8.18.0: {}
diff --git a/vitest.config.ts b/vitest.config.ts
index 6f80589a..d772a34d 100644
--- a/vitest.config.ts
+++ b/vitest.config.ts
@@ -1,5 +1,22 @@
+import { basename, dirname, join } from 'node:path'
import { defineConfig } from 'vitest/config'
+const resolveSnapshotPath = (testPath, extension) => {
+ // only split snapshots for unplugin-vue-i18n tests
+ if (testPath.includes('unplugin-vue-i18n/test')) {
+ const framework = '.' + process.env.TEST_FRAMEWORK || 'vite'
+ return join(
+ join(dirname(testPath), '__snapshots__'),
+ `${basename(testPath)}${framework}${extension}`
+ )
+ }
+
+ return join(
+ join(dirname(testPath), '__snapshots__'),
+ `${basename(testPath)}${extension}`
+ )
+}
+
export default defineConfig({
resolve: {
alias: {
@@ -8,6 +25,7 @@ export default defineConfig({
}
},
test: {
- globals: true
+ globals: true,
+ resolveSnapshotPath
}
})