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

drop create-react-app + swc in-repository test #9060

Merged
merged 16 commits into from
Mar 1, 2023
Merged

drop create-react-app + swc in-repository test #9060

merged 16 commits into from
Mar 1, 2023

Conversation

n1ru4l
Copy link
Collaborator

@n1ru4l n1ru4l commented Feb 24, 2023

this replaces creatr-react-app examples with vite
It also adds an in-repository example for verifying that the swc plugin actually works.

@changeset-bot
Copy link

changeset-bot bot commented Feb 24, 2023

⚠️ No Changeset found

Latest commit: a7cc961

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@n1ru4l n1ru4l force-pushed the drop-cra branch 2 times, most recently from 99131e2 to ea4c172 Compare February 24, 2023 11:29
@github-actions
Copy link
Contributor

github-actions bot commented Feb 24, 2023

🚀 Snapshot Release (alpha)

The latest changes of this PR are available as alpha on npm (based on the declared changesets):

Package Version Info
@graphql-codegen/visitor-plugin-common 3.0.2-alpha-20230301084144-a7cc961b3 npm ↗︎ unpkg ↗︎
@graphql-codegen/typescript-document-nodes 3.0.2-alpha-20230301084144-a7cc961b3 npm ↗︎ unpkg ↗︎
@graphql-codegen/gql-tag-operations 2.0.2-alpha-20230301084144-a7cc961b3 npm ↗︎ unpkg ↗︎
@graphql-codegen/typescript-operations 3.0.2-alpha-20230301084144-a7cc961b3 npm ↗︎ unpkg ↗︎
@graphql-codegen/typescript-resolvers 3.1.1-alpha-20230301084144-a7cc961b3 npm ↗︎ unpkg ↗︎
@graphql-codegen/typed-document-node 3.0.2-alpha-20230301084144-a7cc961b3 npm ↗︎ unpkg ↗︎
@graphql-codegen/typescript 3.0.2-alpha-20230301084144-a7cc961b3 npm ↗︎ unpkg ↗︎
@graphql-codegen/client-preset 2.1.1-alpha-20230301084144-a7cc961b3 npm ↗︎ unpkg ↗︎
@graphql-codegen/graphql-modules-preset 3.1.1-alpha-20230301084144-a7cc961b3 npm ↗︎ unpkg ↗︎

@github-actions
Copy link
Contributor

github-actions bot commented Feb 24, 2023

💻 Website Preview

The latest changes are available as preview in: https://0236e772.graphql-code-generator.pages.dev

@n1ru4l n1ru4l changed the title drop create-react-app drop create-react-app + swc in-repository test Feb 24, 2023
@JesseVelden
Copy link
Contributor

The strange thing is that I cannot reproduce the issue locally. I will do some more digging

@n1ru4l
Copy link
Collaborator Author

n1ru4l commented Feb 24, 2023

@JesseVelden @YassinEldeeb pinned this down to the rust version

@JesseVelden
Copy link
Contributor

What I also saw is that we need access to the namingConvention, as now the const allFilmsWithVariablesQueryDocument = query example doesn't resolve to AllFilmsWithVariablesQueryDocument (note the uppercase A).

I was assuming that you just need to do that. I guess we can provide it as an option to the SWC plugin, or warn the user instead. I'm not sure how the Babel plugin does that.

@JesseVelden
Copy link
Contributor

JesseVelden commented Feb 24, 2023

@JesseVelden @YassinEldeeb pinned this down to the rust version

Oh lol, I wouldn't expect that. Great debugging work @YassinEldeeb ! I have 1.66, but will try it with 1.67 now.

So, I got the same problem, and this is currently a SWC related problem: swc-project/swc#6807.
I guess we need to fix the builds to 1.66 for now.

Comment on lines +2 to +4
import { CFragmentDoc } from "./../graphql";
import { BDocument } from "./../graphql";
import { ADocument } from "./../graphql";
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@YassinEldeeb The ./ is kind of redundant as ./../graphql is the same as ../graphql 🤔

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can improve it in a follow-up PR

@n1ru4l n1ru4l merged commit 03cdf02 into master Mar 1, 2023
@n1ru4l n1ru4l deleted the drop-cra branch March 1, 2023 08:54
@JesseVelden
Copy link
Contributor

Great work guys! I hadn't much time to work on it this week

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.

3 participants