Breaking changes we should include in the next major, v11 ## Implemented in #1760 Minimum node version: v14 Minimum TS version: 4.0 (from https://github.com/DefinitelyTyped/DefinitelyTyped#support-window) * [x] Remove `ts.createIncrementalProgram` fallback to `ts.createEmitAndSemanticDiagnosticsBuilderProgram` * https://github.com/TypeStrong/ts-node/blob/1cc91d9e2cdc9ad6676296f6d3e2d190e592652b/src/index.ts#L988-L989 * https://github.com/TypeStrong/ts-node/blob/1cc91d9e2cdc9ad6676296f6d3e2d190e592652b/src/index.ts#L1023-L1025 * TS 3.7 already has both of these * [x] stop installing source-map-support in `create()`; only in `register()` * [x] Re-align TS version support with DefinitelyTyped * Find [DT's minimum supported version](https://github.com/DefinitelyTyped/DefinitelyTyped#support-window) * Find all semver checks for versions older than that; remove them * [x] Make `enableExperimentalEsmLoaderInterop()` on by default * and remove the conditional code, remove that enabler method * [x] Re-align node version support w/EOLs * Did we officially announce the dropping of node 10? Or do we merely support non-EOLed versions as a general policy * [x] remove `ts-script` entrypoint; replaced by `ts-node-script` * [x] Make `ts-node/dist/bin` `main()` export `@internal` * [x] Modify `nodeEval` function signature to accept `context: Context` (See TODO in the code) * [x] change signature of REPL `nodeEval(code: string, context: any` to `nodeEval(code: string, context: Context` * [x] remove @tsconfig/bases node10 and node12 * [x] add @tsconfig/bases node18 * [x] switch all @tsconfig/bases deps to wildcard (like is typically done for @types) so they will respect whatever version you want to install ## Still to do * [ ] Mention minimum supported node and TS versions in docs: node 14, TS 4.0 * [ ] Clean up `createEvalAwarePartialHost` API surface * Augment `Service` API to allow setting overridden file contents * Use this new override API surface in the REPL * Eliminate the need for `evalAwarePartialHost` but leave a pass-through shim for backwards compatibility * Update code samples to use simpler API * [ ] Enable path-mapping by default (#1585, https://github.com/TypeStrong/ts-node/pull/1585#issuecomment-1021102392) * [ ] resolve `compiler` and `transpiler` options relative to the tsconfig that declared them. In "extends" chains, this may be different - For example: - if tsconfig.json extends ./node_modules/foo/tsconfig.shared.json which declares `compiler: "augmented-ts"` - should resolve compiler ./node_modules/foo/node_modules/augmented-ts * [ ] forbid `-p` without `-e`; exit with an error if you try to pass `-p` without `-e`; suggest you maybe meant `-P` to specify a config file? * [ ] change options precedence order: CLI flags > environment variables > config file > defaults * [ ] #1785 * Might be breaking change to transpiler or `compile()` APIs, since will be returning an error description instead of throwing an error * [ ] #1834 * Discussion: https://github.com/TypeStrong/ts-node/pull/1814#discussion_r917322122 * [ ] #1831 * [ ] auto-enable `experimentalResolver`; convert it to a non-experimental, opt-out flag * Captured as part of #1756 * [ ] default to `nodenext`, not `commonjs` * [ ] types update: remove third arg from loader hooks' `next` callback
Breaking changes we should include in the next major, v11
Implemented in #1760
Minimum node version: v14
Minimum TS version: 4.0 (from https://github.com/DefinitelyTyped/DefinitelyTyped#support-window)
ts.createIncrementalProgramfallback tots.createEmitAndSemanticDiagnosticsBuilderProgramts-node/src/index.ts
Lines 988 to 989 in 1cc91d9
ts-node/src/index.ts
Lines 1023 to 1025 in 1cc91d9
create(); only inregister()enableExperimentalEsmLoaderInterop()on by defaultts-scriptentrypoint; replaced byts-node-scriptts-node/dist/binmain()export@internalnodeEvalfunction signature to acceptcontext: Context(See TODO in the code)nodeEval(code: string, context: anytonodeEval(code: string, context: ContextStill to do
createEvalAwarePartialHostAPI surfaceServiceAPI to allow setting overridden file contentsevalAwarePartialHostbut leave a pass-through shim for backwards compatibilitycompilerandtranspileroptions relative to the tsconfig that declared them. In "extends" chains, this may be differentcompiler: "augmented-ts"-pwithout-e; exit with an error if you try to pass-pwithout-e; suggest you maybe meant-Pto specify a config file?TSError, create and throw error in lowest point of ts-node callstack #1785compile()APIs, since will be returning an error description instead of throwing an errorcwdoption, or at least stop resolving entrypoint relative to it #1834experimentalResolver; convert it to a non-experimental, opt-out flagnodenext, notcommonjsnextcallback