Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(backport) Update React from 60a927d04 to 14898b6a9 #63442

Closed
wants to merge 1 commit into from

Conversation

ztanner
Copy link
Member

@ztanner ztanner commented Mar 19, 2024

Updates React from 60a927d04 to 14898b6a9.

React upstream changes

Closes NEXT-2856

@ijjk ijjk added created-by: Next.js team PRs by the Next.js team. type: next labels Mar 19, 2024
@ijjk
Copy link
Member

ijjk commented Mar 19, 2024

Failing test suites

Commit: 34baccc

pnpm test-dev test/development/acceptance-app/component-stack.test.ts

  • Component Stack in error overlay > should show a component stack on hydration error
Expand output

● Component Stack in error overlay › should show a component stack on hydration error

expect(received).toMatchInlineSnapshot(snapshot)

Snapshot name: `Component Stack in error overlay should show a component stack on hydration error 1`

- Snapshot  - 0
+ Received  + 1

  p
  div
  Component
  main
+ Mismatch

  54 |       `)
  55 |     } else {
> 56 |       expect(await session.getRedboxComponentStack()).toMatchInlineSnapshot(`
     |                                                       ^
  57 |         "p
  58 |         div
  59 |         Component

  at Object.toMatchInlineSnapshot (development/acceptance-app/component-stack.test.ts:56:55)

Read more about building and testing Next.js in contributing.md.

pnpm test-dev test/development/app-dir/strict-mode-enabled-by-default/strict-mode-enabled-by-default.test.ts (PPR)

  • Strict Mode enabled by default > should work using browser
Expand output

● Strict Mode enabled by default › should work using browser

expect(received).toBe(expected) // Object.is equality

Expected: 2
Received: 1

  15 |         (log) => log.source === 'log' && log.message.match(/logged \d times/)
  16 |       )
> 17 |       expect(userLogs.length).toBe(2)
     |                               ^
  18 |       userLogs.forEach((log, i) => {
  19 |         expect(log.message).toBe(`logged ${i + 1} times`)
  20 |       })

  at Object.toBe (development/app-dir/strict-mode-enabled-by-default/strict-mode-enabled-by-default.test.ts:17:31)

Read more about building and testing Next.js in contributing.md.

TURBOPACK=1 pnpm test test/integration/create-next-app/package-manager.test.ts (turbopack)

  • should use npm as the package manager on supplying --use-npm with example

  • should use Yarn as the package manager on supplying --use-yarn with example

  • should use pnpm as the package manager on supplying --use-pnpm with example

  • should use Bun as the package manager on supplying --use-bun with example

  • should infer npm as the package manager with example

  • should infer yarn as the package manager with example

  • should infer pnpm as the package manager with example

  • should infer Bun as the package manager with example

Expand output

● should use npm as the package manager on supplying --use-npm with example

expect(received).toBe(expected) // Object.is equality

Expected: true
Received: false

  80 |   for (const file of files) {
  81 |     try {
> 82 |       expect(existsSync(resolve(projectRoot, file))).toBe(true)
     |                                                      ^
  83 |     } catch (err) {
  84 |       require('console').error(
  85 |         `missing expected file ${file}`,

  at toBe (integration/create-next-app/lib/utils.ts:82:54)
  at integration/create-next-app/package-manager.test.ts:88:28
  at useTempDir (lib/use-temp-dir.ts:24:5)
  at Object.<anonymous> (integration/create-next-app/package-manager.test.ts:72:3)

● should use Yarn as the package manager on supplying --use-yarn with example

expect(received).toBe(expected) // Object.is equality

Expected: true
Received: false

  80 |   for (const file of files) {
  81 |     try {
> 82 |       expect(existsSync(resolve(projectRoot, file))).toBe(true)
     |                                                      ^
  83 |     } catch (err) {
  84 |       require('console').error(
  85 |         `missing expected file ${file}`,

  at toBe (integration/create-next-app/lib/utils.ts:82:54)
  at integration/create-next-app/package-manager.test.ts:166:28
  at useTempDir (lib/use-temp-dir.ts:24:5)
  at Object.<anonymous> (integration/create-next-app/package-manager.test.ts:150:3)

● should use pnpm as the package manager on supplying --use-pnpm with example

expect(received).toBe(expected) // Object.is equality

Expected: true
Received: false

  80 |   for (const file of files) {
  81 |     try {
> 82 |       expect(existsSync(resolve(projectRoot, file))).toBe(true)
     |                                                      ^
  83 |     } catch (err) {
  84 |       require('console').error(
  85 |         `missing expected file ${file}`,

  at toBe (integration/create-next-app/lib/utils.ts:82:54)
  at integration/create-next-app/package-manager.test.ts:244:28
  at useTempDir (lib/use-temp-dir.ts:24:5)
  at Object.<anonymous> (integration/create-next-app/package-manager.test.ts:228:3)

● should use Bun as the package manager on supplying --use-bun with example

expect(received).toBe(expected) // Object.is equality

Expected: true
Received: false

  80 |   for (const file of files) {
  81 |     try {
> 82 |       expect(existsSync(resolve(projectRoot, file))).toBe(true)
     |                                                      ^
  83 |     } catch (err) {
  84 |       require('console').error(
  85 |         `missing expected file ${file}`,

  at toBe (integration/create-next-app/lib/utils.ts:82:54)
  at integration/create-next-app/package-manager.test.ts:318:28
  at useTempDir (lib/use-temp-dir.ts:24:5)
  at Object.<anonymous> (integration/create-next-app/package-manager.test.ts:302:3)

● should infer npm as the package manager with example

expect(received).toBe(expected) // Object.is equality

Expected: true
Received: false

  80 |   for (const file of files) {
  81 |     try {
> 82 |       expect(existsSync(resolve(projectRoot, file))).toBe(true)
     |                                                      ^
  83 |     } catch (err) {
  84 |       require('console').error(
  85 |         `missing expected file ${file}`,

  at toBe (integration/create-next-app/lib/utils.ts:82:54)
  at integration/create-next-app/package-manager.test.ts:389:28
  at useTempDir (lib/use-temp-dir.ts:24:5)
  at Object.<anonymous> (integration/create-next-app/package-manager.test.ts:366:3)

● should infer yarn as the package manager with example

expect(received).toBe(expected) // Object.is equality

Expected: true
Received: false

  80 |   for (const file of files) {
  81 |     try {
> 82 |       expect(existsSync(resolve(projectRoot, file))).toBe(true)
     |                                                      ^
  83 |     } catch (err) {
  84 |       require('console').error(
  85 |         `missing expected file ${file}`,

  at toBe (integration/create-next-app/lib/utils.ts:82:54)
  at integration/create-next-app/package-manager.test.ts:472:28
  at useTempDir (lib/use-temp-dir.ts:24:5)
  at Object.<anonymous> (integration/create-next-app/package-manager.test.ts:449:3)

● should infer pnpm as the package manager with example

expect(received).toBe(expected) // Object.is equality

Expected: true
Received: false

  80 |   for (const file of files) {
  81 |     try {
> 82 |       expect(existsSync(resolve(projectRoot, file))).toBe(true)
     |                                                      ^
  83 |     } catch (err) {
  84 |       require('console').error(
  85 |         `missing expected file ${file}`,

  at toBe (integration/create-next-app/lib/utils.ts:82:54)
  at integration/create-next-app/package-manager.test.ts:555:28
  at useTempDir (lib/use-temp-dir.ts:24:5)
  at Object.<anonymous> (integration/create-next-app/package-manager.test.ts:532:3)

● should infer Bun as the package manager with example

expect(received).toBe(expected) // Object.is equality

Expected: true
Received: false

  80 |   for (const file of files) {
  81 |     try {
> 82 |       expect(existsSync(resolve(projectRoot, file))).toBe(true)
     |                                                      ^
  83 |     } catch (err) {
  84 |       require('console').error(
  85 |         `missing expected file ${file}`,

  at toBe (integration/create-next-app/lib/utils.ts:82:54)
  at integration/create-next-app/package-manager.test.ts:630:28
  at useTempDir (lib/use-temp-dir.ts:24:5)
  at Object.<anonymous> (integration/create-next-app/package-manager.test.ts:607:3)

Read more about building and testing Next.js in contributing.md.

TURBOPACK=1 pnpm test test/integration/create-next-app/index.test.ts (turbopack)

  • create next app > valid example
  • create next app > should allow example with GitHub URL
  • create next app > should allow example with GitHub URL and example-path
  • create next app > should use --example-path over the file path in the GitHub URL
Expand output

● create next app › valid example

expect(received).toBe(expected) // Object.is equality

Expected: true
Received: false

  80 |   for (const file of files) {
  81 |     try {
> 82 |       expect(existsSync(resolve(projectRoot, file))).toBe(true)
     |                                                      ^
  83 |     } catch (err) {
  84 |       require('console').error(
  85 |         `missing expected file ${file}`,

  at toBe (integration/create-next-app/lib/utils.ts:82:54)
  at integration/create-next-app/index.test.ts:137:30
  at useTempDir (lib/use-temp-dir.ts:24:5)
  at Object.<anonymous> (integration/create-next-app/index.test.ts:121:5)

● create next app › should allow example with GitHub URL

expect(received).toBe(expected) // Object.is equality

Expected: true
Received: false

  80 |   for (const file of files) {
  81 |     try {
> 82 |       expect(existsSync(resolve(projectRoot, file))).toBe(true)
     |                                                      ^
  83 |     } catch (err) {
  84 |       require('console').error(
  85 |         `missing expected file ${file}`,

  at toBe (integration/create-next-app/lib/utils.ts:82:54)
  at integration/create-next-app/index.test.ts:194:30
  at useTempDir (lib/use-temp-dir.ts:24:5)
  at Object.<anonymous> (integration/create-next-app/index.test.ts:177:5)

● create next app › should allow example with GitHub URL and example-path

expect(received).toBe(expected) // Object.is equality

Expected: true
Received: false

  80 |   for (const file of files) {
  81 |     try {
> 82 |       expect(existsSync(resolve(projectRoot, file))).toBe(true)
     |                                                      ^
  83 |     } catch (err) {
  84 |       require('console').error(
  85 |         `missing expected file ${file}`,

  at toBe (integration/create-next-app/lib/utils.ts:82:54)
  at integration/create-next-app/index.test.ts:258:30
  at useTempDir (lib/use-temp-dir.ts:24:5)
  at Object.<anonymous> (integration/create-next-app/index.test.ts:239:5)

● create next app › should use --example-path over the file path in the GitHub URL

expect(received).toBe(expected) // Object.is equality

Expected: true
Received: false

  80 |   for (const file of files) {
  81 |     try {
> 82 |       expect(existsSync(resolve(projectRoot, file))).toBe(true)
     |                                                      ^
  83 |     } catch (err) {
  84 |       require('console').error(
  85 |         `missing expected file ${file}`,

  at toBe (integration/create-next-app/lib/utils.ts:82:54)
  at integration/create-next-app/index.test.ts:291:30
  at useTempDir (lib/use-temp-dir.ts:24:5)
  at Object.<anonymous> (integration/create-next-app/index.test.ts:272:5)

Read more about building and testing Next.js in contributing.md.

pnpm test-dev test/e2e/app-dir/navigation/navigation.test.ts (PPR)

  • app dir - navigation > query string > useParams identity between renders > should be stable in app
Expand output

● app dir - navigation › query string › useParams identity between renders › should be stable in app

expect(received).toHaveLength(expected)

Expected length: 2
Received length: 1
Received array:  [{"message": "params changed", "source": "log"}]

  81 |             expect(
  82 |               logs.filter(({ message }) => message === 'params changed')
> 83 |             ).toHaveLength(waitForNEffects)
     |               ^
  84 |
  85 |             return logs.length
  86 |           })

  at toHaveLength (e2e/app-dir/navigation/navigation.test.ts:83:15)
  at retry (lib/next-test-utils.ts:724:14)
  at runTests (e2e/app-dir/navigation/navigation.test.ts:78:30)
  at Object.<anonymous> (e2e/app-dir/navigation/navigation.test.ts:121:11)

Read more about building and testing Next.js in contributing.md.

pnpm test-start test/production/prerender-prefetch/index.test.ts

  • Prerender prefetch > with optimisticClientCache disabled > should update cache using router.push with unstable_skipClientCache
Expand output

● Prerender prefetch › with optimisticClientCache disabled › should update cache using router.push with unstable_skipClientCache

expect(received).not.toBe(expected) // Object.is equality

Expected: not 1710809246174

  154 |         await browser.elementByCss('#props').text()
  155 |       ).now
> 156 |       expect(newTime).not.toBe(startTime)
      |                           ^
  157 |       expect(isNaN(newTime)).toBe(false)
  158 |     })
  159 |

  at Object.toBe (production/prerender-prefetch/index.test.ts:156:27)

Read more about building and testing Next.js in contributing.md.

@ztanner ztanner closed this Mar 19, 2024
@ztanner ztanner deleted the zt/backport-react branch March 19, 2024 14:17
@github-actions github-actions bot added the locked label Apr 3, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants