Skip to content

Commit 0891507

Browse files
authored
Sync with react.dev @ b22cbc3 (#1126)
This PR was automatically generated. Merge changes from [react.dev](https://github.com/reactjs/react.dev/commits/main) at b22cbc3 The following files have conflicts and may need new translations: * [x] [package.json](/reactjs/react.dev/commits/main/package.json) * [ ] [src/content/blog/2020/12/21/data-fetching-with-react-server-components.md](/reactjs/react.dev/commits/main/src/content/blog/2020/12/21/data-fetching-with-react-server-components.md) * [ ] [src/content/blog/2021/06/08/the-plan-for-react-18.md](/reactjs/react.dev/commits/main/src/content/blog/2021/06/08/the-plan-for-react-18.md) * [ ] [src/content/blog/2021/12/17/react-conf-2021-recap.md](/reactjs/react.dev/commits/main/src/content/blog/2021/12/17/react-conf-2021-recap.md) * [ ] [src/content/blog/2022/06/15/react-labs-what-we-have-been-working-on-june-2022.md](/reactjs/react.dev/commits/main/src/content/blog/2022/06/15/react-labs-what-we-have-been-working-on-june-2022.md) * [ ] [src/content/blog/2023/03/16/introducing-react-dev.md](/reactjs/react.dev/commits/main/src/content/blog/2023/03/16/introducing-react-dev.md) * [ ] [src/content/blog/2023/03/22/react-labs-what-we-have-been-working-on-march-2023.md](/reactjs/react.dev/commits/main/src/content/blog/2023/03/22/react-labs-what-we-have-been-working-on-march-2023.md) * [ ] [src/content/blog/2023/05/03/react-canaries.md](/reactjs/react.dev/commits/main/src/content/blog/2023/05/03/react-canaries.md) * [ ] [src/content/blog/2024/02/15/react-labs-what-we-have-been-working-on-february-2024.md](/reactjs/react.dev/commits/main/src/content/blog/2024/02/15/react-labs-what-we-have-been-working-on-february-2024.md) * [ ] [src/content/community/docs-contributors.md](/reactjs/react.dev/commits/main/src/content/community/docs-contributors.md) * [ ] [src/content/learn/add-react-to-an-existing-project.md](/reactjs/react.dev/commits/main/src/content/learn/add-react-to-an-existing-project.md) * [x] [yarn.lock](/reactjs/react.dev/commits/main/yarn.lock) Please fix the conflicts by pushing new commits to this pull request, either by editing the files directly on GitHub or by checking out this branch. ## DO NOT SQUASH MERGE THIS PULL REQUEST! Doing so will "erase" the commits from main and cause them to show up as conflicts the next time we merge.
2 parents 4b34738 + 9131c8a commit 0891507

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+1491
-564
lines changed

.eslintrc

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@
22
"root": true,
33
"extends": "next/core-web-vitals",
44
"parser": "@typescript-eslint/parser",
5-
"plugins": ["@typescript-eslint"],
5+
"plugins": ["@typescript-eslint", "eslint-plugin-react-compiler"],
66
"rules": {
77
"no-unused-vars": "off",
8-
"@typescript-eslint/no-unused-vars": ["error", { "varsIgnorePattern": "^_" }],
9-
"react-hooks/exhaustive-deps": "error"
8+
"@typescript-eslint/no-unused-vars": ["error", {"varsIgnorePattern": "^_"}],
9+
"react-hooks/exhaustive-deps": "error",
10+
"react/no-unknown-property": ["error", {"ignore": ["meta"]}],
11+
"react-compiler/react-compiler": "error"
1012
},
1113
"env": {
1214
"node": true,

next-env.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
/// <reference types="next/image-types/global" />
33

44
// NOTE: This file should not be edited
5-
// see https://nextjs.org/docs/basic-features/typescript for more information.
5+
// see https://nextjs.org/docs/pages/api-reference/config/typescript for more information.

next.config.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,8 @@ const nextConfig = {
99
pageExtensions: ['jsx', 'js', 'ts', 'tsx', 'mdx', 'md'],
1010
reactStrictMode: true,
1111
experimental: {
12-
// TODO: Remove after https://github.com/vercel/next.js/issues/49355 is fixed
13-
appDir: false,
1412
scrollRestoration: true,
15-
legacyBrowsers: false,
13+
reactCompiler: true,
1614
},
1715
env: {},
1816
webpack: (config, {dev, isServer, ...options}) => {

package.json

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
22
"private": true,
3-
"packageManager": "[email protected]",
43
"license": "CC",
54
"scripts": {
65
"analyze": "ANALYZE=true next build",
@@ -17,7 +16,7 @@
1716
"ci-check": "npm-run-all prettier:diff --parallel lint tsc lint-heading-ids rss lint-editorconfig",
1817
"tsc": "tsc --noEmit",
1918
"start": "next start",
20-
"postinstall": "patch-package && (is-ci || husky install .husky)",
19+
"postinstall": "is-ci || husky install .husky",
2120
"check-all": "npm-run-all prettier lint:fix tsc rss",
2221
"rss": "node scripts/generateRss.js",
2322
"cache-reset": "rm -rf node_modules/.cache && rm -rf .next && yarn cache clean",
@@ -37,12 +36,12 @@
3736
"date-fns": "^2.16.1",
3837
"debounce": "^1.2.1",
3938
"github-slugger": "^1.3.0",
40-
"next": "^13.4.1",
39+
"next": "15.1.0",
4140
"next-remote-watch": "^1.0.0",
4241
"parse-numeric-range": "^1.2.0",
43-
"react": "^0.0.0-experimental-16d053d59-20230506",
42+
"react": "^19.0.0",
4443
"react-collapsed": "4.0.4",
45-
"react-dom": "^0.0.0-experimental-16d053d59-20230506",
44+
"react-dom": "^19.0.0",
4645
"remark-frontmatter": "^4.0.1",
4746
"remark-gfm": "^3.0.1"
4847
},
@@ -58,21 +57,23 @@
5857
"@types/mdx-js__react": "^1.5.2",
5958
"@types/node": "^14.6.4",
6059
"@types/parse-numeric-range": "^0.0.1",
61-
"@types/react": "^18.0.9",
62-
"@types/react-dom": "^18.0.5",
60+
"@types/react": "^19.0.0",
61+
"@types/react-dom": "^19.0.0",
6362
"@typescript-eslint/eslint-plugin": "^5.36.2",
6463
"@typescript-eslint/parser": "^5.36.2",
6564
"asyncro": "^3.0.0",
6665
"autoprefixer": "^10.4.2",
6766
"babel-eslint": "10.x",
68-
"editorconfig-checker": "^6.0.0",
67+
"editorconfig-checker": "^6.0.1",
68+
"babel-plugin-react-compiler": "19.0.0-beta-e552027-20250112",
6969
"eslint": "7.x",
7070
"eslint-config-next": "12.0.3",
7171
"eslint-config-react-app": "^5.2.1",
7272
"eslint-plugin-flowtype": "4.x",
7373
"eslint-plugin-import": "2.x",
7474
"eslint-plugin-jsx-a11y": "6.x",
7575
"eslint-plugin-react": "7.x",
76+
"eslint-plugin-react-compiler": "^19.0.0-beta-e552027-20250112",
7677
"eslint-plugin-react-hooks": "^0.0.0-experimental-fabef7a6b-20221215",
7778
"fs-extra": "^9.0.1",
7879
"globby": "^11.0.1",
@@ -84,7 +85,6 @@
8485
"metro-cache": "0.72.2",
8586
"mocha": "^10.6.0",
8687
"npm-run-all": "^4.1.5",
87-
"patch-package": "^6.2.2",
8888
"postcss": "^8.4.5",
8989
"postcss-flexbugs-fixes": "4.2.1",
9090
"postcss-preset-env": "^6.7.0",
@@ -104,7 +104,7 @@
104104
"textlint-filter-rule-comments": "^1.2.2",
105105
"textlint-rule-allowed-uris": "^1.0.7",
106106
"textlint-tester": "^14.0.4",
107-
"typescript": "^4.0.2",
107+
"typescript": "^5.7.2",
108108
"unist-util-visit": "^2.0.3",
109109
"webpack-bundle-analyzer": "^4.5.0"
110110
},
@@ -115,5 +115,6 @@
115115
"budget": null,
116116
"budgetPercentIncreaseRed": 10,
117117
"showDetails": true
118-
}
118+
},
119+
"packageManager": "[email protected]"
119120
}

patches/next+13.4.1.patch

Lines changed: 0 additions & 22 deletions
This file was deleted.

patches/next-remote-watch+1.0.0.patch

Lines changed: 0 additions & 16 deletions
This file was deleted.

src/components/ExternalLink.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
/*
22
* Copyright (c) Facebook, Inc. and its affiliates.
33
*/
4+
import type {DetailedHTMLProps, AnchorHTMLAttributes} from 'react';
45

56
export function ExternalLink({
67
href,
78
target,
89
children,
910
...props
10-
}: JSX.IntrinsicElements['a']) {
11+
}: DetailedHTMLProps<
12+
AnchorHTMLAttributes<HTMLAnchorElement>,
13+
HTMLAnchorElement
14+
>) {
1115
return (
1216
<a href={href} target={target ?? '_blank'} rel="noopener" {...props}>
1317
{children}

src/components/Icon/IconArrow.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@
44

55
import {memo} from 'react';
66
import cn from 'classnames';
7+
import type {SVGProps} from 'react';
78

89
export const IconArrow = memo<
9-
JSX.IntrinsicElements['svg'] & {
10+
SVGProps<SVGSVGElement> & {
1011
/**
1112
* The direction the arrow should point.
1213
* `start` and `end` are relative to the current locale.

src/components/Icon/IconArrowSmall.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@
44

55
import {memo} from 'react';
66
import cn from 'classnames';
7+
import type {SVGProps} from 'react';
78

89
export const IconArrowSmall = memo<
9-
JSX.IntrinsicElements['svg'] & {
10+
SVGProps<SVGSVGElement> & {
1011
/**
1112
* The direction the arrow should point.
1213
* `start` and `end` are relative to the current locale.

src/components/Icon/IconBsky.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,9 @@
33
*/
44

55
import {memo} from 'react';
6+
import type {SVGProps} from 'react';
67

7-
export const IconBsky = memo<JSX.IntrinsicElements['svg']>(function IconBsky(
8-
props
9-
) {
8+
export const IconBsky = memo<SVGProps<SVGSVGElement>>(function IconBsky(props) {
109
return (
1110
<svg
1211
aria-label="Bluesky"

0 commit comments

Comments
 (0)