babel / babel

@@ -284,13 +284,25 @@
Loading
284 284
285 285
      val[0] = path.resolve(optionsDir, val[0]);
286 286
    } else {
287 +
      let name = val[0];
288 +
      const match = name.match(/^(@babel\/(?:plugin-|preset-)?)(.*)$/);
289 +
      if (match) {
290 +
        name = match[2];
291 +
      }
292 +
287 293
      const monorepoPath = path.join(
288 294
        path.dirname(fileURLToPath(import.meta.url)),
289 295
        "../..",
290 -
        `babel-${type}-${val[0]}`,
296 +
        `babel-${type}-${name}`,
291 297
      );
292 298
293 299
      if (fs.existsSync(monorepoPath)) {
300 +
        if (match) {
301 +
          throw new Error(
302 +
            `Remove the "${match[1]}" prefix from "${val[0]}", to load it from the monorepo`,
303 +
          );
304 +
        }
305 +
294 306
        val[0] = monorepoPath;
295 307
      }
296 308
    }
Files Coverage
codemods 100.00%
eslint 95.07%
packages 91.90%
Project Totals (458 files) 92.00%
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