Skip to content

Commit

Permalink
Upgrade to latest React experimental (#40672)
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
timneutkens committed Sep 19, 2022
1 parent dc11d77 commit 6df8770
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 39 deletions.
4 changes: 2 additions & 2 deletions package.json
Expand Up @@ -179,8 +179,8 @@
"react-17": "npm:react@17.0.2",
"react-dom": "18.2.0",
"react-dom-17": "npm:react-dom@17.0.2",
"react-dom-exp": "npm:react-dom@0.0.0-experimental-e6a062bd2-20220913",
"react-exp": "npm:react@0.0.0-experimental-e6a062bd2-20220913",
"react-dom-exp": "npm:react-dom@0.0.0-experimental-8951c5fc9-20220915",
"react-exp": "npm:react@0.0.0-experimental-8951c5fc9-20220915",
"react-ssr-prepass": "1.0.8",
"react-virtualized": "9.22.3",
"relay-compiler": "13.0.2",
Expand Down
Expand Up @@ -57,9 +57,13 @@ function resolveModuleReference(bundlerConfig, moduleData) {
// replicate it in user space. null means that it has already loaded.

var chunkCache = new Map();
var asyncModuleCache = new Map(); // Start preloading the modules since we might need them soon.
var asyncModuleCache = new Map();

function ignoreReject() {// We rely on rejected promises to be handled by another listener.
} // Start preloading the modules since we might need them soon.
// This function doesn't suspend.


function preloadModule(moduleData) {
var chunks = moduleData.chunks;
var promises = [];
Expand All @@ -73,9 +77,10 @@ function preloadModule(moduleData) {

promises.push(thenable);
var resolve = chunkCache.set.bind(chunkCache, chunkId, null);
var reject = chunkCache.set.bind(chunkCache, chunkId);
thenable.then(resolve, reject);
thenable.then(resolve, ignoreReject);
chunkCache.set(chunkId, thenable);
} else if (entry !== null) {
promises.push(entry);
}
}

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/next/package.json
Expand Up @@ -244,7 +244,7 @@
"raw-body": "2.4.1",
"react-is": "17.0.2",
"react-refresh": "0.12.0",
"react-server-dom-webpack": "0.0.0-experimental-975b64464-20220914",
"react-server-dom-webpack": "0.0.0-experimental-8951c5fc9-20220915",
"regenerator-runtime": "0.13.4",
"sass-loader": "12.4.0",
"schema-utils2": "npm:schema-utils@2.7.1",
Expand Down
34 changes: 17 additions & 17 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 6df8770

Please sign in to comment.