0no-co / gql.tada

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

patch(cli-utils): Add VSCode detection and warnings #230

Closed kitten closed 3 months ago

kitten commented 3 months ago

Resolves #194

Summary

This PR adds an addition to the doctor command that attempts to detect VSCode extensions.

When VSCode is installed and the GraphQL Syntax extension for it isn't installed, a warning is issued with a link to the extension.

When the suggested extensions file or the installed extensions contain the VSCode GraphQL Language Service extension and a GraphQL Config is present a warning is issued to prompt the user to check whether documents is targeting their files correctly.

This doesn't actually use graphql-config to validate the config, since that's quite a huge package for what it does (large dependency to handle TS & ESM files). So, unless we really need that, or want to just load the module from the user node_modules, I'd say this should be good enough.

Screenshot 2024-04-18 at 16 04 04

Set of changes

changeset-bot[bot] commented 3 months ago

🦋 Changeset detected

Latest commit: 5d31cf42de78cb459bbf2efe572ac6d2278f7681

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