Sourced from ts-node's releases.
v10.1.0
Questions about this release? Ask in the official discussion thread: #1390
Added
- Add
"moduleType"
option to override module type -- CommonJS or ECMAScript -- on select files. (docs) (#1342, #1371, #1376)
- Useful when a configuration file, for example
webpack.config.ts
, must execute as CommonJS but the rest of the project is ESM- selectively overrides
package.json
"type"
andtsconfig.json
"module"
- akin to
.cjs
and.mjs
extensions, but for.ts
and.tsx
files- thanks to
@jayaddison
for help on test coverage- Implement
"extends"
support for"ts-node"
options intsconfig.json
(#1328, #1356)
"ts-node": {}
options will be parsed from extended tsconfigs- allows sharing and deduplicating ts-node configuration
- Un-deprecate
scope
andscopeDir
; add both to CLI andtsconfig.json
options; un-deprecateTS_NODE_SCOPE
env var; addTS_NODE_SCOPE_DIR
env var (docs) (#1346, #1367)Changed
- Improve error messages thrown by native ESM loader hooks (#1357, #1373)
@tars0x9752
- messages more closely match node; are more descriptive
- Emit
"ts-node"
object at the top of--showConfig
output instead of the bottom (#1355)Fixed
- Fix #1282: Set correct globals in
[stdin]
,[eval]
, and<repl>
contexts (#1333)
- More closely align ts-node's behavior with vanilla node
- Affects the interactive REPL, piping to stdin, and
ts-node -e
- Matches node's behavior for globals
__filename
,__dirname
,module
and sub-fields ofmodule
,exports
, and builtin module aliasesfs
, etc- Fix #1343: Set swc option
keepClassNames
totrue
(#1344)- Fix: #1387: REPL outputs 'use strict' after first empty line of input (#1388)
@ejose19
Docs
https://github.com/TypeStrong/ts-node/compare/v10.0.0...v10.1.0 https://github.com/TypeStrong/ts-node/milestone/3
9faa340
10.1.085dd6de
rebuild the readme1bc470d
Add moduleType option to override module type on certain files. (#1371)4e7fcb7
fix: prevent implicit 'use strict' output (#1388)5643ad6
Improve error messages used by esm-resolver (#1373)6266ae2
Fix #1282: correct globals in [stdin], [eval], and <repl> contexts (#1333)4f16d1b
Implement "extends" support for "ts-node" options in tsconfigs (#1356)518c250
Put "ts-node" object at the top of --showConfig
output (#1355)17b3a55
Un-deprecate scope and scopedir; add to CLI, tsconfig.json, and env vars (#1367)7cac7df
Fix broken link in jsdoc (#1365)