babel / babel
Showing 1 of 1 files from the diff.

@@ -2,8 +2,6 @@
Loading
2 2
import * as t from "@babel/types";
3 3
import type Scope from "./scope";
4 4
5 -
const testing = process.env.NODE_ENV === "test";
6 -
7 5
export default class TraversalContext {
8 6
  constructor(scope, opts, state, parentPath) {
9 7
    this.parentPath = parentPath;
@@ -18,7 +16,6 @@
Loading
18 16
  declare opts;
19 17
  queue: Array<NodePath> | null = null;
20 18
  priorityQueue: Array<NodePath> | null = null;
21 -
  declare trap?: boolean;
22 19
23 20
  /**
24 21
   * This method does a simple check to determine whether or not we really need to attempt
@@ -57,10 +54,6 @@
Loading
57 54
  }
58 55
59 56
  maybeQueue(path, notPriority?: boolean) {
60 -
    if (this.trap) {
61 -
      throw new Error("Infinite cycle detected");
62 -
    }
63 -
64 57
    if (this.queue) {
65 58
      if (notPriority) {
66 59
        this.queue.push(path);
@@ -120,10 +113,6 @@
Loading
120 113
      // this path no longer belongs to the tree
121 114
      if (path.key === null) continue;
122 115
123 -
      if (testing && queue.length >= 10_000) {
124 -
        this.trap = true;
125 -
      }
126 -
127 116
      // ensure we don't visit the same node twice
128 117
      const { node } = path;
129 118
      if (visited.has(node)) continue;
Files Coverage
codemods 100.00%
eslint 93.14%
packages 92.01%
Project Totals (455 files) 92.05%
1
coverage:
2
  parsers:
3
    javascript:
4
      enable_partials: yes
5
  status:
6
    project:
7
      default:
8
        target: "90%"
9
    patch:
10
      enabled: false
11
ignore:
12
  - packages/babel-types/src/*/generated/*
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading