Skip to content

Commit 6df8770

Browse files
authored
Upgrade to latest React experimental (#40672)
Only upgrade react-exp. ## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Errors have a helpful link attached, see `contributing.md` ## Feature - [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Documentation added - [ ] Telemetry added. In case of a feature if it's used or not. - [ ] Errors have a helpful link attached, see `contributing.md` ## Documentation / Examples - [ ] Make sure the linting passes by running `pnpm lint` - [ ] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
1 parent dc11d77 commit 6df8770

File tree

5 files changed

+44
-39
lines changed

5 files changed

+44
-39
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,8 +179,8 @@
179179
"react-17": "npm:[email protected]",
180180
"react-dom": "18.2.0",
181181
"react-dom-17": "npm:[email protected]",
182-
"react-dom-exp": "npm:[email protected]e6a062bd2-20220913",
183-
"react-exp": "npm:[email protected]e6a062bd2-20220913",
182+
"react-dom-exp": "npm:[email protected]8951c5fc9-20220915",
183+
"react-exp": "npm:[email protected]8951c5fc9-20220915",
184184
"react-ssr-prepass": "1.0.8",
185185
"react-virtualized": "9.22.3",
186186
"relay-compiler": "13.0.2",

packages/next/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack.development.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,13 @@ function resolveModuleReference(bundlerConfig, moduleData) {
5757
// replicate it in user space. null means that it has already loaded.
5858

5959
var chunkCache = new Map();
60-
var asyncModuleCache = new Map(); // Start preloading the modules since we might need them soon.
60+
var asyncModuleCache = new Map();
61+
62+
function ignoreReject() {// We rely on rejected promises to be handled by another listener.
63+
} // Start preloading the modules since we might need them soon.
6164
// This function doesn't suspend.
6265

66+
6367
function preloadModule(moduleData) {
6468
var chunks = moduleData.chunks;
6569
var promises = [];
@@ -73,9 +77,10 @@ function preloadModule(moduleData) {
7377

7478
promises.push(thenable);
7579
var resolve = chunkCache.set.bind(chunkCache, chunkId, null);
76-
var reject = chunkCache.set.bind(chunkCache, chunkId);
77-
thenable.then(resolve, reject);
80+
thenable.then(resolve, ignoreReject);
7881
chunkCache.set(chunkId, thenable);
82+
} else if (entry !== null) {
83+
promises.push(entry);
7984
}
8085
}
8186

packages/next/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack.production.min.js

Lines changed: 16 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/next/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@
244244
"raw-body": "2.4.1",
245245
"react-is": "17.0.2",
246246
"react-refresh": "0.12.0",
247-
"react-server-dom-webpack": "0.0.0-experimental-975b64464-20220914",
247+
"react-server-dom-webpack": "0.0.0-experimental-8951c5fc9-20220915",
248248
"regenerator-runtime": "0.13.4",
249249
"sass-loader": "12.4.0",
250250
"schema-utils2": "npm:[email protected]",

pnpm-lock.yaml

Lines changed: 17 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)