mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
11869c68d9 |
@@ -9,3 +9,12 @@ end_of_line = lf
|
||||
insert_final_newline = true
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
[*.gradle]
|
||||
indent_size = 4
|
||||
|
||||
[*.kts]
|
||||
indent_size = 4
|
||||
|
||||
[BUCK]
|
||||
indent_size = 4
|
||||
|
||||
+1
-1
@@ -104,4 +104,4 @@ untyped-import
|
||||
untyped-type-import
|
||||
|
||||
[version]
|
||||
^0.275.0
|
||||
^0.274.2
|
||||
|
||||
@@ -14,23 +14,23 @@ runs:
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: hermes-workspace
|
||||
path: 'C:\tmp\hermes'
|
||||
path: 'D:\tmp\hermes'
|
||||
- name: Set up workspace
|
||||
shell: powershell
|
||||
run: |
|
||||
mkdir -p C:\tmp\hermes\osx-bin
|
||||
mkdir -p D:\tmp\hermes\osx-bin
|
||||
mkdir -p .\packages\react-native\sdks\hermes
|
||||
cp -r -Force C:\tmp\hermes\hermes\* .\packages\react-native\sdks\hermes\.
|
||||
cp -r -Force D:\tmp\hermes\hermes\* .\packages\react-native\sdks\hermes\.
|
||||
cp -r -Force .\packages\react-native\sdks\hermes-engine\utils\* .\packages\react-native\sdks\hermes\.
|
||||
- name: Windows cache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
key: v3-hermes-${{ github.job }}-windows-${{ inputs.hermes-version }}-${{ inputs.react-native-version }}
|
||||
path: |
|
||||
C:\tmp\hermes\win64-bin\
|
||||
C:\tmp\hermes\hermes\icu\
|
||||
C:\tmp\hermes\hermes\deps\
|
||||
C:\tmp\hermes\hermes\build_release\
|
||||
D:\tmp\hermes\win64-bin\
|
||||
D:\tmp\hermes\hermes\icu\
|
||||
D:\tmp\hermes\hermes\deps\
|
||||
D:\tmp\hermes\hermes\build_release\
|
||||
- name: setup-msbuild
|
||||
uses: microsoft/setup-msbuild@v1.3.2
|
||||
- name: Set up workspace
|
||||
@@ -83,4 +83,4 @@ runs:
|
||||
uses: actions/upload-artifact@v4.3.4
|
||||
with:
|
||||
name: hermes-win64-bin
|
||||
path: C:\tmp\hermes\win64-bin\
|
||||
path: D:\tmp\hermes\win64-bin\
|
||||
|
||||
@@ -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
|
||||
@@ -4,7 +4,7 @@ inputs:
|
||||
node-version:
|
||||
description: 'The node.js version to use'
|
||||
required: false
|
||||
default: '22.14.0'
|
||||
default: '22'
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
|
||||
@@ -48,14 +48,6 @@ runs:
|
||||
- name: Print third-party folder
|
||||
shell: bash
|
||||
run: ls -lR /tmp/third-party
|
||||
- name: Download React Native Prebuilds
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: ReactCore${{ inputs.flavor }}.xcframework.tar.gz
|
||||
path: /tmp/ReactCore
|
||||
- name: Print ReactCore folder
|
||||
shell: bash
|
||||
run: ls -lR /tmp/ReactCore
|
||||
- name: Install iOS dependencies - Configuration ${{ inputs.flavor }};
|
||||
shell: bash
|
||||
run: |
|
||||
@@ -81,7 +73,6 @@ runs:
|
||||
TARBALL_FILENAME=$(node ../../packages/react-native/scripts/hermes/get-tarball-name.js --buildType "$BUILD_TYPE")
|
||||
export HERMES_ENGINE_TARBALL_PATH="$HERMES_WS_DIR/hermes-runtime-darwin/$TARBALL_FILENAME"
|
||||
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"
|
||||
|
||||
yarn bootstrap ios "${args[@]}" | cat
|
||||
|
||||
|
||||
@@ -94,14 +94,6 @@ runs:
|
||||
- name: Print third-party folder
|
||||
shell: bash
|
||||
run: ls -lR /tmp/third-party
|
||||
- name: Download React Native Prebuilds
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: ReactCore${{ inputs.flavor }}.xcframework.tar.gz
|
||||
path: /tmp/ReactCore
|
||||
- name: Print ReactCore folder
|
||||
shell: bash
|
||||
run: ls -lR /tmp/ReactCore
|
||||
- name: Setup xcode build cache
|
||||
uses: ./.github/actions/setup-xcode-build-cache
|
||||
with:
|
||||
@@ -113,13 +105,12 @@ runs:
|
||||
shell: bash
|
||||
run: |
|
||||
export HERMES_ENGINE_TARBALL_PATH=$HERMES_ENGINE_TARBALL_PATH
|
||||
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
|
||||
export USE_FRAMEWORKS=dynamic
|
||||
fi
|
||||
|
||||
export RCT_USE_LOCAL_RN_DEP="/tmp/third-party/ReactNativeDependencies${{ inputs.flavor }}.xcframework.tar.gz"
|
||||
cd packages/rn-tester
|
||||
|
||||
bundle install
|
||||
|
||||
@@ -2,8 +2,6 @@ name: yarn-install
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: Setup node.js
|
||||
uses: ./.github/actions/setup-node
|
||||
- name: Install dependencies
|
||||
shell: bash
|
||||
run: |
|
||||
|
||||
@@ -38,7 +38,7 @@ describe('#verifyArtifactsAreOnMaven', () => {
|
||||
|
||||
expect(mockSleep).toHaveBeenCalledTimes(1);
|
||||
expect(mockFetch).toHaveBeenCalledWith(
|
||||
'https://repo1.maven.org/maven2/com/facebook/react/react-native-artifacts/0.78.1/react-native-artifacts-0.78.1.pom',
|
||||
'https://repo1.maven.org/maven2/com/facebook/react/react-native-artifacts/0.78.1',
|
||||
);
|
||||
});
|
||||
|
||||
@@ -55,7 +55,7 @@ describe('#verifyArtifactsAreOnMaven', () => {
|
||||
|
||||
expect(mockSleep).toHaveBeenCalledTimes(1);
|
||||
expect(mockFetch).toHaveBeenCalledWith(
|
||||
'https://repo1.maven.org/maven2/com/facebook/react/react-native-artifacts/0.78.1/react-native-artifacts-0.78.1.pom',
|
||||
'https://repo1.maven.org/maven2/com/facebook/react/react-native-artifacts/0.78.1',
|
||||
);
|
||||
});
|
||||
|
||||
@@ -67,7 +67,7 @@ describe('#verifyArtifactsAreOnMaven', () => {
|
||||
|
||||
expect(mockSleep).toHaveBeenCalledTimes(0);
|
||||
expect(mockFetch).toHaveBeenCalledWith(
|
||||
'https://repo1.maven.org/maven2/com/facebook/react/react-native-artifacts/0.78.1/react-native-artifacts-0.78.1.pom',
|
||||
'https://repo1.maven.org/maven2/com/facebook/react/react-native-artifacts/0.78.1',
|
||||
);
|
||||
});
|
||||
|
||||
@@ -81,7 +81,7 @@ describe('#verifyArtifactsAreOnMaven', () => {
|
||||
expect(mockSleep).toHaveBeenCalledTimes(90);
|
||||
expect(mockExit).toHaveBeenCalledWith(1);
|
||||
expect(mockFetch).toHaveBeenCalledWith(
|
||||
'https://repo1.maven.org/maven2/com/facebook/react/react-native-artifacts/0.78.1/react-native-artifacts-0.78.1.pom',
|
||||
'https://repo1.maven.org/maven2/com/facebook/react/react-native-artifacts/0.78.1',
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -13,14 +13,13 @@ const SLEEP_S = 60; // 1 minute
|
||||
const MAX_RETRIES = 90; // 90 attempts. Waiting between attempt: 1 min. Total time: 90 min.
|
||||
const ARTIFACT_URL =
|
||||
'https://repo1.maven.org/maven2/com/facebook/react/react-native-artifacts/';
|
||||
const ARTIFACT_NAME = 'react-native-artifacts-';
|
||||
|
||||
async function verifyArtifactsAreOnMaven(version, retries = MAX_RETRIES) {
|
||||
if (version.startsWith('v')) {
|
||||
version = version.substring(1);
|
||||
}
|
||||
|
||||
const artifactUrl = `${ARTIFACT_URL}${version}/${ARTIFACT_NAME}${version}.pom`;
|
||||
const artifactUrl = `${ARTIFACT_URL}${version}`;
|
||||
for (let currentAttempt = 1; currentAttempt <= retries; currentAttempt++) {
|
||||
const response = await fetch(artifactUrl);
|
||||
|
||||
|
||||
@@ -18,10 +18,6 @@ jobs:
|
||||
run: |
|
||||
git config --local user.email "bot@reactnative.dev"
|
||||
git config --local user.name "React Native Bot"
|
||||
- name: Setup xcode
|
||||
uses: ./.github/actions/setup-xcode
|
||||
with:
|
||||
xcode-version: '16.2.0'
|
||||
- name: Extract branch name
|
||||
run: |
|
||||
TAG="${{ github.ref_name }}";
|
||||
|
||||
@@ -22,8 +22,6 @@ jobs:
|
||||
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: Danger
|
||||
run: yarn danger ci --use-github-checks --failOnErrors
|
||||
working-directory: private/react-native-bots
|
||||
|
||||
@@ -128,9 +128,9 @@ jobs:
|
||||
runs-on: windows-2025
|
||||
needs: prepare_hermes_workspace
|
||||
env:
|
||||
HERMES_WS_DIR: 'C:\tmp\hermes'
|
||||
HERMES_TARBALL_ARTIFACTS_DIR: 'C:\tmp\hermes\hermes-runtime-darwin'
|
||||
HERMES_OSXBIN_ARTIFACTS_DIR: 'C:\tmp\hermes\osx-bin'
|
||||
HERMES_WS_DIR: 'D:\tmp\hermes'
|
||||
HERMES_TARBALL_ARTIFACTS_DIR: 'D:\tmp\hermes\hermes-runtime-darwin'
|
||||
HERMES_OSXBIN_ARTIFACTS_DIR: 'D:\tmp\hermes\osx-bin'
|
||||
ICU_URL: "https://github.com/unicode-org/icu/releases/download/release-64-2/icu4c-64_2-Win64-MSVC2017.zip"
|
||||
MSBUILD_DIR: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin'
|
||||
CMAKE_DIR: 'C:\Program Files\CMake\bin'
|
||||
|
||||
@@ -23,7 +23,7 @@ jobs:
|
||||
id: restore-ios-slice
|
||||
uses: actions/cache/restore@v4
|
||||
with:
|
||||
key: v3-ios-core-${{ matrix.slice }}-${{ matrix.flavor }}-${{ hashFiles('packages/react-native/Package.swift', 'packages/react-native/scripts/ios-prebuild/setup.js', 'packages/react-native/React/**/*', 'packages/react-native/ReactCommon/**/*', 'packages/react-native/Libraries/**/*') }}
|
||||
key: v3-ios-core-${{ matrix.slice }}-${{ matrix.flavor }}-${{ hashFiles('packages/react-native/Package.swift') }}-${{ hashFiles('packages/react-native/scripts/ios-prebuild/setup.js') }}
|
||||
path: packages/react-native/
|
||||
- name: Setup node.js
|
||||
if: steps.restore-ios-slice.outputs.cache-hit != 'true'
|
||||
@@ -83,7 +83,7 @@ jobs:
|
||||
# Move the XCFramework in the destination directory
|
||||
mv /tmp/third-party/packages/react-native/third-party/ReactNativeDependencies.xcframework packages/react-native/third-party/ReactNativeDependencies.xcframework
|
||||
|
||||
VERSION=$(jq -r '.version' packages/react-native/package.json)
|
||||
VERSION=$(jq -r '.version' package.json)
|
||||
echo "$VERSION-${{matrix.flavor}}" > "packages/react-native/third-party/version.txt"
|
||||
cat "packages/react-native/third-party/version.txt"
|
||||
# Check destination directory
|
||||
@@ -117,7 +117,7 @@ jobs:
|
||||
uses: actions/cache/save@v4
|
||||
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/setup.js', 'packages/react-native/React/**/*', 'packages/react-native/ReactCommon/**/*', 'packages/react-native/Libraries/**/*') }}
|
||||
key: v3-ios-core-${{ matrix.slice }}-${{ matrix.flavor }}-${{ hashFiles('packages/react-native/Package.swift') }}-${{ hashFiles('packages/react-native/scripts/ios-prebuild/setup.js') }}
|
||||
path: |
|
||||
packages/react-native/.build/output/spm/${{ matrix.flavor }}/Build/Products
|
||||
packages/react-native/.build/headers
|
||||
@@ -140,7 +140,7 @@ jobs:
|
||||
uses: actions/cache/restore@v4
|
||||
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/setup.js', 'packages/react-native/React/**/*', 'packages/react-native/ReactCommon/**/*', 'packages/react-native/Libraries/**/*') }}
|
||||
key: v2-ios-core-xcframework-${{ matrix.flavor }}-${{ hashFiles('packages/react-native/Package.swift') }}-${{ hashFiles('packages/react-native/scripts/ios-prebuild/setup.js') }}
|
||||
- name: Setup node.js
|
||||
if: steps.restore-ios-xcframework.outputs.cache-hit != 'true'
|
||||
uses: ./.github/actions/setup-node
|
||||
@@ -209,4 +209,4 @@ jobs:
|
||||
path: |
|
||||
packages/react-native/.build/output/xcframeworks/ReactCore${{matrix.flavor}}.xcframework.tar.gz
|
||||
packages/react-native/.build/output/xcframeworks/ReactCore${{matrix.flavor}}.framework.dSYM.tar.gz
|
||||
key: v2-ios-core-xcframework-${{ matrix.flavor }}-${{ hashFiles('packages/react-native/Package.swift', 'packages/react-native/scripts/ios-prebuild/setup.js', 'packages/react-native/React/**/*', 'packages/react-native/ReactCommon/**/*', 'packages/react-native/Libraries/**/*') }}
|
||||
key: v2-ios-core-xcframework-${{ matrix.flavor }}-${{ hashFiles('packages/react-native/Package.swift') }}-${{ hashFiles('packages/react-native/scripts/ios-prebuild/setup.js') }}
|
||||
|
||||
@@ -125,9 +125,9 @@ jobs:
|
||||
runs-on: windows-2025
|
||||
needs: prepare_hermes_workspace
|
||||
env:
|
||||
HERMES_WS_DIR: 'C:\tmp\hermes'
|
||||
HERMES_TARBALL_ARTIFACTS_DIR: 'C:\tmp\hermes\hermes-runtime-darwin'
|
||||
HERMES_OSXBIN_ARTIFACTS_DIR: 'C:\tmp\hermes\osx-bin'
|
||||
HERMES_WS_DIR: 'D:\tmp\hermes'
|
||||
HERMES_TARBALL_ARTIFACTS_DIR: 'D:\tmp\hermes\hermes-runtime-darwin'
|
||||
HERMES_OSXBIN_ARTIFACTS_DIR: 'D:\tmp\hermes\osx-bin'
|
||||
ICU_URL: "https://github.com/unicode-org/icu/releases/download/release-64-2/icu4c-64_2-Win64-MSVC2017.zip"
|
||||
MSBUILD_DIR: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin'
|
||||
CMAKE_DIR: 'C:\Program Files\CMake\bin'
|
||||
|
||||
@@ -128,7 +128,7 @@ jobs:
|
||||
test_ios_rntester_ruby_3_2_0:
|
||||
runs-on: macos-14
|
||||
needs:
|
||||
[build_apple_slices_hermes, prepare_hermes_workspace, build_hermes_macos, prebuild_apple_dependencies, prebuild_react_native_core]
|
||||
[build_apple_slices_hermes, prepare_hermes_workspace, build_hermes_macos, prebuild_apple_dependencies]
|
||||
env:
|
||||
HERMES_WS_DIR: /tmp/hermes
|
||||
HERMES_TARBALL_ARTIFACTS_DIR: /tmp/hermes/hermes-runtime-darwin
|
||||
@@ -141,12 +141,31 @@ jobs:
|
||||
ruby-version: "3.2.0"
|
||||
hermes-version: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }}
|
||||
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
|
||||
flavor: Debug
|
||||
|
||||
test_ios_rntester_dynamic_frameworks:
|
||||
runs-on: macos-14
|
||||
needs:
|
||||
[build_apple_slices_hermes, prepare_hermes_workspace, build_hermes_macos, prebuild_apple_dependencies]
|
||||
env:
|
||||
HERMES_WS_DIR: /tmp/hermes
|
||||
HERMES_TARBALL_ARTIFACTS_DIR: /tmp/hermes/hermes-runtime-darwin
|
||||
continue-on-error: true
|
||||
strategy:
|
||||
fail-fast: false
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Run it
|
||||
uses: ./.github/actions/test-ios-rntester
|
||||
with:
|
||||
use-frameworks: DynamicFrameworks
|
||||
hermes-version: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }}
|
||||
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
|
||||
|
||||
test_ios_rntester:
|
||||
runs-on: macos-14-large
|
||||
needs:
|
||||
[build_apple_slices_hermes, prepare_hermes_workspace, build_hermes_macos, prebuild_apple_dependencies, prebuild_react_native_core]
|
||||
[build_apple_slices_hermes, prepare_hermes_workspace, build_hermes_macos, prebuild_apple_dependencies]
|
||||
env:
|
||||
HERMES_WS_DIR: /tmp/hermes
|
||||
HERMES_TARBALL_ARTIFACTS_DIR: /tmp/hermes/hermes-runtime-darwin
|
||||
@@ -155,14 +174,14 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
flavor: [Debug, Release]
|
||||
frameworks: [StaticLibraries, DynamicFrameworks]
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Run it
|
||||
uses: ./.github/actions/test-ios-rntester
|
||||
with:
|
||||
use-frameworks: ${{ matrix.frameworks }}
|
||||
run-unit-tests: "false"
|
||||
use-frameworks: StaticLibraries
|
||||
hermes-version: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }}
|
||||
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
|
||||
flavor: ${{ matrix.flavor }}
|
||||
@@ -245,14 +264,6 @@ jobs:
|
||||
- name: Print third-party folder
|
||||
shell: bash
|
||||
run: ls -lR /tmp/third-party
|
||||
- name: Download React Native Prebuilds
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: ReactCore${{ matrix.flavor }}.xcframework.tar.gz
|
||||
path: /tmp/ReactCore
|
||||
- name: Print ReactCore folder
|
||||
shell: bash
|
||||
run: ls -lR /tmp/ReactCore
|
||||
- name: Prepare artifacts
|
||||
run: |
|
||||
REACT_NATIVE_PKG=$(find /tmp/react-native-tmp -type f -name "*.tgz")
|
||||
@@ -275,7 +286,6 @@ jobs:
|
||||
NEW_ARCH_ENABLED=1
|
||||
|
||||
export RCT_USE_LOCAL_RN_DEP=/tmp/third-party/ReactNativeDependencies${{ matrix.flavor }}.xcframework.tar.gz
|
||||
export RCT_TESTONLY_RNCORE_TARBALL_PATH="/tmp/ReactCore/ReactCore${{ matrix.flavor }}.xcframework.tar.gz"
|
||||
HERMES_ENGINE_TARBALL_PATH=$HERMES_PATH RCT_NEW_ARCH_ENABLED=$NEW_ARCH_ENABLED bundle exec pod install
|
||||
|
||||
xcodebuild \
|
||||
@@ -382,9 +392,9 @@ jobs:
|
||||
runs-on: windows-2025
|
||||
needs: prepare_hermes_workspace
|
||||
env:
|
||||
HERMES_WS_DIR: 'C:\tmp\hermes'
|
||||
HERMES_TARBALL_ARTIFACTS_DIR: 'C:\tmp\hermes\hermes-runtime-darwin'
|
||||
HERMES_OSXBIN_ARTIFACTS_DIR: 'C:\tmp\hermes\osx-bin'
|
||||
HERMES_WS_DIR: 'D:\tmp\hermes'
|
||||
HERMES_TARBALL_ARTIFACTS_DIR: 'D:\tmp\hermes\hermes-runtime-darwin'
|
||||
HERMES_OSXBIN_ARTIFACTS_DIR: 'D:\tmp\hermes\osx-bin'
|
||||
ICU_URL: "https://github.com/unicode-org/icu/releases/download/release-64-2/icu4c-64_2-Win64-MSVC2017.zip"
|
||||
MSBUILD_DIR: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin'
|
||||
CMAKE_DIR: 'C:\Program Files\CMake\bin'
|
||||
@@ -538,7 +548,7 @@ jobs:
|
||||
|
||||
test_ios_helloworld_with_ruby_3_2_0:
|
||||
runs-on: macos-14
|
||||
needs: [prepare_hermes_workspace, build_hermes_macos, prebuild_apple_dependencies, prebuild_react_native_core] # prepare_hermes_workspace must be there because we need its reference to retrieve a couple of outputs
|
||||
needs: [prepare_hermes_workspace, build_hermes_macos, prebuild_apple_dependencies] # prepare_hermes_workspace must be there because we need its reference to retrieve a couple of outputs
|
||||
env:
|
||||
PROJECT_NAME: iOSTemplateProject
|
||||
HERMES_WS_DIR: /tmp/hermes
|
||||
@@ -555,7 +565,7 @@ jobs:
|
||||
|
||||
test_ios_helloworld:
|
||||
runs-on: macos-14
|
||||
needs: [prepare_hermes_workspace, build_hermes_macos, prebuild_apple_dependencies, prebuild_react_native_core] # prepare_hermes_workspace must be there because we need its reference to retrieve a couple of outputs
|
||||
needs: [prepare_hermes_workspace, build_hermes_macos, prebuild_apple_dependencies] # prepare_hermes_workspace must be there because we need its reference to retrieve a couple of outputs
|
||||
strategy:
|
||||
matrix:
|
||||
flavor: [Debug, Release]
|
||||
@@ -583,7 +593,7 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
node-version: ["24", "22", "20"]
|
||||
node-version: ["24", "22"]
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
@@ -175,6 +175,3 @@ fix_*.patch
|
||||
|
||||
# [Experimental] Generated TS type definitions
|
||||
/packages/**/types_generated/
|
||||
|
||||
/packages/debugger-shell/build/
|
||||
/packages/*/dist/
|
||||
|
||||
@@ -1,11 +1,5 @@
|
||||
# Changelog (pre 0.80)
|
||||
|
||||
## v0.79.5
|
||||
|
||||
### Fixed
|
||||
|
||||
- **Flow:** Publish top-level Flow types for `react-native` ([fbbd20dd63](https://github.com/facebook/react-native/commit/fbbd20dd632acd72d2abe861dd4a0e6e98437cf2) by [@buschco](https://github.com/buschco))
|
||||
|
||||
## v0.79.4
|
||||
|
||||
### Fixed
|
||||
@@ -319,31 +313,6 @@ ChuiHW))
|
||||
- **JSC:** Clean up RCTBridgeDelegate to remove shouldBridgeUseCustomJSC method ([c8f1506f13](https://github.com/facebook/react-native/commit/c8f1506f13310ffafe370273805684e696d72d50) by [@zhongwuzw](https://github.com/zhongwuzw))
|
||||
- **Layout:** Remove no longer needed UISceneDelegate ([a033cf9d5e](https://github.com/facebook/react-native/commit/a033cf9d5e8ffbda8b6f86cf3ce152b4ccb73187) by [@okwasniewski](https://github.com/okwasniewski))
|
||||
|
||||
## v0.78.3
|
||||
|
||||
### Added
|
||||
|
||||
#### Android specific
|
||||
|
||||
- **Gradle:** RNGP - Add support for `exclusiveEnterpriseRepository` to specify an internal Maven mirror. ([6cb8dc37c7](https://github.com/facebook/react-native/commit/6cb8dc37c74995cba3f9f0a845919f305de53c3d) by [@cortinico](https://github.com/cortinico))
|
||||
|
||||
### Fixed
|
||||
|
||||
- **DevTools**: Temporarily disable eager evaluation and live expressions in the console tab ([07717b5275](https://github.com/facebook/react-native/commit/07717b5275d80cde7b2b4edbe032ab629127fbf0) by [@huntie](https://github.com/huntie))
|
||||
- **InteropLayer:** Fixed adding child views to a native view using the interop layer ([d53a60dd23](https://github.com/facebook/react-native/commit/d53a60dd23c5df8afca058a867c50df8b61f62e2) by [@chrfalch](https://github.com/chrfalch))
|
||||
- **Runtime:** Align timer IDs and timer function argument error handling with web standards. ([480a4642e5](https://github.com/facebook/react-native/commit/480a4642e5a644becf1c477d3d239f9b57efff3a) by [@kitten](https://github.com/kitten))
|
||||
|
||||
#### Android specific
|
||||
|
||||
- **StyleSheet:** Wrong `borderBottomEndRadius` on RTL ([68d6ada448](https://github.com/facebook/react-native/commit/68d6ada44893701b6006a6b1753131c7e880a30a) by [@riteshshukla04](https://github.com/riteshshukla04))
|
||||
|
||||
#### iOS specific
|
||||
|
||||
- **Codegen:** Skip codegen for selectively disabled libraries in react-native.config.js ([be8595b18a](https://github.com/facebook/react-native/commit/be8595b18a46635bf679d8e7473f2960c33530fa) by [@ismarbesic](https://github.com/ismarbesic))
|
||||
- **Layout:** Layout direction changes are now honored on bundle reload ([36f29beac4](https://github.com/facebook/react-native/commit/36f29beac47259768612bf56e5d9acfa4b94ab1a) by [@chrsmys](https://github.com/chrsmys))
|
||||
- **Runtime:** Re-enable enableFixForViewCommandRace feature flag ([ae59702f8e](https://github.com/facebook/react-native/commit/ae59702f8ee89e7bddec971e0a041744cb91e65c) by [@okwasniewski](https://github.com/okwasniewski))
|
||||
- **Switch:** Fixed switches correctly reverting to controlled state ([aa8c072870](https://github.com/facebook/react-native/commit/aa8c072870f6f9740e567a0f455c0e500ff1400c) by [@javache](https://github.com/javache))
|
||||
|
||||
## v0.78.2
|
||||
|
||||
### Changed
|
||||
-1114
File diff suppressed because it is too large
Load Diff
@@ -13,7 +13,6 @@ plugins {
|
||||
alias(libs.plugins.kotlin.android) apply false
|
||||
alias(libs.plugins.binary.compatibility.validator) apply true
|
||||
alias(libs.plugins.android.test) apply false
|
||||
alias(libs.plugins.ktfmt) apply true
|
||||
}
|
||||
|
||||
val reactAndroidProperties = java.util.Properties()
|
||||
@@ -131,30 +130,3 @@ if (project.findProperty("react.internal.useHermesNightly")?.toString()?.toBoole
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ktfmt {
|
||||
blockIndent.set(2)
|
||||
continuationIndent.set(4)
|
||||
maxWidth.set(100)
|
||||
removeUnusedImports.set(false)
|
||||
manageTrailingCommas.set(false)
|
||||
}
|
||||
|
||||
// Configure ktfmt tasks to include gradle-plugin
|
||||
listOf("ktfmtCheck", "ktfmtFormat").forEach { taskName ->
|
||||
tasks.named(taskName) { dependsOn(gradle.includedBuild("gradle-plugin").task(":$taskName")) }
|
||||
}
|
||||
|
||||
allprojects {
|
||||
// Apply exclusions for specific files that should not be formatted
|
||||
val excludePatterns =
|
||||
listOf(
|
||||
"**/build/**",
|
||||
"**/hermes-engine/**",
|
||||
"**/internal/featureflags/**",
|
||||
"**/systeminfo/ReactNativeVersion.kt")
|
||||
listOf(
|
||||
com.ncorti.ktfmt.gradle.tasks.KtfmtCheckTask::class,
|
||||
com.ncorti.ktfmt.gradle.tasks.KtfmtFormatTask::class)
|
||||
.forEach { tasks.withType(it) { exclude(excludePatterns) } }
|
||||
}
|
||||
|
||||
-149
@@ -1,149 +0,0 @@
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* @flow strict-local
|
||||
* @format
|
||||
*/
|
||||
|
||||
declare module '@electron/packager' {
|
||||
declare export type AsarOptions = $FlowFixMe;
|
||||
|
||||
declare export type ElectronDownloadRequestOptions = $FlowFixMe;
|
||||
|
||||
declare export type TargetDefinition = {
|
||||
arch: TargetArch,
|
||||
platform: TargetPlatform,
|
||||
};
|
||||
|
||||
declare export type FinalizePackageTargetsHookFunction = (
|
||||
targets: TargetDefinition[],
|
||||
callback: HookFunctionErrorCallback,
|
||||
) => void;
|
||||
|
||||
declare export type HookFunction = (
|
||||
buildPath: string,
|
||||
electronVersion: string,
|
||||
platform: TargetPlatform,
|
||||
arch: TargetArch,
|
||||
callback: HookFunctionErrorCallback,
|
||||
) => void;
|
||||
|
||||
declare export type IgnoreFunction = (path: string) => boolean;
|
||||
|
||||
declare export type HookFunctionErrorCallback = (err?: Error | null) => void;
|
||||
|
||||
declare export interface MacOSProtocol {
|
||||
name: string;
|
||||
schemes: string[];
|
||||
}
|
||||
|
||||
declare export type NotaryToolCredentials = $FlowFixMe;
|
||||
|
||||
declare export type OsxSignOptions = $FlowFixMe;
|
||||
|
||||
declare export type OsxUniversalOptions = $FlowFixMe;
|
||||
|
||||
declare export type Win32MetadataOptions = $ReadOnly<{
|
||||
CompanyName?: string,
|
||||
FileDescription?: string,
|
||||
OriginalFilename?: string,
|
||||
ProductName?: string,
|
||||
InternalName?: string,
|
||||
'requested-execution-level'?:
|
||||
| 'asInvoker'
|
||||
| 'highestAvailable'
|
||||
| 'requireAdministrator',
|
||||
'application-manifest'?: string,
|
||||
}>;
|
||||
|
||||
declare export type WindowsSignOptions = $FlowFixMe;
|
||||
|
||||
declare export type OfficialArch =
|
||||
| 'ia32'
|
||||
| 'x64'
|
||||
| 'armv7l'
|
||||
| 'arm64'
|
||||
| 'mips64el'
|
||||
| 'universal';
|
||||
|
||||
declare export type OfficialPlatform = 'linux' | 'win32' | 'darwin' | 'mas';
|
||||
|
||||
declare export type TargetArch = OfficialArch | string;
|
||||
|
||||
declare export type TargetPlatform = OfficialPlatform | string;
|
||||
|
||||
declare export type ArchOption = TargetArch | 'all';
|
||||
|
||||
declare export type PlatformOption = TargetPlatform | 'all';
|
||||
|
||||
declare export interface Options {
|
||||
dir: string;
|
||||
afterAsar?: HookFunction[];
|
||||
afterComplete?: HookFunction[];
|
||||
afterCopy?: HookFunction[];
|
||||
afterCopyExtraResources?: HookFunction[];
|
||||
afterExtract?: HookFunction[];
|
||||
afterFinalizePackageTargets?: FinalizePackageTargetsHookFunction[];
|
||||
afterInitialize?: HookFunction[];
|
||||
afterPrune?: HookFunction[];
|
||||
all?: boolean;
|
||||
appBundleId?: string;
|
||||
appCategoryType?: string;
|
||||
appCopyright?: string;
|
||||
appVersion?: string;
|
||||
arch?: ArchOption | ArchOption[];
|
||||
asar?: boolean | AsarOptions;
|
||||
beforeAsar?: HookFunction[];
|
||||
beforeCopy?: HookFunction[];
|
||||
beforeCopyExtraResources?: HookFunction[];
|
||||
buildVersion?: string;
|
||||
darwinDarkModeSupport?: boolean;
|
||||
derefSymlinks?: boolean;
|
||||
download?: ElectronDownloadRequestOptions;
|
||||
electronVersion?: string;
|
||||
electronZipDir?: string;
|
||||
executableName?: string;
|
||||
extendHelperInfo?:
|
||||
| string
|
||||
| {
|
||||
[property: string]: any,
|
||||
};
|
||||
extendInfo?:
|
||||
| string
|
||||
| {
|
||||
[property: string]: any,
|
||||
};
|
||||
extraResource?: string | string[];
|
||||
helperBundleId?: string;
|
||||
icon?: string;
|
||||
ignore?: RegExp | (string | RegExp)[] | IgnoreFunction;
|
||||
junk?: boolean;
|
||||
name?: string;
|
||||
osxNotarize?: NotaryToolCredentials;
|
||||
osxSign?: true | OsxSignOptions;
|
||||
osxUniversal?: OsxUniversalOptions;
|
||||
out?: string;
|
||||
overwrite?: boolean;
|
||||
platform?: TargetPlatform | 'all' | Array<TargetPlatform | 'all'>;
|
||||
prebuiltAsar?: string;
|
||||
protocols?: MacOSProtocol[];
|
||||
prune?: boolean;
|
||||
quiet?: boolean;
|
||||
tmpdir?: string | false;
|
||||
usageDescription?: {
|
||||
[property: string]: string,
|
||||
};
|
||||
win32metadata?: Win32MetadataOptions;
|
||||
windowsSign?: true | WindowsSignOptions;
|
||||
}
|
||||
|
||||
declare function packager(options: Options): Promise<string[]>;
|
||||
|
||||
declare module.exports: typeof packager & {
|
||||
packager: typeof packager,
|
||||
default: typeof packager,
|
||||
};
|
||||
}
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.1-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
||||
@@ -32,7 +32,7 @@ if (process.env.FBSOURCE_ENV === '1') {
|
||||
require('@fb-tools/babel-register');
|
||||
} else {
|
||||
// Register Babel to allow local packages to be loaded from source
|
||||
require('../scripts/shared/babelRegister').registerForMonorepo();
|
||||
require('../scripts/babel-register').registerForMonorepo();
|
||||
}
|
||||
|
||||
const transformer = require('@react-native/metro-babel-transformer');
|
||||
|
||||
+10
-16
@@ -8,19 +8,15 @@
|
||||
"android": "yarn --cwd packages/rn-tester android",
|
||||
"build-android": "./gradlew :packages:react-native:ReactAndroid:build",
|
||||
"build": "node ./scripts/build/build.js",
|
||||
"build-types": "node ./scripts/js-api/build-types",
|
||||
"build-types": "node ./scripts/build-types",
|
||||
"clang-format": "clang-format -i --glob=*/**/*.{h,cpp,m,mm}",
|
||||
"clean": "node ./scripts/build/clean.js",
|
||||
"cxx-api-build": "node ./scripts/cxx-api/public-api.js",
|
||||
"flow-check": "flow check",
|
||||
"flow": "flow",
|
||||
"format-check": "prettier --list-different \"./**/*.{js,md,yml,ts,tsx}\"",
|
||||
"format": "npm run prettier && npm run clang-format",
|
||||
"featureflags": "yarn --cwd packages/react-native featureflags",
|
||||
"js-api-diff": "node ./scripts/js-api/diff-api-snapshot",
|
||||
"lint-ci": "./.github/workflow-scripts/analyze_code.sh && yarn shellcheck",
|
||||
"lint-kotlin-check": "./gradlew ktfmtCheck",
|
||||
"lint-kotlin": "./gradlew ktfmtFormat",
|
||||
"lint-markdown": "markdownlint-cli2 2>&1",
|
||||
"lint": "eslint --max-warnings 0 .",
|
||||
"prettier": "prettier --write \"./**/*.{js,md,yml,ts,tsx}\"",
|
||||
@@ -30,8 +26,8 @@
|
||||
"set-version": "node ./scripts/releases/set-version.js",
|
||||
"test-android": "./gradlew :packages:react-native:ReactAndroid:test",
|
||||
"test-ci": "jest --maxWorkers=2 --ci --reporters=\"default\" --reporters=\"jest-junit\"",
|
||||
"test-release-local-clean": "node ./scripts/release-testing/test-release-local-clean.js",
|
||||
"test-release-local": "node ./scripts/release-testing/test-release-local.js",
|
||||
"test-e2e-local-clean": "node ./scripts/release-testing/test-e2e-local-clean.js",
|
||||
"test-e2e-local": "node ./scripts/release-testing/test-e2e-local.js",
|
||||
"test-ios": "./scripts/objc-test.sh test",
|
||||
"test-typescript": "tsc -p packages/react-native/types/tsconfig.json",
|
||||
"test-generated-typescript": "tsc -p packages/react-native/types_generated/tsconfig.test.json",
|
||||
@@ -53,14 +49,13 @@
|
||||
"@babel/plugin-transform-regenerator": "^7.24.7",
|
||||
"@babel/preset-env": "^7.25.3",
|
||||
"@babel/preset-flow": "^7.24.7",
|
||||
"@electron/packager": "^18.3.6",
|
||||
"@jest/create-cache-key-function": "^29.7.0",
|
||||
"@microsoft/api-extractor": "^7.52.2",
|
||||
"@react-native/metro-babel-transformer": "0.81.0-main",
|
||||
"@react-native/metro-config": "0.81.0-main",
|
||||
"@react-native/metro-babel-transformer": "0.80.0-main",
|
||||
"@react-native/metro-config": "0.80.0-main",
|
||||
"@tsconfig/node22": "22.0.2",
|
||||
"@types/react": "^19.1.0",
|
||||
"@typescript-eslint/parser": "^8.36.0",
|
||||
"@typescript-eslint/parser": "^7.1.1",
|
||||
"ansi-styles": "^4.2.1",
|
||||
"babel-plugin-minify-dead-code-elimination": "^0.5.2",
|
||||
"babel-plugin-syntax-hermes-parser": "0.29.1",
|
||||
@@ -82,11 +77,10 @@
|
||||
"eslint-plugin-redundant-undefined": "^0.4.0",
|
||||
"eslint-plugin-relay": "^1.8.3",
|
||||
"flow-api-translator": "0.29.1",
|
||||
"flow-bin": "^0.275.0",
|
||||
"flow-bin": "^0.274.2",
|
||||
"glob": "^7.1.1",
|
||||
"hermes-eslint": "0.29.1",
|
||||
"hermes-transform": "0.29.1",
|
||||
"ini": "^5.0.0",
|
||||
"inquirer": "^7.1.0",
|
||||
"jest": "^29.7.0",
|
||||
"jest-config": "^29.7.0",
|
||||
@@ -95,9 +89,9 @@
|
||||
"jest-snapshot": "^29.7.0",
|
||||
"markdownlint-cli2": "^0.17.2",
|
||||
"markdownlint-rule-relative-links": "^3.0.0",
|
||||
"memfs": "^4.7.7",
|
||||
"metro-babel-register": "^0.83.0",
|
||||
"metro-transform-plugins": "^0.83.0",
|
||||
"metro-babel-register": "^0.82.4",
|
||||
"metro-memory-fs": "^0.82.4",
|
||||
"metro-transform-plugins": "^0.82.4",
|
||||
"micromatch": "^4.0.4",
|
||||
"node-fetch": "^2.2.0",
|
||||
"nullthrows": "^1.1.1",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/assets-registry",
|
||||
"version": "0.81.0-main",
|
||||
"version": "0.80.0-main",
|
||||
"description": "Asset support code for React Native.",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
@@ -17,7 +17,7 @@
|
||||
],
|
||||
"bugs": "https://github.com/facebook/react-native/issues",
|
||||
"engines": {
|
||||
"node": ">= 20.19.4"
|
||||
"node": ">= 22.14.0"
|
||||
},
|
||||
"files": [
|
||||
"path-support.js",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/babel-plugin-codegen",
|
||||
"version": "0.81.0-main",
|
||||
"version": "0.80.0-main",
|
||||
"description": "Babel plugin to generate native module and view manager code for React Native.",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
@@ -19,14 +19,14 @@
|
||||
],
|
||||
"bugs": "https://github.com/facebook/react-native/issues",
|
||||
"engines": {
|
||||
"node": ">= 20.19.4"
|
||||
"node": ">= 22.14.0"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"dependencies": {
|
||||
"@babel/traverse": "^7.25.3",
|
||||
"@react-native/codegen": "0.81.0-main"
|
||||
"@react-native/codegen": "0.80.0-main"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.25.2"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/community-cli-plugin",
|
||||
"version": "0.81.0-main",
|
||||
"version": "0.80.0-main",
|
||||
"description": "Core CLI commands for React Native",
|
||||
"keywords": [
|
||||
"react-native",
|
||||
@@ -22,16 +22,16 @@
|
||||
"dist"
|
||||
],
|
||||
"dependencies": {
|
||||
"@react-native/dev-middleware": "0.81.0-main",
|
||||
"@react-native/dev-middleware": "0.80.0-main",
|
||||
"debug": "^4.4.0",
|
||||
"invariant": "^2.2.4",
|
||||
"metro": "^0.83.0",
|
||||
"metro-config": "^0.83.0",
|
||||
"metro-core": "^0.83.0",
|
||||
"metro": "^0.82.4",
|
||||
"metro-config": "^0.82.4",
|
||||
"metro-core": "^0.82.4",
|
||||
"semver": "^7.1.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"metro-resolver": "^0.83.0"
|
||||
"metro-resolver": "^0.82.4"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@react-native-community/cli": "*",
|
||||
@@ -43,6 +43,6 @@
|
||||
}
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 20.19.4"
|
||||
"node": ">= 22.14.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -147,7 +147,7 @@ async function runServer(
|
||||
// $FlowIgnore[cannot-write] Assigning to readonly property
|
||||
metroConfig.reporter = reporter;
|
||||
|
||||
await Metro.runServer(metroConfig, {
|
||||
const serverInstance = await Metro.runServer(metroConfig, {
|
||||
host: args.host,
|
||||
secure: args.https,
|
||||
secureCert: args.cert,
|
||||
@@ -161,6 +161,18 @@ async function runServer(
|
||||
|
||||
reportEvent = eventsSocketEndpoint.reportEvent;
|
||||
|
||||
// In Node 8, the default keep-alive for an HTTP connection is 5 seconds. In
|
||||
// early versions of Node 8, this was implemented in a buggy way which caused
|
||||
// some HTTP responses (like those containing large JS bundles) to be
|
||||
// terminated early.
|
||||
//
|
||||
// As a workaround, arbitrarily increase the keep-alive from 5 to 30 seconds,
|
||||
// which should be enough to send even the largest of JS bundles.
|
||||
//
|
||||
// For more info: https://github.com/nodejs/node/issues/13391
|
||||
//
|
||||
serverInstance.keepAliveTimeout = 30000;
|
||||
|
||||
await version.logIfUpdateAvailable(cliConfig, terminalReporter);
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ export type * from './index.flow';
|
||||
*/
|
||||
|
||||
if (!process.env.BUILD_EXCLUDE_BABEL_REGISTER) {
|
||||
require('../../../scripts/shared/babelRegister').registerForMonorepo();
|
||||
require('../../../scripts/babel-register').registerForMonorepo();
|
||||
}
|
||||
|
||||
module.exports = require('./index.flow');
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/core-cli-utils",
|
||||
"version": "0.81.0-main",
|
||||
"version": "0.80.0-main",
|
||||
"description": "React Native CLI library for Frameworks to build on",
|
||||
"license": "MIT",
|
||||
"main": "./src/index.flow.js",
|
||||
@@ -21,7 +21,7 @@
|
||||
],
|
||||
"bugs": "https://github.com/facebook/react-native/issues",
|
||||
"engines": {
|
||||
"node": ">= 20.19.4"
|
||||
"node": ">= 22.14.0"
|
||||
},
|
||||
"files": [
|
||||
"dist"
|
||||
|
||||
@@ -13,7 +13,7 @@ export type * from './index.flow';
|
||||
*/
|
||||
|
||||
if (process.env.BUILD_EXCLUDE_BABEL_REGISTER == null) {
|
||||
require('../../../scripts/shared/babelRegister').registerForMonorepo();
|
||||
require('../../../scripts/babel-register').registerForMonorepo();
|
||||
}
|
||||
|
||||
module.exports = require('./index.flow');
|
||||
|
||||
@@ -76,8 +76,9 @@ function getNodePackagePath(packageName: string): string {
|
||||
}
|
||||
|
||||
function metro(...args: $ReadOnlyArray<string>): ExecaPromise {
|
||||
log(`🚇 metro ${args.join(' ')} `);
|
||||
return execa('npx', ['--offline', 'metro', ...args]);
|
||||
const metroPath = getNodePackagePath(path.join('metro', 'src', 'cli.js'));
|
||||
log(`🚇 ${metroPath} ${args.join(' ')} `);
|
||||
return execa('node', [metroPath, ...args]);
|
||||
}
|
||||
|
||||
export const tasks = {
|
||||
|
||||
@@ -13,7 +13,7 @@ export type * from './version.flow';
|
||||
*/
|
||||
|
||||
if (process.env.BUILD_EXCLUDE_BABEL_REGISTER == null) {
|
||||
require('../../../../scripts/shared/babelRegister').registerForMonorepo();
|
||||
require('../../../../scripts/babel-register').registerForMonorepo();
|
||||
}
|
||||
|
||||
module.exports = require('./version.flow');
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
@generated SignedSource<<e2d97b04634bf3b566f33d455f38658f>>
|
||||
Git revision: 8dc0d5b365e6b4600b78e5a7381aa861d8c1c81e
|
||||
@generated SignedSource<<634e06e29a06ec6a22c087e7f8b01796>>
|
||||
Git revision: 35c4630bd58bbcbc6f4c54c084b4e52994dc4940
|
||||
Built with --nohooks: false
|
||||
Is local checkout: false
|
||||
Remote URL: https://github.com/facebook/react-native-devtools-frontend
|
||||
|
||||
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+2
-2
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+4
-5
File diff suppressed because one or more lines are too long
Vendored
+6
-6
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/debugger-frontend",
|
||||
"version": "0.81.0-main",
|
||||
"version": "0.80.0-main",
|
||||
"description": "Debugger frontend for React Native based on Chrome DevTools",
|
||||
"keywords": [
|
||||
"react-native",
|
||||
@@ -20,6 +20,6 @@
|
||||
"BUILD_INFO"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">= 20.19.4"
|
||||
"node": ">= 22.14.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/debugger-shell",
|
||||
"version": "0.81.0-main",
|
||||
"version": "0.80.0-main",
|
||||
"description": "Experimental debugger shell for React Native for use with @react-native/debugger-frontend",
|
||||
"keywords": [
|
||||
"react-native",
|
||||
@@ -8,7 +8,7 @@
|
||||
],
|
||||
"homepage": "https://github.com/facebook/react-native/tree/HEAD/packages/debugger-shell#readme",
|
||||
"bugs": "https://github.com/facebook/react-native/issues",
|
||||
"main": "./src/index.js",
|
||||
"main": "./src/node/index.js",
|
||||
"exports": {
|
||||
".": {
|
||||
"node": "./src/node/index.js",
|
||||
@@ -26,7 +26,7 @@
|
||||
},
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 20.19.4",
|
||||
"node": ">= 22.14.0",
|
||||
"electron": ">=36.3.0"
|
||||
},
|
||||
"dependencies": {
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
|
||||
// $FlowFixMe[unclear-type] We have no Flow types for the Electron API.
|
||||
const {BrowserWindow, app, shell, ipcMain} = require('electron') as any;
|
||||
const path = require('path');
|
||||
const util = require('util');
|
||||
|
||||
const windowMetadata = new WeakMap<
|
||||
@@ -69,8 +68,6 @@ function handleLaunchArgs(argv: string[]) {
|
||||
partition: 'persist:react-native-devtools',
|
||||
preload: require.resolve('./preload.js'),
|
||||
},
|
||||
// Icon for Linux
|
||||
icon: path.join(__dirname, 'resources', 'icon.png'),
|
||||
});
|
||||
|
||||
// Open links in the default browser instead of in new Electron windows.
|
||||
@@ -93,7 +90,7 @@ function handleLaunchArgs(argv: string[]) {
|
||||
}
|
||||
|
||||
app.whenReady().then(() => {
|
||||
handleLaunchArgs(process.argv.slice(app.isPackaged ? 1 : 2));
|
||||
handleLaunchArgs(process.argv.slice(2));
|
||||
|
||||
app.on(
|
||||
'second-instance',
|
||||
|
||||
@@ -10,25 +10,9 @@
|
||||
|
||||
// $FlowFixMe[unclear-type] We have no Flow types for the Electron API.
|
||||
const {app} = require('electron') as any;
|
||||
const util = require('util');
|
||||
|
||||
// Handle global command line arguments which don't require a window
|
||||
// or the single instance lock to be held.
|
||||
const {
|
||||
values: {version = false},
|
||||
} = util.parseArgs({
|
||||
options: {version: {type: 'boolean'}},
|
||||
args: process.argv.slice(app.isPackaged ? 1 : 2),
|
||||
strict: false,
|
||||
});
|
||||
if (version) {
|
||||
console.log(`${app.getName()} v${app.getVersion()}`);
|
||||
// Not app.quit() - we want to exit immediately without initialising the graphical subsystem.
|
||||
app.exit(0);
|
||||
}
|
||||
|
||||
const gotTheLock = app.requestSingleInstanceLock({
|
||||
argv: process.argv.slice(app.isPackaged ? 1 : 2),
|
||||
argv: process.argv.slice(2),
|
||||
});
|
||||
|
||||
if (!gotTheLock) {
|
||||
|
||||
@@ -13,7 +13,7 @@ export type * from './index.flow';
|
||||
*/
|
||||
|
||||
if (!Boolean(process.env.BUILD_EXCLUDE_BABEL_REGISTER)) {
|
||||
require('../../../../scripts/shared/babelRegister').registerForMonorepo();
|
||||
require('../../../../scripts/babel-register').registerForMonorepo();
|
||||
}
|
||||
|
||||
module.exports = require('./index.flow');
|
||||
|
||||
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 134 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 118 KiB |
@@ -1,26 +0,0 @@
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* @flow strict-local
|
||||
* @format
|
||||
*/
|
||||
|
||||
// As far as Flow is concerned, this package is Node-only.
|
||||
/*::
|
||||
export type * from './node';
|
||||
const Node = require('./node');
|
||||
declare module.exports: typeof Node;
|
||||
*/
|
||||
|
||||
// Because Electron doesn't support package.json `exports`, we need to
|
||||
// switch at runtime.
|
||||
if ('electron' in process.versions) {
|
||||
// $FlowIgnore[invalid-export]
|
||||
module.exports = require('./electron');
|
||||
} else {
|
||||
// $FlowIgnore[invalid-export]
|
||||
module.exports = require('./node');
|
||||
}
|
||||
@@ -13,7 +13,7 @@ export type * from './index.flow';
|
||||
*/
|
||||
|
||||
if (!process.env.BUILD_EXCLUDE_BABEL_REGISTER) {
|
||||
require('../../../../scripts/shared/babelRegister').registerForMonorepo();
|
||||
require('../../../../scripts/babel-register').registerForMonorepo();
|
||||
}
|
||||
|
||||
export * from './index.flow';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/dev-middleware",
|
||||
"version": "0.81.0-main",
|
||||
"version": "0.80.0-main",
|
||||
"description": "Dev server middleware for React Native",
|
||||
"keywords": [
|
||||
"react-native",
|
||||
@@ -23,7 +23,7 @@
|
||||
],
|
||||
"dependencies": {
|
||||
"@isaacs/ttlcache": "^1.4.1",
|
||||
"@react-native/debugger-frontend": "0.81.0-main",
|
||||
"@react-native/debugger-frontend": "0.80.0-main",
|
||||
"chrome-launcher": "^0.15.2",
|
||||
"chromium-edge-launcher": "^0.2.0",
|
||||
"connect": "^3.6.5",
|
||||
@@ -35,7 +35,7 @@
|
||||
"ws": "^6.2.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 20.19.4"
|
||||
"node": ">= 22.14.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"selfsigned": "^2.4.1",
|
||||
|
||||
@@ -13,7 +13,7 @@ export type * from './index.flow';
|
||||
*/
|
||||
|
||||
if (!process.env.BUILD_EXCLUDE_BABEL_REGISTER) {
|
||||
require('../../../scripts/shared/babelRegister').registerForMonorepo();
|
||||
require('../../../scripts/babel-register').registerForMonorepo();
|
||||
}
|
||||
|
||||
export * from './index.flow';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/eslint-config",
|
||||
"version": "0.81.0-main",
|
||||
"version": "0.80.0-main",
|
||||
"description": "ESLint config for React Native",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
@@ -16,15 +16,15 @@
|
||||
],
|
||||
"bugs": "https://github.com/facebook/react-native/issues",
|
||||
"engines": {
|
||||
"node": ">= 20.19.4"
|
||||
"node": ">= 22.14.0"
|
||||
},
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@babel/core": "^7.25.2",
|
||||
"@babel/eslint-parser": "^7.25.1",
|
||||
"@react-native/eslint-plugin": "0.81.0-main",
|
||||
"@typescript-eslint/eslint-plugin": "^8.36.0",
|
||||
"@typescript-eslint/parser": "^8.36.0",
|
||||
"@react-native/eslint-plugin": "0.80.0-main",
|
||||
"@typescript-eslint/eslint-plugin": "^7.1.1",
|
||||
"@typescript-eslint/parser": "^7.1.1",
|
||||
"eslint-config-prettier": "^8.5.0",
|
||||
"eslint-plugin-eslint-comments": "^3.2.0",
|
||||
"eslint-plugin-ft-flow": "^2.0.1",
|
||||
|
||||
@@ -31,8 +31,6 @@ eslintTester.run('../no-deep-imports', rule, {
|
||||
"import Foo from 'react/native/Foo';",
|
||||
"import 'react-native/Libraries/Core/InitializeCore';",
|
||||
"require('react-native/Libraries/Core/InitializeCore');",
|
||||
"import Foo from 'react-native/src/fb_internal/Foo'",
|
||||
"require('react-native/src/fb_internal/Foo')",
|
||||
],
|
||||
invalid: [
|
||||
{
|
||||
@@ -105,25 +103,5 @@ eslintTester.run('../no-deep-imports', rule, {
|
||||
],
|
||||
output: null,
|
||||
},
|
||||
{
|
||||
code: "import type {RootTag} from 'react-native/Libraries/Types/RootTagTypes';",
|
||||
errors: [
|
||||
{
|
||||
messageId: 'deepImport',
|
||||
data: {importPath: 'react-native/Libraries/Types/RootTagTypes'},
|
||||
},
|
||||
],
|
||||
output: "import type {RootTag} from 'react-native';",
|
||||
},
|
||||
{
|
||||
code: "import type {ModalBaseProps, Foo} from 'react-native/Libraries/Modal/Modal';",
|
||||
errors: [
|
||||
{
|
||||
messageId: 'deepImport',
|
||||
data: {importPath: 'react-native/Libraries/Modal/Modal'},
|
||||
},
|
||||
],
|
||||
output: null,
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
@@ -31,8 +31,7 @@ module.exports = {
|
||||
ImportDeclaration(node) {
|
||||
if (
|
||||
!isDeepReactNativeImport(node.source) ||
|
||||
isInitializeCoreImport(node.source) ||
|
||||
isFbInternalImport(node.source)
|
||||
isInitializeCoreImport(node.source)
|
||||
) {
|
||||
return;
|
||||
}
|
||||
@@ -41,55 +40,25 @@ module.exports = {
|
||||
'react-native/'.length,
|
||||
);
|
||||
const publicAPIDefaultComponent = publicAPIMapping[reactNativeSource];
|
||||
if (publicAPIDefaultComponent && publicAPIDefaultComponent.default) {
|
||||
if (publicAPIDefaultComponent) {
|
||||
context.report({
|
||||
...getStandardReport(node.source),
|
||||
fix(fixer) {
|
||||
return fixer.replaceText(
|
||||
node,
|
||||
`import {${publicAPIDefaultComponent.default}} from 'react-native';`,
|
||||
`import {${publicAPIDefaultComponent}} from 'react-native';`,
|
||||
);
|
||||
},
|
||||
});
|
||||
} else {
|
||||
context.report(getStandardReport(node.source));
|
||||
}
|
||||
} else if (isTypeImport(node)) {
|
||||
const reactNativeSource = node.source.value.slice(
|
||||
'react-native/'.length,
|
||||
);
|
||||
const publicAPIDefaultComponent = publicAPIMapping[reactNativeSource];
|
||||
if (publicAPIDefaultComponent && publicAPIDefaultComponent.types) {
|
||||
const typeNames = [];
|
||||
for (const specifier of node.specifiers) {
|
||||
const importedName = specifier.imported.name;
|
||||
if (!publicAPIDefaultComponent.types.includes(importedName)) {
|
||||
context.report(getStandardReport(node.source));
|
||||
return;
|
||||
}
|
||||
typeNames.push(importedName);
|
||||
}
|
||||
|
||||
context.report({
|
||||
...getStandardReport(node.source),
|
||||
fix(fixer) {
|
||||
return fixer.replaceText(
|
||||
node,
|
||||
`import type {${typeNames.join(', ')}} from 'react-native';`,
|
||||
);
|
||||
},
|
||||
});
|
||||
}
|
||||
} else {
|
||||
context.report(getStandardReport(node.source));
|
||||
}
|
||||
},
|
||||
CallExpression(node) {
|
||||
if (
|
||||
!isDeepRequire(node) ||
|
||||
isInitializeCoreImport(node.arguments[0]) ||
|
||||
isFbInternalImport(node.arguments[0])
|
||||
) {
|
||||
if (!isDeepRequire(node) || isInitializeCoreImport(node.arguments[0])) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -102,13 +71,13 @@ module.exports = {
|
||||
) {
|
||||
const reactNativeSource = importPath.slice('react-native/'.length);
|
||||
const publicAPIDefaultComponent = publicAPIMapping[reactNativeSource];
|
||||
if (publicAPIDefaultComponent && publicAPIDefaultComponent.default) {
|
||||
if (publicAPIDefaultComponent) {
|
||||
context.report({
|
||||
...getStandardReport(node.arguments[0]),
|
||||
fix(fixer) {
|
||||
return fixer.replaceText(
|
||||
parent,
|
||||
`{${publicAPIDefaultComponent.default}} = require('react-native')`,
|
||||
`{${publicAPIDefaultComponent}} = require('react-native')`,
|
||||
);
|
||||
},
|
||||
});
|
||||
@@ -140,10 +109,6 @@ module.exports = {
|
||||
);
|
||||
}
|
||||
|
||||
function isTypeImport(node) {
|
||||
return node.type === 'ImportDeclaration' && node.importKind === 'type';
|
||||
}
|
||||
|
||||
function isDeepRequire(node) {
|
||||
return (
|
||||
node.callee.type === 'Identifier' &&
|
||||
@@ -172,13 +137,5 @@ module.exports = {
|
||||
|
||||
return source.value === 'react-native/Libraries/Core/InitializeCore';
|
||||
}
|
||||
|
||||
function isFbInternalImport(source) {
|
||||
if (source.type !== 'Literal' || typeof source.value !== 'string') {
|
||||
return false;
|
||||
}
|
||||
|
||||
return source.value.startsWith('react-native/src/fb_internal/');
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/eslint-plugin",
|
||||
"version": "0.81.0-main",
|
||||
"version": "0.80.0-main",
|
||||
"description": "ESLint rules for @react-native/eslint-config",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
@@ -22,6 +22,6 @@
|
||||
"hermes-eslint": "0.29.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 20.19.4"
|
||||
"node": ">= 22.14.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,513 +17,92 @@
|
||||
* If the path is not matched, the auto-fix won't be suggested.
|
||||
*/
|
||||
const publicAPIMapping = {
|
||||
'Libraries/Components/AccessibilityInfo/AccessibilityInfo': {
|
||||
default: 'AccessibilityInfo',
|
||||
types: null,
|
||||
},
|
||||
'Libraries/Components/ActivityIndicator/ActivityIndicator': {
|
||||
default: 'ActivityIndicator',
|
||||
types: ['ActivityIndicatorProps'],
|
||||
},
|
||||
'Libraries/Components/Button': {
|
||||
default: 'Button',
|
||||
types: ['ButtonProps'],
|
||||
},
|
||||
'Libraries/Components/DrawerAndroid/DrawerLayoutAndroid': {
|
||||
default: 'DrawerLayoutAndroid',
|
||||
types: ['DrawerLayoutAndroidProps', 'DrawerSlideEvent'],
|
||||
},
|
||||
'Libraries/Components/LayoutConformance/LayoutConformance': {
|
||||
default: 'experimental_LayoutConformance',
|
||||
types: ['LayoutConformanceProps'],
|
||||
},
|
||||
'Libraries/Lists/FlatList': {
|
||||
default: 'FlatList',
|
||||
types: ['FlatListProps'],
|
||||
},
|
||||
'Libraries/Image/Image': {
|
||||
default: 'Image',
|
||||
types: [
|
||||
'ImageBackgroundProps',
|
||||
'ImageErrorEvent',
|
||||
'ImageLoadEvent',
|
||||
'ImageProgressEventIOS',
|
||||
'ImageProps',
|
||||
'ImagePropsAndroid',
|
||||
'ImagePropsBase',
|
||||
'ImagePropsIOS',
|
||||
'ImageResolvedAssetSource',
|
||||
'ImageSize',
|
||||
'ImageSourcePropType',
|
||||
],
|
||||
},
|
||||
'Libraries/Image/ImageSource': {
|
||||
default: null,
|
||||
types: ['ImageRequireSource', 'ImageSource', 'ImageURISource'],
|
||||
},
|
||||
'Libraries/Image/ImageBackground': {
|
||||
default: 'ImageBackground',
|
||||
types: null,
|
||||
},
|
||||
'Libraries/Components/TextInput/InputAccessoryView': {
|
||||
default: 'InputAccessoryView',
|
||||
types: ['InputAccessoryViewProps'],
|
||||
},
|
||||
'Libraries/Components/Keyboard/KeyboardAvoidingView': {
|
||||
default: 'KeyboardAvoidingView',
|
||||
types: ['KeyboardAvoidingViewProps'],
|
||||
},
|
||||
'Libraries/Modal/Modal': {
|
||||
default: 'Modal',
|
||||
types: [
|
||||
'ModalBaseProps',
|
||||
'ModalProps',
|
||||
'ModalPropsAndroid',
|
||||
'ModalPropsIOS',
|
||||
],
|
||||
},
|
||||
'Libraries/Components/Pressable/Pressable': {
|
||||
default: 'Pressable',
|
||||
types: [
|
||||
'PressableAndroidRippleConfig',
|
||||
'PressableProps',
|
||||
'PressableStateCallbackType',
|
||||
],
|
||||
},
|
||||
'Libraries/Components/ProgressBarAndroid/ProgressBarAndroid': {
|
||||
default: 'ProgressBarAndroid',
|
||||
types: ['ProgressBarAndroidProps'],
|
||||
},
|
||||
'Libraries/Components/RefreshControl/RefreshControl': {
|
||||
default: 'RefreshControl',
|
||||
types: [
|
||||
'RefreshControlProps',
|
||||
'RefreshControlPropsAndroid',
|
||||
'RefreshControlPropsIOS',
|
||||
],
|
||||
},
|
||||
'Libraries/Components/SafeAreaView/SafeAreaView': {
|
||||
default: 'SafeAreaView',
|
||||
types: null,
|
||||
},
|
||||
'Libraries/Components/ScrollView/ScrollView': {
|
||||
default: 'ScrollView',
|
||||
types: [
|
||||
'ScrollResponderType',
|
||||
'ScrollViewProps',
|
||||
'ScrollViewPropsAndroid',
|
||||
'ScrollViewPropsIOS',
|
||||
'ScrollViewImperativeMethods',
|
||||
'ScrollViewScrollToOptions',
|
||||
],
|
||||
},
|
||||
'Libraries/Lists/SectionList': {
|
||||
default: 'SectionList',
|
||||
types: [
|
||||
'SectionListProps',
|
||||
'SectionListRenderItem',
|
||||
'SectionListRenderItemInfo',
|
||||
'SectionListData',
|
||||
],
|
||||
},
|
||||
'Libraries/Components/StatusBar/StatusBar': {
|
||||
default: 'StatusBar',
|
||||
types: ['StatusBarAnimation', 'StatusBarProps', 'StatusBarStyle'],
|
||||
},
|
||||
'Libraries/Components/Switch/Switch': {
|
||||
default: 'Switch',
|
||||
types: ['SwitchChangeEvent', 'SwitchProps'],
|
||||
},
|
||||
'Libraries/Text/Text': {
|
||||
default: 'Text',
|
||||
types: ['TextProps'],
|
||||
},
|
||||
'Libraries/Components/TextInput/TextInput': {
|
||||
default: 'TextInput',
|
||||
types: [
|
||||
'AutoCapitalize',
|
||||
'EnterKeyHintTypeOptions',
|
||||
'KeyboardTypeOptions',
|
||||
'InputModeOptions',
|
||||
'TextContentType',
|
||||
'TextInputAndroidProps',
|
||||
'TextInputIOSProps',
|
||||
'TextInputProps',
|
||||
'TextInputChangeEvent',
|
||||
'TextInputContentSizeChangeEvent',
|
||||
'TextInputEndEditingEvent',
|
||||
'TextInputFocusEvent',
|
||||
'TextInputKeyPressEvent',
|
||||
'TextInputSelectionChangeEvent',
|
||||
'TextInputSubmitEditingEvent',
|
||||
'ReturnKeyTypeOptions',
|
||||
'SubmitBehavior',
|
||||
],
|
||||
},
|
||||
'Libraries/Components/Touchable/Touchable': {
|
||||
default: 'Touchable',
|
||||
types: null,
|
||||
},
|
||||
'Libraries/Components/Touchable/TouchableHighlight': {
|
||||
default: 'TouchableHighlight',
|
||||
types: ['TouchableHighlightProps'],
|
||||
},
|
||||
'Libraries/Components/Touchable/TouchableNativeFeedback': {
|
||||
default: 'TouchableNativeFeedback',
|
||||
types: ['TouchableNativeFeedbackProps'],
|
||||
},
|
||||
'Libraries/Components/Touchable/TouchableOpacity': {
|
||||
default: 'TouchableOpacity',
|
||||
types: ['TouchableOpacityProps'],
|
||||
},
|
||||
'Libraries/Components/Touchable/TouchableWithoutFeedback': {
|
||||
default: 'TouchableWithoutFeedback',
|
||||
types: ['TouchableWithoutFeedbackProps'],
|
||||
},
|
||||
'Libraries/Components/View/View': {
|
||||
default: 'View',
|
||||
types: null,
|
||||
},
|
||||
'Libraries/Components/View/ViewAccessibility': {
|
||||
default: null,
|
||||
types: [
|
||||
'AccessibilityActionEvent',
|
||||
'AccessibilityProps',
|
||||
'AccessibilityRole',
|
||||
'AccessibilityState',
|
||||
'AccessibilityValue',
|
||||
'Role',
|
||||
],
|
||||
},
|
||||
'Libraries/Components/View/ViewPropTypes': {
|
||||
default: null,
|
||||
types: [
|
||||
'GestureResponderHandlers',
|
||||
'TVViewPropsIOS',
|
||||
'ViewProps',
|
||||
'ViewPropsAndroid',
|
||||
'ViewPropsIOS',
|
||||
],
|
||||
},
|
||||
'Libraries/Lists/VirtualizedList': {
|
||||
default: 'VirtualizedList',
|
||||
types: [
|
||||
'ListRenderItemInfo',
|
||||
'ListRenderItem',
|
||||
'Separators',
|
||||
'VirtualizedListProps',
|
||||
],
|
||||
},
|
||||
'Libraries/Lists/VirtualizedSectionList': {
|
||||
default: 'VirtualizedSectionList',
|
||||
types: [
|
||||
'ScrollToLocationParamsType',
|
||||
'SectionBase',
|
||||
'VirtualizedSectionListProps',
|
||||
],
|
||||
},
|
||||
'Libraries/ActionSheetIOS/ActionSheetIOS': {
|
||||
default: 'ActionSheetIOS',
|
||||
types: [
|
||||
'ActionSheetIOSOptions',
|
||||
'ShareActionSheetIOSOptions',
|
||||
'ShareActionSheetError',
|
||||
],
|
||||
},
|
||||
'Libraries/Alert/Alert': {
|
||||
default: 'Alert',
|
||||
types: ['AlertType', 'AlertButtonStyle', 'AlertButton', 'AlertOptions'],
|
||||
},
|
||||
'Libraries/Animated/Animated': {
|
||||
default: 'Animated',
|
||||
types: null,
|
||||
},
|
||||
'Libraries/Utilities/Appearance': {
|
||||
default: 'Appearance',
|
||||
types: null,
|
||||
},
|
||||
'Libraries/ReactNative/AppRegistry': {
|
||||
default: 'AppRegistry',
|
||||
types: [
|
||||
'TaskProvider',
|
||||
'ComponentProvider',
|
||||
'ComponentProviderInstrumentationHook',
|
||||
'AppConfig',
|
||||
'Runnable',
|
||||
'Runnables',
|
||||
'Registry',
|
||||
'WrapperComponentProvider',
|
||||
'RootViewStyleProvider',
|
||||
],
|
||||
},
|
||||
'Libraries/AppState/AppState': {
|
||||
default: 'AppState',
|
||||
types: ['AppStateStatus', 'AppStateEvent'],
|
||||
},
|
||||
'Libraries/Utilities/BackHandler': {
|
||||
default: 'BackHandler',
|
||||
types: ['BackPressEventName'],
|
||||
},
|
||||
'Libraries/Components/Clipboard/Clipboard': {
|
||||
default: 'Clipboard',
|
||||
types: null,
|
||||
},
|
||||
'Libraries/Utilities/DeviceInfo': {
|
||||
default: 'DeviceInfo',
|
||||
types: ['DeviceInfoConstants'],
|
||||
},
|
||||
'src/private/devsupport/devmenu/DevMenu': {
|
||||
default: 'DevMenu',
|
||||
types: null,
|
||||
},
|
||||
'Libraries/Utilities/DevSettings': {
|
||||
default: 'DevSettings',
|
||||
types: null,
|
||||
},
|
||||
'Libraries/Utilities/Dimensions': {
|
||||
default: 'Dimensions',
|
||||
types: [
|
||||
'DimensionsPayload',
|
||||
'DisplayMetrics',
|
||||
'DisplayMetricsAndroid',
|
||||
'ScaledSize',
|
||||
],
|
||||
},
|
||||
'Libraries/Animated/Easing': {
|
||||
default: 'Easing',
|
||||
types: ['EasingFunction'],
|
||||
},
|
||||
'Libraries/ReactNative/I18nManager': {
|
||||
default: 'I18nManager',
|
||||
types: null,
|
||||
},
|
||||
'Libraries/Interaction/InteractionManager': {
|
||||
default: 'InteractionManager',
|
||||
types: ['Handle', 'PromiseTask', 'SimpleTask'],
|
||||
},
|
||||
'Libraries/Components/Keyboard/Keyboard': {
|
||||
default: 'Keyboard',
|
||||
types: [
|
||||
'AndroidKeyboardEvent',
|
||||
'IOSKeyboardEvent',
|
||||
'KeyboardEvent',
|
||||
'KeyboardEventEasing',
|
||||
'KeyboardEventName',
|
||||
'KeyboardMetrics',
|
||||
],
|
||||
},
|
||||
'Libraries/LayoutAnimation/LayoutAnimation': {
|
||||
default: 'LayoutAnimation',
|
||||
types: [
|
||||
'LayoutAnimationAnim',
|
||||
'LayoutAnimationConfig',
|
||||
'LayoutAnimationProperties',
|
||||
'LayoutAnimationProperty',
|
||||
'LayoutAnimationType',
|
||||
'LayoutAnimationTypes',
|
||||
],
|
||||
},
|
||||
'Libraries/Linking/Linking': {
|
||||
default: 'Linking',
|
||||
types: null,
|
||||
},
|
||||
'Libraries/LogBox/LogBox': {
|
||||
default: 'LogBox',
|
||||
types: ['ExtendedExceptionData', 'IgnorePattern', 'LogData'],
|
||||
},
|
||||
'Libraries/NativeModules/specs/NativeDialogManagerAndroid': {
|
||||
default: 'NativeDialogManagerAndroid',
|
||||
types: null,
|
||||
},
|
||||
'Libraries/EventEmitter/NativeEventEmitter': {
|
||||
default: 'NativeEventEmitter',
|
||||
types: [
|
||||
'EventSubscription',
|
||||
'EmitterSubscription',
|
||||
'NativeEventSubscription',
|
||||
],
|
||||
},
|
||||
'Libraries/Network/RCTNetworking': {
|
||||
default: 'Networking',
|
||||
types: null,
|
||||
},
|
||||
'Libraries/Interaction/PanResponder': {
|
||||
default: 'PanResponder',
|
||||
types: [
|
||||
'PanResponderCallbacks',
|
||||
'PanResponderGestureState',
|
||||
'PanResponderInstance',
|
||||
],
|
||||
},
|
||||
'Libraries/PermissionsAndroid/PermissionsAndroid': {
|
||||
default: 'PermissionsAndroid',
|
||||
types: ['Permission', 'PermissionStatus', 'Rationale'],
|
||||
},
|
||||
'Libraries/Utilities/PixelRatio': {
|
||||
default: 'PixelRatio',
|
||||
types: null,
|
||||
},
|
||||
'Libraries/PushNotificationIOS/PushNotificationIOS': {
|
||||
default: 'PushNotificationIOS',
|
||||
types: ['PushNotificationEventName', 'PushNotificationPermissions'],
|
||||
},
|
||||
'Libraries/Settings/Settings': {
|
||||
default: 'Settings',
|
||||
types: null,
|
||||
},
|
||||
'Libraries/Share/Share': {
|
||||
default: 'Share',
|
||||
types: ['ShareAction', 'ShareContent', 'ShareOptions'],
|
||||
},
|
||||
'Libraries/StyleSheet/StyleSheet': {
|
||||
default: 'StyleSheet',
|
||||
types: [
|
||||
'ColorValue',
|
||||
'ImageStyle',
|
||||
'FilterFunction',
|
||||
'FontVariant',
|
||||
'NativeColorValue',
|
||||
'OpaqueColorValue',
|
||||
'StyleProp',
|
||||
'TextStyle',
|
||||
'TransformsStyle',
|
||||
'ViewStyle',
|
||||
],
|
||||
},
|
||||
'Libraries/StyleSheet/StyleSheetTypes': {
|
||||
default: null,
|
||||
types: [
|
||||
'BoxShadowValue',
|
||||
'CursorValue',
|
||||
'DimensionValue',
|
||||
'DropShadowValue',
|
||||
'EdgeInsetsValue',
|
||||
'PointValue',
|
||||
],
|
||||
},
|
||||
'Libraries/StyleSheet/Rect': {
|
||||
default: null,
|
||||
types: ['Insets'],
|
||||
},
|
||||
'Libraries/Performance/Systrace': {
|
||||
default: 'Systrace',
|
||||
types: null,
|
||||
},
|
||||
'Libraries/Components/ToastAndroid/ToastAndroid': {
|
||||
default: 'ToastAndroid',
|
||||
types: null,
|
||||
},
|
||||
'Libraries/TurboModule/TurboModuleRegistry': {
|
||||
default: 'TurboModuleRegistry',
|
||||
types: null,
|
||||
},
|
||||
'Libraries/TurboModule/RCTExport': {
|
||||
default: null,
|
||||
types: ['TurboModule'],
|
||||
},
|
||||
'Libraries/ReactNative/UIManager': {
|
||||
default: 'UIManager',
|
||||
types: null,
|
||||
},
|
||||
'Libraries/Animated/useAnimatedValue': {
|
||||
default: 'useAnimatedValue',
|
||||
types: null,
|
||||
},
|
||||
'Libraries/Utilities/useColorScheme': {
|
||||
default: 'useColorScheme',
|
||||
types: null,
|
||||
},
|
||||
'src/private/specs_DEPRECATED/modules/NativeAppearance': {
|
||||
default: null,
|
||||
types: ['ColorSchemeName'],
|
||||
},
|
||||
'Libraries/Utilities/useWindowDimensions': {
|
||||
default: 'useWindowDimensions',
|
||||
types: null,
|
||||
},
|
||||
'Libraries/UTFSequence': {
|
||||
default: 'UTFSequence',
|
||||
types: null,
|
||||
},
|
||||
'Libraries/Vibration/Vibration': {
|
||||
default: 'Vibration',
|
||||
types: null,
|
||||
},
|
||||
'Libraries/Utilities/codegenNativeComponent': {
|
||||
default: 'codegenNativeComponent',
|
||||
types: null,
|
||||
},
|
||||
'Libraries/Utilities/codegenNativeCommands': {
|
||||
default: 'codegenNativeCommands',
|
||||
types: null,
|
||||
},
|
||||
'Libraries/EventEmitter/RCTDeviceEventEmitter': {
|
||||
default: 'DeviceEventEmitter',
|
||||
types: null,
|
||||
},
|
||||
'Libraries/StyleSheet/PlatformColorValueTypesIOS': {
|
||||
default: 'DynamicColorIOS',
|
||||
types: ['DynamicColorIOSTuple'],
|
||||
},
|
||||
'Libraries/EventEmitter/RCTNativeAppEventEmitter': {
|
||||
default: 'NativeAppEventEmitter',
|
||||
types: null,
|
||||
},
|
||||
'Libraries/BatchedBridge/NativeModules': {
|
||||
default: 'NativeModules',
|
||||
types: null,
|
||||
},
|
||||
'Libraries/Utilities/Platform': {
|
||||
default: 'Platform',
|
||||
types: null,
|
||||
},
|
||||
'./Libraries/Utilities/PlatformTypes': {
|
||||
default: null,
|
||||
types: ['PlatformOSType', 'PlatformSelectSpec'],
|
||||
},
|
||||
'Libraries/StyleSheet/PlatformColorValueTypes': {
|
||||
default: 'PlatformColor',
|
||||
types: null,
|
||||
},
|
||||
'Libraries/StyleSheet/processColor': {
|
||||
default: 'processColor',
|
||||
types: ['ProcessedColorValue'],
|
||||
},
|
||||
'Libraries/ReactNative/requireNativeComponent': {
|
||||
default: 'requireNativeComponent',
|
||||
types: null,
|
||||
},
|
||||
'Libraries/ReactNative/RootTag': {
|
||||
default: 'RootTagContext',
|
||||
types: ['RootTag'],
|
||||
},
|
||||
'Libraries/Types/RootTagTypes': {
|
||||
default: null,
|
||||
types: ['RootTag'],
|
||||
},
|
||||
'src/private/types/HostInstance': {
|
||||
default: null,
|
||||
types: [
|
||||
'HostInstance',
|
||||
'NativeMethods',
|
||||
'NativeMethodsMixin',
|
||||
'MeasureInWindowOnSuccessCallback',
|
||||
'MeasureLayoutOnSuccessCallback',
|
||||
'MeasureOnSuccessCallback',
|
||||
],
|
||||
},
|
||||
'src/private/types/HostComponent': {
|
||||
default: null,
|
||||
types: ['HostComponent'],
|
||||
},
|
||||
'Libraries/vendor/core/ErrorUtils': {
|
||||
default: null,
|
||||
types: ['ErrorUtils'],
|
||||
},
|
||||
'Libraries/ReactPrivate/ReactNativePrivateInterface': {
|
||||
default: null,
|
||||
types: ['PublicRootInstance', 'PublicTextInstance'],
|
||||
},
|
||||
'Libraries/Components/AccessibilityInfo/AccessibilityInfo':
|
||||
'AccessibilityInfo',
|
||||
'Libraries/Components/ActivityIndicator/ActivityIndicator':
|
||||
'ActivityIndicator',
|
||||
'Libraries/Components/Button': 'Button',
|
||||
'Libraries/Components/DrawerAndroid/DrawerLayoutAndroid':
|
||||
'DrawerLayoutAndroid',
|
||||
'Libraries/Components/LayoutConformance/LayoutConformance':
|
||||
'experimental_LayoutConformance',
|
||||
'Libraries/Lists/FlatList': 'FlatList',
|
||||
'Libraries/Image/Image': 'Image',
|
||||
'Libraries/Image/ImageBackground': 'ImageBackground',
|
||||
'Libraries/Components/TextInput/InputAccessoryView': 'InputAccessoryView',
|
||||
'Libraries/Components/Keyboard/KeyboardAvoidingView': 'KeyboardAvoidingView',
|
||||
'Libraries/Modal/Modal': 'Modal',
|
||||
'Libraries/Components/Pressable/Pressable': 'Pressable',
|
||||
'Libraries/Components/ProgressBarAndroid/ProgressBarAndroid':
|
||||
'ProgressBarAndroid',
|
||||
'Libraries/Components/RefreshControl/RefreshControl': 'RefreshControl',
|
||||
'Libraries/Components/SafeAreaView/SafeAreaView': 'SafeAreaView',
|
||||
'Libraries/Components/ScrollView/ScrollView': 'ScrollView',
|
||||
'Libraries/Lists/SectionList': 'SectionList',
|
||||
'Libraries/Components/StatusBar/StatusBar': 'StatusBar',
|
||||
'Libraries/Components/Switch/Switch': 'Switch',
|
||||
'Libraries/Text/Text': 'Text',
|
||||
'Libraries/Components/TextInput/TextInput': 'TextInput',
|
||||
'Libraries/Components/Touchable/Touchable': 'Touchable',
|
||||
'Libraries/Components/Touchable/TouchableHighlight': 'TouchableHighlight',
|
||||
'Libraries/Components/Touchable/TouchableNativeFeedback':
|
||||
'TouchableNativeFeedback',
|
||||
'Libraries/Components/Touchable/TouchableOpacity': 'TouchableOpacity',
|
||||
'Libraries/Components/Touchable/TouchableWithoutFeedback':
|
||||
'TouchableWithoutFeedback',
|
||||
'Libraries/Components/View/View': 'View',
|
||||
'Libraries/Lists/VirtualizedList': 'VirtualizedList',
|
||||
'Libraries/Lists/VirtualizedSectionList': 'VirtualizedSectionList',
|
||||
'Libraries/ActionSheetIOS/ActionSheetIOS': 'ActionSheetIOS',
|
||||
'Libraries/Alert/Alert': 'Alert',
|
||||
'Libraries/Animated/Animated': 'Animated',
|
||||
'Libraries/Utilities/Appearance': 'Appearance',
|
||||
'Libraries/ReactNative/AppRegistry': 'AppRegistry',
|
||||
'Libraries/AppState/AppState': 'AppState',
|
||||
'Libraries/Utilities/BackHandler': 'BackHandler',
|
||||
'Libraries/Components/Clipboard/Clipboard': 'Clipboard',
|
||||
'Libraries/Utilities/DeviceInfo': 'DeviceInfo',
|
||||
'src/private/devsupport/devmenu/DevMenu': 'DevMenu',
|
||||
'Libraries/Utilities/DevSettings': 'DevSettings',
|
||||
'Libraries/Utilities/Dimensions': 'Dimensions',
|
||||
'Libraries/Animated/Easing': 'Easing',
|
||||
'Libraries/ReactNative/I18nManager': 'I18nManager',
|
||||
'Libraries/Interaction/InteractionManager': 'InteractionManager',
|
||||
'Libraries/Components/Keyboard/Keyboard': 'Keyboard',
|
||||
'Libraries/LayoutAnimation/LayoutAnimation': 'LayoutAnimation',
|
||||
'Libraries/Linking/Linking': 'Linking',
|
||||
'Libraries/LogBox/LogBox': 'LogBox',
|
||||
'Libraries/NativeModules/specs/NativeDialogManagerAndroid':
|
||||
'NativeDialogManagerAndroid',
|
||||
'Libraries/EventEmitter/NativeEventEmitter': 'NativeEventEmitter',
|
||||
'Libraries/Network/RCTNetworking': 'Networking',
|
||||
'Libraries/Interaction/PanResponder': 'PanResponder',
|
||||
'Libraries/PermissionsAndroid/PermissionsAndroid': 'PermissionsAndroid',
|
||||
'Libraries/Utilities/PixelRatio': 'PixelRatio',
|
||||
'Libraries/PushNotificationIOS/PushNotificationIOS': 'PushNotificationIOS',
|
||||
'Libraries/Settings/Settings': 'Settings',
|
||||
'Libraries/Share/Share': 'Share',
|
||||
'Libraries/StyleSheet/StyleSheet': 'StyleSheet',
|
||||
'Libraries/Performance/Systrace': 'Systrace',
|
||||
'Libraries/Components/ToastAndroid/ToastAndroid': 'ToastAndroid',
|
||||
'Libraries/TurboModule/TurboModuleRegistry': 'TurboModuleRegistry',
|
||||
'Libraries/ReactNative/UIManager': 'UIManager',
|
||||
'Libraries/Animated/useAnimatedValue': 'useAnimatedValue',
|
||||
'Libraries/Utilities/useColorScheme': 'useColorScheme',
|
||||
'Libraries/Utilities/useWindowDimensions': 'useWindowDimensions',
|
||||
'Libraries/UTFSequence': 'UTFSequence',
|
||||
'Libraries/Vibration/Vibration': 'Vibration',
|
||||
'Libraries/Utilities/codegenNativeComponent': 'codegenNativeComponent',
|
||||
'Libraries/Utilities/codegenNativeCommands': 'codegenNativeCommands',
|
||||
'Libraries/EventEmitter/RCTDeviceEventEmitter': 'DeviceEventEmitter',
|
||||
'Libraries/StyleSheet/PlatformColorValueTypesIOS': 'DynamicColorIOS',
|
||||
'Libraries/EventEmitter/RCTNativeAppEventEmitter': 'NativeAppEventEmitter',
|
||||
'Libraries/BatchedBridge/NativeModules': 'NativeModules',
|
||||
'Libraries/Utilities/Platform': 'Platform',
|
||||
'Libraries/StyleSheet/PlatformColorValueTypes': 'PlatformColor',
|
||||
'Libraries/StyleSheet/processColor': 'processColor',
|
||||
'Libraries/ReactNative/requireNativeComponent': 'requireNativeComponent',
|
||||
'Libraries/ReactNative/RootTag': 'RootTagContext',
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/eslint-plugin-specs",
|
||||
"version": "0.81.0-main",
|
||||
"version": "0.80.0-main",
|
||||
"description": "ESLint rules to validate NativeModule and Component Specs",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
@@ -26,7 +26,7 @@
|
||||
"dependencies": {
|
||||
"@babel/core": "^7.25.2",
|
||||
"@babel/plugin-transform-flow-strip-types": "^7.25.2",
|
||||
"@react-native/codegen": "0.81.0-main",
|
||||
"@react-native/codegen": "0.80.0-main",
|
||||
"make-dir": "^2.1.0",
|
||||
"pirates": "^4.0.1",
|
||||
"source-map-support": "0.5.0"
|
||||
@@ -36,6 +36,6 @@
|
||||
"hermes-eslint": "0.29.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 20.19.4"
|
||||
"node": ">= 22.14.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,10 +5,7 @@
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.kotlin.jvm).apply(false)
|
||||
alias(libs.plugins.ktfmt).apply(true)
|
||||
}
|
||||
plugins { alias(libs.plugins.kotlin.jvm).apply(false) }
|
||||
|
||||
tasks.register("build") {
|
||||
dependsOn(
|
||||
@@ -27,21 +24,3 @@ tasks.register("clean") {
|
||||
":shared:clean",
|
||||
)
|
||||
}
|
||||
|
||||
tasks.named("ktfmtCheck") {
|
||||
dependsOn(
|
||||
":react-native-gradle-plugin:ktfmtCheck",
|
||||
":settings-plugin:ktfmtCheck",
|
||||
":shared-testutil:ktfmtCheck",
|
||||
":shared:ktfmtCheck",
|
||||
)
|
||||
}
|
||||
|
||||
tasks.named("ktfmtFormat") {
|
||||
dependsOn(
|
||||
":react-native-gradle-plugin:ktfmtFormat",
|
||||
":settings-plugin:ktfmtFormat",
|
||||
":shared-testutil:ktfmtFormat",
|
||||
":shared:ktfmtFormat",
|
||||
)
|
||||
}
|
||||
|
||||
@@ -6,7 +6,6 @@ javapoet = "1.13.0"
|
||||
junit = "4.13.2"
|
||||
kotlin = "2.1.20"
|
||||
assertj = "3.25.1"
|
||||
ktfmt = "0.22.0"
|
||||
|
||||
[libraries]
|
||||
kotlin-gradle-plugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" }
|
||||
@@ -19,4 +18,3 @@ assertj = { module = "org.assertj:assertj-core", version.ref = "assertj" }
|
||||
|
||||
[plugins]
|
||||
kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
|
||||
ktfmt = { id = "com.ncorti.ktfmt.gradle", version.ref = "ktfmt" }
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.1-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/gradle-plugin",
|
||||
"version": "0.81.0-main",
|
||||
"version": "0.80.0-main",
|
||||
"description": "Gradle Plugin for React Native",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
@@ -16,7 +16,7 @@
|
||||
],
|
||||
"bugs": "https://github.com/facebook/react-native/issues",
|
||||
"engines": {
|
||||
"node": ">= 20.19.4"
|
||||
"node": ">= 22.14.0"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "./gradlew build",
|
||||
|
||||
@@ -12,7 +12,6 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.kotlin.jvm)
|
||||
alias(libs.plugins.ktfmt)
|
||||
id("java-gradle-plugin")
|
||||
}
|
||||
|
||||
|
||||
-2
@@ -18,7 +18,6 @@ import com.facebook.react.tasks.GenerateEntryPointTask
|
||||
import com.facebook.react.tasks.GeneratePackageListTask
|
||||
import com.facebook.react.utils.AgpConfiguratorUtils.configureBuildConfigFieldsForApp
|
||||
import com.facebook.react.utils.AgpConfiguratorUtils.configureBuildConfigFieldsForLibraries
|
||||
import com.facebook.react.utils.AgpConfiguratorUtils.configureBuildTypesForApp
|
||||
import com.facebook.react.utils.AgpConfiguratorUtils.configureDevServerLocation
|
||||
import com.facebook.react.utils.AgpConfiguratorUtils.configureNamespaceForLibraries
|
||||
import com.facebook.react.utils.BackwardCompatUtils.configureBackwardCompatibilityReactMap
|
||||
@@ -85,7 +84,6 @@ class ReactPlugin : Plugin<Project> {
|
||||
configureAutolinking(project, extension)
|
||||
configureCodegen(project, extension, rootExtension, isLibrary = false)
|
||||
configureResources(project, extension)
|
||||
configureBuildTypesForApp(project)
|
||||
}
|
||||
|
||||
// Library Only Configuration
|
||||
|
||||
-1
@@ -148,7 +148,6 @@ abstract class GeneratePackageListTask : DefaultTask() {
|
||||
|
||||
{{ packageImports }}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public class PackageList {
|
||||
private Application application;
|
||||
private ReactNativeHost reactNativeHost;
|
||||
|
||||
-21
@@ -19,7 +19,6 @@ import java.net.Inet4Address
|
||||
import java.net.NetworkInterface
|
||||
import javax.xml.parsers.DocumentBuilder
|
||||
import javax.xml.parsers.DocumentBuilderFactory
|
||||
import kotlin.plus
|
||||
import org.gradle.api.Action
|
||||
import org.gradle.api.Project
|
||||
import org.gradle.api.plugins.AppliedPlugin
|
||||
@@ -28,26 +27,6 @@ import org.w3c.dom.Element
|
||||
@Suppress("UnstableApiUsage")
|
||||
internal object AgpConfiguratorUtils {
|
||||
|
||||
fun configureBuildTypesForApp(project: Project) {
|
||||
val action =
|
||||
Action<AppliedPlugin> {
|
||||
project.extensions
|
||||
.getByType(ApplicationAndroidComponentsExtension::class.java)
|
||||
.finalizeDsl { ext ->
|
||||
ext.buildTypes {
|
||||
val debug =
|
||||
getByName("debug").apply {
|
||||
manifestPlaceholders["usesCleartextTraffic"] = "true"
|
||||
}
|
||||
getByName("release").apply {
|
||||
manifestPlaceholders["usesCleartextTraffic"] = "false"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
project.pluginManager.withPlugin("com.android.application", action)
|
||||
}
|
||||
|
||||
fun configureBuildConfigFieldsForApp(project: Project, extension: ReactExtension) {
|
||||
val action =
|
||||
Action<AppliedPlugin> {
|
||||
|
||||
-27
@@ -8,14 +8,12 @@
|
||||
package com.facebook.react.utils
|
||||
|
||||
import com.facebook.react.utils.PropertyUtils.DEFAULT_INTERNAL_PUBLISHING_GROUP
|
||||
import com.facebook.react.utils.PropertyUtils.EXCLUSIVE_ENTEPRISE_REPOSITORY
|
||||
import com.facebook.react.utils.PropertyUtils.INCLUDE_JITPACK_REPOSITORY
|
||||
import com.facebook.react.utils.PropertyUtils.INCLUDE_JITPACK_REPOSITORY_DEFAULT
|
||||
import com.facebook.react.utils.PropertyUtils.INTERNAL_PUBLISHING_GROUP
|
||||
import com.facebook.react.utils.PropertyUtils.INTERNAL_REACT_NATIVE_MAVEN_LOCAL_REPO
|
||||
import com.facebook.react.utils.PropertyUtils.INTERNAL_USE_HERMES_NIGHTLY
|
||||
import com.facebook.react.utils.PropertyUtils.INTERNAL_VERSION_NAME
|
||||
import com.facebook.react.utils.PropertyUtils.SCOPED_EXCLUSIVE_ENTEPRISE_REPOSITORY
|
||||
import com.facebook.react.utils.PropertyUtils.SCOPED_INCLUDE_JITPACK_REPOSITORY
|
||||
import java.io.File
|
||||
import java.net.URI
|
||||
@@ -30,12 +28,6 @@ internal object DependencyUtils {
|
||||
* party libraries which are auto-linked.
|
||||
*/
|
||||
fun configureRepositories(project: Project) {
|
||||
val exclusiveEnterpriseRepository = project.rootProject.exclusiveEnterpriseRepository()
|
||||
if (exclusiveEnterpriseRepository != null) {
|
||||
project.logger.lifecycle(
|
||||
"Replacing ALL Maven Repositories with: $exclusiveEnterpriseRepository")
|
||||
}
|
||||
|
||||
project.rootProject.allprojects { eachProject ->
|
||||
with(eachProject) {
|
||||
if (hasProperty(INTERNAL_REACT_NATIVE_MAVEN_LOCAL_REPO)) {
|
||||
@@ -44,16 +36,6 @@ internal object DependencyUtils {
|
||||
repo.content { it.excludeGroup("org.webkit") }
|
||||
}
|
||||
}
|
||||
|
||||
if (exclusiveEnterpriseRepository != null) {
|
||||
// We remove all previously set repositories and only configure the proxy provided by the
|
||||
// user.
|
||||
rootProject.repositories.clear()
|
||||
mavenRepoFromUrl(exclusiveEnterpriseRepository)
|
||||
// We return here as we don't want to configure other repositories as well.
|
||||
return@allprojects
|
||||
}
|
||||
|
||||
// We add the snapshot for users on nightlies.
|
||||
mavenRepoFromUrl("https://central.sonatype.com/repository/maven-snapshots/") { repo ->
|
||||
repo.content { it.excludeGroup("org.webkit") }
|
||||
@@ -199,13 +181,4 @@ internal object DependencyUtils {
|
||||
property(INCLUDE_JITPACK_REPOSITORY).toString().toBoolean()
|
||||
else -> INCLUDE_JITPACK_REPOSITORY_DEFAULT
|
||||
}
|
||||
|
||||
internal fun Project.exclusiveEnterpriseRepository() =
|
||||
when {
|
||||
hasProperty(SCOPED_EXCLUSIVE_ENTEPRISE_REPOSITORY) ->
|
||||
property(SCOPED_EXCLUSIVE_ENTEPRISE_REPOSITORY).toString()
|
||||
hasProperty(EXCLUSIVE_ENTEPRISE_REPOSITORY) ->
|
||||
property(EXCLUSIVE_ENTEPRISE_REPOSITORY).toString()
|
||||
else -> null
|
||||
}
|
||||
}
|
||||
|
||||
-6
@@ -34,12 +34,6 @@ object PropertyUtils {
|
||||
const val INCLUDE_JITPACK_REPOSITORY = "includeJitpackRepository"
|
||||
const val SCOPED_INCLUDE_JITPACK_REPOSITORY = "react.includeJitpackRepository"
|
||||
|
||||
/**
|
||||
* Public property that allows to configure an enterprise repository proxy as exclusive repository
|
||||
*/
|
||||
const val EXCLUSIVE_ENTEPRISE_REPOSITORY = "exclusiveEnterpriseRepository"
|
||||
const val SCOPED_EXCLUSIVE_ENTEPRISE_REPOSITORY = "react.exclusiveEnterpriseRepository"
|
||||
|
||||
/** By default we include JitPack to avoid breaking user builds */
|
||||
internal const val INCLUDE_JITPACK_REPOSITORY_DEFAULT = true
|
||||
|
||||
|
||||
+1
-3
@@ -233,7 +233,6 @@ class GeneratePackageListTaskTest {
|
||||
|
||||
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public class PackageList {
|
||||
private Application application;
|
||||
private ReactNativeHost reactNativeHost;
|
||||
@@ -312,8 +311,7 @@ class GeneratePackageListTaskTest {
|
||||
import com.facebook.react.aPackage;
|
||||
// @react-native/another-package
|
||||
import com.facebook.react.anotherPackage;
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
|
||||
public class PackageList {
|
||||
private Application application;
|
||||
private ReactNativeHost reactNativeHost;
|
||||
|
||||
+1
-44
@@ -10,7 +10,6 @@ package com.facebook.react.utils
|
||||
import com.facebook.react.tests.createProject
|
||||
import com.facebook.react.utils.DependencyUtils.configureDependencies
|
||||
import com.facebook.react.utils.DependencyUtils.configureRepositories
|
||||
import com.facebook.react.utils.DependencyUtils.exclusiveEnterpriseRepository
|
||||
import com.facebook.react.utils.DependencyUtils.getDependencySubstitutions
|
||||
import com.facebook.react.utils.DependencyUtils.mavenRepoFromURI
|
||||
import com.facebook.react.utils.DependencyUtils.mavenRepoFromUrl
|
||||
@@ -100,24 +99,6 @@ class DependencyUtilsTest {
|
||||
.isNotNull()
|
||||
}
|
||||
|
||||
@Test
|
||||
fun configureRepositories_withExclusiveEnterpriseRepository_replacesAllRepositories() {
|
||||
val repositoryURI = URI.create("https://maven.myfabolousorganization.it")
|
||||
|
||||
val project = createProject()
|
||||
project.rootProject.extensions.extraProperties.set(
|
||||
"exclusiveEnterpriseRepository", repositoryURI.toString())
|
||||
|
||||
configureRepositories(project)
|
||||
|
||||
assertThat(project.repositories).hasSize(1)
|
||||
assertThat(
|
||||
project.repositories.firstOrNull {
|
||||
it is MavenArtifactRepository && it.url == repositoryURI
|
||||
})
|
||||
.isNotNull()
|
||||
}
|
||||
|
||||
@Test
|
||||
fun configureRepositories_withIncludeJitpackRepositoryFalse_doesNotContainJitPack() {
|
||||
val repositoryURI = URI.create("https://www.jitpack.io")
|
||||
@@ -489,7 +470,7 @@ class DependencyUtilsTest {
|
||||
@Test
|
||||
fun shouldAddJitPack_withUnscopedProperty() {
|
||||
val project = createProject(tempFolder.root)
|
||||
project.extensions.extraProperties.set("includeJitpackRepository", "false")
|
||||
project.extensions.extraProperties.set("react.includeJitpackRepository", "false")
|
||||
assertThat(project.shouldAddJitPack()).isFalse()
|
||||
}
|
||||
|
||||
@@ -498,28 +479,4 @@ class DependencyUtilsTest {
|
||||
val project = createProject(tempFolder.root)
|
||||
assertThat(project.shouldAddJitPack()).isTrue()
|
||||
}
|
||||
|
||||
@Test
|
||||
fun exclusiveEnterpriseRepository_withScopedProperty() {
|
||||
val project = createProject(tempFolder.root)
|
||||
project.extensions.extraProperties.set(
|
||||
"react.exclusiveEnterpriseRepository", "https://maven.myfabolousorganization.it")
|
||||
assertThat(project.exclusiveEnterpriseRepository())
|
||||
.isEqualTo("https://maven.myfabolousorganization.it")
|
||||
}
|
||||
|
||||
@Test
|
||||
fun exclusiveEnterpriseRepository_withUnscopedProperty() {
|
||||
val project = createProject(tempFolder.root)
|
||||
project.extensions.extraProperties.set(
|
||||
"exclusiveEnterpriseRepository", "https://maven.myfabolousorganization.it")
|
||||
assertThat(project.exclusiveEnterpriseRepository())
|
||||
.isEqualTo("https://maven.myfabolousorganization.it")
|
||||
}
|
||||
|
||||
@Test
|
||||
fun exclusiveEnterpriseRepository_defaultIsTrue() {
|
||||
val project = createProject(tempFolder.root)
|
||||
assertThat(project.exclusiveEnterpriseRepository()).isNull()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,7 +12,6 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.kotlin.jvm)
|
||||
alias(libs.plugins.ktfmt)
|
||||
id("java-gradle-plugin")
|
||||
}
|
||||
|
||||
|
||||
@@ -10,10 +10,7 @@ import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
import org.jetbrains.kotlin.gradle.dsl.KotlinVersion
|
||||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.kotlin.jvm)
|
||||
alias(libs.plugins.ktfmt)
|
||||
}
|
||||
plugins { alias(libs.plugins.kotlin.jvm) }
|
||||
|
||||
repositories { mavenCentral() }
|
||||
|
||||
|
||||
@@ -10,10 +10,7 @@ import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
import org.jetbrains.kotlin.gradle.dsl.KotlinVersion
|
||||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.kotlin.jvm)
|
||||
alias(libs.plugins.ktfmt)
|
||||
}
|
||||
plugins { alias(libs.plugins.kotlin.jvm) }
|
||||
|
||||
repositories { mavenCentral() }
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/metro-config",
|
||||
"version": "0.81.0-main",
|
||||
"version": "0.80.0-main",
|
||||
"description": "Metro configuration for React Native.",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
@@ -16,7 +16,7 @@
|
||||
],
|
||||
"bugs": "https://github.com/facebook/react-native/issues",
|
||||
"engines": {
|
||||
"node": ">= 20.19.4"
|
||||
"node": ">= 22.14.0"
|
||||
},
|
||||
"exports": {
|
||||
".": "./src/index.js",
|
||||
@@ -26,9 +26,9 @@
|
||||
"dist"
|
||||
],
|
||||
"dependencies": {
|
||||
"@react-native/js-polyfills": "0.81.0-main",
|
||||
"@react-native/metro-babel-transformer": "0.81.0-main",
|
||||
"metro-config": "^0.83.0",
|
||||
"metro-runtime": "^0.83.0"
|
||||
"@react-native/js-polyfills": "0.80.0-main",
|
||||
"@react-native/metro-babel-transformer": "0.80.0-main",
|
||||
"metro-config": "^0.82.4",
|
||||
"metro-runtime": "^0.82.4"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ export type * from './index.flow';
|
||||
*/
|
||||
|
||||
if (!process.env.BUILD_EXCLUDE_BABEL_REGISTER) {
|
||||
require('../../../scripts/shared/babelRegister').registerForMonorepo();
|
||||
require('../../../scripts/babel-register').registerForMonorepo();
|
||||
}
|
||||
|
||||
module.exports = require('./index.flow');
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/new-app-screen",
|
||||
"version": "0.81.0-main",
|
||||
"version": "0.80.0-main",
|
||||
"description": "NewAppScreen component for React Native",
|
||||
"keywords": [
|
||||
"react-native"
|
||||
@@ -30,6 +30,6 @@
|
||||
}
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 20.19.4"
|
||||
"node": ">= 22.14.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@ const Links: Array<{
|
||||
},
|
||||
{
|
||||
title: 'Community',
|
||||
description: 'Explore & get help',
|
||||
description: 'Expore & get help',
|
||||
url: 'https://reactnative.dev/community/overview',
|
||||
},
|
||||
{
|
||||
|
||||
@@ -13,7 +13,10 @@ import {ThemedText, useTheme} from './Theme';
|
||||
import * as React from 'react';
|
||||
import {
|
||||
Image,
|
||||
Platform,
|
||||
SafeAreaView,
|
||||
ScrollView,
|
||||
StatusBar,
|
||||
StyleSheet,
|
||||
Text,
|
||||
TouchableHighlight,
|
||||
@@ -26,32 +29,24 @@ import {version as ReactNativeVersion} from 'react-native/Libraries/Core/ReactNa
|
||||
|
||||
export type NewAppScreenProps = $ReadOnly<{
|
||||
templateFileName?: string,
|
||||
safeAreaInsets?: $ReadOnly<{
|
||||
top: number,
|
||||
bottom: number,
|
||||
left: number,
|
||||
right: number,
|
||||
}>,
|
||||
}>;
|
||||
|
||||
const statusBarHeightOffset = Platform.select({
|
||||
android: StatusBar.currentHeight || 0,
|
||||
default: 0,
|
||||
});
|
||||
|
||||
export default function NewAppScreen({
|
||||
templateFileName = 'App.tsx',
|
||||
safeAreaInsets = {top: 0, bottom: 0, left: 0, right: 0},
|
||||
}: NewAppScreenProps): React.Node {
|
||||
const {colors} = useTheme();
|
||||
const isDarkMode = useColorScheme() === 'dark';
|
||||
const isLargeScreen = useWindowDimensions().width > 600;
|
||||
|
||||
return (
|
||||
<View
|
||||
style={{
|
||||
backgroundColor: colors.background,
|
||||
paddingTop: safeAreaInsets.top,
|
||||
paddingLeft: safeAreaInsets.left,
|
||||
paddingRight: safeAreaInsets.right,
|
||||
}}>
|
||||
<ScrollView style={{paddingBottom: safeAreaInsets.bottom}}>
|
||||
<View style={styles.container}>
|
||||
<SafeAreaView style={{backgroundColor: colors.background}}>
|
||||
<ScrollView>
|
||||
<View style={[styles.container, {paddingTop: statusBarHeightOffset}]}>
|
||||
<View style={styles.header}>
|
||||
<Image
|
||||
style={styles.logo}
|
||||
@@ -104,7 +99,7 @@ export default function NewAppScreen({
|
||||
</View>
|
||||
</View>
|
||||
</ScrollView>
|
||||
</View>
|
||||
</SafeAreaView>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
-8
@@ -11,14 +11,6 @@ import type * as React from 'react';
|
||||
|
||||
export type NewAppScreenProps = Readonly<{
|
||||
templateFileName?: string | undefined;
|
||||
safeAreaInsets?:
|
||||
| Readonly<{
|
||||
top: number;
|
||||
bottom: number;
|
||||
left: number;
|
||||
right: number;
|
||||
}>
|
||||
| undefined;
|
||||
}>;
|
||||
|
||||
export function NewAppScreen(props: NewAppScreenProps): React.ReactNode;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/normalize-colors",
|
||||
"version": "0.81.0-main",
|
||||
"version": "0.80.0-main",
|
||||
"description": "Color normalization for React Native.",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
|
||||
@@ -16,7 +16,6 @@ describe('console.timeStamp()', () => {
|
||||
});
|
||||
|
||||
it("doesn't throw when label is not specified", () => {
|
||||
// $FlowExpectedError[incompatible-call] not passing label intentionally
|
||||
expect(() => console.timeStamp()).not.toThrow();
|
||||
});
|
||||
|
||||
@@ -26,6 +25,7 @@ describe('console.timeStamp()', () => {
|
||||
|
||||
it("doesn't throw when additional arguments are specified", () => {
|
||||
expect(() =>
|
||||
// $FlowExpectedError[extra-arg]
|
||||
console.timeStamp('label', 100, 500, 'Track', 'Group', 'error'),
|
||||
).not.toThrow();
|
||||
});
|
||||
@@ -34,7 +34,7 @@ describe('console.timeStamp()', () => {
|
||||
// $FlowExpectedError[incompatible-call]
|
||||
expect(() => console.timeStamp({})).not.toThrow();
|
||||
expect(() =>
|
||||
// $FlowExpectedError[incompatible-call]
|
||||
// $FlowExpectedError[extra-arg]
|
||||
console.timeStamp('label', true, null, {}, [], () => {}),
|
||||
).not.toThrow();
|
||||
});
|
||||
|
||||
@@ -569,7 +569,10 @@ function consoleAssertPolyfill(expression, label) {
|
||||
}
|
||||
}
|
||||
|
||||
function stub() {}
|
||||
// https://developer.mozilla.org/en-US/docs/Web/API/console/timeStamp_static.
|
||||
// Non-standard API for recording markers on a timeline of the Performance instrumentation.
|
||||
// The actual logging is not provided by definition.
|
||||
function consoleTimeStampPolyfill() {}
|
||||
|
||||
if (global.nativeLoggingHook) {
|
||||
const originalConsole = global.console;
|
||||
@@ -582,11 +585,6 @@ if (global.nativeLoggingHook) {
|
||||
}
|
||||
|
||||
global.console = {
|
||||
time: stub,
|
||||
timeEnd: stub,
|
||||
timeStamp: stub,
|
||||
count: stub,
|
||||
countReset: stub,
|
||||
...(originalConsole ?? {}),
|
||||
error: getNativeLogFunction(LOG_LEVELS.error),
|
||||
info: getNativeLogFunction(LOG_LEVELS.info),
|
||||
@@ -599,6 +597,7 @@ if (global.nativeLoggingHook) {
|
||||
groupEnd: consoleGroupEndPolyfill,
|
||||
groupCollapsed: consoleGroupCollapsedPolyfill,
|
||||
assert: consoleAssertPolyfill,
|
||||
timeStamp: consoleTimeStampPolyfill,
|
||||
};
|
||||
|
||||
// TODO(T206796580): This was copy-pasted from ExceptionsManager.js
|
||||
@@ -677,6 +676,7 @@ if (global.nativeLoggingHook) {
|
||||
});
|
||||
}
|
||||
} else if (!global.console) {
|
||||
function stub() {}
|
||||
const log = global.print || stub;
|
||||
|
||||
global.console = {
|
||||
@@ -692,8 +692,6 @@ if (global.nativeLoggingHook) {
|
||||
}
|
||||
},
|
||||
clear: stub,
|
||||
count: stub,
|
||||
countReset: stub,
|
||||
dir: stub,
|
||||
dirxml: stub,
|
||||
group: stub,
|
||||
@@ -702,8 +700,6 @@ if (global.nativeLoggingHook) {
|
||||
profile: stub,
|
||||
profileEnd: stub,
|
||||
table: stub,
|
||||
time: stub,
|
||||
timeEnd: stub,
|
||||
timeStamp: stub,
|
||||
};
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/js-polyfills",
|
||||
"version": "0.81.0-main",
|
||||
"version": "0.80.0-main",
|
||||
"description": "Polyfills for React Native.",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
@@ -18,7 +18,7 @@
|
||||
],
|
||||
"bugs": "https://github.com/facebook/react-native/issues",
|
||||
"engines": {
|
||||
"node": ">= 20.19.4"
|
||||
"node": ">= 22.14.0"
|
||||
},
|
||||
"files": [
|
||||
"console.js",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/babel-preset",
|
||||
"version": "0.81.0-main",
|
||||
"version": "0.80.0-main",
|
||||
"description": "Babel preset for React Native applications",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@@ -13,7 +13,7 @@
|
||||
],
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 20.19.4"
|
||||
"node": ">= 22.14.0"
|
||||
},
|
||||
"main": "src/index.js",
|
||||
"files": [
|
||||
@@ -66,7 +66,7 @@
|
||||
"@babel/plugin-transform-typescript": "^7.25.2",
|
||||
"@babel/plugin-transform-unicode-regex": "^7.24.7",
|
||||
"@babel/template": "^7.25.0",
|
||||
"@react-native/babel-plugin-codegen": "0.81.0-main",
|
||||
"@react-native/babel-plugin-codegen": "0.80.0-main",
|
||||
"babel-plugin-syntax-hermes-parser": "0.29.1",
|
||||
"babel-plugin-transform-flow-enums": "^0.0.2",
|
||||
"react-refresh": "^0.14.0"
|
||||
|
||||
+14
-22
@@ -38,6 +38,19 @@ function isFirstParty(fileName) {
|
||||
// use `this.foo = bar` instead of `this.defineProperty('foo', ...)`
|
||||
const loose = true;
|
||||
|
||||
const defaultPlugins = [
|
||||
[require('babel-plugin-syntax-hermes-parser'), {parseLangTypes: 'flow'}],
|
||||
[require('babel-plugin-transform-flow-enums')],
|
||||
[require('@babel/plugin-transform-block-scoping')],
|
||||
[require('@babel/plugin-transform-class-properties'), {loose}],
|
||||
[require('@babel/plugin-transform-private-methods'), {loose}],
|
||||
[require('@babel/plugin-transform-private-property-in-object'), {loose}],
|
||||
[require('@babel/plugin-syntax-dynamic-import')],
|
||||
[require('@babel/plugin-syntax-export-default-from')],
|
||||
...passthroughSyntaxPlugins,
|
||||
[require('@babel/plugin-transform-unicode-regex')],
|
||||
];
|
||||
|
||||
// For Static Hermes testing (experimental), the hermes-canary transformProfile
|
||||
// is used to enable regenerator (and some related lowering passes) because SH
|
||||
// requires more Babel lowering than Hermes temporarily.
|
||||
@@ -221,28 +234,7 @@ const getPreset = (src, options) => {
|
||||
plugins: [require('@babel/plugin-transform-flow-strip-types')],
|
||||
},
|
||||
{
|
||||
plugins: [
|
||||
[
|
||||
require('babel-plugin-syntax-hermes-parser'),
|
||||
{
|
||||
parseLangTypes: 'flow',
|
||||
reactRuntimeTarget: '19',
|
||||
...options.hermesParserOptions,
|
||||
},
|
||||
],
|
||||
[require('babel-plugin-transform-flow-enums')],
|
||||
[require('@babel/plugin-transform-block-scoping')],
|
||||
[require('@babel/plugin-transform-class-properties'), {loose}],
|
||||
[require('@babel/plugin-transform-private-methods'), {loose}],
|
||||
[
|
||||
require('@babel/plugin-transform-private-property-in-object'),
|
||||
{loose},
|
||||
],
|
||||
[require('@babel/plugin-syntax-dynamic-import')],
|
||||
[require('@babel/plugin-syntax-export-default-from')],
|
||||
...passthroughSyntaxPlugins,
|
||||
[require('@babel/plugin-transform-unicode-regex')],
|
||||
],
|
||||
plugins: defaultPlugins,
|
||||
},
|
||||
{
|
||||
test: isTypeScriptSource,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/metro-babel-transformer",
|
||||
"version": "0.81.0-main",
|
||||
"version": "0.80.0-main",
|
||||
"description": "Babel transformer for React Native applications.",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@@ -14,7 +14,7 @@
|
||||
],
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 20.19.4"
|
||||
"node": ">= 22.14.0"
|
||||
},
|
||||
"main": "src/index.js",
|
||||
"files": [
|
||||
@@ -27,7 +27,7 @@
|
||||
],
|
||||
"dependencies": {
|
||||
"@babel/core": "^7.25.2",
|
||||
"@react-native/babel-preset": "0.81.0-main",
|
||||
"@react-native/babel-preset": "0.80.0-main",
|
||||
"hermes-parser": "0.29.1",
|
||||
"nullthrows": "^1.1.1"
|
||||
},
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/codegen",
|
||||
"version": "0.81.0-main",
|
||||
"version": "0.80.0-main",
|
||||
"description": "Code generation tools for React Native",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
@@ -18,7 +18,7 @@
|
||||
],
|
||||
"bugs": "https://github.com/facebook/react-native/issues",
|
||||
"engines": {
|
||||
"node": ">= 20.19.4"
|
||||
"node": ">= 22.14.0"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "yarn clean && node scripts/build.js --verbose",
|
||||
|
||||
@@ -51,13 +51,12 @@ if (!schemaQuery.startsWith('@')) {
|
||||
const schemaQueryOutputFile = schemaQuery.replace(/^@/, '');
|
||||
const schemaQueryOutput = fs.readFileSync(schemaQueryOutputFile, 'utf8');
|
||||
|
||||
const schemaFiles = schemaQueryOutput.split(' ');
|
||||
const modules: {
|
||||
[hasteModuleName: string]: NativeModuleSchema | ComponentSchema,
|
||||
} = {};
|
||||
const specNameToFile: {[hasteModuleName: string]: string} = {};
|
||||
|
||||
const schemaFiles =
|
||||
schemaQueryOutput.length > 0 ? schemaQueryOutput.split(' ') : [];
|
||||
for (const file of schemaFiles) {
|
||||
const schema: SchemaType = JSON.parse(fs.readFileSync(file, 'utf8'));
|
||||
|
||||
|
||||
+41
-12
@@ -85,7 +85,6 @@ function generatePropsDiffString(
|
||||
case 'StringTypeAnnotation':
|
||||
case 'Int32TypeAnnotation':
|
||||
case 'BooleanTypeAnnotation':
|
||||
case 'MixedTypeAnnotation':
|
||||
return `
|
||||
if (${prop.name} != oldProps->${prop.name}) {
|
||||
result["${prop.name}"] = ${prop.name};
|
||||
@@ -95,14 +94,6 @@ function generatePropsDiffString(
|
||||
return `
|
||||
if ((${prop.name} != oldProps->${prop.name}) && !(std::isnan(${prop.name}) && std::isnan(oldProps->${prop.name}))) {
|
||||
result["${prop.name}"] = ${prop.name};
|
||||
}`;
|
||||
case 'ArrayTypeAnnotation':
|
||||
case 'ObjectTypeAnnotation':
|
||||
case 'StringEnumTypeAnnotation':
|
||||
case 'Int32EnumTypeAnnotation':
|
||||
return `
|
||||
if (${prop.name} != oldProps->${prop.name}) {
|
||||
result["${prop.name}"] = toDynamic(${prop.name});
|
||||
}`;
|
||||
case 'ReservedPropTypeAnnotation':
|
||||
switch (typeAnnotation.name) {
|
||||
@@ -112,9 +103,6 @@ function generatePropsDiffString(
|
||||
result["${prop.name}"] = *${prop.name};
|
||||
}`;
|
||||
case 'ImageSourcePrimitive':
|
||||
case 'PointPrimitive':
|
||||
case 'EdgeInsetsPrimitive':
|
||||
case 'DimensionPrimitive':
|
||||
return `
|
||||
if (${prop.name} != oldProps->${prop.name}) {
|
||||
result["${prop.name}"] = toDynamic(${prop.name});
|
||||
@@ -124,11 +112,52 @@ function generatePropsDiffString(
|
||||
throw new Error(
|
||||
'ImageRequestPrimitive should not be used in Props',
|
||||
);
|
||||
case 'PointPrimitive':
|
||||
return `
|
||||
if (${prop.name} != oldProps->${prop.name}) {
|
||||
result["${prop.name}"] = toDynamic(${prop.name});
|
||||
}`;
|
||||
case 'EdgeInsetsPrimitive':
|
||||
return `
|
||||
if (${prop.name} != oldProps->${prop.name}) {
|
||||
result["${prop.name}"] = toDynamic(${prop.name});
|
||||
}`;
|
||||
case 'DimensionPrimitive':
|
||||
return `
|
||||
if (${prop.name} != oldProps->${prop.name}) {
|
||||
result["${prop.name}"] = toDynamic(${prop.name});
|
||||
}`;
|
||||
default:
|
||||
(typeAnnotation.name: empty);
|
||||
throw new Error('Received unknown ReservedPropTypeAnnotation');
|
||||
}
|
||||
case 'ArrayTypeAnnotation':
|
||||
return `
|
||||
if (${prop.name} != oldProps->${prop.name}) {
|
||||
result["${prop.name}"] = toDynamic(${prop.name});
|
||||
}`;
|
||||
case 'ObjectTypeAnnotation':
|
||||
return `
|
||||
if (${prop.name} != oldProps->${prop.name}) {
|
||||
result["${prop.name}"] = toDynamic(${prop.name});
|
||||
}`;
|
||||
case 'StringEnumTypeAnnotation':
|
||||
return `
|
||||
if (${prop.name} != oldProps->${prop.name}) {
|
||||
result["${prop.name}"] = toDynamic(${prop.name});
|
||||
}`;
|
||||
case 'Int32EnumTypeAnnotation':
|
||||
return `
|
||||
if (${prop.name} != oldProps->${prop.name}) {
|
||||
result["${prop.name}"] = toDynamic(${prop.name});
|
||||
}`;
|
||||
case 'MixedTypeAnnotation':
|
||||
return `
|
||||
if (${prop.name} != oldProps->${prop.name}) {
|
||||
result["${prop.name}"] = ${prop.name};
|
||||
}`;
|
||||
default:
|
||||
// TODO: Implement diffProps for complex types
|
||||
return '';
|
||||
}
|
||||
})
|
||||
|
||||
@@ -65,15 +65,15 @@ const TestTemplate = ({
|
||||
propValue: string,
|
||||
}) => `
|
||||
TEST(${componentName}_${testName}, etc) {
|
||||
RawPropsParser propParser{};
|
||||
auto propParser = RawPropsParser();
|
||||
propParser.prepare<${componentName}>();
|
||||
${componentName} sourceProps{};
|
||||
RawProps rawProps(folly::dynamic::object("${propName}", ${propValue}));
|
||||
auto const &sourceProps = ${componentName}();
|
||||
auto const &rawProps = RawProps(folly::dynamic::object("${propName}", ${propValue}));
|
||||
|
||||
ContextContainer contextContainer{};
|
||||
PropsParserContext parserContext{-1, contextContainer};
|
||||
|
||||
rawProps.parse(propParser);
|
||||
rawProps.parse(propParser, parserContext);
|
||||
${componentName}(parserContext, sourceProps, rawProps);
|
||||
}
|
||||
`;
|
||||
|
||||
+240
-240
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/compatibility-check",
|
||||
"version": "0.81.0-main",
|
||||
"version": "0.80.0-main",
|
||||
"description": "Check a React Native app's boundary between JS and Native for incompatibilities",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
@@ -19,7 +19,7 @@
|
||||
],
|
||||
"bugs": "https://github.com/facebook/react-native/issues",
|
||||
"engines": {
|
||||
"node": ">= 20.19.4"
|
||||
"node": ">= 22.14.0"
|
||||
},
|
||||
"exports": {
|
||||
".": "./src/index.js",
|
||||
@@ -29,7 +29,7 @@
|
||||
"dist"
|
||||
],
|
||||
"dependencies": {
|
||||
"@react-native/codegen": "0.81.0-main"
|
||||
"@react-native/codegen": "0.80.0-main"
|
||||
},
|
||||
"devDependencies": {
|
||||
"flow-remove-types": "^2.237.2",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/popup-menu-android",
|
||||
"version": "0.81.0-main",
|
||||
"version": "0.80.0-main",
|
||||
"description": "PopupMenu for the Android platform",
|
||||
"main": "index.js",
|
||||
"files": [
|
||||
@@ -21,7 +21,7 @@
|
||||
},
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"@react-native/codegen": "0.81.0-main"
|
||||
"@react-native/codegen": "0.80.0-main"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@types/react": "^19.1.0",
|
||||
|
||||
-2
@@ -12,9 +12,7 @@ import com.facebook.react.bridge.NativeModule
|
||||
import com.facebook.react.bridge.ReactApplicationContext
|
||||
import com.facebook.react.uimanager.ViewManager
|
||||
|
||||
@Suppress("DEPRECATION")
|
||||
public class OSSLibraryExamplePackage : ReactPackage {
|
||||
@Deprecated("Migrate to [BaseReactPackage] and implement [getModule] instead.")
|
||||
override fun createNativeModules(reactContext: ReactApplicationContext): List<NativeModule> =
|
||||
listOf(NativeSampleModule(reactContext))
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/oss-library-example",
|
||||
"version": "0.81.0-main",
|
||||
"version": "0.80.0-main",
|
||||
"private": true,
|
||||
"description": "Package that includes native module exapmle, native component example, targets both the old and the new architecture. It should serve as an example of a real-world OSS library.",
|
||||
"license": "MIT",
|
||||
@@ -26,7 +26,7 @@
|
||||
],
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.25.2",
|
||||
"@react-native/babel-preset": "0.81.0-main",
|
||||
"@react-native/babel-preset": "0.80.0-main",
|
||||
"react-native": "1000.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
|
||||
@@ -537,160 +537,3 @@ test('animate layout props', () => {
|
||||
<rn-view height="100.000000" />,
|
||||
);
|
||||
});
|
||||
|
||||
test('AnimatedValue.interpolate', () => {
|
||||
let _valueX;
|
||||
let _interpolatedValueX;
|
||||
const viewRef = createRef<HostInstance>();
|
||||
|
||||
function MyApp({outputRangeX}: $ReadOnly<{outputRangeX: number}>) {
|
||||
const valueX = useAnimatedValue(0.5, {useNativeDriver: true});
|
||||
_valueX = valueX;
|
||||
const offset = outputRangeX - 1;
|
||||
const interpolatedValueX = valueX.interpolate({
|
||||
inputRange: [0, 1],
|
||||
outputRange: [offset, 100],
|
||||
});
|
||||
_interpolatedValueX = interpolatedValueX;
|
||||
return (
|
||||
<Animated.View
|
||||
ref={viewRef}
|
||||
style={[
|
||||
{
|
||||
width: 100,
|
||||
height: 100,
|
||||
},
|
||||
{transform: [{translateX: valueX}, {translateY: interpolatedValueX}]},
|
||||
]}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
const root = Fantom.createRoot();
|
||||
|
||||
Fantom.runTask(() => {
|
||||
root.render(<MyApp outputRangeX={1} />);
|
||||
});
|
||||
|
||||
const viewElement = ensureInstance(viewRef.current, ReactNativeElement);
|
||||
|
||||
expect(_valueX?.__getValue()).toBe(0.5);
|
||||
expect(_interpolatedValueX?.__getValue()).toBe(50);
|
||||
expect(
|
||||
JSON.stringify(
|
||||
Fantom.unstable_getDirectManipulationProps(viewElement).transform,
|
||||
),
|
||||
).toBe('[{"translateX":0.5},{"translateY":50}]');
|
||||
expect(viewElement.getBoundingClientRect().x).toBe(0.5);
|
||||
expect(viewElement.getBoundingClientRect().y).toBe(50);
|
||||
|
||||
Fantom.runTask(() => {
|
||||
root.render(<MyApp outputRangeX={51} />);
|
||||
});
|
||||
|
||||
expect(_valueX?.__getValue()).toBe(0.5);
|
||||
expect(_interpolatedValueX?.__getValue()).toBe(75);
|
||||
expect(
|
||||
JSON.stringify(
|
||||
Fantom.unstable_getDirectManipulationProps(viewElement).transform,
|
||||
),
|
||||
).toBe('[{"translateX":0.5},{"translateY":75}]');
|
||||
expect(viewElement.getBoundingClientRect().x).toBe(0.5);
|
||||
expect(viewElement.getBoundingClientRect().y).toBe(75);
|
||||
});
|
||||
|
||||
test('Animated.sequence', () => {
|
||||
let _translateY;
|
||||
let _isSequenceFinished = false;
|
||||
const elementRef = createRef<HostInstance>();
|
||||
|
||||
function MyApp() {
|
||||
const translateY = useAnimatedValue(0, {useNativeDriver: true});
|
||||
_translateY = translateY;
|
||||
|
||||
return (
|
||||
<View>
|
||||
<Animated.View
|
||||
ref={elementRef}
|
||||
style={[
|
||||
{
|
||||
position: 'absolute',
|
||||
width: 100,
|
||||
height: 100,
|
||||
},
|
||||
{
|
||||
transform: [
|
||||
{
|
||||
translateY: translateY.interpolate({
|
||||
inputRange: [0, 1],
|
||||
outputRange: [0, -16],
|
||||
}),
|
||||
},
|
||||
],
|
||||
},
|
||||
]}
|
||||
/>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
const root = Fantom.createRoot();
|
||||
|
||||
Fantom.runTask(() => {
|
||||
root.render(<MyApp />);
|
||||
});
|
||||
|
||||
const element = ensureInstance(elementRef.current, ReactNativeElement);
|
||||
|
||||
expect(element.getBoundingClientRect().y).toBe(0);
|
||||
|
||||
Fantom.runTask(() => {
|
||||
Animated.sequence([
|
||||
Animated.timing(_translateY, {
|
||||
toValue: 1,
|
||||
duration: 500,
|
||||
useNativeDriver: true,
|
||||
}),
|
||||
Animated.timing(_translateY, {
|
||||
toValue: 0,
|
||||
duration: 0,
|
||||
useNativeDriver: true,
|
||||
}),
|
||||
]).start(({finished}) => {
|
||||
if (finished) {
|
||||
_isSequenceFinished = true;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Fantom.unstable_produceFramesForDuration(500);
|
||||
|
||||
expect(
|
||||
// $FlowFixMe[incompatible-use]
|
||||
Fantom.unstable_getDirectManipulationProps(element).transform[0].translateY,
|
||||
).toBeCloseTo(-16, 0.001);
|
||||
|
||||
if (!ReactNativeFeatureFlags.cxxNativeAnimatedRemoveJsSync()) {
|
||||
Fantom.runWorkLoop(); // React update to sync end state of 1st timing animation in sequence
|
||||
}
|
||||
expect(_isSequenceFinished).toBe(false);
|
||||
expect(element.getBoundingClientRect().y).toBe(-16);
|
||||
|
||||
Fantom.runWorkLoop(); // React render
|
||||
|
||||
expect(
|
||||
// $FlowFixMe[incompatible-use]
|
||||
Fantom.unstable_getDirectManipulationProps(element).transform[0].translateY,
|
||||
).toBeCloseTo(0, 0.001);
|
||||
|
||||
if (!ReactNativeFeatureFlags.cxxNativeAnimatedRemoveJsSync()) {
|
||||
Fantom.runWorkLoop(); // React update to sync end state of 2nd timing animation in sequence
|
||||
}
|
||||
expect(element.getBoundingClientRect().y).toBe(0);
|
||||
|
||||
if (ReactNativeFeatureFlags.cxxNativeAnimatedRemoveJsSync()) {
|
||||
expect(_isSequenceFinished).toBe(false);
|
||||
Fantom.runWorkLoop();
|
||||
}
|
||||
expect(_isSequenceFinished).toBe(true);
|
||||
});
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user