@lingui/macro 3.14.0 → 3.15.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/index.js +11 -11
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -56,6 +56,17 @@ function macro(_ref) {
|
|
|
56
56
|
var jsxNodes = [];
|
|
57
57
|
var jsNodes = [];
|
|
58
58
|
var needsI18nImport = false;
|
|
59
|
+
var alreadyVisitedCache = new WeakSet();
|
|
60
|
+
|
|
61
|
+
var alreadyVisited = function alreadyVisited(path) {
|
|
62
|
+
if (alreadyVisitedCache.has(path)) {
|
|
63
|
+
return true;
|
|
64
|
+
} else {
|
|
65
|
+
alreadyVisitedCache.add(path);
|
|
66
|
+
return false;
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
|
|
59
70
|
Object.keys(references).forEach(function (tagName) {
|
|
60
71
|
var nodes = references[tagName];
|
|
61
72
|
var macroType = getMacroType(tagName);
|
|
@@ -134,17 +145,6 @@ function isRootPath(allPath) {
|
|
|
134
145
|
};
|
|
135
146
|
}
|
|
136
147
|
|
|
137
|
-
var alreadyVisitedCache = [];
|
|
138
|
-
|
|
139
|
-
function alreadyVisited(path) {
|
|
140
|
-
if (alreadyVisitedCache.includes(path)) {
|
|
141
|
-
return true;
|
|
142
|
-
} else {
|
|
143
|
-
alreadyVisitedCache.push(path);
|
|
144
|
-
return false;
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
|
|
148
148
|
function getMacroType(tagName) {
|
|
149
149
|
switch (tagName) {
|
|
150
150
|
case "defineMessage":
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lingui/macro",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.15.0",
|
|
4
4
|
"description": "Macro for generating messages in ICU MessageFormat syntax",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"author": {
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
],
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@babel/runtime": "^7.11.2",
|
|
33
|
-
"@lingui/conf": "^3.
|
|
33
|
+
"@lingui/conf": "^3.15.0",
|
|
34
34
|
"ramda": "^0.27.1"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|