vue-hook-optimizer 0.0.7 → 0.0.8
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 +2 -2
- package/dist/index.js +8 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -7
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
@@ -86311,9 +86311,10 @@ function analyze2(content) {
|
|
86311
86311
|
const name = path2.node.id?.name;
|
86312
86312
|
if (name && graph.nodes.has(name)) {
|
86313
86313
|
path2.traverse({
|
86314
|
-
Identifier(
|
86315
|
-
|
86316
|
-
|
86314
|
+
Identifier(path1) {
|
86315
|
+
const binding2 = path1.scope.getBinding(path1.node.name);
|
86316
|
+
if (graph.nodes.has(path1.node.name) && path1.node.name !== name && binding2?.scope.block.type === "Program") {
|
86317
|
+
graph.edges.get(name)?.add(path1.node.name);
|
86317
86318
|
}
|
86318
86319
|
}
|
86319
86320
|
});
|
@@ -86329,9 +86330,10 @@ function analyze2(content) {
|
|
86329
86330
|
const name = path2.node.id?.name;
|
86330
86331
|
if (name && graph.nodes.has(name)) {
|
86331
86332
|
path2.traverse({
|
86332
|
-
Identifier(
|
86333
|
-
|
86334
|
-
|
86333
|
+
Identifier(path1) {
|
86334
|
+
const binding2 = path1.scope.getBinding(path1.node.name);
|
86335
|
+
if (graph.nodes.has(path1.node.name) && path1.node.name !== name && binding2?.scope.block.type === "Program") {
|
86336
|
+
graph.edges.get(name)?.add(path1.node.name);
|
86335
86337
|
}
|
86336
86338
|
}
|
86337
86339
|
});
|
@@ -86579,7 +86581,6 @@ function analyze3(content) {
|
|
86579
86581
|
process2(path2.node.declaration, path2);
|
86580
86582
|
} else if (path2.node.declaration.type === "CallExpression" && path2.node.declaration.callee.type === "Identifier" && path2.node.declaration.callee.name === "defineComponent" && path2.node.declaration.arguments[0].type === "ObjectExpression") {
|
86581
86583
|
process2(path2.node.declaration.arguments[0], path2);
|
86582
|
-
console.log(graph);
|
86583
86584
|
}
|
86584
86585
|
}
|
86585
86586
|
});
|