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: add emitLegacyCommonJSImports flag #8077

Merged
merged 6 commits into from
Jul 14, 2022
Merged

feat: add emitLegacyCommonJSImports flag #8077

merged 6 commits into from
Jul 14, 2022

Conversation

saihaj
Copy link
Collaborator

@saihaj saihaj commented Jul 11, 2022

Description

See changeset

Related #8067

Type of change

Please delete options that are not relevant.

  • 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

Screenshots/Sandbox (if appropriate/relevant):

Adding links to sandbox or providing screenshots can help us understand more about this PR and take action on it as appropriate

How Has This Been Tested?

Updated dev-tests

Checklist:

  • I have followed the CONTRIBUTING doc and the style guidelines of this project
  • 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
  • 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

Further comments

Couldn't figure out how to make it work for oclif plugin

@saihaj saihaj requested review from charlypoly and n1ru4l July 11, 2022 17:58
@changeset-bot
Copy link

changeset-bot bot commented Jul 11, 2022

🦋 Changeset detected

Latest commit: d0d68bc

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 42 packages
Name Type
@graphql-codegen/cli Minor
@graphql-codegen/visitor-plugin-common Minor
@graphql-codegen/gql-tag-operations Minor
@graphql-codegen/near-operation-file-preset Minor
@graphql-codegen/plugin-helpers Minor
@graphql-cli/codegen Patch
@graphql-codegen/flow Patch
@graphql-codegen/flow-operations Patch
@graphql-codegen/flow-resolvers Patch
@graphql-codegen/java-apollo-android Patch
@graphql-codegen/java-common Patch
@graphql-codegen/java Patch
@graphql-codegen/kotlin Patch
@graphql-codegen/java-resolvers Patch
@graphql-codegen/typescript-apollo-angular Patch
@graphql-codegen/typescript-apollo-client-helpers Patch
@graphql-codegen/typescript-document-nodes Patch
@graphql-codegen/typescript-generic-sdk Patch
@graphql-codegen/typescript-graphql-request Patch
@graphql-codegen/typescript-jit-sdk Patch
@graphql-codegen/typescript-mongodb Patch
@graphql-codegen/typescript-msw Patch
@graphql-codegen/typescript-oclif Patch
@graphql-codegen/typescript-operations Patch
@graphql-codegen/typescript-react-offix Patch
@graphql-codegen/typescript-react-apollo Patch
@graphql-codegen/typescript-react-query Patch
@graphql-codegen/typescript-resolvers Patch
@graphql-codegen/typescript-rtk-query Patch
@graphql-codegen/typescript-stencil-apollo Patch
@graphql-codegen/typescript-type-graphql Patch
@graphql-codegen/typed-document-node Patch
@graphql-codegen/typescript Patch
@graphql-codegen/typescript-urql-graphcache Patch
@graphql-codegen/urql-svelte-operations-store Patch
@graphql-codegen/typescript-urql Patch
@graphql-codegen/typescript-vue-apollo-smart-ops Patch
@graphql-codegen/typescript-vue-apollo Patch
@graphql-codegen/typescript-vue-urql Patch
@graphql-codegen/jsdoc Patch
@graphql-codegen/graphql-modules-preset Patch
@graphql-codegen/import-types-preset 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

@vercel
Copy link

vercel bot commented Jul 11, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
graphql-code-generator ✅ Ready (Inspect) Visit Preview Jul 14, 2022 at 4:27PM (UTC)

@theguild-bot
Copy link
Collaborator

theguild-bot commented Jul 11, 2022

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

@graphql-cli/codegen@2.3.2-alpha-892ec97e0.0
@graphql-codegen/cli@2.9.0-alpha-892ec97e0.0
@graphql-codegen/core@2.6.1-alpha-892ec97e0.0
@graphql-codegen/c-sharp@4.3.1-alpha-892ec97e0.0
@graphql-codegen/c-sharp-common@0.1.1-alpha-892ec97e0.0
@graphql-codegen/c-sharp-operations@2.3.1-alpha-892ec97e0.0
@graphql-codegen/flow@2.3.2-alpha-892ec97e0.0
@graphql-codegen/flow-operations@2.3.2-alpha-892ec97e0.0
@graphql-codegen/flow-resolvers@2.3.2-alpha-892ec97e0.0
@graphql-codegen/java-apollo-android@2.3.2-alpha-892ec97e0.0
@graphql-codegen/java-common@2.2.2-alpha-892ec97e0.0
@graphql-codegen/java@3.3.2-alpha-892ec97e0.0
@graphql-codegen/kotlin@2.3.2-alpha-892ec97e0.0
@graphql-codegen/java-resolvers@2.3.2-alpha-892ec97e0.0
@graphql-codegen/add@3.2.1-alpha-892ec97e0.0
@graphql-codegen/fragment-matcher@3.3.1-alpha-892ec97e0.0
@graphql-codegen/hasura-allow-list@1.1.1-alpha-892ec97e0.0
@graphql-codegen/introspection@2.2.1-alpha-892ec97e0.0
@graphql-codegen/jsdoc@2.3.2-alpha-892ec97e0.0
@graphql-codegen/schema-ast@2.5.1-alpha-892ec97e0.0
@graphql-codegen/time@3.2.1-alpha-892ec97e0.0
@graphql-codegen/urql-introspection@2.2.1-alpha-892ec97e0.0
@graphql-codegen/visitor-plugin-common@2.12.0-alpha-892ec97e0.0
@graphql-codegen/typescript-apollo-angular@3.5.2-alpha-892ec97e0.0
@graphql-codegen/typescript-apollo-client-helpers@2.2.2-alpha-892ec97e0.0
@graphql-codegen/typescript-document-nodes@2.3.2-alpha-892ec97e0.0
@graphql-codegen/typescript-enum-array@2.2.1-alpha-892ec97e0.0
@graphql-codegen/typescript-generic-sdk@2.4.2-alpha-892ec97e0.0
@graphql-codegen/gql-tag-operations@1.4.0-alpha-892ec97e0.0
@graphql-codegen/typescript-graphql-apollo@1.2.1-alpha-892ec97e0.0
@graphql-codegen/typescript-graphql-files-modules@2.2.1-alpha-892ec97e0.0
@graphql-codegen/typescript-graphql-request@4.5.2-alpha-892ec97e0.0
@graphql-codegen/typescript-jit-sdk@2.1.2-alpha-892ec97e0.0
@graphql-codegen/typescript-mongodb@2.4.2-alpha-892ec97e0.0
@graphql-codegen/typescript-msw@1.1.2-alpha-892ec97e0.0
@graphql-codegen/named-operations-object@2.3.1-alpha-892ec97e0.0
@graphql-codegen/typescript-oclif@2.3.2-alpha-892ec97e0.0
@graphql-codegen/typescript-operations@2.5.2-alpha-892ec97e0.0
@graphql-codegen/typescript-react-apollo@3.3.2-alpha-892ec97e0.0
@graphql-codegen/typescript-react-offix@2.3.2-alpha-892ec97e0.0
@graphql-codegen/typescript-react-query@3.6.2-alpha-892ec97e0.0
@graphql-codegen/typescript-resolvers@2.7.2-alpha-892ec97e0.0
@graphql-codegen/typescript-rtk-query@2.3.2-alpha-892ec97e0.0
@graphql-codegen/typescript-stencil-apollo@2.3.2-alpha-892ec97e0.0
@graphql-codegen/typescript-type-graphql@2.3.2-alpha-892ec97e0.0
@graphql-codegen/typed-document-node@2.3.2-alpha-892ec97e0.0
@graphql-codegen/typescript@2.7.2-alpha-892ec97e0.0
@graphql-codegen/typescript-urql@3.6.2-alpha-892ec97e0.0
@graphql-codegen/typescript-urql-graphcache@2.3.2-alpha-892ec97e0.0
@graphql-codegen/urql-svelte-operations-store@1.2.2-alpha-892ec97e0.0
@graphql-codegen/typescript-vue-apollo@3.3.2-alpha-892ec97e0.0
@graphql-codegen/typescript-vue-apollo-smart-ops@2.3.2-alpha-892ec97e0.0
@graphql-codegen/typescript-vue-urql@2.3.2-alpha-892ec97e0.0
@graphql-codegen/gql-tag-operations-preset@1.5.2-alpha-892ec97e0.0
@graphql-codegen/graphql-modules-preset@2.4.2-alpha-892ec97e0.0
@graphql-codegen/import-types-preset@2.2.2-alpha-892ec97e0.0
@graphql-codegen/near-operation-file-preset@2.4.0-alpha-892ec97e0.0
@graphql-codegen/plugin-helpers@2.6.0-alpha-892ec97e0.0

Copy link
Contributor

@charlypoly charlypoly left a comment

Choose a reason for hiding this comment

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

🦾⚡️

Copy link
Collaborator

@n1ru4l n1ru4l left a comment

Choose a reason for hiding this comment

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

Can you please resolve the failing tests (update the test fixtures)?

…esets + fix specs

Introduced a `shouldEmitLegacyCommonJSImports()` helper to get proper value
@charlypoly
Copy link
Contributor

charlypoly commented Jul 14, 2022

Close #8094 is this is merged first

Copy link
Collaborator

@n1ru4l n1ru4l left a comment

Choose a reason for hiding this comment

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

lfg_emoji.gif

@saihaj saihaj merged commit 2cbcbb3 into master Jul 14, 2022
@saihaj saihaj deleted the saihaj/8067 branch July 14, 2022 16:35
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.

None yet

4 participants