Closed renovate[bot] closed 6 months ago
Renovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR.
You can manually request rebase by checking the rebase/retry box above.
ā Warning: custom changes will be lost.
Because you closed this PR without merging, Renovate will ignore this update. You will not get PRs for any future 10.x
releases. But if you manually upgrade to 10.x
then Renovate will re-enable minor
and patch
updates automatically.
If you accidentally closed this PR, or if you changed your mind: rename this PR to get a fresh replacement PR.
This PR contains the following updates:
^8.3.0
->^10.0.0
Release Notes
TypeStrong/ts-node
### [`v10.9.1`](https://togithub.com/TypeStrong/ts-node/releases/tag/v10.9.1) [Compare Source](https://togithub.com/TypeStrong/ts-node/compare/v10.9.0...v10.9.1) **Fixed** - Workaround nodejs bug introduced in 18.6.0 ([#1838](https://togithub.com/TypeStrong/ts-node/issues/1838)) [@cspotcode](https://togithub.com/cspotcode) - Only affects projects on node >=18.6.0 using `--esm` - Older versions of node and projects without `--esm` are unaffected https://github.com/TypeStrong/ts-node/milestone/18?closed=1 ### [`v10.9.0`](https://togithub.com/TypeStrong/ts-node/releases/tag/v10.9.0) [Compare Source](https://togithub.com/TypeStrong/ts-node/compare/v10.8.2...v10.9.0) **Added** - `--project` accepts path to a directory containing a `tsconfig.json` ([#1829](https://togithub.com/TypeStrong/ts-node/issues/1829), [#1830](https://togithub.com/TypeStrong/ts-node/issues/1830)) [@cspotcode](https://togithub.com/cspotcode) - previously it required an explicit filename - Added helpful error message when swc version is too old to support our configuration ([#1802](https://togithub.com/TypeStrong/ts-node/issues/1802)) [@cspotcode](https://togithub.com/cspotcode) - Added `experimentalTsImportSpecifiers` option which allows using voluntary `.ts` file extensions in import specifiers (undocumented except for [API docs](https://typestrong.org/ts-node/api/interfaces/CreateOptions.html#experimentalTsImportSpecifiers)) ([#1815](https://togithub.com/TypeStrong/ts-node/issues/1815)) [@cspotcode](https://togithub.com/cspotcode) **Fixed** - Fixed bug where `child_process.fork()` would erroneously execute the parent's entrypoint script, not the intended child script ([#1812](https://togithub.com/TypeStrong/ts-node/issues/1812), [#1814](https://togithub.com/TypeStrong/ts-node/issues/1814)) [@devversion](https://togithub.com/devversion) - Fixed support for jsx modes `"react-jsx"` and `"react-jsxdev"` in swc transpiler ([#1800](https://togithub.com/TypeStrong/ts-node/issues/1800), [#1802](https://togithub.com/TypeStrong/ts-node/issues/1802)) [@cspotcode](https://togithub.com/cspotcode) - Fixed support for import assertions in swc transpiler ([#1817](https://togithub.com/TypeStrong/ts-node/issues/1817), [#1802](https://togithub.com/TypeStrong/ts-node/issues/1802)) [@cspotcode](https://togithub.com/cspotcode) - Fixed bug where calling `repl.evalCode()` with code not ending in a newline would not update the typechecker accordingly ([#1764](https://togithub.com/TypeStrong/ts-node/issues/1764), [#1824](https://togithub.com/TypeStrong/ts-node/issues/1824)) [@cspotcode](https://togithub.com/cspotcode) https://github.com/TypeStrong/ts-node/milestone/16?closed=1 ### [`v10.8.2`](https://togithub.com/TypeStrong/ts-node/releases/tag/v10.8.2) [Compare Source](https://togithub.com/TypeStrong/ts-node/compare/v10.8.1...v10.8.2) **Fixed** - Revert "Use file URL for source map paths" ([#1821](https://togithub.com/TypeStrong/ts-node/issues/1821)) [@cspotcode](https://togithub.com/cspotcode) - Fixes [#1790](https://togithub.com/TypeStrong/ts-node/issues/1790): ts-node 10.8.1 regression where `nyc` code coverage reports had incorrect paths - Fixes [#1797](https://togithub.com/TypeStrong/ts-node/issues/1797): ts-node 10.8.1 regression where breakpoints did not hit in VSCode debugging - Allow JSON imports in node 16.15 and up ([#1792](https://togithub.com/TypeStrong/ts-node/issues/1792)) [@queengooborg](https://togithub.com/queengooborg) - JSON imports were already supported in v17.5 and up - this change extends support to >=16.15.0,<17.0.0 - These version ranges match vanilla node's support for JSON imports https://github.com/TypeStrong/ts-node/milestone/15?closed=1 ### [`v10.8.1`](https://togithub.com/TypeStrong/ts-node/releases/tag/v10.8.1) [Compare Source](https://togithub.com/TypeStrong/ts-node/compare/v10.8.0...v10.8.1) **Fixed** - Fixed [#1769](https://togithub.com/TypeStrong/ts-node/issues/1769): source URLs in source map cache were malformed on Windows, affecting code coverage reports ([#1769](https://togithub.com/TypeStrong/ts-node/issues/1769), [#1771](https://togithub.com/TypeStrong/ts-node/issues/1771)) [@PaperStrike](https://togithub.com/PaperStrike) - Fixed [#1778](https://togithub.com/TypeStrong/ts-node/issues/1778): typechecker was erronously resolving imports from ESM files as if they were from CJS files ([#1778](https://togithub.com/TypeStrong/ts-node/issues/1778), [#1782](https://togithub.com/TypeStrong/ts-node/issues/1782)) [@cspotcode](https://togithub.com/cspotcode) https://github.com/TypeStrong/ts-node/milestone/14 ### [`v10.8.0`](https://togithub.com/TypeStrong/ts-node/releases/tag/v10.8.0) [Compare Source](https://togithub.com/TypeStrong/ts-node/compare/v10.7.0...v10.8.0) Questions about this release? Ask in the official discussion thread: [#1767](https://togithub.com/TypeStrong/ts-node/issues/1767) **Added** - Added support for `module=NodeNext`, `module=Node16`, `.mts`, `.cts`, `.mjs`, and `.cjs` file extensions ([#1414](https://togithub.com/TypeStrong/ts-node/issues/1414), [#1694](https://togithub.com/TypeStrong/ts-node/issues/1694), [#1744](https://togithub.com/TypeStrong/ts-node/issues/1744), [#1745](https://togithub.com/TypeStrong/ts-node/issues/1745), [#1727](https://togithub.com/TypeStrong/ts-node/issues/1727), [#1717](https://togithub.com/TypeStrong/ts-node/issues/1717), [#1753](https://togithub.com/TypeStrong/ts-node/issues/1753), [#1757](https://togithub.com/TypeStrong/ts-node/issues/1757)) [@cspotcode](https://togithub.com/cspotcode) - For best results, enable `experimentalResolver` ([docs](https://typestrong.org/ts-node/docs/options#experimentalresolver)) - See TypeScript's official documentation: https://www.typescriptlang.org/docs/handbook/esm-node.html - enables mixed-mode projects with both ESM and CommonJS - enables all supported file extensions in TypeScript 4.7 - Obeys package.json "type" - Added ability to include file extensions in CommonJS imports ([#1727](https://togithub.com/TypeStrong/ts-node/issues/1727), [#1753](https://togithub.com/TypeStrong/ts-node/issues/1753)) [@cspotcode](https://togithub.com/cspotcode) - Enables consistency with ESM, where file extensions are often mandatory - Resolves from emitted to source file extensions ([#1727](https://togithub.com/TypeStrong/ts-node/issues/1727), [#1753](https://togithub.com/TypeStrong/ts-node/issues/1753)) [@cspotcode](https://togithub.com/cspotcode) - Must enable `experimentalResolver`, will be enabled by default in a future version ([docs](https://typestrong.org/ts-node/docs/options#experimentalresolver)) - Typechecker requires importing the *emitted* file extension; ts-node resolves correctly to the *source* file. E.g. `import "./foo.js"` will execute `foo.ts` See also: [TypeScript issue #37582](https://togithub.com/microsoft/TypeScript/issues/37582) - If typechecking is disabled, you can also use *source* file extensions. E.g. `import "./foo.ts"` - Added `experimentalSpecifierResolution` ([#1727](https://togithub.com/TypeStrong/ts-node/issues/1727), [#1753](https://togithub.com/TypeStrong/ts-node/issues/1753)) [@cspotcode](https://togithub.com/cspotcode) - the same as Node's `--experimental-specifier-resolution` ([Node docs](https://nodejs.org/dist/latest-v18.x/docs/api/esm.html#customizing-esm-specifier-resolution-algorithm)) - can also be specified in `tsconfig.json` for convenience, to avoid the CLI flag - allows omitting file extensions in ESM imports, plus a few other CommonJS-style conveniences - Adds `diagnostics` property to `TSError`, with array of TypeScript diagnostic objects from the compiler ([API docs](https://typestrong.org/ts-node/api/classes/TSError.html)) ([#1705](https://togithub.com/TypeStrong/ts-node/issues/1705), [#1706](https://togithub.com/TypeStrong/ts-node/issues/1706)) [@paulbrimicombe](https://togithub.com/paulbrimicombe) **Changed** - Renames option `experimentalResolverFeatures` to `experimentalResolver` ([docs](https://typestrong.org/ts-node/docs/options#experimentalresolver)) ([#1727](https://togithub.com/TypeStrong/ts-node/issues/1727)) [@cspotcode](https://togithub.com/cspotcode) - Internal change to ESM loader for compatibility with forthcoming node versions: returns `shortCircuit: true` ([#1714](https://togithub.com/TypeStrong/ts-node/issues/1714), [#1715](https://togithub.com/TypeStrong/ts-node/issues/1715)) [@cspotcode](https://togithub.com/cspotcode) - Performance: Optimize filesystem stat calls in ESM loader and new CommonJS resolver ([#1758](https://togithub.com/TypeStrong/ts-node/issues/1758), [#1759](https://togithub.com/TypeStrong/ts-node/issues/1759)) [@cspotcode](https://togithub.com/cspotcode) - Performance, maintenance: Upgrade source-mapper dependency "[@cspotcode/source-map-support](https://togithub.com/cspotcode/source-map-support)" - Switches to "trace-mapping" for underlying source-map parsing ([#1729](https://togithub.com/TypeStrong/ts-node/issues/1729)) [@cspotcode](https://togithub.com/cspotcode) **Fixed** - Fixed bug where REPL `.type` command was not showing any type information when using TypeScript nightly builds ([#1761](https://togithub.com/TypeStrong/ts-node/issues/1761), [#1762](https://togithub.com/TypeStrong/ts-node/issues/1762)) [@cspotcode](https://togithub.com/cspotcode) - Correctly suppress "Custom ESM Loaders" warning on newer node versions where the warning's prose changed ([#1701](https://togithub.com/TypeStrong/ts-node/issues/1701)) [@cspotcode](https://togithub.com/cspotcode) - Fixed REPL bug where function signatures could not be entered across multiple lines ([#1667](https://togithub.com/TypeStrong/ts-node/issues/1667), [#1677](https://togithub.com/TypeStrong/ts-node/issues/1677)) [@d9k](https://togithub.com/d9k) - REPL treats unparenthesized object literals as objects, instead of as block scopes ([#1697](https://togithub.com/TypeStrong/ts-node/issues/1697), [#1699](https://togithub.com/TypeStrong/ts-node/issues/1699)) [@jhmaster2000](https://togithub.com/jhmaster2000) - Fixed bug where `preferTsExts` combined with third-party transpiler hooks could disrupt `nyc` code coverage ([#1755](https://togithub.com/TypeStrong/ts-node/issues/1755)) [@cspotcode](https://togithub.com/cspotcode) - Fixed bug where `file://` URLs in stack traces did not always use percent-encoding ([#1738](https://togithub.com/TypeStrong/ts-node/issues/1738), [#1726](https://togithub.com/TypeStrong/ts-node/issues/1726), [#1729](https://togithub.com/TypeStrong/ts-node/issues/1729)) [@cspotcode](https://togithub.com/cspotcode) - Fixed bug where v8-compile-cache-lib did not correctly unhook itself ([#1717](https://togithub.com/TypeStrong/ts-node/issues/1717), [#1718](https://togithub.com/TypeStrong/ts-node/issues/1718), [#1719](https://togithub.com/TypeStrong/ts-node/issues/1719)) [@cspotcode](https://togithub.com/cspotcode) - This internal dependency is used to speed up loading the TypeScript compiler **Docs** - Many docs improvements ([#1682](https://togithub.com/TypeStrong/ts-node/issues/1682)) [@cspotcode](https://togithub.com/cspotcode) - Options page: each option its own linkable header w/usage example ([#1606](https://togithub.com/TypeStrong/ts-node/issues/1606)) [@cspotcode](https://togithub.com/cspotcode) - Categorize APIs in typedoc, make entrypoints more prominent ([#1456](https://togithub.com/TypeStrong/ts-node/issues/1456)) [@cspotcode](https://togithub.com/cspotcode) - Clarify that the shorthand for `--project` is `-P`, not `-p` ([#1731](https://togithub.com/TypeStrong/ts-node/issues/1731), [#1734](https://togithub.com/TypeStrong/ts-node/issues/1734)) [@lobsterkatie](https://togithub.com/lobsterkatie) - Add common ESM errors to Troubleshooting page ([#1607](https://togithub.com/TypeStrong/ts-node/issues/1607)) [@cspotcode](https://togithub.com/cspotcode) https://github.com/TypeStrong/ts-node/milestone/12 ### [`v10.7.0`](https://togithub.com/TypeStrong/ts-node/releases/tag/v10.7.0) [Compare Source](https://togithub.com/TypeStrong/ts-node/compare/v10.6.0...v10.7.0) Questions about this release? Ask in the official discussion thread: [#1680](https://togithub.com/TypeStrong/ts-node/issues/1680) **Added** - Adds `--esm` flag, option, and `ts-node-esm` binary ([#1258](https://togithub.com/TypeStrong/ts-node/issues/1258), [#1655](https://togithub.com/TypeStrong/ts-node/issues/1655)) - Enables full `esm` support; no need for `--loader` nor `NODE_OPTIONS` - Use shebang `#!/usr/bin/env ts-node-esm`, run `ts-node --esm`, or add to your tsconfig.json: `"ts-node": {"esm": true}` **Changed** - Unflag ESM json modules on node >=17.5.0 ([#1661](https://togithub.com/TypeStrong/ts-node/issues/1661), [#1665](https://togithub.com/TypeStrong/ts-node/issues/1665)) [@Jamesernator](https://togithub.com/Jamesernator) - no longer requires `--experimental-json-modules` - Lazy-load dependencies to improve startup responsiveness. ([#1676](https://togithub.com/TypeStrong/ts-node/issues/1676)) **Fixed** - Fixed bug where "compiler", "transpiler", and swc backend would not resolve relative to the tsconfig.json that declared them ([#1662](https://togithub.com/TypeStrong/ts-node/issues/1662), [#1655](https://togithub.com/TypeStrong/ts-node/issues/1655)) - Enables reusable tsconfig.json shared via node module to include necessary dependencies https://github.com/TypeStrong/ts-node/milestone/11 ### [`v10.6.0`](https://togithub.com/TypeStrong/ts-node/releases/tag/v10.6.0) [Compare Source](https://togithub.com/TypeStrong/ts-node/compare/v10.5.0...v10.6.0) Questions about this release? Ask in the official discussion thread: [#1666](https://togithub.com/TypeStrong/ts-node/issues/1666) **Added** - Adds workaround for extensionless entrypoints with ESM loader ([#1649](https://togithub.com/TypeStrong/ts-node/issues/1649), [#1654](https://togithub.com/TypeStrong/ts-node/issues/1654)) - You can now combine tools such as `mocha` with `--loader ts-node/esm`, where previously node would throw `[ERR_UNKNOWN_FILE_EXTENSION]` - node has a bug where combining `--loader` with an extensionless entrypoint causes this error [nodejs/node#33226](https://togithub.com/nodejs/node/issues/33226) - Some tools, for example `mocha`, have an extensionless entrypoint. ([source](https://togithub.com/mochajs/mocha/blob/547ffd73535088322579d3d2026432112eae3d4b/package.json#L37), [source](https://togithub.com/mochajs/mocha/blob/547ffd73535088322579d3d2026432112eae3d4b/bin/mocha)) - Combining `NODE_OPTIONS=--loader ts-node/esm` with these tools causes this error. [mochajs/mocha#4645](https://togithub.com/mochajs/mocha/issues/4645) - node intends to fix this bug in a future release: [nodejs/node#41711](https://togithub.com/nodejs/node/issues/41711) - In the interim, we have implemented a workaround in ts-node. - Adds support for target "ES2022" in `moduleTypes` overrides ([#1650](https://togithub.com/TypeStrong/ts-node/issues/1650)) **Fixed** - Fixed bug where `--swc` and other third-party transpilers did not respect `moduleTypes` overrides ([#1651](https://togithub.com/TypeStrong/ts-node/issues/1651), [#1652](https://togithub.com/TypeStrong/ts-node/issues/1652), [#1660](https://togithub.com/TypeStrong/ts-node/issues/1660)) - Fixed bug where node flags were not preserved correctly in `process.execArgv` ([#1657](https://togithub.com/TypeStrong/ts-node/issues/1657), [#1658](https://togithub.com/TypeStrong/ts-node/issues/1658)) - This affected `child_process.fork()`, since it uses `process.execArgv` to create a similar child runtime. - With this fix, `child_process.fork()` will preserve both node flags and `ts-node` hooks. - Fixed compatibility TypeScript 4.7's API changes ([#1647](https://togithub.com/TypeStrong/ts-node/issues/1647), [#1648](https://togithub.com/TypeStrong/ts-node/issues/1648)) https://github.com/TypeStrong/ts-node/milestone/9 ### [`v10.5.0`](https://togithub.com/TypeStrong/ts-node/releases/tag/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/tag/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/tag/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/tag/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 ### [`v10.2.1`](https://togithub.com/TypeStrong/ts-node/releases/tag/v10.2.1) [Compare Source](https://togithub.com/TypeStrong/ts-node/compare/v10.2.0...v10.2.1) **Fixed** - Fixes [#1426](https://togithub.com/TypeStrong/ts-node/issues/1426): Do not import typescript outside of configuration/project loading ([#1433](https://togithub.com/TypeStrong/ts-node/issues/1433), [#1426](https://togithub.com/TypeStrong/ts-node/issues/1426)) [@Songkeys](https://togithub.com/Songkeys) - We take care to load your project's version of typescript, falling back to a globally-installed version if necessary. - 10.2.0 introduced a bug where we did not do this consistently, causing global or npx installations of ts-node to attempt loading typescript relative to themselves, not your project. - This failed if typescript was not globally installed or npx did not install peer dependencies. https://github.com/TypeStrong/ts-node/milestone/6 ### [`v10.2.0`](https://togithub.com/TypeStrong/ts-node/releases/tag/v10.2.0) [Compare Source](https://togithub.com/TypeStrong/ts-node/compare/v10.1.0...v10.2.0) Questions about this release? Ask in the official discussion thread: [#1423](https://togithub.com/TypeStrong/ts-node/issues/1423) **Added** - Adds top-level await support to REPL ([#1383](https://togithub.com/TypeStrong/ts-node/issues/1383), [#245](https://togithub.com/TypeStrong/ts-node/issues/245)) [@ejose19](https://togithub.com/ejose19) - can be disabled with `--no-experimental-repl-await`, `experimentalReplAwait`, or `TS_NODE_EXPERIMENTAL_REPL_AWAIT` ([CLI docs](https://typestrong.org/ts-node/docs/options), [API docs](https://typestrong.org/ts-node/api/interfaces/CreateOptions.html#experimentalReplAwait)) - Setting `"pretty": false` disables pretty formatting of diagnostics even when stdout is a TTY ([#1418](https://togithub.com/TypeStrong/ts-node/issues/1418), [#1420](https://togithub.com/TypeStrong/ts-node/issues/1420)) [@elevatebart](https://togithub.com/elevatebart) - 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](https://togithub.com/TypeStrong/ts-node/issues/1396), [#1120](https://togithub.com/TypeStrong/ts-node/issues/1120), [#729](https://togithub.com/TypeStrong/ts-node/issues/729), [#850](https://togithub.com/TypeStrong/ts-node/issues/850), [#469](https://togithub.com/TypeStrong/ts-node/issues/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](https://togithub.com/TypeStrong/ts-node/issues/1412), [#1405](https://togithub.com/TypeStrong/ts-node/issues/1405)) **Fixed** - Fix [#1397](https://togithub.com/TypeStrong/ts-node/issues/1397): SWC transpiler should emit ECMAScript imports and exports when configuration dictates ([#1409](https://togithub.com/TypeStrong/ts-node/issues/1409), [#1397](https://togithub.com/TypeStrong/ts-node/issues/1397)) - Enables SWC transpiler to be used alongside `--loader` - Fix [#1403](https://togithub.com/TypeStrong/ts-node/issues/1403): source-map-support breaks rendering of node errors ([#1405](https://togithub.com/TypeStrong/ts-node/issues/1405), [#1403](https://togithub.com/TypeStrong/ts-node/issues/1403)) - Fix [#1410](https://togithub.com/TypeStrong/ts-node/issues/1410): rendering of async stack frames should include `async` annotations ([#1405](https://togithub.com/TypeStrong/ts-node/issues/1405), [#1410](https://togithub.com/TypeStrong/ts-node/issues/1410)) - Fix [#1411](https://togithub.com/TypeStrong/ts-node/issues/1411): wrong order of process 'exit' event and logging unhandled exception ([#1405](https://togithub.com/TypeStrong/ts-node/issues/1405), [#1411](https://togithub.com/TypeStrong/ts-node/issues/1411)) - Fix [#1419](https://togithub.com/TypeStrong/ts-node/issues/1419): Should not throw `require.resolve` error when `@types/node` peerDependency is missing ([#1419](https://togithub.com/TypeStrong/ts-node/issues/1419), [#1422](https://togithub.com/TypeStrong/ts-node/issues/1422)) https://github.com/TypeStrong/ts-node/milestone/2 ### [`v10.1.0`](https://togithub.com/TypeStrong/ts-node/releases/tag/v10.1.0) [Compare Source](https://togithub.com/TypeStrong/ts-node/compare/v10.0.0...v10.1.0) Questions about this release? Ask in the official discussion thread: [#1390](https://togithub.com/TypeStrong/ts-node/issues/1390) **Added** - Add `"moduleType"` option to override module type -- CommonJS or ECMAScript -- on select files. ([docs](https://typestrong.org/ts-node/docs/module-type-overrides)) ([#1342](https://togithub.com/TypeStrong/ts-node/issues/1342), [#1371](https://togithub.com/TypeStrong/ts-node/issues/1371), [#1376](https://togithub.com/TypeStrong/ts-node/issues/1376)) - Useful when a configuration file, for example `webpack.config.ts`, must execute as CommonJS but the rest of the project is ESM - selectively overrides `package.json` `"type"` and `tsconfig.json` `"module"` - akin to `.cjs` and `.mjs` extensions, but for `.ts` and `.tsx` files - thanks to [@jayaddison](https://togithub.com/jayaddison) for help on test coverage - Implement `"extends"` support for `"ts-node"` options in `tsconfig.json` ([#1328](https://togithub.com/TypeStrong/ts-node/issues/1328), [#1356](https://togithub.com/TypeStrong/ts-node/issues/1356)) - `"ts-node": {}` options will be parsed from extended tsconfigs - allows sharing and deduplicating ts-node configuration - 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](https://typestrong.org/ts-node/docs/options)) ([#1346](https://togithub.com/TypeStrong/ts-node/issues/1346), [#1367](https://togithub.com/TypeStrong/ts-node/issues/1367)) **Changed** - Improve error messages thrown by native ESM loader hooks ([#1357](https://togithub.com/TypeStrong/ts-node/issues/1357), [#1373](https://togithub.com/TypeStrong/ts-node/issues/1373)) [@tars0x9752](https://togithub.com/tars0x9752) - messages more closely match node; are more descriptive - Emit `"ts-node"` object at the top of `--showConfig` output instead of the bottom ([#1355](https://togithub.com/TypeStrong/ts-node/issues/1355)) **Fixed** - Fix [#1282](https://togithub.com/TypeStrong/ts-node/issues/1282): Set correct globals in `[stdin]`, `[eval]`, and `Configuration
š Schedule: Branch creation - At any time (no schedule defined), Automerge - 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 Mend Renovate. View repository job log here.