Skip to content

Commit c8d2a82

Browse files
authored
Merge branch 'main' into patch-1
2 parents e41a93a + f3188b3 commit c8d2a82

3,651 files changed

Lines changed: 310201 additions & 337204 deletions

File tree

Some content is hidden

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

.alexignore

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

.alexrc.js

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

.eslintrc.json

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

.github/workflows/pre-merge.yml

Lines changed: 62 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,46 +5,90 @@ on:
55
branches:
66
- main
77

8+
permissions:
9+
contents: read
10+
811
jobs:
912
lint:
1013
runs-on: ubuntu-latest
1114
steps:
1215
- name: Checkout repository
13-
uses: actions/checkout@v4
16+
uses: actions/checkout@v6
17+
18+
- name: Set up Node.js
19+
uses: actions/setup-node@v6
20+
with:
21+
node-version: "22"
22+
cache: yarn
23+
24+
- name: Check lock for duplications
25+
run: yarn update-lock --fail
26+
27+
- name: Install dependencies
28+
run: yarn install --immutable
29+
30+
- name: Check dependencies alignment
31+
run: yarn check-dependencies
32+
33+
- name: Run packages lint
34+
run: yarn lint:packages
35+
36+
- name: Run plugins lint
37+
run: yarn lint:plugins
1438

15-
- name: Enable Corepack
16-
run: corepack enable
39+
check-vercel-redirects:
40+
runs-on: ubuntu-latest
41+
steps:
42+
- name: Checkout repository
43+
uses: actions/checkout@v6
1744

1845
- name: Set up Node.js
19-
uses: actions/setup-node@v4
46+
uses: actions/setup-node@v6
2047
with:
21-
node-version: "20"
22-
cache: "yarn"
48+
node-version: "22"
49+
cache: yarn
2350

24-
- name: Check dependencies
25-
run: yarn dedupe --check
51+
- name: Install dependencies
52+
run: yarn install --immutable
53+
54+
- name: Check Vercel redirects are in sync
55+
run: |
56+
yarn sync-redirects:vercel
57+
if ! git diff --exit-code vercel.json; then
58+
echo "::error::vercel.json redirects are out of sync with _redirects. Run 'yarn sync-redirects:vercel' and commit."
59+
exit 1
60+
fi
61+
62+
lint-website:
63+
runs-on: ubuntu-latest
64+
steps:
65+
- name: Checkout repository
66+
uses: actions/checkout@v6
67+
68+
- name: Set up Node.js
69+
uses: actions/setup-node@v6
70+
with:
71+
node-version: "22"
72+
cache: yarn
2673

2774
- name: Install dependencies
2875
run: yarn install --immutable
2976

30-
- name: Run Lint
31-
run: yarn ci:lint
77+
- name: Run Website Specific Lints
3278
working-directory: website
79+
run: yarn ci:lint
3380

3481
build:
3582
runs-on: ubuntu-latest
3683
steps:
3784
- name: Checkout repository
38-
uses: actions/checkout@v4
39-
40-
- name: Enable Corepack
41-
run: corepack enable
85+
uses: actions/checkout@v6
4286

4387
- name: Set up Node.js
44-
uses: actions/setup-node@v4
88+
uses: actions/setup-node@v6
4589
with:
46-
node-version: "20"
47-
cache: "yarn"
90+
node-version: "22"
91+
cache: yarn
4892

4993
- name: Install dependencies
5094
run: yarn install --immutable
@@ -53,4 +97,4 @@ jobs:
5397
run: yarn build
5498
working-directory: website
5599
env:
56-
NODE_OPTIONS: "--max_old_space_size=8192"
100+
NODE_OPTIONS: --max_old_space_size=8192

.github/workflows/stale-bot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
issues: write
1010
pull-requests: write
1111
steps:
12-
- uses: actions/stale@v4
12+
- uses: actions/stale@v10
1313
with:
1414
repo-token: ${{ secrets.GITHUB_TOKEN }}
1515
days-before-issue-stale: 90

.gitignore

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,7 @@ node_modules
1919

2020
*.tsbuildinfo
2121

22-
scripts/lint-examples/out/
23-
24-
sync-api-docs/generatedComponentApiDocs.js
25-
sync-api-docs/extracted.json
22+
packages/lint-examples/out/
2623

2724
website/.docusaurus
2825
website/.cache-loader
@@ -36,7 +33,5 @@ website/build/
3633
!.yarn/releases
3734
!.yarn/sdks
3835
!.yarn/versions
39-
40-
41-
# Generated file(s) for llms
42-
llms.txt
36+
.vercel
37+
.env*.local

.prettierrc.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
{
2+
"plugins": [
3+
"@prettier/plugin-oxc"
4+
],
25
"overrides": [
36
{
4-
"files": ["*.js", "*.jsx", "*.ts", "*.tsx"],
7+
"files": ["*.js", "*.mjs", "*.cjs", "*.jsx", "*.ts", "*.tsx"],
58
"options": {
69
"arrowParens": "avoid",
710
"bracketSpacing": false,
@@ -13,7 +16,7 @@
1316
}
1417
},
1518
{
16-
"files": "*.md",
19+
"files": ["*.md", "*.mdx"],
1720
"options": {
1821
"arrowParens": "avoid",
1922
"bracketSpacing": false,
@@ -26,7 +29,7 @@
2629
}
2730
},
2831
{
29-
"files": ["*.scss", "*.css"],
32+
"files": ["*.scss", "*.css", "*.yml"],
3033
"options": {
3134
"printWidth": 80,
3235
"endOfLine": "auto"

.yarnrc.yml

Lines changed: 0 additions & 1 deletion
This file was deleted.

README.md

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# [reactnative.dev](https://reactnative.dev/) &middot; [![CC BY 4.0 license](https://img.shields.io/badge/license-CC%20BY%204.0-blue.svg)](LICENSE-docs) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](CONTRIBUTING.md) <a href="https://twitter.com/intent/follow?screen_name=reactnative"><img src="https://img.shields.io/twitter/follow/reactnative.svg?label=Follow%20@reactnative" alt="Follow @reactnative" /></a>
1+
# [reactnative.dev](https://reactnative.dev/) &middot; [![CC BY 4.0 license](https://img.shields.io/badge/license-CC%20BY%204.0-blue.svg)](LICENSE-docs) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](CONTRIBUTING.md) <a href="https://twitter.com/intent/follow?screen_name=reactnative"><img src="https://img.shields.io/twitter/follow/reactnative.svg?label=Follow%20@reactnative" alt="Follow @reactnative on X" /></a> <a href="https://bsky.app/profile/reactnative.dev"><img src="https://img.shields.io/badge/Bluesky-0285FF?logo=bluesky&logoColor=fff" alt="Follow @reactnative.dev on Bluesky" /></a>
22

33
This repo contains the website configuration and documentation powering the [React Native website](https://reactnative.dev/).
44

5-
If you are looking for the source code of the [React Native Archive website](https://archive.reactnative.dev/) select the [`archive`](https://github.com/facebook/react-native-website/tree/archive) branch.
5+
> If you are looking for the source code of the [React Native Archive website](https://archive.reactnative.dev/) select the [`archive`](https://github.com/facebook/react-native-website/tree/archive) branch.
66
77
## Contents
88

@@ -17,18 +17,13 @@ If you are looking for the source code of the [React Native Archive website](htt
1717
### Prerequisites
1818

1919
1. [Git](https://git-scm.com/downloads).
20-
1. [Node](https://nodejs.org/en/download/) _(version 20 or greater)_.
21-
1. [Yarn](https://yarnpkg.com/getting-started/install) _(version 4)_.
22-
1. A fork of the repo _(for any contributions)_.
23-
1. A clone of the `react-native-website` repo.
20+
1. [Node](https://nodejs.org/en/download/) _(version 22 or greater)_.
21+
1. [Yarn Classic](https://classic.yarnpkg.com/en/docs/install) _(version 1)_.
22+
1. A fork and clone of the `react-native-website` repo _(for any contributions)_.
2423

2524
### Installation
2625

2726
1. `cd react-native-website` to go into the project root.
28-
1. Run `corepack enable` to enable Corepack.
29-
30-
> If the command above fails, run `npm install -g corepack@latest` to install the latest version of [Corepack](https://yarnpkg.com/corepack#installation).
31-
3227
1. Run `yarn` to install the website's workspace dependencies.
3328

3429
### Running locally
@@ -110,7 +105,8 @@ If you're adding a new doc or you need to alter the order the docs appear in the
110105

111106
Part of the React Native website is versioned to allow users to go back and see the Guides or API reference documentation for any given release. A new version of the website is generally generated whenever there is a new React Native release. When this happens, any changes made to the `docs` and `website/sidebars.ts` files will be copied over to the corresponding location within `website/versioned_docs` and `website/versioned_sidebars`.
112107

113-
> **_Note:_** Do not edit the auto-generated files within `versioned_docs` or `versioned_sidebars` unless you are sure it is necessary. Edits made to older versions will not be propagated to newer versions of the versioned docs.
108+
> [!NOTE]
109+
> Do not edit the auto-generated files within `versioned_docs` or `versioned_sidebars` unless you are sure it is necessary. Edits made to older versions will not be propagated to newer versions of the versioned docs.
114110
115111
Docusaurus keeps track of the list of versions for the site in the `website/versions.json` file. The ordering of versions in this file should be in reverse chronological order.
116112

@@ -126,7 +122,8 @@ This can be done by updating the `package.json` and configuration files in `scri
126122

127123
1. `cd react-native-website` to go into the project root.
128124
1. `cd website` to go into the website portion of the project.
129-
1. Run `yarn version:cut <newVersion>` where `<newVersion>` is the new version being released.
125+
1. Run `yarn version:cut <newVersion>` where `<newVersion>` is the new version being released (e.g. `0.81`).
126+
1. Open a PR and commit this change as "Cut branch <newVersion>"
130127

131128
## 🔧 Website configuration
132129

@@ -147,7 +144,7 @@ The `showcase.json` file contains the list of users that are highlighted in the
147144
1. `git checkout main` from any folder in your local `react-native-website` repository.
148145
1. `git pull origin main` to ensure you have the latest main code.
149146
1. `git checkout -b the-name-of-my-branch` to create a branch.
150-
> replace `the-name-of-my-branch` with a suitable name, such as `update-animations-page`
147+
> replace `the-name-of-my-branch` with a suitable name, such as `update-animations-page`
151148
152149
### Make the change
153150

@@ -158,7 +155,11 @@ The `showcase.json` file contains the list of users that are highlighted in the
158155

159156
Visit **<http://localhost:3000/docs/next/YOUR-DOCS-PAGE>** to see your work.
160157

161-
> Visit <http://localhost:3000/versions> to see the list of all versions of the docs.
158+
> [!NOTE]
159+
> Visit <http://localhost:3000/versions> to see the list of all versions of the docs, if you have backported some of the changes.
160+
161+
> [!TIP]
162+
> If you're adding assets, make sure they’re optimized for the web. You can use tools like [ImageOptim](https://imageoptim.com/mac) to automatically apply lossless compression to various file types.
162163
163164
### Test the change
164165

@@ -169,10 +170,10 @@ If possible, test any visual changes in all latest versions of the following bro
169170

170171
### Push it
171172

172-
1. Run `yarn prettier` and `yarn language:lint` in `./website` directory to ensure your changes are consistent with other files in the repo.
173+
1. Run `yarn lint` and `yarn prettier` in `./website` directory to ensure your changes are consistent with other files in the repo.
173174
1. Run `yarn update-lock` to [deduplicate dependencies](https://yarnpkg.com/cli/dedupe).
174175
1. `git add -A && git commit -m "My message"` to stage and commit your changes.
175-
> replace `My message` with a commit message, such as `Fixed header logo on Android`
176+
> replace `My message` with a commit message, such as `Fixed header logo on Android`
176177
1. `git push my-fork-name the-name-of-my-branch`
177178
1. Go to the [react-native-website repo](https://github.com/facebook/react-native-website) and you should see recently pushed branches.
178179
1. Follow GitHub's instructions.

STYLEGUIDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,4 +137,4 @@ When writing step-by-step instructions (e.g. how to install something), try to f
137137

138138
## Resources
139139

140-
- [React JS’s contibuting guidelines](https://github.com/reactjs/reactjs.org/blob/main/CONTRIBUTING.md#guidelines-for-text), especially the [code examples guidelines](https://github.com/reactjs/reactjs.org/blob/master/CONTRIBUTING.md#guidelines-for-code-examples)
140+
- [React JS’s contributing guidelines](https://github.com/reactjs/reactjs.org/blob/main/CONTRIBUTING.md#guidelines-for-text), especially the [code examples guidelines](https://github.com/reactjs/reactjs.org/blob/master/CONTRIBUTING.md#guidelines-for-code-examples)

0 commit comments

Comments
 (0)