-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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(expo-battery): add missing peer dependency references to react
#30458
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
behenate
approved these changes
Jul 17, 2024
3 tasks
byCedric
added a commit
that referenced
this pull request
Jul 17, 2024
…ct-native` (#30449) Note, this is a collection of PRs for each SDK library individually. <details><summary>All related PRs</summary> - #30454 - #30455 - #30456 - #30457 - #30458 - #30459 - #30460 - #30461 - #30462 - #30463 - #30464 - #30465 - #30466 - #30467 - #30468 - #30469 - #30470 - #30471 - #30473 - #30474 - #30475 - #30476 - #30477 - #30478 - #30479 - #30480 - #30481 - #30482 - #30483 - #30484 - #30485 - #30486 - #30487 - #30488 - #30489 - #30490 </details> # Why As mentioned in sdk sync, we need correct dependency chains to make different package managers and monorepos more stable. For isolated modules, this is a requirement as the dependency otherwise isn't linked into the isolated folder. # How Added peer dependency reference to `react: *`, it's currently imported from: - [src/devtools/index.ts](https://github.com/expo/expo/tree/ebc396fe16b225d616eb7e0919028c59db805a1e/packages/expo/src/devtools/index.ts) - [src/environment/DevLoadingView.tsx](https://github.com/expo/expo/tree/ebc396fe16b225d616eb7e0919028c59db805a1e/packages/expo/src/environment/DevLoadingView.tsx) - [src/hooks/useEvent.ts](https://github.com/expo/expo/tree/ebc396fe16b225d616eb7e0919028c59db805a1e/packages/expo/src/hooks/useEvent.ts) - [src/launch/registerRootComponent.tsx](https://github.com/expo/expo/tree/ebc396fe16b225d616eb7e0919028c59db805a1e/packages/expo/src/launch/registerRootComponent.tsx) - _type only_ - [src/launch/withDevTools.ios.tsx](https://github.com/expo/expo/tree/ebc396fe16b225d616eb7e0919028c59db805a1e/packages/expo/src/launch/withDevTools.ios.tsx) - _type only_ - [src/launch/withDevTools.web.tsx](https://github.com/expo/expo/tree/ebc396fe16b225d616eb7e0919028c59db805a1e/packages/expo/src/launch/withDevTools.web.tsx) - _type only_ Added peer dependency reference to `react-native: *`, it's currently imported from: - [src/devtools/getConnectionInfo.native.ts](https://github.com/expo/expo/tree/ebc396fe16b225d616eb7e0919028c59db805a1e/packages/expo/src/devtools/getConnectionInfo.native.ts) - [src/environment/DevLoadingView.tsx](https://github.com/expo/expo/tree/ebc396fe16b225d616eb7e0919028c59db805a1e/packages/expo/src/environment/DevLoadingView.tsx) - [src/environment/DevLoadingViewNativeModule.native.ts](https://github.com/expo/expo/tree/ebc396fe16b225d616eb7e0919028c59db805a1e/packages/expo/src/environment/DevLoadingViewNativeModule.native.ts) - [src/environment/getInitialSafeArea.native.ts](https://github.com/expo/expo/tree/ebc396fe16b225d616eb7e0919028c59db805a1e/packages/expo/src/environment/getInitialSafeArea.native.ts) - [src/launch/registerRootComponent.tsx](https://github.com/expo/expo/tree/ebc396fe16b225d616eb7e0919028c59db805a1e/packages/expo/src/launch/registerRootComponent.tsx) - [src/winter/runtime.native.ts](https://github.com/expo/expo/tree/ebc396fe16b225d616eb7e0919028c59db805a1e/packages/expo/src/winter/runtime.native.ts) # Note There are more incorrect dependency chains, these can't be resolved by adding a peer dependency and require another approach. - [scripts/compose-source-maps.js](https://github.com/expo/expo/blob/ebc396fe16b225d616eb7e0919028c59db805a1e/packages/expo/scripts/compose-source-maps.js#L15) - importing `metro-source-map` - [react-native.config.js](https://github.com/expo/expo/tree/ebc396fe16b225d616eb7e0919028c59db805a1e/packages/expo/react-native.config.js) - importing `@react-native-community/cli-tools` # Test Plan - `$ pnpm add expo` - `$ node --print "require.resolve('react/package.json', { paths: [require.resolve('expo/package.json')] })"` - This should be resolved to `react` - `$ node --print "require.resolve('react-native/package.json', { paths: [require.resolve('expo/package.json')] })"` - This should be resolved to `react-native` # Checklist <!-- Please check the appropriate items below if they apply to your diff. This is required for changes to Expo modules. --> - [x] Documentation is up to date to reflect these changes (eg: https://docs.expo.dev and README.md). - [ ] Conforms with the [Documentation Writing Style Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md) - [ ] This diff will work correctly for `npx expo prebuild` & EAS Build (eg: updated a module plugin). --------- Co-authored-by: Expo Bot <34669131+expo-bot@users.noreply.github.com>
Co-authored-by: Expo Bot <34669131+expo-bot@users.noreply.github.com>
expo-bot
added
bot: passed checks
ExpoBot has nothing to complain about
and removed
bot: suggestions
ExpoBot has some suggestions
labels
Jul 17, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Why
As mentioned in sdk sync, we need correct dependency chains to make different package managers and monorepos more stable. For isolated modules, this is a requirement as the dependency otherwise isn't linked into the isolated folder.
How
Added peer dependency reference to
react: *
, it's currently imported from:Note
expo-modules-core
, which need another pass after deciding how to resolve this (e.g. through anexpo/modules-core
export)Test Plan
$ pnpm add expo-battery
$ node --print "require.resolve('react/package.json', { paths: [require.resolve('expo-battery/package.json')] })"
react
Checklist
npx expo prebuild
& EAS Build (eg: updated a module plugin).