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-env): pass exportConditions #35203

Closed
wants to merge 1 commit into from
Closed

Conversation

SimenB
Copy link
Contributor

@SimenB SimenB commented Nov 4, 2022

Summary

Like discussed in react-native-community/discussions-and-proposals#509, RN should override the default node and node-addons conditions.

You might consider supporting (or just setting) customExportConditions instead, but the default of the node env should be overwritten 🙂

Changelog

[General] [Changed] - use 'react-native' export conditions in Jest environment

Test Plan

Green CI?

@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 Nov 4, 2022
@analysis-bot
Copy link

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 6,991,606 +0
android hermes armeabi-v7a 6,368,151 +0
android hermes x86 7,404,296 +0
android hermes x86_64 7,268,306 +0
android jsc arm64-v8a 8,855,723 +0
android jsc armeabi-v7a 7,594,245 +0
android jsc x86 8,913,475 +0
android jsc x86_64 9,396,826 +0

Base commit: 44f3234
Branch: main

@analysis-bot
Copy link

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

Base commit: 44f3234
Branch: main

@pull-bot
Copy link

pull-bot commented Nov 4, 2022

PR build artifact for 397ec96 is ready.
To use, download tarball from "Artifacts" tab in this CircleCI job then run yarn add <path to tarball> in your React Native project.

@pull-bot
Copy link

pull-bot commented Nov 4, 2022

PR build artifact for 397ec96 is ready.
To use, download tarball from "Artifacts" tab in this CircleCI job then run yarn add <path to tarball> in your React Native project.

@facebook-github-bot
Copy link
Contributor

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

@SimenB SimenB deleted the patch-1 branch November 10, 2022 14:26
kelset pushed a commit that referenced this pull request Nov 30, 2022
Summary:
Like discussed in react-native-community/discussions-and-proposals#509, RN should override the default `node` and `node-addons` conditions.

You might consider supporting (or just setting) [`customExportConditions`](https://github.com/facebook/jest/blob/4670d3be0d80d47844673eb163666253e788f006/packages/jest-environment-node/src/index.ts#L187-L189) instead, but the default of the node env should be overwritten 🙂

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->

[General] [Changed] - use `'react-native'` export conditions in Jest environment

Pull Request resolved: #35203

Test Plan: Green CI?

Reviewed By: lunaleaps

Differential Revision: D41081783

Pulled By: jacdebug

fbshipit-source-id: 844c70d92a58c5432ba5b9e5e99c8f50045ef8ac
OlimpiaZurek pushed a commit to OlimpiaZurek/react-native that referenced this pull request May 22, 2023
Summary:
Like discussed in react-native-community/discussions-and-proposals#509, RN should override the default `node` and `node-addons` conditions.

You might consider supporting (or just setting) [`customExportConditions`](https://github.com/facebook/jest/blob/4670d3be0d80d47844673eb163666253e788f006/packages/jest-environment-node/src/index.ts#L187-L189) instead, but the default of the node env should be overwritten 🙂

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->

[General] [Changed] - use `'react-native'` export conditions in Jest environment

Pull Request resolved: facebook#35203

Test Plan: Green CI?

Reviewed By: lunaleaps

Differential Revision: D41081783

Pulled By: jacdebug

fbshipit-source-id: 844c70d92a58c5432ba5b9e5e99c8f50045ef8ac
@cipolleschi cipolleschi mentioned this pull request Oct 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants