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 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 requested a review from SimenB Feb 21, 2019
@rubennorte rubennorte changed the title Assigned createTransformer function only to the transformer exported … Fix transformer signature in babel-jest Feb 21, 2019
rubennorte added 2 commits Feb 21, 2019
@rubennorte rubennorte requested a review from mjesun 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))

This comment has been minimized.

Copy link
@rubennorte

rubennorte Feb 21, 2019

Author Contributor

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

@mjesun
mjesun approved these changes Feb 21, 2019
@SimenB

This comment has been minimized.

Copy link
Collaborator

SimenB commented Feb 21, 2019

Possible to add a test that verifies the behavior?

@SimenB
SimenB approved these changes Feb 21, 2019
Copy link
Collaborator

SimenB left a comment

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 rubennorte:fix-create-transformer-in-babel-jest branch 2 times, most recently from 0ece301 to 2e552a3 Feb 21, 2019
@rubennorte rubennorte force-pushed the rubennorte:fix-create-transformer-in-babel-jest branch from 2e552a3 to a913503 Feb 21, 2019
@rubennorte rubennorte merged commit bc892ed into facebook:master Feb 21, 2019
10 of 12 checks passed
10 of 12 checks passed
continuous-integration/appveyor/pr Waiting for AppVeyor build to complete
Details
facebook.jest in progress
Details
ci/circleci: lint-and-typecheck Your tests passed on CircleCI!
Details
ci/circleci: test-browser Your tests passed on CircleCI!
Details
ci/circleci: test-jest-circus Your tests passed on CircleCI!
Details
ci/circleci: test-node-10 Your tests passed on CircleCI!
Details
ci/circleci: test-node-11 Your tests passed on CircleCI!
Details
ci/circleci: test-node-6 Your tests passed on CircleCI!
Details
ci/circleci: test-node-8 Your tests passed on CircleCI!
Details
ci/circleci: test-or-deploy-website Your tests passed on CircleCI!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
deploy/netlify Deploy preview ready!
Details
@rubennorte rubennorte deleted the rubennorte:fix-create-transformer-in-babel-jest branch Feb 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.