Skip to content

refactor(codemods): simplify TypeScript output config options#10505

Open
BobrImperator wants to merge 1 commit intowarp-drive-data:mainfrom
BobrImperator:codemods-sensible-defaults
Open

refactor(codemods): simplify TypeScript output config options#10505
BobrImperator wants to merge 1 commit intowarp-drive-data:mainfrom
BobrImperator:codemods-sensible-defaults

Conversation

@BobrImperator
Copy link
Copy Markdown
Contributor

@BobrImperator BobrImperator commented Mar 25, 2026

The main goal of this PR is to simplify the configuration as well as provide sensible defaults. I.e. currently the typescript output is forced even though source files were .js.
Makes sure that just running the CLI doesn't do anything extraneous. Larger projects can provide their own config via --config=my-config.json.

  • Removes disableTypescriptSchemas and disableMissingTypeAutoGen
  • Changes forceTypeScript to correctly generate .ext.ts files now.
  • Adds --separate-types to the cli
    This effectively sets combineSchemasAndTypes to false which will generate .type.ts files.
  • Changes the defaults to be more sensible for projects.
    Previously the codemod would force typescript output even when not available.
    We don't infer whether typescript is present as a dependency at this time.

@github-project-automation github-project-automation bot moved this to needs triage in EmberData Mar 25, 2026
@BobrImperator BobrImperator force-pushed the codemods-sensible-defaults branch 5 times, most recently from b5268de to 9fe1ebf Compare March 25, 2026 16:33
@BobrImperator BobrImperator marked this pull request as ready for review March 25, 2026 16:40
@BobrImperator BobrImperator force-pushed the codemods-sensible-defaults branch 2 times, most recently from bcc7749 to 108c511 Compare March 25, 2026 16:49
@BobrImperator BobrImperator force-pushed the codemods-sensible-defaults branch from 108c511 to 709ea69 Compare April 7, 2026 09:37
Replace `disableTypescriptSchemas` and `disableMissingTypeAutoGen` with
`forceTypeScript`. JS files now produce plain JS output by default; set
`forceTypeScript: true` to generate TypeScript schemas, types, and
extensions from JavaScript sources. `combineSchemasAndTypes` defaults to
`true` in `runMigration`.
@BobrImperator BobrImperator force-pushed the codemods-sensible-defaults branch from 709ea69 to d532625 Compare April 7, 2026 09:39
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.

1 participant