@lingui/macro 4.0.0-next.4 → 4.0.0-next.5
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/index.cjs +3 -3
- package/dist/index.mjs +1 -1
- package/package.json +7 -6
package/dist/index.cjs
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
const babelPluginMacros = require('babel-plugin-macros');
|
|
4
4
|
const conf = require('@lingui/conf');
|
|
5
5
|
const types = require('@babel/types');
|
|
6
|
-
const
|
|
6
|
+
const generateMessageId = require('@lingui/message-utils/generateMessageId');
|
|
7
7
|
|
|
8
8
|
const metaOptions = ["id", "comment", "props"];
|
|
9
9
|
const escapedMetaOptionsRe = new RegExp(`^_(${metaOptions.join("|")})$`);
|
|
@@ -229,7 +229,7 @@ class MacroJs {
|
|
|
229
229
|
createIdProperty(message, context) {
|
|
230
230
|
return this.createObjectProperty(
|
|
231
231
|
ID,
|
|
232
|
-
this.types.stringLiteral(
|
|
232
|
+
this.types.stringLiteral(generateMessageId.generateMessageId(message, context))
|
|
233
233
|
);
|
|
234
234
|
}
|
|
235
235
|
createValuesProperty(values) {
|
|
@@ -467,7 +467,7 @@ class MacroJSX {
|
|
|
467
467
|
);
|
|
468
468
|
} else {
|
|
469
469
|
attributes.push(
|
|
470
|
-
this.createStringJsxAttribute(ID,
|
|
470
|
+
this.createStringJsxAttribute(ID, generateMessageId.generateMessageId(message, context))
|
|
471
471
|
);
|
|
472
472
|
}
|
|
473
473
|
if (!this.stripNonEssentialProps) {
|
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createMacro } from 'babel-plugin-macros';
|
|
2
2
|
import { getConfig as getConfig$1 } from '@lingui/conf';
|
|
3
3
|
import { isJSXEmptyExpression, isObjectProperty, isImportSpecifier, isIdentifier } from '@babel/types';
|
|
4
|
-
import { generateMessageId } from '@lingui/
|
|
4
|
+
import { generateMessageId } from '@lingui/message-utils/generateMessageId';
|
|
5
5
|
|
|
6
6
|
const metaOptions = ["id", "comment", "props"];
|
|
7
7
|
const escapedMetaOptionsRe = new RegExp(`^_(${metaOptions.join("|")})$`);
|
package/package.json
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lingui/macro",
|
|
3
|
-
"version": "4.0.0-next.
|
|
3
|
+
"version": "4.0.0-next.5",
|
|
4
4
|
"description": "Macro for generating messages in ICU MessageFormat syntax",
|
|
5
5
|
"main": "./dist/index.cjs",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
7
7
|
"types": "./index.d.ts",
|
|
8
|
+
"sideEffects": false,
|
|
8
9
|
"author": {
|
|
9
10
|
"name": "Tomáš Ehrlich",
|
|
10
11
|
"email": "tomas.ehrlich@gmail.com"
|
|
@@ -49,12 +50,12 @@
|
|
|
49
50
|
"dependencies": {
|
|
50
51
|
"@babel/runtime": "^7.20.13",
|
|
51
52
|
"@babel/types": "^7.20.7",
|
|
52
|
-
"@lingui/
|
|
53
|
-
"@lingui/
|
|
53
|
+
"@lingui/conf": "^4.0.0-next.5",
|
|
54
|
+
"@lingui/core": "^4.0.0-next.5",
|
|
55
|
+
"@lingui/message-utils": "^4.0.0-next.5"
|
|
54
56
|
},
|
|
55
57
|
"peerDependencies": {
|
|
56
|
-
"@lingui/
|
|
57
|
-
"@lingui/react": "4.0.0-next.4",
|
|
58
|
+
"@lingui/react": "4.0.0-next.5",
|
|
58
59
|
"babel-plugin-macros": "2 || 3"
|
|
59
60
|
},
|
|
60
61
|
"devDependencies": {
|
|
@@ -66,5 +67,5 @@
|
|
|
66
67
|
"tsd": "^0.26.1",
|
|
67
68
|
"unbuild": "^1.1.2"
|
|
68
69
|
},
|
|
69
|
-
"gitHead": "
|
|
70
|
+
"gitHead": "bdbd6cf310cbcf09e1fe288f20ef530c28de481d"
|
|
70
71
|
}
|