TypeStrong/ts-node
### [`v10.4.0`](https://togithub.com/TypeStrong/ts-node/releases/v10.4.0)
[Compare Source](https://togithub.com/TypeStrong/ts-node/compare/v10.3.1...v10.4.0)
**Added**
- Adds support for targets "es2020" and "es2021" to swc transpiler ([#1521](https://togithub.com/TypeStrong/ts-node/issues/1521))
- Adds automatic target downgrade when using older versions of swc ([#1521](https://togithub.com/TypeStrong/ts-node/issues/1521))
- If tsconfig specifies es2020, but your version of swc only supports up to es2019, ts-node will automatically switch to es2019 instead of throwing an error
**Changed**
- Improves types and API docs for `creatEsmHooks` ([API docs](https://typestrong.org/ts-node/api/index.html#createEsmHooks)) ([#1506](https://togithub.com/TypeStrong/ts-node/issues/1506), [#1529](https://togithub.com/TypeStrong/ts-node/issues/1529))
**Fixed**
- Fix [#1526](https://togithub.com/TypeStrong/ts-node/issues/1526): data URL handling in new ESM loader hooks API ([#1526](https://togithub.com/TypeStrong/ts-node/issues/1526), [#1529](https://togithub.com/TypeStrong/ts-node/issues/1529))
https://github.com/TypeStrong/ts-node/milestone/8
### [`v10.3.1`](https://togithub.com/TypeStrong/ts-node/releases/v10.3.1)
[Compare Source](https://togithub.com/TypeStrong/ts-node/compare/v10.3.0...v10.3.1)
**Fixed**
- Add version check to use new loader hooks API for node >=16.12.0 ([#1522](https://togithub.com/TypeStrong/ts-node/issues/1522)) [@shrujalshah28](https://togithub.com/shrujalshah28)
https://github.com/TypeStrong/ts-node/milestone/7
### [`v10.3.0`](https://togithub.com/TypeStrong/ts-node/releases/v10.3.0)
[Compare Source](https://togithub.com/TypeStrong/ts-node/compare/v10.2.1...v10.3.0)
Questions about this release? Ask in the official discussion thread: [#1507](https://togithub.com/TypeStrong/ts-node/issues/1507)
**Added**
- Declare types for node builtin modules within REPL so you do not need to import them ([#1424](https://togithub.com/TypeStrong/ts-node/issues/1424), [#1500](https://togithub.com/TypeStrong/ts-node/issues/1500))
- Node REPL exposes builtin modules as globals; typechecker now understands this
- Typechecking should no longer raise errors when using builtins without first importing
- For example: `util.promisify(setTimeout)(1000)` or `fs.readFileSync('example.txt')`
- Add `createEsmHooks()` function to create ESM loader hooks ([API docs](https://typestrong.org/ts-node/api/index.html#createEsmHooks)) ([#1439](https://togithub.com/TypeStrong/ts-node/issues/1439)) [@nonara](https://togithub.com/nonara)
- Can be used to compose our loader hooks with another loader or additional logic
- `register()` accepts a ts-node `Service` ([API docs](https://typestrong.org/ts-node/api/index.html#register)) ([#1474](https://togithub.com/TypeStrong/ts-node/issues/1474))
- `register(options)` is still supported; no breaking changes
- Add support for Node.js's new loader hooks API ([#1372](https://togithub.com/TypeStrong/ts-node/issues/1372), [#1457](https://togithub.com/TypeStrong/ts-node/issues/1457), [#1007](https://togithub.com/TypeStrong/ts-node/issues/1007)) [@jonaskello](https://togithub.com/jonaskello)
- Node.js has changed their loader hooks API
- ts-node is compatible with all node versions, detects your node version and exposes the correct hooks API
- Node's new API currently only available in node v17 nightly builds
- Node will eventually backport the changes to node 16, and may also be backport to 14 and 12
- Add `--emit` to `--help` output ([#1400](https://togithub.com/TypeStrong/ts-node/issues/1400), [#1484](https://togithub.com/TypeStrong/ts-node/issues/1484)) [@markbradley27](https://togithub.com/markbradley27)
**Changed**
- When ts-node is registered and other libraries `require('source-map-support')`, they will be redirected to `@cspotcode/source-map-support`
- See complete description in **Fixed** section below
**Fixed**
- Fix [#1440](https://togithub.com/TypeStrong/ts-node/issues/1440), [#1441](https://togithub.com/TypeStrong/ts-node/issues/1441), [#1438](https://togithub.com/TypeStrong/ts-node/issues/1438), [#1495](https://togithub.com/TypeStrong/ts-node/issues/1495): Incorrect stack traces when third-party libraries use `source-map-support` instead of `@cspotcode/source-map-support` ([#1440](https://togithub.com/TypeStrong/ts-node/issues/1440), [#1441](https://togithub.com/TypeStrong/ts-node/issues/1441), [#1438](https://togithub.com/TypeStrong/ts-node/issues/1438), [#1495](https://togithub.com/TypeStrong/ts-node/issues/1495), [cspotcode/node-source-map-support#23](https://togithub.com/cspotcode/node-source-map-support/issues/23), [#1496](https://togithub.com/TypeStrong/ts-node/issues/1496), [#1497](https://togithub.com/TypeStrong/ts-node/issues/1497)) [@ejose19](https://togithub.com/ejose19)
- When ts-node is registered and other libraries `require('source-map-support')`, they will be redirected to `@cspotcode/source-map-support`
- ts-node uses `@cspotcode/source-map-support` for the fixes and enhancements listed here: [`@cspotcode/source-map-support` changelog](https://togithub.com/cspotcode/node-source-map-support/issues/24)
- To ensure correct stack traces, all libraries must share a compatible sourcemap support implementation
- Fix [#1363](https://togithub.com/TypeStrong/ts-node/issues/1363): REPL may erroneously combine previous input with next input, eval both as a single statement ([#1363](https://togithub.com/TypeStrong/ts-node/issues/1363), [#1480](https://togithub.com/TypeStrong/ts-node/issues/1480)) [@TheUnlocked](https://togithub.com/TheUnlocked)
- For example, entering `100` on first line and `* 2` on second line would erronously be interpreted as `100 * 2`
- REPL now ensures both lines are separate statements, both when typechecking and when evaluating
- Fix [#1488](https://togithub.com/TypeStrong/ts-node/issues/1488): Node may log "circular dependency" warning when using `allowJs` ([#1488](https://togithub.com/TypeStrong/ts-node/issues/1488), [#1489](https://togithub.com/TypeStrong/ts-node/issues/1489))
- Fix [#1301](https://togithub.com/TypeStrong/ts-node/issues/1301): Filter empty strings from `TS_NODE_IGNORE` and `TS_NODE_IGNORE_DIAGNOSTICS`; treat empty environment variable as empty array ([#1301](https://togithub.com/TypeStrong/ts-node/issues/1301), [#1483](https://togithub.com/TypeStrong/ts-node/issues/1483)) [@ValeriaVG](https://togithub.com/ValeriaVG)
- `TS_NODE_IGNORE= ts-node ./example.ts` will disable default ignore rules; will compile files in `./node_modules`
**Docs**
- Update VSCode debug configuration ([Docs](https://typestrong.org/ts-node/docs/recipes/visual-studio-code)) ([#1466](https://togithub.com/TypeStrong/ts-node/issues/1466))
- Update ESM-related messaging to clarify that experimental status is due to Node.js, not ts-node ([#1455](https://togithub.com/TypeStrong/ts-node/issues/1455))
- Refer to ts-node consistently ([#1481](https://togithub.com/TypeStrong/ts-node/issues/1481)) [@animafps](https://togithub.com/animafps)
https://github.com/TypeStrong/ts-node/milestone/5
Microsoft/TypeScript
### [`v4.4.4`](https://togithub.com/Microsoft/TypeScript/releases/v4.4.4)
[Compare Source](https://togithub.com/Microsoft/TypeScript/compare/v4.4.3...v4.4.4)
This patch release contains fixes for [a performance regression in `--build` mode](https://togithub.com/microsoft/TypeScript/issues/46204) by [only calling `realpath` on `package.json`](https://togithub.com/microsoft/TypeScript/pull/462090) files only when those files are known to exist on disk, and [to only perform this work under `--watch` mode](https://togithub.com/microsoft/TypeScript/pull/46211).
***
For release notes, check out the [release announcement](https://devblogs.microsoft.com/typescript/announcing-typescript-4-4/).
For the complete list of fixed issues, check out the
- [fixed issues query for Typescript 4.4.0 (Beta)](https://togithub.com/microsoft/TypeScript/issues?q=milestone%3A%22TypeScript+4.4.0+%28Beta%29%22+).
- [fixed issues query for Typescript 4.4.1 (RC)](https://togithub.com/microsoft/TypeScript/issues?q=milestone%3A%22TypeScript+4.4.1+%28RC%29%22+).
- [fixed issues query for Typescript 4.4.2](https://togithub.com/microsoft/TypeScript/issues?q=milestone%3A%22TypeScript+4.4.2%22+).
- [fixed issues query for Typescript 4.4.3](https://togithub.com/microsoft/TypeScript/issues?q=milestone%3A%22TypeScript+4.4.3%22+).
- [fixed issues query for Typescript 4.4.4](https://togithub.com/microsoft/TypeScript/issues?q=milestone%3A%22TypeScript+4.4.4%22+).
Downloads are available on:
- [npm](https://www.npmjs.com/package/typescript)
- [Visual Studio 2017/2019](https://marketplace.visualstudio.com/items?itemName=TypeScriptTeam.TypeScript-444) ([Select new version in project options](https://togithub.com/Microsoft/TypeScript/wiki/Updating-TypeScript-in-Visual-Studio-2017))
- [NuGet package](https://www.nuget.org/packages/Microsoft.TypeScript.MSBuild)
Configuration
📅 Schedule: "on the first day of the month" (UTC).
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.
[ ] If you want to rebase/retry this PR, click this checkbox.
This PR contains the following updates:
10.2.1
->10.4.0
4.4.3
->4.4.4
Release Notes
TypeStrong/ts-node
### [`v10.4.0`](https://togithub.com/TypeStrong/ts-node/releases/v10.4.0) [Compare Source](https://togithub.com/TypeStrong/ts-node/compare/v10.3.1...v10.4.0) **Added** - Adds support for targets "es2020" and "es2021" to swc transpiler ([#1521](https://togithub.com/TypeStrong/ts-node/issues/1521)) - Adds automatic target downgrade when using older versions of swc ([#1521](https://togithub.com/TypeStrong/ts-node/issues/1521)) - If tsconfig specifies es2020, but your version of swc only supports up to es2019, ts-node will automatically switch to es2019 instead of throwing an error **Changed** - Improves types and API docs for `creatEsmHooks` ([API docs](https://typestrong.org/ts-node/api/index.html#createEsmHooks)) ([#1506](https://togithub.com/TypeStrong/ts-node/issues/1506), [#1529](https://togithub.com/TypeStrong/ts-node/issues/1529)) **Fixed** - Fix [#1526](https://togithub.com/TypeStrong/ts-node/issues/1526): data URL handling in new ESM loader hooks API ([#1526](https://togithub.com/TypeStrong/ts-node/issues/1526), [#1529](https://togithub.com/TypeStrong/ts-node/issues/1529)) https://github.com/TypeStrong/ts-node/milestone/8 ### [`v10.3.1`](https://togithub.com/TypeStrong/ts-node/releases/v10.3.1) [Compare Source](https://togithub.com/TypeStrong/ts-node/compare/v10.3.0...v10.3.1) **Fixed** - Add version check to use new loader hooks API for node >=16.12.0 ([#1522](https://togithub.com/TypeStrong/ts-node/issues/1522)) [@shrujalshah28](https://togithub.com/shrujalshah28) https://github.com/TypeStrong/ts-node/milestone/7 ### [`v10.3.0`](https://togithub.com/TypeStrong/ts-node/releases/v10.3.0) [Compare Source](https://togithub.com/TypeStrong/ts-node/compare/v10.2.1...v10.3.0) Questions about this release? Ask in the official discussion thread: [#1507](https://togithub.com/TypeStrong/ts-node/issues/1507) **Added** - Declare types for node builtin modules within REPL so you do not need to import them ([#1424](https://togithub.com/TypeStrong/ts-node/issues/1424), [#1500](https://togithub.com/TypeStrong/ts-node/issues/1500)) - Node REPL exposes builtin modules as globals; typechecker now understands this - Typechecking should no longer raise errors when using builtins without first importing - For example: `util.promisify(setTimeout)(1000)` or `fs.readFileSync('example.txt')` - Add `createEsmHooks()` function to create ESM loader hooks ([API docs](https://typestrong.org/ts-node/api/index.html#createEsmHooks)) ([#1439](https://togithub.com/TypeStrong/ts-node/issues/1439)) [@nonara](https://togithub.com/nonara) - Can be used to compose our loader hooks with another loader or additional logic - `register()` accepts a ts-node `Service` ([API docs](https://typestrong.org/ts-node/api/index.html#register)) ([#1474](https://togithub.com/TypeStrong/ts-node/issues/1474)) - `register(options)` is still supported; no breaking changes - Add support for Node.js's new loader hooks API ([#1372](https://togithub.com/TypeStrong/ts-node/issues/1372), [#1457](https://togithub.com/TypeStrong/ts-node/issues/1457), [#1007](https://togithub.com/TypeStrong/ts-node/issues/1007)) [@jonaskello](https://togithub.com/jonaskello) - Node.js has changed their loader hooks API - ts-node is compatible with all node versions, detects your node version and exposes the correct hooks API - Node's new API currently only available in node v17 nightly builds - Node will eventually backport the changes to node 16, and may also be backport to 14 and 12 - Add `--emit` to `--help` output ([#1400](https://togithub.com/TypeStrong/ts-node/issues/1400), [#1484](https://togithub.com/TypeStrong/ts-node/issues/1484)) [@markbradley27](https://togithub.com/markbradley27) **Changed** - When ts-node is registered and other libraries `require('source-map-support')`, they will be redirected to `@cspotcode/source-map-support` - See complete description in **Fixed** section below **Fixed** - Fix [#1440](https://togithub.com/TypeStrong/ts-node/issues/1440), [#1441](https://togithub.com/TypeStrong/ts-node/issues/1441), [#1438](https://togithub.com/TypeStrong/ts-node/issues/1438), [#1495](https://togithub.com/TypeStrong/ts-node/issues/1495): Incorrect stack traces when third-party libraries use `source-map-support` instead of `@cspotcode/source-map-support` ([#1440](https://togithub.com/TypeStrong/ts-node/issues/1440), [#1441](https://togithub.com/TypeStrong/ts-node/issues/1441), [#1438](https://togithub.com/TypeStrong/ts-node/issues/1438), [#1495](https://togithub.com/TypeStrong/ts-node/issues/1495), [cspotcode/node-source-map-support#23](https://togithub.com/cspotcode/node-source-map-support/issues/23), [#1496](https://togithub.com/TypeStrong/ts-node/issues/1496), [#1497](https://togithub.com/TypeStrong/ts-node/issues/1497)) [@ejose19](https://togithub.com/ejose19) - When ts-node is registered and other libraries `require('source-map-support')`, they will be redirected to `@cspotcode/source-map-support` - ts-node uses `@cspotcode/source-map-support` for the fixes and enhancements listed here: [`@cspotcode/source-map-support` changelog](https://togithub.com/cspotcode/node-source-map-support/issues/24) - To ensure correct stack traces, all libraries must share a compatible sourcemap support implementation - Fix [#1363](https://togithub.com/TypeStrong/ts-node/issues/1363): REPL may erroneously combine previous input with next input, eval both as a single statement ([#1363](https://togithub.com/TypeStrong/ts-node/issues/1363), [#1480](https://togithub.com/TypeStrong/ts-node/issues/1480)) [@TheUnlocked](https://togithub.com/TheUnlocked) - For example, entering `100` on first line and `* 2` on second line would erronously be interpreted as `100 * 2` - REPL now ensures both lines are separate statements, both when typechecking and when evaluating - Fix [#1488](https://togithub.com/TypeStrong/ts-node/issues/1488): Node may log "circular dependency" warning when using `allowJs` ([#1488](https://togithub.com/TypeStrong/ts-node/issues/1488), [#1489](https://togithub.com/TypeStrong/ts-node/issues/1489)) - Fix [#1301](https://togithub.com/TypeStrong/ts-node/issues/1301): Filter empty strings from `TS_NODE_IGNORE` and `TS_NODE_IGNORE_DIAGNOSTICS`; treat empty environment variable as empty array ([#1301](https://togithub.com/TypeStrong/ts-node/issues/1301), [#1483](https://togithub.com/TypeStrong/ts-node/issues/1483)) [@ValeriaVG](https://togithub.com/ValeriaVG) - `TS_NODE_IGNORE= ts-node ./example.ts` will disable default ignore rules; will compile files in `./node_modules` **Docs** - Update VSCode debug configuration ([Docs](https://typestrong.org/ts-node/docs/recipes/visual-studio-code)) ([#1466](https://togithub.com/TypeStrong/ts-node/issues/1466)) - Update ESM-related messaging to clarify that experimental status is due to Node.js, not ts-node ([#1455](https://togithub.com/TypeStrong/ts-node/issues/1455)) - Refer to ts-node consistently ([#1481](https://togithub.com/TypeStrong/ts-node/issues/1481)) [@animafps](https://togithub.com/animafps) https://github.com/TypeStrong/ts-node/milestone/5Microsoft/TypeScript
### [`v4.4.4`](https://togithub.com/Microsoft/TypeScript/releases/v4.4.4) [Compare Source](https://togithub.com/Microsoft/TypeScript/compare/v4.4.3...v4.4.4) This patch release contains fixes for [a performance regression in `--build` mode](https://togithub.com/microsoft/TypeScript/issues/46204) by [only calling `realpath` on `package.json`](https://togithub.com/microsoft/TypeScript/pull/462090) files only when those files are known to exist on disk, and [to only perform this work under `--watch` mode](https://togithub.com/microsoft/TypeScript/pull/46211). *** For release notes, check out the [release announcement](https://devblogs.microsoft.com/typescript/announcing-typescript-4-4/). For the complete list of fixed issues, check out the - [fixed issues query for Typescript 4.4.0 (Beta)](https://togithub.com/microsoft/TypeScript/issues?q=milestone%3A%22TypeScript+4.4.0+%28Beta%29%22+). - [fixed issues query for Typescript 4.4.1 (RC)](https://togithub.com/microsoft/TypeScript/issues?q=milestone%3A%22TypeScript+4.4.1+%28RC%29%22+). - [fixed issues query for Typescript 4.4.2](https://togithub.com/microsoft/TypeScript/issues?q=milestone%3A%22TypeScript+4.4.2%22+). - [fixed issues query for Typescript 4.4.3](https://togithub.com/microsoft/TypeScript/issues?q=milestone%3A%22TypeScript+4.4.3%22+). - [fixed issues query for Typescript 4.4.4](https://togithub.com/microsoft/TypeScript/issues?q=milestone%3A%22TypeScript+4.4.4%22+). Downloads are available on: - [npm](https://www.npmjs.com/package/typescript) - [Visual Studio 2017/2019](https://marketplace.visualstudio.com/items?itemName=TypeScriptTeam.TypeScript-444) ([Select new version in project options](https://togithub.com/Microsoft/TypeScript/wiki/Updating-TypeScript-in-Visual-Studio-2017)) - [NuGet package](https://www.nuget.org/packages/Microsoft.TypeScript.MSBuild)Configuration
📅 Schedule: "on the first day of the month" (UTC).
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.
This PR has been generated by WhiteSource Renovate. View repository job log here.