Skip to content

Commit 9793c40

Browse files
merging all conflicts
2 parents ff619e4 + 2534424 commit 9793c40

File tree

403 files changed

+37740
-1908
lines changed

Some content is hidden

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

403 files changed

+37740
-1908
lines changed

.eslintrc

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,36 @@
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", "local-rules"],
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",
12+
"local-rules/lint-markdown-code-blocks": "error"
1013
},
1114
"env": {
1215
"node": true,
1316
"commonjs": true,
1417
"browser": true,
1518
"es6": true
16-
}
19+
},
20+
"overrides": [
21+
{
22+
"files": ["src/content/**/*.md"],
23+
"parser": "./eslint-local-rules/parser",
24+
"parserOptions": {
25+
"sourceType": "module"
26+
},
27+
"rules": {
28+
"no-unused-vars": "off",
29+
"@typescript-eslint/no-unused-vars": "off",
30+
"react-hooks/exhaustive-deps": "off",
31+
"react/no-unknown-property": "off",
32+
"react-compiler/react-compiler": "off",
33+
"local-rules/lint-markdown-code-blocks": "error"
34+
}
35+
}
36+
]
1737
}

.github/ISSUE_TEMPLATE/3-framework.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ body:
88
value: |
99
## Candidature pour l'inclusion d'un framework React recommandé
1010
11+
<<<<<<< HEAD
1112
_Ce formulaire s'adresse aux auteur·es de framework qui souhaitent candidater pour qu'il fasse partie de la liste des [frameworks React](https://react.dev/learn/start-a-new-react-project) recommandés. Si vous n'êtes pas l'auteur·e du framework, contactez ses auteur·es pour leur suggérer de candidater._
1213

1314
Lorsque nous recommandons un framework, nous le faisons afin que les développeur·ses puissent démarrer avec un projet React qui s'occupe d'entrée de jeu de sujets récurrents tels que la découpe de code, le chargement de données, le routage et la génération du HTML, sans avoir à fournir un travail complémentaire. Nous estimons que ça permettra aux gens de démarrer plus vite avec React, et de faire monter leur application à l'échelle en production.
@@ -27,6 +28,27 @@ body:
2728
- **Compatible avec notre vision de l'avenir de React**. React évolue avec le temps, et les frameworks qui ne s'alignent pas avec la direction que prend React risquent au fil du temps d'isoler leurs utilisateurs de l'écosystème React principal. Pour vous inclure sur cette page, nous devons être confiants dans la capacité du framework à placer ses utilisateurs durablement sur le chemin du succès avec React.
2829

2930
Notez bien que nous avons déjà passé en revue la plupart des frameworks populaires disponibles pour le moment, il est donc peu probable que nous n'ayons pas encore examiné votre framework. Mais si vous pensez que nous avons loupé quelque chose, veuillez remplir le formulaire ci-dessous.
31+
=======
32+
_This form is for framework authors to apply to be included as a recommended [React framework](https://react.dev/learn/creating-a-react-app). If you are not a framework author, please contact the authors before submitting._
33+
34+
Our goal when recommending a framework is to start developers with a React project that solves common problems like code splitting, data fetching, routing, and HTML generation without any extra work later. We believe this will allow users to get started quickly with React, and scale their app to production.
35+
36+
While we understand that many frameworks may want to be featured, this page is not a place to advertise every possible React framework or all frameworks that you can add React to. There are many great frameworks that offer support for React that are not listed in our guides. The frameworks we recommend have invested significantly in the React ecosystem, and collaborated with the React team to be compatible with our [full-stack React architecture vision](https://react.dev/learn/creating-a-react-app#which-features-make-up-the-react-teams-full-stack-architecture-vision).
37+
38+
To be included, frameworks must meet the following criteria:
39+
40+
- **Free & open-source**: must be open source and free to use.
41+
- **Well maintained**. must be actively maintained, providing bug fixes and improvements.
42+
- **Active community**: must have a sufficiently large and active community to support users.
43+
- **Clear onboarding**: must have clear install steps to install the React version of the framework.
44+
- **Ecosystem compatibility**: must support using the full range of libraries and tools in the React ecosystem.
45+
- **Self-hosting option**: must support an option to self-host applications without losing access to features.
46+
- **Developer experience**. must allow developers to be productive by supporting features like Fast Refresh.
47+
- **User experience**. must provide built-in support for common problems like routing and data-fetching.
48+
- **Compatible with our future vision for React**. React evolves over time, and frameworks that do not align with React’s direction risk isolating their users from the main React ecosystem over time. To be included on this page we must feel confident that the framework is setting its users up for success with React over time.
49+
50+
Please note, we have reviewed most of the popular frameworks available today, so it is unlikely we have not considered your framework already. But if you think we missed something, please complete the application below.
51+
>>>>>>> 2534424ec6c433cc2c811d5a0bd5a65b75efa5f0
3052
- type: input
3153
attributes:
3254
label: Nom

.github/workflows/analyze.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ on:
77
- main # change this if your default branch is named differently
88
workflow_dispatch:
99

10+
permissions: {}
11+
1012
jobs:
1113
analyze:
1214
runs-on: ubuntu-latest
@@ -23,7 +25,7 @@ jobs:
2325
- name: Restore cached node_modules
2426
uses: actions/cache@v4
2527
with:
26-
path: "**/node_modules"
28+
path: '**/node_modules'
2729
key: node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
2830

2931
- name: Install deps
@@ -55,7 +57,7 @@ jobs:
5557
name: bundle_analysis.json
5658

5759
- name: Download base branch bundle stats
58-
uses: dawidd6/action-download-artifact@v2
60+
uses: dawidd6/action-download-artifact@268677152d06ba59fcec7a7f0b5d961b6ccd7e1e
5961
if: success() && github.event.number
6062
with:
6163
workflow: analyze.yml

.github/workflows/analyze_comment.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,15 @@ name: Analyze Bundle (Comment)
22

33
on:
44
workflow_run:
5-
workflows: ["Analyze Bundle"]
5+
workflows: ['Analyze Bundle']
66
types:
77
- completed
88

9+
permissions:
10+
contents: read
11+
issues: write
12+
pull-requests: write
13+
914
jobs:
1015
comment:
1116
runs-on: ubuntu-latest
@@ -14,15 +19,15 @@ jobs:
1419
github.event.workflow_run.conclusion == 'success' }}
1520
steps:
1621
- name: Download base branch bundle stats
17-
uses: dawidd6/action-download-artifact@v2
22+
uses: dawidd6/action-download-artifact@268677152d06ba59fcec7a7f0b5d961b6ccd7e1e
1823
with:
1924
workflow: analyze.yml
2025
run_id: ${{ github.event.workflow_run.id }}
2126
name: analysis_comment.txt
2227
path: analysis_comment.txt
2328

2429
- name: Download PR number
25-
uses: dawidd6/action-download-artifact@v2
30+
uses: dawidd6/action-download-artifact@268677152d06ba59fcec7a7f0b5d961b6ccd7e1e
2631
with:
2732
workflow: analyze.yml
2833
run_id: ${{ github.event.workflow_run.id }}
@@ -48,7 +53,7 @@ jobs:
4853
echo "pr-number=$pr_number" >> $GITHUB_OUTPUT
4954
5055
- name: Comment
51-
uses: marocchino/sticky-pull-request-comment@v2
56+
uses: marocchino/sticky-pull-request-comment@52423e01640425a022ef5fd42c6fb5f633a02728
5257
with:
5358
header: next-bundle-analysis
5459
number: ${{ steps.get-comment-body.outputs.pr-number }}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Discord Notify
2+
3+
on:
4+
pull_request_target:
5+
types: [opened, ready_for_review]
6+
7+
permissions: {}
8+
9+
jobs:
10+
check_maintainer:
11+
uses: facebook/react/.github/workflows/shared_check_maintainer.yml@main
12+
permissions:
13+
# Used by check_maintainer
14+
contents: read
15+
with:
16+
actor: ${{ github.event.pull_request.user.login }}
17+
18+
notify:
19+
if: ${{ needs.check_maintainer.outputs.is_core_team == 'true' }}
20+
needs: check_maintainer
21+
runs-on: ubuntu-latest
22+
steps:
23+
- name: Discord Webhook Action
24+
uses: tsickert/[email protected]
25+
with:
26+
webhook-url: ${{ secrets.DISCORD_WEBHOOK_URL }}
27+
embed-author-name: ${{ github.event.pull_request.user.login }}
28+
embed-author-url: ${{ github.event.pull_request.user.html_url }}
29+
embed-author-icon-url: ${{ github.event.pull_request.user.avatar_url }}
30+
embed-title: '#${{ github.event.number }} (+${{github.event.pull_request.additions}} -${{github.event.pull_request.deletions}}): ${{ github.event.pull_request.title }}'
31+
embed-description: ${{ github.event.pull_request.body }}
32+
embed-url: ${{ github.event.pull_request.html_url }}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Label Core Team PRs
2+
3+
on:
4+
pull_request_target:
5+
6+
permissions: {}
7+
8+
env:
9+
TZ: /usr/share/zoneinfo/America/Los_Angeles
10+
# https://github.com/actions/cache/blob/main/tips-and-workarounds.md#cache-segment-restore-timeout
11+
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 1
12+
13+
jobs:
14+
check_maintainer:
15+
uses: facebook/react/.github/workflows/shared_check_maintainer.yml@main
16+
permissions:
17+
# Used by check_maintainer
18+
contents: read
19+
with:
20+
actor: ${{ github.event.pull_request.user.login }}
21+
22+
label:
23+
if: ${{ needs.check_maintainer.outputs.is_core_team == 'true' }}
24+
runs-on: ubuntu-latest
25+
needs: check_maintainer
26+
permissions:
27+
# Used to add labels on issues
28+
issues: write
29+
# Used to add labels on PRs
30+
pull-requests: write
31+
steps:
32+
- name: Label PR as React Core Team
33+
uses: actions/github-script@v7
34+
with:
35+
script: |
36+
github.rest.issues.addLabels({
37+
owner: context.repo.owner,
38+
repo: context.repo.repo,
39+
issue_number: ${{ github.event.number }},
40+
labels: ['React Core Team']
41+
});

.github/workflows/site_lint.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ on:
77
pull_request:
88
types: [opened, synchronize, reopened]
99

10+
permissions: {}
11+
1012
jobs:
1113
lint:
1214
runs-on: ubuntu-latest
@@ -25,7 +27,7 @@ jobs:
2527
- name: Restore cached node_modules
2628
uses: actions/cache@v4
2729
with:
28-
path: "**/node_modules"
30+
path: '**/node_modules'
2931
key: node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
3032

3133
- name: Install deps

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
22

33
# dependencies
4-
/node_modules
4+
node_modules
55
/.pnp
66
.pnp.js
77

README.md

Lines changed: 1 addition & 1 deletion
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 [react.dev repo](https://github.com/reactjs/react.dev) on your local machine

colors.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
/**
2+
* Copyright (c) Meta Platforms, Inc. and affiliates.
3+
*
4+
* This source code is licensed under the MIT license found in the
5+
* LICENSE file in the root directory of this source tree.
6+
*/
7+
18
/*
29
* Copyright (c) Facebook, Inc. and its affiliates.
310
*/

0 commit comments

Comments
 (0)