Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fully resolve absolute imports (#79)
- Loading branch information
1 parent
0de8ac6
commit c7ea736
Showing
35 changed files
with
310 additions
and
122 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...es/babel-helper-define-polyfill-provider/test/fixtures/absoluteImports/string/main.out.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import "<CWD>/fixtures/absoluteImports/string/nested/node_modules/polyfill-a"; | ||
import "<CWD>/fixtures/absoluteImports/string/node_modules/polyfill-b"; | ||
import "<CWD>/fixtures/absoluteImports/string/nested/node_modules/polyfill-a/index.js"; | ||
import "<CWD>/fixtures/absoluteImports/string/node_modules/polyfill-b/index.js"; | ||
a; | ||
b; |
Empty file.
1 change: 0 additions & 1 deletion
1
...provider/test/fixtures/absoluteImports/string/nested/node_modules/polyfill-a/package.json
This file was deleted.
Oops, something went wrong.
Empty file.
1 change: 0 additions & 1 deletion
1
...lyfill-provider/test/fixtures/absoluteImports/string/node_modules/polyfill-b/package.json
This file was deleted.
Oops, something went wrong.
4 changes: 2 additions & 2 deletions
4
...s/babel-helper-define-polyfill-provider/test/fixtures/absoluteImports/subpath/main.out.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import "<CWD>/fixtures/absoluteImports/subpath/node_modules/polyfill-a/auto"; | ||
import "<CWD>/fixtures/absoluteImports/subpath/node_modules/@polyfill/b/auto"; | ||
import "<CWD>/fixtures/absoluteImports/subpath/node_modules/polyfill-a/auto.js"; | ||
import "<CWD>/fixtures/absoluteImports/subpath/node_modules/@polyfill/b/auto.js"; | ||
a; | ||
b; |
2 changes: 1 addition & 1 deletion
2
...ages/babel-helper-define-polyfill-provider/test/fixtures/absoluteImports/true/main.out.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
import "<CWD>/fixtures/absoluteImports/true/node_modules/polyfill-a"; | ||
import "<CWD>/fixtures/absoluteImports/true/node_modules/polyfill-a/index.js"; | ||
a; |
4 changes: 2 additions & 2 deletions
4
...l-helper-define-polyfill-provider/test/fixtures/absoluteImports/true/nested-2/main.out.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import "<CWD>/fixtures/absoluteImports/true/node_modules/polyfill-b"; | ||
import "<CWD>/fixtures/absoluteImports/true/node_modules/polyfill-a"; | ||
import "<CWD>/fixtures/absoluteImports/true/node_modules/polyfill-b/index.js"; | ||
import "<CWD>/fixtures/absoluteImports/true/node_modules/polyfill-a/index.js"; | ||
a; | ||
b; |
4 changes: 2 additions & 2 deletions
4
...bel-helper-define-polyfill-provider/test/fixtures/absoluteImports/true/nested/main.out.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import "<CWD>/fixtures/absoluteImports/true/nested/node_modules/polyfill-b"; | ||
import "<CWD>/fixtures/absoluteImports/true/node_modules/polyfill-a"; | ||
import "<CWD>/fixtures/absoluteImports/true/nested/node_modules/polyfill-b/index.js"; | ||
import "<CWD>/fixtures/absoluteImports/true/node_modules/polyfill-a/index.js"; | ||
a; | ||
b; |
Empty file.
1 change: 0 additions & 1 deletion
1
...l-provider/test/fixtures/absoluteImports/true/nested/node_modules/polyfill-a/package.json
This file was deleted.
Oops, something went wrong.
Empty file.
1 change: 0 additions & 1 deletion
1
...l-provider/test/fixtures/absoluteImports/true/nested/node_modules/polyfill-b/package.json
This file was deleted.
Oops, something went wrong.
Empty file.
1 change: 0 additions & 1 deletion
1
...polyfill-provider/test/fixtures/absoluteImports/true/node_modules/polyfill-a/package.json
This file was deleted.
Oops, something went wrong.
Empty file.
1 change: 0 additions & 1 deletion
1
...polyfill-provider/test/fixtures/absoluteImports/true/node_modules/polyfill-b/package.json
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
packages/babel-plugin-polyfill-es-shims/test/fixtures/absolute-imports/global/input.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
Array.from; | ||
Math.clz32; |
4 changes: 3 additions & 1 deletion
4
packages/babel-plugin-polyfill-es-shims/test/fixtures/absolute-imports/global/output.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
import "<CWD>/array.from/auto"; | ||
import "<CWD>/array.from/auto.js"; | ||
import "<CWD>/math.clz32/auto.js"; | ||
Array.from; | ||
Math.clz32; |
1 change: 1 addition & 0 deletions
1
packages/babel-plugin-polyfill-es-shims/test/fixtures/absolute-imports/pure/input.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
Array.from; | ||
Math.clz32; |
4 changes: 3 additions & 1 deletion
4
packages/babel-plugin-polyfill-es-shims/test/fixtures/absolute-imports/pure/output.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
import _ArrayFrom from "<CWD>/array.from"; | ||
import _ArrayFrom from "<CWD>/array.from/index.js"; | ||
import _MathClz from "<CWD>/math.clz32/index.js"; | ||
_ArrayFrom; | ||
_MathClz; |
2 changes: 2 additions & 0 deletions
2
packages/babel-plugin-polyfill-regenerator/test/fixtures/absoluteImports/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
NOTE: <CWD> is the top-level node_modules folder | ||
(that's how `@babel/helper-plugin-test-runner` works). |
1 change: 1 addition & 0 deletions
1
...es/babel-plugin-polyfill-regenerator/test/fixtures/absoluteImports/usage-global/input.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
regeneratorRuntime.wrap(function() {}); |
11 changes: 11 additions & 0 deletions
11
...babel-plugin-polyfill-regenerator/test/fixtures/absoluteImports/usage-global/options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"plugins": [ | ||
[ | ||
"@@/polyfill-regenerator", | ||
{ | ||
"method": "usage-global", | ||
"absoluteImports": true | ||
} | ||
] | ||
] | ||
} |
2 changes: 2 additions & 0 deletions
2
...s/babel-plugin-polyfill-regenerator/test/fixtures/absoluteImports/usage-global/output.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
import "<CWD>/regenerator-runtime/runtime.js"; | ||
regeneratorRuntime.wrap(function () {}); |
1 change: 1 addition & 0 deletions
1
...gin-polyfill-regenerator/test/fixtures/absoluteImports/usage-pure-babel-runtime/input.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
regeneratorRuntime.wrap(function() {}); |
14 changes: 14 additions & 0 deletions
14
...-polyfill-regenerator/test/fixtures/absoluteImports/usage-pure-babel-runtime/options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"plugins": [ | ||
[ | ||
"@@/polyfill-regenerator", | ||
{ | ||
"method": "usage-pure", | ||
"absoluteImports": true, | ||
"#__secret_key__@babel/runtime__compatibility": { | ||
"useBabelRuntime": "@babel/runtime" | ||
} | ||
} | ||
] | ||
] | ||
} |
3 changes: 3 additions & 0 deletions
3
...in-polyfill-regenerator/test/fixtures/absoluteImports/usage-pure-babel-runtime/output.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import _regeneratorRuntime from "<CWD>/@babel/runtime/regenerator/index.js"; | ||
|
||
_regeneratorRuntime.wrap(function () {}); |
1 change: 1 addition & 0 deletions
1
...ages/babel-plugin-polyfill-regenerator/test/fixtures/absoluteImports/usage-pure/input.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
regeneratorRuntime.wrap(function() {}); |
11 changes: 11 additions & 0 deletions
11
...s/babel-plugin-polyfill-regenerator/test/fixtures/absoluteImports/usage-pure/options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"plugins": [ | ||
[ | ||
"@@/polyfill-regenerator", | ||
{ | ||
"method": "usage-pure", | ||
"absoluteImports": true | ||
} | ||
] | ||
] | ||
} |
3 changes: 3 additions & 0 deletions
3
...ges/babel-plugin-polyfill-regenerator/test/fixtures/absoluteImports/usage-pure/output.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import _regeneratorRuntime from "<CWD>/regenerator-runtime/runtime.js"; | ||
|
||
_regeneratorRuntime.wrap(function () {}); |
Oops, something went wrong.