Skip to content

Commit 50bbc7f

Browse files
authored
Merge branch 'main' into patch-1
2 parents 672254b + 756f745 commit 50bbc7f

2,726 files changed

Lines changed: 232596 additions & 305035 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.

.alexrc.cjs

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
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+
8+
exports.allow = [
9+
// We frequently refer to form props by their name "disabled".
10+
// Ideally we would alex-ignore only the valid uses (PRs accepted).
11+
'invalid',
12+
13+
// Unfortunately "watchman" is a library name that we depend on.
14+
'watchman-watchwoman',
15+
16+
// ignore rehab rule, Detox is an e2e testing library
17+
'rehab',
18+
19+
// host refers to host objects in native code
20+
'host-hostess',
21+
22+
// allowing this term to prevent reporting "primitive", which is a programming term
23+
'savage',
24+
25+
// allowing this term, since it seems to be used not in insensitive cases
26+
'straightforward',
27+
28+
// allowing those terms, since they refer to colors and the surname of one of core contributors
29+
'black',
30+
'white',
31+
32+
// allowing this term, since we use it for expressing gratitude for certain contributors
33+
'special',
34+
];
35+
36+
// Use a "maybe" level of profanity instead of the default "unlikely".
37+
exports.profanitySureness = 1;

.alexrc.js

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

.eslintrc.json

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

.github/workflows/pre-merge.yml

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,36 +12,47 @@ jobs:
1212
- name: Checkout repository
1313
uses: actions/checkout@v4
1414

15+
- name: Enable Corepack
16+
run: corepack enable
17+
1518
- name: Set up Node.js
1619
uses: actions/setup-node@v4
1720
with:
18-
node-version: "20"
19-
cache: "yarn"
21+
node-version: "22"
22+
cache: yarn
23+
24+
- name: Check lock for duplications
25+
run: yarn dedupe --check
2026

2127
- name: Install dependencies
22-
run: yarn install --frozen-lockfile --no-progress --non-interactive
28+
run: yarn install --immutable
29+
30+
- name: Check dependencies alignment
31+
run: yarn check-dependencies
2332

2433
- name: Run Lint
2534
run: yarn ci:lint
26-
working-directory: website
2735

2836
build:
2937
runs-on: ubuntu-latest
3038
steps:
3139
- name: Checkout repository
3240
uses: actions/checkout@v4
3341

42+
- name: Enable Corepack
43+
run: corepack enable
44+
3445
- name: Set up Node.js
3546
uses: actions/setup-node@v4
3647
with:
37-
node-version: "20"
38-
cache: "yarn"
48+
node-version: "22"
49+
cache: yarn
3950

4051
- name: Install dependencies
41-
run: yarn install --frozen-lockfile --no-progress --non-interactive
52+
run: yarn install --immutable
4253

4354
- name: Build
4455
run: yarn build
4556
working-directory: website
4657
env:
47-
NODE_OPTIONS: "--max_old_space_size=8192"
58+
NODE_OPTIONS: --max_old_space_size=8192

.gitignore

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,17 @@ 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
2926
website/build/
27+
28+
# https://yarnpkg.com/getting-started/qa#which-files-should-be-gitignored
29+
.pnp.*
30+
.yarn/*
31+
!.yarn/patches
32+
!.yarn/plugins
33+
!.yarn/releases
34+
!.yarn/sdks
35+
!.yarn/versions

.husky/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pretty-quick --staged

.prettierrc.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"overrides": [
33
{
4-
"files": ["*.js", "*.jsx", "*.ts", "*.tsx"],
4+
"files": ["*.js", "*.mjs", "*.cjs", "*.jsx", "*.ts", "*.tsx"],
55
"options": {
66
"arrowParens": "avoid",
77
"bracketSpacing": false,
@@ -13,7 +13,7 @@
1313
}
1414
},
1515
{
16-
"files": "*.md",
16+
"files": ["*.md", "*.mdx"],
1717
"options": {
1818
"arrowParens": "avoid",
1919
"bracketSpacing": false,

.yarnrc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
nodeLinker: node-modules

README.md

Lines changed: 22 additions & 11 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,15 +17,19 @@ 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 12 or greater)_.
21-
1. [Yarn](https://yarnpkg.com/lang/en/docs/install/) _(version 1.5 or greater)_.
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](https://yarnpkg.com/getting-started/install) _(version 4)_.
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.
27+
1. Run `corepack enable` to enable Corepack.
28+
29+
> If the command above fails, run `npm install -g corepack@latest` to install the latest version of [Corepack](https://yarnpkg.com/corepack#installation).
30+
2831
1. Run `yarn` to install the website's workspace dependencies.
32+
> If you want to retain the globally installed `yarn` classic, you can use `corepack yarn` instead.
2933
3034
### Running locally
3135

@@ -106,7 +110,8 @@ If you're adding a new doc or you need to alter the order the docs appear in the
106110

107111
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`.
108112

109-
> **_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.
113+
> [!NOTE]
114+
> 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.
110115
111116
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.
112117

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

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

127133
## 🔧 Website configuration
128134

@@ -143,7 +149,7 @@ The `showcase.json` file contains the list of users that are highlighted in the
143149
1. `git checkout main` from any folder in your local `react-native-website` repository.
144150
1. `git pull origin main` to ensure you have the latest main code.
145151
1. `git checkout -b the-name-of-my-branch` to create a branch.
146-
> replace `the-name-of-my-branch` with a suitable name, such as `update-animations-page`
152+
> replace `the-name-of-my-branch` with a suitable name, such as `update-animations-page`
147153
148154
### Make the change
149155

@@ -154,7 +160,11 @@ The `showcase.json` file contains the list of users that are highlighted in the
154160

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

157-
> Visit <http://localhost:3000/versions> to see the list of all versions of the docs.
163+
> [!NOTE]
164+
> Visit <http://localhost:3000/versions> to see the list of all versions of the docs, if you have backported some of the changes.
165+
166+
> [!TIP]
167+
> 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.
158168
159169
### Test the change
160170

@@ -166,8 +176,9 @@ If possible, test any visual changes in all latest versions of the following bro
166176
### Push it
167177

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

design/Design Assets/React-icon.svg

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

0 commit comments

Comments
 (0)