Skip to content

Fix/support ts v6#190

Merged
nonara merged 12 commits into
masterfrom
fix/support-ts-v6
May 1, 2026
Merged

Fix/support ts v6#190
nonara merged 12 commits into
masterfrom
fix/support-ts-v6

Conversation

@nonara
Copy link
Copy Markdown
Owner

@nonara nonara commented May 1, 2026

nonara added 12 commits April 28, 2026 13:19
BREAKING CHANGE: Node.js 22.12.0 or newer is now required.
Removes the legacy esm package fallback and loads compiled ESM transformer output through native Node require(esm). Forced-ESM .cts transformer entries are now rejected with a clear error pointing to .mts or removing isEsm.

Re-enables ESM transformer coverage and removes stale missing-esm fixture scaffolding. Includes a small TsInstance typing fix so the patch self-build sees the originalCreateProgram augmentation under the TS 5.9 baseline.

BREAKING CHANGE: removes the optional esm package fallback. ESM transformer loading now relies on Node >=22.12.0 native ESM support. Configuring isEsm: true on a .cts transformer entry is now rejected.
…require wrap with module.registerHooks

Drop ts-node for TypeScript transformer loading, replace it with direct TypeScript compiler API compilation and format classification, and swap the previous require-wrapper module interception for Node module.registerHooks().

Transformer source now supports nested TS imports, transformer tsConfig options, path aliases, package/module format inference, inline source maps, and scoped hook deregistration without relying on ts-node at runtime.

Classify transformer load format through TypeScript per-file emit-format workers so .mts/.cts, package "type", NodeNext semantics, and explicit transformer tsConfig settings follow compiler behavior. Known non-Node module wrappers are rejected, None/undecided formats fall back to the legacy CJS runtime behavior, and unknown future module kinds are treated as ESM.

Add module-format coverage for extension semantics, package/module inference, transformer tsConfig, unsupported module kinds, and runtime guidance for CJS/ESM mismatch cases.

BREAKING CHANGE: raises the Node.js floor to >=22.15.0 for module.registerHooks(). TypeScript transformer loading no longer uses ts-node; transformer module format is inferred from TypeScript compiler semantics, and the public isEsm option has been removed.
@nonara nonara merged commit aea4d89 into master May 1, 2026
2 checks passed
@nonara nonara deleted the fix/support-ts-v6 branch May 1, 2026 18:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Not working with TypeScript v6.0 update

1 participant