@intlayer/vue-compiler 9.7.0 → 9.7.2
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/dist/cjs/_virtual/_rolldown/runtime.cjs +1 -2
- package/dist/cjs/extractVueFieldUsage.cjs +2 -3
- package/dist/cjs/index.cjs +2 -2
- package/dist/cjs/vue-intlayer-extract.cjs +4 -5
- package/dist/esm/extractVueFieldUsage.mjs +1 -2
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/vue-intlayer-extract.mjs +2 -3
- package/dist/types/extractVueFieldUsage.d.ts +0 -2
- package/dist/types/extractVueFieldUsage.d.ts.map +1 -1
- package/dist/types/vue-intlayer-extract.d.ts +1 -2
- package/dist/types/vue-intlayer-extract.d.ts.map +1 -1
- package/package.json +33 -33
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// \0rolldown/runtime.js
|
|
2
2
|
var __create = Object.create;
|
|
3
3
|
var __defProp = Object.defineProperty;
|
|
4
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -24,5 +24,4 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
24
24
|
enumerable: true
|
|
25
25
|
}) : target, mod));
|
|
26
26
|
|
|
27
|
-
//#endregion
|
|
28
27
|
exports.__toESM = __toESM;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_runtime = require(
|
|
2
|
+
const require_runtime = require("./_virtual/_rolldown/runtime.cjs");
|
|
3
3
|
let _vue_compiler_sfc = require("@vue/compiler-sfc");
|
|
4
4
|
_vue_compiler_sfc = require_runtime.__toESM(_vue_compiler_sfc);
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
// src/extractVueFieldUsage.ts
|
|
7
7
|
/**
|
|
8
8
|
* Extracts intlayer dictionary field usage from a Vue SFC for a set of
|
|
9
9
|
* plain variable bindings (i.e. `const content = useIntlayer('key')`).
|
|
@@ -96,6 +96,5 @@ const extractVueIntlayerFieldUsage = (code, plainVariables) => {
|
|
|
96
96
|
return result;
|
|
97
97
|
};
|
|
98
98
|
|
|
99
|
-
//#endregion
|
|
100
99
|
exports.extractVueIntlayerFieldUsage = extractVueIntlayerFieldUsage;
|
|
101
100
|
//# sourceMappingURL=extractVueFieldUsage.cjs.map
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const
|
|
3
|
-
const
|
|
2
|
+
const require_extractVueFieldUsage = require("./extractVueFieldUsage.cjs");
|
|
3
|
+
const require_vue_intlayer_extract = require("./vue-intlayer-extract.cjs");
|
|
4
4
|
|
|
5
5
|
exports.extractVueIntlayerFieldUsage = require_extractVueFieldUsage.extractVueIntlayerFieldUsage;
|
|
6
6
|
exports.intlayerVueExtract = require_vue_intlayer_extract.intlayerVueExtract;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_runtime = require(
|
|
2
|
+
const require_runtime = require("./_virtual/_rolldown/runtime.cjs");
|
|
3
|
+
let _vue_compiler_sfc = require("@vue/compiler-sfc");
|
|
4
|
+
_vue_compiler_sfc = require_runtime.__toESM(_vue_compiler_sfc);
|
|
3
5
|
let node_fs = require("node:fs");
|
|
4
6
|
let _babel_core = require("@babel/core");
|
|
5
7
|
let _intlayer_config_defaultValues = require("@intlayer/config/defaultValues");
|
|
6
|
-
let _vue_compiler_sfc = require("@vue/compiler-sfc");
|
|
7
|
-
_vue_compiler_sfc = require_runtime.__toESM(_vue_compiler_sfc);
|
|
8
8
|
let magic_string = require("magic-string");
|
|
9
9
|
magic_string = require_runtime.__toESM(magic_string);
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
// src/vue-intlayer-extract.ts
|
|
12
12
|
/**
|
|
13
13
|
* Detects whether the script block already contains a `useIntlayer` /
|
|
14
14
|
* `getIntlayer` call and, if so, whether its result is destructured.
|
|
@@ -296,7 +296,6 @@ const processVueFile = (filePath, _componentKey, packageName, tools, save = true
|
|
|
296
296
|
};
|
|
297
297
|
};
|
|
298
298
|
|
|
299
|
-
//#endregion
|
|
300
299
|
exports.intlayerVueExtract = intlayerVueExtract;
|
|
301
300
|
exports.processVueFile = processVueFile;
|
|
302
301
|
exports.shouldProcessFile = shouldProcessFile;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import vueSfc from "@vue/compiler-sfc";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/extractVueFieldUsage.ts
|
|
4
4
|
/**
|
|
5
5
|
* Extracts intlayer dictionary field usage from a Vue SFC for a set of
|
|
6
6
|
* plain variable bindings (i.e. `const content = useIntlayer('key')`).
|
|
@@ -93,6 +93,5 @@ const extractVueIntlayerFieldUsage = (code, plainVariables) => {
|
|
|
93
93
|
return result;
|
|
94
94
|
};
|
|
95
95
|
|
|
96
|
-
//#endregion
|
|
97
96
|
export { extractVueIntlayerFieldUsage };
|
|
98
97
|
//# sourceMappingURL=extractVueFieldUsage.mjs.map
|
package/dist/esm/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { intlayerVueExtract, processVueFile, shouldProcessFile } from "./vue-intlayer-extract.mjs";
|
|
2
1
|
import { extractVueIntlayerFieldUsage } from "./extractVueFieldUsage.mjs";
|
|
2
|
+
import { intlayerVueExtract, processVueFile, shouldProcessFile } from "./vue-intlayer-extract.mjs";
|
|
3
3
|
|
|
4
4
|
export { extractVueIntlayerFieldUsage, intlayerVueExtract, processVueFile, shouldProcessFile };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import vueSfc from "@vue/compiler-sfc";
|
|
1
2
|
import { readFileSync, writeFileSync } from "node:fs";
|
|
2
3
|
import { parseSync, traverse, types } from "@babel/core";
|
|
3
4
|
import { DEFAULT_LOCALE } from "@intlayer/config/defaultValues";
|
|
4
|
-
import vueSfc from "@vue/compiler-sfc";
|
|
5
5
|
import MagicString from "magic-string";
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
// src/vue-intlayer-extract.ts
|
|
8
8
|
/**
|
|
9
9
|
* Detects whether the script block already contains a `useIntlayer` /
|
|
10
10
|
* `getIntlayer` call and, if so, whether its result is destructured.
|
|
@@ -292,6 +292,5 @@ const processVueFile = (filePath, _componentKey, packageName, tools, save = true
|
|
|
292
292
|
};
|
|
293
293
|
};
|
|
294
294
|
|
|
295
|
-
//#endregion
|
|
296
295
|
export { intlayerVueExtract, processVueFile, shouldProcessFile };
|
|
297
296
|
//# sourceMappingURL=vue-intlayer-extract.mjs.map
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/extractVueFieldUsage.d.ts
|
|
2
1
|
/**
|
|
3
2
|
* Extracts intlayer dictionary field usage from a Vue SFC for a set of
|
|
4
3
|
* plain variable bindings (i.e. `const content = useIntlayer('key')`).
|
|
@@ -40,5 +39,4 @@ export type PlainVariableInfo = {
|
|
|
40
39
|
* map so the caller can fall back to `'all'`.
|
|
41
40
|
*/
|
|
42
41
|
export declare const extractVueIntlayerFieldUsage: (code: string, plainVariables: PlainVariableInfo[]) => Map<string, Set<string>>;
|
|
43
|
-
//#endregion
|
|
44
42
|
//# sourceMappingURL=extractVueFieldUsage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extractVueFieldUsage.d.ts","names":[],"sources":["../../src/extractVueFieldUsage.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"extractVueFieldUsage.d.ts","names":[],"sources":["../../src/extractVueFieldUsage.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;YAwDY;;EAEV;;EAEA;;;;;;;;;;;;qBAmDW,+BAA4B,cAC3B,gBACI,wBACf,YAAY"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Locale } from "@intlayer/types/allLocales";
|
|
2
|
-
//#region src/vue-intlayer-extract.d.ts
|
|
3
2
|
export type ExtractedContent = Record<string, string>;
|
|
4
3
|
export type ExtractResult = {
|
|
5
4
|
dictionaryKey: string;
|
|
@@ -36,5 +35,5 @@ export declare const processVueFile: (filePath: string, _componentKey: string, p
|
|
|
36
35
|
code: string;
|
|
37
36
|
map?: any;
|
|
38
37
|
} | null;
|
|
39
|
-
|
|
38
|
+
export {};
|
|
40
39
|
//# sourceMappingURL=vue-intlayer-extract.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vue-intlayer-extract.d.ts","names":[],"sources":["../../src/vue-intlayer-extract.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"vue-intlayer-extract.d.ts","names":[],"sources":["../../src/vue-intlayer-extract.ts"],"mappings":";YA8FY,mBAAmB;YAEnB;EACV;EACA;EACA,SAAS;EACT,QAAQ;;YAGE;EACV,gBAAgB;EAChB;EACA;EACA,iBAAiB;EACjB,aAAa,QAAQ;EACrB;EACA;EACA,gCAAgC;EAChC,eAAe,cAAc,cAAc;;qBAWhC,oBAAiB,8BACA;qBAoDjB,qBAAkB,cACjB,kBACI,UACP;EACN;EAAc;EAAe;;KAkX7B;EACH,cAAc,cAAc,cAAc;EAC1C,gBAAgB;EAChB,+BAA+B;EAC/B;EACA;;qBAGW,iBAAc,kBACT,uBACK,qBACF,OACZ,OAAK,gBACC;EAGb,kBAAkB;EAClB;EACA"}
|
package/package.json
CHANGED
|
@@ -1,26 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intlayer/vue-compiler",
|
|
3
|
-
"version": "9.7.
|
|
3
|
+
"version": "9.7.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Vite-compatible compiler plugin for Vue with Intlayer, providing HMR support, file transformation, and optimized dictionary loading for Vue applications.",
|
|
6
6
|
"keywords": [
|
|
7
|
-
"intlayer",
|
|
8
|
-
"vue",
|
|
9
|
-
"vite",
|
|
10
7
|
"compiler",
|
|
8
|
+
"hmr",
|
|
11
9
|
"i18n",
|
|
12
10
|
"internationalization",
|
|
13
|
-
"
|
|
14
|
-
"typescript"
|
|
11
|
+
"intlayer",
|
|
12
|
+
"typescript",
|
|
13
|
+
"vite",
|
|
14
|
+
"vue"
|
|
15
15
|
],
|
|
16
16
|
"homepage": "https://intlayer.org",
|
|
17
17
|
"bugs": {
|
|
18
18
|
"url": "https://github.com/aymericzip/intlayer/issues"
|
|
19
19
|
},
|
|
20
|
-
"repository": {
|
|
21
|
-
"type": "git",
|
|
22
|
-
"url": "git+https://github.com/aymericzip/intlayer.git"
|
|
23
|
-
},
|
|
24
20
|
"license": "Apache-2.0",
|
|
25
21
|
"author": {
|
|
26
22
|
"name": "Aymeric PINEAU",
|
|
@@ -33,15 +29,15 @@
|
|
|
33
29
|
"url": "https://github.com/aymericzip"
|
|
34
30
|
}
|
|
35
31
|
],
|
|
36
|
-
"
|
|
37
|
-
|
|
38
|
-
"
|
|
39
|
-
"types": "./dist/types/index.d.ts",
|
|
40
|
-
"require": "./dist/cjs/index.cjs",
|
|
41
|
-
"import": "./dist/esm/index.mjs"
|
|
42
|
-
},
|
|
43
|
-
"./package.json": "./package.json"
|
|
32
|
+
"repository": {
|
|
33
|
+
"type": "git",
|
|
34
|
+
"url": "git+https://github.com/aymericzip/intlayer.git"
|
|
44
35
|
},
|
|
36
|
+
"files": [
|
|
37
|
+
"./dist",
|
|
38
|
+
"./package.json"
|
|
39
|
+
],
|
|
40
|
+
"sideEffects": false,
|
|
45
41
|
"main": "dist/cjs/index.cjs",
|
|
46
42
|
"module": "dist/esm/index.mjs",
|
|
47
43
|
"types": "dist/types/index.d.ts",
|
|
@@ -52,19 +48,23 @@
|
|
|
52
48
|
]
|
|
53
49
|
}
|
|
54
50
|
},
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
|
|
58
|
-
|
|
51
|
+
"exports": {
|
|
52
|
+
".": {
|
|
53
|
+
"types": "./dist/types/index.d.ts",
|
|
54
|
+
"require": "./dist/cjs/index.cjs",
|
|
55
|
+
"import": "./dist/esm/index.mjs"
|
|
56
|
+
},
|
|
57
|
+
"./package.json": "./package.json"
|
|
58
|
+
},
|
|
59
59
|
"scripts": {
|
|
60
60
|
"build": "bun --bun tsdown --config tsdown.config.ts",
|
|
61
61
|
"build:ci": "bun --bun tsdown --config tsdown.config.ts",
|
|
62
62
|
"clean": "bun --bun rimraf ./dist .turbo",
|
|
63
63
|
"dev": "bun --bun tsdown --config tsdown.config.ts --watch",
|
|
64
|
-
"format": "
|
|
65
|
-
"format:fix": "
|
|
66
|
-
"lint": "
|
|
67
|
-
"lint:fix": "
|
|
64
|
+
"format": "oxfmt --check .",
|
|
65
|
+
"format:fix": "oxfmt .",
|
|
66
|
+
"lint": "oxlint .",
|
|
67
|
+
"lint:fix": "oxlint --fix .",
|
|
68
68
|
"prepublish": "cp -f ../../../README.md ./README.md",
|
|
69
69
|
"publish": "bun publish || true",
|
|
70
70
|
"publish:canary": "bun publish --access public --tag canary || true",
|
|
@@ -78,12 +78,12 @@
|
|
|
78
78
|
"watch": "webpack --config ./webpack.config.ts --watch"
|
|
79
79
|
},
|
|
80
80
|
"dependencies": {
|
|
81
|
-
"@babel/core": "8.0
|
|
82
|
-
"@intlayer/config": "9.
|
|
83
|
-
"@intlayer/types": "9.7.
|
|
81
|
+
"@babel/core": "8.1.0",
|
|
82
|
+
"@intlayer/config": "9.7.2",
|
|
83
|
+
"@intlayer/types": "9.7.2",
|
|
84
84
|
"@vue/compiler-sfc": ">=3.0.0",
|
|
85
85
|
"fast-glob": "3.3.3",
|
|
86
|
-
"magic-string": "1.4.
|
|
86
|
+
"magic-string": "1.4.5"
|
|
87
87
|
},
|
|
88
88
|
"devDependencies": {
|
|
89
89
|
"@types/babel__core": "7.20.5",
|
|
@@ -93,10 +93,10 @@
|
|
|
93
93
|
"@utils/ts-config": "1.0.4",
|
|
94
94
|
"@utils/ts-config-types": "1.0.4",
|
|
95
95
|
"@utils/tsdown-config": "1.0.4",
|
|
96
|
-
"rimraf": "6.1.
|
|
97
|
-
"tsdown": "0.23.
|
|
96
|
+
"rimraf": "6.1.4",
|
|
97
|
+
"tsdown": "0.23.7",
|
|
98
98
|
"typescript": "7.0.2",
|
|
99
|
-
"vitest": "5.0
|
|
99
|
+
"vitest": "5.1.0"
|
|
100
100
|
},
|
|
101
101
|
"peerDependencies": {
|
|
102
102
|
"@babel/core": ">=6.0.0",
|