@komaci/common-shared 244.2.5 → 244.2.6
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/build/utils.js +18 -7
- package/package.json +2 -2
package/build/utils.js
CHANGED
|
@@ -53,6 +53,7 @@ function getPropertyMetadataFromAst(ast) {
|
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
|
+
path.stop();
|
|
56
57
|
},
|
|
57
58
|
};
|
|
58
59
|
(0, core_1.traverse)(ast, Visitor);
|
|
@@ -278,13 +279,23 @@ exports.isExternalModule = isExternalModule;
|
|
|
278
279
|
*/
|
|
279
280
|
function getVariablesDeclaredInFunction(getterMethodPath) {
|
|
280
281
|
const variables = [];
|
|
281
|
-
const
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
282
|
+
const Visitor = {
|
|
283
|
+
VariableDeclaration(path) {
|
|
284
|
+
const varDeclaration = path.node;
|
|
285
|
+
varDeclaration.declarations.forEach((dec) => {
|
|
286
|
+
variables.push(dec.id.name);
|
|
287
|
+
});
|
|
288
|
+
},
|
|
289
|
+
ArrowFunctionExpression(path) {
|
|
290
|
+
const arrowFunctionNode = path.node;
|
|
291
|
+
arrowFunctionNode.params.forEach((param) => {
|
|
292
|
+
if (param.type == 'Identifier') {
|
|
293
|
+
variables.push(param.name);
|
|
294
|
+
}
|
|
295
|
+
});
|
|
296
|
+
},
|
|
297
|
+
};
|
|
298
|
+
getterMethodPath.traverse(Visitor);
|
|
288
299
|
return variables;
|
|
289
300
|
}
|
|
290
301
|
exports.getVariablesDeclaredInFunction = getVariablesDeclaredInFunction;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@komaci/common-shared",
|
|
3
|
-
"version": "244.2.
|
|
3
|
+
"version": "244.2.6",
|
|
4
4
|
"description": "Assets that are shared across Komaci commonjs packages",
|
|
5
5
|
"homepage": "https://komaci.dev/",
|
|
6
6
|
"repository": {
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"build/komaci-mapping.json"
|
|
30
30
|
],
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@komaci/types": "244.2.
|
|
32
|
+
"@komaci/types": "244.2.6"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@babel/core": "^7.9.0",
|