@lingui/cli 4.8.0-next.0 → 4.8.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/README.md +1 -2
- package/dist/api/catalog/getCatalogs.js +3 -1
- package/dist/api/catalog.js +10 -8
- package/package.json +10 -10
package/README.md
CHANGED
|
@@ -60,7 +60,7 @@ node_modules/.bin/lingui compile
|
|
|
60
60
|
|
|
61
61
|
## Usage
|
|
62
62
|
|
|
63
|
-
See the [
|
|
63
|
+
See the [reference][reference] documentation.
|
|
64
64
|
|
|
65
65
|
## License
|
|
66
66
|
|
|
@@ -69,7 +69,6 @@ This package is licensed under [MIT][license] license.
|
|
|
69
69
|
[license]: https://github.com/lingui/js-lingui/blob/main/LICENSE
|
|
70
70
|
[linguijs]: https://github.com/lingui/js-lingui
|
|
71
71
|
[documentation]: https://lingui.dev
|
|
72
|
-
[tutorial]: https://lingui.dev/tutorials/cli
|
|
73
72
|
[reference]: https://lingui.dev/ref/cli
|
|
74
73
|
[package]: https://www.npmjs.com/package/@lingui/cli
|
|
75
74
|
[badge-downloads]: https://img.shields.io/npm/dw/@lingui/cli.svg
|
|
@@ -95,7 +95,9 @@ function getCatalogForFile(file, catalogs) {
|
|
|
95
95
|
const catalogGlob = (0, utils_1.replacePlaceholders)(catalogFile, { locale: "*" });
|
|
96
96
|
const matchPattern = (0, utils_1.normalizeRelativePath)(path_1.default.relative(catalog.config.rootDir, catalogGlob))
|
|
97
97
|
.replace("(", "\\(")
|
|
98
|
-
.replace(")", "\\)")
|
|
98
|
+
.replace(")", "\\)")
|
|
99
|
+
.replace("[", "\\[")
|
|
100
|
+
.replace("]", "\\]");
|
|
99
101
|
const match = micromatch_1.default.capture(matchPattern, (0, utils_1.normalizeRelativePath)(file));
|
|
100
102
|
if (match) {
|
|
101
103
|
return {
|
package/dist/api/catalog.js
CHANGED
|
@@ -134,14 +134,16 @@ class Catalog {
|
|
|
134
134
|
}
|
|
135
135
|
async writeCompiled(locale, compiledCatalog, namespace) {
|
|
136
136
|
let ext;
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
137
|
+
switch (namespace) {
|
|
138
|
+
case "es":
|
|
139
|
+
ext = "mjs";
|
|
140
|
+
break;
|
|
141
|
+
case "ts":
|
|
142
|
+
case "json":
|
|
143
|
+
ext = namespace;
|
|
144
|
+
break;
|
|
145
|
+
default:
|
|
146
|
+
ext = "js";
|
|
145
147
|
}
|
|
146
148
|
const filename = `${(0, utils_1.replacePlaceholders)(this.path, { locale })}.${ext}`;
|
|
147
149
|
await (0, utils_1.writeFile)(filename, compiledCatalog);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lingui/cli",
|
|
3
|
-
"version": "4.8.0
|
|
3
|
+
"version": "4.8.0",
|
|
4
4
|
"description": "CLI for working wit message catalogs",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cli",
|
|
@@ -53,18 +53,18 @@
|
|
|
53
53
|
"@babel/parser": "^7.21.2",
|
|
54
54
|
"@babel/runtime": "^7.21.0",
|
|
55
55
|
"@babel/types": "^7.21.2",
|
|
56
|
-
"@lingui/babel-plugin-extract-messages": "
|
|
57
|
-
"@lingui/conf": "
|
|
58
|
-
"@lingui/core": "
|
|
59
|
-
"@lingui/format-po": "
|
|
60
|
-
"@lingui/message-utils": "
|
|
56
|
+
"@lingui/babel-plugin-extract-messages": "4.8.0",
|
|
57
|
+
"@lingui/conf": "4.8.0",
|
|
58
|
+
"@lingui/core": "4.8.0",
|
|
59
|
+
"@lingui/format-po": "4.8.0",
|
|
60
|
+
"@lingui/message-utils": "4.8.0",
|
|
61
61
|
"babel-plugin-macros": "^3.0.1",
|
|
62
62
|
"chalk": "^4.1.0",
|
|
63
63
|
"chokidar": "3.5.1",
|
|
64
64
|
"cli-table": "0.3.6",
|
|
65
65
|
"commander": "^10.0.0",
|
|
66
66
|
"convert-source-map": "^2.0.0",
|
|
67
|
-
"date-fns": "^
|
|
67
|
+
"date-fns": "^3.6.0",
|
|
68
68
|
"esbuild": "^0.17.10",
|
|
69
69
|
"glob": "^7.1.4",
|
|
70
70
|
"inquirer": "^7.3.3",
|
|
@@ -79,8 +79,8 @@
|
|
|
79
79
|
"source-map": "^0.8.0-beta.0"
|
|
80
80
|
},
|
|
81
81
|
"devDependencies": {
|
|
82
|
-
"@lingui/jest-mocks": "
|
|
83
|
-
"@lingui/macro": "
|
|
82
|
+
"@lingui/jest-mocks": "*",
|
|
83
|
+
"@lingui/macro": "4.8.0",
|
|
84
84
|
"@types/convert-source-map": "^2.0.0",
|
|
85
85
|
"@types/glob": "^8.1.0",
|
|
86
86
|
"@types/micromatch": "^4.0.1",
|
|
@@ -88,5 +88,5 @@
|
|
|
88
88
|
"mock-fs": "^5.2.0",
|
|
89
89
|
"mockdate": "^3.0.5"
|
|
90
90
|
},
|
|
91
|
-
"gitHead": "
|
|
91
|
+
"gitHead": "1b3a1209b06e9a6b6820ce54064da87052c21fa5"
|
|
92
92
|
}
|