@intlify/unplugin-vue-i18n 5.3.0 → 6.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.cjs +12 -9
- package/lib/index.mjs +12 -9
- package/lib/vite.d.cts +1 -1
- package/lib/vite.d.ts +1 -1
- package/lib/webpack.d.cts +1 -1
- package/lib/webpack.d.ts +1 -1
- package/package.json +17 -13
- package/lib/types.cjs +0 -2
- package/lib/types.mjs +0 -1
package/lib/index.cjs
CHANGED
|
@@ -703,6 +703,7 @@ function directivePlugin({
|
|
|
703
703
|
}) {
|
|
704
704
|
let vuePlugin = null;
|
|
705
705
|
let vuePluginOptions = null;
|
|
706
|
+
const excludeLangs = ["pug", "jsx", "tsx"];
|
|
706
707
|
return {
|
|
707
708
|
name: resolveNamespace("directive"),
|
|
708
709
|
enforce: "pre",
|
|
@@ -729,16 +730,18 @@ function directivePlugin({
|
|
|
729
730
|
}
|
|
730
731
|
},
|
|
731
732
|
async transform(code, id) {
|
|
732
|
-
const { filename } = parseVueRequest(id);
|
|
733
|
-
if (vuePluginOptions == null) {
|
|
734
|
-
vuePluginOptions = getVuePluginOptions(vuePlugin);
|
|
735
|
-
}
|
|
736
733
|
if (id.endsWith(".vue")) {
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
vuePluginOptions
|
|
740
|
-
|
|
741
|
-
|
|
734
|
+
const { filename, query } = parseVueRequest(id);
|
|
735
|
+
if (!excludeLangs.includes(query.lang ?? "")) {
|
|
736
|
+
if (vuePluginOptions == null) {
|
|
737
|
+
vuePluginOptions = getVuePluginOptions(vuePlugin);
|
|
738
|
+
}
|
|
739
|
+
analyzeIdentifiers(
|
|
740
|
+
getDescriptor(filename, code, vuePluginOptions),
|
|
741
|
+
vuePluginOptions,
|
|
742
|
+
translationIdentifiers
|
|
743
|
+
);
|
|
744
|
+
}
|
|
742
745
|
}
|
|
743
746
|
return {
|
|
744
747
|
code,
|
package/lib/index.mjs
CHANGED
|
@@ -691,6 +691,7 @@ function directivePlugin({
|
|
|
691
691
|
}) {
|
|
692
692
|
let vuePlugin = null;
|
|
693
693
|
let vuePluginOptions = null;
|
|
694
|
+
const excludeLangs = ["pug", "jsx", "tsx"];
|
|
694
695
|
return {
|
|
695
696
|
name: resolveNamespace("directive"),
|
|
696
697
|
enforce: "pre",
|
|
@@ -717,16 +718,18 @@ function directivePlugin({
|
|
|
717
718
|
}
|
|
718
719
|
},
|
|
719
720
|
async transform(code, id) {
|
|
720
|
-
const { filename } = parseVueRequest(id);
|
|
721
|
-
if (vuePluginOptions == null) {
|
|
722
|
-
vuePluginOptions = getVuePluginOptions(vuePlugin);
|
|
723
|
-
}
|
|
724
721
|
if (id.endsWith(".vue")) {
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
vuePluginOptions
|
|
728
|
-
|
|
729
|
-
|
|
722
|
+
const { filename, query } = parseVueRequest(id);
|
|
723
|
+
if (!excludeLangs.includes(query.lang ?? "")) {
|
|
724
|
+
if (vuePluginOptions == null) {
|
|
725
|
+
vuePluginOptions = getVuePluginOptions(vuePlugin);
|
|
726
|
+
}
|
|
727
|
+
analyzeIdentifiers(
|
|
728
|
+
getDescriptor(filename, code, vuePluginOptions),
|
|
729
|
+
vuePluginOptions,
|
|
730
|
+
translationIdentifiers
|
|
731
|
+
);
|
|
732
|
+
}
|
|
730
733
|
}
|
|
731
734
|
return {
|
|
732
735
|
code,
|
package/lib/vite.d.cts
CHANGED
package/lib/vite.d.ts
CHANGED
package/lib/webpack.d.cts
CHANGED
package/lib/webpack.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intlify/unplugin-vue-i18n",
|
|
3
|
-
"
|
|
3
|
+
"type": "module",
|
|
4
|
+
"version": "6.0.0",
|
|
4
5
|
"description": "unplugin for Vue I18n",
|
|
5
6
|
"author": {
|
|
6
7
|
"name": "kazuya kawaguchi",
|
|
@@ -24,7 +25,7 @@
|
|
|
24
25
|
},
|
|
25
26
|
"dependencies": {
|
|
26
27
|
"@eslint-community/eslint-utils": "^4.4.0",
|
|
27
|
-
"@intlify/bundle-utils": "^
|
|
28
|
+
"@intlify/bundle-utils": "^10.0.0",
|
|
28
29
|
"@intlify/shared": "latest",
|
|
29
30
|
"@intlify/vue-i18n-extensions": "^7.0.0",
|
|
30
31
|
"@rollup/pluginutils": "^5.1.0",
|
|
@@ -41,7 +42,8 @@
|
|
|
41
42
|
"vue": "^3.4"
|
|
42
43
|
},
|
|
43
44
|
"devDependencies": {
|
|
44
|
-
"unbuild": "^2.0.0"
|
|
45
|
+
"unbuild": "^2.0.0",
|
|
46
|
+
"@types/node": "^20.14.8"
|
|
45
47
|
},
|
|
46
48
|
"engines": {
|
|
47
49
|
"node": ">= 18"
|
|
@@ -67,22 +69,24 @@
|
|
|
67
69
|
"types": "./index.d.ts",
|
|
68
70
|
"exports": {
|
|
69
71
|
".": {
|
|
70
|
-
"
|
|
71
|
-
"require": "./lib/index.cjs"
|
|
72
|
-
"import": "./lib/index.mjs"
|
|
72
|
+
"import": "./lib/index.mjs",
|
|
73
|
+
"require": "./lib/index.cjs"
|
|
73
74
|
},
|
|
74
75
|
"./vite": {
|
|
75
|
-
"
|
|
76
|
-
"require": "./lib/vite.cjs"
|
|
77
|
-
"import": "./lib/vite.mjs"
|
|
76
|
+
"import": "./lib/vite.mjs",
|
|
77
|
+
"require": "./lib/vite.cjs"
|
|
78
78
|
},
|
|
79
79
|
"./webpack": {
|
|
80
|
-
"
|
|
81
|
-
"require": "./lib/webpack.cjs"
|
|
82
|
-
"import": "./lib/webpack.mjs"
|
|
80
|
+
"import": "./lib/webpack.mjs",
|
|
81
|
+
"require": "./lib/webpack.cjs"
|
|
83
82
|
},
|
|
84
83
|
"./types": {
|
|
85
|
-
"
|
|
84
|
+
"import": {
|
|
85
|
+
"types": "./lib/types.d.mts"
|
|
86
|
+
},
|
|
87
|
+
"require": {
|
|
88
|
+
"types": "./lib/types.d.cts"
|
|
89
|
+
}
|
|
86
90
|
},
|
|
87
91
|
"./messages": {
|
|
88
92
|
"types": "./messages.d.ts"
|
package/lib/types.cjs
DELETED
package/lib/types.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|