Skip to content

Commit ccbe47a

Browse files
committed
Merge branch 'main' into set-log-box-max-font-size
2 parents 56a9929 + 8bcfb3b commit ccbe47a

494 files changed

Lines changed: 13775 additions & 26354 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.

.flowconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,4 +96,4 @@ untyped-import
9696
untyped-type-import
9797

9898
[version]
99-
^0.314.0
99+
^0.317.0

.github/actions/build-npm-package/action.yml

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,6 @@ inputs:
44
release-type:
55
required: true
66
description: The type of release we are building. It could be nightly, release or dry-run
7-
gha-npm-token:
8-
required: false
9-
description: The GHA npm token, required only to publish to npm
10-
default: ''
117
gradle-cache-encryption-key:
128
description: The encryption key needed to store the Gradle Configuration cache
139
skip-apple-prebuilts:
@@ -45,6 +41,8 @@ runs:
4541
cache-encryption-key: ${{ inputs.gradle-cache-encryption-key }}
4642
- name: Setup node.js
4743
uses: ./.github/actions/setup-node
44+
with:
45+
registry-url: 'https://registry.npmjs.org'
4846
- name: Install dependencies
4947
uses: ./.github/actions/yarn-install
5048
- name: Build packages
@@ -53,12 +51,9 @@ runs:
5351
- name: Build types
5452
shell: bash
5553
run: yarn build-types --skip-snapshot
56-
# Continue with publish steps
57-
- name: Set npm credentials
58-
if: ${{ inputs.release-type == 'release' ||
59-
inputs.release-type == 'nightly' }}
60-
shell: bash
61-
run: echo "//registry.npmjs.org/:_authToken=${{ inputs.gha-npm-token }}" > ~/.npmrc
54+
# `npm publish` below authenticates via npm Trusted Publishing (OIDC).
55+
# The caller (the reusable `publish-npm.yml` workflow) MUST grant
56+
# `id-token: write`; this composite action runs inside that job.
6257
- name: Publish NPM
6358
shell: bash
6459
run: |

.github/actions/setup-node/action.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@ inputs:
55
description: 'The node.js version to use'
66
required: false
77
default: '22.14.0'
8+
registry-url:
9+
description: |
10+
Optional npm registry URL passed through to actions/setup-node. Set on
11+
jobs that publish to npm so setup-node writes a `.npmrc` configured to
12+
pick up the OIDC-minted token from npm Trusted Publishing.
13+
required: false
14+
default: ''
815
runs:
916
using: "composite"
1017
steps:
@@ -13,3 +20,4 @@ runs:
1320
with:
1421
node-version: ${{ inputs.node-version }}
1522
cache: yarn
23+
registry-url: ${{ inputs.registry-url }}

.github/workflows/create-release.yml

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -28,21 +28,6 @@ jobs:
2828
token: ${{ secrets.REACT_NATIVE_BOT_GITHUB_TOKEN }}
2929
fetch-depth: 0
3030
fetch-tags: 'true'
31-
- name: Verify NPM token
32-
run: |
33-
if [[ -z "$GHA_NPM_TOKEN" ]]; then
34-
echo "⚠️ No NPM token found. Skipping validation."
35-
exit 0
36-
fi
37-
echo "//registry.npmjs.org/:_authToken=$GHA_NPM_TOKEN" > ~/.npmrc
38-
if ! npm whoami > /dev/null 2>&1; then
39-
echo "❌ NPM token is invalid or expired. Aborting release."
40-
exit 1
41-
fi
42-
echo "✅ NPM token is valid ($(npm whoami))"
43-
rm -f ~/.npmrc
44-
env:
45-
GHA_NPM_TOKEN: ${{ secrets.GHA_NPM_TOKEN }}
4631
- name: Check if on stable branch
4732
id: check_stable_branch
4833
run: |

.github/workflows/e2e-android-templateapp.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ jobs:
6666
6767
echo "Feed maven local to gradle.properties"
6868
cd /tmp/RNTestProject
69-
echo "react.internal.mavenLocalRepo=$MAVEN_LOCAL" >> android/gradle.properties
69+
echo "\nreact.internal.mavenLocalRepo=$MAVEN_LOCAL" >> android/gradle.properties
7070
7171
# Build
7272
cd android

.github/workflows/nightly.yml

Lines changed: 17 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -63,51 +63,28 @@ jobs:
6363
release-type: ${{ needs.set_release_type.outputs.RELEASE_TYPE }}
6464
gradle-cache-encryption-key: ${{ secrets.GRADLE_CACHE_ENCRYPTION_KEY }}
6565

66+
# Delegate the actual npm publish to the shared reusable workflow so
67+
# every `npm publish` in this repo originates from one workflow file —
68+
# required because npm Trusted Publishing only accepts one
69+
# (org, repo, workflow_filename) per package.
6670
build_npm_package:
67-
runs-on: 8-core-ubuntu
6871
needs:
6972
[
7073
set_release_type,
7174
build_android,
7275
prebuild_apple_dependencies,
7376
prebuild_react_native_core,
7477
]
75-
container:
76-
image: reactnativecommunity/react-native-android:latest
77-
env:
78-
TERM: "dumb"
79-
GRADLE_OPTS: "-Dorg.gradle.daemon=false"
80-
# Set the encoding to resolve a known character encoding issue with decompressing tar.gz files in containers
81-
# via Gradle: https://github.com/gradle/gradle/issues/23391#issuecomment-1878979127
82-
LC_ALL: C.UTF8
83-
# By default we only build ARM64 to save time/resources. For release/nightlies, we override this value to build all archs.
84-
ORG_GRADLE_PROJECT_reactNativeArchitectures: "arm64-v8a"
85-
REACT_NATIVE_DOWNLOADS_DIR: /opt/react-native-downloads
86-
env:
87-
GHA_NPM_TOKEN: ${{ secrets.GHA_NPM_TOKEN }}
88-
ORG_GRADLE_PROJECT_SIGNING_PWD: ${{ secrets.ORG_GRADLE_PROJECT_SIGNING_PWD }}
89-
ORG_GRADLE_PROJECT_SIGNING_KEY: ${{ secrets.ORG_GRADLE_PROJECT_SIGNING_KEY }}
90-
ORG_GRADLE_PROJECT_SONATYPE_USERNAME: ${{ secrets.ORG_GRADLE_PROJECT_SONATYPE_USERNAME }}
91-
ORG_GRADLE_PROJECT_SONATYPE_PASSWORD: ${{ secrets.ORG_GRADLE_PROJECT_SONATYPE_PASSWORD }}
92-
steps:
93-
- name: Checkout
94-
uses: actions/checkout@v6
95-
- name: Verify NPM token
96-
run: |
97-
if [[ -z "$GHA_NPM_TOKEN" ]]; then
98-
echo "⚠️ No NPM token found. Skipping validation."
99-
exit 0
100-
fi
101-
echo "//registry.npmjs.org/:_authToken=$GHA_NPM_TOKEN" > ~/.npmrc
102-
if ! npm whoami > /dev/null 2>&1; then
103-
echo "❌ NPM token is invalid or expired. Aborting release."
104-
exit 1
105-
fi
106-
echo "✅ NPM token is valid ($(npm whoami))"
107-
rm -f ~/.npmrc
108-
- name: Build and Publish NPM Package
109-
uses: ./.github/actions/build-npm-package
110-
with:
111-
release-type: ${{ needs.set_release_type.outputs.RELEASE_TYPE }}
112-
gha-npm-token: ${{ env.GHA_NPM_TOKEN }}
113-
gradle-cache-encryption-key: ${{ secrets.GRADLE_CACHE_ENCRYPTION_KEY }}
78+
# The top-level `permissions: contents: read` is the ceiling for
79+
# GITHUB_TOKEN in every job here, including reusable-workflow calls.
80+
# Re-grant `id-token: write` at the job level so publish-npm.yml's
81+
# `publish-react-native` job can mint the OIDC token that npm
82+
# Trusted Publishing exchanges for a publish token.
83+
permissions:
84+
contents: read
85+
id-token: write
86+
uses: ./.github/workflows/publish-npm.yml
87+
secrets: inherit
88+
with:
89+
mode: react-native
90+
release-type: ${{ needs.set_release_type.outputs.RELEASE_TYPE }}

.github/workflows/publish-bumped-packages.yml

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,13 @@ on:
77
- "*-stable"
88

99
jobs:
10+
# Delegate to the shared reusable workflow so every `npm publish` in
11+
# this repo originates from one workflow file — required because npm
12+
# Trusted Publishing only accepts one (org, repo, workflow_filename)
13+
# per package.
1014
publish_bumped_packages:
11-
runs-on: ubuntu-latest
1215
if: github.repository == 'facebook/react-native'
13-
env:
14-
GHA_NPM_TOKEN: ${{ secrets.GHA_NPM_TOKEN }}
15-
steps:
16-
- name: Checkout
17-
uses: actions/checkout@v6
18-
- name: Setup node.js
19-
uses: ./.github/actions/setup-node
20-
- name: Run Yarn Install
21-
uses: ./.github/actions/yarn-install
22-
- name: Build packages
23-
run: yarn build
24-
- name: Build types
25-
run: yarn build-types --skip-snapshot
26-
- name: Set NPM auth token
27-
run: echo "//registry.npmjs.org/:_authToken=$GHA_NPM_TOKEN" > ~/.npmrc
28-
- name: Find and publish all bumped packages
29-
run: node ./scripts/releases-ci/publish-updated-packages.js
16+
uses: ./.github/workflows/publish-npm.yml
17+
secrets: inherit
18+
with:
19+
mode: monorepo-packages

.github/workflows/publish-npm.yml

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
# Reusable workflow that performs every `npm publish` in this repo.
2+
#
3+
# Why this exists: npmjs.com Trusted Publishing accepts only ONE
4+
# (org, repo, workflow_filename, environment) tuple per package. If
5+
# `react-native` were published from `publish-release.yml` AND
6+
# `nightly.yml` directly, we'd need two Trusted Publisher entries per
7+
# package — npm rejects that. By moving every `npm publish` into this
8+
# single reusable workflow file, the OIDC `job_workflow_ref` claim
9+
# always resolves to `publish-npm.yml` regardless of which top-level
10+
# workflow triggered the run, so each package needs exactly one
11+
# Trusted Publisher entry pointing here.
12+
#
13+
# See https://docs.npmjs.com/trusted-publishers and
14+
# https://docs.github.com/en/actions/sharing-automations/reusing-workflows .
15+
name: Publish to npm (reusable)
16+
17+
on:
18+
workflow_call:
19+
inputs:
20+
mode:
21+
description: |
22+
'react-native' runs the full Android/iOS-prebuilt + JS build
23+
and publishes via scripts/releases-ci/publish-npm.js (which
24+
publishes `react-native` and, in nightly mode, every
25+
@react-native/* package). 'monorepo-packages' runs only the
26+
JS build and publishes via
27+
scripts/releases-ci/publish-updated-packages.js (delta-based,
28+
gated on a #publish-packages-to-npm commit message).
29+
type: string
30+
required: true
31+
release-type:
32+
description: "For mode=react-native: release | nightly | dry-run."
33+
type: string
34+
required: false
35+
default: "dry-run"
36+
skip-apple-prebuilts:
37+
description: "For mode=react-native: skip downloading prebuilt Apple artifacts."
38+
type: boolean
39+
required: false
40+
default: false
41+
42+
jobs:
43+
publish-react-native:
44+
if: inputs.mode == 'react-native'
45+
runs-on: 8-core-ubuntu
46+
environment: npm-publish
47+
# `id-token: write` is required so the npm CLI can mint the OIDC
48+
# token that npm Trusted Publishing exchanges for a publish token.
49+
permissions:
50+
contents: read
51+
id-token: write
52+
container:
53+
image: reactnativecommunity/react-native-android:latest
54+
env:
55+
TERM: "dumb"
56+
# Set the encoding to resolve a known character encoding issue with decompressing tar.gz files in containers
57+
# via Gradle: https://github.com/gradle/gradle/issues/23391#issuecomment-1878979127
58+
LC_ALL: C.UTF8
59+
GRADLE_OPTS: "-Dorg.gradle.daemon=false"
60+
# By default we only build ARM64 to save time/resources. For release/nightlies, we override this value to build all archs.
61+
ORG_GRADLE_PROJECT_reactNativeArchitectures: "arm64-v8a"
62+
REACT_NATIVE_DOWNLOADS_DIR: /opt/react-native-downloads
63+
env:
64+
ORG_GRADLE_PROJECT_SIGNING_PWD: ${{ secrets.ORG_GRADLE_PROJECT_SIGNING_PWD }}
65+
ORG_GRADLE_PROJECT_SIGNING_KEY: ${{ secrets.ORG_GRADLE_PROJECT_SIGNING_KEY }}
66+
ORG_GRADLE_PROJECT_SONATYPE_USERNAME: ${{ secrets.ORG_GRADLE_PROJECT_SONATYPE_USERNAME }}
67+
ORG_GRADLE_PROJECT_SONATYPE_PASSWORD: ${{ secrets.ORG_GRADLE_PROJECT_SONATYPE_PASSWORD }}
68+
steps:
69+
- name: Checkout
70+
uses: actions/checkout@v6
71+
with:
72+
fetch-depth: 0
73+
fetch-tags: true
74+
- name: Build and Publish NPM Package
75+
uses: ./.github/actions/build-npm-package
76+
with:
77+
release-type: ${{ inputs.release-type }}
78+
gradle-cache-encryption-key: ${{ secrets.GRADLE_CACHE_ENCRYPTION_KEY }}
79+
skip-apple-prebuilts: ${{ inputs.skip-apple-prebuilts && 'true' || 'false' }}
80+
81+
publish-monorepo-packages:
82+
if: inputs.mode == 'monorepo-packages'
83+
runs-on: ubuntu-latest
84+
environment: npm-publish
85+
permissions:
86+
contents: read
87+
id-token: write
88+
steps:
89+
- name: Checkout
90+
uses: actions/checkout@v6
91+
- name: Setup node.js
92+
uses: ./.github/actions/setup-node
93+
with:
94+
registry-url: "https://registry.npmjs.org"
95+
- name: Run Yarn Install
96+
uses: ./.github/actions/yarn-install
97+
- name: Build packages
98+
run: yarn build
99+
- name: Build types
100+
run: yarn build-types --skip-snapshot
101+
- name: Find and publish all bumped packages
102+
run: node ./scripts/releases-ci/publish-updated-packages.js

.github/workflows/publish-release.yml

Lines changed: 13 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -43,44 +43,34 @@ jobs:
4343
secrets: inherit
4444
needs: [prebuild_apple_dependencies]
4545

46+
# Delegate the actual npm publish to the shared reusable workflow so
47+
# every `npm publish` in this repo originates from one workflow file —
48+
# required because npm Trusted Publishing only accepts one
49+
# (org, repo, workflow_filename) per package.
4650
build_npm_package:
47-
runs-on: 8-core-ubuntu
4851
needs:
4952
[
5053
set_release_type,
5154
prebuild_apple_dependencies,
5255
prebuild_react_native_core,
5356
]
54-
container:
55-
image: reactnativecommunity/react-native-android:latest
56-
env:
57-
TERM: "dumb"
58-
# Set the encoding to resolve a known character encoding issue with decompressing tar.gz files in containers
59-
# via Gradle: https://github.com/gradle/gradle/issues/23391#issuecomment-1878979127
60-
LC_ALL: C.UTF8
61-
GRADLE_OPTS: "-Dorg.gradle.daemon=false"
62-
# By default we only build ARM64 to save time/resources. For release/nightlies, we override this value to build all archs.
63-
ORG_GRADLE_PROJECT_reactNativeArchitectures: "arm64-v8a"
64-
REACT_NATIVE_DOWNLOADS_DIR: /opt/react-native-downloads
57+
uses: ./.github/workflows/publish-npm.yml
58+
secrets: inherit
59+
with:
60+
mode: react-native
61+
release-type: ${{ needs.set_release_type.outputs.RELEASE_TYPE }}
62+
63+
post_publish:
64+
runs-on: ubuntu-latest
65+
needs: [build_npm_package]
6566
env:
66-
GHA_NPM_TOKEN: ${{ secrets.GHA_NPM_TOKEN }}
67-
ORG_GRADLE_PROJECT_SIGNING_PWD: ${{ secrets.ORG_GRADLE_PROJECT_SIGNING_PWD }}
68-
ORG_GRADLE_PROJECT_SIGNING_KEY: ${{ secrets.ORG_GRADLE_PROJECT_SIGNING_KEY }}
69-
ORG_GRADLE_PROJECT_SONATYPE_USERNAME: ${{ secrets.ORG_GRADLE_PROJECT_SONATYPE_USERNAME }}
70-
ORG_GRADLE_PROJECT_SONATYPE_PASSWORD: ${{ secrets.ORG_GRADLE_PROJECT_SONATYPE_PASSWORD }}
7167
REACT_NATIVE_BOT_GITHUB_TOKEN: ${{ secrets.REACT_NATIVE_BOT_GITHUB_TOKEN }}
7268
steps:
7369
- name: Checkout
7470
uses: actions/checkout@v6
7571
with:
7672
fetch-depth: 0
7773
fetch-tags: true
78-
- name: Build and Publish NPM Package
79-
uses: ./.github/actions/build-npm-package
80-
with:
81-
release-type: ${{ needs.set_release_type.outputs.RELEASE_TYPE }}
82-
gha-npm-token: ${{ env.GHA_NPM_TOKEN }}
83-
gradle-cache-encryption-key: ${{ secrets.GRADLE_CACHE_ENCRYPTION_KEY }}
8474
- name: Publish @react-native-community/template
8575
id: publish-template-to-npm
8676
uses: actions/github-script@v8

CHANGELOG-0.7x.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3061,7 +3061,7 @@ This file contains all changelogs for latest releases, from 0.70.0 onward. Pleas
30613061
- Introducing getModule method into ReactPackage interface, defaulting to null. This method will be used in the Stable API of React Native ([da8616ec69](https://github.com/facebook/react-native/commit/da8616ec69a12a90b973fea1d8345c7517408a73) by [@mdvacca](https://github.com/mdvacca))
30623062
- Update Java tests to Kotlin for the referenced file ([3dbb759506](https://github.com/facebook/react-native/commit/3dbb7595060b1454fbd8ec80cb851fe6af8f41da) by [@stewartsum](https://github.com/stewartsum))
30633063
- Deprecate JSCJavaScriptExecutorFactory and JSCJavaScriptExecutor, use com.facebook.react.jscexecutor instead ([0cac88fa65](https://github.com/facebook/react-native/commit/0cac88fa65fd33dd6164ed2d6c4fbcdfa47f9e82) by [@mdvacca](https://github.com/mdvacca))
3064-
- Throw ReactNoCrashSoftException when handle memeory pressure to avoid crash ([fa9ea8326e](https://github.com/facebook/react-native/commit/fa9ea8326e693b258e303aee6f59b049dcecea31))
3064+
- Throw ReactNoCrashSoftException when handle memory pressure to avoid crash ([fa9ea8326e](https://github.com/facebook/react-native/commit/fa9ea8326e693b258e303aee6f59b049dcecea31))
30653065
- Throw Error in dispatchViewManagerCommand when non-numeric tag is passed for easier debugging ([0519c11acd](https://github.com/facebook/react-native/commit/0519c11acd0c347db378bbc9238c7dabfd38f6fa) by [@hsource](https://github.com/hsource))
30663066
- Moved ReactFontManager to a common package ([7341f9abdc](https://github.com/facebook/react-native/commit/7341f9abdcfbf5cf4dd5f8cda49151b28ae246bf) by [@fkgozali](https://github.com/fkgozali))
30673067
- Throw Error in dispatchViewManagerCommand when non-numeric tag is passed for easier debugging ([ff1972daba](https://github.com/facebook/react-native/commit/ff1972dabafbbfc18203464b452e0d5b796cdcf6) by [@hsource](https://github.com/hsource))
@@ -3273,7 +3273,7 @@ This file contains all changelogs for latest releases, from 0.70.0 onward. Pleas
32733273
- Fix the default trait collection to always return the value of the window ([94fea182d6](https://github.com/facebook/react-native/commit/94fea182d6cf19e96a8a87760017bd69ad0a9e0c) by [@alanjhughes](https://github.com/alanjhughes))
32743274
- Fix Alert userInterfaceStyle having no effect ([0e150d071e](https://github.com/facebook/react-native/commit/0e150d071e66368e134566697f0f9d99c64d35c4) by [@zhongwuzw](https://github.com/zhongwuzw))
32753275
- Properly escape URLs ([5e983d51d8](https://github.com/facebook/react-native/commit/5e983d51d8bc2abded5659a77808542c6dc1377a) by [@cipolleschi](https://github.com/cipolleschi))
3276-
- Handle doulbe `#` and partially escaped urls ([2b4e1f5ece](https://github.com/facebook/react-native/commit/2b4e1f5ece7d160935b19d4862af8706a44cee59) by [@cipolleschi](https://github.com/cipolleschi))
3276+
- Handle double `#` and partially escaped urls ([2b4e1f5ece](https://github.com/facebook/react-native/commit/2b4e1f5ece7d160935b19d4862af8706a44cee59) by [@cipolleschi](https://github.com/cipolleschi))
32773277
- RNTester's PROJECT_ROOT points to `packages/rn-tester` ([cd30bc3888](https://github.com/facebook/react-native/commit/cd30bc3888bac500e9ecc7e9be051d0bc3659c2f) by [@dmytrorykun](https://github.com/dmytrorykun))
32783278
- Fix inverted `contentOffset` in scroll events in RTL ([4f8a8ce316](https://github.com/facebook/react-native/commit/4f8a8ce316494db99b19f6c8db6b0c1e7b6500d9) by [@NickGerleman](https://github.com/NickGerleman))
32793279
- Fix bad comparison in RCTScrollViewComponentView RTL ([65b7680720](https://github.com/facebook/react-native/commit/65b7680720435c0d864df9c121c151b60bee08ad) by [@NickGerleman](https://github.com/NickGerleman))

0 commit comments

Comments
 (0)