vue-hook-optimizer 0.0.20 → 0.0.22
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.js +8 -24
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -24
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
@@ -86873,15 +86873,6 @@ function noIndegreeFilter(graph) {
|
|
86873
86873
|
});
|
86874
86874
|
return nodes.filter((node2) => indegree.get(node2) === 0);
|
86875
86875
|
}
|
86876
|
-
function noOutdegreeFilter(graph) {
|
86877
|
-
const zeroOutdegreeNodes = [];
|
86878
|
-
for (let [node2, edges] of graph.entries()) {
|
86879
|
-
if (edges.size === 0) {
|
86880
|
-
zeroOutdegreeNodes.push(node2);
|
86881
|
-
}
|
86882
|
-
}
|
86883
|
-
return zeroOutdegreeNodes;
|
86884
|
-
}
|
86885
86876
|
function removeVariable(graph, targets) {
|
86886
86877
|
const newTarget = /* @__PURE__ */ new Set();
|
86887
86878
|
targets.forEach((target) => {
|
@@ -86911,7 +86902,7 @@ function findLinearPaths(graph) {
|
|
86911
86902
|
let linearPaths = [];
|
86912
86903
|
let visitedNodes = /* @__PURE__ */ new Set();
|
86913
86904
|
for (let [node2, edges] of graph.entries()) {
|
86914
|
-
if (edges.size === 1 && !visitedNodes.has(node2)) {
|
86905
|
+
if (edges.size === 1 && !visitedNodes.has(node2) && node2.type === "fun" /* fun */) {
|
86915
86906
|
let path2 = [node2];
|
86916
86907
|
let nextNode = Array.from(edges)[0];
|
86917
86908
|
visitedNodes.add(node2);
|
@@ -87032,11 +87023,13 @@ function gen(graph, usedNodes) {
|
|
87032
87023
|
if (g.size > 5) {
|
87033
87024
|
const ap = findArticulationPoints(g);
|
87034
87025
|
ap.forEach((node2) => {
|
87035
|
-
|
87036
|
-
|
87037
|
-
|
87038
|
-
|
87039
|
-
|
87026
|
+
if (node2.type === "fun" /* fun */) {
|
87027
|
+
suggestions.push({
|
87028
|
+
type: "info" /* info */,
|
87029
|
+
// eslint-disable-next-line max-len
|
87030
|
+
message: `Node [${node2.label}] is an articulation point, perhaps you need to pay special attention to this node.`
|
87031
|
+
});
|
87032
|
+
}
|
87040
87033
|
});
|
87041
87034
|
}
|
87042
87035
|
});
|
@@ -87049,15 +87042,6 @@ function gen(graph, usedNodes) {
|
|
87049
87042
|
});
|
87050
87043
|
}
|
87051
87044
|
});
|
87052
|
-
const noOutdegreeNodes = noOutdegreeFilter(graph.edges);
|
87053
|
-
noOutdegreeNodes.forEach((node2) => {
|
87054
|
-
if (!usedNodes.has(node2.label)) {
|
87055
|
-
suggestions.push({
|
87056
|
-
type: "info" /* info */,
|
87057
|
-
message: `Node [${node2.label}] is not used, perhaps you can remove it.`
|
87058
|
-
});
|
87059
|
-
}
|
87060
|
-
});
|
87061
87045
|
return suggestions;
|
87062
87046
|
}
|
87063
87047
|
|