ts-node
10.9.2 · 8 Dec 2023MIT60.2M / weekRepositoryHomepagenpmAtom feed
10.9.2 is the newest release of 10.x.
In short
5 new7 fixed6 changed3 internal
Release note
Questions about this release? Ask in the official discussion thread
Added
Eliminate "Emit Skipped" errors (#693, #1345, #1629)
Avoids all "Emit Skipped" errors by performing a fallback
transpileOnly-style transformation.Does not affect typechecking. Type errors are still detected and thrown.
Fallback has the same limitations as
isolatedModules. This will only affect rare cases such as usingconst enumswithpreserveConstEnumsdisabled.Fixes #693
Graduate swc transpiler out of experimental; add
swc: trueconvenience option (docs) (#1487, #1536, #1613, #1627)"swc": trueor--swcwill use swc for faster executionThis feature is no longer marked "experimental." Thank you to everyone who filed bugs!
Swc transpiler attempts to load
@swc/coreor@swc/wasmdependencies from your project before falling-back to global installations (#1613, #1627)global fallback only occurs when using a global installation of ts-node
Add support for TypeScript's
traceResolutionoutput (docs) (#1128, #1491)Support import assertions in ESM loader (docs) (#1557, #1558, #1559, #1573)
Allows importing JSON files from ESM with the requisite flag (docs)
ts-node -vvvalso logs absolute paths tots-nodeandtypescript, to make it more obvious when you're accidentally using globally-installed versions (#1323, #1620)Add swc target "es2022" (#1535, #1540)
When you have target es2022 in tsconfig, will use swc's es2022 target
Changed
Initialize TypeScript compiler before starting REPL prompt
Improves responsiveness for first line of REPL input
Use
v8-compile-cache-libto load typescriptSupport both
--camelCaseand--hyphen-casefor all CLI flags; update documentation to use--camelCase(#1598, #1599)Not a breaking change; CLI continues to accept both forms
Make
TSErrordiagnosticTextproperty non-enumerable to prevent it from being logged below the stack
Fixed
Fix #1538: REPL inputs fail to transpile via swc (#1538, #1541, #1602)
Fix #1478: REPL erroneously logged
undefinedfor all inputs after the first when using swc transpiler (#1478, #1580, #1602)Fix #1389: In
--showConfigoutput, emit accuratemoduleTypespaths resolved relative to thetsconfig.jsonwhich declared them (#1389, #1619)Remove indentation from
ts-node --helpoutput (#1597, #1600)Fix #1425: Merged definitions correctly into
tsconfig.schemastore-schema.json(#1425, #1618)Allow disabling
"use strict"emit in SWC transpiler (#1531, #1537)Add missing
ERR_UNKNOWN_FILE_EXTENSIONconstructor; was throwingERR_UNKNOWN_FILE_EXTENSION is not a constructorFix #1565: entrypoint resolution failed on node v12.0.x and v12.1.x (#1565, #1566)
Misc