Skip to content

Commit 9cf6ae3

Browse files
authored
update esm messaging in docs (#1455)
1 parent 405295e commit 9cf6ae3

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

website/docs/imports.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: "CommonJS vs native ECMAScript modules"
33
---
44

5-
TypeScript is almost always written using modern `import` syntax, but you can choose to either transform to CommonJS or use node's native ESM support. Configuration is different for each.
5+
TypeScript is almost always written using modern `import` syntax, but it is also transformed before being executed by the underlying runtime. You can choose to either transform to CommonJS or to preserve the native `import` syntax, using node's native ESM support. Configuration is different for each.
66

77
Here is a brief comparison of the two.
88

@@ -49,8 +49,7 @@ If you must keep `"module": "ESNext"` for `tsc`, webpack, or another build tool,
4949

5050
## Native ECMAScript modules
5151

52-
[Node's ESM loader hooks](https://nodejs.org/api/esm.html#esm_experimental_loaders) are [**experimental**](https://nodejs.org/api/documentation.html#documentation_stability_index) and subject to change. `ts-node`'s ESM support is also experimental. They may have
53-
breaking changes in minor and patch releases and are not recommended for production.
52+
[Node's ESM loader hooks](https://nodejs.org/api/esm.html#esm_experimental_loaders) are [**experimental**](https://nodejs.org/api/documentation.html#documentation_stability_index) and subject to change. `ts-node`'s ESM support is as stable as possible, but it relies on APIs which node can *and will* break in new versions of node. Thus it is not recommended for production.
5453

5554
For complete usage, limitations, and to provide feedback, see [#1007](https://github.com/TypeStrong/ts-node/issues/1007).
5655

website/readme-sources/prefix.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,8 @@ You can build the readme with this command:
2121
[![Build status](https://img.shields.io/github/workflow/status/TypeStrong/ts-node/Continuous%20Integration)](https://github.com/TypeStrong/ts-node/actions?query=workflow%3A%22Continuous+Integration%22)
2222
[![Test coverage](https://codecov.io/gh/TypeStrong/ts-node/branch/main/graph/badge.svg)](https://codecov.io/gh/TypeStrong/ts-node)
2323

24-
> TypeScript execution and REPL for node.js, with source map support. **Works with `typescript@>=2.7`**.
24+
> TypeScript execution and REPL for node.js, with source map and native ESM support.
2525
2626
The latest documentation can also be found on our website: [https://typestrong.org/ts-node](https://typestrong.org/ts-node)
2727

28-
### *Experimental ESM support*
29-
30-
Native ESM support is currently experimental. For usage, limitations, and to provide feedback, see [#1007](https://github.com/TypeStrong/ts-node/issues/1007).
31-
3228
# Table of Contents

0 commit comments

Comments
 (0)