vue-hook-optimizer 0.0.19 → 0.0.21
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.js +4 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
@@ -86924,7 +86924,7 @@ function findLinearPaths(graph) {
|
|
86924
86924
|
let linearPaths = [];
|
86925
86925
|
let visitedNodes = /* @__PURE__ */ new Set();
|
86926
86926
|
for (let [node2, edges] of graph.entries()) {
|
86927
|
-
if (edges.size === 1 && !visitedNodes.has(node2)) {
|
86927
|
+
if (edges.size === 1 && !visitedNodes.has(node2) && node2.type === "fun" /* fun */) {
|
86928
86928
|
let path2 = [node2];
|
86929
86929
|
let nextNode = Array.from(edges)[0];
|
86930
86930
|
visitedNodes.add(node2);
|
@@ -87035,7 +87035,7 @@ function gen(graph, usedNodes) {
|
|
87035
87035
|
message: `There is a loop call in nodes [${nodes.length > 10 ? nodes.slice(0, 10).map((node2) => node2.label).join(",") + "...(" + nodes.length + ")" : nodes.map((node2) => node2.label).join(",")}], perhaps you can refactor it.`
|
87036
87036
|
});
|
87037
87037
|
}
|
87038
|
-
const paths = findLinearPaths(
|
87038
|
+
const paths = findLinearPaths(g);
|
87039
87039
|
paths.forEach((path2) => {
|
87040
87040
|
suggestions.push({
|
87041
87041
|
type: "warning" /* warning */,
|
@@ -87043,10 +87043,9 @@ function gen(graph, usedNodes) {
|
|
87043
87043
|
});
|
87044
87044
|
});
|
87045
87045
|
if (g.size > 5) {
|
87046
|
-
const ap = findArticulationPoints(
|
87047
|
-
const noIndegreeNodes2 = noIndegreeFilter(g);
|
87046
|
+
const ap = findArticulationPoints(g);
|
87048
87047
|
ap.forEach((node2) => {
|
87049
|
-
if (
|
87048
|
+
if (node2.type === "fun" /* fun */) {
|
87050
87049
|
suggestions.push({
|
87051
87050
|
type: "info" /* info */,
|
87052
87051
|
// eslint-disable-next-line max-len
|