Packages

ts-node

10.9.2 · 8 Dec 2023MIT60.2M / weekRepositoryHomepagenpmAtom feed

Your version

10.2.0

8 Aug 2021Where it was published

10.9.2 is the newest release of 10.x.

In short

1 new3 fixed2 changed

Release note

Questions about this release? Ask in the official discussion thread

Added

  • Adds top-level await support to REPL (#1383, #245)

    • can be disabled with --no-experimental-repl-await, experimentalReplAwait, or TS_NODE_EXPERIMENTAL_REPL_AWAIT (CLI docs, API docs)

  • Setting "pretty": false disables pretty formatting of diagnostics even when stdout is a TTY (#1418, #1420)

    • Applies to ts-node's pretty option, not to be confused with TypeScript's pretty option

  • Ignores diagnostics which are annoying in an interactive REPL (#1396, #1120, #729, #850, #469)

    • For example, when you input const foo = 1 in the REPL, foo is unused. We ignore the resulting diagnostic foo is declared but its value is never read

    • Diagnostics are only ignored in the REPL

    • Diagnostics for non-REPL files imported by the REPL will still be shown

  • Logged stack traces are colorized to match vanilla node's behavior (#1412, #1405)

Fixed

  • Fix #1397: SWC transpiler should emit ECMAScript imports and exports when configuration dictates (#1409, #1397)

    • Enables SWC transpiler to be used alongside --loader

  • Fix #1403: source-map-support breaks rendering of node errors (#1405, #1403)

  • Fix #1410: rendering of async stack frames should include async annotations (#1405, #1410)

  • Fix #1411: wrong order of process 'exit' event and logging unhandled exception (#1405, #1411)

  • Fix #1419: Should not throw require.resolve error when @types/node peerDependency is missing (#1419, #1422)

v10.1.0...v10.2.0
github.com/TypeStrong/ts-node/milestone/2