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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preserve .js extension when importDocumentNodeExternallyFrom and emitLegacyCommonJSImports is false #8895

Merged
merged 3 commits into from
Feb 27, 2023

Conversation

benkroeger
Copy link
Contributor

馃毃 IMPORTANT: Please do not create a Pull Request without creating an issue first.

Any change needs to be discussed before proceeding. Failure to do so may result in the rejection of the pull request.

Description

These changes skip removing .js extensions from import paths when the emitLegacyCommonJSImports option is set to false

Related # (issue)
#8894

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

How Has This Been Tested?

Added unit test to simulate the input parameters and configuration options. Verify with

yarn test  packages/plugins/other/visitor-plugin-common/tests/client-side-base-visitor.spec.ts 

Test Environment:

OS: macOS
NodeJS: 18.13.0
graphql version: 16.6.0
@graphql-codegen/visitor-plugin-common version(s): 2.13.1

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

@changeset-bot
Copy link

changeset-bot bot commented Feb 3, 2023

馃 Changeset detected

Latest commit: a7beced

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

This PR includes changesets to release 9 packages
Name Type
@graphql-codegen/visitor-plugin-common Patch
@graphql-codegen/typescript-document-nodes Patch
@graphql-codegen/gql-tag-operations Patch
@graphql-codegen/typescript-operations Patch
@graphql-codegen/typescript-resolvers Patch
@graphql-codegen/typed-document-node Patch
@graphql-codegen/typescript Patch
@graphql-codegen/graphql-modules-preset Patch
@graphql-codegen/client-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

@benkroeger benkroeger marked this pull request as draft February 3, 2023 15:54
@benkroeger benkroeger marked this pull request as ready for review February 6, 2023 13:10
Signed-off-by: Benjamin Kroeger <benjamin.kroeger@gmail.com>
Signed-off-by: Benjamin Kroeger <benjamin.kroeger@gmail.com>
Signed-off-by: Benjamin Kroeger <benjamin.kroeger@gmail.com>
@saihaj saihaj requested a review from n1ru4l February 27, 2023 13:55
@n1ru4l n1ru4l merged commit b343626 into dotansimha:master Feb 27, 2023
@benkroeger benkroeger deleted the patch-1 branch February 27, 2023 23:25
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

3 participants