ts-node icon indicating copy to clipboard operation
ts-node copied to clipboard

[META] v11 breaking changes

Open cspotcode opened this issue 4 years ago • 0 comments

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
  • [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

cspotcode avatar Oct 11 '21 04:10 cspotcode