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): Use source maps to correct offsets for Vue SFC files #236

Closed JoviDeCroock closed 3 months ago

JoviDeCroock commented 3 months ago

Resolves #235

Summary

It looks like with a minimal project the offsets are contained enough to just work, however the more files we add the larger this offsets seems to become. This PR introduces support for looking up positions in the vue.Sourcemap so we can triangulate our position in the accompanying TypeScript file.

changeset-bot[bot] commented 3 months ago

🦋 Changeset detected

Latest commit: a80a128808c606c8169d847949a7a5cac155e555

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