Skip to content

Commit a6674f5

Browse files
kittenvonovak
andcommitted
chore(expo-router,jest-expo): Tighten react-server-dom-webpack peer requirements and bump (#41379)
> [!NOTE] > Backport will at least be needed for SDK 54, maybe SDK 53, if the range is compatible with it We don't need to open up the range, and can set a new minimum as of latest publishing date. We can also bump our internal version. `jest-expo` had a hard dependency on `react-server-dom-webpack` which can also be switched to a peer dependency. - Tighten peer range on `react-server-dom-webpack` and bump - Switch `react-server-dom-webpack` to optional peers in `jest-expo` and bump - CI-only <!-- Please check the appropriate items below if they apply to your diff. --> - [x] I added a `changelog.md` entry and rebuilt the package sources according to [this short guide](https://github.com/expo/expo/blob/main/CONTRIBUTING.md#-before-submitting) - [ ] This diff will work correctly for `npx expo prebuild` & EAS Build (eg: updated a module plugin). - [ ] Conforms with the [Documentation Writing Style Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md) --------- Co-authored-by: Vojtech Novak <vonovak@gmail.com>
1 parent d72cc93 commit a6674f5

File tree

7 files changed

+25
-9
lines changed

7 files changed

+25
-9
lines changed

packages/expo-router/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010

1111
### 💡 Others
1212

13+
- Bump and tighten `react-server-dom-webpack` peer range ([#41379](https://github.com/expo/expo/pull/41379) by [@kitten](https://github.com/kitten))
14+
1315
## 5.1.7 — 2025-09-22
1416

1517
### 🐛 Bug fixes

packages/expo-router/package.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,8 @@
8181
"expo-linking": "*",
8282
"react-native-reanimated": "*",
8383
"react-native-safe-area-context": "*",
84-
"react-native-screens": "*"
84+
"react-native-screens": "*",
85+
"react-server-dom-webpack": "~19.0.1 || ~19.1.2 || ~19.2.1"
8586
},
8687
"peerDependenciesMeta": {
8788
"react-native-reanimated": {
@@ -92,6 +93,9 @@
9293
},
9394
"@testing-library/jest-native": {
9495
"optional": true
96+
},
97+
"react-server-dom-webpack": {
98+
"optional": true
9599
}
96100
},
97101
"devDependencies": {
@@ -101,7 +105,7 @@
101105
"@testing-library/react-native": "^13.1.0",
102106
"@types/semver": "^7.7.0",
103107
"immer": "^10.1.1",
104-
"react-server-dom-webpack": "~19.0.0",
108+
"react-server-dom-webpack": "~19.0.1",
105109
"tsd": "^0.28.1"
106110
},
107111
"dependencies": {

packages/jest-expo/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010

1111
### 💡 Others
1212

13+
- Bump and tighten `react-server-dom-webpack` peer range ([#41379](https://github.com/expo/expo/pull/41379) by [@kitten](https://github.com/kitten))
14+
1315
## 53.0.10 — 2025-08-22
1416

1517
_This version does not introduce any user-facing changes._

packages/jest-expo/package.json

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,21 @@
4949
"jest-watch-typeahead": "2.2.1",
5050
"json5": "^2.2.3",
5151
"lodash": "^4.17.19",
52-
"react-server-dom-webpack": "~19.0.0",
5352
"react-test-renderer": "19.0.0",
5453
"server-only": "^0.0.1",
5554
"stacktrace-js": "^2.0.2"
5655
},
5756
"peerDependencies": {
5857
"expo": "*",
59-
"react-native": "*"
58+
"react-native": "*",
59+
"react-server-dom-webpack": "~19.0.1 || ~19.1.2 || ~19.2.1"
60+
},
61+
"peerDependenciesMeta": {
62+
"react-server-dom-webpack": {
63+
"optional": true
64+
}
65+
},
66+
"devDependencies": {
67+
"react-server-dom-webpack": "~19.0.1"
6068
}
6169
}

packages/jest-expo/src/rsc-utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import path from 'path';
2-
import { renderToReadableStream } from 'react-server-dom-webpack/server';
32

43
export const streamToString = async (stream) => {
54
const decoder = new TextDecoder();
@@ -38,6 +37,7 @@ export async function renderJsxToFlightStringAsync(jsx, throwOnError = true) {
3837
}
3938

4039
export function renderJsxToReadableStream(jsx, { onError } = {}) {
40+
const { renderToReadableStream } = require('react-server-dom-webpack/server');
4141
const clientBoundaries = [];
4242
const bundlerConfig = new Proxy(
4343
{},

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13282,10 +13282,10 @@ react-refresh@^0.14.0, react-refresh@^0.14.2:
1328213282
resolved "https://registry.yarnpkg.com/react-refresh/-/react-refresh-0.14.2.tgz#3833da01ce32da470f1f936b9d477da5c7028bf9"
1328313283
integrity sha512-jCvmsr+1IUSMUyzOkRcvnVbX3ZYC6g9TDrDbFuFmRDq7PD4yaGbLKNQL6k2jnArV8hjYxh7hVhAZB6s9HDGpZA==
1328413284

13285-
react-server-dom-webpack@~19.0.0:
13286-
version "19.0.0"
13287-
resolved "https://registry.yarnpkg.com/react-server-dom-webpack/-/react-server-dom-webpack-19.0.0.tgz#c60819b6cb54e317e675ddc0c5959ff915b789d0"
13288-
integrity sha512-hLug9KEXLc8vnU9lDNe2b2rKKDaqrp5gNiES4uyu2Up3FZfZJZmdwLFXlWzdA9gTB/6/cWduSB2K1Lfag2pSvw==
13285+
react-server-dom-webpack@~19.0.1:
13286+
version "19.0.1"
13287+
resolved "https://registry.yarnpkg.com/react-server-dom-webpack/-/react-server-dom-webpack-19.0.1.tgz#0fa66dd7eea5f9d92c6fd4b52e1a303bae5e2df3"
13288+
integrity sha512-RdiENR3uo87Te0jZbFcCLX1chzpwFGLqN35h7n5pgGNiXqWnz43ly94uyCiy4X8zx3swjYYULHmJvwK1P5HBig==
1328913289
dependencies:
1329013290
acorn-loose "^8.3.0"
1329113291
neo-async "^2.6.1"

0 commit comments

Comments
 (0)