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(jest): make assetFileTransformer return an object #33756

Closed
wants to merge 1 commit into from

Conversation

geraintwhite
Copy link
Contributor

@geraintwhite geraintwhite commented May 4, 2022

Fixes #33751
Relates to #33576

Summary

Jest 28 removed support for returning a string in the process method of a transformer (https://jestjs.io/docs/upgrading-to-jest28#transformer).

This PR changes assetFileTransformer to return an object instead of a string.

Changelog

[Internal] [Fixed] - Return object from assetFileTransformer

Test Plan

Tests pass with Jest 28 when this change is made.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label May 4, 2022
@facebook-github-bot facebook-github-bot added the Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. label May 4, 2022
@geraintwhite geraintwhite changed the title fix(jest): make assetFileTransformer return object fix(jest): make assetFileTransformer return an object May 4, 2022
@cortinico
Copy link
Contributor

Please address the CI failures first

@geraintwhite geraintwhite force-pushed the patch-6 branch 2 times, most recently from 5a66e3c to 7cf785f Compare May 4, 2022 12:11
@geraintwhite
Copy link
Contributor Author

@cortinico apologies, my fault for making changes directly in GitHub!

I think the Android build failures are unrelated.

@analysis-bot
Copy link

analysis-bot commented May 4, 2022

Platform Engine Arch Size (bytes) Diff
ios - universal n/a --

Base commit: d881c87
Branch: main

@cortinico
Copy link
Contributor

I think the Android build failures are unrelated.

Yes we're about to land a fix for them. Let's hold on a bit.

@analysis-bot
Copy link

analysis-bot commented May 26, 2022

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 7,825,312 +0
android hermes armeabi-v7a 7,212,729 +0
android hermes x86 8,135,898 +0
android hermes x86_64 8,115,853 +0
android jsc arm64-v8a 9,690,697 +0
android jsc armeabi-v7a 8,447,011 +0
android jsc x86 9,642,037 +0
android jsc x86_64 10,239,012 +0

Base commit: d881c87
Branch: main

@geraintwhite
Copy link
Contributor Author

Looks like iOS is still failing for an unrelated reason

@ginnymin ginnymin mentioned this pull request Jun 4, 2022
@cortinico
Copy link
Contributor

Looks like iOS is still failing for an unrelated reason

Could you rebase again @grit96? The CI should be green, and we should be good merging this afterwards

@geraintwhite
Copy link
Contributor Author

@cortinico all looks good now

@facebook-github-bot
Copy link
Contributor

@cortinico has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@react-native-bot
Copy link
Collaborator

This pull request was successfully merged by @grit96 in b5ff26b.

When will my fix make it into a release? | Upcoming Releases

@react-native-bot react-native-bot added the Merged This PR has been merged. label Jun 17, 2022
kelset pushed a commit that referenced this pull request Jul 12, 2022
Summary:
Fixes #33751
Relates to #33576

Jest 28 removed support for returning a string in the process method of a transformer (https://jestjs.io/docs/upgrading-to-jest28#transformer).

This PR changes assetFileTransformer to return an object instead of a string.

## Changelog

[Internal] [Fixed] - Return object from assetFileTransformer

Pull Request resolved: #33756

Test Plan: Tests pass with Jest 28 when this change is made.

Reviewed By: cipolleschi

Differential Revision: D37242038

Pulled By: cortinico

fbshipit-source-id: d8a5054f5378183f644cd1458785084b26782193
danilobuerger pushed a commit to feastr/react-native that referenced this pull request Jul 25, 2022
Summary:
Fixes facebook#33751
Relates to facebook#33576

Jest 28 removed support for returning a string in the process method of a transformer (https://jestjs.io/docs/upgrading-to-jest28#transformer).

This PR changes assetFileTransformer to return an object instead of a string.

## Changelog

[Internal] [Fixed] - Return object from assetFileTransformer

Pull Request resolved: facebook#33756

Test Plan: Tests pass with Jest 28 when this change is made.

Reviewed By: cipolleschi

Differential Revision: D37242038

Pulled By: cortinico

fbshipit-source-id: d8a5054f5378183f644cd1458785084b26782193
danilobuerger pushed a commit to feastr/react-native that referenced this pull request Aug 10, 2022
Summary:
Fixes facebook#33751
Relates to facebook#33576

Jest 28 removed support for returning a string in the process method of a transformer (https://jestjs.io/docs/upgrading-to-jest28#transformer).

This PR changes assetFileTransformer to return an object instead of a string.

## Changelog

[Internal] [Fixed] - Return object from assetFileTransformer

Pull Request resolved: facebook#33756

Test Plan: Tests pass with Jest 28 when this change is made.

Reviewed By: cipolleschi

Differential Revision: D37242038

Pulled By: cortinico

fbshipit-source-id: d8a5054f5378183f644cd1458785084b26782193
danilobuerger pushed a commit to feastr/react-native that referenced this pull request Nov 18, 2022
Summary:
Fixes facebook#33751
Relates to facebook#33576

Jest 28 removed support for returning a string in the process method of a transformer (https://jestjs.io/docs/upgrading-to-jest28#transformer).

This PR changes assetFileTransformer to return an object instead of a string.

## Changelog

[Internal] [Fixed] - Return object from assetFileTransformer

Pull Request resolved: facebook#33756

Test Plan: Tests pass with Jest 28 when this change is made.

Reviewed By: cipolleschi

Differential Revision: D37242038

Pulled By: cortinico

fbshipit-source-id: d8a5054f5378183f644cd1458785084b26782193
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tests Fail in New CLI Project Due to Jest 28
5 participants