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

Features/improved before one file write hook #8662

Conversation

jantimon
Copy link
Contributor

@jantimon jantimon commented Nov 29, 2022

Description

Allow to modify content from beforeOneFileWrite for faster and more efficient post modifications.
See entire discussion in #8643.

This PR should not be merged before #8652 and #8661 as this PR builds ontop of a refactoring introduced in those PRs.
Update: #8652 and #8661 have been merged.

Related #8643

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

  • On my machine
  • New unit test

Test Environment:

  • OS: MacOS 13

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
  • 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 Nov 29, 2022

🦋 Changeset detected

Latest commit: 0311fc0

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

This PR includes changesets to release 3 packages
Name Type
@graphql-codegen/cli Minor
@graphql-codegen/plugin-helpers 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

@jantimon jantimon force-pushed the features/improved-beforeOneFileWrite-hook branch from 69c94d9 to 2408288 Compare December 6, 2022 19:02
@jantimon jantimon force-pushed the features/improved-beforeOneFileWrite-hook branch from 2408288 to 22e9ab6 Compare December 6, 2022 19:27
Copy link
Collaborator

@saihaj saihaj left a comment

Choose a reason for hiding this comment

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

wondering if there is something we can do to have tests for this 🤔

@jantimon
Copy link
Contributor Author

jantimon commented Dec 6, 2022

wondering if there is something we can do to have tests for this 🤔

did you see the new test inside packages/graphql-codegen-cli/tests/generate-and-save.spec.ts?

https://github.com/dotansimha/graphql-code-generator/pull/8662/files#diff-497b63d3ef2ecddb792e0df7f03579f02fac5382f94d4b1c9ef0ad2609e89443

@jantimon jantimon force-pushed the features/improved-beforeOneFileWrite-hook branch from 22e9ab6 to 0311fc0 Compare December 6, 2022 20:18
Copy link
Collaborator

@saihaj saihaj left a comment

Choose a reason for hiding this comment

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

Oops I missed that. Amazing work!

@saihaj saihaj merged commit c018381 into dotansimha:master Dec 7, 2022
This was referenced Dec 7, 2022
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

2 participants