Commit d04842a
authored
Avoid using CJS globals in internal source files (#12963)
* Lint against CJS globals in modules
* Use `import.meta.url` instead of `__filename` in `src` files
* Prepare fixtures runner for `import.meta.url`
* Use `import.meta.url` instead of `__filename` in `test/index` files
* Remove `__dirname` from remaining test files
dirname
* Avoid using `module` in `src` files
* Avoid using `require` in `src` files
* Avoid using `require` in `test` files
* Update `@types/node`
* Compile dynamic import in `@babel/node`
* Fix windows
* Use `@babel/plugin-proposal-dynamic-import` from npm1 parent ea620e8 commit d04842a
147 files changed
Lines changed: 653 additions & 348 deletions
File tree
- codemods
- babel-plugin-codemod-object-assign-to-object-spread/test
- babel-plugin-codemod-optional-catch-binding/test
- eslint
- babel-eslint-parser/test
- babel-eslint-plugin-development-internal
- src
- test/rules
- babel-eslint-plugin-development/src
- babel-eslint-plugin/src
- babel-eslint-tests/test
- helpers
- integration
- eslint
- rules
- lib
- packages
- babel-cli
- src/babel
- test
- babel-core
- src/config/files
- test
- helpers
- babel-generator/test
- babel-helper-compilation-targets/test
- custom-browserslist-env
- babel-helper-create-class-features-plugin/test
- babel-helper-create-regexp-features-plugin/test
- babel-helper-fixtures/src
- babel-helper-module-imports/test
- babel-helper-plugin-test-runner/src
- babel-helper-transform-fixture-test-runner
- src
- test
- babel-helpers/test
- babel-node
- src
- test
- babel-parser/test
- helpers
- babel-plugin-external-helpers/test
- babel-plugin-proposal-async-generator-functions/test
- babel-plugin-proposal-class-properties/test
- babel-plugin-proposal-class-static-block/test
- babel-plugin-proposal-decorators/test
- babel-plugin-proposal-do-expressions/test
- babel-plugin-proposal-dynamic-import/test
- babel-plugin-proposal-export-default-from/test
- babel-plugin-proposal-export-namespace-from/test
- babel-plugin-proposal-function-bind/test
- babel-plugin-proposal-function-sent/test
- babel-plugin-proposal-json-strings/test
- babel-plugin-proposal-logical-assignment-operators/test
- babel-plugin-proposal-nullish-coalescing-operator/test
- babel-plugin-proposal-numeric-separator/test
- babel-plugin-proposal-object-rest-spread/test
- babel-plugin-proposal-optional-catch-binding/test
- babel-plugin-proposal-optional-chaining/test
- babel-plugin-proposal-partial-application/test
- babel-plugin-proposal-pipeline-operator/test
- babel-plugin-proposal-private-methods/test
- babel-plugin-proposal-private-property-in-object/test
- babel-plugin-proposal-record-and-tuple/test
- babel-plugin-proposal-throw-expressions/test
- babel-plugin-proposal-unicode-property-regex/test
- babel-plugin-transform-arrow-functions/test
- babel-plugin-transform-async-to-generator/test
- babel-plugin-transform-block-scoped-functions/test
- babel-plugin-transform-block-scoping/test
- babel-plugin-transform-classes/test
- babel-plugin-transform-computed-properties/test
- babel-plugin-transform-destructuring/test
- babel-plugin-transform-dotall-regex/test
- babel-plugin-transform-duplicate-keys/test
- babel-plugin-transform-exponentiation-operator/test
- babel-plugin-transform-flow-comments/test
- babel-plugin-transform-flow-strip-types/test
- babel-plugin-transform-for-of/test
- babel-plugin-transform-function-name/test
- babel-plugin-transform-instanceof/test
- babel-plugin-transform-jscript/test
- babel-plugin-transform-member-expression-literals/test
- babel-plugin-transform-modules-amd/test
- babel-plugin-transform-modules-commonjs/test
- babel-plugin-transform-modules-systemjs/test
- babel-plugin-transform-modules-umd/test
- babel-plugin-transform-named-capturing-groups-regex/test
- babel-plugin-transform-new-target/test
- babel-plugin-transform-object-super/test
- babel-plugin-transform-parameters/test
- babel-plugin-transform-property-literals/test
- babel-plugin-transform-property-mutators/test
- babel-plugin-transform-proto-to-assign/test
- babel-plugin-transform-react-constant-elements/test
- babel-plugin-transform-react-display-name/test
- babel-plugin-transform-react-inline-elements/test
- babel-plugin-transform-react-jsx-compat/test
- babel-plugin-transform-react-jsx-development/test
- babel-plugin-transform-react-jsx-self/test
- babel-plugin-transform-react-jsx-source/test
- babel-plugin-transform-react-jsx/test
- babel-plugin-transform-react-pure-annotations/test
- babel-plugin-transform-regenerator/test
- babel-plugin-transform-reserved-words/test
- babel-plugin-transform-runtime
- src/get-runtime-path
- test
- babel-plugin-transform-shorthand-properties/test
- babel-plugin-transform-spread/test
- babel-plugin-transform-sticky-regex/test
- babel-plugin-transform-strict-mode/test
- babel-plugin-transform-template-literals/test
- babel-plugin-transform-typeof-symbol/test
- babel-plugin-transform-typescript/test
- babel-plugin-transform-unicode-escapes/test
- babel-plugin-transform-unicode-regex/test
- babel-preset-env/test
- babel-preset-flow/test
- babel-preset-react/test
- babel-preset-typescript/test
- babel-register/test
- babel-standalone/test
- babel-traverse/test
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
5 | 7 | | |
6 | 8 | | |
7 | 9 | | |
| |||
68 | 70 | | |
69 | 71 | | |
70 | 72 | | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
71 | 92 | | |
72 | 93 | | |
73 | 94 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
159 | 159 | | |
160 | 160 | | |
161 | 161 | | |
| 162 | + | |
162 | 163 | | |
163 | 164 | | |
164 | 165 | | |
| |||
177 | 178 | | |
178 | 179 | | |
179 | 180 | | |
180 | | - | |
| 181 | + | |
181 | 182 | | |
182 | 183 | | |
183 | 184 | | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
188 | 192 | | |
189 | 193 | | |
190 | 194 | | |
| |||
465 | 469 | | |
466 | 470 | | |
467 | 471 | | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
4 | 6 | | |
5 | 7 | | |
6 | 8 | | |
7 | | - | |
| 9 | + | |
| 10 | + | |
8 | 11 | | |
9 | 12 | | |
10 | 13 | | |
| |||
73 | 76 | | |
74 | 77 | | |
75 | 78 | | |
| 79 | + | |
| 80 | + | |
76 | 81 | | |
77 | 82 | | |
78 | 83 | | |
| |||
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
| 3 | + | |
| 4 | + | |
7 | 5 | | |
| 6 | + | |
| 7 | + | |
Lines changed: 6 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | | - | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
6 | 9 | | |
7 | | - | |
8 | | - | |
| 10 | + | |
| 11 | + | |
9 | 12 | | |
10 | 13 | | |
11 | 14 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
11 | 9 | | |
| 10 | + | |
| 11 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
22 | 13 | | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
3 | 5 | | |
4 | 6 | | |
5 | 7 | | |
| |||
24 | 26 | | |
25 | 27 | | |
26 | 28 | | |
27 | | - | |
| 29 | + | |
| 30 | + | |
28 | 31 | | |
29 | 32 | | |
30 | 33 | | |
| |||
0 commit comments