Skip to content

Commit ec1890f

Browse files
merging all conflicts
2 parents 468838c + ab18d2f commit ec1890f

File tree

188 files changed

+8303
-3770
lines changed

Some content is hidden

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

188 files changed

+8303
-3770
lines changed

.eslintrc

+5-3
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,

.github/workflows/analyze.yml

+16-8
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,26 @@ jobs:
1111
analyze:
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@v2
14+
- uses: actions/checkout@v4
1515

1616
- name: Set up node
17-
uses: actions/setup-node@v1
17+
uses: actions/setup-node@v4
1818
with:
1919
node-version: '20.x'
20+
cache: yarn
21+
cache-dependency-path: yarn.lock
2022

21-
- name: Install dependencies
22-
uses: bahmutov/[email protected]
23+
- name: Restore cached node_modules
24+
uses: actions/cache@v4
25+
with:
26+
path: "**/node_modules"
27+
key: node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
28+
29+
- name: Install deps
30+
run: yarn install --frozen-lockfile
2331

2432
- name: Restore next build
25-
uses: actions/cache@v2
33+
uses: actions/cache@v4
2634
id: restore-build-cache
2735
env:
2836
cache-name: cache-next-build
@@ -41,7 +49,7 @@ jobs:
4149
run: npx -p [email protected] report
4250

4351
- name: Upload bundle
44-
uses: actions/upload-artifact@v2
52+
uses: actions/upload-artifact@v4
4553
with:
4654
path: .next/analyze/__bundle_analysis.json
4755
name: bundle_analysis.json
@@ -73,7 +81,7 @@ jobs:
7381
run: ls -laR .next/analyze/base && npx -p nextjs-bundle-analysis compare
7482

7583
- name: Upload analysis comment
76-
uses: actions/upload-artifact@v2
84+
uses: actions/upload-artifact@v4
7785
with:
7886
name: analysis_comment.txt
7987
path: .next/analyze/__bundle_analysis_comment.txt
@@ -82,7 +90,7 @@ jobs:
8290
run: echo ${{ github.event.number }} > ./pr_number
8391

8492
- name: Upload PR number
85-
uses: actions/upload-artifact@v2
93+
uses: actions/upload-artifact@v4
8694
with:
8795
name: pr_number
8896
path: ./pr_number

.github/workflows/discord_notify.yml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Discord Notify
2+
3+
on:
4+
pull_request_target:
5+
types: [opened, ready_for_review]
6+
7+
jobs:
8+
check_maintainer:
9+
uses: facebook/react/.github/workflows/shared_check_maintainer.yml@main
10+
with:
11+
actor: ${{ github.event.pull_request.user.login }}
12+
is_remote: true
13+
14+
notify:
15+
if: ${{ needs.check_maintainer.outputs.is_core_team == 'true' }}
16+
needs: check_maintainer
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Discord Webhook Action
20+
uses: tsickert/[email protected]
21+
with:
22+
webhook-url: ${{ secrets.DISCORD_WEBHOOK_URL }}
23+
embed-author-name: ${{ github.event.pull_request.user.login }}
24+
embed-author-url: ${{ github.event.pull_request.user.html_url }}
25+
embed-author-icon-url: ${{ github.event.pull_request.user.avatar_url }}
26+
embed-title: '#${{ github.event.number }} (+${{github.event.pull_request.additions}} -${{github.event.pull_request.deletions}}): ${{ github.event.pull_request.title }}'
27+
embed-description: ${{ github.event.pull_request.body }}
28+
embed-url: ${{ github.event.pull_request.html_url }}
+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Label Core Team PRs
2+
3+
on:
4+
pull_request_target:
5+
6+
env:
7+
TZ: /usr/share/zoneinfo/America/Los_Angeles
8+
# https://github.com/actions/cache/blob/main/tips-and-workarounds.md#cache-segment-restore-timeout
9+
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 1
10+
11+
jobs:
12+
check_maintainer:
13+
uses: facebook/react/.github/workflows/shared_check_maintainer.yml@main
14+
with:
15+
actor: ${{ github.event.pull_request.user.login }}
16+
is_remote: true
17+
18+
label:
19+
if: ${{ needs.check_maintainer.outputs.is_core_team == 'true' }}
20+
runs-on: ubuntu-latest
21+
needs: check_maintainer
22+
steps:
23+
- name: Label PR as React Core Team
24+
uses: actions/github-script@v7
25+
with:
26+
script: |
27+
github.rest.issues.addLabels({
28+
owner: context.repo.owner,
29+
repo: context.repo.repo,
30+
issue_number: ${{ github.event.number }},
31+
labels: ['React Core Team']
32+
});

.github/workflows/site_lint.yml

+12-4
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,22 @@ jobs:
1414
name: Lint on node 20.x and ubuntu-latest
1515

1616
steps:
17-
- uses: actions/checkout@v1
17+
- uses: actions/checkout@v4
1818
- name: Use Node.js 20.x
19-
uses: actions/setup-node@v3
19+
uses: actions/setup-node@v4
2020
with:
2121
node-version: 20.x
22+
cache: yarn
23+
cache-dependency-path: yarn.lock
2224

23-
- name: Install deps and build (with cache)
24-
uses: bahmutov/[email protected]
25+
- name: Restore cached node_modules
26+
uses: actions/cache@v4
27+
with:
28+
path: "**/node_modules"
29+
key: node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
30+
31+
- name: Install deps
32+
run: yarn install --frozen-lockfile
2533

2634
- name: Lint codebase
2735
run: yarn ci-check

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ This repo contains the source code and documentation powering [react.dev](https:
77
### Prerequisites
88

99
1. Git
10-
1. Node: any 12.x version starting with v12.0.0 or greater
10+
1. Node: any version starting with v16.8.0 or greater
1111
1. Yarn: See [Yarn website for installation instructions](https://yarnpkg.com/lang/en/docs/install/)
1212
1. A fork of the repo (for any contributions)
1313
1. A clone of the [id.react.dev repo](https://github.com/reactjs/id.react.dev) on your local machine

next-env.d.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/// <reference types="next" />
22
/// <reference types="next/image-types/global" />
3+
/// <reference types="next/navigation-types/compat/navigation" />
34

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

next.config.js

+1-3
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

+13-11
Original file line numberDiff line numberDiff line change
@@ -18,27 +18,27 @@
1818
"ci-check": "npm-run-all prettier:diff --parallel lint tsc lint-heading-ids rss",
1919
"tsc": "tsc --noEmit",
2020
"start": "next start",
21-
"postinstall": "patch-package && (is-ci || husky install .husky)",
21+
"postinstall": "is-ci || husky install .husky",
2222
"check-all": "npm-run-all prettier lint:fix tsc rss",
2323
"rss": "node scripts/generateRss.js"
2424
},
2525
"dependencies": {
2626
"@codesandbox/sandpack-react": "2.13.5",
27-
"@docsearch/css": "3.0.0-alpha.41",
28-
"@docsearch/react": "3.0.0-alpha.41",
27+
"@docsearch/css": "^3.8.3",
28+
"@docsearch/react": "^3.8.3",
2929
"@headlessui/react": "^1.7.0",
3030
"@radix-ui/react-context-menu": "^2.1.5",
3131
"body-scroll-lock": "^3.1.3",
3232
"classnames": "^2.2.6",
3333
"date-fns": "^2.16.1",
3434
"debounce": "^1.2.1",
3535
"github-slugger": "^1.3.0",
36-
"next": "^13.4.1",
36+
"next": "15.1.0",
3737
"next-remote-watch": "^1.0.0",
3838
"parse-numeric-range": "^1.2.0",
39-
"react": "^0.0.0-experimental-16d053d59-20230506",
39+
"react": "^19.0.0",
4040
"react-collapsed": "4.0.4",
41-
"react-dom": "^0.0.0-experimental-16d053d59-20230506",
41+
"react-dom": "^19.0.0",
4242
"remark-frontmatter": "^4.0.1",
4343
"remark-gfm": "^3.0.1"
4444
},
@@ -54,20 +54,22 @@
5454
"@types/mdx-js__react": "^1.5.2",
5555
"@types/node": "^14.6.4",
5656
"@types/parse-numeric-range": "^0.0.1",
57-
"@types/react": "^18.0.9",
58-
"@types/react-dom": "^18.0.5",
57+
"@types/react": "^19.0.0",
58+
"@types/react-dom": "^19.0.0",
5959
"@typescript-eslint/eslint-plugin": "^5.36.2",
6060
"@typescript-eslint/parser": "^5.36.2",
6161
"asyncro": "^3.0.0",
6262
"autoprefixer": "^10.4.2",
6363
"babel-eslint": "10.x",
64+
"babel-plugin-react-compiler": "19.0.0-beta-e552027-20250112",
6465
"eslint": "7.x",
6566
"eslint-config-next": "12.0.3",
6667
"eslint-config-react-app": "^5.2.1",
6768
"eslint-plugin-flowtype": "4.x",
6869
"eslint-plugin-import": "2.x",
6970
"eslint-plugin-jsx-a11y": "6.x",
7071
"eslint-plugin-react": "7.x",
72+
"eslint-plugin-react-compiler": "^19.0.0-beta-e552027-20250112",
7173
"eslint-plugin-react-hooks": "^0.0.0-experimental-fabef7a6b-20221215",
7274
"fs-extra": "^9.0.1",
7375
"globby": "^11.0.1",
@@ -78,7 +80,6 @@
7880
"mdast-util-to-string": "^1.1.0",
7981
"metro-cache": "0.72.2",
8082
"npm-run-all": "^4.1.5",
81-
"patch-package": "^6.2.2",
8283
"postcss": "^8.4.5",
8384
"postcss-flexbugs-fixes": "4.2.1",
8485
"postcss-preset-env": "^6.7.0",
@@ -94,7 +95,7 @@
9495
"retext-smartypants": "^4.0.0",
9596
"rss": "^1.2.2",
9697
"tailwindcss": "^3.4.1",
97-
"typescript": "^4.0.2",
98+
"typescript": "^5.7.2",
9899
"unist-util-visit": "^2.0.3",
99100
"webpack-bundle-analyzer": "^4.5.0"
100101
},
@@ -109,5 +110,6 @@
109110
"lint-staged": {
110111
"*.{js,ts,jsx,tsx,css}": "yarn prettier",
111112
"src/**/*.md": "yarn fix-headings"
112-
}
113+
},
114+
"packageManager": "[email protected]"
113115
}

patches/next+13.4.1.patch

-22
This file was deleted.

patches/next-remote-watch+1.0.0.patch

-16
This file was deleted.

public/.well-known/atproto-did

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
did:plc:uorpbnp2q32vuvyeruwauyhe
67.2 KB
Loading
68.4 KB
Loading
67.1 KB
Loading
67.7 KB
Loading

public/images/team/andrey-lunyov.jpg

-56.2 KB
Binary file not shown.

public/images/team/hendrik.jpg

306 KB
Loading

public/images/team/jordan.jpg

281 KB
Loading
-129 KB
Binary file not shown.

public/images/team/lauren.jpg

52.4 KB
Loading

public/images/team/luna-wei.jpg

-283 KB
Binary file not shown.

public/images/team/mike.jpg

310 KB
Loading

public/images/team/noahlemen.jpg

-330 KB
Binary file not shown.

public/images/team/pieter.jpg

359 KB
Loading

public/images/team/sam.jpg

-99.9 KB
Binary file not shown.

public/images/team/sathya.jpg

-68.8 KB
Binary file not shown.

public/images/team/tianyu.jpg

-51.4 KB
Binary file not shown.

src/components/ExternalLink.tsx

+5-1
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

+2-1
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

+2-1
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

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/*
2+
* Copyright (c) Facebook, Inc. and its affiliates.
3+
*/
4+
5+
import {memo} from 'react';
6+
import type {SVGProps} from 'react';
7+
8+
export const IconBsky = memo<SVGProps<SVGSVGElement>>(function IconBsky(props) {
9+
return (
10+
<svg
11+
aria-label="Bluesky"
12+
viewBox="0 0 16 16"
13+
height="1.25em"
14+
width="1.25em"
15+
fill="currentColor"
16+
xmlns="http://www.w3.org/2000/svg"
17+
{...props}>
18+
<path
19+
className="x19hqcy"
20+
d="M3.468 1.948C5.303 3.325 7.276 6.118 8 7.616c.725-1.498 2.697-4.29 4.532-5.668C13.855.955 16 .186 16 2.632c0 .489-.28 4.105-.444 4.692-.572 2.04-2.653 2.561-4.504 2.246 3.236.551 4.06 2.375 2.281 4.2-3.376 3.464-4.852-.87-5.23-1.98-.07-.204-.103-.3-.103-.218 0-.081-.033.014-.102.218-.379 1.11-1.855 5.444-5.231 1.98-1.778-1.825-.955-3.65 2.28-4.2-1.85.315-3.932-.205-4.503-2.246C.28 6.737 0 3.12 0 2.632 0 .186 2.145.955 3.468 1.948Z"></path>
21+
</svg>
22+
);
23+
});

src/components/Icon/IconClose.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
*/
44

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

7-
export const IconClose = memo<JSX.IntrinsicElements['svg']>(function IconClose(
8+
export const IconClose = memo<SVGProps<SVGSVGElement>>(function IconClose(
89
props
910
) {
1011
return (

0 commit comments

Comments
 (0)