Skip to content

Commit

Permalink
Upgrade React (#48589)
Browse files Browse the repository at this point in the history
Second try for #48561

<!-- Thanks for opening a PR! Your contribution is much appreciated.
To make sure your PR is handled as smoothly as possible we request that
you follow the checklist sections below.
Choose the right checklist for the change(s) that you're making:

## For Contributors

### Improving Documentation or adding/fixing Examples

- The "examples guidelines" are followed from our contributing doc
https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md
- Make sure the linting passes by running `pnpm build && pnpm lint`. See
https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md

### Fixing a bug

- Related issues linked using `fixes #number`
- Tests added. See:
https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs
- Errors have a helpful link attached, see
https://github.com/vercel/next.js/blob/canary/contributing.md

### Adding a feature

- Implements an existing feature request or RFC. Make sure the feature
request has been accepted for implementation before opening a PR. (A
discussion must be opened, see
https://github.com/vercel/next.js/discussions/new?category=ideas)
- Related issues/discussions are linked using `fixes #number`
- e2e tests added
(https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs
- Documentation added
- Telemetry added. In case of a feature if it's used or not.
- Errors have a helpful link attached, see
https://github.com/vercel/next.js/blob/canary/contributing.md



## For Maintainers

- Minimal description (aim for explaining to someone not on the team to
understand the PR)
- When linking to a Slack thread, you might want to share details of the
conclusion
- Link both the Linear (Fixes NEXT-xxx) and the GitHub issues
- Add review comments if necessary to explain to the reviewer the logic
behind a change

### What?

### Why?

### How?

Closes NEXT-
Fixes #

-->

---------

Co-authored-by: Sophie Alpert <[email protected]>
Co-authored-by: Shu Ding <[email protected]>
  • Loading branch information
3 people authored Apr 20, 2023
1 parent 864f065 commit 925bb3b
Show file tree
Hide file tree
Showing 67 changed files with 7,921 additions and 8,004 deletions.
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@
"registry": "https://registry.npmjs.org/"
}
},
"version": "13.3.1-canary.16"
"version": "13.3.1-canary.15"
}
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -196,11 +196,11 @@
"random-seed": "0.3.0",
"react": "18.2.0",
"react-17": "npm:[email protected]",
"react-builtin": "npm:[email protected]85de6fde5-20230328",
"react-builtin": "npm:[email protected]1f248bdd7-20230419",
"react-dom": "18.2.0",
"react-dom-17": "npm:[email protected]",
"react-dom-builtin": "npm:[email protected]85de6fde5-20230328",
"react-server-dom-webpack": "18.3.0-next-85de6fde5-20230328",
"react-dom-builtin": "npm:[email protected]1f248bdd7-20230419",
"react-server-dom-webpack": "18.3.0-next-1f248bdd7-20230419",
"react-ssr-prepass": "1.0.8",
"react-virtualized": "9.22.3",
"relay-compiler": "13.0.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/create-next-app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "create-next-app",
"version": "13.3.1-canary.16",
"version": "13.3.1-canary.15",
"keywords": [
"react",
"next",
Expand Down
4 changes: 2 additions & 2 deletions packages/eslint-config-next/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eslint-config-next",
"version": "13.3.1-canary.16",
"version": "13.3.1-canary.15",
"description": "ESLint configuration used by NextJS.",
"main": "index.js",
"license": "MIT",
Expand All @@ -9,7 +9,7 @@
"directory": "packages/eslint-config-next"
},
"dependencies": {
"@next/eslint-plugin-next": "13.3.1-canary.16",
"@next/eslint-plugin-next": "13.3.1-canary.15",
"@rushstack/eslint-patch": "^1.1.3",
"@typescript-eslint/parser": "^5.42.0",
"eslint-import-resolver-node": "^0.3.6",
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin-next/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/eslint-plugin-next",
"version": "13.3.1-canary.16",
"version": "13.3.1-canary.15",
"description": "ESLint plugin for NextJS.",
"main": "dist/index.js",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/font/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/font",
"version": "13.3.1-canary.16",
"version": "13.3.1-canary.15",
"repository": {
"url": "vercel/next.js",
"directory": "packages/font"
Expand Down
2 changes: 1 addition & 1 deletion packages/next-bundle-analyzer/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/bundle-analyzer",
"version": "13.3.1-canary.16",
"version": "13.3.1-canary.15",
"main": "index.js",
"types": "index.d.ts",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/next-codemod/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/codemod",
"version": "13.3.1-canary.16",
"version": "13.3.1-canary.15",
"license": "MIT",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion packages/next-env/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/env",
"version": "13.3.1-canary.16",
"version": "13.3.1-canary.15",
"keywords": [
"react",
"next",
Expand Down
2 changes: 1 addition & 1 deletion packages/next-mdx/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/mdx",
"version": "13.3.1-canary.16",
"version": "13.3.1-canary.15",
"main": "index.js",
"license": "MIT",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion packages/next-plugin-storybook/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/plugin-storybook",
"version": "13.3.1-canary.16",
"version": "13.3.1-canary.15",
"repository": {
"url": "vercel/next.js",
"directory": "packages/next-plugin-storybook"
Expand Down
2 changes: 1 addition & 1 deletion packages/next-polyfill-module/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/polyfill-module",
"version": "13.3.1-canary.16",
"version": "13.3.1-canary.15",
"description": "A standard library polyfill for ES Modules supporting browsers (Edge 16+, Firefox 60+, Chrome 61+, Safari 10.1+)",
"main": "dist/polyfill-module.js",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/next-polyfill-nomodule/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/polyfill-nomodule",
"version": "13.3.1-canary.16",
"version": "13.3.1-canary.15",
"description": "A polyfill for non-dead, nomodule browsers.",
"main": "dist/polyfill-nomodule.js",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/next-swc/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/swc",
"version": "13.3.1-canary.16",
"version": "13.3.1-canary.15",
"private": true,
"scripts": {
"clean": "rm -rf ./native/*",
Expand Down
14 changes: 7 additions & 7 deletions packages/next/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "next",
"version": "13.3.1-canary.16",
"version": "13.3.1-canary.15",
"description": "The React Framework",
"main": "./dist/server/next.js",
"license": "MIT",
Expand Down Expand Up @@ -81,7 +81,7 @@
]
},
"dependencies": {
"@next/env": "13.3.1-canary.16",
"@next/env": "13.3.1-canary.15",
"@swc/helpers": "0.5.0",
"busboy": "1.6.0",
"caniuse-lite": "^1.0.30001406",
Expand Down Expand Up @@ -140,11 +140,11 @@
"@jest/types": "29.5.0",
"@napi-rs/cli": "2.14.7",
"@napi-rs/triples": "1.1.0",
"@next/polyfill-module": "13.3.1-canary.16",
"@next/polyfill-nomodule": "13.3.1-canary.16",
"@next/react-dev-overlay": "13.3.1-canary.16",
"@next/react-refresh-utils": "13.3.1-canary.16",
"@next/swc": "13.3.1-canary.16",
"@next/polyfill-module": "13.3.1-canary.15",
"@next/polyfill-nomodule": "13.3.1-canary.15",
"@next/react-dev-overlay": "13.3.1-canary.15",
"@next/react-refresh-utils": "13.3.1-canary.15",
"@next/swc": "13.3.1-canary.15",
"@opentelemetry/api": "1.4.1",
"@segment/ajv-human-errors": "2.1.2",
"@taskr/clear": "1.1.0",
Expand Down
18 changes: 7 additions & 11 deletions packages/next/src/build/webpack/plugins/flight-manifest-plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ export class ClientReferenceManifestPlugin {
cssFiles: {},
clientModules: {},
}
const dev = this.dev

const clientRequestsSet = new Set()

Expand Down Expand Up @@ -255,18 +256,13 @@ export class ClientReferenceManifestPlugin {
return null
}

// Get the actual chunk file names from the chunk file list.
// It's possible that the chunk is generated via `import()`, in
// that case the chunk file name will be '[name].[contenthash]'
// instead of '[name]-[chunkhash]'.
return [...requiredChunk.files].map((file) => {
// It's possible that a chunk also emits CSS files, that will
// be handled separatedly.
if (!file.endsWith('.js')) return null
return requiredChunk.id + ':' + file
})
return (
requiredChunk.id +
':' +
(requiredChunk.name || requiredChunk.id) +
(dev ? '' : '-' + requiredChunk.hash)
)
})
.flat()
.filter(nonNullable)
}
const requiredChunks = getAppPathRequiredChunks()
Expand Down
4 changes: 2 additions & 2 deletions packages/next/src/client/app-index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ self.__next_require__ =
// eslint-disable-next-line no-undef
;(self as any).__next_chunk_load__ = (chunk: string) => {
if (!chunk) return Promise.resolve()
const [chunkId, chunkFilePath] = chunk.split(':')
chunkFilenameMap[chunkId] = chunkFilePath
const [chunkId, chunkFileName] = chunk.split(':')
chunkFilenameMap[chunkId] = `static/chunks/${chunkFileName}.js`

// @ts-ignore
// eslint-disable-next-line no-undef
Expand Down
Loading

0 comments on commit 925bb3b

Please sign in to comment.