vue-hook-optimizer 0.0.19 → 0.0.21

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/dist/index.mjs CHANGED
@@ -86911,7 +86911,7 @@ function findLinearPaths(graph) {
86911
86911
  let linearPaths = [];
86912
86912
  let visitedNodes = /* @__PURE__ */ new Set();
86913
86913
  for (let [node2, edges] of graph.entries()) {
86914
- if (edges.size === 1 && !visitedNodes.has(node2)) {
86914
+ if (edges.size === 1 && !visitedNodes.has(node2) && node2.type === "fun" /* fun */) {
86915
86915
  let path2 = [node2];
86916
86916
  let nextNode = Array.from(edges)[0];
86917
86917
  visitedNodes.add(node2);
@@ -87022,7 +87022,7 @@ function gen(graph, usedNodes) {
87022
87022
  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.`
87023
87023
  });
87024
87024
  }
87025
- const paths = findLinearPaths(onlyFunctions(g));
87025
+ const paths = findLinearPaths(g);
87026
87026
  paths.forEach((path2) => {
87027
87027
  suggestions.push({
87028
87028
  type: "warning" /* warning */,
@@ -87030,10 +87030,9 @@ function gen(graph, usedNodes) {
87030
87030
  });
87031
87031
  });
87032
87032
  if (g.size > 5) {
87033
- const ap = findArticulationPoints(onlyFunctions(g));
87034
- const noIndegreeNodes2 = noIndegreeFilter(g);
87033
+ const ap = findArticulationPoints(g);
87035
87034
  ap.forEach((node2) => {
87036
- if (!noIndegreeNodes2.includes(node2)) {
87035
+ if (node2.type === "fun" /* fun */) {
87037
87036
  suggestions.push({
87038
87037
  type: "info" /* info */,
87039
87038
  // eslint-disable-next-line max-len