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

Support jest 18 transformer requirements #2243

Merged
merged 3 commits into from Apr 25, 2022

Conversation

ryanwilsonperkin
Copy link
Member

@ryanwilsonperkin ryanwilsonperkin commented Apr 25, 2022

Description

Jest v28 has just been released and one breaking change requires that all Jest transformers must match a stricter signature. Specifically, the process was previously allowed to return either an object of shape {code: string} or just string, it has now been narrowed to only support the {code: string} approach.

See: jestjs/jest#12638

Type of change

  • graphql-mini-transforms Minor: New feature (non-breaking change which adds functionality)
    expected)

Checklist

  • I have added a changelog entry, prefixed by the type of change noted above (Documentation fix and Test update does not need a changelog as we do not publish new version)

@ryanwilsonperkin ryanwilsonperkin requested a review from a team as a code owner April 25, 2022 14:44
@ryanwilsonperkin ryanwilsonperkin force-pushed the support-jest-18-transformer-requirements branch from 540c158 to 520739c Compare April 25, 2022 14:46
In Jest <=v27 it was expected that the transformed source would return
an object with a code property containing the transformed code, but it
was accepted as a shortcut to just return a string.

Jest 28 makes the code object a strict requirement and simple string
returns are no longer accepted.
@ryanwilsonperkin ryanwilsonperkin merged commit 4021c7c into main Apr 25, 2022
@ryanwilsonperkin ryanwilsonperkin deleted the support-jest-18-transformer-requirements branch April 25, 2022 15:07
@shopify-shipit shopify-shipit bot temporarily deployed to production-js April 25, 2022 15:33 Inactive
@shopify-shipit shopify-shipit bot temporarily deployed to react-18-react-testing May 2, 2022 20:20 Inactive
@shopify-shipit shopify-shipit bot temporarily deployed to production-gem June 21, 2022 14:45 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants