Commit f6cd5d4
authored
Experimental ESM support for node >=13 (#1010)
* Initial commit
* fix exports declaration in package.json; update example readme
* add missing file to package files array
* Add missing .js extension to ESM resolver
* WIP to support EmitFlavor, which I'm going to undo since actually we don't need to support 2x emit flavors
* Add foo.js -> foo.ts resolution, remove compileEsm codepath, add support for experimental-specifier-resolution=node
* Add testing on node 14 to CI
* Add ESM header to README
* Add ESM test
* ESM loader factory accepts RegisterOptions
* Add copy of node's ESM loader to make diffing easier.
* Fix tests
* Fix tests
* type annotation in esm.mjs
* fix tests on ts 2.7
* Conditionally run esm tests on node >= 131 parent 8372d4d commit f6cd5d4
File tree
29 files changed
+1751
-31
lines changed- .github/workflows
- dist-raw
- esm-usage-example
- raw
- src
- tests
- esm-node-resolver
- bar
- esm
29 files changed
+1751
-31
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
24 | 33 | | |
25 | 34 | | |
26 | 35 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
10 | 14 | | |
11 | 15 | | |
12 | 16 | | |
| |||
0 commit comments