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 CHANGED
@@ -86886,15 +86886,6 @@ function noIndegreeFilter(graph) {
86886
86886
  });
86887
86887
  return nodes.filter((node2) => indegree.get(node2) === 0);
86888
86888
  }
86889
- function noOutdegreeFilter(graph) {
86890
- const zeroOutdegreeNodes = [];
86891
- for (let [node2, edges] of graph.entries()) {
86892
- if (edges.size === 0) {
86893
- zeroOutdegreeNodes.push(node2);
86894
- }
86895
- }
86896
- return zeroOutdegreeNodes;
86897
- }
86898
86889
  function removeVariable(graph, targets) {
86899
86890
  const newTarget = /* @__PURE__ */ new Set();
86900
86891
  targets.forEach((target) => {
@@ -86924,7 +86915,7 @@ function findLinearPaths(graph) {
86924
86915
  let linearPaths = [];
86925
86916
  let visitedNodes = /* @__PURE__ */ new Set();
86926
86917
  for (let [node2, edges] of graph.entries()) {
86927
- if (edges.size === 1 && !visitedNodes.has(node2)) {
86918
+ if (edges.size === 1 && !visitedNodes.has(node2) && node2.type === "fun" /* fun */) {
86928
86919
  let path2 = [node2];
86929
86920
  let nextNode = Array.from(edges)[0];
86930
86921
  visitedNodes.add(node2);
@@ -87045,11 +87036,13 @@ function gen(graph, usedNodes) {
87045
87036
  if (g.size > 5) {
87046
87037
  const ap = findArticulationPoints(g);
87047
87038
  ap.forEach((node2) => {
87048
- suggestions.push({
87049
- type: "info" /* info */,
87050
- // eslint-disable-next-line max-len
87051
- message: `Node [${node2.label}] is an articulation point, perhaps you need to pay special attention to this node.`
87052
- });
87039
+ if (node2.type === "fun" /* fun */) {
87040
+ suggestions.push({
87041
+ type: "info" /* info */,
87042
+ // eslint-disable-next-line max-len
87043
+ message: `Node [${node2.label}] is an articulation point, perhaps you need to pay special attention to this node.`
87044
+ });
87045
+ }
87053
87046
  });
87054
87047
  }
87055
87048
  });
@@ -87062,15 +87055,6 @@ function gen(graph, usedNodes) {
87062
87055
  });
87063
87056
  }
87064
87057
  });
87065
- const noOutdegreeNodes = noOutdegreeFilter(graph.edges);
87066
- noOutdegreeNodes.forEach((node2) => {
87067
- if (!usedNodes.has(node2.label)) {
87068
- suggestions.push({
87069
- type: "info" /* info */,
87070
- message: `Node [${node2.label}] is not used, perhaps you can remove it.`
87071
- });
87072
- }
87073
- });
87074
87058
  return suggestions;
87075
87059
  }
87076
87060