diff --git a/.eslintignore b/.eslintignore
index e16e0140326a..a288117cf8ee 100644
--- a/.eslintignore
+++ b/.eslintignore
@@ -13,6 +13,7 @@ packages/*/dist
packages/*/types_generated
packages/debugger-frontend/dist/**/*
packages/react-native-codegen/lib
+private/react-native-codegen-typescript-test/lib/**/*
**/Pods/*
**/*.macos.js
**/*.windows.js
diff --git a/.flowconfig b/.flowconfig
index 1f355bf24104..860ce22b1ff0 100644
--- a/.flowconfig
+++ b/.flowconfig
@@ -74,7 +74,7 @@ module.name_mapper='^@react-native/fantom$' -> '/private/react-nat
module.name_mapper='^@react-native/fantom/\(.*\)$' -> '/private/react-native-fantom/\1'
module.name_mapper='^@react-native/core-cli-utils$' -> '/packages/core-cli-utils/src/index.flow.js'
; macOS]
-module.name_mapper='^@?[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\|xml\|ktx\)$' -> '/packages/react-native/Libraries/Image/RelativeImageStub'
+module.name_mapper='^@?[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\|xml\|ktx\|heic\|heif\)$' -> '/packages/react-native/Libraries/Image/RelativeImageStub'
module.system.haste.module_ref_prefix=m#
@@ -103,4 +103,4 @@ untyped-import
untyped-type-import
[version]
-^0.289.0
+^0.295.0
diff --git a/.github/actions/build-android/action.yml b/.github/actions/build-android/action.yml
index fe6753af80ee..0aba8b032dfd 100644
--- a/.github/actions/build-android/action.yml
+++ b/.github/actions/build-android/action.yml
@@ -28,7 +28,7 @@ runs:
cache-read-only: "false"
cache-encryption-key: ${{ inputs.gradle-cache-encryption-key }}
- name: Restore Android ccache
- uses: actions/cache/restore@v4
+ uses: actions/cache/restore@v5
with:
path: /github/home/.cache/ccache
key: v2-ccache-android-${{ github.job }}-${{ github.ref }}-${{ hashFiles('packages/react-native/ReactAndroid/**/*.cpp', 'packages/react-native/ReactAndroid/**/*.h', 'packages/react-native/ReactCommon/**/*.cpp', 'packages/react-native/ReactAndroid/**/CMakeLists.txt', 'packages/react-native/ReactCommon/**/CMakeLists.txt') }}
@@ -45,19 +45,22 @@ runs:
if [[ "${{ inputs.release-type }}" == "dry-run" ]]; then
# dry-run: we only build ARM64 to save time/resources. For release/nightlies the default is to build all archs.
export ORG_GRADLE_PROJECT_reactNativeArchitectures="arm64-v8a,x86" # x86 is required for E2E testing
+ export HERMES_PREBUILT_FLAG="ORG_GRADLE_PROJECT_react.internal.useHermesNightly=true"
TASKS="publishAllToMavenTempLocal build"
elif [[ "${{ inputs.release-type }}" == "nightly" ]]; then
# nightly: we set isSnapshot to true so artifacts are sent to the right repository on Maven Central.
export ORG_GRADLE_PROJECT_isSnapshot="true"
+ export HERMES_PREBUILT_FLAG="ORG_GRADLE_PROJECT_react.internal.useHermesNightly=true"
TASKS="publishAllToMavenTempLocal publishAndroidToSonatype build"
else
# release: we want to build all archs (default)
+ export HERMES_PREBUILT_FLAG="ORG_GRADLE_PROJECT_react.internal.useHermesStable=true"
TASKS="publishAllToMavenTempLocal publishAndroidToSonatype build"
fi
- ./gradlew $TASKS -PenableWarningsAsErrors=true
+ env "$HERMES_PREBUILT_FLAG" ./gradlew $TASKS -PenableWarningsAsErrors=true
- name: Save Android ccache
if: ${{ github.ref == 'refs/heads/main' || contains(github.ref, '-stable') }}
- uses: actions/cache/save@v4
+ uses: actions/cache/save@v5
with:
path: /github/home/.cache/ccache
key: v2-ccache-android-${{ github.job }}-${{ github.ref }}-${{ hashFiles('packages/react-native/ReactAndroid/**/*.cpp', 'packages/react-native/ReactAndroid/**/*.h', 'packages/react-native/ReactCommon/**/*.cpp', 'packages/react-native/ReactAndroid/**/CMakeLists.txt', 'packages/react-native/ReactCommon/**/CMakeLists.txt') }}
@@ -65,13 +68,13 @@ runs:
shell: bash
run: ccache -s -v
- name: Upload Maven Artifacts
- uses: actions/upload-artifact@v4.3.4
+ uses: actions/upload-artifact@v6
with:
name: maven-local
path: /tmp/maven-local
- name: Upload test results
if: ${{ always() }}
- uses: actions/upload-artifact@v4.3.4
+ uses: actions/upload-artifact@v6
with:
name: build-android-results
compression-level: 1
@@ -81,14 +84,14 @@ runs:
packages/react-native/ReactAndroid/build/reports
- name: Upload RNTester APK - hermes-debug
if: ${{ always() }}
- uses: actions/upload-artifact@v4.3.4
+ uses: actions/upload-artifact@v6
with:
name: rntester-debug
path: packages/rn-tester/android/app/build/outputs/apk/debug/
compression-level: 0
- name: Upload RNTester APK - hermes-release
if: ${{ always() }}
- uses: actions/upload-artifact@v4.3.4
+ uses: actions/upload-artifact@v6
with:
name: rntester-release
path: packages/rn-tester/android/app/build/outputs/apk/release/
diff --git a/.github/actions/build-npm-package/action.yml b/.github/actions/build-npm-package/action.yml
index 808916f8b29c..6bacb3d29dde 100644
--- a/.github/actions/build-npm-package/action.yml
+++ b/.github/actions/build-npm-package/action.yml
@@ -18,13 +18,13 @@ runs:
shell: bash
run: git config --global --add safe.directory '*'
- name: Download ReactNativeDependencies
- uses: actions/download-artifact@v4
+ uses: actions/download-artifact@v7
with:
pattern: ReactNativeDependencies*
path: ./packages/react-native/ReactAndroid/external-artifacts/artifacts
merge-multiple: true
- name: Download ReactCore artifacts
- uses: actions/download-artifact@v4
+ uses: actions/download-artifact@v7
with:
pattern: ReactCore*
path: ./packages/react-native/ReactAndroid/external-artifacts/artifacts
@@ -65,7 +65,7 @@ runs:
fi
node ./scripts/releases-ci/publish-npm.js -t ${{ inputs.release-type }}
- name: Upload npm logs
- uses: actions/upload-artifact@v4.3.4
+ uses: actions/upload-artifact@v6
with:
name: npm-logs
path: ~/.npm/_logs
@@ -80,7 +80,7 @@ runs:
echo "$FILENAME" > build/react-native-package-version
- name: Upload release package
- uses: actions/upload-artifact@v4.3.4
+ uses: actions/upload-artifact@v6
if: ${{ inputs.release-type == 'dry-run' }}
with:
name: react-native-package
diff --git a/.github/actions/diff-js-api-breaking-changes/action.yml b/.github/actions/diff-js-api-breaking-changes/action.yml
deleted file mode 100644
index bc45b1b207aa..000000000000
--- a/.github/actions/diff-js-api-breaking-changes/action.yml
+++ /dev/null
@@ -1,23 +0,0 @@
-name: diff-js-api-breaking-changes
-description: Check for breaking changes in the public React Native JS API
-runs:
- using: composite
- steps:
- - name: Fetch snapshot from PR head
- shell: bash
- env:
- SCRATCH_DIR: ${{ runner.temp }}/diff-js-api-breaking-changes
- run: |
- mkdir $SCRATCH_DIR
- git fetch --depth=1 origin ${{ github.event.pull_request.head.sha }}
- git show ${{ github.event.pull_request.head.sha }}:packages/react-native/ReactNativeApi.d.ts > $SCRATCH_DIR/ReactNativeApi-after.d.ts \
- || echo "" > $SCRATCH_DIR/ReactNativeApi.d.ts
- - name: Run breaking change detection
- shell: bash
- env:
- SCRATCH_DIR: ${{ runner.temp }}/diff-js-api-breaking-changes
- run: |
- node ./scripts/js-api/diff-api-snapshot \
- ${{ github.workspace }}/packages/react-native/ReactNativeApi.d.ts \
- $SCRATCH_DIR/ReactNativeApi-after.d.ts \
- > $SCRATCH_DIR/output.json
diff --git a/.github/actions/diff-js-api-changes/action.yml b/.github/actions/diff-js-api-changes/action.yml
new file mode 100644
index 000000000000..9e186d27cc01
--- /dev/null
+++ b/.github/actions/diff-js-api-changes/action.yml
@@ -0,0 +1,31 @@
+name: diff-js-api-changes
+description: Check for breaking changes in the public React Native JS API
+runs:
+ using: composite
+ steps:
+ - name: Compute merge base with main
+ id: merge_base
+ shell: bash
+ run: |
+ git fetch origin main
+ git fetch --deepen=500
+ echo "merge_base=$(git merge-base HEAD origin/main)" >> $GITHUB_OUTPUT
+
+ - name: Output snapshot before state for comparison
+ shell: bash
+ env:
+ SCRATCH_DIR: ${{ runner.temp }}/diff-js-api-changes
+ run: |
+ mkdir -p $SCRATCH_DIR
+ git show ${{ steps.merge_base.outputs.merge_base }}:packages/react-native/ReactNativeApi.d.ts > $SCRATCH_DIR/ReactNativeApi-before.d.ts \
+ || echo "" > $SCRATCH_DIR/ReactNativeApi-before.d.ts
+
+ - name: Run breaking change detection
+ shell: bash
+ env:
+ SCRATCH_DIR: ${{ runner.temp }}/diff-js-api-changes
+ run: |
+ node ./scripts/js-api/diff-api-snapshot \
+ $SCRATCH_DIR/ReactNativeApi-before.d.ts \
+ ./packages/react-native/ReactNativeApi.d.ts \
+ > $SCRATCH_DIR/output.json
diff --git a/.github/actions/maestro-android/action.yml b/.github/actions/maestro-android/action.yml
index 4a24e2c0231e..4aa15709070e 100644
--- a/.github/actions/maestro-android/action.yml
+++ b/.github/actions/maestro-android/action.yml
@@ -22,6 +22,10 @@ inputs:
required: false
default: "."
description: The directory from which metro should be started
+ emulator-arch:
+ required: false
+ default: x86
+ description: The architecture of the emulator to run
runs:
using: composite
@@ -31,7 +35,7 @@ runs:
run: export MAESTRO_VERSION=1.40.0; curl -Ls "https://get.maestro.mobile.dev" | bash
- name: Set up JDK 17
if: ${{ inputs.install-java == 'true' }}
- uses: actions/setup-java@v4
+ uses: actions/setup-java@v5
with:
java-version: '17'
distribution: 'zulu'
@@ -53,7 +57,7 @@ runs:
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 24
- arch: x86
+ arch: ${{ inputs.emulator-arch }}
ram-size: '8192M'
heap-size: '4096M'
disk-size: '10G'
@@ -69,16 +73,16 @@ runs:
NORM_APP_ID=$(echo "${{ inputs.app-id }}" | tr '.' '-')
echo "app-id=$NORM_APP_ID" >> $GITHUB_OUTPUT
- name: Store tests result
- uses: actions/upload-artifact@v4.3.4
+ uses: actions/upload-artifact@v6
if: always()
with:
- name: e2e_android_${{ steps.normalize-app-id.outputs.app-id }}_report_${{ inputs.flavor }}_NewArch
+ name: e2e_android_${{ steps.normalize-app-id.outputs.app-id }}_report_${{ inputs.flavor }}_${{ inputs.emulator-arch }}_NewArch
path: |
report.xml
screen.mp4
- name: Store Logs
if: steps.run-tests.outcome == 'failure'
- uses: actions/upload-artifact@v4.3.4
+ uses: actions/upload-artifact@v6
with:
- name: maestro-logs-android-${{ steps.normalize-app-id.outputs.app-id }}-${{ inputs.flavor }}-NewArch
+ name: maestro-logs-android-${{ steps.normalize-app-id.outputs.app-id }}-${{ inputs.flavor }}-${{ inputs.emulator-arch }}-NewArch
path: /tmp/MaestroLogs
diff --git a/.github/actions/maestro-ios/action.yml b/.github/actions/maestro-ios/action.yml
index 50b21597c9ed..ffd2f639b2f8 100644
--- a/.github/actions/maestro-ios/action.yml
+++ b/.github/actions/maestro-ios/action.yml
@@ -31,7 +31,7 @@ runs:
brew tap facebook/fb
brew install facebook/fb/idb-companion
- name: Set up JDK 11
- uses: actions/setup-java@v2
+ uses: actions/setup-java@v5
with:
java-version: '17'
distribution: 'zulu'
@@ -66,7 +66,7 @@ runs:
"${{ inputs.working-directory }}"
- name: Store video record
if: always()
- uses: actions/upload-artifact@v4.3.4
+ uses: actions/upload-artifact@v6
with:
name: e2e_ios_${{ inputs.app-id }}_report_${{ inputs.flavor }}_NewArch
path: |
@@ -78,7 +78,7 @@ runs:
report.xml
- name: Store Logs
if: failure() && steps.run-tests.outcome == 'failure'
- uses: actions/upload-artifact@v4.3.4
+ uses: actions/upload-artifact@v6
with:
name: maestro-logs-${{ inputs.app-id }}-${{ inputs.flavor }}-NewArch
path: /tmp/MaestroLogs
diff --git a/.github/actions/prepare-hermes-v1-app/action.yml b/.github/actions/prepare-hermes-v1-app/action.yml
new file mode 100644
index 000000000000..24f40d0fbacd
--- /dev/null
+++ b/.github/actions/prepare-hermes-v1-app/action.yml
@@ -0,0 +1,41 @@
+name: prepare-hermes-v1-app
+description: Prepares a React Native app with Hermes V1 enabled
+inputs:
+ retry-count:
+ description: 'Number of times to retry the yarn install on failure'
+runs:
+ using: composite
+ steps:
+ - name: Create new app
+ shell: bash
+ run: |
+ cd /tmp
+ npx @react-native-community/cli init RNApp --skip-install --version nightly
+
+ - name: Select latest Hermes V1 version
+ shell: bash
+ run: |
+ node "$GITHUB_WORKSPACE/.github/workflow-scripts/selectLatestHermesV1Version.js"
+
+ - name: Apply patch to enable Hermes V1
+ shell: bash
+ run: |
+ cd /tmp/RNApp
+ git apply --binary --3way --whitespace=nowarn "$GITHUB_WORKSPACE/.github/workflow-scripts/hermes-v1.patch"
+ echo "✅ Patch applied successfully"
+
+ - name: Install app dependencies with retry
+ uses: nick-fields/retry@v3
+ with:
+ timeout_minutes: 10
+ max_attempts: ${{ inputs.retry-count }}
+ retry_wait_seconds: 15
+ shell: bash
+ command: |
+ cd /tmp/RNApp
+ yarn install
+ on_retry_command: |
+ echo "Cleaning up for yarn retry..."
+ cd /tmp/RNApp
+ rm -rf node_modules yarn.lock || true
+ yarn cache clean || true
diff --git a/.github/actions/run-fantom-tests/action.yml b/.github/actions/run-fantom-tests/action.yml
index 1f143f2367bd..83fdd3a03d3f 100644
--- a/.github/actions/run-fantom-tests/action.yml
+++ b/.github/actions/run-fantom-tests/action.yml
@@ -27,7 +27,7 @@ runs:
cache-read-only: "false"
cache-encryption-key: ${{ inputs.gradle-cache-encryption-key }}
- name: Restore Fantom ccache
- uses: actions/cache/restore@v4
+ uses: actions/cache/restore@v5
with:
path: /github/home/.cache/ccache
key: v2-ccache-fantom-${{ github.job }}-${{ github.ref }}-${{ hashFiles(
@@ -56,7 +56,7 @@ runs:
CXX: clang++
- name: Save Fantom ccache
if: ${{ github.ref == 'refs/heads/main' || contains(github.ref, '-stable') }}
- uses: actions/cache/save@v4
+ uses: actions/cache/save@v5
with:
path: /github/home/.cache/ccache
key: v2-ccache-fantom-${{ github.job }}-${{ github.ref }}-${{ hashFiles(
@@ -75,7 +75,7 @@ runs:
run: ccache -s -v
- name: Upload test results
if: ${{ always() }}
- uses: actions/upload-artifact@v4.3.4
+ uses: actions/upload-artifact@v6
with:
name: run-fantom-tests-results
compression-level: 1
diff --git a/.github/actions/setup-node/action.yml b/.github/actions/setup-node/action.yml
index d076bf4acb8b..abb7e3f740c9 100644
--- a/.github/actions/setup-node/action.yml
+++ b/.github/actions/setup-node/action.yml
@@ -4,12 +4,12 @@ inputs:
node-version:
description: 'The node.js version to use'
required: false
- default: '22.14.0'
+ default: '22.11.0'
runs:
using: "composite"
steps:
- name: Setup node.js
- uses: actions/setup-node@v4
+ uses: actions/setup-node@v6
with:
node-version: ${{ inputs.node-version }}
cache: yarn
diff --git a/.github/actions/test-ios-helloworld/action.yml b/.github/actions/test-ios-helloworld/action.yml
index 98bcc860f278..a3cc49ff93dd 100644
--- a/.github/actions/test-ios-helloworld/action.yml
+++ b/.github/actions/test-ios-helloworld/action.yml
@@ -32,7 +32,7 @@ runs:
- name: Run yarn install again, with the correct hermes version
uses: ./.github/actions/yarn-install
- name: Download ReactNativeDependencies
- uses: actions/download-artifact@v4
+ uses: actions/download-artifact@v7
with:
name: ReactNativeDependencies${{ inputs.flavor }}.xcframework.tar.gz
path: /tmp/third-party
@@ -40,7 +40,7 @@ runs:
shell: bash
run: ls -lR /tmp/third-party
- name: Download React Native Prebuilds
- uses: actions/download-artifact@v4
+ uses: actions/download-artifact@v7
with:
name: ReactCore${{ inputs.flavor }}.xcframework.tar.gz
path: /tmp/ReactCore
diff --git a/.github/actions/test-ios-rntester/action.yml b/.github/actions/test-ios-rntester/action.yml
index d014e428699d..ae665e477116 100644
--- a/.github/actions/test-ios-rntester/action.yml
+++ b/.github/actions/test-ios-rntester/action.yml
@@ -1,15 +1,12 @@
name: test-ios-rntester
description: Test iOS RNTester
inputs:
- use-frameworks:
- description: The dependency building and linking strategy to use. Must be one of "StaticLibraries", "DynamicFrameworks"
- default: StaticLibraries
ruby-version:
description: The version of ruby that must be used
default: 2.6.10
run-unit-tests:
description: whether unit tests should run or not.
- default: "false"
+ default: "true"
flavor:
description: The flavor of the build. Must be one of "Debug", "Release".
default: Debug
@@ -17,6 +14,10 @@ inputs:
description: Whether we want to run E2E tests or not
required: false
default: false
+ use-frameworks:
+ description: Whether we have to build with Dynamic Frameworks. If this is set to true, it builds from source
+ required: false
+ default: false
runs:
using: composite
@@ -43,29 +44,34 @@ runs:
if: ${{ inputs.run-unit-tests == 'true' }}
uses: ./.github/actions/prepare-ios-tests
- name: Download ReactNativeDependencies
- uses: actions/download-artifact@v4
+ if: ${{ inputs.use-frameworks == 'false' }}
+ uses: actions/download-artifact@v7
with:
name: ReactNativeDependencies${{ inputs.flavor }}.xcframework.tar.gz
path: /tmp/third-party/
- name: Print third-party folder
+ if: ${{ inputs.use-frameworks == 'false' }}
shell: bash
run: ls -lR /tmp/third-party
- name: Download React Native Prebuilds
- uses: actions/download-artifact@v4
+ if: ${{ inputs.use-frameworks == 'false' }}
+ uses: actions/download-artifact@v7
with:
name: ReactCore${{ inputs.flavor }}.xcframework.tar.gz
path: /tmp/ReactCore
- name: Print ReactCore folder
+ if: ${{ inputs.use-frameworks == 'false' }}
shell: bash
run: ls -lR /tmp/ReactCore
- name: Install CocoaPods dependencies
shell: bash
run: |
- export RCT_USE_LOCAL_RN_DEP="/tmp/third-party/ReactNativeDependencies${{ inputs.flavor }}.xcframework.tar.gz"
- export RCT_TESTONLY_RNCORE_TARBALL_PATH="/tmp/ReactCore/ReactCore${{ inputs.flavor }}.xcframework.tar.gz"
-
- if [[ ${{ inputs.use-frameworks }} == "DynamicFrameworks" ]]; then
+ if [[ ${{ inputs.use-frameworks }} == "true" ]]; then
export USE_FRAMEWORKS=dynamic
+ else
+ # If use-frameworks is false, let's use prebuilds
+ export RCT_USE_LOCAL_RN_DEP="/tmp/third-party/ReactNativeDependencies${{ inputs.flavor }}.xcframework.tar.gz"
+ export RCT_TESTONLY_RNCORE_TARBALL_PATH="/tmp/ReactCore/ReactCore${{ inputs.flavor }}.xcframework.tar.gz"
fi
cd packages/rn-tester
@@ -98,24 +104,23 @@ runs:
shell: bash
run: |
echo "zipping tests results"
- cd /Users/distiller/Library/Developer/Xcode
- XCRESULT_PATH=$(find . -name '*.xcresult')
- tar -zcvf xcresults.tar.gz $XCRESULT_PATH
+ cd /Users/runner/Library/Developer/Xcode
+ tar -zcvf xcresults.tar.gz "/tmp/RNTesterTestResults"
- name: Upload artifact
- uses: actions/upload-artifact@v4.3.4
+ uses: actions/upload-artifact@v6
if: ${{ inputs.run-unit-tests == 'true' }}
with:
- name: xcresults
- path: /Users/distiller/Library/Developer/Xcode/xcresults.tar.gz
+ name: xcresults-${{ inputs.flavor }}-${{ inputs.use-frameworks == 'true' && 'dynamic-frameworks' || 'static-libraries' }}-Ruby${{ inputs.ruby-version }}
+ path: /Users/runner/Library/Developer/Xcode/xcresults.tar.gz
- name: Upload RNTester App
- if: ${{ inputs.use-frameworks == 'StaticLibraries' && inputs.ruby-version == '2.6.10' }} # This is needed to avoid conflicts with the artifacts
- uses: actions/upload-artifact@v4.3.4
+ if: ${{ inputs.use-frameworks == 'false' && inputs.ruby-version == '2.6.10' }} # This is needed to avoid conflicts with the artifacts
+ uses: actions/upload-artifact@v6
with:
name: RNTesterApp-NewArch-${{ inputs.flavor }}
path: ${{ env.app-path }}
- name: Store test results
if: ${{ inputs.run-unit-tests == 'true' }}
- uses: actions/upload-artifact@v4.3.4
+ uses: actions/upload-artifact@v6
with:
- name: test-results
+ name: test-results-${{ inputs.flavor }}-${{ inputs.use-frameworks == 'true' && 'dynamic-frameworks' || 'static-libraries' }}-Ruby${{ inputs.ruby-version }}
path: ./reports/junit
diff --git a/.github/actions/test-js/action.yml b/.github/actions/test-js/action.yml
index 2528973d6e4a..2b5c97a009a0 100644
--- a/.github/actions/test-js/action.yml
+++ b/.github/actions/test-js/action.yml
@@ -19,7 +19,7 @@ runs:
run: node ./scripts/run-ci-javascript-tests.js --maxWorkers 2
- name: Upload test results
if: ${{ always() }}
- uses: actions/upload-artifact@v4.3.4
+ uses: actions/upload-artifact@v6
with:
name: test-js-results
compression-level: 1
diff --git a/.github/workflow-scripts/analyze_scripts.sh b/.github/workflow-scripts/analyze_scripts.sh
index 5f9bcfadee49..cdf280636b2b 100755
--- a/.github/workflow-scripts/analyze_scripts.sh
+++ b/.github/workflow-scripts/analyze_scripts.sh
@@ -16,6 +16,7 @@ if [ -x "$(command -v shellcheck)" ]; then
-type f \
-not -path "*node_modules*" \
-not -path "*third-party*" \
+ -not -path "*vendor*" \
-name '*.sh' \
-exec sh -c 'shellcheck "$1"' -- {} \;
diff --git a/.github/workflow-scripts/checkForReproducer.js b/.github/workflow-scripts/checkForReproducer.js
index 75d7ab7bf807..b8b09223f747 100644
--- a/.github/workflow-scripts/checkForReproducer.js
+++ b/.github/workflow-scripts/checkForReproducer.js
@@ -41,19 +41,23 @@ module.exports = async (github, context) => {
// Look for Snack or a GH repo associated with the user that added an issue or comment
const hasValidReproducer = entities.some(entity => {
+ const escapedLogin = escapeRegExp(entity.user.login);
const hasPullRequestRepoLink = containsPattern(
entity.body,
- `https?:\/\/github\.com\/facebook\/react-native\/pull\/\d+\/?`,
+ /https?:\/\/github\.com\/facebook\/react-native\/pull\/\d+\/?/gm,
);
const hasExpoSnackLink = containsPattern(
entity.body,
- `https?:\\/\\/snack\\.expo\\.dev\\/[^\\s)\\]]+`,
+ /https?:\/\/snack\.expo\.dev\/[^\s)\]]+/gm,
);
const hasGithubRepoLink = containsPattern(
entity.body,
- `https?:\\/\\/github\\.com\\/(${entity.user.login})\\/[^/]+\\/?\\s?`,
+ new RegExp(
+ `https?:\\/\\/github\\.com\\/(${escapedLogin})\\/[^/]+\\/?\\s?`,
+ 'gm',
+ ),
);
return hasPullRequestRepoLink || hasExpoSnackLink || hasGithubRepoLink;
});
@@ -78,8 +82,11 @@ module.exports = async (github, context) => {
};
function containsPattern(body, pattern) {
- const regexp = new RegExp(pattern, 'gm');
- return body.search(regexp) !== -1;
+ return pattern.test(body);
+}
+
+function escapeRegExp(value) {
+ return value.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
}
// Prevents the bot from responding when maintainer has changed the 'Needs: Repro' label
diff --git a/.github/workflow-scripts/hermes-v1.patch b/.github/workflow-scripts/hermes-v1.patch
new file mode 100644
index 000000000000..213020381fc4
--- /dev/null
+++ b/.github/workflow-scripts/hermes-v1.patch
@@ -0,0 +1,30 @@
+diff --git a/android/settings.gradle b/android/settings.gradle
+index 63b5d4e..6359ec3 100644
+--- a/android/settings.gradle
++++ b/android/settings.gradle
+@@ -4,3 +4,11 @@ extensions.configure(com.facebook.react.ReactSettingsExtension){ ex -> ex.autoli
+ rootProject.name = 'RNApp'
+ include ':app'
+ includeBuild('../node_modules/@react-native/gradle-plugin')
++
++includeBuild('../node_modules/react-native') {
++ dependencySubstitution {
++ substitute(module("com.facebook.react:react-android")).using(project(":packages:react-native:ReactAndroid"))
++ substitute(module("com.facebook.react:react-native")).using(project(":packages:react-native:ReactAndroid"))
++ substitute(project(":packages:react-native:ReactAndroid:hermes-engine")).using(module("com.facebook.hermes:hermes-android:$HERMES_V1_VERSION"))
++ }
++}
+diff --git a/package.json b/package.json
+index f05d51b..69938af 100644
+--- a/package.json
++++ b/package.json
+@@ -35,6 +35,9 @@
+ "react-test-renderer": "19.2.0",
+ "typescript": "^5.8.3"
+ },
++ "resolutions": {
++ "hermes-compiler": "$HERMES_V1_VERSION"
++ },
+ "engines": {
+ "node": ">=20"
+ }
diff --git a/.github/workflow-scripts/selectLatestHermesV1Version.js b/.github/workflow-scripts/selectLatestHermesV1Version.js
new file mode 100644
index 000000000000..db11b9278c1b
--- /dev/null
+++ b/.github/workflow-scripts/selectLatestHermesV1Version.js
@@ -0,0 +1,38 @@
+/**
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
+const { execSync } = require('child_process');
+const fs = require('fs');
+const path = require('path');
+
+const PATCH_FILE_PATH = path.join(__dirname, 'hermes-v1.patch');
+
+function getLatestHermesV1Version() {
+ const npmString = "npm view hermes-compiler@latest-v1 version";
+
+ try {
+ const result = execSync(npmString, { stdio: ['ignore', 'pipe', 'ignore'] }).toString().trim();
+ return result;
+ } catch (error) {
+ throw new Error(`Failed to get package version for hermes-compiler@latest-v1`);
+ }
+}
+
+function setHermesV1VersionInPatch(version) {
+ if (!fs.existsSync(PATCH_FILE_PATH)) {
+ throw new Error(`Patch file not found at path: ${PATCH_FILE_PATH}`);
+ }
+
+ let patchContent = fs.readFileSync(PATCH_FILE_PATH, 'utf8');
+ const updatedContent = patchContent.replaceAll(
+ "$HERMES_V1_VERSION",
+ version
+ );
+ fs.writeFileSync(PATCH_FILE_PATH, updatedContent, 'utf8');
+}
+
+setHermesV1VersionInPatch(getLatestHermesV1Version());
diff --git a/.github/workflows/autorebase.yml b/.github/workflows/autorebase.yml
index 1a3af07c31a0..dff8633b481d 100644
--- a/.github/workflows/autorebase.yml
+++ b/.github/workflows/autorebase.yml
@@ -17,7 +17,7 @@ jobs:
if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '/rebase')
steps:
- name: Checkout the latest code
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 0 # otherwise, you will fail to push refs to dest repo
diff --git a/.github/workflows/bump-podfile-lock.yml b/.github/workflows/bump-podfile-lock.yml
index 8bd70421f273..bdf3edbbfe7b 100644
--- a/.github/workflows/bump-podfile-lock.yml
+++ b/.github/workflows/bump-podfile-lock.yml
@@ -8,8 +8,9 @@ jobs:
runs-on: macos-latest
steps:
- name: Checkout
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
with:
+ token: ${{ secrets.REACT_NATIVE_BOT_GITHUB_TOKEN }}
fetch-depth: 0
fetch-tags: true
- name: Install dependencies
diff --git a/.github/workflows/cache-reaper.yml b/.github/workflows/cache-reaper.yml
index 91ebb083e024..59feda574c19 100644
--- a/.github/workflows/cache-reaper.yml
+++ b/.github/workflows/cache-reaper.yml
@@ -13,7 +13,7 @@ jobs:
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- - uses: actions/checkout@v4
+ - uses: actions/checkout@v6
- name: Setup Node.js
uses: ./.github/actions/setup-node
- name: Trim the cache
diff --git a/.github/workflows/check-for-reproducer.yml b/.github/workflows/check-for-reproducer.yml
index 5d124c32787a..e986259a3a23 100644
--- a/.github/workflows/check-for-reproducer.yml
+++ b/.github/workflows/check-for-reproducer.yml
@@ -10,8 +10,8 @@ jobs:
if: |
github.repository == 'facebook/react-native' && github.event.issue.pull_request == null && github.event.issue.state == 'open' && !contains(github.event.issue.labels.*.name, ':open_umbrella: Umbrella')
steps:
- - uses: actions/checkout@v4
- - uses: actions/github-script@v6
+ - uses: actions/checkout@v6
+ - uses: actions/github-script@v8
with:
github-token: ${{ secrets.REACT_NATIVE_BOT_GITHUB_TOKEN }}
script: |
diff --git a/.github/workflows/close-pr.yml b/.github/workflows/close-pr.yml
index 2b3d773fa993..5d0489f170b7 100644
--- a/.github/workflows/close-pr.yml
+++ b/.github/workflows/close-pr.yml
@@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
if: github.repository == 'facebook/react-native'
steps:
- - uses: actions/github-script@v6
+ - uses: actions/github-script@v8
with:
github-token: ${{ secrets.REACT_NATIVE_BOT_GITHUB_TOKEN }}
script: |
diff --git a/.github/workflows/create-draft-release.yml b/.github/workflows/create-draft-release.yml
index 9ddb724b8935..ca947dc267c1 100644
--- a/.github/workflows/create-draft-release.yml
+++ b/.github/workflows/create-draft-release.yml
@@ -17,8 +17,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
with:
+ token: ${{ secrets.REACT_NATIVE_BOT_GITHUB_TOKEN }}
fetch-depth: 0
fetch-tags: true
- name: Install dependencies
@@ -29,17 +30,17 @@ jobs:
git config --local user.email "bot@reactnative.dev"
git config --local user.name "React Native Bot"
- name: Create draft release
- uses: actions/github-script@v6
+ uses: actions/github-script@v8
id: create-draft-release
with:
script: |
const {createDraftRelease} = require('./.github/workflow-scripts/createDraftRelease.js');
const version = '${{ github.ref_name }}';
const {isLatest} = require('./.github/workflow-scripts/publishTemplate.js');
- return (await createDraftRelease(version, isLatest(), '${{secrets.REACT_NATIVE_BOT_GITHUB_TOKEN}}', ${{ inputs.hermesVersion }}, ${{ inputs.hermesV1Version }})).id;
+ return (await createDraftRelease(version, isLatest(), '${{secrets.REACT_NATIVE_BOT_GITHUB_TOKEN}}', '${{ inputs.hermesVersion }}', '${{ inputs.hermesV1Version }}')).id;
result-encoding: string
- name: Upload release assets for DotSlash
- uses: actions/github-script@v6
+ uses: actions/github-script@v8
env:
RELEASE_ID: ${{ steps.create-draft-release.outputs.result }}
with:
diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml
index 19608358a5e1..464e9eb3f86c 100644
--- a/.github/workflows/create-release.yml
+++ b/.github/workflows/create-release.yml
@@ -23,7 +23,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
with:
token: ${{ secrets.REACT_NATIVE_BOT_GITHUB_TOKEN }}
fetch-depth: 0
diff --git a/.github/workflows/danger-pr.yml b/.github/workflows/danger-pr.yml
index cf28b788105a..ce41f6f602cd 100644
--- a/.github/workflows/danger-pr.yml
+++ b/.github/workflows/danger-pr.yml
@@ -17,13 +17,14 @@ jobs:
runs-on: ubuntu-latest
if: github.repository == 'facebook/react-native'
steps:
- - uses: actions/checkout@v4
+ - name: Check out PR branch
+ uses: actions/checkout@v6
- name: Setup Node.js
uses: ./.github/actions/setup-node
- name: Run yarn install
uses: ./.github/actions/yarn-install
- - name: Run diff-js-api-breaking-changes
- uses: ./.github/actions/diff-js-api-breaking-changes
+ - name: Run diff-js-api-changes
+ uses: ./.github/actions/diff-js-api-changes
- name: Danger
run: yarn danger ci --use-github-checks --failOnErrors
working-directory: private/react-native-bots
diff --git a/.github/workflows/generate-changelog.yml b/.github/workflows/generate-changelog.yml
index 9734ebd64173..ff8ee8d76def 100644
--- a/.github/workflows/generate-changelog.yml
+++ b/.github/workflows/generate-changelog.yml
@@ -8,8 +8,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
with:
+ token: ${{ secrets.REACT_NATIVE_BOT_GITHUB_TOKEN }}
fetch-depth: 0
fetch-tags: true
- name: Install dependencies
@@ -20,7 +21,7 @@ jobs:
git config --local user.email "bot@reactnative.dev"
git config --local user.name "React Native Bot"
- name: Generate Changelog
- uses: actions/github-script@v6
+ uses: actions/github-script@v8
with:
script: |
const {generateChangelog} = require('./.github/workflow-scripts/generateChangelog');
diff --git a/.github/workflows/monitor-new-issues.yml b/.github/workflows/monitor-new-issues.yml
index 4c751b097965..36abe0bb4cfa 100644
--- a/.github/workflows/monitor-new-issues.yml
+++ b/.github/workflows/monitor-new-issues.yml
@@ -15,7 +15,7 @@ jobs:
if: github.repository == 'facebook/react-native'
steps:
- name: Checkout
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
- name: Set up Node.js
uses: ./.github/actions/setup-node
- name: Install dependencies
diff --git a/.github/workflows/needs-attention.yml b/.github/workflows/needs-attention.yml
index b273b483aa54..0da88efd6d24 100644
--- a/.github/workflows/needs-attention.yml
+++ b/.github/workflows/needs-attention.yml
@@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-latest
if: github.repository == 'facebook/react-native'
steps:
- - uses: actions/checkout@v4
+ - uses: actions/checkout@v6
- name: Apply Needs Attention Label
uses: react-native-community/needs-attention@v2.0.0
with:
diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml
index e9ce8cc2d913..420439705e14 100644
--- a/.github/workflows/nightly.yml
+++ b/.github/workflows/nightly.yml
@@ -49,7 +49,7 @@ jobs:
ORG_GRADLE_PROJECT_SONATYPE_PASSWORD: ${{ secrets.ORG_GRADLE_PROJECT_SONATYPE_PASSWORD }}
steps:
- name: Checkout
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
- name: Build Android
uses: ./.github/actions/build-android
with:
@@ -80,7 +80,7 @@ jobs:
ORG_GRADLE_PROJECT_SONATYPE_PASSWORD: ${{ secrets.ORG_GRADLE_PROJECT_SONATYPE_PASSWORD }}
steps:
- name: Checkout
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
- name: Build and Publish NPM Package
uses: ./.github/actions/build-npm-package
with:
diff --git a/.github/workflows/on-issue-labeled.yml b/.github/workflows/on-issue-labeled.yml
index a58009873312..7500d9ce3d3b 100644
--- a/.github/workflows/on-issue-labeled.yml
+++ b/.github/workflows/on-issue-labeled.yml
@@ -16,10 +16,10 @@ jobs:
if: "${{ github.repository == 'facebook/react-native' && contains(github.event.label.name, 'Needs: Triage :mag:') }}"
steps:
- name: Checkout code
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
- name: Verify RN version
- uses: actions/github-script@v6
+ uses: actions/github-script@v8
with:
github-token: ${{ secrets.REACT_NATIVE_BOT_GITHUB_TOKEN }}
script: |
@@ -39,7 +39,7 @@ jobs:
}
- name: Add descriptive label
- uses: actions/github-script@v6
+ uses: actions/github-script@v8
with:
github-token: ${{ secrets.REACT_NATIVE_BOT_GITHUB_TOKEN }}
script: |
@@ -51,8 +51,8 @@ jobs:
runs-on: ubuntu-latest
if: github.repository == 'facebook/react-native'
steps:
- - uses: actions/checkout@v4
- - uses: actions/github-script@v6
+ - uses: actions/checkout@v6
+ - uses: actions/github-script@v8
with:
github-token: ${{ secrets.REACT_NATIVE_BOT_GITHUB_TOKEN }}
script: |
diff --git a/.github/workflows/prebuild-ios-core.yml b/.github/workflows/prebuild-ios-core.yml
index 5e234961fc53..aff263a75bdc 100644
--- a/.github/workflows/prebuild-ios-core.yml
+++ b/.github/workflows/prebuild-ios-core.yml
@@ -28,10 +28,10 @@ jobs:
]
steps:
- name: Checkout
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
- name: Restore cache if present
id: restore-ios-slice
- uses: actions/cache/restore@v4
+ uses: actions/cache/restore@v5
with:
key: v3-ios-core-${{ matrix.slice }}-${{ matrix.flavor }}-${{ hashFiles('packages/react-native/Package.swift', 'packages/react-native/scripts/ios-prebuild/*.js', 'packages/react-native/scripts/ios-prebuild.js', 'packages/react-native/React/**/*', 'packages/react-native/ReactCommon/**/*', 'packages/react-native/Libraries/**/*') }}
path: packages/react-native/
@@ -63,7 +63,7 @@ jobs:
node ./scripts/releases/set-rn-artifacts-version.js --build-type "${{ inputs.version-type }}"
fi
- name: Download ReactNativeDependencies
- uses: actions/download-artifact@v4
+ uses: actions/download-artifact@v7
with:
name: ReactNativeDependencies${{ matrix.flavor }}.xcframework.tar.gz
path: /tmp/third-party/
@@ -99,19 +99,19 @@ jobs:
cd packages/react-native
node scripts/ios-prebuild -b -f "${{ matrix.flavor }}" -p "${{ matrix.slice }}"
- name: Upload headers
- uses: actions/upload-artifact@v4
+ uses: actions/upload-artifact@v6
with:
name: prebuild-ios-core-headers-${{ matrix.flavor }}-${{ matrix.slice }}
path:
packages/react-native/.build/headers
- name: Upload artifacts
- uses: actions/upload-artifact@v4.3.4
+ uses: actions/upload-artifact@v6
with:
name: prebuild-ios-core-slice-${{ matrix.flavor }}-${{ matrix.slice }}
path: |
packages/react-native/.build/output/spm/${{ matrix.flavor }}/Build/Products
- name: Save Cache
- uses: actions/cache/save@v4
+ uses: actions/cache/save@v5
if: ${{ github.ref == 'refs/heads/main' }} # To avoid that the cache explode
with:
key: v3-ios-core-${{ matrix.slice }}-${{ matrix.flavor }}-${{ hashFiles('packages/react-native/Package.swift', 'packages/react-native/scripts/ios-prebuild/*.js', 'packages/react-native/scripts/ios-prebuild.js', 'packages/react-native/React/**/*', 'packages/react-native/ReactCommon/**/*', 'packages/react-native/Libraries/**/*') }}
@@ -131,10 +131,10 @@ jobs:
REACT_ORG_CODE_SIGNING_P12_CERT_PWD: ${{ secrets.REACT_ORG_CODE_SIGNING_P12_CERT_PWD }}
steps:
- name: Checkout
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
- name: Restore cache if present
id: restore-ios-xcframework
- uses: actions/cache/restore@v4
+ uses: actions/cache/restore@v5
with:
path: packages/react-native/.build/output/xcframeworks
key: v2-ios-core-xcframework-${{ matrix.flavor }}-${{ hashFiles('packages/react-native/Package.swift', 'packages/react-native/scripts/ios-prebuild/*.js', 'packages/react-native/scripts/ios-prebuild.js', 'packages/react-native/React/**/*', 'packages/react-native/ReactCommon/**/*', 'packages/react-native/Libraries/**/*') }}
@@ -151,14 +151,14 @@ jobs:
uses: ./.github/actions/yarn-install
- name: Download slice artifacts
if: steps.restore-ios-xcframework.outputs.cache-hit != 'true'
- uses: actions/download-artifact@v4
+ uses: actions/download-artifact@v7
with:
pattern: prebuild-ios-core-slice-${{ matrix.flavor }}-*
path: packages/react-native/.build/output/spm/${{ matrix.flavor }}/Build/Products
merge-multiple: true
- name: Download headers
if: steps.restore-ios-xcframework.outputs.cache-hit != 'true'
- uses: actions/download-artifact@v4
+ uses: actions/download-artifact@v7
with:
pattern: prebuild-ios-core-headers-${{ matrix.flavor }}-*
path: packages/react-native/.build/headers
@@ -190,18 +190,18 @@ jobs:
cd packages/react-native/.build/output/xcframeworks/${{matrix.flavor}}/Symbols
tar -cz -f ../../ReactCore${{ matrix.flavor }}.framework.dSYM.tar.gz .
- name: Upload XCFramework Artifact
- uses: actions/upload-artifact@v4
+ uses: actions/upload-artifact@v6
with:
name: ReactCore${{ matrix.flavor }}.xcframework.tar.gz
path: packages/react-native/.build/output/xcframeworks/ReactCore${{matrix.flavor}}.xcframework.tar.gz
- name: Upload dSYM Artifact
- uses: actions/upload-artifact@v4
+ uses: actions/upload-artifact@v6
with:
name: ReactCore${{ matrix.flavor }}.framework.dSYM.tar.gz
path: packages/react-native/.build/output/xcframeworks/ReactCore${{matrix.flavor}}.framework.dSYM.tar.gz
- name: Save cache if present
if: ${{ github.ref == 'refs/heads/main' }} # To avoid that the cache explode
- uses: actions/cache/save@v4
+ uses: actions/cache/save@v5
with:
path: |
packages/react-native/.build/output/xcframeworks/ReactCore${{matrix.flavor}}.xcframework.tar.gz
diff --git a/.github/workflows/prebuild-ios-dependencies.yml b/.github/workflows/prebuild-ios-dependencies.yml
index 212c2a522df9..275b3b8bec53 100644
--- a/.github/workflows/prebuild-ios-dependencies.yml
+++ b/.github/workflows/prebuild-ios-dependencies.yml
@@ -10,12 +10,12 @@ jobs:
runs-on: macos-15
steps:
- name: Checkout
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
- name: Setup node.js
uses: ./.github/actions/setup-node
- name: Restore cache if present
id: restore-ios-prebuilds
- uses: actions/cache/restore@v4
+ uses: actions/cache/restore@v5
with:
path: packages/react-native/third-party/
key: v3-ios-dependencies-${{ hashfiles('scripts/releases/ios-prebuild/configuration.js') }}
@@ -32,12 +32,12 @@ jobs:
run: |
node scripts/releases/prepare-ios-prebuilds.js -w
- name: Upload Artifacts
- uses: actions/upload-artifact@v4.3.4
+ uses: actions/upload-artifact@v6
with:
name: ios-prebuilds-workspace
path: packages/react-native/third-party/
- name: Save Cache
- uses: actions/cache/save@v4
+ uses: actions/cache/save@v5
if: ${{ github.ref == 'refs/heads/main' }} # To avoid that the cache explode
with:
key: v3-ios-dependencies-${{ hashfiles('scripts/releases/ios-prebuild/configuration.js') }}
@@ -62,12 +62,12 @@ jobs:
'xros-simulator']
steps:
- name: Checkout
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
- name: Setup node.js
uses: ./.github/actions/setup-node
- name: Restore slice folder
id: restore-slice-folder
- uses: actions/cache/restore@v4
+ uses: actions/cache/restore@v5
with:
path: packages/react-native/third-party/.build/Build/Products
key: v3-ios-dependencies-slice-folder-${{ matrix.slice }}-${{ matrix.flavor }}-${{ hashfiles('scripts/releases/ios-prebuild/configuration.js') }}
@@ -81,7 +81,7 @@ jobs:
uses: ./.github/actions/yarn-install
- name: Restore workspace
if: steps.restore-slice-folder.outputs.cache-hit != 'true'
- uses: actions/download-artifact@v4
+ uses: actions/download-artifact@v7
with:
name: ios-prebuilds-workspace
path: packages/react-native/third-party/
@@ -92,13 +92,13 @@ jobs:
if: steps.restore-slice-folder.outputs.cache-hit != 'true'
run: node scripts/releases/prepare-ios-prebuilds.js -b -p ${{ matrix.slice }} -r ${{ matrix.flavor }}
- name: Upload Artifacts
- uses: actions/upload-artifact@v4.3.4
+ uses: actions/upload-artifact@v6
with:
name: prebuild-slice-${{ matrix.flavor }}-${{ matrix.slice }}
path: |
packages/react-native/third-party/.build/Build/Products
- name: Save Cache
- uses: actions/cache/save@v4
+ uses: actions/cache/save@v5
if: ${{ github.ref == 'refs/heads/main' }} # To avoid that the cache explode
with:
key: v3-ios-dependencies-slice-folder-${{ matrix.slice }}-${{ matrix.flavor }}-${{ hashfiles('scripts/releases/ios-prebuild/configuration.js') }}
@@ -119,7 +119,7 @@ jobs:
REACT_ORG_CODE_SIGNING_P12_CERT_PWD: ${{ secrets.REACT_ORG_CODE_SIGNING_P12_CERT_PWD }}
steps:
- name: Checkout
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
- name: Setup node.js
uses: ./.github/actions/setup-node
- name: Setup xcode
@@ -128,7 +128,7 @@ jobs:
xcode-version: '16.1'
- name: Restore XCFramework
id: restore-xcframework
- uses: actions/cache/restore@v4
+ uses: actions/cache/restore@v5
with:
path: |
packages/react-native/third-party/
@@ -139,13 +139,13 @@ jobs:
uses: ./.github/actions/yarn-install
- name: Restore workspace
if: steps.restore-xcframework.outputs.cache-hit != 'true'
- uses: actions/download-artifact@v4
+ uses: actions/download-artifact@v7
with:
name: ios-prebuilds-workspace
path: packages/react-native/third-party/
- name: Download slices
if: steps.restore-xcframework.outputs.cache-hit != 'true'
- uses: actions/download-artifact@v4
+ uses: actions/download-artifact@v7
with:
pattern: prebuild-slice-${{ matrix.flavor }}-*
path: packages/react-native/third-party/.build/Build/Products
@@ -177,19 +177,19 @@ jobs:
tar -cz -f ../ReactNativeDependencies${{ matrix.flavor }}.framework.dSYM.tar.gz .
mv ../ReactNativeDependencies${{ matrix.flavor }}.framework.dSYM.tar.gz ./ReactNativeDependencies${{ matrix.flavor }}.framework.dSYM.tar.gz
- name: Upload XCFramework Artifact
- uses: actions/upload-artifact@v4
+ uses: actions/upload-artifact@v6
with:
name: ReactNativeDependencies${{ matrix.flavor }}.xcframework.tar.gz
path: packages/react-native/third-party/ReactNativeDependencies${{ matrix.flavor }}.xcframework.tar.gz
- name: Upload dSYM Artifact
- uses: actions/upload-artifact@v4
+ uses: actions/upload-artifact@v6
with:
name: ReactNativeDependencies${{ matrix.flavor }}.framework.dSYM.tar.gz
path: |
packages/react-native/third-party/Symbols/ReactNativeDependencies${{ matrix.flavor }}.framework.dSYM.tar.gz
- name: Save XCFramework in Cache
if: ${{ github.ref == 'refs/heads/main' }} # To avoid that the cache explode
- uses: actions/cache/save@v4
+ uses: actions/cache/save@v5
with:
path: |
packages/react-native/third-party/ReactNativeDependencies${{ matrix.flavor }}.xcframework.tar.gz
diff --git a/.github/workflows/publish-bumped-packages.yml b/.github/workflows/publish-bumped-packages.yml
index ea8bc40a122e..cf0b69b8c354 100644
--- a/.github/workflows/publish-bumped-packages.yml
+++ b/.github/workflows/publish-bumped-packages.yml
@@ -14,7 +14,7 @@ jobs:
GHA_NPM_TOKEN: ${{ secrets.GHA_NPM_TOKEN }}
steps:
- name: Checkout
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
- name: Setup node.js
uses: ./.github/actions/setup-node
- name: Run Yarn Install
diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml
index 19a511452179..99e3b94fc9b4 100644
--- a/.github/workflows/publish-release.yml
+++ b/.github/workflows/publish-release.yml
@@ -27,7 +27,7 @@ jobs:
HERMES_V1_VERSION: ${{ steps.set_hermes_versions.outputs.HERMES_V1_VERSION }}
steps:
- name: Checkout
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
- id: set_hermes_versions
run: |
echo "Setting hermes versions to latest"
@@ -75,7 +75,7 @@ jobs:
REACT_NATIVE_BOT_GITHUB_TOKEN: ${{ secrets.REACT_NATIVE_BOT_GITHUB_TOKEN }}
steps:
- name: Checkout
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
with:
fetch-depth: 0
fetch-tags: true
@@ -87,7 +87,7 @@ jobs:
gradle-cache-encryption-key: ${{ secrets.GRADLE_CACHE_ENCRYPTION_KEY }}
- name: Publish @react-native-community/template
id: publish-template-to-npm
- uses: actions/github-script@v6
+ uses: actions/github-script@v8
with:
github-token: ${{ secrets.REACT_NATIVE_BOT_GITHUB_TOKEN }}
script: |
@@ -97,7 +97,7 @@ jobs:
await publishTemplate(github, version, isDryRun);
- name: Wait for template to be published
timeout-minutes: 3
- uses: actions/github-script@v6
+ uses: actions/github-script@v8
with:
github-token: ${{ secrets.REACT_NATIVE_BOT_GITHUB_TOKEN }}
script: |
@@ -112,7 +112,7 @@ jobs:
-d "{\"event_type\": \"publish\", \"client_payload\": { \"version\": \"${{ github.ref_name }}\" }}"
- name: Verify Release is on NPM
timeout-minutes: 3
- uses: actions/github-script@v6
+ uses: actions/github-script@v8
with:
github-token: ${{ secrets.REACT_NATIVE_BOT_GITHUB_TOKEN }}
script: |
@@ -121,7 +121,7 @@ jobs:
const version = "${{ github.ref_name }}";
await verifyReleaseOnNpm(version, isLatest());
- name: Verify that artifacts are on Maven
- uses: actions/github-script@v6
+ uses: actions/github-script@v8
with:
script: |
const {verifyArtifactsAreOnMaven} = require('./.github/workflow-scripts/verifyArtifactsAreOnMaven.js');
diff --git a/.github/workflows/stale-bot.yml b/.github/workflows/stale-bot.yml
index 585ea9a9e743..f4c2fa8d353f 100644
--- a/.github/workflows/stale-bot.yml
+++ b/.github/workflows/stale-bot.yml
@@ -10,7 +10,7 @@ jobs:
issues: write
pull-requests: write
steps:
- - uses: actions/stale@v9
+ - uses: actions/stale@v10
with:
repo-token: ${{ secrets.REACT_NATIVE_BOT_GITHUB_TOKEN }}
days-before-stale: 180
@@ -27,7 +27,7 @@ jobs:
issues: write
pull-requests: write
steps:
- - uses: actions/stale@v9
+ - uses: actions/stale@v10
with:
ascending: true
repo-token: ${{ secrets.REACT_NATIVE_BOT_GITHUB_TOKEN }}
@@ -45,7 +45,7 @@ jobs:
issues: write
pull-requests: write
steps:
- - uses: actions/stale@v9
+ - uses: actions/stale@v10
with:
repo-token: ${{ secrets.REACT_NATIVE_BOT_GITHUB_TOKEN }}
any-of-labels: 'Needs: Author Feedback'
@@ -63,7 +63,7 @@ jobs:
issues: write
pull-requests: write
steps:
- - uses: actions/stale@v9
+ - uses: actions/stale@v10
with:
ascending: true
repo-token: ${{ secrets.REACT_NATIVE_BOT_GITHUB_TOKEN }}
diff --git a/.github/workflows/test-all.yml b/.github/workflows/test-all.yml
index 7114dbef8298..2e237ce6526d 100644
--- a/.github/workflows/test-all.yml
+++ b/.github/workflows/test-all.yml
@@ -51,13 +51,29 @@ jobs:
[prebuild_apple_dependencies, prebuild_react_native_core]
steps:
- name: Checkout
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
- name: Run it
uses: ./.github/actions/test-ios-rntester
with:
ruby-version: "3.2.0"
flavor: Debug
+ test_ios_rntester_dynamic_frameworks:
+ runs-on: macos-15-large
+ strategy:
+ fail-fast: false
+ matrix:
+ flavor: [Debug, Release]
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v6
+ - name: Run it
+ uses: ./.github/actions/test-ios-rntester
+ with:
+ flavor: ${{ matrix.flavor }}
+ use-frameworks: true
+ run-unit-tests: false # tests for dynamic frameworks are already run in the test_ios_rntester job; this is to just a test build from source (no prebuilds)
+
test_ios_rntester:
runs-on: macos-15-large
needs:
@@ -67,10 +83,10 @@ jobs:
fail-fast: false
matrix:
flavor: [Debug, Release]
- frameworks: [StaticLibraries, DynamicFrameworks]
+ frameworks: [false, true]
steps:
- name: Checkout
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
- name: Run it
uses: ./.github/actions/test-ios-rntester
with:
@@ -87,11 +103,11 @@ jobs:
flavor: [Debug, Release]
steps:
- name: Checkout
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
- name: Setup Node.js
uses: ./.github/actions/setup-node
- name: Download App
- uses: actions/download-artifact@v4
+ uses: actions/download-artifact@v7
with:
name: RNTesterApp-NewArch-${{ matrix.flavor }}
path: /tmp/RNTesterBuild/RNTester.app
@@ -118,7 +134,7 @@ jobs:
flavor: [Debug, Release]
steps:
- name: Checkout
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
- name: Setup xcode
uses: ./.github/actions/setup-xcode
with:
@@ -132,14 +148,14 @@ jobs:
with:
ruby-version: 2.6.10
- name: Download React Native Package
- uses: actions/download-artifact@v4
+ uses: actions/download-artifact@v7
with:
name: react-native-package
path: /tmp/react-native-tmp
- name: Print /tmp folder
run: ls -lR /tmp/react-native-tmp
- name: Download ReactNativeDependencies
- uses: actions/download-artifact@v4
+ uses: actions/download-artifact@v7
with:
name: ReactNativeDependencies${{ matrix.flavor }}.xcframework.tar.gz
path: /tmp/third-party
@@ -147,7 +163,7 @@ jobs:
shell: bash
run: ls -lR /tmp/third-party
- name: Download React Native Prebuilds
- uses: actions/download-artifact@v4
+ uses: actions/download-artifact@v7
with:
name: ReactCore${{ matrix.flavor }}.xcframework.tar.gz
path: /tmp/ReactCore
@@ -207,23 +223,23 @@ jobs:
flavor: [debug, release]
steps:
- name: Checkout
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
- name: Setup node.js
uses: ./.github/actions/setup-node
- name: Run yarn
uses: ./.github/actions/yarn-install
- name: Set up JDK 17
- uses: actions/setup-java@v2
+ uses: actions/setup-java@v5
with:
java-version: '17'
distribution: 'zulu'
- name: Download Maven Local
- uses: actions/download-artifact@v4
+ uses: actions/download-artifact@v7
with:
name: maven-local
path: /tmp/react-native-tmp/maven-local
- name: Download React Native Package
- uses: actions/download-artifact@v4
+ uses: actions/download-artifact@v7
with:
name: react-native-package
path: /tmp/react-native-tmp
@@ -278,7 +294,7 @@ jobs:
ORG_GRADLE_PROJECT_SIGNING_KEY: ${{ secrets.ORG_GRADLE_PROJECT_SIGNING_KEY }}
steps:
- name: Checkout
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
- name: Build and Test Fantom
uses: ./.github/actions/run-fantom-tests
with:
@@ -297,7 +313,7 @@ jobs:
ORG_GRADLE_PROJECT_SIGNING_KEY: ${{ secrets.ORG_GRADLE_PROJECT_SIGNING_KEY }}
steps:
- name: Checkout
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
- name: Build Android
uses: ./.github/actions/build-android
with:
@@ -313,13 +329,13 @@ jobs:
flavor: [debug, release]
steps:
- name: Checkout
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
- name: Setup node.js
uses: ./.github/actions/setup-node
- name: Install node dependencies
uses: ./.github/actions/yarn-install
- name: Download APK
- uses: actions/download-artifact@v4
+ uses: actions/download-artifact@v7
with:
name: rntester-${{ matrix.flavor }}
path: ./packages/rn-tester/android/app/build/outputs/apk/${{ matrix.flavor }}/
@@ -350,7 +366,7 @@ jobs:
GRADLE_OPTS: "-Dorg.gradle.daemon=false"
steps:
- name: Checkout
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
- name: Build NPM Package
uses: ./.github/actions/build-npm-package
with:
@@ -377,16 +393,16 @@ jobs:
flavor: [Debug, Release]
steps:
- name: Checkout
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
- name: Setup git safe folders
run: git config --global --add safe.directory '*'
- name: Download npm package artifact
- uses: actions/download-artifact@v4.1.3
+ uses: actions/download-artifact@v7
with:
name: react-native-package
path: build
- name: Download maven-local artifact
- uses: actions/download-artifact@v4.1.3
+ uses: actions/download-artifact@v7
with:
name: maven-local
path: /tmp/maven-local
@@ -415,7 +431,7 @@ jobs:
fi
yarn build android "${args[@]}" -P reactNativeArchitectures="$TARGET_ARCHITECTURE" -P react.internal.mavenLocalRepo="/tmp/maven-local"
- name: Upload artifact
- uses: actions/upload-artifact@v4.3.4
+ uses: actions/upload-artifact@v6
with:
name: helloworld-apk-${{ matrix.flavor }}-NewArch-hermes
path: ./private/helloworld/android/app/build/outputs/apk/
@@ -429,7 +445,7 @@ jobs:
YARN_ENABLE_IMMUTABLE_INSTALLS: false
steps:
- name: Checkout
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
- uses: ./.github/actions/test-ios-helloworld
with:
ruby-version: 3.2.0
@@ -441,7 +457,7 @@ jobs:
strategy:
matrix:
flavor: [Debug, Release]
- use_frameworks: [StaticLibraries, DynamicFrameworks]
+ use_frameworks: [false, true]
exclude:
# This config is tested with Ruby 3.2.0. Let's not double test it.
- flavor: Debug
@@ -451,7 +467,7 @@ jobs:
YARN_ENABLE_IMMUTABLE_INSTALLS: false
steps:
- name: Checkout
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
- uses: ./.github/actions/test-ios-helloworld
with:
flavor: ${{ matrix.flavor }}
@@ -463,10 +479,10 @@ jobs:
strategy:
fail-fast: false
matrix:
- node-version: ["24.4.1", "22", "20.19.4"]
+ node-version: ["24", "22.11.0"]
steps:
- name: Checkout
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
- name: Test JS
uses: ./.github/actions/test-js
with:
@@ -479,7 +495,7 @@ jobs:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
- name: Run all the linters
uses: ./.github/actions/lint
with:
@@ -500,7 +516,7 @@ jobs:
if: ${{ github.ref == 'refs/heads/main' && always() }}
steps:
- name: Checkout
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
- name: Rerun failed jobs in the current workflow
env:
GH_TOKEN: ${{ github.token }}
diff --git a/.github/workflows/test-hermes-v1-android.yml b/.github/workflows/test-hermes-v1-android.yml
new file mode 100644
index 000000000000..1c7b7eedf12b
--- /dev/null
+++ b/.github/workflows/test-hermes-v1-android.yml
@@ -0,0 +1,70 @@
+name: Test Hermes V1 with nightly on Android
+
+on:
+ workflow_call:
+ inputs:
+ retry-count:
+ description: 'Number of times to retry the build on failure'
+ required: false
+ type: number
+ default: 3
+
+jobs:
+ test-hermes-v1-android:
+ name: Test Hermes V1 on Android
+ runs-on: 4-core-ubuntu
+ strategy:
+ matrix:
+ flavor: [debug, release]
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v6
+
+ - name: Setup node.js
+ uses: actions/setup-node@v6
+ with:
+ node-version: '22.14.0'
+ cache: yarn
+
+ - name: Set up JDK 17
+ uses: actions/setup-java@v5
+ with:
+ java-version: '17'
+ distribution: 'zulu'
+
+ - name: Prepare the app with Hermes V1
+ uses: ./.github/actions/prepare-hermes-v1-app
+ with:
+ retry-count: ${{ inputs.retry-count }}
+
+ - name: Build Android with retry
+ uses: nick-fields/retry@v3
+ env:
+ CMAKE_VERSION: 3.31.5
+ ORG_GRADLE_PROJECT_reactNativeArchitectures: x86_64
+ with:
+ timeout_minutes: 45
+ max_attempts: ${{ inputs.retry-count }}
+ retry_wait_seconds: 30
+ shell: bash
+ command: |
+ cd /tmp/RNApp/android
+ CAPITALIZED_FLAVOR=$(echo "${{ matrix.flavor }}" | awk '{print toupper(substr($0, 1, 1)) substr($0, 2)}')
+ ./gradlew assemble${CAPITALIZED_FLAVOR} -PhermesV1Enabled=true
+ on_retry_command: |
+ echo "Cleaning up for Android retry..."
+ cd /tmp/RNApp/android
+ ./gradlew clean || true
+ rm -rf build app/build .gradle || true
+
+ - name: Run E2E Tests
+ uses: ./.github/actions/maestro-android
+ timeout-minutes: 60
+ with:
+ app-path: /tmp/RNApp/android/app/build/outputs/apk/${{ matrix.flavor }}/app-${{ matrix.flavor }}.apk
+ app-id: com.rnapp
+ maestro-flow: ./scripts/e2e/.maestro/
+ install-java: 'false'
+ flavor: ${{ matrix.flavor }}
+ working-directory: /tmp/RNApp
+ emulator-arch: x86_64
diff --git a/.github/workflows/test-hermes-v1-ios.yml b/.github/workflows/test-hermes-v1-ios.yml
new file mode 100644
index 000000000000..44437ebb36a2
--- /dev/null
+++ b/.github/workflows/test-hermes-v1-ios.yml
@@ -0,0 +1,78 @@
+name: Test Hermes V1 with nightly on iOS
+
+on:
+ workflow_call:
+ inputs:
+ retry-count:
+ description: 'Number of times to retry the build on failure'
+ required: false
+ type: number
+ default: 3
+
+jobs:
+ test-hermes-v1-ios:
+ name: Test Hermes V1 on iOS
+ runs-on: macos-15-large
+ strategy:
+ matrix:
+ flavor: [debug, release]
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v6
+
+ - name: Setup node.js
+ uses: actions/setup-node@v6
+ with:
+ node-version: '22.14.0'
+ cache: yarn
+
+ - name: Prepare capitalized flavor
+ id: prepare-flavor
+ shell: bash
+ run: |
+ CAPITALIZED_FLAVOR=$(echo "${{ matrix.flavor }}" | awk '{print toupper(substr($0, 1, 1)) substr($0, 2)}')
+ echo "capitalized_flavor=$CAPITALIZED_FLAVOR" >> $GITHUB_OUTPUT
+
+ - name: Prepare the app with Hermes V1
+ uses: ./.github/actions/prepare-hermes-v1-app
+ with:
+ retry-count: ${{ inputs.retry-count }}
+
+ - name: Setup xcode
+ uses: maxim-lobanov/setup-xcode@v1
+ with:
+ xcode-version: 16.4.0
+
+ - name: Build iOS with retry
+ uses: nick-fields/retry@v3
+ with:
+ timeout_minutes: 45
+ max_attempts: ${{ inputs.retry-count }}
+ retry_wait_seconds: 30
+ shell: bash
+ command: |
+ cd /tmp/RNApp/ios
+ bundle install
+ RCT_HERMES_V1_ENABLED=1 bundle exec pod install
+ xcodebuild build \
+ -workspace "RNApp.xcworkspace" \
+ -scheme "RNApp" \
+ -configuration "${{ steps.prepare-flavor.outputs.capitalized_flavor }}" \
+ -sdk "iphonesimulator" \
+ -destination "generic/platform=iOS Simulator" \
+ -derivedDataPath "/tmp/RNApp" \
+ -quiet
+ on_retry_command: |
+ echo "Cleaning up for iOS retry..."
+ cd /tmp/RNApp/ios
+ rm -rf Pods Podfile.lock build
+ rm -rf ~/Library/Developer/Xcode/DerivedData/* || true
+
+ - name: Run E2E Tests
+ uses: ./.github/actions/maestro-ios
+ with:
+ app-path: "/tmp/RNApp/Build/Products/${{ steps.prepare-flavor.outputs.capitalized_flavor }}-iphonesimulator/RNApp.app"
+ app-id: org.reactjs.native.example.RNApp
+ maestro-flow: ./scripts/e2e/.maestro/
+ flavor: ${{ steps.prepare-flavor.outputs.capitalized_flavor }}
+ working-directory: /tmp/RNApp
diff --git a/.github/workflows/test-hermes-v1.yml b/.github/workflows/test-hermes-v1.yml
new file mode 100644
index 000000000000..d11e444e5ff6
--- /dev/null
+++ b/.github/workflows/test-hermes-v1.yml
@@ -0,0 +1,39 @@
+# This jobs runs every day 2 hours after the nightly job for React Native so we can verify how the nightly is behaving.
+name: Check Hermes V1 with the nightly build
+
+on:
+ workflow_dispatch:
+ # nightly build @ 4:15 AM UTC
+ schedule:
+ - cron: '15 4 * * *'
+
+concurrency:
+ group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}
+ cancel-in-progress: true
+
+jobs:
+ check-nightly:
+ runs-on: ubuntu-latest
+ if: github.repository == 'facebook/react-native'
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v6
+ - name: Check nightly
+ run: |
+ TODAY=$(date "+%Y%m%d")
+ echo "Checking nightly for $TODAY"
+ NIGHTLY="$(npm view react-native | grep $TODAY)"
+ if [[ -z $NIGHTLY ]]; then
+ echo 'Nightly job failed.'
+ exit 1
+ else
+ echo 'Nightly Worked, All Good!'
+ fi
+
+ test-hermes-v1-ios:
+ uses: ./.github/workflows/test-hermes-v1-ios.yml
+ needs: check-nightly
+
+ test-hermes-v1-android:
+ uses: ./.github/workflows/test-hermes-v1-android.yml
+ needs: check-nightly
diff --git a/.github/workflows/validate-dotslash-artifacts.yml b/.github/workflows/validate-dotslash-artifacts.yml
index 9463dacde97e..1526ee0e9cfd 100644
--- a/.github/workflows/validate-dotslash-artifacts.yml
+++ b/.github/workflows/validate-dotslash-artifacts.yml
@@ -30,7 +30,7 @@ jobs:
if: github.repository == 'facebook/react-native'
steps:
- name: Checkout repository
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
with:
fetch-depth: 0
fetch-tags: true
@@ -42,7 +42,7 @@ jobs:
git config --local user.email "bot@reactnative.dev"
git config --local user.name "React Native Bot"
- name: Validate DotSlash artifacts
- uses: actions/github-script@v6
+ uses: actions/github-script@v8
with:
script: |
const {validateDotSlashArtifacts} = require('./scripts/releases/validate-dotslash-artifacts.js');
diff --git a/.gitignore b/.gitignore
index a26c5cf1272c..7f5c186ede98 100644
--- a/.gitignore
+++ b/.gitignore
@@ -180,10 +180,6 @@ fix_*.patch
# [Experimental] Generated TS type definitions
/packages/**/types_generated/
-
-/packages/debugger-shell/build/
-/packages/*/dist/
-
#[macOS
# Yarn
.yarn/*
diff --git a/.yarnrc.yml b/.yarnrc.yml
index 2fb7124f02d3..c0907696c693 100644
--- a/.yarnrc.yml
+++ b/.yarnrc.yml
@@ -21,16 +21,16 @@ packageExtensions:
"@babel/plugin-syntax-flow": "^7.25.0"
"@react-native/core-cli-utils@*":
dependencies:
- "metro": "^0.82.5"
+ "metro": "^0.83.3"
"@react-native/metro-babel-transformer@*":
dependencies:
- "metro-babel-transformer": "^0.82.5"
+ "metro-babel-transformer": "^0.83.3"
"@react-native/compatibility-check@*":
dependencies:
"invariant": "^2.2.4"
"@react-native/tester@*":
dependencies:
- "metro-config": "^0.82.5"
+ "metro-config": "^0.83.3"
"@react-native/eslint-plugin-monorepo@*":
dependencies:
"hermes-estree": "0.29.1"
@@ -38,7 +38,7 @@ packageExtensions:
dependencies:
"jest-docblock": "^29.7.0"
"jest-message-util": "^29.7.0"
- "metro": "^0.82.5"
- "metro-config": "^0.82.5"
+ "metro": "^0.83.3"
+ "metro-config": "^0.83.3"
"source-map": "^0.6.1"
# macOS]
diff --git a/CHANGELOG.md b/CHANGELOG.md
index fd0109a8ce91..98ac233680b1 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,149 @@
# Changelog
+## v0.83.1
+
+### Fixed
+
+#### Android specific
+
+- **Networking**: Fix Network error that could occur for `FormData` uploads with binary data ([471ef7212e](https://github.com/facebook/react-native/commit/471ef7212e8f7778bb7692a372a58c6fba9d081d) by [@huntie](https://github.com/huntie))
+
+## v0.83.0
+
+### Breaking
+
+None
+
+### Deprecated
+
+#### Android specific
+
+- **Animated**: Mark `startOperationBatch` and `finishOperationBatch` as deprecated, replace with no-op ([c9dcd64ed5](https://github.com/facebook/react-native/commit/c9dcd64ed557d477828549e54afa71a12e5294ec) by [@zeyap](https://github.com/zeyap))
+- **Networking**: Mark `NetworkingModule.sendRequestInternal` as deprecated ([30999b868c](https://github.com/facebook/react-native/commit/30999b868cf1655b6799edfa65dba2cc9fa8161a) by [@motiz88](https://github.com/motiz88))
+
+### Added
+
+- **Accessibility**: Add meaningful error reporting when `AccessibilityInfo`'s methods are not available ([9cadfe6607](https://github.com/facebook/react-native/commit/9cadfe6607159f78bdd45929e0eb9b3292240cb9) by [@vzaidman](https://github.com/vzaidman))
+- **Animated**: `AnimationBackend` initialisation and style updates ([e091759947](https://github.com/facebook/react-native/commit/e09175994759a8868148b4a5d31768e18057d5a4) by [@bartlomiejbloniarz](https://github.com/bartlomiejbloniarz))
+- **Animated**: Make `AnimatedNodesManager` use the backend behind the flag ([325c681cb1](https://github.com/facebook/react-native/commit/325c681cb17996c15b246ad0012cbde3d4631f08) by Bartlomiej Bloniarz)
+- **Animated**: Add `unstable_setAnimationBackend`, `unstable_getAnimationBackend` in UIManager ([7ec470d49a](https://github.com/facebook/react-native/commit/7ec470d49abded215fef260d577b8424207f7fb9) by Bartlomiej Bloniarz)
+- **Dev Server**: Dev server banners can now be closed on tap. On iOS, don't close them after 15s anymore ([6936bd9f6b](https://github.com/facebook/react-native/commit/6936bd9f6bcb4fce5af33442e72992e7aa3767d6) by [@vzaidman](https://github.com/vzaidman))
+- **Fast Refresh**: New banner Add to indicate that Fast Refresh has lost connection, and that the app needs to be restarted to reconnect ([4148746941](https://github.com/facebook/react-native/commit/4148746941f957031dd65fe94481bb3ea6367a47) by [@vzaidman](https://github.com/vzaidman))
+- **IntersectionObserver**: Gate `IntersectionObserver` in the Canary release level ([5119db44ce](https://github.com/facebook/react-native/commit/5119db44ce5b600edc79dd9fe752d6e0a53375f4) by [@lunaleaps](https://github.com/lunaleaps))
+- **JavaScript API**: `ListViewToken` is now exposed when using `"react-native-strict-api"` ([0a0b48b5ff](https://github.com/facebook/react-native/commit/0a0b48b5fff508a1976604bedc931a1b5110a4f2) by [@huntie](https://github.com/huntie))
+- **JavaScript API**: `unstable_NativeText` and `unstable_NativeView` are now exported from the `react-native` package ([90ac3ac7bd](https://github.com/facebook/react-native/commit/90ac3ac7bd2c7f8761d02e503224828f8af97fec) by [@huntie](https://github.com/huntie))
+- **JavaScript API**: Expose `NativeComponentRegistry` API to index.d.ts ([3f7f9d8fb8](https://github.com/facebook/react-native/commit/3f7f9d8fb8beb41408d092870a7c7cac58029a4d) by [@gabrieldonadel](https://github.com/gabrieldonadel))
+- **Performance**: Enable Web Performance APIs ([beccee2164](https://github.com/facebook/react-native/commit/beccee21649eb0353e2828c65f0045053f04c6db) by [@rubennorte](https://github.com/rubennorte))
+- **React Native DevTools**: Enable Network inspection features [66469b58d8](https://github.com/facebook/react-native/commit/66469b58d85e820e401b82028b3fda57c53f08c1) by [@cipolleschi](https://github.com/cipolleschi)
+- **React Native DevTools**: Enable standalone app shell by default (https://github.com/facebook/react-native/commit/3341bb57b188d0e20ac6e9ebb1e8b1fbb6b26514 by [@huntie](https://github.com/huntie))
+- **StyleSheet**: Background image native parser ([a9780f9102](https://github.com/facebook/react-native/commit/a9780f9102800a53e381271bcf27542eaea4a46e) by [@intergalacticspacehighway](https://github.com/intergalacticspacehighway))
+- **StyleSheet**: Merge the [iOS](https://github.com/facebook/react-native/pull/52283) and [android](https://github.com/facebook/react-native/pull/52282) PR into this, this PR includes `BackgroundImageExample`. I have also Add testcases for parsing syntax in JS ([3d08683d0f](https://github.com/facebook/react-native/commit/3d08683d0fcb66cd657e3f72388a53605c7c3974) by [@intergalacticspacehighway](https://github.com/intergalacticspacehighway))
+- **TypeScript**: Add `@react-native/typescript-config/strict` export enabling the `react-native-strict-api` custom condition ([0198c92c71](https://github.com/facebook/react-native/commit/0198c92c714cdfe48bb8d84771e5ef25c17fb47f) by [@kraenhansen](https://github.com/kraenhansen))
+
+#### Android specific
+
+- **Dev Menu**: Add new configuration for `RCTDevMenu` ([4ddf2ce64f](https://github.com/facebook/react-native/commit/4ddf2ce64f8c6886a575c69872273005fd4d90cd) by [@coado](https://github.com/coado))
+- **ReactHost**: Add new `setBundleSource` method to `ReactHost` for changing bundle URL at runtime ([005d705aff](https://github.com/facebook/react-native/commit/005d705aff70e560ac937740798b69582a5b6954) by [@coado](https://github.com/coado))
+- **StyleSheet**: Background size, position and repeat styles ([e859293674](https://github.com/facebook/react-native/commit/e859293674243d94895f710d1cb197e9e6f2e9e8) by [@intergalacticspacehighway](https://github.com/intergalacticspacehighway))
+
+#### iOS specific
+
+- **Build options**: Add way to set the `RCT_REMOVE_LEGACY_ARCH` flag from Cocoapods to compile ou the legacy arch ([5abda9c7da](https://github.com/facebook/react-native/commit/5abda9c7dacc5533fac35675c09100c7120dd634) by [@cipolleschi](https://github.com/cipolleschi))
+- **Build options**: Add support for symbolication of precompiled `React.xcframework` ([07f40ec6b4](https://github.com/facebook/react-native/commit/07f40ec6b48bf4b6507bda5819b873f3a7334dea) by [@chrfalch](https://github.com/chrfalch))
+- **Codegen**: Update Codegen to generate `Package.swift` file for Codegen targets ([a7cd3cc08f](https://github.com/facebook/react-native/commit/a7cd3cc08fd2679bb00666162d91ee2fb7107d06) by [@cipolleschi](https://github.com/cipolleschi))
+- **Dev Menu**: Add new configuration for `RCTDevMenu` ([29d5aa582f](https://github.com/facebook/react-native/commit/29d5aa582ffd6c395e34a1d03d2fdd742df647af) by [@coado](https://github.com/coado))
+- **Font**: Add support for condensed system font when using the New Architecture ([07da2ff3e1](https://github.com/facebook/react-native/commit/07da2ff3e18bbb71f428985f185d5f971843ec26) by [@ismarbesic](https://github.com/ismarbesic))
+- **StyleSheet**: Add contrast and hue-rotate CSS filters ([20ba98e00d](https://github.com/facebook/react-native/commit/20ba98e00da84b629cf2c1b11fa24c28c7046093) by [@intergalacticspacehighway](https://github.com/intergalacticspacehighway))
+- **StyleSheet**: Add grayscale, drop-shadow and saturate CSS filters ([1198a55d50](https://github.com/facebook/react-native/commit/1198a55d50809b9086771fa0b40415dd487afe0f) by [@intergalacticspacehighway](https://github.com/intergalacticspacehighway))
+- **StyleSheet**: Background size, position and repeat styles ([d8c2f1c883](https://github.com/facebook/react-native/commit/d8c2f1c883180828ce2784c4b30565e2bec194cf) by [@intergalacticspacehighway](https://github.com/intergalacticspacehighway))
+- **StyleSheet**: Filter blur ([b365e26593](https://github.com/facebook/react-native/commit/b365e26593112fee8824c53a2787679a29cbe9ab) by [@intergalacticspacehighway](https://github.com/intergalacticspacehighway))
+
+### Changed
+
+- **Animated**: Initialize the backend in `NativeAnimatedNodesManagerProvider` ([3f396616d2](https://github.com/facebook/react-native/commit/3f396616d20beaebeb1fa7ab35deebc195bbcd2b) by Bartlomiej Bloniarz)
+- **Animated**: Move using declarations into `AnimationBackend` class ([9e98c72ad3](https://github.com/facebook/react-native/commit/9e98c72ad34e0124df4ae846381fbc862d87206c) by [@zeyap](https://github.com/zeyap))
+- **Codegen**: Improve Codegen error when iOS native project not found ([bc3503452f](https://github.com/facebook/react-native/commit/bc3503452f70e1f6917070f3a1b00d75bcd46b3f) by [@vonovak](https://github.com/vonovak))
+- **ESLint**: Bump `eslint-plugin-react-hooks` to 7.0.1 ([28101284a9](https://github.com/facebook/react-native/commit/28101284a92ac0c93f646636423e6edf5e830006) by [@cipolleschi](https://github.com/cipolleschi))
+- **Hermes**: Use Hermes artifacts published independently from React Native ([27bb34c006](https://github.com/facebook/react-native/commit/27bb34c006bb5daaac639d065aaa4c963528814e) by [@j-piasecki](https://github.com/j-piasecki))
+- **Metro**: Metro bump to ^0.83.3 ([89f0a37800](https://github.com/facebook/react-native/commit/89f0a3780066e1d74b0cf45ff65a79534638f157) by [@robhogan](https://github.com/robhogan))
+- **React**: Bump React version to 19.2 ([6f482708b5](https://github.com/facebook/react-native/commit/6f482708b5abd31ec12c18afc874420f06eb22e3) by [@cipolleschi](https://github.com/cipolleschi))
+- **React Native DevTools**: Remove network experiment and experimental icon, Add conditional disabling of features incompatible with multiple hosts ([19359ed095](https://github.com/facebook/react-native/commit/19359ed095059c5d6befcc7e2ff3472447680add) by [@huntie](https://github.com/huntie))
+- **Yoga**: Update copyright header in Yoga CMake file from Facebook to Meta ([118a6621f5](https://github.com/facebook/react-native/commit/118a6621f5c4b15d89505b4dc12f05870c042194) by [@aialok](https://github.com/aialok))
+
+#### Android specific
+
+- **Animated**: [c++ animated] Course correct props at `SurfaceMountingManager.updateProps()` ([dae2f606c7](https://github.com/facebook/react-native/commit/dae2f606c76905de74e76db7b0a20052a5caea46) by [@zeyap](https://github.com/zeyap))
+- **Fast Refresh**: Hot reload banner is now displayed in blue background like on iOS ([4d45e5987c](https://github.com/facebook/react-native/commit/4d45e5987c1d85e5f56ae9501ba74eed48939307) by [@vzaidman](https://github.com/vzaidman))
+- **Font**: Request layout on configuration change only when the font scale has changed ([e02e7b1a29](https://github.com/facebook/react-native/commit/e02e7b1a2943b3ec6e1eb15723c86a8255b100a6) by [@j-piasecki](https://github.com/j-piasecki))
+- **Hermes**: Changed value of `HERMESVM_HEAP_HV_MODE` to `HEAP_HV_PREFER32` for Hermes V1 ([fcb51b1392](https://github.com/facebook/react-native/commit/fcb51b13921dea7ed7d478d6944b52df470e2bef) by [@j-piasecki](https://github.com/j-piasecki))
+- **Kotlin**: Migrated `ReactRoot` to Kotlin ([0b14a19ea6](https://github.com/facebook/react-native/commit/0b14a19ea6f0bfd97fc8d3e3663615feab875d66) by [@sbuggay](https://github.com/sbuggay))
+- **New Architecture**: Runtime check that `NewArchitecture` is enabled in `DefaultNewArchitectureEntryPoint` ([d0d08e4554](https://github.com/facebook/react-native/commit/d0d08e4554c2b3a7676793fe2a43cedcf54b523f) by [@cortinico](https://github.com/cortinico))
+- **React Native DevTools**: Add Log error to discourage usages of `getJSModule(RCTEventEmitter)` API ([aab0d3397c](https://github.com/facebook/react-native/commit/aab0d3397c67bb3e27c3607ff2ed240859b5b039) by [@mdvacca](https://github.com/mdvacca))
+- **Touch Handling**: Defer to responder system to terminate on scroll ([1e1af623b1](https://github.com/facebook/react-native/commit/1e1af623b14f7952c2f39a601098533f899bb464) by [@zeyap](https://github.com/zeyap))
+- **UI**: Split `VirtualViewContainerState` into classic, experimental versions [Android] ([793f99d949](https://github.com/facebook/react-native/commit/793f99d949049c7ab9a7991af0a19010d5444b9f) by [@CalixTang](https://github.com/CalixTang))
+
+#### iOS specific
+
+- **Image**: Use `CGImageSourceCreateImageAtIndex` instead of `CGImageSourceCreateThumbnailAtIndex` to decode full-sized images ([be4fcdafb1](https://github.com/facebook/react-native/commit/be4fcdafb13c2cee702bb120b0feb9b5966ca50e) by [@tsapeta](https://github.com/tsapeta))
+- **Prebuild**: Update logging functions for prebuilds ([f0f8b95719](https://github.com/facebook/react-native/commit/f0f8b957190f2f9bf162528210c41f1437346af9) by [@chrfalch](https://github.com/chrfalch))
+
+### Fixed
+
+- **Animated**: Fix array type parsing in `DynamicEventPayload::extractValue` ([cf5040b4f8](https://github.com/facebook/react-native/commit/cf5040b4f82934c075a72b35d5f2d1d0dfa7aac1) by [@zeyap](https://github.com/zeyap))
+- **Babel**: Invalidate transform cache when `react-native/babel-preset` is Update ([2d2011c7ae](https://github.com/facebook/react-native/commit/2d2011c7ae0145369ad226417e9ecc3bf6df7890) by [@robhogan](https://github.com/robhogan))
+- **Build**: Fixed `hermes-compiler` not being resolved correctly when your repo is set up as a monorepo using pnpm (https://github.com/facebook/react-native/commit/45281ba48fc17508539c0b881327ef8b4bf8e530 by [@tido64](https://github.com/tido64))
+- **Codegen**: Fixed an `ENOENT` exception when a dependency does not export `package.json`, and your repo is set up as a monorepo using pnpm (https://github.com/facebook/react-native/commit/ad5e2680c8e491d89d7544ffb2fff45190cd5ef6 by [@tido64](https://github.com/tido64))
+- **Codegen**: Ensure codegen CLI supports unspecified `--outputPath` argument and respects `codegenConfig.outputDir` configurations (https://github.com/facebook/react-native/commit/f8207d6c757552ddac472aa278d7dd56ad04fb7e by [@kitten](https://github.com/kitten))
+- **Events**: Allow `EventEmitter`s to be optional (for push safety) ([4308185b64](https://github.com/facebook/react-native/commit/4308185b64145f315132865cc69f219bc3299eb3) by Tom Scallon)
+- **Fast Refresh**: Only remove the Fast Refresh "Refreshing..." toast when all bundles being loaded finished loading ([92cae27cb2](https://github.com/facebook/react-native/commit/92cae27cb24590e96b01a1dc9547687bafea877b) by [@vzaidman](https://github.com/vzaidman))
+- **FlatList**: The `ItemSeparatorComponent` prop on list components now accepts a React element as well as a component function ([35f6ed1146](https://github.com/facebook/react-native/commit/35f6ed1146fae2c36113f5705230188790a0d70c) by [@huntie](https://github.com/huntie))
+- **Image**: `ResizeMethod` was not propagated correctly on Android with Props 2.0 ([7c543db181](https://github.com/facebook/react-native/commit/7c543db181a0c2dfce46cb26428e7bbc0341945c) by [@Abbondanzo](https://github.com/Abbondanzo))
+- **LogBox**: Fixing an issue with the error LogBox formatting on windows causing text to wrap ([e2b62bc435](https://github.com/facebook/react-native/commit/e2b62bc43549545dfb29e7efad7aaf115cadc1f2) by Gianni Moschini)
+- **Renderer**: Avoid data loss during CSS property conversion ([c629019080](https://github.com/facebook/react-native/commit/c62901908088b9c03baffb8903e9b19ba1bc919d) by [@vineethkuttan](https://github.com/vineethkuttan))
+- **Renderer**: Use `size_t` instead of `int` for vector iteration in `cloneMultipleRecursive` ([f9754d3459](https://github.com/facebook/react-native/commit/f9754d34590fe4d988065a92de5d512883de3b33) by Harini Malothu)
+- **Renderer**: Fix 9-element (2D) transform matrix conversions ([ce243df972](https://github.com/facebook/react-native/commit/ce243df9725baff265fcd275b420ee78971e75cb) by [@cortinico](https://github.com/cortinico))
+- **Runtime**: [ReactCxxPlatform] Don't crash on reload ([5d65794ee4](https://github.com/facebook/react-native/commit/5d65794ee4fadc135d1c47ccd3bcce36e594ab8d) by [@christophpurrer](https://github.com/christophpurrer))
+- **TypeScript**: Fixed missing type definitions for new DOM APIs in legacy TypeScript types ([05ec7e0ad1](https://github.com/facebook/react-native/commit/05ec7e0ad13cce59e7e3161aa1005392584d6c59) by [@rubennorte](https://github.com/rubennorte))
+- **TypeScript**: Fixed Types in Refresh control ([ed24a4d05b](https://github.com/facebook/react-native/commit/ed24a4d05bb2e1e4a7e32a955777e59e827ebce5) by [@riteshshukla04](https://github.com/riteshshukla04))
+- **TypeScript**: TypeScript types of `positions` in `GradientValue` ([f7ea40bc28](https://github.com/facebook/react-native/commit/f7ea40bc28605fb712910e20d150af0bb9942611) by [@SimpleCreations](https://github.com/SimpleCreations))
+- **Yoga**: Update copyright headers ([0b68dcfac8](https://github.com/facebook/react-native/commit/0b68dcfac80e37423c886cc481a616506351bd81) by [@willspag](https://github.com/willspag))
+
+#### Android specific
+
+- **API**: Correct deprecation message for `ReactContextBaseJavaModule#getCurrentActivity()` ([81bbbe3c45](https://github.com/facebook/react-native/commit/81bbbe3c458628187c078fe2c0ef2b5d13867fe5) by [@vladd-g](https://github.com/vladd-g))
+- **Build**: Fix build failures with `RNGP` due to `AGP` 9.0.0-alpha05 ([69dc655005](https://github.com/facebook/react-native/commit/69dc655005bc20feb119ddeca7f663d2d64a6275) by [@cortinico](https://github.com/cortinico))
+- **Dev Menu**: Fix displaying dev menu items in light mode ([269b0bd877](https://github.com/facebook/react-native/commit/269b0bd877b018e9d54e7b08ab9b4d265daaaef3) by [@coado](https://github.com/coado))
+- **React Native DevTools**: Fix `SoLoader` race condition in `InspectorNetworkRequestListener` ([6c874f25e2](https://github.com/facebook/react-native/commit/6c874f25e20499f6f5a2ccac38b157018e3ccb33) by [@vzaidman](https://github.com/vzaidman))
+- **Hermes**: Read the Hermes V1 opt-in flag from the apps properties when building from source ([813b9441ca](https://github.com/facebook/react-native/commit/813b9441cad3c5bd45ef25f438217281e66dcf65) by [@j-piasecki](https://github.com/j-piasecki))
+- **Permissions**: Fix request permission not always resolving in Android 16 ([39ede95921](https://github.com/facebook/react-native/commit/39ede959211e10032f147d2b0b7af783cba049c8) by [@lukmccall](https://github.com/lukmccall))
+- **Fabric**: Do not crash inside `getEncodedScreenSizeWithoutVerticalInsets` if `SurfaceMountingManager` is null ([f59a6f9508](https://github.com/facebook/react-native/commit/f59a6f9508f92391b26d44854f3da238ccbc5e62) by [@cortinico](https://github.com/cortinico))
+- **Runtime**: Request layout on attached surfaces when font scale changes ([417e068220](https://github.com/facebook/react-native/commit/417e0682203d70bd5ca510f7999a7f6c6990566f) by [@j-piasecki](https://github.com/j-piasecki))
+- **ScrollView**: Controller-driven scroll events now honor paging/snap alignment ([ed75963c0d](https://github.com/facebook/react-native/commit/ed75963c0d14ba0b7c85b0aaed8fe635d60d1b99) by [@Abbondanzo](https://github.com/Abbondanzo))
+- **ScrollView**: Focused scroll into view behaviors for nested vertical scroll views ([26502c6319](https://github.com/facebook/react-native/commit/26502c63193c3f4814af82ca6f8ff4c45abbb76b) by [@rozele](https://github.com/rozele))
+- **ScrollView**: Issue with restarting scroll in `maintainVisibleContentPosition` ([a034841fd6](https://github.com/facebook/react-native/commit/a034841fd68a93778d4999f8bc540cf6a5fef8d4) by [@rozele](https://github.com/rozele))
+- **Text**: Fix text not scaling down when system `fontScale` < 1.0 ([642f086b8c](https://github.com/facebook/react-native/commit/642f086b8ce4088d7f0b3c6453e2bb8c5f75e41b) by [@kdwkr](https://github.com/kdwkr))
+- **View**: Defers focus until View is attached ([9d498f676d](https://github.com/facebook/react-native/commit/9d498f676d96b1c8d3d6c58dc188ea51e88e3474) by [@rozele](https://github.com/rozele))
+- **View**: Resolves an int overflow in `findNextFocusableElement` ([363d297260](https://github.com/facebook/react-native/commit/363d2972608e90abb423f9e0592270978a73fb9f) by [@rozele](https://github.com/rozele))
+
+#### iOS specific
+
+- **ActionSheet**: Apply tint color to Actions sheets buttons ([535efc1403](https://github.com/facebook/react-native/commit/535efc1403e53bde190ce5ddb7ecf97918c5e5fd) by [@cipolleschi](https://github.com/cipolleschi))
+- **ActionSheet**: Revert action sheet behavior not to break apps on iOS 26 ([82d2352b19](https://github.com/facebook/react-native/commit/82d2352b19b5255c74d17efea467bdad2ba93f29) by [@cipolleschi](https://github.com/cipolleschi))
+- **Build**: Fix loading bundle using `debug_http_host` preferences (https://github.com/facebook/react-native/commit/2ac54881f3967346faafa4e5a6bc3b9a68c29e46 by [@coado](https://github.com/coado))
+- **Build**: Fixed copying symbol bundles into correct slice folder (https://github.com/facebook/react-native/commit/2bc6b0083237839b224d5427407d33cab3e2de6b by [@chrfalch](https://github.com/chrfalch))
+- **Codegen**: Fix autolinking-generated `react-native-config` output not being used in `ReactCodegen` script phase due to temp output directory ([c0290329cd](https://github.com/facebook/react-native/commit/c0290329cdb1771ec087c8552049a287c67259c6) by [@kitten](https://github.com/kitten))
+- **DeviceInfo**: Fix `RCTDeviceInfo` crash when `application.delegate.window` is nil in modern iOS app architectures ([968909488a](https://github.com/facebook/react-native/commit/968909488a844c695a92ce000497840e577190dd) by [@25harsh](https://github.com/25harsh))
+- **Events**: Add missing `break;` to `-[RCTViewManager pointerEvents]` ([916e53f845](https://github.com/facebook/react-native/commit/916e53f845cdb438c1bb38590d7743f113eed8f7) by [@NSProgrammer](https://github.com/NSProgrammer))
+- **Events**: Raised the maximum number of pointers tracked at the same time to 17 ([58bd51e7e2](https://github.com/facebook/react-native/commit/58bd51e7e23cbd1f5f0f360587610c9fc70c0d76) by [@j-piasecki](https://github.com/j-piasecki))
+- **Fabric**: Address unexpected warning about "Unbalanced calls start/end for tag 20/19" ([796d182d89](https://github.com/facebook/react-native/commit/796d182d8989ff826eaa3a57458bdfc79750f820) by [@lokshunhung](https://github.com/lokshunhung))
+- **Font**: Make `RCTSetDefaultFontHandler` compatible with the new arch, and add a more powerful version as `RCTSetDefaultFontResolver` ([64b30a9376](https://github.com/facebook/react-native/commit/64b30a937607e436b7979e245c456e7ca45bfd11) by [@javache](https://github.com/javache))
+- **Image**: Images are removed from memory more aggressively to prevent OOMs ([3895831c2b](https://github.com/facebook/react-native/commit/3895831c2bc83faf68223bb2a491e796d2799b24) by [@sammy-SC](https://github.com/sammy-SC))
+- **Image**: Update the `source`property to avoid multiple downloads ([0a71b43fbc](https://github.com/facebook/react-native/commit/0a71b43fbc9d759bb8effd0197031a955687d07a) by [@chrfalch](https://github.com/chrfalch))
+- **Modal**: Modal swipe dismissal works only for the first time ([3a0c402d26](https://github.com/facebook/react-native/commit/3a0c402d26c366126fe7b36b2d504be4f658d68d) by [@okwasniewski](https://github.com/okwasniewski))
+- **Prebuild**: Fix iOS version mismatch when using nightly prebuilds ([790860782e](https://github.com/facebook/react-native/commit/790860782e07c02b3d89742006d9e73fea62bcfc) by [@gabrieldonadel](https://github.com/gabrieldonadel))
+- **Prebuild**: Fix using iOS nightly prebuilds in release mode ([19d87c874e](https://github.com/facebook/react-native/commit/19d87c874edb534d3acf5cb6576c6335983b661e) by [@gabrieldonadel](https://github.com/gabrieldonadel))
+- **StyleSheet**: `BoxShadow` + overflow hidden combination interfering with pointerEvents and transform scale ([c8e5f9766b](https://github.com/facebook/react-native/commit/c8e5f9766b8caaf66aa61ef48eeab740a10a725a) by [@intergalacticspacehighway](https://github.com/intergalacticspacehighway))
+
## v0.82.1
### Fixed
@@ -210,6 +354,20 @@
- **Network:** Fixed vulnerability on undici and on-headers ([dd00c9055a](https://github.com/facebook/react-native/commit/dd00c9055a8f0c9ceac1716385a8a9874f7a4c2e) by [@cipolleschi](https://github.com/cipolleschi))
+## v0.81.5
+
+### Fixed
+
+- Fixed switch ([4106d54a6d](https://github.com/facebook/react-native/commit/4106d54a6ddacbb784fc8335e9a82054f51a2d02) by [@cipolleschi](https://github.com/cipolleschi))
+
+#### Android specific
+
+- Fix request permission not always resolving in Android 16 ([39ede95921](https://github.com/facebook/react-native/commit/39ede959211e10032f147d2b0b7af783cba049c8) by [@lukmccall](https://github.com/lukmccall))
+
+#### iOS specific
+
+- Fix RCTDeviceInfo crash when application.delegate.window is nil in modern iOS app architectures ([968909488a](https://github.com/facebook/react-native/commit/968909488a844c695a92ce000497840e577190dd) by [@25harsh](https://github.com/25harsh))
+
## v0.81.4
### Fixed
diff --git a/README.md b/README.md
index 221390c90c4d..570758781a38 100644
--- a/README.md
+++ b/README.md
@@ -14,6 +14,9 @@
+
+
+
> See the official [React Native website](https://reactnative.dev/) for an introduction to React Native.
diff --git a/build.gradle.kts b/build.gradle.kts
index 40846ef4e82d..657f109c454c 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -109,16 +109,43 @@ tasks.register("publishAllToMavenTempLocal") {
tasks.register("publishAndroidToSonatype") {
description = "Publish the Android artifacts to Sonatype (Maven Central or Snapshot repository)"
dependsOn(":packages:react-native:ReactAndroid:publishToSonatype")
- dependsOn(":packages:react-native:ReactAndroid:hermes-engine:publishToSonatype")
}
-if (project.findProperty("react.internal.useHermesNightly")?.toString()?.toBoolean() == true) {
+var hermesSubstitution: Pair? = null
+
+if (project.findProperty("react.internal.useHermesStable")?.toString()?.toBoolean() == true) {
+ val hermesVersions = java.util.Properties()
+ val hermesVersionPropertiesFile =
+ File("./packages/react-native/sdks/hermes-engine/version.properties")
+ hermesVersionPropertiesFile.inputStream().use { hermesVersions.load(it) }
+ val selectedHermesVersion = hermesVersions["HERMES_VERSION_NAME"] as String
+
+ hermesSubstitution = selectedHermesVersion to "Users opted to use stable hermes release"
+} else if (
+ project.findProperty("react.internal.useHermesNightly")?.toString()?.toBoolean() == true
+) {
+ val reactNativePackageJson = File("./packages/react-native/package.json")
+ val reactNativePackageJsonContent = reactNativePackageJson.readText()
+ val packageJson = groovy.json.JsonSlurper().parseText(reactNativePackageJsonContent) as Map<*, *>
+
+ val hermesCompilerVersion =
+ (packageJson["dependencies"] as Map<*, *>)["hermes-compiler"] as String
+
+ if (hermesCompilerVersion == "0.0.0") {
+ throw RuntimeException(
+ "Trying to use Hermes Nightly but hermes-compiler version is not specified"
+ )
+ }
+
+ hermesSubstitution = "$hermesCompilerVersion-SNAPSHOT" to "Users opted to use hermes nightly"
+} else {
logger.warn(
"""
********************************************************************************
- INFO: You're using Hermes from nightly as you set
+ INFO: You're building Hermes from source as you set
- react.internal.useHermesNightly=true
+ react.internal.useHermesStable=false
+ react.internal.useHermesNightly=false
in the ./gradle.properties file.
@@ -127,12 +154,20 @@ if (project.findProperty("react.internal.useHermesNightly")?.toString()?.toBoole
"""
.trimIndent()
)
+}
+
+if (hermesSubstitution != null) {
+ val (hermesVersion, reason) = hermesSubstitution!!
+ project(":packages:react-native:ReactAndroid:hermes-engine") {
+ tasks.configureEach { enabled = false }
+ }
+
allprojects {
configurations.all {
resolutionStrategy.dependencySubstitution {
substitute(project(":packages:react-native:ReactAndroid:hermes-engine"))
- .using(module("com.facebook.hermes:hermes-android:0.+"))
- .because("Users opted to use hermes from nightly")
+ .using(module("com.facebook.hermes:hermes-android:$hermesVersion"))
+ .because(reason)
}
}
}
diff --git a/flow-typed/environment/node.js b/flow-typed/environment/node.js
index eecaceb1f405..40987554080c 100644
--- a/flow-typed/environment/node.js
+++ b/flow-typed/environment/node.js
@@ -21,6 +21,12 @@ interface ErrnoError extends Error {
syscall?: string;
}
+type Node$Conditional = T extends true
+ ? IfTrue
+ : T extends false
+ ? IfFalse
+ : IfTrue | IfFalse;
+
type buffer$NonBufferEncoding =
| 'hex'
| 'HEX'
@@ -192,12 +198,27 @@ declare type Node$Buffer = typeof Buffer;
declare module 'buffer' {
declare var kMaxLength: number;
declare var INSPECT_MAX_BYTES: number;
+
+ declare var constants: $ReadOnly<{
+ MAX_LENGTH: number,
+ MAX_STRING_LENGTH: number,
+ }>;
+
declare function transcode(
source: Node$Buffer,
fromEnc: buffer$Encoding,
toEnc: buffer$Encoding,
): Node$Buffer;
+
+ declare function isUtf8(input: Buffer | ArrayBuffer | $TypedArray): boolean;
+
+ declare function isAscii(input: Buffer | ArrayBuffer | $TypedArray): boolean;
+
+ declare function resolveObjectURL(id: string): Blob | void;
+
declare var Buffer: Node$Buffer;
+ declare var Blob: typeof globalThis.Blob;
+ declare var File: typeof globalThis.File;
}
type child_process$execOpts = {
@@ -597,6 +618,7 @@ declare class crypto$Hash extends stream$Duplex {
data: string | Buffer,
input_encoding?: 'utf8' | 'ascii' | 'latin1' | 'binary',
): crypto$Hash;
+ copy(options?: mixed): crypto$Hash;
}
declare class crypto$Hmac extends stream$Duplex {
@@ -655,6 +677,83 @@ type crypto$key =
...
};
+declare class crypto$KeyObject {
+ +asymmetricKeyType?:
+ | 'rsa'
+ | 'rsa-pss'
+ | 'dsa'
+ | 'ec'
+ | 'ed25519'
+ | 'ed448'
+ | 'x25519'
+ | 'x448';
+ +asymmetricKeySize?: number;
+ +symmetricKeySize?: number;
+ +type: 'secret' | 'public' | 'private';
+
+ export(
+ options: Readonly<{
+ type: 'pkcs1' | 'spki' | 'pkcs8' | 'sec1',
+ format: 'pem',
+ }>,
+ ): string;
+ export(
+ options: Readonly<{
+ type: 'pkcs1' | 'spki' | 'pkcs8' | 'sec1',
+ format: 'der',
+ }>,
+ ): Buffer;
+ export(options: Readonly<{format: 'jwk'}>): mixed;
+ equals(otherKeyObject: crypto$KeyObject): boolean;
+}
+
+declare class crypto$X509Certificate {
+ constructor(buffer: string | Buffer | $TypedArray | DataView): void;
+
+ +ca: boolean;
+ +fingerprint: string;
+ +fingerprint256: string;
+ +fingerprint512: string;
+ +issuer: string;
+ +issuerCertificate?: crypto$X509Certificate;
+ +keyUsage: Array;
+ +publicKey: crypto$KeyObject;
+ +raw: Buffer;
+ +serialNumber: string;
+ +subject: string;
+ +subjectAltName: string;
+ +validFrom: string;
+ +validTo: string;
+ +validFromDate: Date;
+ +validToDate: Date;
+
+ checkEmail(
+ email: string,
+ options?: Readonly<{subject?: 'always' | 'default' | 'never'}>,
+ ): string | void;
+ checkHost(
+ name: string,
+ options?: Readonly<{subject?: 'always' | 'default' | 'never'}>,
+ ): string | void;
+ checkIP(ip: string): string | void;
+ checkIssued(otherCert: crypto$X509Certificate): boolean;
+ checkPrivateKey(privateKey: crypto$KeyObject): boolean;
+ toJSON(): string;
+ toLegacyObject(): mixed;
+ toString(): string;
+ verify(publicKey: crypto$KeyObject): boolean;
+}
+
+declare class crypto$Certificate {
+ static exportChallenge(
+ spkac: string | Buffer | $TypedArray | DataView,
+ ): Buffer;
+ static exportPublicKey(
+ spkac: string | Buffer | $TypedArray | DataView,
+ ): Buffer;
+ static verifySpkac(spkac: Buffer | $TypedArray | DataView): boolean;
+}
+
declare module 'crypto' {
declare var DEFAULT_ENCODING: string;
@@ -808,12 +907,85 @@ declare module 'crypto' {
callback: (err: ?Error, buffer: Buffer) => void,
): void;
declare function randomUUID(
- options?: $ReadOnly<{|disableEntropyCache?: boolean|}>,
+ options?: Readonly<{disableEntropyCache?: boolean}>,
): string;
declare function timingSafeEqual(
a: Buffer | $TypedArray | DataView,
b: Buffer | $TypedArray | DataView,
): boolean;
+ declare function hash(
+ algorithm: string,
+ data: string | Buffer | $TypedArray | DataView,
+ ): Buffer;
+ declare function hash(
+ algorithm: string,
+ data: string | Buffer | $TypedArray | DataView,
+ outputEncoding: buffer$Encoding,
+ ): string;
+ declare function createSecretKey(
+ key: Buffer | $TypedArray | DataView,
+ ): crypto$KeyObject;
+ declare function createSecretKey(
+ key: string,
+ encoding: buffer$Encoding,
+ ): crypto$KeyObject;
+ declare function createPublicKey(
+ key: string | Buffer | crypto$KeyObject | mixed,
+ ): crypto$KeyObject;
+ declare function createPrivateKey(
+ key: string | Buffer | mixed,
+ ): crypto$KeyObject;
+ declare function generateKeyPair(
+ type:
+ | 'rsa'
+ | 'rsa-pss'
+ | 'dsa'
+ | 'ec'
+ | 'ed25519'
+ | 'ed448'
+ | 'x25519'
+ | 'x448',
+ options: mixed,
+ callback: (
+ err: ?Error,
+ publicKey: crypto$KeyObject,
+ privateKey: crypto$KeyObject,
+ ) => void,
+ ): void;
+ declare function generateKeyPairSync(
+ type:
+ | 'rsa'
+ | 'rsa-pss'
+ | 'dsa'
+ | 'ec'
+ | 'ed25519'
+ | 'ed448'
+ | 'x25519'
+ | 'x448',
+ options: mixed,
+ ): {publicKey: crypto$KeyObject, privateKey: crypto$KeyObject, ...};
+ declare function generateKey(
+ type: 'hmac' | 'aes',
+ options: Readonly<{length: number}>,
+ callback: (err: ?Error, key: crypto$KeyObject) => void,
+ ): void;
+ declare function generateKeySync(
+ type: 'hmac' | 'aes',
+ options: Readonly<{length: number}>,
+ ): crypto$KeyObject;
+ declare function checkPrime(
+ candidate: Buffer | $TypedArray | DataView | bigint,
+ options?: Readonly<{checks?: number}>,
+ callback: (err: ?Error, result: boolean) => void,
+ ): void;
+ declare function checkPrimeSync(
+ candidate: Buffer | $TypedArray | DataView | bigint,
+ options?: Readonly<{checks?: number}>,
+ ): boolean;
+ declare class Certificate extends crypto$Certificate {}
+ declare class X509Certificate extends crypto$X509Certificate {}
+ declare class KeyObject extends crypto$KeyObject {}
+ declare var webcrypto: unknown;
}
type net$Socket$address = {
@@ -841,7 +1013,7 @@ declare class dgram$Socket extends events$EventEmitter {
msg: Buffer,
port: number,
address: string,
- callback?: (err: ?Error, bytes: any) => mixed,
+ callback?: (err: ?Error, bytes: any) => unknown,
): void;
send(
msg: Buffer,
@@ -849,7 +1021,7 @@ declare class dgram$Socket extends events$EventEmitter {
length: number,
port: number,
address: string,
- callback?: (err: ?Error, bytes: any) => mixed,
+ callback?: (err: ?Error, bytes: any) => unknown,
): void;
setBroadcast(flag: boolean): void;
setMulticastLoopback(flag: boolean): void;
@@ -1044,6 +1216,8 @@ declare module 'fs' {
declare class FSWatcher extends events$EventEmitter {
close(): void;
+ ref(): this;
+ unref(): this;
}
declare class ReadStream extends stream$Readable {
@@ -1057,6 +1231,7 @@ declare module 'fs' {
declare class Dirent {
name: string | Buffer;
+ parentPath: string;
isBlockDevice(): boolean;
isCharacterDevice(): boolean;
@@ -1290,12 +1465,24 @@ declare module 'fs' {
declare function mkdtempSync(prefix: string): string;
declare function readdir(
path: string,
- options: string | {encoding?: string, withFileTypes?: false, ...},
+ options:
+ | string
+ | $ReadOnly<{
+ encoding?: string,
+ recursive?: boolean,
+ withFileTypes?: false,
+ ...
+ }>,
callback: (err: ?ErrnoError, files: Array) => void,
): void;
declare function readdir(
path: string,
- options: {encoding?: string, withFileTypes: true, ...},
+ options: $ReadOnly<{
+ encoding?: string,
+ recursive?: boolean,
+ withFileTypes: true,
+ ...
+ }>,
callback: (err: ?ErrnoError, files: Array) => void,
): void;
declare function readdir(
@@ -1304,11 +1491,23 @@ declare module 'fs' {
): void;
declare function readdirSync(
path: string,
- options?: string | {encoding?: string, withFileTypes?: false, ...},
+ options?:
+ | string
+ | $ReadOnly<{
+ encoding?: string,
+ recursive?: boolean,
+ withFileTypes?: false,
+ }>,
): Array;
declare function readdirSync(
path: string,
- options?: string | {encoding?: string, withFileTypes: true, ...},
+ options?:
+ | string
+ | $ReadOnly<{
+ encoding?: string,
+ recursive?: boolean,
+ withFileTypes: true,
+ }>,
): Array;
declare function close(
fd: number,
@@ -1326,6 +1525,29 @@ declare module 'fs' {
flags: string | number,
callback: (err: ?ErrnoError, fd: number) => void,
): void;
+ declare function openAsBlob(
+ path: string | Buffer | URL,
+ options?: $ReadOnly<{
+ type?: string, // Optional MIME type hint
+ }>,
+ ): Promise;
+ declare function opendir(
+ path: string,
+ options?: $ReadOnly<{
+ encoding?: string,
+ bufferSize?: number,
+ recursive?: boolean,
+ }>,
+ callback: (err: ?ErrnoError, dir: Dir) => void,
+ ): void;
+ declare function opendirSync(
+ path: string,
+ options?: $ReadOnly<{
+ encoding?: string,
+ bufferSize?: number,
+ recursive?: boolean,
+ }>,
+ ): Dir;
declare function openSync(
path: string | Buffer,
flags: string | number,
@@ -1544,7 +1766,15 @@ declare module 'fs' {
): void;
declare function watchFile(
filename: string,
- options?: Object,
+ listener?: (curr: Stats, prev: Stats) => void,
+ ): void;
+ declare function watchFile(
+ filename: string,
+ options?: $ReadOnly<{
+ bigint?: boolean,
+ persistent?: boolean,
+ interval?: number,
+ }>,
listener?: (curr: Stats, prev: Stats) => void,
): void;
declare function unwatchFile(
@@ -1553,7 +1783,16 @@ declare module 'fs' {
): void;
declare function watch(
filename: string,
- options?: Object,
+ listener?: (event: string, filename: string) => void,
+ ): FSWatcher;
+ declare function watch(
+ filename: string,
+ options?: $ReadOnly<{
+ persistent?: boolean,
+ recursive?: boolean,
+ encoding?: string,
+ signal?: AbortSignal,
+ }>,
listener?: (event: string, filename: string) => void,
): FSWatcher;
declare function exists(
@@ -1593,6 +1832,105 @@ declare module 'fs' {
dest: string,
flags?: number,
): void;
+ declare function cp(
+ src: string | URL,
+ dest: string | URL,
+ options: $ReadOnly<{
+ dereference?: boolean,
+ errorOnExist?: boolean,
+ filter?: (src: string, dest: string) => boolean | Promise,
+ force?: boolean,
+ mode?: number,
+ preserveTimestamps?: boolean,
+ recursive?: boolean,
+ verbatimSymlinks?: boolean,
+ }>,
+ callback: (err: ?Error) => void,
+ ): void;
+ declare function cp(
+ src: string | URL,
+ dest: string | URL,
+ callback: (err: ?Error) => void,
+ ): void;
+ declare function cpSync(
+ src: string | URL,
+ dest: string | URL,
+ options?: $ReadOnly<{
+ dereference?: boolean,
+ errorOnExist?: boolean,
+ filter?: (src: string, dest: string) => boolean,
+ force?: boolean,
+ mode?: number,
+ preserveTimestamps?: boolean,
+ recursive?: boolean,
+ verbatimSymlinks?: boolean,
+ }>,
+ ): void;
+
+ declare type GlobOptions = Readonly<{
+ /**
+ * Current working directory.
+ * @default process.cwd()
+ */
+ cwd?: string | void,
+ /**
+ * `true` if the glob should return paths as `Dirent`s, `false` otherwise.
+ * @default false
+ * @since v22.2.0
+ */
+ withFileTypes?: WithFileTypes,
+ /**
+ * Function to filter out files/directories or a
+ * list of glob patterns to be excluded. If a function is provided, return
+ * `true` to exclude the item, `false` to include it.
+ * @default undefined
+ */
+ exclude?:
+ | ((fileName: Node$Conditional) => boolean)
+ | $ReadOnlyArray,
+ ...
+ }>;
+
+ /**
+ * Retrieves the files matching the specified pattern.
+ *
+ * ```js
+ * import { glob } from 'node:fs';
+ *
+ * glob('*.js', (err, matches) => {
+ * if (err) throw err;
+ * console.log(matches);
+ * });
+ * ```
+ * @since v22.0.0
+ */
+ declare function glob(
+ pattern: string | $ReadOnlyArray,
+ callback: (err: ?ErrnoError, matches: Array) => void,
+ ): void;
+
+ declare function glob(
+ pattern: string | $ReadOnlyArray,
+ options: GlobOptions,
+ callback: (
+ err: ?ErrnoError,
+ matches: Node$Conditional, Array>,
+ ) => void,
+ ): void;
+
+ /**
+ * ```js
+ * import { globSync } from 'node:fs';
+ *
+ * console.log(globSync('*.js'));
+ * ```
+ * @since v22.0.0
+ * @returns paths of files that match the pattern.
+ */
+ declare function globSync(
+ pattern: string | $ReadOnlyArray,
+ options?: GlobOptions,
+ ): Node$Conditional, Array>;
declare var F_OK: number;
declare var R_OK: number;
@@ -1658,14 +1996,52 @@ declare module 'fs' {
retryDelay?: number,
...
};
+ declare class Dir {
+ +path: string;
+ close(): Promise;
+ closeSync(): void;
+ read(): Promise;
+ read(cb: (err?: Error, dirent: ?Dirent) => void): void;
+ readSync(): ?Dirent;
+ @@asyncIterator(): AsyncIterator;
+ }
+ type AppendOrWriteToFileHandle = (
+ data:
+ | string
+ | Buffer
+ | Uint8Array
+ | DataView
+ | AsyncIterable
+ | Iterable
+ | stream$Readable,
+ options: WriteOptions | string,
+ ) => Promise;
declare class FileHandle {
- appendFile(
- data: string | Buffer,
- options: WriteOptions | string,
- ): Promise;
+ appendFile: AppendOrWriteToFileHandle;
chmod(mode: number): Promise;
chown(uid: number, guid: number): Promise;
close(): Promise;
+ createReadStream(
+ options?: $ReadOnly<{
+ encoding?: string,
+ autoClose?: boolean,
+ emitClose?: boolean,
+ start?: number,
+ end?: number,
+ highWaterMark?: number,
+ signal?: AbortSignal,
+ }>,
+ ): ReadStream;
+ createWriteStream(
+ options?: $ReadOnly<{
+ encoding?: string,
+ autoClose?: boolean,
+ emitClose?: boolean,
+ start?: number,
+ highWaterMark?: number,
+ flush?: boolean,
+ }>,
+ ): WriteStream;
datasync(): Promise;
fd: number;
read(
@@ -1678,8 +2054,25 @@ declare module 'fs' {
buffer: T,
...
}>;
+ readableWebStream(
+ options?: $ReadOnly<{autoClose?: boolean}>,
+ ): ReadableStream;
readFile(options: EncodingFlag): Promise;
readFile(options: string): Promise;
+ readLines(
+ options?: $ReadOnly<{
+ encoding?: string,
+ autoClose?: boolean,
+ emitClose?: boolean,
+ start?: number,
+ end?: number,
+ highWaterMark?: number,
+ }>,
+ ): readline$Interface;
+ readv | Array | Array>(
+ buffers: T,
+ position?: number | null,
+ ): Promise<{buffers: T, bytesRead: number}>;
stat(): Promise;
sync(): Promise;
truncate(len?: number): Promise;
@@ -1688,15 +2081,24 @@ declare module 'fs' {
mtime: number | string | Date,
): Promise;
write(
- buffer: Buffer | Uint8Array,
+ buffer: Buffer | Uint8Array | DataView,
offset: number,
length: number,
position: number,
): Promise;
- writeFile(
- data: string | Buffer | Uint8Array,
- options: WriteOptions | string,
+ write(
+ buffer: Buffer | Uint8Array | DataView,
+ options?: $ReadOnly<{
+ offset?: number,
+ length?: number,
+ position?: number,
+ }>,
): Promise;
+ writeFile: AppendOrWriteToFileHandle;
+ writev | Array | Array>(
+ buffers: T,
+ position?: number | null,
+ ): Promise<{buffers: T, bytesWritten: number}>;
}
declare type FSPromisePath = string | Buffer | URL;
@@ -1714,6 +2116,20 @@ declare module 'fs' {
dest: FSPromisePath,
flags?: number,
): Promise,
+ cp(
+ src: string | URL,
+ dest: string | URL,
+ options?: $ReadOnly<{
+ dereference?: boolean,
+ errorOnExist?: boolean,
+ filter?: (src: string, dest: string) => boolean | Promise,
+ force?: boolean,
+ mode?: number,
+ preserveTimestamps?: boolean,
+ recursive?: boolean,
+ verbatimSymlinks?: boolean,
+ }>,
+ ): Promise,
fchmod(filehandle: FileHandle, mode: number): Promise,
fchown(filehandle: FileHandle, uid: number, guid: number): Promise,
fdatasync(filehandle: FileHandle): Promise,
@@ -1725,6 +2141,14 @@ declare module 'fs' {
atime: number | string | Date,
mtime: number | string | Date,
): Promise,
+ glob(
+ pattern: string | $ReadOnlyArray,
+ options?: GlobOptions,
+ ): Node$Conditional<
+ WithFileTypes,
+ AsyncIterator,
+ AsyncIterator,
+ >,
lchmod(path: FSPromisePath, mode: number): Promise,
lchown(path: FSPromisePath, uid: number, guid: number): Promise,
link(existingPath: FSPromisePath, newPath: FSPromisePath): Promise,
@@ -1745,6 +2169,14 @@ declare module 'fs' {
flags?: string | number,
mode?: number,
): Promise,
+ opendir(
+ path: string,
+ options?: $ReadOnly<{
+ encoding?: string,
+ bufferSize?: number,
+ recursive?: boolean,
+ }>,
+ ): Promise,
read(
filehandle: FileHandle,
buffer: T,
@@ -1758,11 +2190,21 @@ declare module 'fs' {
}>,
readdir: ((
path: FSPromisePath,
- options: string | {encoding?: string, withFileTypes?: false, ...},
+ options:
+ | string
+ | $ReadOnly<{
+ encoding?: string,
+ recursive?: boolean,
+ withFileTypes?: false,
+ }>,
) => Promise>) &
((
path: FSPromisePath,
- options: {encoding?: string, withFileTypes: true, ...},
+ options: $ReadOnly<{
+ encoding?: string,
+ recursive?: boolean,
+ withFileTypes: true,
+ }>,
) => Promise>) &
((path: FSPromisePath) => Promise>),
readFile: ((
@@ -1805,6 +2247,17 @@ declare module 'fs' {
atime: number | string | Date,
mtime: number | string | Date,
): Promise,
+ watch(
+ filename: FSPromisePath,
+ options?: $ReadOnly<{
+ persistent?: boolean,
+ recursive?: boolean,
+ encoding?: string,
+ signal?: AbortSignal,
+ maxQueue?: number,
+ overflow?: 'ignore' | 'throw',
+ }>,
+ ): AsyncIterator<{eventType: string, filename: ?string}>,
write(
filehandle: FileHandle,
buffer: T,
@@ -1838,6 +2291,7 @@ type http$agentOptions = {
declare class http$Agent<+SocketT = net$Socket> {
constructor(options: http$agentOptions): void;
destroy(): void;
+ // $FlowFixMe[incompatible-variance]
freeSockets: {[name: string]: $ReadOnlyArray, ...};
getName(options: {
host: string,
@@ -1847,7 +2301,9 @@ declare class http$Agent<+SocketT = net$Socket> {
}): string;
maxFreeSockets: number;
maxSockets: number;
+ // $FlowFixMe[incompatible-variance]
requests: {[name: string]: $ReadOnlyArray>, ...};
+ // $FlowFixMe[incompatible-variance]
sockets: {[name: string]: $ReadOnlyArray, ...};
}
@@ -1939,7 +2395,7 @@ declare class http$Server extends net$Server {
callback?: Function,
): this;
listening: boolean;
- close(callback?: (error: ?Error) => mixed): this;
+ close(callback?: (error: ?Error) => unknown): this;
closeAllConnections(): void;
closeIdleConnections(): void;
maxHeadersCount: number;
@@ -1975,7 +2431,7 @@ declare class https$Server extends tls$Server {
},
callback?: Function,
): this;
- close(callback?: (error: ?Error) => mixed): this;
+ close(callback?: (error: ?Error) => unknown): this;
closeAllConnections(): void;
closeIdleConnections(): void;
keepAliveTimeout: number;
@@ -1988,7 +2444,7 @@ type requestOptions = {|
auth?: string,
defaultPort?: number,
family?: number,
- headers?: {[key: string]: mixed, ...},
+ headers?: {[key: string]: unknown, ...},
host?: string,
hostname?: string,
localAddress?: string,
@@ -2126,14 +2582,14 @@ declare class net$Socket extends stream$Duplex {
bufferSize: number;
bytesRead: number;
bytesWritten: number;
- connect(path: string, connectListener?: () => mixed): net$Socket;
+ connect(path: string, connectListener?: () => unknown): net$Socket;
connect(
port: number,
host?: string,
- connectListener?: () => mixed,
+ connectListener?: () => unknown,
): net$Socket;
- connect(port: number, connectListener?: () => mixed): net$Socket;
- connect(options: Object, connectListener?: () => mixed): net$Socket;
+ connect(port: number, connectListener?: () => unknown): net$Socket;
+ connect(options: Object, connectListener?: () => unknown): net$Socket;
destroyed: boolean;
end(
chunkOrEncodingOrCallback?:
@@ -2193,7 +2649,7 @@ type net$connectOptions = {
domain: string,
options?: ?number | ?Object,
callback?: (err: ?Error, address: string, family: number) => void,
- ) => mixed,
+ ) => unknown,
path?: string,
...
};
@@ -2241,9 +2697,7 @@ type os$CPU = {
nice: number,
sys: number,
user: number,
- ...
},
- ...
};
type os$NetIFAddr = {
@@ -2252,7 +2706,8 @@ type os$NetIFAddr = {
internal: boolean,
mac: string,
netmask: string,
- ...
+ scopeid?: number,
+ cidr: ?string,
};
type os$UserInfo$buffer = {
@@ -2261,7 +2716,6 @@ type os$UserInfo$buffer = {
username: Buffer,
homedir: Buffer,
shell: ?Buffer,
- ...
};
type os$UserInfo$string = {
@@ -2270,43 +2724,117 @@ type os$UserInfo$string = {
username: string,
homedir: string,
shell: ?string,
- ...
};
declare module 'os' {
- declare function arch(): 'x64' | 'arm' | 'ia32';
+ declare function arch():
+ | 'arm'
+ | 'arm64'
+ | 'ia32'
+ | 'loong64'
+ | 'mips'
+ | 'mipsel'
+ | 'ppc64'
+ | 'riscv64'
+ | 's390x'
+ | 'x64';
declare function availableParallelism(): number;
declare function cpus(): Array;
declare function endianness(): 'BE' | 'LE';
declare function freemem(): number;
+ declare function getPriority(pid?: number): number;
declare function homedir(): string;
declare function hostname(): string;
declare function loadavg(): [number, number, number];
+ declare function machine(): string;
declare function networkInterfaces(): {
[ifName: string]: Array,
- ...
};
- declare function platform(): string;
+ declare function platform():
+ | 'aix'
+ | 'android'
+ | 'darwin'
+ | 'freebsd'
+ | 'haiku'
+ | 'linux'
+ | 'openbsd'
+ | 'sunos'
+ | 'win32'
+ | 'cygwin';
declare function release(): string;
+ declare function setPriority(priority: number): void;
+ declare function setPriority(pid: number, priority: number): void;
declare function tmpdir(): string;
declare function totalmem(): number;
declare function type(): string;
declare function uptime(): number;
- declare function userInfo(options: {
- encoding: 'buffer',
- ...
- }): os$UserInfo$buffer;
- declare function userInfo(options?: {
- encoding: 'utf8',
- ...
- }): os$UserInfo$string;
+ declare function userInfo(
+ options: Readonly<{
+ encoding: 'buffer',
+ }>,
+ ): os$UserInfo$buffer;
+ declare function userInfo(
+ options?: Readonly<{
+ encoding: 'utf8',
+ }>,
+ ): os$UserInfo$string;
+ declare function version(): string;
declare var EOL: string;
+ declare var devNull: string;
+ declare var constants: Readonly<{
+ signals: {[key: string]: number, ...},
+ errno: {[key: string]: number, ...},
+ priority: Readonly<{
+ PRIORITY_LOW: number,
+ PRIORITY_BELOW_NORMAL: number,
+ PRIORITY_NORMAL: number,
+ PRIORITY_ABOVE_NORMAL: number,
+ PRIORITY_HIGH: number,
+ PRIORITY_HIGHEST: number,
+ }>,
+ dlopen: {[key: string]: number, ...},
+ }>;
}
+type path$PlatformPath = {
+ normalize(path: string): string,
+ join(...parts: Array): string,
+ resolve(...parts: Array): string,
+ matchesGlob(path: string, pattern: string): boolean,
+ isAbsolute(path: string): boolean,
+ relative(from: string, to: string): string,
+ dirname(path: string): string,
+ basename(path: string, ext?: string): string,
+ extname(path: string): string,
+ sep: string,
+ delimiter: string,
+ parse(pathString: string): Readonly<{
+ root: string,
+ dir: string,
+ base: string,
+ ext: string,
+ name: string,
+ }>,
+ format(
+ pathObject: Readonly<{
+ root?: string,
+ dir?: string,
+ base?: string,
+ ext?: string,
+ name?: string,
+ }>,
+ ): string,
+ toNamespacedPath(path: string): string,
+ posix: path$PlatformPath,
+ win32: path$PlatformPath,
+ ...
+};
+
declare module 'path' {
declare function normalize(path: string): string;
declare function join(...parts: Array): string;
declare function resolve(...parts: Array): string;
+ declare function matchesGlob(path: string, pattern: string): boolean;
declare function isAbsolute(path: string): boolean;
declare function relative(from: string, to: string): string;
declare function dirname(path: string): string;
@@ -2320,18 +2848,19 @@ declare module 'path' {
base: string,
ext: string,
name: string,
- ...
};
- declare function format(pathObject: {
- root?: string,
- dir?: string,
- base?: string,
- ext?: string,
- name?: string,
- ...
- }): string;
- declare var posix: any;
- declare var win32: any;
+ declare function format(
+ pathObject: Readonly<{
+ root?: string,
+ dir?: string,
+ base?: string,
+ ext?: string,
+ name?: string,
+ }>,
+ ): string;
+ declare function toNamespacedPath(path: string): string;
+ declare var posix: path$PlatformPath;
+ declare var win32: path$PlatformPath;
}
declare module 'punycode' {
@@ -2457,7 +2986,14 @@ declare class stream$Readable extends stream$Stream {
static from(
iterable: Iterable | AsyncIterable,
options?: readableStreamOptions,
- ): stream$Readable;
+ ): this;
+
+ static fromWeb(
+ readableStream: ReadableStream,
+ options?: readableStreamOptions,
+ ): this;
+
+ static toWeb(streamReadable: stream$Readable): ReadableStream;
constructor(options?: readableStreamOptions): void;
destroy(error?: Error): this;
@@ -2504,6 +3040,13 @@ type writableStreamOptions = {
...
};
declare class stream$Writable extends stream$Stream {
+ static fromWeb(
+ writableStream: WritableStream,
+ options?: writableStreamOptions,
+ ): this;
+
+ static toWeb(streamWritable: stream$Writable): WritableStream;
+
constructor(options?: writableStreamOptions): void;
cork(): void;
destroy(error?: Error): this;
@@ -2545,10 +3088,6 @@ declare class stream$Writable extends stream$Stream {
_final(callback: (error?: Error) => void): void;
}
-//According to the NodeJS docs:
-//"Since JavaScript doesn't have multiple prototypal inheritance, this class
-//prototypally inherits from Readable, and then parasitically from Writable."
-//Source: ,
+ options?: duplexStreamOptions,
+ ): this;
+
+ // $FlowFixMe[incompatible-type] See above
+ static toWeb(streamDuplex: stream$Duplex): {
+ readable: ReadableStream,
+ writable: WritableStream,
+ ...
+ };
+
constructor(options?: duplexStreamOptions): void;
}
type transformStreamOptions = duplexStreamOptions & {
@@ -2811,7 +3372,7 @@ type tls$connectOptions = {
domain: string,
options?: ?number | ?Object,
callback?: (err: ?Error, address: string, family: number) => void,
- ) => mixed,
+ ) => unknown,
requestOCSP?: boolean,
...
};
@@ -2990,8 +3551,16 @@ declare module 'url' {
declare function resolve(from: string, to: string): string;
declare function domainToASCII(domain: string): string;
declare function domainToUnicode(domain: string): string;
- declare function pathToFileURL(path: string): url$urlObject;
- declare function fileURLToPath(path: url$urlObject | string): string;
+
+ declare function pathToFileURL(
+ path: string,
+ options?: Readonly<{windows?: boolean}>,
+ ): url$urlObject;
+
+ declare function fileURLToPath(
+ path: url$urlObject | string,
+ options?: Readonly<{windows?: boolean}>,
+ ): string;
declare class URLSearchParams {
@@iterator(): Iterator<[string, string]>;
@@ -3013,7 +3582,7 @@ declare module 'url' {
value: string,
name: string,
searchParams: URLSearchParams,
- ) => mixed,
+ ) => unknown,
thisArg?: This,
): void;
get(name: string): string | null;
@@ -3027,6 +3596,7 @@ declare module 'url' {
}
declare class URL {
static canParse(url: string, base?: string): boolean;
+ static parse(input: string, base?: string): URL | null;
static createObjectURL(blob: Blob): string;
static createObjectURL(mediaSource: MediaSource): string;
static revokeObjectURL(url: string): void;
@@ -3046,6 +3616,63 @@ declare module 'url' {
toString(): string;
toJSON(): string;
}
+
+ declare type url$URLPatternInit = {
+ protocol?: string,
+ username?: string,
+ password?: string,
+ hostname?: string,
+ port?: string,
+ pathname?: string,
+ search?: string,
+ hash?: string,
+ baseURL?: string,
+ };
+
+ declare type url$URLPatternComponentResult = {
+ input: string,
+ groups: {[key: string]: string | void},
+ };
+
+ declare type url$URLPatternResult = {
+ inputs: $ReadOnlyArray,
+ protocol: url$URLPatternComponentResult,
+ username: url$URLPatternComponentResult,
+ password: url$URLPatternComponentResult,
+ hostname: url$URLPatternComponentResult,
+ port: url$URLPatternComponentResult,
+ pathname: url$URLPatternComponentResult,
+ search: url$URLPatternComponentResult,
+ hash: url$URLPatternComponentResult,
+ };
+
+ declare class URLPattern {
+ constructor(
+ input?: string | url$URLPatternInit,
+ options?: Readonly<{ignoreCase?: boolean}>,
+ ): void;
+ constructor(
+ input: string | url$URLPatternInit,
+ baseURL: string,
+ options?: Readonly<{ignoreCase?: boolean}>,
+ ): void;
+
+ +hasRegExpGroups: boolean;
+ +hash: string;
+ +hostname: string;
+ +password: string;
+ +pathname: string;
+ +port: string;
+ +protocol: string;
+ +search: string;
+ +username: string;
+
+ exec(
+ input?: string | url$URLPatternInit,
+ baseURL?: string,
+ ): url$URLPatternResult | null;
+ test(input?: string | url$URLPatternInit, baseURL?: string): boolean;
+ }
}
type util$InspectOptions = {
@@ -3057,30 +3684,30 @@ type util$InspectOptions = {
};
declare type util$ParseArgsOption =
- | $ReadOnly<{|
+ | Readonly<{
type: 'boolean',
multiple?: false,
short?: string,
default?: boolean,
- |}>
- | $ReadOnly<{|
+ }>
+ | Readonly<{
type: 'boolean',
multiple: true,
short?: string,
default?: Array,
- |}>
- | $ReadOnly<{|
+ }>
+ | Readonly<{
type: 'string',
multiple?: false,
short?: string,
default?: string,
- |}>
- | $ReadOnly<{|
+ }>
+ | Readonly<{
type: 'string',
multiple: true,
short?: string,
default?: Array,
- |}>;
+ }>;
type util$ParseArgsOptionToValue = TOption['type'] extends 'boolean'
? TOption['multiple'] extends true
@@ -3137,31 +3764,33 @@ declare module 'util' {
declare function stripVTControlCharacters(str: string): string;
declare function parseArgs<
- TOptions: {+[string]: util$ParseArgsOption} = {||},
- >(config: {|
+ TOptions: {+[string]: util$ParseArgsOption} = {},
+ >(config: {
args?: Array,
options?: TOptions,
strict?: boolean,
allowPositionals?: boolean,
+ allowNegative?: boolean,
tokens?: false,
- |}): {|
+ }): {
values: util$ParseArgsOptionsToValues,
positionals: Array,
- |};
+ };
declare function parseArgs<
- TOptions: {[string]: util$ParseArgsOption} = {||},
- >(config: {|
+ TOptions: {[string]: util$ParseArgsOption} = {},
+ >(config: {
args?: Array,
options?: TOptions,
strict?: boolean,
allowPositionals?: boolean,
+ allowNegative?: boolean,
tokens: true,
- |}): {|
+ }): {
values: util$ParseArgsOptionsToValues,
positionals: Array,
tokens: Array,
- |};
+ };
declare class TextDecoder {
constructor(
@@ -3187,46 +3816,87 @@ declare module 'util' {
encoding: string;
}
+ declare class MIMEType {
+ constructor(input: string): void;
+ type: string;
+ subtype: string;
+ +essence: string;
+ +params: MIMEParams;
+ toString(): string;
+ }
+
+ declare class MIMEParams {
+ delete(name: string): void;
+ get(name: string): ?string;
+ has(name: string): boolean;
+ set(name: string, value: string): void;
+ entries(): Iterator<[string, string]>;
+ keys(): Iterator;
+ values(): Iterator;
+ }
+
+ declare function parseEnv(content: string): {[key: string]: string, ...};
+
+ declare type util$DiffEntry = [operation: -1 | 0 | 1, value: string];
+ declare function diff(
+ actual: string | $ReadOnlyArray,
+ expected: string | $ReadOnlyArray,
+ ): Array;
+
+ declare function getSystemErrorMessage(err: number): string;
+
+ declare type util$CallSiteObject = {
+ functionName: string,
+ scriptName: string,
+ scriptId: string,
+ lineNumber: number,
+ columnNumber: number,
+ };
+ declare function getCallSites(
+ frameCountOrOptions?: number | Readonly<{frameCount?: number}>,
+ ): Array;
+
declare var types: {
- isAnyArrayBuffer: (value: mixed) => boolean,
- isArgumentsObject: (value: mixed) => boolean,
- isArrayBuffer: (value: mixed) => boolean,
- isAsyncFunction: (value: mixed) => boolean,
- isBigInt64Array: (value: mixed) => boolean,
- isBigUint64Array: (value: mixed) => boolean,
- isBooleanObject: (value: mixed) => boolean,
- isBoxedPrimitive: (value: mixed) => boolean,
- isDataView: (value: mixed) => boolean,
- isDate: (value: mixed) => boolean,
- isExternal: (value: mixed) => boolean,
- isFloat32Array: (value: mixed) => boolean,
- isFloat64Array: (value: mixed) => boolean,
- isGeneratorFunction: (value: mixed) => boolean,
- isGeneratorObject: (value: mixed) => boolean,
- isInt8Array: (value: mixed) => boolean,
- isInt16Array: (value: mixed) => boolean,
- isInt32Array: (value: mixed) => boolean,
- isMap: (value: mixed) => boolean,
- isMapIterator: (value: mixed) => boolean,
- isModuleNamespaceObject: (value: mixed) => boolean,
- isNativeError: (value: mixed) => boolean,
- isNumberObject: (value: mixed) => boolean,
- isPromise: (value: mixed) => boolean,
- isProxy: (value: mixed) => boolean,
- isRegExp: (value: mixed) => boolean,
- isSet: (value: mixed) => boolean,
- isSetIterator: (value: mixed) => boolean,
- isSharedArrayBuffer: (value: mixed) => boolean,
- isStringObject: (value: mixed) => boolean,
- isSymbolObject: (value: mixed) => boolean,
- isTypedArray: (value: mixed) => boolean,
- isUint8Array: (value: mixed) => boolean,
- isUint8ClampedArray: (value: mixed) => boolean,
- isUint16Array: (value: mixed) => boolean,
- isUint32Array: (value: mixed) => boolean,
- isWeakMap: (value: mixed) => boolean,
- isWeakSet: (value: mixed) => boolean,
- isWebAssemblyCompiledModule: (value: mixed) => boolean,
+ isAnyArrayBuffer: (value: unknown) => boolean,
+ isArgumentsObject: (value: unknown) => boolean,
+ isArrayBuffer: (value: unknown) => boolean,
+ isAsyncFunction: (value: unknown) => boolean,
+ isBigInt64Array: (value: unknown) => boolean,
+ isBigUint64Array: (value: unknown) => boolean,
+ isBooleanObject: (value: unknown) => boolean,
+ isBoxedPrimitive: (value: unknown) => boolean,
+ isDataView: (value: unknown) => boolean,
+ isDate: (value: unknown) => boolean,
+ isExternal: (value: unknown) => boolean,
+ isFloat16Array: (value: unknown) => boolean,
+ isFloat32Array: (value: unknown) => boolean,
+ isFloat64Array: (value: unknown) => boolean,
+ isGeneratorFunction: (value: unknown) => boolean,
+ isGeneratorObject: (value: unknown) => boolean,
+ isInt8Array: (value: unknown) => boolean,
+ isInt16Array: (value: unknown) => boolean,
+ isInt32Array: (value: unknown) => boolean,
+ isMap: (value: unknown) => boolean,
+ isMapIterator: (value: unknown) => boolean,
+ isModuleNamespaceObject: (value: unknown) => boolean,
+ isNativeError: (value: unknown) => boolean,
+ isNumberObject: (value: unknown) => boolean,
+ isPromise: (value: unknown) => boolean,
+ isProxy: (value: unknown) => boolean,
+ isRegExp: (value: unknown) => boolean,
+ isSet: (value: unknown) => boolean,
+ isSetIterator: (value: unknown) => boolean,
+ isSharedArrayBuffer: (value: unknown) => boolean,
+ isStringObject: (value: unknown) => boolean,
+ isSymbolObject: (value: unknown) => boolean,
+ isTypedArray: (value: unknown) => boolean,
+ isUint8Array: (value: unknown) => boolean,
+ isUint8ClampedArray: (value: unknown) => boolean,
+ isUint16Array: (value: unknown) => boolean,
+ isUint32Array: (value: unknown) => boolean,
+ isWeakMap: (value: unknown) => boolean,
+ isWeakSet: (value: unknown) => boolean,
+ isWebAssemblyCompiledModule: (value: unknown) => boolean,
...
};
@@ -3291,9 +3961,9 @@ declare module 'util' {
| Modifiers
| $ReadOnlyArray,
text: string,
- options?: $ReadOnly<{
+ options?: Readonly<{
stream?: ?stream$Stream,
- validStream?: ?boolean,
+ validateStream?: ?boolean,
}>,
): string;
}
@@ -3402,6 +4072,20 @@ type zlib$brotliOptions = {
...
};
+type zlib$zstdOptions = {
+ flush?: number,
+ finishFlush?: number,
+ chunkSize?: number,
+ params?: {
+ [number]: boolean | number,
+ ...
+ },
+ maxOutputLength?: number,
+ info?: boolean,
+ dictionary?: Buffer,
+ ...
+};
+
type zlib$syncFn = (
buffer: Buffer | $TypedArray | DataView | ArrayBuffer | string,
options?: zlib$options,
@@ -3579,6 +4263,79 @@ declare module 'zlib' {
BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2: number,
BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES: number,
BROTLI_DECODER_ERROR_UNREACHABL: number,
+
+ ZSTD_COMPRESS: number,
+ ZSTD_DECOMPRESS: number,
+
+ // Default compression level for zstd streams
+ ZSTD_CLEVEL_DEFAULT: number,
+
+ // Keys for zlib$zstdOptions['params']
+ ZSTD_c_compressionLevel: number,
+ ZSTD_c_windowLog: number,
+ ZSTD_c_hashLog: number,
+ ZSTD_c_chainLog: number,
+ ZSTD_c_searchLog: number,
+ ZSTD_c_minMatch: number,
+ ZSTD_c_targetLength: number,
+ ZSTD_c_strategy: number,
+ ZSTD_c_enableLongDistanceMatching: number,
+ ZSTD_c_ldmHashLog: number,
+ ZSTD_c_ldmMinMatch: number,
+ ZSTD_c_ldmBucketSizeLog: number,
+ ZSTD_c_ldmHashRateLog: number,
+ ZSTD_c_contentSizeFlag: number,
+ ZSTD_c_checksumFlag: number,
+ ZSTD_c_dictIDFlag: number,
+ ZSTD_c_nbWorkers: number,
+ ZSTD_c_jobSize: number,
+ ZSTD_c_overlapLog: number,
+
+ // Flush operations
+ ZSTD_e_continue: number,
+ ZSTD_e_flush: number,
+ ZSTD_e_end: number,
+
+ // Values for the ZSTD_c_strategy parameter
+ ZSTD_fast: number,
+ ZSTD_dfast: number,
+ ZSTD_greedy: number,
+ ZSTD_lazy: number,
+ ZSTD_lazy2: number,
+ ZSTD_btlazy2: number,
+ ZSTD_btopt: number,
+ ZSTD_btultra: number,
+ ZSTD_btultra2: number,
+
+ // Error codes
+ ZSTD_error_no_error: number,
+ ZSTD_error_GENERIC: number,
+ ZSTD_error_prefix_unknown: number,
+ ZSTD_error_version_unsupported: number,
+ ZSTD_error_frameParameter_unsupported: number,
+ ZSTD_error_frameParameter_windowTooLarge: number,
+ ZSTD_error_corruption_detected: number,
+ ZSTD_error_checksum_wrong: number,
+ ZSTD_error_literals_headerWrong: number,
+ ZSTD_error_dictionary_corrupted: number,
+ ZSTD_error_dictionary_wrong: number,
+ ZSTD_error_dictionaryCreation_failed: number,
+ ZSTD_error_parameter_unsupported: number,
+ ZSTD_error_parameter_combination_unsupported: number,
+ ZSTD_error_parameter_outOfBound: number,
+ ZSTD_error_tableLog_tooLarge: number,
+ ZSTD_error_maxSymbolValue_tooLarge: number,
+ ZSTD_error_maxSymbolValue_tooSmall: number,
+ ZSTD_error_stabilityCondition_notRespected: number,
+ ZSTD_error_stage_wrong: number,
+ ZSTD_error_init_missing: number,
+ ZSTD_error_memory_allocation: number,
+ ZSTD_error_workSpace_tooSmall: number,
+ ZSTD_error_dstSize_tooSmall: number,
+ ZSTD_error_srcSize_wrong: number,
+ ZSTD_error_dstBuffer_null: number,
+ ZSTD_error_noForwardProgress_destFull: number,
+ ZSTD_error_noForwardProgress_inputEmpty: number,
...
};
declare var codes: {
@@ -3598,6 +4355,8 @@ declare module 'zlib' {
}
declare class BrotliCompress extends Zlib {}
declare class BrotliDecompress extends Zlib {}
+ declare class ZstdCompress extends Zlib {}
+ declare class ZstdDecompress extends Zlib {}
declare class Deflate extends Zlib {}
declare class Inflate extends Zlib {}
declare class Gzip extends Zlib {}
@@ -3618,6 +4377,10 @@ declare module 'zlib' {
declare function createGzip(options?: zlib$options): Gzip;
declare function createGunzip(options?: zlib$options): Gunzip;
declare function createUnzip(options?: zlib$options): Unzip;
+ declare function createZstdCompress(options?: zlib$zstdOptions): ZstdCompress;
+ declare function createZstdDecompress(
+ options?: zlib$zstdOptions,
+ ): ZstdDecompress;
declare var brotliCompress: zlib$brotliAsyncFn;
declare var brotliCompressSync: zlib$brotliSyncFn;
declare var brotliDeompress: zlib$brotliAsyncFn;
@@ -3965,18 +4728,18 @@ declare class Process extends events$EventEmitter {
emitWarning(warning: string | Error): void;
emitWarning(
warning: string,
- typeOrCtor: string | ((...empty) => mixed),
+ typeOrCtor: string | ((...empty) => unknown),
): void;
emitWarning(
warning: string,
type: string,
- codeOrCtor: string | ((...empty) => mixed),
+ codeOrCtor: string | ((...empty) => unknown),
): void;
emitWarning(
warning: string,
type: string,
code: string,
- ctor?: (...empty) => mixed,
+ ctor?: (...empty) => unknown,
): void;
execArgv: Array;
execPath: string;
@@ -4006,7 +4769,7 @@ declare class Process extends events$EventEmitter {
},
rss: () => number,
};
- nextTick: (cb: (...T) => mixed, ...T) => void;
+ nextTick: (cb: (...T) => unknown, ...T) => void;
pid: number;
platform: string;
release: {
@@ -4047,7 +4810,7 @@ declare var __filename: string;
declare var __dirname: string;
declare function setImmediate(
- callback: (...args: Array) => mixed,
+ callback: (...args: Array) => unknown,
...args: Array
): Object;
declare function clearImmediate(immediateObject: any): Object;
diff --git a/flow-typed/npm/@octokit/rest_v22.x.x.js b/flow-typed/npm/@octokit/rest_v22.x.x.js
index 9c193173e2cb..fafa59f524c5 100644
--- a/flow-typed/npm/@octokit/rest_v22.x.x.js
+++ b/flow-typed/npm/@octokit/rest_v22.x.x.js
@@ -53,7 +53,7 @@ declare module '@octokit/rest' {
repo: string,
asset_id: string,
...
- }) => Promise,
+ }) => Promise,
}>;
}
diff --git a/flow-typed/npm/@react-native-community/cli-server-api_v19.x.x.js b/flow-typed/npm/@react-native-community/cli-server-api_v19.x.x.js
index b8bcc3c40931..c6307e1b13cd 100644
--- a/flow-typed/npm/@react-native-community/cli-server-api_v19.x.x.js
+++ b/flow-typed/npm/@react-native-community/cli-server-api_v19.x.x.js
@@ -32,7 +32,7 @@ declare module '@react-native-community/cli-server-api' {
server: ws$WebSocketServer,
broadcast: (
method: string,
- params?: Record | null,
+ params?: Record | null,
) => void,
},
eventsSocketEndpoint: {
diff --git a/flow-typed/npm/babel-traverse_v7.x.x.js b/flow-typed/npm/babel-traverse_v7.x.x.js
index 1cd8df07b182..1caf444f5298 100644
--- a/flow-typed/npm/babel-traverse_v7.x.x.js
+++ b/flow-typed/npm/babel-traverse_v7.x.x.js
@@ -53,7 +53,7 @@ declare module '@babel/traverse' {
constructor(
scope: Scope,
- opts: TraverseOptions,
+ opts: TraverseOptions,
state: any,
parentPath: NodePath<>,
): TraversalContext;
@@ -298,12 +298,12 @@ declare module '@babel/traverse' {
parent: BabelNode;
hub: HubInterface;
contexts: Array;
- data: {[key: string]: mixed} | null;
+ data: {[key: string]: unknown} | null;
shouldSkip: boolean;
shouldStop: boolean;
removed: boolean;
- state: mixed;
- +opts: $ReadOnly> | null;
+ state: unknown;
+ +opts: $ReadOnly> | null;
skipKeys: null | {[key: string]: boolean};
parentPath: ?NodePath<>;
context: TraversalContext;
@@ -338,7 +338,7 @@ declare module '@babel/traverse' {
getScope(scope: Scope): Scope;
setData(key: string, val: TVal): TVal;
- getData(key: string, def?: TVal): TVal;
+ getData(key: string, def?: TVal): TVal;
buildCodeFrameError(
msg: string,
@@ -1881,8 +1881,8 @@ declare module '@babel/traverse' {
declare export var visitors: Visitors;
declare export type Cache = {
- path: $ReadOnlyWeakMap,
- scope: $ReadOnlyWeakMap,
+ path: $ReadOnlyWeakMap,
+ scope: $ReadOnlyWeakMap,
clear(): void,
clearPath(): void,
clearScope(): void,
diff --git a/flow-typed/npm/babel_v7.x.x.js b/flow-typed/npm/babel_v7.x.x.js
index 53953323b240..3e574ffb4736 100644
--- a/flow-typed/npm/babel_v7.x.x.js
+++ b/flow-typed/npm/babel_v7.x.x.js
@@ -304,9 +304,9 @@ declare module '@babel/core' {
declare class Store {
constructor(): Store;
- setDynamic(key: string, fn: () => mixed): void;
- set(key: string, val: mixed): void;
- get(key: string): mixed;
+ setDynamic(key: string, fn: () => unknown): void;
+ set(key: string, val: unknown): void;
+ get(key: string): unknown;
}
declare export class File extends Store {
@@ -367,7 +367,7 @@ declare module '@babel/core' {
transform(): TransformResult<>;
- wrap(code: string, callback: () => mixed): TransformResult<>;
+ wrap(code: string, callback: () => unknown): TransformResult<>;
addCode(code: string): void;
@@ -394,7 +394,7 @@ declare module '@babel/core' {
declare export type PluginObj = {
name?: string,
- inherits?: mixed,
+ inherits?: unknown,
maniuplateOptions?: (
opts: BabelCoreOptions,
parserOpts: ParserOptions,
@@ -411,7 +411,7 @@ declare module '@babel/core' {
// but have not yet been executed to call functions with options.
declare export type UnloadedDescriptor = {
name: string | void,
- value: PluginObj | (() => PluginObj),
+ value: PluginObj | (() => PluginObj),
options: EntryOptions,
dirname: string,
alias: string,
@@ -423,7 +423,7 @@ declare module '@babel/core' {
};
declare export class ConfigItem {
- +value: PluginObj | (() => PluginObj);
+ +value: PluginObj | (() => PluginObj);
+options: EntryOptions;
+dirname: string;
+name: string | void;
@@ -924,8 +924,8 @@ declare module '@babel/core' {
|};
declare type TransformCallback =
- | ((Error, null) => mixed)
- | ((null, TransformResult | null) => mixed);
+ | ((Error, null) => unknown)
+ | ((null, TransformResult | null) => unknown);
/**
* Transforms the passed in code. Calling a callback with an object with the generated code, source map, and AST.
@@ -1059,20 +1059,20 @@ declare module '@babel/core' {
declare export type ResolvedConfig = {
options: BabelCoreOptions,
- passes: Array | (() => PluginObj)>>,
+ passes: Array | (() => PluginObj)>>,
};
declare export function loadOptions(
- options?: mixed,
+ options?: unknown,
callback:
- | ((error: Error, null) => mixed)
- | ((null, config: ResolvedConfig | null) => mixed),
+ | ((error: Error, null) => unknown)
+ | ((null, config: ResolvedConfig | null) => unknown),
): void;
declare export function loadOptionsSync(
- options?: mixed,
+ options?: unknown,
): ResolvedConfig | null;
declare export function loadOptionsAsync(
- options?: mixed,
+ options?: unknown,
): Promise;
// For now
@@ -1090,16 +1090,16 @@ declare module '@babel/core' {
}
declare export function loadPartialConfig(
- options?: mixed,
+ options?: unknown,
callback:
- | ((error: Error, null) => mixed)
- | ((null, config: PartialConfig | null) => mixed),
+ | ((error: Error, null) => unknown)
+ | ((null, config: PartialConfig | null) => unknown),
): void;
declare export function loadPartialConfigSync(
- options?: mixed,
+ options?: unknown,
): PartialConfig | null;
declare export function loadPartialConfigAsync(
- options?: mixed,
+ options?: unknown,
): Promise;
}
@@ -1189,7 +1189,7 @@ declare module '@babel/generator' {
jsecsOption?: {...},
decoratorsBeforeExport?: boolean,
- recordAndTupleSyntaxType?: mixed,
+ recordAndTupleSyntaxType?: unknown,
/**
* Enable generating source maps
@@ -1283,13 +1283,13 @@ declare module '@babel/template' {
(tpl: string, opts: ?PublicOpts): (?PublicReplacements) => T,
// Building from a template literal produces an AST builder function by default.
- (tpl: Array, ...args: Array): (?PublicReplacements) => T,
+ (tpl: Array, ...args: Array): (?PublicReplacements) => T,
// Allow users to explicitly create templates that produce ASTs, skipping
// the need for an intermediate function.
ast: {
(tpl: string, opts: ?PublicOpts): T,
- (tpl: Array, ...args: Array): T,
+ (tpl: Array, ...args: Array): T,
},
};
@@ -1321,14 +1321,17 @@ declare module '@babel/template' {
// Building from a template literal produces an AST builder function by default.
(
tpl: Array,
- ...args: Array
+ ...args: Array
): (?PublicReplacements) => Statement | Array,
// Allow users to explicitly create templates that produce ASTs, skipping
// the need for an intermediate function.
ast: {
(tpl: string, opts: ?PublicOpts): Statement | Array,
- (tpl: Array, ...args: Array): Statement | Array,
+ (
+ tpl: Array,
+ ...args: Array
+ ): Statement | Array,
},
};
diff --git a/flow-typed/npm/chrome-launcher_v0.15.x.js b/flow-typed/npm/chrome-launcher_v0.15.x.js
index b72a756ab929..4f7a3fef11a2 100644
--- a/flow-typed/npm/chrome-launcher_v0.15.x.js
+++ b/flow-typed/npm/chrome-launcher_v0.15.x.js
@@ -16,7 +16,7 @@ declare module 'chrome-launcher' {
declare export type Options = {
startingUrl?: string,
chromeFlags?: Array,
- prefs?: mixed,
+ prefs?: unknown,
port?: number,
handleSIGINT?: boolean,
chromePath?: string,
diff --git a/flow-typed/npm/chromium-edge-launcher_v0.2.x.js b/flow-typed/npm/chromium-edge-launcher_v0.2.x.js
index ab8d7e0313ba..0b74594465da 100644
--- a/flow-typed/npm/chromium-edge-launcher_v0.2.x.js
+++ b/flow-typed/npm/chromium-edge-launcher_v0.2.x.js
@@ -16,7 +16,7 @@ declare module 'chromium-edge-launcher' {
declare export type Options = {
startingUrl?: string,
edgeFlags?: Array,
- prefs?: mixed,
+ prefs?: unknown,
port?: number,
handleSIGINT?: boolean,
edgePath?: string,
diff --git a/flow-typed/npm/connect_v3.x.x.js b/flow-typed/npm/connect_v3.x.x.js
index 0195559e06ff..b76ac5582952 100644
--- a/flow-typed/npm/connect_v3.x.x.js
+++ b/flow-typed/npm/connect_v3.x.x.js
@@ -13,7 +13,7 @@ declare module 'connect' {
declare export type ServerHandle = HandleFunction | http.Server;
- declare type NextFunction = (err?: mixed) => void;
+ declare type NextFunction = (err?: unknown) => void;
declare export type NextHandleFunction = (
req: IncomingMessage,
diff --git a/flow-typed/npm/debug_v4.4.x.js b/flow-typed/npm/debug_v4.4.x.js
index fea4ad05c4d5..bc1ef24062b3 100644
--- a/flow-typed/npm/debug_v4.4.x.js
+++ b/flow-typed/npm/debug_v4.4.x.js
@@ -12,15 +12,15 @@
declare module 'debug' {
declare interface Formatters {
- [formatter: string]: (v: mixed) => string;
+ [formatter: string]: (v: unknown) => string;
}
declare type Debugger = {|
- (format: mixed, ...args: Array): void,
+ (format: unknown, ...args: Array): void,
color: string,
diff: number,
enabled: boolean,
- log: (format: mixed, ...args: Array) => mixed,
+ log: (format: unknown, ...args: Array) => unknown,
namespace: string,
destroy: () => boolean,
extend: (namespace: string, delimiter?: string) => Debugger,
@@ -28,12 +28,12 @@ declare module 'debug' {
declare type Debug = {|
(namespace: string): Debugger,
- coerce: (val: mixed) => mixed,
+ coerce: (val: unknown) => unknown,
disable: () => string,
enable: (namespaces: string) => void,
enabled: (namespaces: string) => boolean,
- formatArgs: (args: Array) => void,
- log: (format: mixed, ...args: Array) => mixed,
+ formatArgs: (args: Array) => void,
+ log: (format: unknown, ...args: Array) => unknown,
selectColor: (namespace: string) => string | number,
// this should be of type require('ms') but it doesn't play nicely with eslint
// unless we add ms to dependencies, which we don't want to do
diff --git a/flow-typed/npm/deep-equal_v1.x.x.js b/flow-typed/npm/deep-equal_v1.x.x.js
index 215eb356778f..bcb809abed34 100644
--- a/flow-typed/npm/deep-equal_v1.x.x.js
+++ b/flow-typed/npm/deep-equal_v1.x.x.js
@@ -10,8 +10,8 @@
declare module 'deep-equal' {
declare module.exports: (
- actual: mixed,
- expected: mixed,
+ actual: unknown,
+ expected: unknown,
options?: {strict: boolean},
) => boolean;
}
diff --git a/flow-typed/npm/glob_v7.x.x.js b/flow-typed/npm/glob_v7.x.x.js
deleted file mode 100644
index 4bd3df6cb984..000000000000
--- a/flow-typed/npm/glob_v7.x.x.js
+++ /dev/null
@@ -1,79 +0,0 @@
-// flow-typed signature: d2a519d7d007e9ba3e5bf2ac3ff76eca
-// flow-typed version: f243e51ed7/glob_v7.x.x/flow_>=v0.104.x
-
-declare module "glob" {
- declare type MinimatchOptions = {|
- debug?: boolean,
- nobrace?: boolean,
- noglobstar?: boolean,
- dot?: boolean,
- noext?: boolean,
- nocase?: boolean,
- nonull?: boolean,
- matchBase?: boolean,
- nocomment?: boolean,
- nonegate?: boolean,
- flipNegate?: boolean
- |};
-
- declare type Options = {|
- ...MinimatchOptions,
- cwd?: string,
- root?: string,
- nomount?: boolean,
- mark?: boolean,
- nosort?: boolean,
- stat?: boolean,
- silent?: boolean,
- strict?: boolean,
- cache?: { [path: string]: boolean | "DIR" | "FILE" | $ReadOnlyArray, ... },
- statCache?: { [path: string]: boolean | { isDirectory(): boolean, ... } | void, ... },
- symlinks?: { [path: string]: boolean | void, ... },
- realpathCache?: { [path: string]: string, ... },
- sync?: boolean,
- nounique?: boolean,
- nodir?: boolean,
- ignore?: string | $ReadOnlyArray,
- follow?: boolean,
- realpath?: boolean,
- absolute?: boolean
- |};
-
- /**
- * Called when an error occurs, or matches are found
- * err
- * matches: filenames found matching the pattern
- */
- declare type CallBack = (err: ?Error, matches: Array) => void;
-
- declare class Glob extends events$EventEmitter {
- constructor(pattern: string): this;
- constructor(pattern: string, callback: CallBack): this;
- constructor(pattern: string, options: Options, callback: CallBack): this;
-
- minimatch: {...};
- options: Options;
- aborted: boolean;
- cache: { [path: string]: boolean | "DIR" | "FILE" | $ReadOnlyArray, ... };
- statCache: { [path: string]: boolean | { isDirectory(): boolean, ... } | void, ... };
- symlinks: { [path: string]: boolean | void, ... };
- realpathCache: { [path: string]: string, ... };
- found: Array;
-
- pause(): void;
- resume(): void;
- abort(): void;
- }
-
- declare class GlobModule {
- Glob: Class;
-
- (pattern: string, callback: CallBack): void;
- (pattern: string, options: Options, callback: CallBack): void;
-
- hasMagic(pattern: string, options?: Options): boolean;
- sync(pattern: string, options?: Options): Array;
- }
-
- declare module.exports: GlobModule;
-}
diff --git a/flow-typed/npm/jest-diff_v29.x.x.js b/flow-typed/npm/jest-diff_v29.x.x.js
index d1cdce568656..a3cc9d9130be 100644
--- a/flow-typed/npm/jest-diff_v29.x.x.js
+++ b/flow-typed/npm/jest-diff_v29.x.x.js
@@ -32,8 +32,8 @@ declare module 'jest-diff' {
};
declare export function diff(
- a: mixed,
- b: mixed,
+ a: unknown,
+ b: unknown,
options?: DiffOptions,
): string | null;
}
diff --git a/flow-typed/npm/jest-snapshot_v29.x.x.js b/flow-typed/npm/jest-snapshot_v29.x.x.js
index fbae1235a572..58fa3fef7c8c 100644
--- a/flow-typed/npm/jest-snapshot_v29.x.x.js
+++ b/flow-typed/npm/jest-snapshot_v29.x.x.js
@@ -33,7 +33,7 @@ declare module 'jest-snapshot' {
declare export function isSnapshotPath(path: string): boolean;
- type LocalRequire = (module: string) => mixed;
+ type LocalRequire = (module: string) => unknown;
declare export function buildSnapshotResolver(
config: ProjectConfig,
diff --git a/flow-typed/npm/jest.js b/flow-typed/npm/jest.js
index 29974483804f..1bfe9618ce6c 100644
--- a/flow-typed/npm/jest.js
+++ b/flow-typed/npm/jest.js
@@ -13,7 +13,7 @@
// MODIFIED: Added ESLint suppression comment - no-unused-vars doesn't understand declaration files
-type JestMockFn, TReturn> = {
+type JestMockFn, TReturn> = {
(...args: TArguments): TReturn,
/**
* An object for introspecting mock calls
@@ -39,7 +39,7 @@ type JestMockFn, TReturn> = {
/**
* An array that contains the contexts for all calls of the mock function.
*/
- contexts: Array,
+ contexts: Array,
/**
* An array that contains all the object results that have been
* returned by this mock function call
@@ -129,17 +129,17 @@ type JestAsymmetricEqualityType = {
/**
* A custom Jasmine equality tester
*/
- asymmetricMatch(value: mixed): boolean,
+ asymmetricMatch(value: unknown): boolean,
...
};
type JestCallsType = {
- allArgs(): mixed,
- all(): mixed,
+ allArgs(): unknown,
+ all(): unknown,
any(): boolean,
count(): number,
- first(): mixed,
- mostRecent(): mixed,
+ first(): unknown,
+ mostRecent(): unknown,
reset(): void,
...
};
@@ -881,7 +881,7 @@ type JestObjectType = {
* implementation.
*/
// MODIFIED: Added defaults to type arguments.
- fn = $ReadOnlyArray, TReturn = any>(
+ fn = $ReadOnlyArray, TReturn = any>(
implementation?: (...args: TArguments) => TReturn,
): JestMockFn,
/**
@@ -1005,22 +1005,22 @@ type JestDoneFn = {
/** Runs this function after every test inside this context */
declare function afterEach(
- fn: (done: JestDoneFn) => ?Promise,
+ fn: (done: JestDoneFn) => ?Promise,
timeout?: number,
): void;
/** Runs this function before every test inside this context */
declare function beforeEach(
- fn: (done: JestDoneFn) => ?Promise,
+ fn: (done: JestDoneFn) => ?Promise,
timeout?: number,
): void;
/** Runs this function after all tests have finished inside this context */
declare function afterAll(
- fn: (done: JestDoneFn) => ?Promise,
+ fn: (done: JestDoneFn) => ?Promise,
timeout?: number,
): void;
/** Runs this function before any tests have started inside this context */
declare function beforeAll(
- fn: (done: JestDoneFn) => ?Promise,
+ fn: (done: JestDoneFn) => ?Promise,
timeout?: number,
): void;
@@ -1045,11 +1045,11 @@ declare var describe: {
*/
each(
...table:
- | $ReadOnlyArray<$ReadOnlyArray | mixed>
+ | $ReadOnlyArray<$ReadOnlyArray | unknown>
| [$ReadOnlyArray, string]
): (
name: JestTestName,
- fn?: (...args: $ReadOnlyArray) => ?Promise,
+ fn?: (...args: $ReadOnlyArray) => ?Promise,
timeout?: number,
) => void,
...
@@ -1066,7 +1066,7 @@ declare var it: {
*/
(
name: JestTestName,
- fn?: (done: JestDoneFn) => ?Promise,
+ fn?: (done: JestDoneFn) => ?Promise,
timeout?: number,
): void,
/**
@@ -1079,14 +1079,14 @@ declare var it: {
only: {
(
name: JestTestName,
- fn?: (done: JestDoneFn) => ?Promise,
+ fn?: (done: JestDoneFn) => ?Promise,
timeout?: number,
): void,
each(
- ...table: Array | mixed> | [Array, string]
+ ...table: Array | unknown> | [Array, string]
): (
name: JestTestName,
- fn?: (...args: Array) => ?Promise,
+ fn?: (...args: Array) => ?Promise,
timeout?: number,
) => void,
},
@@ -1100,14 +1100,14 @@ declare var it: {
skip: {
(
name: JestTestName,
- fn?: (done: JestDoneFn) => ?Promise,
+ fn?: (done: JestDoneFn) => ?Promise,
timeout?: number,
): void,
each(
- ...table: Array | mixed> | [Array, string]
+ ...table: Array | unknown> | [Array, string]
): (
name: JestTestName,
- fn?: (...args: Array) => ?Promise,
+ fn?: (...args: Array) => ?Promise,
timeout?: number,
) => void,
},
@@ -1126,7 +1126,7 @@ declare var it: {
*/
concurrent(
name: JestTestName,
- fn?: (done: JestDoneFn) => ?Promise,
+ fn?: (done: JestDoneFn) => ?Promise,
timeout?: number,
): void,
/**
@@ -1136,11 +1136,11 @@ declare var it: {
*/
each(
...table:
- | $ReadOnlyArray<$ReadOnlyArray | mixed>
+ | $ReadOnlyArray<$ReadOnlyArray | unknown>
| [$ReadOnlyArray, string]
): (
name: JestTestName,
- fn?: (...args: Array) => ?Promise,
+ fn?: (...args: Array) => ?Promise,
timeout?: number,
) => void,
...
@@ -1148,7 +1148,7 @@ declare var it: {
declare function fit(
name: JestTestName,
- fn: (done: JestDoneFn) => ?Promise,
+ fn: (done: JestDoneFn) => ?Promise,
timeout?: number,
): void;
/** An individual test unit */
@@ -1249,16 +1249,16 @@ declare var expect: {
addSnapshotSerializer(pluginModule: JestPrettyFormatPlugin): void,
assertions(expectedAssertions: number): void,
hasAssertions(): void,
- any(value: mixed): JestAsymmetricEqualityType,
+ any(value: unknown): JestAsymmetricEqualityType,
anything(): any,
// MODIFIED: Array -> $ReadOnlyArray
- arrayContaining(value: $ReadOnlyArray): Array,
+ arrayContaining(value: $ReadOnlyArray): Array,
objectContaining(value: Object): Object,
/** Matches any received string that contains the exact expected string. */
stringContaining(value: string): string,
stringMatching(value: string | RegExp): string,
not: {
- arrayContaining: (value: $ReadOnlyArray) => Array,
+ arrayContaining: (value: $ReadOnlyArray) => Array,
objectContaining: (value: {...}) => Object,
stringContaining: (value: string) => string,
stringMatching: (value: string | RegExp) => string,
@@ -1269,7 +1269,7 @@ declare var expect: {
// TODO handle return type
// http://jasmine.github.io/2.4/introduction.html#section-Spies
-declare function spyOn(value: mixed, method: string): Object;
+declare function spyOn(value: unknown, method: string): Object;
/** Holds all functions related to manipulating test runner */
declare var jest: JestObjectType;
@@ -1280,9 +1280,9 @@ declare var jest: JestObjectType;
*/
declare var jasmine: {
DEFAULT_TIMEOUT_INTERVAL: number,
- any(value: mixed): JestAsymmetricEqualityType,
+ any(value: unknown): JestAsymmetricEqualityType,
anything(): any,
- arrayContaining(value: Array): Array,
+ arrayContaining(value: Array): Array,
clock(): JestClockType,
createSpy(name: string): JestSpyType,
createSpyObj(
diff --git a/flow-typed/npm/listr2_v8.x.x.js b/flow-typed/npm/listr2_v8.x.x.js
index 02ec1761408f..6bee2c703ee0 100644
--- a/flow-typed/npm/listr2_v8.x.x.js
+++ b/flow-typed/npm/listr2_v8.x.x.js
@@ -8,7 +8,7 @@
declare module 'listr2' {
declare export type TaskResult<
ContextT = {__proto__: null},
- ReturnT = mixed,
+ ReturnT = unknown,
> =
| ReturnT
| Promise
@@ -35,7 +35,7 @@ declare module 'listr2' {
declare export type TaskSpec<
ContextT = {__proto__: null},
- ReturnT = mixed,
+ ReturnT = unknown,
> = {
title: string,
task: TaskFn,
diff --git a/flow-typed/npm/listr_v14.x.x.js b/flow-typed/npm/listr_v14.x.x.js
index 2e8e52ac6d52..bc2a6bc7c19d 100644
--- a/flow-typed/npm/listr_v14.x.x.js
+++ b/flow-typed/npm/listr_v14.x.x.js
@@ -8,7 +8,7 @@
declare module 'listr' {
declare export type TaskResult<
ContextT = {__proto__: null},
- ReturnT = mixed,
+ ReturnT = unknown,
> =
| ReturnT
| Promise
@@ -35,7 +35,7 @@ declare module 'listr' {
declare export type TaskSpec<
ContextT = {__proto__: null},
- ReturnT = mixed,
+ ReturnT = unknown,
> = {
title: string,
task: TaskFn,
diff --git a/flow-typed/npm/node-fetch_v2.x.x.js b/flow-typed/npm/node-fetch_v2.x.x.js
index 81441ccd0bc3..5b6b9cc51b46 100644
--- a/flow-typed/npm/node-fetch_v2.x.x.js
+++ b/flow-typed/npm/node-fetch_v2.x.x.js
@@ -20,8 +20,8 @@ declare module 'node-fetch' {
+aborted: boolean,
+onabort: (event?: {...}) => void,
- +addEventListener: (name: string, cb: () => mixed) => void,
- +removeEventListener: (name: string, cb: () => mixed) => void,
+ +addEventListener: (name: string, cb: () => unknown) => void,
+ +removeEventListener: (name: string, cb: () => unknown) => void,
+dispatchEvent: (event: {...}) => void,
...
};
diff --git a/flow-typed/npm/pretty-format_v29.x.x.js b/flow-typed/npm/pretty-format_v29.x.x.js
index 1fd2dfe577f0..a13951717f0f 100644
--- a/flow-typed/npm/pretty-format_v29.x.x.js
+++ b/flow-typed/npm/pretty-format_v29.x.x.js
@@ -4,7 +4,7 @@
* @flow strict
* @format
*/
-declare type Print = (value: mixed) => string;
+declare type Print = (value: unknown) => string;
declare type Indent = (value: string) => string;
declare type PluginOptions = {
edgeSpacing: string,
@@ -22,17 +22,17 @@ declare type Colors = {
declare type PrettyFormatPlugin =
| {
print: (
- value: mixed,
+ value: unknown,
print?: ?Print,
indent?: ?Indent,
options?: ?PluginOptions,
colors?: ?Colors,
) => string,
- test: (value: mixed) => boolean,
+ test: (value: unknown) => boolean,
}
| {
- serialize: (value: mixed) => string,
- test: (value: mixed) => boolean,
+ serialize: (value: unknown) => string,
+ test: (value: unknown) => boolean,
};
declare module 'pretty-format' {
@@ -41,7 +41,7 @@ declare module 'pretty-format' {
| null
| void;
declare export function format(
- value: mixed,
+ value: unknown,
options?: ?{
callToJSON?: ?boolean,
compareKeys?: CompareKeys,
diff --git a/flow-typed/npm/promise_v8.x.x.js b/flow-typed/npm/promise_v8.x.x.js
index f7eb92e4d12d..7358622e3bea 100644
--- a/flow-typed/npm/promise_v8.x.x.js
+++ b/flow-typed/npm/promise_v8.x.x.js
@@ -19,10 +19,10 @@ declare module 'promise/setimmediate/rejection-tracking' {
declare module.exports: {
enable: (
options?: ?{
- whitelist?: ?Array