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

Fix transformer signature in babel-jest #7945

Merged

Conversation

rubennorte
Copy link
Contributor

@rubennorte rubennorte commented Feb 21, 2019

Summary

#7918 changed the transformer signature to include the own createTransformer method, which broke due to how it's used by @jest/transform. This only attaches the function to the singleton exported by the package.

Fixes https://github.com/facebook/jest/pull/7918/files#r258958414

Test plan

Manually tested internally at FB.
Added an e2e test.

@rubennorte rubennorte changed the title Assigned createTransformer function only to the transformer exported … Fix transformer signature in babel-jest Feb 21, 2019
@@ -47,7 +47,7 @@
- `[@jest/transform]`: New package extracted from `jest-runtime` ([#7915](https://github.com/facebook/jest/pull/7915))
- `[babel-plugin-jest-hoist]`: Migrate to TypeScript ([#7898](https://github.com/facebook/jest/pull/7898))
- `[@jest/core]` Create new package, which is `jest-cli` minus `yargs` and `prompts` ([#7696](https://github.com/facebook/jest/pull/7696))
- `[@jest/transform]`: Migrate to TypeScript ([#7918](https://github.com/facebook/jest/pull/7918))
- `[@jest/transform]`: Migrate to TypeScript ([#7918](https://github.com/facebook/jest/pull/7918), [#7945](https://github.com/facebook/jest/pull/7945))
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This bug was introduced there (unpublished) so we don't need to add noise with an extra entry.

@SimenB
Copy link
Member

SimenB commented Feb 21, 2019

Possible to add a test that verifies the behavior?

Copy link
Member

@SimenB SimenB left a comment

Choose a reason for hiding this comment

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

Verified the exported types are still correct (well, more correct since it's not nested), since that was the motivation behind the change

@rubennorte rubennorte force-pushed the fix-create-transformer-in-babel-jest branch 2 times, most recently from 0ece301 to 2e552a3 Compare February 21, 2019 17:30
@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants