NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm · #916 most downloaded on npm
TypeScript execution environment and REPL for node.js, with source map support
Last release 3 years ago
no release in 18 months
Ships unpredictably
gaps range from 9 days to 1.3 years
Nearly every release is documented
notes for 60 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
11 years old
128 releases · first in 2015
Nothing published for this version
Fixed tsconfig.json file not found on latest TypeScript version
Fixed
tsconfig.json file not found on latest TypeScript version (https://github.com/TypeStrong/ts-node/pull/2091)Workaround nodejs bug introduced in 18.6.0 ( #1838 ) @cspotcode
Fixed
--esm--esm are unaffectedv10.9.0...v10.9.1
https://github.com/TypeStrong/ts-node/milestone/18?closed=1
One column per quarter.
--project accepts path to a directory containing a tsconfig.json ( #1829 , #1830 ) @cspotcode
Added
--project accepts path to a directory containing a tsconfig.json (#1829, #1830) @cspotcode
experimentalTsImportSpecifiers option which allows using voluntary .ts file extensions in import specifiers (undocumented except for API docs) (#1815) @cspotcodeFixed
child_process.fork() would erroneously execute the parent's entrypoint script, not the intended child script (#1812, #1814) @devversion"react-jsx" and "react-jsxdev" in swc transpiler (#1800, #1802) @cspotcoderepl.evalCode() with code not ending in a newline would not update the typechecker accordingly (#1764, #1824) @cspotcodev10.8.2...v10.9.0
https://github.com/TypeStrong/ts-node/milestone/16?closed=1
Revert "Use file URL for source map paths" ( #1821 ) @cspotcode
Fixed
v10.8.1...v10.8.2
https://github.com/TypeStrong/ts-node/milestone/15?closed=1
Fixed #1769 : source URLs in source map cache were malformed on Windows, affecting code coverage reports ( #1769 , #1771 ) @PaperStrike
Fixed
v10.8.0...v10.8.1
https://github.com/TypeStrong/ts-node/milestone/14
Questions about this release? Ask in the official discussion thread: #1767
Questions about this release? Ask in the official discussion thread: #1767
Added
module=NodeNext, module=Node16, .mts, .cts, .mjs, and .cjs file extensions (#1414, #1694, #1744, #1745, #1727, #1717, #1753, #1757) @cspotcode
experimentalResolver (docs)experimentalResolver, will be enabled by default in a future version (docs)import "./foo.js" will execute foo.ts See also: TypeScript issue #37582import "./foo.ts"experimentalSpecifierResolution (#1727, #1753) @cspotcode
--experimental-specifier-resolution (Node docs)tsconfig.json for convenience, to avoid the CLI flagdiagnostics property to TSError, with array of TypeScript diagnostic objects from the compiler (API docs) (#1705, #1706) @paulbrimicombeChanged
experimentalResolverFeatures to experimentalResolver (docs) (#1727) @cspotcodeshortCircuit: true (#1714, #1715) @cspotcodeFixed
.type command was not showing any type information when using TypeScript nightly builds (#1761, #1762) @cspotcodepreferTsExts combined with third-party transpiler hooks could disrupt nyc code coverage (#1755) @cspotcodefile:// URLs in stack traces did not always use percent-encoding (#1738, #1726, #1729) @cspotcodeDocs
--project is -P, not -p (#1731, #1734) @lobsterkatiev10.7.0...v10.8.0
https://github.com/TypeStrong/ts-node/milestone/12
Questions about this release? Ask in the official discussion thread: #1680
Questions about this release? Ask in the official discussion thread: #1680
Added
--esm flag, option, and ts-node-esm binary (#1258, #1655)
esm support; no need for --loader nor NODE_OPTIONS#!/usr/bin/env ts-node-esm, run ts-node --esm, or add to your tsconfig.json: "ts-node": {"esm": true}Changed
--experimental-json-modulesFixed
v10.6.0...v10.7.0
https://github.com/TypeStrong/ts-node/milestone/11
Questions about this release? Ask in the official discussion thread: #1666
Questions about this release? Ask in the official discussion thread: #1666
Added
mocha with --loader ts-node/esm, where previously node would throw [ERR_UNKNOWN_FILE_EXTENSION]--loader with an extensionless entrypoint causes this error nodejs/node#33226mocha, have an extensionless entrypoint. (source, source)NODE_OPTIONS=--loader ts-node/esm with these tools causes this error. mochajs/mocha#4645moduleTypes overrides (#1650)Fixed
--swc and other third-party transpilers did not respect moduleTypes overrides (#1651, #1652, #1660)process.execArgv (#1657, #1658)
child_process.fork(), since it uses process.execArgv to create a similar child runtime.child_process.fork() will preserve both node flags and ts-node hooks.v10.5.0...v10.6.0
https://github.com/TypeStrong/ts-node/milestone/9
Not a breaking change; CLI continues to accept both forms
Questions about this release? Ask in the official discussion thread: #1634
Added
transpileOnly-style transformation.isolatedModules. This will only affect rare cases such as using const enums with preserveConstEnums disabled.swc: true convenience option (docs) (#1487, #1536, #1613, #1627)
"swc": true or --swc will use swc for faster execution@swc/core or @swc/wasm dependencies from your project before falling-back to global installations (#1613, #1627)
traceResolution output (docs) (#1128, #1491) @TheUnlockedts-node -vvv also logs absolute paths to ts-node and typescript, to make it more obvious when you're accidentally using globally-installed versions (#1323, #1620)Changed
v8-compile-cache-lib to load typescript
--camelCase and --hyphen-case for all CLI flags; update documentation to use --camelCase (#1598, #1599)
TSError diagnosticText property non-enumerable to prevent it from being logged below the stack (#1632)Fixed
undefined for all inputs after the first when using swc transpiler (#1478, #1580, #1602)--showConfig output, emit accurate moduleTypes paths resolved relative to the tsconfig.json which declared them (#1389, #1619)ts-node --help output (#1597, #1600)tsconfig.schemastore-schema.json (#1425, #1618)"use strict" emit in SWC transpiler (#1531, #1537)ERR_UNKNOWN_FILE_EXTENSION constructor; was throwing ERR_UNKNOWN_FILE_EXTENSION is not a constructor (#1562) @blueloversenv -S flag for shebangs (docs) (#1448, #1545) @sheeit, @cheeskipIgnore when you want to compile files in node_modules (docs) (#1553) @webstrandmoduleTypes on options page (docs) (#1630, #1633)experimentalResolverFeatures option, but it does not do anything yet (#1514, #1614)v10.4.0...v10.5.0
https://github.com/TypeStrong/ts-node/milestone/4
Adds support for targets "es2020" and "es2021" to swc transpiler
Added
Changed
creatEsmHooks (API docs) (#1506, #1529)Fixed
https://github.com/TypeStrong/ts-node/compare/v10.3.1...v10.4.0 https://github.com/TypeStrong/ts-node/milestone/8
Add version check to use new loader hooks API for node >=16.12.0 (#1522) @shrujalshah28
Fixed
https://github.com/TypeStrong/ts-node/compare/v10.3.0...v10.3.1 https://github.com/TypeStrong/ts-node/milestone/7
register(options) is still supported; no breaking changes
Questions about this release? Ask in the official discussion thread: #1507
Added
util.promisify(setTimeout)(1000) or fs.readFileSync('example.txt')createEsmHooks() function to create ESM loader hooks (API docs) (#1439) @nonara
register() accepts a ts-node Service (API docs) (#1474)
register(options) is still supported; no breaking changes--emit to --help output (#1400, #1484) @markbradley27Changed
require('source-map-support'), they will be redirected to @cspotcode/source-map-support
Fixed
source-map-support instead of @cspotcode/source-map-support (#1440, #1441, #1438, #1495, cspotcode/node-source-map-support#23, #1496, #1497) @ejose19
require('source-map-support'), they will be redirected to @cspotcode/source-map-support@cspotcode/source-map-support for the fixes and enhancements listed here: @cspotcode/source-map-support changelog100 on first line and * 2 on second line would erronously be interpreted as 100 * 2allowJs (#1488, #1489)TS_NODE_IGNORE and TS_NODE_IGNORE_DIAGNOSTICS; treat empty environment variable as empty array (#1301, #1483) @ValeriaVG
TS_NODE_IGNORE= ts-node ./example.ts will disable default ignore rules; will compile files in ./node_modulesDocs
https://github.com/TypeStrong/ts-node/compare/v10.2.1...v10.3.0 https://github.com/TypeStrong/ts-node/milestone/5
Fixes #1426: Do not import typescript outside of configuration/project loading (#1433, #1426) @Songkeys
Fixed
https://github.com/TypeStrong/ts-node/compare/v10.2.0...v10.2.1 https://github.com/TypeStrong/ts-node/milestone/6
Questions about this release? Ask in the official discussion thread: #1423
Questions about this release? Ask in the official discussion thread: #1423
Added
"pretty": false disables pretty formatting of diagnostics even when stdout is a TTY (#1418, #1420) @elevatebart
pretty option, not to be confused with TypeScript's pretty optionconst foo = 1 in the REPL, foo is unused. We ignore the resulting diagnostic foo is declared but its value is never readFixed
--loaderasync annotations (#1405, #1410)require.resolve error when @types/node peerDependency is missing (#1419, #1422)https://github.com/TypeStrong/ts-node/compare/v10.1.0...v10.2.0 https://github.com/TypeStrong/ts-node/milestone/2
Un-deprecate scope and scopeDir; add both to CLI and tsconfig.json options; un-deprecate TS_NODE_SCOPE env var; add TS_NODE_SCOPE_DIR env var (docs) (…
Questions about this release? Ask in the official discussion thread: #1390
Added
"moduleType" option to override module type -- CommonJS or ECMAScript -- on select files. (docs) (#1342, #1371, #1376)
webpack.config.ts, must execute as CommonJS but the rest of the project is ESMpackage.json "type" and tsconfig.json "module".cjs and .mjs extensions, but for .ts and .tsx files"extends" support for "ts-node" options in tsconfig.json (#1328, #1356)
"ts-node": {} options will be parsed from extended tsconfigsscope and scopeDir; add both to CLI and tsconfig.json options; un-deprecate TS_NODE_SCOPE env var; add TS_NODE_SCOPE_DIR env var (docs) (#1346, #1367)Changed
"ts-node" object at the top of --showConfig output instead of the bottom (#1355)Fixed
[stdin], [eval], and <repl> contexts (#1333)
ts-node -e__filename, __dirname, module and sub-fields of module, exports, and builtin module aliases fs, etckeepClassNames to true (#1344)Docs
node --loader ts-node/esm (docs) (#1379)https://github.com/TypeStrong/ts-node/compare/v10.0.0...v10.1.0 https://github.com/TypeStrong/ts-node/milestone/3
*Breaking changes are prefixed with [BREAKING]*
Questions about this release? Ask in the official discussion thread: #1337
Breaking changes are prefixed with [BREAKING]
Added
--show-config to log the resolved configuration (docs) (#1100, #1243)swc integration and new --transpiler option to use third-party transpilers for a massive speed boost on large codebases (docs) (#779, #1160)scopeDir API option (docs) (#1155)projectSearchDir API option (docs) (#1155)--cwd-mode and ts-node-cwd to resolve config file relative to cwd, not entrypoint script (#1155)Changed
--script-mode default behavior; resolve tsconfig relative to entrypoint script instead of cwd (#949, #1197, #1155)
$PATH, because ts-node will respect the script's local tsconfig.json--cwd-mode or ts-node-cwd if you need legacy behaviorignore rules evaluate relative to tsconfig.json directory, otherwise cwd (#1155)--dir to --cwd; rename TS_NODE_DIR to TS_NODE_CWD (#1155)
--dir and TS_NODE_DIR are deprecated but still parsed for backwards-compatibility--dir effectively changed the working directory of ts-node; renaming makes this behavior more obviousDeprecated
TS_NODE_SCOPE (#1155)--dir and TS_NODE_DIR (#1155)Removed
DEFAULTS, normalizeSlashes, parse, splitts-node's programmatic APIFixed
ERR_REQUIRE_ESM when attempting to execute ESM as CJS, even when not using --loader ts-node/esm (#1232)
nodecompiler is loaded relative to tsconfig.json instead of entrypoint script (#1155)
ts-node ./index may execute the wrong file extension because tsconfig search poisons the require.resolve cache (#1155)Docs
CONTRIBUTING.md to document the codebase and our development workflowhttps://github.com/TypeStrong/ts-node/compare/v9.1.1...v10.0.0 https://github.com/TypeStrong/ts-node/milestone/1
No code changes. We re-packed and republished v9.1.1, because the v9.1.0 package was broken due to an npm v7 bug.
No code changes. We re-packed and republished v9.1.1, because the v9.1.0 package was broken due to an npm v7 bug.
Fixes
Expose ts-node REPL via the API (#1121) @MarcManiez
Added
--typeCheck flag to override --transpileOnly flag specified in tsconfig.json (#1142)Changed
Register to Service. It is still aliased as Register for backwards compatibility (#1158)Fixed
--es-module-specifier-resolution as an alias of --experimental-specifier-resolution for node 12 compatibility (#1122) @nguyensomniacDocs
ts-node-dev in README (#1131) @iamandrewlucatransformers description to clarify incompatibility with transpileOnly (#1123)Misc
https://github.com/TypeStrong/ts-node/compare/v9.0.0...v9.1.0
*Breaking changes are labelled [BREAKING] below.*
Breaking changes are labelled [BREAKING] below.
Added
ERR_REQUIRE_ESM when a file is require()d which should be loaded as ESM (#1031)"exports" declaration to package.json in backwards-compatible way, enabling node --loader ts-node/esm without file extension (#1028)"require" option via tsconfig (#925)NODE_NO_READLINE environment variable (#1090)node --loader ts-node/esm/transpile-only (#1102) @concisionChanged
Fixed
realpath, which should fix workflows that use symlinks, such as pnpm, Lerna workspaces, or other mono-repo configurations (#970)node_modules when --skip-ignore or --ignore options are configured to allow it (#970)getSourceFileNames/rootNames (#999)projectVersion every time getSourceFileNames changes, avoiding accidentally outdated typechecking (#998)ts.transpileModule (#1054) @thetutlage--experimental-specifier-resolution coming from NODE_OPTIONS in ESM loader (#1085) @evg656e.cjs, .mjs, and any unexpected file extensions (#1103) @concisionDocs
Misc
https://github.com/TypeStrong/ts-node/compare/v8.10.2...v9.0.0
Fixes #1037: source maps broken on Windows.
Fixed
Fixes #1037: source maps broken on Windows. (#1038)
Misc
Fix failing tests on node 6 (#1035)
Push coverage from Github Actions; remove TravisCI (#1034)
Run tests e2e against an npm pack && npm installed ts-node (#1032)
Run CI tests on Windows (#1041)
Run CI only once per commit on pull requests and master (#1042)
Fixes #1026: revert the addition of package.json "exports" because it blocked require()s that used to work, for example require('ts-node/register')
Fix
Fixes #1026: revert the addition of package.json "exports" because it blocked require()s that used to work, for example require('ts-node/register') (#1027)
Experimental support for native ECMAScript modules in node >=13 (#1007, #1010)
Added
Experimental support for native ECMAScript modules in node >=13 (#1007, #1010)
Fix --interactive / -i flag so it forces REPL even when stdin is not a TTY
Fixed
Fix --interactive / -i flag so it forces REPL even when stdin is not a TTY (#1019)
Fix failing tests caused by recent changes to @types/node (#1016) Fix #945: Bump source-map-support dependency to include upstream fix for worker thre
Fixed
Fix failing tests caused by recent changes to @types/node (#1016)
Fix #945: Bump source-map-support dependency to include upstream fix for worker threads error handling (#1015) @addaleax
Fix #1004: in --scriptMode, resolve config file relative to realpath of entrypoint script (#1009)
Normalized filenames in cache to fix performance issues on Windows (#997) @sylc
Added
Add timestamps to debug logging (#994) @sylc
Docs
Improve coverage of the README (#1000) @KasparEtter
Change order of install commands in README (#993) @jacobdcastro
Mention ts-node -vv flag in issue template (#1001)
Run GHActions tests on pull requests (#1017)
Avoid pushing to rootFileNames with version
Fixed
rootFileNames with versionhttps://github.com/TypeStrong/ts-node/compare/v8.8.0...v8.8.1
Fixed
--files support be2c899https://github.com/TypeStrong/ts-node/compare/v8.8.0...v8.8.1
Add sanitize=true to README for SVGs to work on NPM
Added
sanitize=true to README for SVGs to work on NPMFixed
projectVersion++ by incrementing on each file changegetScriptFileNames (#985) - revisits the change in https://github.com/TypeStrong/ts-node/issues/884https://github.com/TypeStrong/ts-node/compare/v8.7.0...v8.8.0
Deprecate ts-script in favor of ts-node-script (#948) @G-Rath
Fixed
ts.sys.readDirectory (#969)- (#944)Added
LanguageServiceHost::getProjectVersion to workaround microsoft/TypeScript#36748 (#906ts-node-transpile-only binary (#939) @G-RathChanged
ts-script in favor of ts-node-script (#948) @G-RathDocs
Downgrade yn due to node engine
Fixed
yn due to node engine (#942)Fix the resolution order of TS_NODE_COMPILER_OPTIONS - closes https://github.com/TypeStrong/ts-node/issues/938
Fixed
TS_NODE_COMPILER_OPTIONS - closes https://github.com/TypeStrong/ts-node/issues/938Remove normalize slashes from config file loading for Windows
Fixed
Added
tsconfig.json (#921) @cspotcode 🎉dir to be configurable--build flag for emitting compiled TypeScript (under --compiler-host mode)Fix relative node_modules ignore 266eaa5
node_modules ignore 266eaa5Pass correct diagnostics list in transpile mode (#917) 907e3e1
Fixed
--ignore relative ea6e1daRevert --require module loading change
Fixed
--require module loading changeExpose ts-script for relative tsconfig.json files from
Added
ts-script for relative tsconfig.json files from <script.ts>--interactive CLI optionts-node instance information on processenable of registered ts-node instances--dir to be configurable from CLI--scope flag for directory scoped compilation of TypeScriptcreate function for programmatic compiler usageFixed
Revert "List all files in memory cache improves perf 1.4x" 87a6e2c
Fixed
Introduce transformers program support (#879) 12ff53d
Added
Fixed
Added - Support --prefer-ts-exts flag
Added
--prefer-ts-exts flagExpand FS cache to all file system operations
Added
Changed
Remove realpath from TypeScript compiler to support existing use-cases without preserveSymlinks
Fixed
realpath from TypeScript compiler to support existing use-cases without preserveSymlinksExpose --log-error option for logging on TypeScript compilation issues
Added
--log-error option for logging on TypeScript compilation issuesChanged
incremental and tsBuildInfoFile compiler optionsFall back on resolving relative TypeScript packages (normal resolution is from working directory, these two things can be the same in the case of loca
Added
Override include property, not includes 🤕
Fixed
include property, not includes 🤕Add missing arg to package.json dependencies
Fixed
arg to package.json dependenciesThe -p option must now be -pe since arg does not support optional flag and string at the same time
Changed
-p option must now be -pe since arg does not support optional flag and string at the same timekebab-casets-node arguments in execArgv for forked processes to usets-node REPL taking a long time in a large user directoryStrip TypeScript composite flag from configuration file
Added
composite flag from configuration fileSkip loading tsconfig.json files configuration, by default, to improve startup (e.g. files included by includes or files)
Changed
tsconfig.json files configuration, by default, to improve startup (e.g. files included by includes or files)
New flag (--files) can be used to disable loading files from tsconfig.json by default
Added
--files) can be used to disable loading files from tsconfig.json by defaultCorrect CLI default flags using environment variables
Fixed
buffer-from module for old-node.js compatibilityAdded
Delete emitDeclarationOnly from configuration to ensure config is valid
Fixed
emitDeclarationOnly from configuration to ensure config is validUse TypeScript error formatting for diagnostic ouput
Changed
declarationMap option from input configuration under ts-nodeMore places to normalize for Windows to work
Fixed
normalize for Windows to workUse Buffer.from instead of deprecated new Buffer
Fixed
Buffer.from instead of deprecated new BufferUse Script#runInThisContext via REPL to ensure objects all exist in the same context
Fixed
Script#runInThisContext via REPL to ensure objects all exist in the same contextFixed an issue where empty files were not returned to TypeScript, resulting in "not found" compiler issues
Fixed
Add -T short flag for transpile only mode
Changed
-T short flag for transpile only modeMany people were having issues with "fast" transpilation being the default over full project type checking like tsc. Type checking the full project up
Many people were having issues with "fast" transpilation being the default over full project type checking like tsc. Type checking the full project upfront is slower but expected behaviour, so it's the default once again. You can still enable transpileOnly or ts-node/register/transpile-only for the faster transpiler without type checking.
Changed
typeCheck == true || transpileOnly == falseIgnore TypeScript rootDir errors
Fixed
rootDir errorsRemove the sub-process spawning behaviour that introduced issues with 4.x
Changed
node -r ts-node/register for advanced node.js flags such as --inspecttsconfig.json to mirror tsc behaviours
project in 5.xFixed
Your coding agent can read these notes before it upgrades. Set up the MCP server →