TypeStrong/ts-node
### [`v10.5.0`](https://togithub.com/TypeStrong/ts-node/releases/v10.5.0)
[Compare Source](https://togithub.com/TypeStrong/ts-node/compare/v10.4.0...v10.5.0)
Questions about this release? Ask in the official discussion thread: [#1634](https://togithub.com/TypeStrong/ts-node/issues/1634)
**Added**
- Eliminate "Emit Skipped" errors ([#693](https://togithub.com/TypeStrong/ts-node/issues/693), [#1345](https://togithub.com/TypeStrong/ts-node/issues/1345), [#1629](https://togithub.com/TypeStrong/ts-node/issues/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 using `const enums` with `preserveConstEnums` disabled.
- Fixes [#693](https://togithub.com/TypeStrong/ts-node/issues/693)
- Graduate swc transpiler out of experimental; add `swc: true` convenience option ([docs](https://typestrong.org/ts-node/docs/transpilers)) ([#1487](https://togithub.com/TypeStrong/ts-node/issues/1487), [#1536](https://togithub.com/TypeStrong/ts-node/issues/1536), [#1613](https://togithub.com/TypeStrong/ts-node/issues/1613), [#1627](https://togithub.com/TypeStrong/ts-node/issues/1627))
- `"swc": true` or `--swc` will use swc for faster execution
- This feature is no longer marked "experimental." Thank you to everyone who filed bugs!
- swc transpiler attempts to load `@swc/core` or `@swc/wasm` dependencies from your project before falling-back to global installations ([#1613](https://togithub.com/TypeStrong/ts-node/issues/1613), [#1627](https://togithub.com/TypeStrong/ts-node/issues/1627))
- global fallback only occurs when using a global installation of ts-node
- Add support for TypeScript's `traceResolution` output ([docs](https://www.typescriptlang.org/tsconfig/#traceResolution)) ([#1128](https://togithub.com/TypeStrong/ts-node/issues/1128), [#1491](https://togithub.com/TypeStrong/ts-node/issues/1491)) [@TheUnlocked](https://togithub.com/TheUnlocked)
- Support import assertions in ESM loader ([docs](https://nodejs.org/dist/latest-v17.x/docs/api/esm.html#import-assertions)) ([#1557](https://togithub.com/TypeStrong/ts-node/issues/1557), [#1558](https://togithub.com/TypeStrong/ts-node/issues/1558), [#1559](https://togithub.com/TypeStrong/ts-node/issues/1559), [#1573](https://togithub.com/TypeStrong/ts-node/issues/1573)) [@Pokute](https://togithub.com/Pokute), [@geigerzaehler](https://togithub.com/geigerzaehler)
- Allows importing JSON files from ESM with the requisite flag ([docs](https://nodejs.org/dist/latest-v17.x/docs/api/esm.html#json-modules))
- `ts-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](https://togithub.com/TypeStrong/ts-node/issues/1323), [#1620](https://togithub.com/TypeStrong/ts-node/issues/1620))
- Add swc target "es2022" ([#1535](https://togithub.com/TypeStrong/ts-node/issues/1535), [#1540](https://togithub.com/TypeStrong/ts-node/issues/1540))
- When you have target es2022 in tsconfig, will use swc's es2022 target
**Changed**
- Initialize TypeScript compiler before starting REPL prompt ([#1498](https://togithub.com/TypeStrong/ts-node/issues/1498)) [@TheUnlocked](https://togithub.com/TheUnlocked)
- Improves responsiveness for first line of REPL input
- Use `v8-compile-cache-lib` to load typescript
- improves startup time ([#1339](https://togithub.com/TypeStrong/ts-node/issues/1339), [#1603](https://togithub.com/TypeStrong/ts-node/issues/1603))
- Support both `--camelCase` and `--hyphen-case` for all CLI flags; update documentation to use `--camelCase` ([#1598](https://togithub.com/TypeStrong/ts-node/issues/1598), [#1599](https://togithub.com/TypeStrong/ts-node/issues/1599))
- Not a breaking change; CLI continues to accept both forms
- Make `TSError` `diagnosticText` property non-enumerable to prevent it from being logged below the stack ([#1632](https://togithub.com/TypeStrong/ts-node/issues/1632))
**Fixed**
- Fix [#1538](https://togithub.com/TypeStrong/ts-node/issues/1538): REPL inputs fail to transpile via swc ([#1538](https://togithub.com/TypeStrong/ts-node/issues/1538), [#1541](https://togithub.com/TypeStrong/ts-node/issues/1541), [#1602](https://togithub.com/TypeStrong/ts-node/issues/1602))
- Fix [#1478](https://togithub.com/TypeStrong/ts-node/issues/1478): REPL erroneously logged `undefined` for all inputs after the first when using swc transpiler ([#1478](https://togithub.com/TypeStrong/ts-node/issues/1478), [#1580](https://togithub.com/TypeStrong/ts-node/issues/1580), [#1602](https://togithub.com/TypeStrong/ts-node/issues/1602))
- Fix [#1389](https://togithub.com/TypeStrong/ts-node/issues/1389): In `--showConfig` output, emit accurate `moduleTypes` paths resolved relative to the `tsconfig.json` which declared them ([#1389](https://togithub.com/TypeStrong/ts-node/issues/1389), [#1619](https://togithub.com/TypeStrong/ts-node/issues/1619))
- Fix: Remove indentation from `ts-node --help` output ([#1597](https://togithub.com/TypeStrong/ts-node/issues/1597), [#1600](https://togithub.com/TypeStrong/ts-node/issues/1600))
- Fix [#1425](https://togithub.com/TypeStrong/ts-node/issues/1425): Merged definitions correctly into `tsconfig.schemastore-schema.json` ([#1425](https://togithub.com/TypeStrong/ts-node/issues/1425), [#1618](https://togithub.com/TypeStrong/ts-node/issues/1618))
- Fix: Allow disabling `"use strict"` emit in SWC transpiler ([#1531](https://togithub.com/TypeStrong/ts-node/issues/1531), [#1537](https://togithub.com/TypeStrong/ts-node/issues/1537))
- Fix: Add missing `ERR_UNKNOWN_FILE_EXTENSION` constructor; was throwing `ERR_UNKNOWN_FILE_EXTENSION is not a constructor` ([#1562](https://togithub.com/TypeStrong/ts-node/issues/1562)) [@bluelovers](https://togithub.com/bluelovers)
- Fix [#1565](https://togithub.com/TypeStrong/ts-node/issues/1565): entrypoint resolution failed on node v12.0.x and v12.1.x ([#1565](https://togithub.com/TypeStrong/ts-node/issues/1565), [#1566](https://togithub.com/TypeStrong/ts-node/issues/1566)) [@davidmurdoch](https://togithub.com/davidmurdoch)
#### Docs
- Explain `env -S` flag for shebangs ([docs](https://typestrong.org/ts-node/docs/usage#shebang)) ([#1448](https://togithub.com/TypeStrong/ts-node/issues/1448), [#1545](https://togithub.com/TypeStrong/ts-node/issues/1545)) [@sheeit](https://togithub.com/sheeit), [@chee](https://togithub.com/chee)
- Suggest `skipIgnore` when you want to compile files in node_modules ([docs](https://typestrong.org/ts-node/docs/how-it-works)) ([#1553](https://togithub.com/TypeStrong/ts-node/issues/1553)) [@webstrand](https://togithub.com/webstrand)
- Fix typo in `moduleTypes` on options page ([docs](https://typestrong.org/ts-node/docs/options)) ([#1630](https://togithub.com/TypeStrong/ts-node/issues/1630), [#1633](https://togithub.com/TypeStrong/ts-node/issues/1633))
#### Misc
- Adds experimental `experimentalResolverFeatures` option, but it does not do anything yet ([#1514](https://togithub.com/TypeStrong/ts-node/issues/1514), [#1614](https://togithub.com/TypeStrong/ts-node/issues/1614))
https://github.com/TypeStrong/ts-node/milestone/4
### [`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
Configuration
📅 Schedule: At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
[ ] If you want to rebase/retry this PR, click this checkbox.
This PR contains the following updates:
10.3.0
->10.5.0
Release Notes
TypeStrong/ts-node
### [`v10.5.0`](https://togithub.com/TypeStrong/ts-node/releases/v10.5.0) [Compare Source](https://togithub.com/TypeStrong/ts-node/compare/v10.4.0...v10.5.0) Questions about this release? Ask in the official discussion thread: [#1634](https://togithub.com/TypeStrong/ts-node/issues/1634) **Added** - Eliminate "Emit Skipped" errors ([#693](https://togithub.com/TypeStrong/ts-node/issues/693), [#1345](https://togithub.com/TypeStrong/ts-node/issues/1345), [#1629](https://togithub.com/TypeStrong/ts-node/issues/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 using `const enums` with `preserveConstEnums` disabled. - Fixes [#693](https://togithub.com/TypeStrong/ts-node/issues/693) - Graduate swc transpiler out of experimental; add `swc: true` convenience option ([docs](https://typestrong.org/ts-node/docs/transpilers)) ([#1487](https://togithub.com/TypeStrong/ts-node/issues/1487), [#1536](https://togithub.com/TypeStrong/ts-node/issues/1536), [#1613](https://togithub.com/TypeStrong/ts-node/issues/1613), [#1627](https://togithub.com/TypeStrong/ts-node/issues/1627)) - `"swc": true` or `--swc` will use swc for faster execution - This feature is no longer marked "experimental." Thank you to everyone who filed bugs! - swc transpiler attempts to load `@swc/core` or `@swc/wasm` dependencies from your project before falling-back to global installations ([#1613](https://togithub.com/TypeStrong/ts-node/issues/1613), [#1627](https://togithub.com/TypeStrong/ts-node/issues/1627)) - global fallback only occurs when using a global installation of ts-node - Add support for TypeScript's `traceResolution` output ([docs](https://www.typescriptlang.org/tsconfig/#traceResolution)) ([#1128](https://togithub.com/TypeStrong/ts-node/issues/1128), [#1491](https://togithub.com/TypeStrong/ts-node/issues/1491)) [@TheUnlocked](https://togithub.com/TheUnlocked) - Support import assertions in ESM loader ([docs](https://nodejs.org/dist/latest-v17.x/docs/api/esm.html#import-assertions)) ([#1557](https://togithub.com/TypeStrong/ts-node/issues/1557), [#1558](https://togithub.com/TypeStrong/ts-node/issues/1558), [#1559](https://togithub.com/TypeStrong/ts-node/issues/1559), [#1573](https://togithub.com/TypeStrong/ts-node/issues/1573)) [@Pokute](https://togithub.com/Pokute), [@geigerzaehler](https://togithub.com/geigerzaehler) - Allows importing JSON files from ESM with the requisite flag ([docs](https://nodejs.org/dist/latest-v17.x/docs/api/esm.html#json-modules)) - `ts-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](https://togithub.com/TypeStrong/ts-node/issues/1323), [#1620](https://togithub.com/TypeStrong/ts-node/issues/1620)) - Add swc target "es2022" ([#1535](https://togithub.com/TypeStrong/ts-node/issues/1535), [#1540](https://togithub.com/TypeStrong/ts-node/issues/1540)) - When you have target es2022 in tsconfig, will use swc's es2022 target **Changed** - Initialize TypeScript compiler before starting REPL prompt ([#1498](https://togithub.com/TypeStrong/ts-node/issues/1498)) [@TheUnlocked](https://togithub.com/TheUnlocked) - Improves responsiveness for first line of REPL input - Use `v8-compile-cache-lib` to load typescript - improves startup time ([#1339](https://togithub.com/TypeStrong/ts-node/issues/1339), [#1603](https://togithub.com/TypeStrong/ts-node/issues/1603)) - Support both `--camelCase` and `--hyphen-case` for all CLI flags; update documentation to use `--camelCase` ([#1598](https://togithub.com/TypeStrong/ts-node/issues/1598), [#1599](https://togithub.com/TypeStrong/ts-node/issues/1599)) - Not a breaking change; CLI continues to accept both forms - Make `TSError` `diagnosticText` property non-enumerable to prevent it from being logged below the stack ([#1632](https://togithub.com/TypeStrong/ts-node/issues/1632)) **Fixed** - Fix [#1538](https://togithub.com/TypeStrong/ts-node/issues/1538): REPL inputs fail to transpile via swc ([#1538](https://togithub.com/TypeStrong/ts-node/issues/1538), [#1541](https://togithub.com/TypeStrong/ts-node/issues/1541), [#1602](https://togithub.com/TypeStrong/ts-node/issues/1602)) - Fix [#1478](https://togithub.com/TypeStrong/ts-node/issues/1478): REPL erroneously logged `undefined` for all inputs after the first when using swc transpiler ([#1478](https://togithub.com/TypeStrong/ts-node/issues/1478), [#1580](https://togithub.com/TypeStrong/ts-node/issues/1580), [#1602](https://togithub.com/TypeStrong/ts-node/issues/1602)) - Fix [#1389](https://togithub.com/TypeStrong/ts-node/issues/1389): In `--showConfig` output, emit accurate `moduleTypes` paths resolved relative to the `tsconfig.json` which declared them ([#1389](https://togithub.com/TypeStrong/ts-node/issues/1389), [#1619](https://togithub.com/TypeStrong/ts-node/issues/1619)) - Fix: Remove indentation from `ts-node --help` output ([#1597](https://togithub.com/TypeStrong/ts-node/issues/1597), [#1600](https://togithub.com/TypeStrong/ts-node/issues/1600)) - Fix [#1425](https://togithub.com/TypeStrong/ts-node/issues/1425): Merged definitions correctly into `tsconfig.schemastore-schema.json` ([#1425](https://togithub.com/TypeStrong/ts-node/issues/1425), [#1618](https://togithub.com/TypeStrong/ts-node/issues/1618)) - Fix: Allow disabling `"use strict"` emit in SWC transpiler ([#1531](https://togithub.com/TypeStrong/ts-node/issues/1531), [#1537](https://togithub.com/TypeStrong/ts-node/issues/1537)) - Fix: Add missing `ERR_UNKNOWN_FILE_EXTENSION` constructor; was throwing `ERR_UNKNOWN_FILE_EXTENSION is not a constructor` ([#1562](https://togithub.com/TypeStrong/ts-node/issues/1562)) [@bluelovers](https://togithub.com/bluelovers) - Fix [#1565](https://togithub.com/TypeStrong/ts-node/issues/1565): entrypoint resolution failed on node v12.0.x and v12.1.x ([#1565](https://togithub.com/TypeStrong/ts-node/issues/1565), [#1566](https://togithub.com/TypeStrong/ts-node/issues/1566)) [@davidmurdoch](https://togithub.com/davidmurdoch) #### Docs - Explain `env -S` flag for shebangs ([docs](https://typestrong.org/ts-node/docs/usage#shebang)) ([#1448](https://togithub.com/TypeStrong/ts-node/issues/1448), [#1545](https://togithub.com/TypeStrong/ts-node/issues/1545)) [@sheeit](https://togithub.com/sheeit), [@chee](https://togithub.com/chee) - Suggest `skipIgnore` when you want to compile files in node_modules ([docs](https://typestrong.org/ts-node/docs/how-it-works)) ([#1553](https://togithub.com/TypeStrong/ts-node/issues/1553)) [@webstrand](https://togithub.com/webstrand) - Fix typo in `moduleTypes` on options page ([docs](https://typestrong.org/ts-node/docs/options)) ([#1630](https://togithub.com/TypeStrong/ts-node/issues/1630), [#1633](https://togithub.com/TypeStrong/ts-node/issues/1633)) #### Misc - Adds experimental `experimentalResolverFeatures` option, but it does not do anything yet ([#1514](https://togithub.com/TypeStrong/ts-node/issues/1514), [#1614](https://togithub.com/TypeStrong/ts-node/issues/1614)) https://github.com/TypeStrong/ts-node/milestone/4 ### [`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/7Configuration
📅 Schedule: At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by WhiteSource Renovate. View repository job log here.