ts-node
ts-node copied to clipboard
[META] v11 breaking changes
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.createIncrementalProgramfallback tots.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 inregister() - [x] Re-align TS version support with DefinitelyTyped
- Find DT's minimum supported version
- 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-scriptentrypoint; replaced byts-node-script - [x] Make
ts-node/dist/binmain()export@internal - [x] Modify
nodeEvalfunction signature to acceptcontext: Context(See TODO in the code) - [x] change signature of REPL
nodeEval(code: string, context: anytonodeEval(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
createEvalAwarePartialHostAPI surface- Augment
ServiceAPI to allow setting overridden file contents - Use this new override API surface in the REPL
- Eliminate the need for
evalAwarePartialHostbut leave a pass-through shim for backwards compatibility - Update code samples to use simpler API
- Augment
- [ ] Enable path-mapping by default (#1585, https://github.com/TypeStrong/ts-node/pull/1585#issuecomment-1021102392)
- [ ] resolve
compilerandtranspileroptions 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
- if tsconfig.json extends ./node_modules/foo/tsconfig.shared.json which declares
- For example:
- [ ] forbid
-pwithout-e; exit with an error if you try to pass-pwithout-e; suggest you maybe meant-Pto 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
- Might be breaking change to transpiler or
- [ ] #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, notcommonjs - [ ] types update: remove third arg from loader hooks'
nextcallback