Skip to content
CodeMorph
Esc
  • No results for ""

Supported projects

The languages, file types, module systems, frameworks and test runners CodeMorph works with, and known limits.

CodeMorph works at the level of modules and imports, so it isn't tied to a particular framework. If your project is JavaScript with a package.json, it's very likely a good fit.

Languages and file types

ExtensionScannedConverted
.jsYesTo .ts
.jsxYesTo .tsx
.mjs, .cjsYesModule-format aware
.ts, .tsxYesAlready typed
.css, .json and other assetsAs import targetsNo

Mixed JavaScript and TypeScript projects are fully supported. Existing TypeScript counts as already typed.

Module systems

  • ES modules: import, export, export * from, export { x } from, namespace imports and default exports.
  • CommonJS: require(), destructured requires, module.exports and exports.x.
  • Dynamic imports: import() calls, recorded as dynamic edges.
  • Type-only imports: import type, recorded separately.

See the guide CommonJS to ES modules for converting module systems during a migration.

Resolution

  • Relative paths, with extension probing and index files.
  • compilerOptions.paths and baseUrl from tsconfig.json or jsconfig.json.
  • TypeScript NodeNext-style specifiers, where ./x.js refers to x.ts.
  • Packages declared in package.json, including scoped packages and subpaths such as @scope/pkg/sub.
  • Node built-ins, with or without the node: prefix.

Frameworks and runtimes

StackNotes
ReactComponents in .jsx become .tsx, with props typed from how they're rendered
Next.jsPages, components and API routes migrate like any other module; your build script verifies framework conventions
ViteWorks alongside Vite's own TypeScript support; verified with your build
Node.jsESM and CommonJS backends, scripts and CLIs
ExpressRoutes, middleware and models; see Typing an Express API

Test runners

Run & Verify runs your test script from package.json, so any runner works: Jest, Vitest, Mocha, node:test and others. Test files are recognized by .test. and .spec. in the name or a __tests__/ folder.

Package managers

npm, pnpm and Yarn projects all work. CodeMorph detects which one you use from your lockfile.

Known limits

  • Files over 1 MB are skipped. These are almost always generated or bundled code.
  • Multi-root workspaces: only the first folder is scanned. In a monorepo, open the package you want to migrate.
  • Untrusted workspaces: the CodeMorph engine doesn't run in Restricted Mode.
  • Code generated at runtime (for example, require with a computed string) can't be resolved statically and is recorded as unresolved.
  • Non-JavaScript languages aren't migrated.

Something unclear or out of date? Tell us.