[No QA] chore: upgrade react-native-screens to 4.25.0-beta.1#89199
[No QA] chore: upgrade react-native-screens to 4.25.0-beta.1#89199roryabraham wants to merge 8 commits intomainfrom
Conversation
The upstream fix for lifecycle events in fragment host (PR #3854) was merged into react-native-screens and is included in 4.25.0-beta.1. Remove the now-unnecessary patch. Made-with: Cursor
Made-with: Cursor
📲 Install BuildsAndroid
|
react-native-screens@4.25.0-beta.1 introduced SafeAreaView with only a default export in the .web variant, causing a webpack ModuleDependencyWarning during Storybook builds since the index re-exports it as a named export. Made-with: Cursor
npm strict mode excludes pre-release versions from satisfying semver ranges like >=4.0.0, so npm ci was rejecting 4.25.0-beta.1 as a peer dep satisfier. Using npm overrides pins the version explicitly, bypassing ERESOLVE, without changing the global resolution algorithm like legacy-peer-deps=true would. Made-with: Cursor
Made-with: Cursor
|
🚧 @roryabraham has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
Requested AdHoc QA of |
|
Regression completed |
|
@arosiclair Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
arosiclair
left a comment
There was a problem hiding this comment.
Shouldn't we just wait for the final 4.25.0 release instead of using the beta?
|
Given that we had AdHoc QA done and no issues were found, I'd suggest upgrading so that each incremental upgrade is smaller. |
|
I'd guess there wouldn't be much more change needed for the stable release. Assuming there's no urgency for this, I think we should just wait for the stable version. |
Aligns with the updated approach in the upstream PR (software-mansion/react-native-screens#3956): the native variant has only ever had a named export, and the package's public surface only re-exports as named, so dropping the default on web brings everything in line. Co-authored-by: Cursor <cursoragent@cursor.com>
## Description
`safe-area/index.ts` re-exports `SafeAreaView` as a named export:
```ts
export { SafeAreaView } from './SafeAreaView';
```
For web builds, webpack resolves `'./SafeAreaView'` to
`'./SafeAreaView.web.tsx'`, which only had a default export:
```ts
const SafeAreaView = View;
export default SafeAreaView;
```
This causes a `ModuleDependencyWarning` at build time:
```
export 'SafeAreaView' (imported as 'SafeAreaView') was not found in './safe-area/SafeAreaView' (possible exports: default)
```
This also affects `ScreenStackItem.tsx`, which does:
```ts
import { SafeAreaView } from './safe-area/SafeAreaView';
```
For web builds this resolves to the `.web` variant, again hitting the
same missing named export.
## Fix
Replace the default export with a named export in `SafeAreaView.web.tsx`
to match the native variant (`SafeAreaView.tsx`), which only has a named
export, and the package's public surface (`safe-area/index.ts`), which
only re-exports as named.
## Test plan
- [x] Verified the warning no longer appears in a web/Storybook webpack
build after this change
## Related
Found while upgrading \`react-native-screens\` to \`4.25.0-beta.1\` in
[Expensify/App#89199](Expensify/App#89199).
Co-authored-by: Cursor <cursoragent@cursor.com>
## Description
`safe-area/index.ts` re-exports `SafeAreaView` as a named export:
```ts
export { SafeAreaView } from './SafeAreaView';
```
For web builds, webpack resolves `'./SafeAreaView'` to
`'./SafeAreaView.web.tsx'`, which only had a default export:
```ts
const SafeAreaView = View;
export default SafeAreaView;
```
This causes a `ModuleDependencyWarning` at build time:
```
export 'SafeAreaView' (imported as 'SafeAreaView') was not found in './safe-area/SafeAreaView' (possible exports: default)
```
This also affects `ScreenStackItem.tsx`, which does:
```ts
import { SafeAreaView } from './safe-area/SafeAreaView';
```
For web builds this resolves to the `.web` variant, again hitting the
same missing named export.
## Fix
Replace the default export with a named export in `SafeAreaView.web.tsx`
to match the native variant (`SafeAreaView.tsx`), which only has a named
export, and the package's public surface (`safe-area/index.ts`), which
only re-exports as named.
## Test plan
- [x] Verified the warning no longer appears in a web/Storybook webpack
build after this change
## Related
Found while upgrading \`react-native-screens\` to \`4.25.0-beta.1\` in
[Expensify/App#89199](Expensify/App#89199).
Co-authored-by: Cursor <cursoragent@cursor.com>
(cherry picked from commit f779fcc)
## Description
`safe-area/index.ts` re-exports `SafeAreaView` as a named export:
```ts
export { SafeAreaView } from './SafeAreaView';
```
For web builds, webpack resolves `'./SafeAreaView'` to
`'./SafeAreaView.web.tsx'`, which only had a default export:
```ts
const SafeAreaView = View;
export default SafeAreaView;
```
This causes a `ModuleDependencyWarning` at build time:
```
export 'SafeAreaView' (imported as 'SafeAreaView') was not found in './safe-area/SafeAreaView' (possible exports: default)
```
This also affects `ScreenStackItem.tsx`, which does:
```ts
import { SafeAreaView } from './safe-area/SafeAreaView';
```
For web builds this resolves to the `.web` variant, again hitting the
same missing named export.
## Fix
Replace the default export with a named export in `SafeAreaView.web.tsx`
to match the native variant (`SafeAreaView.tsx`), which only has a named
export, and the package's public surface (`safe-area/index.ts`), which
only re-exports as named.
## Test plan
- [x] Verified the warning no longer appears in a web/Storybook webpack
build after this change
## Related
Found while upgrading \`react-native-screens\` to \`4.25.0-beta.1\` in
[Expensify/App#89199](Expensify/App#89199).
Co-authored-by: Cursor <cursoragent@cursor.com>
(cherry picked from commit f779fcc)
Explanation of Change
Upgrades
react-native-screensfrom4.15.4to4.25.0-beta.1.The patch
react-native-screens+4.15.4+001+fix-lifecycle-events-in-fragment-host.patchwas previously applied to fix lifecycle events being silently dropped when React Native is hosted inside aReactNativeFragment(HybridApp). This fix was merged upstream in software-mansion/react-native-screens#3854 and is included in4.25.0-beta.1, so the patch is no longer needed. I had created a reminder to upgrade this dependency after that was released, so here it is.Also adds
legacy-peer-deps=trueto.npmrcsince npm 7+'s strict semver resolution excludes pre-release versions from peer dependency ranges like>=4.0.0.Fixed Issues
$
PROPOSAL:
Tests
Offline tests
N/A — dependency upgrade only.
QA Steps
N/A — this is a dependency upgrade with no user-facing behavior changes.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari