refactor(codemods): simplify TypeScript output config options#10505
Open
BobrImperator wants to merge 1 commit intowarp-drive-data:mainfrom
Open
refactor(codemods): simplify TypeScript output config options#10505BobrImperator wants to merge 1 commit intowarp-drive-data:mainfrom
BobrImperator wants to merge 1 commit intowarp-drive-data:mainfrom
Conversation
b5268de to
9fe1ebf
Compare
bcc7749 to
108c511
Compare
108c511 to
709ea69
Compare
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`.
709ea69 to
d532625
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.disableTypescriptSchemasanddisableMissingTypeAutoGenforceTypeScriptto correctly generate.ext.tsfiles now.--separate-typesto the cliThis effectively sets
combineSchemasAndTypestofalsewhich will generate.type.tsfiles.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.