Skip to content

Commit f6cd5d4

Browse files
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 >= 13
1 parent 8372d4d commit f6cd5d4

29 files changed

+1751
-31
lines changed

.github/workflows/continuous-integration.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
strategy:
88
fail-fast: false
99
matrix:
10-
flavor: [1, 2, 3, 4]
10+
flavor: [1, 2, 3, 4, 5, 6, 7]
1111
include:
1212
- flavor: 1
1313
node: 6
@@ -21,6 +21,15 @@ jobs:
2121
- flavor: 4
2222
node: 13
2323
typescript: typescript@next
24+
- flavor: 5
25+
node: 14
26+
typescript: typescript@latest
27+
- flavor: 6
28+
node: 14
29+
typescript: [email protected]
30+
- flavor: 7
31+
node: 14
32+
typescript: typescript@next
2433
steps:
2534
# checkout code
2635
- uses: actions/checkout@v2

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77

88
> TypeScript execution and REPL for node.js, with source map support. **Works with `typescript@>=2.7`**.
99
10+
### *Experimental ESM support*
11+
12+
Native ESM support is currently experimental. For usage, limitations, and to provide feedback, see [#1007](https://github.com/TypeStrong/ts-node/issues/1007).
13+
1014
## Installation
1115

1216
```sh

0 commit comments

Comments
 (0)