0no-co / gql.tada

🪄 Magical GraphQL query engine for TypeScript
https://gql-tada.0no.co
MIT License
2.45k stars 36 forks source link

fix(cli-utils): Add missing `--force-ts-format` option to `generate-output` #227

Closed kitten closed 3 months ago

kitten commented 3 months ago

Follow-up to #225

This adds a hidden --force-ts-format option that a hint in the terminal mentions if the output is piped to reactive the .ts format for the piped output. Otherwise the d.ts output is the default.

This also reorders when the file is generated to prevent future mistakes, like the one in #225. For instance, after that PR the piped output would default to whatever the format of tadaOutputLocation is, which is unexpected.

changeset-bot[bot] commented 3 months ago

🦋 Changeset detected

Latest commit: dd7f9899e11501cf0827503e6e578dbef211d63b

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR