graphql-code-generator
graphql-code-generator copied to clipboard
fix(cli): properly resolve template plugins on all platforms
This PR uses pathToFileURL to use the file:// url scheme to resolve plugins. Current behavior in @graphql-codegen/cli causes a crash when ran on windows.
Related #7664 Diizzayy/nuxt-graphql-client#15
Type of change
Please delete options that are not relevant.
- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change requires a documentation update
Checklist:
- [x] I have followed the CONTRIBUTING doc and the style guidelines of this project
- [x] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published in downstream modules
🦋 Changeset detected
Latest commit: 95c54f87bbf2eb6b966ae2e7745b0f682a96adaf
The changes in this PR will be included in the next version bump.
This PR includes changesets to release 2 packages
| Name | Type |
|---|---|
| @graphql-codegen/cli | Minor |
| @graphql-cli/codegen | Patch |
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
This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.
🔍 Inspect: https://vercel.com/theguild/graphql-code-generator/EYUmZz4NhQesqwgn8QSLkd3C93CK
✅ Preview: https://graphql-code-generator-git-fork-diizzayy-fix-re-8d1687-theguild.vercel.app
Doesn't pass some unit tests
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Updated |
|---|---|---|---|
| graphql-code-generator | ✅ Ready (Inspect) | Visit Preview | Apr 25, 2022 at 1:23AM (UTC) |
@Diizzayy, could you rebase your PR and test it again on Windows? 🙏🏼 🙏🏼 Thanks!
@charlypoly Sure thing, I'll hop on it right away.
@charlypoly Sure thing, I'll hop on it right away.
@Diizzayy thank you!
@charlypoly Sure thing, I'll hop on it right away.
Hi @Diizzayy,
could you rebase your PR and test it on Windows? Then, we'll be good to merge.
@charlypoly Thank you, I'll rebase and have a look at it.
Also, Do you happen to have discord? We're having some issues over at Nuxt with recent changes to the graphql-codegen cli. I would love to be able to discuss with you a bit on the topic so we can come to a suitable solution for the nuxt modules which integrate GraphQL client support leveraging the tools you guys provide.
@charlypoly Let me know what would be the best way to chat with you when you have some free time.
@charlypoly I've had the chance to look at this again, and it seems that the esm issues on windows were previously addressed in #7978