Repository navigation
Breaking change
ts2esm now requires Node.js 20.17, 22.13, or 23.5 and later, because @inquirer/prompts 8 needs it.
Fixes
module.exports = { ... }and other assignments that aren't a plain identifier or function are converted instead of deleted.module.exports.foo = barnow exportsfooinstead ofbar, and values likemodule.exports.answer = 42produce valid code. Fixes #125 in #210.- Imports from packages that define
exportsin theirpackage.jsonstay untouched, sopkg/subno longer becomespkg/sub.jsand fails withERR_PACKAGE_PATH_NOT_EXPORTED. Legacy packages likelodash/omitstill get.js. Fixes #128 in #212. - Path aliases declared in a root
tsconfig.jsonthat an app's tsconfig extends are resolved from the right directory, so monorepo imports like@mylib/utils/helperget their extension. Aliases with several targets try each one in order. Fixes #127 in #213. - Importing ts2esm as a library works again.
maininpackage.jsonpointed to a file that was never built. #215
Dependencies
Upgraded to ts-morph 28 and TypeScript 6.0, along with the rest of the dependencies. #214