Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(cli-utils): Complete CLI output, logging, and config refactor #200

Merged
merged 31 commits into from
Apr 15, 2024

Conversation

kitten
Copy link
Member

@kitten kitten commented Apr 15, 2024

Resolve #76

Summary

This comprehensively implements:

  • stylised log output
  • additional and consistent arguments
  • consistent tsconfig.json resolution
  • Github Actions annotations
  • and; threading
    across all commands.

Note

This PR doesn't yet update all the main command to link to gql.tada help, implement a help command itself, and improve general --help,-h outputs.

Warning

It also doesn't yet restore the public API and add new APIs as per: #134
I'm planning to get this done in a separate follow-up PR, before a new release

Set of changes

  • Add replacement utilities to @gql.tada/internal for config loading
    • Utilities there can load config and parse config
    • The utilities return paths consistently and as one call
    • This uses an exported parser from typescript
    • json5 has been removed
    • All commands now use these utilities consistently
    • See: 09e10f5
  • The check command...
    • has improved error outputs
  • The generate output command...
    • has new error & log output
  • The generate schema command...
    • has new error & log output
  • generate turbo / turbo command...
    • outputs to new tadaTurboLocation config option by default
    • accepts a new --fail-on-warn,-w argument
    • is now threaded
    • reports warnings as needed
    • has new error & log output
  • generate persisted command...
    • outputs to new tadaPersistedLocation config option by default
    • accepts a new --fail-on-warn,-w argument
    • is now threaded
    • reports warnings as needed
    • has new error & log output
  • Replaced getLineCol utility with TS-native function for this
  • All file writing is now done with a swap-write utility
  • Fix semiver being passed semver ranges
  • Simplify doctor command to use new utilities

Copy link

changeset-bot bot commented Apr 15, 2024

🦋 Changeset detected

Latest commit: 8e5ae5c

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

@kitten kitten merged commit 36adc75 into main Apr 15, 2024
2 checks passed
@kitten kitten deleted the feat/cli-refactor branch April 15, 2024 09:34
@github-actions github-actions bot mentioned this pull request Apr 15, 2024
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.

RFC: Implement a CLI for programmatic TS LSP & Checking tasks
2 participants