Compare commits

...
Author SHA1 Message Date
React Native Bot d0843bd53c Release 0.80.1
#publish-packages-to-npm&latest
2025-06-30 16:04:24 +00:00
buschco b2cc82ba31 publish index.js.flow instead of index.flow.js (#52179)
Summary:
I think in https://github.com/facebook/react-native/commit/50667eceb1be4771375d6a3cc2f4e42d4d8aad3a the file name was mixed up. Instead of `index.flow.js` it should be `index.js.flow` (see https://github.com/facebook/react-native/blob/main/packages/react-native/index.js.flow)

Should fix https://github.com/facebook/react-native/issues/51885

## Changelog:

<!-- Help reviewers and the release process by writing your own changelog entry.

[General][Added] Publish top-level Flow types for `react-native`

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests

Pull Request resolved: https://github.com/facebook/react-native/pull/52179

Test Plan:
Steps to reproduce

1. Setup a react-native project with flow (or clone https://github.com/buschco/react-native-flow + `cd ReproducerApp && npm i`)
2. `import {Alert} from 'react-native'` -> `Alert` has type `any`
3. add `index.js.flow` File (https://github.com/facebook/react-native/blob/v0.79.3/packages/react-native/index.js.flow) to `node_modules/react-native/index.js.flow` -> `Alert` no longer `any`

Reviewed By: christophpurrer

Differential Revision: D77052871

Pulled By: robhogan

fbshipit-source-id: 32b0052a9d96486aff66a1f6e4577ff62cbcd97e
2025-06-23 17:59:31 +00:00
Aswin Andro 2cb1f8e4e3 Publish top-level Flow types for react-native (#51908)
Summary:
FIXED Add index.js.flow to npm package files for Flow support

Currently, the distributed npm package for react-native does not include the index.js.flow file, which causes all exports to be typed as any when using Flow. This commit adds index.js.flow to the "files" array in package.json, ensuring Flow users receive proper type definitions out of the box. This addresses issues where type checking with Flow fails in React Native projects.

## Changelog:

[General][Added] Publish top-level Flow types for `react-native`

Pull Request resolved: https://github.com/facebook/react-native/pull/51908

Reviewed By: huntie, necolas

Differential Revision: D76292301

Pulled By: robhogan

fbshipit-source-id: e56360d3f35af30ef160470181349aac1812e7c1
2025-06-23 16:10:27 +00:00
Riccardo Cipolleschi 1c39b2abc3 Bump windows to latests as GH will remove windows-2019 EOM (#51798)
Summary:
As per title, GH is [removing windows-2019](https://github.com/facebook/react-native/actions/runs/15421451006/job/43403215354) at the end of the month. We need to migrate away from them.

## Changelog:
[Internal] - Bump windows runners

Pull Request resolved: https://github.com/facebook/react-native/pull/51798

Test Plan: GHA

Reviewed By: cortinico

Differential Revision: D75946994

Pulled By: cipolleschi

fbshipit-source-id: 972b60300c918c0eae0403ed4149347a4ffa8bd0
2025-06-23 16:47:51 +01:00
Nicola Corti 4d346e2b2d Fix crash on ReactInstance due to null returned for getViewManagerNames (#52035)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52035

Fixes https://github.com/facebook/react-native/issues/52014

Some OSS library is still returning null for `getViewManagerNames` especially if they're
implementing the `ViewManagerOnDemandReactPackage` in Java.
I'm adding a try-catch here so that we prevent the NPE for those scenarios.

Changelog:
[Android] [Fixed] - Fix crash on ReactInstance due to null returned for getViewManagerNames

Reviewed By: javache

Differential Revision: D76723826

fbshipit-source-id: cc159dee389257c6877b03a67840a45ee5bec165
2025-06-23 15:46:14 +00:00
Vladimir Iliev 69a5ad5d8c Fix emitting event from turbo module crashes on 32bit android (#51695)
Summary:
After testing the latest RC and nighly builds, crash appeared when emitting events from turbo modules on 32bit Android devices. The crash is always reproducible only on 32bit devices on signed production builds. Fore more details and the crash log, check the [related issue](https://github.com/facebook/react-native/issues/51628#issue-3094045077).

From what I found, the variadic functions like CallVoidMethod are unsafe on 32bit due to not type checking the passed arguments at compile time. As far as I understand the 64bit cpus and ABIs are more forgiving with alignment and calling conventions. On 32bit the ABIs are strict as arguments are passed on the stack and if there is type/size/alignment issue it reads the wrong memory, which causes the SIGEGV crashes.

## Changelog:
[ANDROID] [FIXED]  - emitting event from turbo module crashes on 32bit android

Pull Request resolved: https://github.com/facebook/react-native/pull/51695

Test Plan:
1. Pull the [reproduction demo](https://github.com/vladimirivanoviliev/rn079eventcrash), install the dependencies (v `0.80` is on PR)
2. Run codegen on android
3. Build signed apk. To create it you will need to create new demo key-store.
4. To install the build apk in 32bit mode you can use `adb -s YOURDEVICE install --abi armeabi-v7a android/app/release/app-release.apk`
5. Run the app, create key, save it. Than update the key and save it again. The app crashes when try to emit event from the turbo module.
6. Patch the related `JavaTurboModule.cpp` file with the changes from this PR and enable build from source.
7. Rebuild and reinstall the apk and test again - the issue is now fixed

## Additional notes:
I have tested the app on android using the `rn-tester` demo app, everything works as expected. I also patched our production app and tested more complex scenarios and they works as expected. I have run the tests and linter and they passed.

One thing that I didn't able to setup and run is the iOS `rn-tester` app, due to Hermes engine error `Command PhaseScriptExecution failed with a nonzero exit code`. I haven't found any information how to fix it. I have followed [this guide](https://github.com/facebook/react-native/blob/main/packages/rn-tester/README.md) and installed node modules using yarn and started the `yarn prepare-ios`. I also haven't found any information with what node version and ruby version the react native package is build on CI so I use the same versions locally. If you provide me with updated instructions for those I can contribute by updating the related guides and including `.npmrc`, `.ruby-version` files.

Reviewed By: cortinico

Differential Revision: D75782377

Pulled By: javache

fbshipit-source-id: b94998be6dd51e90ad4137b1d2e38a6850bc3cb2
2025-06-23 15:44:40 +00:00
Alex Hunt aeab69a744 Move RefreshControlMock into Jest preset files (#51530)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51530

Alternative to https://github.com/facebook/react-native/pull/50784.

`__mocks__` (and other underscored dirs) are correctly excluded from our npm package via `package.json#files`. But in this instance, this is a source file for the `jest/` directory (Jest preset within `react-native`), and should be included — fix by relocating.

Changelog:
[General][Fixed] - Fix missing RefreshControlMock source in Jest preset

Reviewed By: rshest

Differential Revision: D75215731

fbshipit-source-id: 1240344c4236288f31b16513f4df16766ad1e571
2025-06-23 13:51:07 +01:00
Nicola Corti 6f3948fc48 Publish, Close and Release the Maven repository during build_npm_package
Summary:
Due to us moving to central.sonatype.com for publishing, we cannot publish and release the Maven repository in 2 distinct invocations.
This consolidates all the publishing job to happen during build_npm_package

Changelog:
[Internal] [Changed] -

Reviewed By: fabriziocucci

Differential Revision: D76888543

fbshipit-source-id: 3cb0db6176ed2221a12b4f3f1f575232aa006a6c
2025-06-18 13:58:52 +01:00
Nicola Corti 9fe0c1a2b7 Update Nightly URL for newly published versions on central.sonatype.com (#52004)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52004

This is necessary because the snapshots are now going to be published on a different repository:
central.sonatype.com.

Changelog:
[Internal] [Changed] -

Reviewed By: cipolleschi

Differential Revision: D76596802

fbshipit-source-id: 424fb1134e41502d53b76209fba325c895c79ba8
2025-06-16 10:41:23 +01:00
Nicola Corti bff874e7c7 Move React Native publishing URLs to Central Portal (#51693)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51693

This moves React Native to use the Central Portal URLs rather than the legacy OSSRH ones.
See https://github.com/gradle-nexus/publish-plugin for more context.

Changelog:
[Internal] [Changed] -

Reviewed By: cipolleschi

Differential Revision: D75673984

fbshipit-source-id: 1de6746809eed72f232eac0c3fb4d809c2046620
2025-06-16 10:41:23 +01:00
React Native Bot 6c92459434 [LOCAL] Bump Podfile.lock 2025-06-12 17:00:57 +00:00
React Native Bot 84ebbb54f5 Release 0.80.0
#publish-packages-to-npm&latest
2025-06-12 15:27:37 +00:00
React Native Bot effe3fd9e0 [LOCAL] Bump Podfile.lock 2025-06-09 17:51:31 +00:00
React Native Bot 6e8aa89830 Release 0.80.0-rc.5
#publish-packages-to-npm&next
2025-06-09 16:23:01 +00:00
Kacper Kafara 4b65d0ee34 Fix new codegen API disabling behaviour of the old one (#51867)
Summary:
Hey, I'm bumping `react-native-screens` to 0.80.0-rc.4 right now & noticed that codegen does not work as expected. It crawls whole library, file by file (when working on a library it also includes nodemodules etc), despite `componentProvider` field being defined in `codegenConfig` in `package.json`.

Namely https://github.com/facebook/react-native/issues/49941 introduced a regression for libraries that stick to the old codegen config format due to compatibility reasons. Take a look at [this code](https://github.com/facebook/react-native/blob/78caa07ff867255724e4b0ce3557ff5793b6ce1b/packages/react-native/scripts/codegen/generate-artifacts-executor/generateRCTThirdPartyComponents.js#L60-L103). We first do a pass for "old API", [removing libraries with `componentProvider` in their codegen config from `librariesToCrawl`](https://github.com/facebook/react-native/blob/78caa07ff867255724e4b0ce3557ff5793b6ce1b/packages/react-native/scripts/codegen/generate-artifacts-executor/generateRCTThirdPartyComponents.js#L66-L75), just to later [add **ALL** libraries](https://github.com/facebook/react-native/blob/78caa07ff867255724e4b0ce3557ff5793b6ce1b/packages/react-native/scripts/codegen/generate-artifacts-executor/generateRCTThirdPartyComponents.js#L86-L89) that do not support new codegen config format back again to `librariesToCrawl`.

This PR improves the filtering condition, to parse codegen annotations only for libraries that have defined any of the fields from the new config format (opted in for new system).

I want to emphasise that this is a significant regression, because it ruins experience of library maintenance, vastly increasing pods installation time.

## Changelog:

[IOS] [FIXED] - Fix codegen crawling all library code with `componentProvider` defined in config

<!-- Help reviewers and the release process by writing your own changelog entry.

Pick one each for the category and type tags:

[ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests

Pull Request resolved: https://github.com/facebook/react-native/pull/51867

Test Plan:
1. Setup an application with any third party library, that uses "old" codegen config format, e.g. `react-native-screens@4.11.1`
2. `cd ios && bundle exec pod install`
3. Observe the codegen logs - it crawles the library instead of using provided information.

Reviewed By: cortinico

Differential Revision: D76126649

Pulled By: cipolleschi

fbshipit-source-id: 6f9c9dffcdca7204a78b4b55db10249240146141
2025-06-09 14:02:39 +00:00
Leevi Aattola a1bad641bc fix: exclusion of selectively disabled libraries from codegen generation (#51838)
Summary:
PR https://github.com/facebook/react-native/issues/51078 Implemented finding disabled libraries but the code (below) didn't actually filter any libraries out because destructured name is `undefined`. This pr adds the name to codegenEnabledLibraries so filtering would work.

```js
const libraries = codegenEnabledLibraries.filter(
  ({name}) => !disabledLibraries.includes(name),
);
```

## Changelog:

[IOS] [FIXED] - Skip codegen for selectively disabled libraries in react-native.config.js

Pull Request resolved: https://github.com/facebook/react-native/pull/51838

Test Plan:
1. Install a library that has the componentProvider field set in the codegen config (for example: react-native-safe-area-context and react-native-screens or see [reproducer](https://github.com/aattola/rn-codegen-exclude))
2. Exclude library with react-native.config.js
3. install pods / run codegen
4. Check that codegen actually excluded the specified dependencies from: `ios/build/generated/ios/RCTThirdPartyComponentsProvider.mm`

Rollback Plan:

Reviewed By: cortinico

Differential Revision: D76044622

Pulled By: cipolleschi

fbshipit-source-id: 9e70c2a263c750edb1ea95305c9e5e178e2ce8d8
2025-06-09 14:00:47 +00:00
Gabriel Donadel 4c9490c702 generate-artifacts-executor: fix parsing .class in complex classes (#51813)
Summary:
There is an edge case in the codegen `findRCTComponentViewProtocolClass` function where the parsing of the Component Class will fail if there is another `.class` call in the same file after the `Class<RCTComponentViewProtocol>` function. This ends up resulting in a `RCTThirdPartyComponentsProvider.mm` file that looks like the image bellow

<img width="1052" alt="image" src="https://github.com/user-attachments/assets/26ce93be-0370-4852-a949-9da21762ff7f" />

You can reproduce this with the following

```
Class<RCTComponentViewProtocol> XYZCls(void)
{
  return XYZ.class;
}
// this comment breaks codegen .class
```

## Changelog:

[IOS] [FIXED] - Fix codegen extracting `.class` from complex component classes

Pull Request resolved: https://github.com/facebook/react-native/pull/51813

Test Plan: Run codegen locally, use this patch in the expo/expo repo and CI should be green

Reviewed By: cipolleschi

Differential Revision: D75964424

Pulled By: cortinico

fbshipit-source-id: 50e45aa2ac6e43c75ee6fdd76791c591d81d4df7
2025-06-09 13:59:33 +00:00
Tomasz Żelawski 0a9ea3932a fix: ignore build/ and DerivedData/ dirs in when reading infoPlistFiles (#51833)
Summary:
https://github.com/facebook/react-native/pull/49927 introduced a regression where a Ruby script would read compilation artifacts and fail, when the user has relative build directories set in XCode.

After successful compilation `build/` dir and `DerivedData/` dir have `.plist` files that aren't in UTF-8 encoding and shouldn't be read by the script. If the user tries to reinstall pods at this point, he gets the following error:

![image](https://github.com/user-attachments/assets/6bd31907-66af-4ea5-b2a6-2847e0ee18e1)

This is how you enable relative build directories in XCode.

![Screenshot 2025-06-05 at 11 08 31](https://github.com/user-attachments/assets/22a555b4-a468-481d-8492-02c3b36bfa25)

## Changelog:

[IOS] [FIXED] - Ignore `build/` and `DerivedData/` directories when reading `.plist` files.

Pull Request resolved: https://github.com/facebook/react-native/pull/51833

Test Plan: After applying this patch the problem doesn't occur anymore on my machine.

Reviewed By: cortinico

Differential Revision: D76030133

Pulled By: cipolleschi

fbshipit-source-id: 7ae8c2d0ce28b6925245a9172154e3dcafee126f
2025-06-09 13:57:31 +00:00
Nicola Corti 3d06f9e449 Back out "Override updateRuntimeShadowNodeReferencesOnCommit for OSS" (#51839)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51839

Original commit changeset: 4394a2370d9e

Original Phabricator Diff: D73771648

Changelog:
[Internal] -

Reviewed By: lenaic, sammy-SC

Differential Revision: D76038710

fbshipit-source-id: b4d61bef476e8b903432511939cce65e881689c5
2025-06-09 13:55:22 +00:00
React Native Bot c72f490766 [LOCAL] Bump Podfile.lock 2025-06-02 17:53:41 +00:00
React Native Bot dffb675e70 Release 0.80.0-rc.4
#publish-packages-to-npm&next
2025-06-02 16:25:27 +00:00
Jakub Piasecki 302f3a4e5a Update types of Animated FlatList and SectionList (#51602)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51602

Changelog: [GENERAL][FIXED] - Fixed the generated type definitions for `Animated.FlatList` and `Animated.SectionList` to correctly infer item types.

Current definitions for animated list components cast away their generic definitions, preventing the types to be inferred from usage. This diff addresses that.

Reviewed By: huntie

Differential Revision: D75407762

fbshipit-source-id: c86f20298ded707971c05a78d025a63e82fe2a64
2025-06-02 14:15:53 +00:00
Alex Hunt 5cc63aa9ea Re-expose src/ paths via exports (default) (#51699)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51699

Re-expose **all `"./src/*"` paths via `package.json#exports`.

Follows D72228547 — as we'd attempted to be proactive with hiding `src/`, but are now reverting — essentially reducing this change as much as possible (read: most defensive/safer effect on OSS).

**Motivation**

Mitigates a warning emitted by Metro that may surface in new bare React Native template projects.

{F1978757796}

This is due to a 1P reference to `'react-native/src/private/featureflags/ReactNativeFeatureFlags` in `react-native/virtualized-lists`.

This is enough motivation to undo part of our change with introducing `"exports"` on `react-native` in 0.80.

**Especially**, to avoid confusion with other warnings we've intentionally introduced in 0.80 around subpath imports.

- The key difference is the above screenshot is from Metro and covers **any** import from any `node_modules` file — as opposed to just the immediate project.

Changelog:
[General][Changed] - Re-expose `src/*` subpaths when not using the Strict TypeScript API

The net breaking change for 0.80, once picked, is simply the presence of `"exports"` (only very edge case effects on expanding per-platform extensions, which we've mitigated). **All exported paths equivalent**.

Reviewed By: robhogan

Differential Revision: D75682566

fbshipit-source-id: f90c7298279c6be3a4eab70f2dfdc618ffcf1124
2025-06-02 14:10:39 +00:00
React Native Bot baa421decc [LOCAL] Bump Podfile.lock 2025-05-26 17:22:43 +00:00
React Native Bot e7901a720b Release 0.80.0-rc.3
#publish-packages-to-npm&next
2025-05-26 15:55:04 +00:00
Nicola Corti cd8dec00a9 Gradle to 8.14.1 (#51597)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51597

Bumping Gradle patch version to address this problem:
https://github.com/facebook/react-native/pull/50960#issuecomment-2906368364

Changelog:
[Android] [Changed] - Gradle to 8.14.1

Reviewed By: fabriziocucci

Differential Revision: D75401634

fbshipit-source-id: 07726f4d882a5f447cbaea11c4d159ef85fd7636
2025-05-26 14:16:54 +00:00
Alex Hunt 647af1c4ca Update debugger-frontend from bc635fa...343405b (S523384 mitigation) (#51564) 2025-05-26 08:56:43 +01:00
Tomasz Zawadzki 0dd583f40d Restore the possibility to extend LayoutAnimationController (#51479)
Summary:
In https://github.com/facebook/react-native/pull/50734, `LayoutAnimationController` was migrated to Kotlin and all of its methods are now marked as final.

However, this class is used and extended by `react-native-reanimated` in order to provide Layout Animations for Android on the Old Architecture. With all its methods being marked as final, the builds are failing.

This PR restores the possibility to extend `LayoutAnimationController`.

## Changelog:

[ANDROID] [FIXED] - Restored the possibility to extend `LayoutAnimationController`

Pull Request resolved: https://github.com/facebook/react-native/pull/51479

Test Plan: I've checked that this PR fixes build errors caused by `LayoutAnimationController` in react-native-reanimated.

Reviewed By: cipolleschi, mdvacca

Differential Revision: D75079557

Pulled By: cortinico

fbshipit-source-id: beeb700cbad87362dda4b60941124562c4753815
2025-05-23 09:57:15 +00:00
Dawid Małecki 869c03e923 Fix VirtualizeSectionList generic arguments (#51496)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51496

Fixes problem with generics passed to `VirtualizedSectionList` in generated types. The `flow-api-translator` creates a re-declaration for `export default` variables which shadows generics.

Changelog:
[Internal]

Reviewed By: huntie

Differential Revision: D75141051

fbshipit-source-id: 260ef066038320eee3ffa93692f77f1eff5c9205
2025-05-23 09:55:22 +00:00
Phil Pluckthun 24131c6812 fix: Align TimerManager sequential ids and function error handling with web standard (#51500)
Summary:
Calls to create timers should return sequential ids (integers greater than zero in the spec's words). This regressed in the `TimerManager` implementation, which instead starts at zero inclusively.

This has two side-effects for code assuming a spec-compliant implementation of `setTimeout` and `setInterval`:
- Calls to `clearTimeout(0)` or `clearInterval(0)` will potentially cancel scheduled timers, although it's supposed to be a noop
- Predicates like `if (timeoutId)` will fail since they assume non-negative ids

The change in this PR is to align with WHATWG HTML 8.6.2 (Timers): https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#timers

> otherwise, let id be an [implementation-defined](https://infra.spec.whatwg.org/#implementation-defined) integer that is **greater than zero** and does not already [exist](https://infra.spec.whatwg.org/#map-exists) in global's [map of setTimeout and setInterval IDs](https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#map-of-settimeout-and-setinterval-ids).

Specifically,
- we should return `0` to indicate that no timer was scheduled
- we should start generating timer IDs at `1` instead of `0`

This was previously raised in review comments here: https://github.com/facebook/react-native/pull/45092/files#r1650790008

The spec-incompliant behaviour was raised in an issue here: https://github.com/apollographql/apollo-client/issues/12632#issue-3075269978

This PR does not,
- add bounds checking on `timerIndex_` and add a search of an available id that isn't in the unordered map
- exclude `0` from being an accepted `TimerHandle` in `TimerManager::createTimer` or `TimerManager::deleteTimer` since the above bounds checking hasn't been added either

## Changelog:

[GENERAL] [FIXED] - Align timer IDs and timer function argument error handling with web standards.

Pull Request resolved: https://github.com/facebook/react-native/pull/51500

Test Plan:
- Run `setTimeout` / `setInterval`; before applied changes the timeout for the first timer will be `0`
- Run `setTimeout(null)`; before applied changes the timer ID will be non-zero
- Run `setInterval(null)`; before applied changes an error will be thrown rather than `0` being returned

Reviewed By: cipolleschi

Differential Revision: D75145909

Pulled By: rshest

fbshipit-source-id: 6646439abd29cf3cfa9e5cf0a57448e3b7cd1b48
2025-05-23 09:53:20 +00:00
Krystof Woldrich ad1ce87b93 fix(types): Reference global.d.ts using path not types (#51104)
Summary:
After https://github.com/facebook/react-native/pull/49516 TSC would not find the global types.

Types reference expect a package name but was given a path to a declaration.

TS doc: https://www.typescriptlang.org/docs/handbook/triple-slash-directives.html#-reference-path-

This PR changes `types` to `path` to fix the issue.

`dtslint` fails with `no-bad-reference` rule, but the `../src` lives in the same package in `react-native` package.

## Changelog:

<!-- Help reviewers and the release process by writing your own changelog entry.

Pick one each for the category and type tags:

[ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->

[GENERAL] [FIXED] - Reference `global.d.ts` using `path` so they can be resolved by TSC

Pull Request resolved: https://github.com/facebook/react-native/pull/51104

Test Plan:
Before the change with current RN 0.79.2 TSC would fail on resolving the global types (example from [Sentry RN SDK build](https://github.com/getsentry/sentry-react-native/commit/134d810cf95416091779806e00d3a3cc6cbace89)):

![Screenshot 2025-05-05 at 17 18 04](https://github.com/user-attachments/assets/b264c8da-aa21-49d8-9597-82586291a01a)

After the change to path TSC finds the global types.

Using TSC Version 4.9.5

Reviewed By: huntie

Differential Revision: D74208815

Pulled By: coado

fbshipit-source-id: 2fd51d79061ffb356c047604213cff7a425f167e
2025-05-23 09:51:15 +00:00
Joe Vilches fb62355555 Remove useEditTextStockAndroidBehavior and resolve old android blur issue (#51338) (#51462)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51338

There was some problems removing this feature flag earlier in that, on older android versions, we would try to focus the top most text input whenever any other text input would try to blur. This was ultimately and issue with how Android implements `clearFocus`. To fix this, lets block the focusability of all views while we clear the focus, then re-enable.

Changelog: [Internal]

Reviewed By: NickGerleman

Differential Revision: D74760594

fbshipit-source-id: 2811c08ad6ed0855da0a4d7fca89fb08f84905c2
2025-05-23 10:47:49 +01:00
riteshshukla04 068a6ba0fd Correct Link for Networking (#51396)
Summary:
I noticed the link to networking in new app screen is wrong. So correcting it here

## Changelog:
[GENERAL][FIXED] - Fix Networking URL in New app screen

Pull Request resolved: https://github.com/facebook/react-native/pull/51396

Test Plan: Click on the link to open

Reviewed By: arushikesarwani94

Differential Revision: D74886240

Pulled By: cortinico

fbshipit-source-id: 19ccf63e64f0e40df4a0ab4082299c654926e35d
2025-05-23 09:42:16 +00:00
Dawid Małecki f9a851fc31 Remove dtslint from type tests (#51382)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51382

This diff replaces `dtslint` which is obsolete and [It is not intended to be used on its own, but as part of the definitelytyped set of packages](https://github.com/microsoft/dtslint) in favor of `tsc` type tests.

It's probably not necessary to have `test-typescript-offline` as tsc does that out of the box but doesn't test with multiple TS versions.

Changelog:
[Internal]

Reviewed By: huntie

Differential Revision: D74804967

fbshipit-source-id: 4c581ba5debf6fd0bb8dcddbb95f3c85b05082d4
2025-05-20 14:00:19 +01:00
React Native Bot d1b5793c1b [LOCAL] Bump Podfile.lock 2025-05-19 20:09:16 +00:00
React Native Bot b35291cbb8 Release 0.80.0-rc.2
#publish-packages-to-npm&next
2025-05-19 18:06:14 +00:00
Dawid Małecki 1cc46014d6 Fix generated types base on __typetests__ (#51383)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51383

This diff is a set of alignments/improvements in generated TS types. It includes:
- extending `AppStateStatus` with `extension` and `unknown`,
- exporting `AnimatedProps` under `Animated` namespace,
- resolving issue with discriminated unions in `ProgressBarAndroidTypes`,
- fixing `StyleSheet.create` type to accept only specified style properties,
- extending `TextProps` with `AccessibilityProps`,
extending Fn Args generic with `$ReadOnlyArray` in `ErrorUtils`,
- small `__typetests__` adjustments,
- removing type test `styleDimensionValueValidAnimated` as `DimensionValue` no longer accepts `AnimatedNode`,
- removing `styleDimensionValueInvalid` as `DimensionValue` accepts any string now - template literal types in Flow are not supported,
- changing `overlayColor` type to `ColorValue` to align with manual types,
- fixing `AnimatedPropsAllowList` type which wasn't correct in TS because index signature type was different from style type,
- using `DeviceEventEmitter` instead of `DeviceEventEmitterStatic` in type tests which is equivalent in both new and old types - `DeviceEventEmitterStatic` was only a type of `DeviceEventEmitter`,
- removing type test for checking forwarded key type - doesn't work with new types and that shouldn't be supported,
- removing `Animated.legacyRef` type test - not included in new types,
- adding `DOMRect` from "dom" lib to `globals.d.ts` to not include "dom" lib in the tsconfig - tries to compare globals with `lib.dom.d.ts` and produces many errors,
- exporting `SectionListData`,

Changelog:
[Internal]

Reviewed By: huntie

Differential Revision: D74807552

fbshipit-source-id: c5254ea0f701f3602b9d716faeb50ca1ab21b013
2025-05-19 16:59:19 +01:00
Alan Lee 5b630d224a migrate deprecated KEYCODE_BACK in Modal (#51097)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51097

**Problem:** `Event.KEYCODE_BACK`has been deprecated with targetSdk 36, predictive back will be enforced and KEYCODE_BACK no longer triggered. We need to migrate to backward compatible `OnBackPressedCallback`.
- https://developer.android.com/about/versions/16/behavior-changes-16#predictive-back.

**Solution:**
Use `OnBackPressedCallback` to handle BACK. Logic for ESC key handling still remains.
To support the callback mechanism, we are using AndroidX ComponentDialog ([src](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:activity/activity/src/main/java/androidx/activity/ComponentDialog.kt)) which is a thin wrapper on the existing Dialog.

Changelog:
[Internal]

Reviewed By: mdvacca

Differential Revision: D74162844

fbshipit-source-id: ebd0e89c29999d3dd99431a4359c442e42d23911
2025-05-19 15:52:23 +00:00
Christian Falch a49bf3722b adding accessor for backing map (#51386)
Summary:
Expo is using the backingmap to be able to update properties in a fast and performant way in two overridden view manager subclasses (ViewGroupManager subclass is one of them).

This diff exposes the backing field via JvmName using the `internal_` prefix.

So Expo can keep on accessing the field as they were doing before. In the long run we should prevent them from accessing this property altogether but this would require a different API.

## Changelog:

[INTERNAL] -

Pull Request resolved: https://github.com/facebook/react-native/pull/51386

Test Plan: Build with Expo modules

Reviewed By: cipolleschi

Differential Revision: D74884533

Pulled By: cortinico

fbshipit-source-id: e76673c794a6a125059633d29445d991d867b770
2025-05-19 15:43:31 +00:00
Dawid Małecki 9858e1e1dc Align ImageStyle overflow prop type and compose function type (#51285)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51285

The `composeStyles` function should correctly determine the type of the input styles (`ViewStyle`, `ImageStyle`, `TextStyle`) base on the output type:

```ts
const combinedStyle8: StyleProp<ImageStyle> = StyleSheet.compose(
  // ts-expect-error
  composeTextStyle,
  composeTextStyle,
);
```

This diff adds generic type checking for `compose` function and fixes `ImageStyle` overflow prop type which accepted `scroll` property (which wasn't previously accepted in manual types) and which enables type system to distinguish `ImageStyle` from `ViewStyle` and `TextStyle`:

previous:
```ts
overflow?: 'visible' | 'hidden' | 'scroll'
```

current:
```t
overflow?: 'visible' | 'hidden'
```

Changelog:
[Internal]

Reviewed By: huntie

Differential Revision: D74574293

fbshipit-source-id: 751a44f2d3cd43055d93031343995f16ef87b185
2025-05-19 15:41:17 +00:00
Jakub Piasecki 7749879647 Add a custom Jest resolver to opt out from handling "exports" in tests (#51307)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51307

D72228547 added the `exports` field to the main `react-native` package, in which all imports from `./src/*` are explicitly disallowed. This was expected to be a breaking change and to limit the surface area of it, this diff will allow using all imports in jest tests.

Changelog: [General][Added] Added a custom Jest resolver to opt out from handling "exports" in tests

Reviewed By: huntie

Differential Revision: D74708701

fbshipit-source-id: 9a2714f4e6f78ffbad9e56b5bb92657c9ea908ef
2025-05-19 15:39:22 +00:00
Alex Hunt 2374d0ab36 Explicitly exclude types_generated/ from "exports" (#51121)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51121

Previously could match via the `"./*"` subpath when `"react-native-strict-api"` is not set. Only the entry point `./types_generated/index.d.ts` should be exposed.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D74242716

fbshipit-source-id: 232c90f34fafe8fdf1a5a7ef1fec4acc191525b4
2025-05-19 15:33:35 +00:00
Alan Lee 0e3764c8aa migrate deprecated onBackPressed() (#51096)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51096

**Problem:** `Activity.onBackPressed()` has been deprecated and with targetSdk 36, predictive back will be enforced and the API no longer called. We need to migrate to backward compatible AndroidX `OnBackPressedCallback`.
- https://developer.android.com/about/versions/16/behavior-changes-16#predictive-back.

**Solution:**
`OnBackPressedCallback` is registered conditionally only if it is `targetSdk` 36 or greater.
If the callback in enabled, `onBackPressed()` is not called and callback is used regardless of `android:enableOnBackInvokedCallback` property in <application> or <activity> set in AndroidManifest.xml.

As a workaround callback is manually calling existing `onBackPressed()`.

This is done rather than removing onBackPressed() completely and using only `OnBackPressedCallback` as we are not sure of the impact of removing the implementation entirely. Once we determine it is safe to do so then, we should remove the workaround and fully transition to `OnBackPressedCallback`

* I also surveyed child classes extending ReactActivity for overridden `onPressedBack()` usage and found only one usage which will be handled later.

NOTE: `ReactDelegate.onHostResume()` sets up the `DefaultHardwareBackBtnHandler` using `ReactActivity` (https://fburl.com/ul47tbeo) and will be called from JS `BackHanderl.exitApp` (https://fburl.com/code/a4l2pjsw). Calling `BackHanderl.exitApp` enables predictive back to work.

Changelog:
[Internal]

Reviewed By: mdvacca

Differential Revision: D74161428

fbshipit-source-id: 2e081ba6922b315e9d1746e83a41bab5277fa62e
2025-05-19 15:32:24 +00:00
Christian Falch 84cf4d8869 make DevServerHelper open (#51323)
Summary:
Expo inherits from the DevServerHelper class, and needs it to be declared as open, the same goes for its public interface.

Expo is using this in `DevLauncherDevServerHelper` and overrides the methods:

- getDevServerBundleURL
- getDevServerSplitBundleURL
- getSourceUrl
- getSourceMapUrl
- isPackagerRunning

This PR fixes this by adding the open to the class and to the methods that should be open

## Changelog:

[ANDROID] [FIXED] - Made DevServerHelper and its method open so that they can be overridden.

Pull Request resolved: https://github.com/facebook/react-native/pull/51323

Test Plan: Verify that we can build against Expo.

Reviewed By: cipolleschi

Differential Revision: D74876479

Pulled By: cortinico

fbshipit-source-id: 0037d6f7cee190a690ec3ec59896df04f46797b2
2025-05-16 15:22:12 +00:00
Jakub Piasecki 77021b600e Restore legacy semantics of modulesConformingToProtocol (#51381)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51381

Changelog: [General][Fixed] Fixed codegen breaking when a subset of `modulesConformingToProtocol` fields was specified or when the value was string

D70822061 introduced a new way of defininf modules and components in codegen, but accidentally introduced two breaking changes to the legacy syntax:
- before that diff, in case of 1:1 mapping, the value of the fileds could be a string, while after, it required it to be an array
- before that diff, not all of the fields on `modulesConformingToProtocol` had to be defined in `package.json`, while after, it required all fields to be defined even if unused

Reviewed By: cipolleschi

Differential Revision: D74875251

fbshipit-source-id: 610103b508f1462b4de01725f9b0a87341571197
2025-05-16 14:52:41 +00:00
Christian Falch 0a76d9fb87 fix adding children (#51213)
Summary:
See https://github.com/facebook/react-native/issues/51212 - children aren't updated correctly in an old arch native view using the interop layer under Fabric.

This is caused by the mountChildComponentView method not updating the view, only adding the new view to a list that will be used on the next update to mount the child.

This commit fixes this by adding the same pattern as in unmountChildComponentView where children are inserted directly if the underlying paperview is available in the adapter - otherwise it uses the mounting list as before.

#Closes 51212

bypass-github-export-checks

## Changelog:

[IOS] [FIXED] - fixed adding child views to a native view using the interop layer

Pull Request resolved: https://github.com/facebook/react-native/pull/51213

Test Plan:
**Previous output**:

<image src="https://github.com/user-attachments/assets/472b95e7-0921-46c9-be6a-f31759c0cd26" width="200px" />

**After fix**:

<image src="https://github.com/user-attachments/assets/554387cd-c264-483e-9c52-d9cd40b42601" width="200px" />

Reviewed By: sammy-SC

Differential Revision: D74471278

Pulled By: cipolleschi

fbshipit-source-id: 798f9e7be389359bd6e3aa1b6a6e9fb799fcb369
2025-05-16 14:15:12 +00:00
Ritesh Shukla af85c4c810 Fixed borderBottomEndRadius on RTL (#51229)
Summary:
Fixes https://github.com/facebook/react-native/issues/51193
## Changelog:
[ANDROID][FIXED] Wrong borderBottomEndRadius on RTL

Pull Request resolved: https://github.com/facebook/react-native/pull/51229

Test Plan:
Tested with Arabic (RTL) and English(LTR)

English
<img src="https://github.com/user-attachments/assets/5bd1eca9-194c-4d83-b75f-689bc13d827b" width=200>

Arabic
<img src="https://github.com/user-attachments/assets/459320a0-6bb2-4585-97bb-bd4ded6ec399" width=200>

Reviewed By: cortinico

Differential Revision: D74709219

Pulled By: NickGerleman

fbshipit-source-id: 885bb84d97d73324983d044fd2874a457b40f646
2025-05-16 10:14:04 +00:00
Christian Falch 51d10578dc make removeView open in ViewGroupManager (#51322)
Summary:
After conversion to Kotlin we could no longer override the removeView function since it is no longer open. The rest of this class can be overridden as before, but since functions are final by default this doesn't work for the new `removeView` function.

Expo is overriding the `removeView` functions in `GroupViewManagerWrapper.kt` (a lot of other ViewManager methods are also overridden here, but the `removeView` is introduced in `ViewGroupManager` and needs to be open as well. `GroupViewManagerWrapper.kt` is a replacement view manager that adds support for a delegate that will receive callbacks whenever one of the methods in the view manager are called.

This commit fixes this by making the removeView function explicitly open.

## Changelog:

[ANDROID] [FIXED] - Made function `removeView` open in Kotlin class

Pull Request resolved: https://github.com/facebook/react-native/pull/51322

Test Plan: Verify that Expo can build against this class.

Reviewed By: javache

Differential Revision: D74807744

Pulled By: cortinico

fbshipit-source-id: 55f4b9deccb7d82ceb78be1d56c2b99a6f7e3ce9
2025-05-16 10:07:16 +00:00
React Native Bot 033e6b1f9c [LOCAL] Bump Podfile.lock 2025-05-12 17:41:07 +00:00
React Native Bot d2168e9415 Release 0.80.0-rc.1
#publish-packages-to-npm&next
2025-05-12 16:16:21 +00:00
Riccardo Cipolleschi 79e2298230 [RN][Release] Fix set-rn-version to consider also the codegen snapshot tests (#51156) 2025-05-12 15:17:36 +01:00
Jakub Piasecki 619a0db17f Update transform types to preserve behavior in TypeScript (#51115)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51115

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D74229819

fbshipit-source-id: 08e363ae58c29ca910601b2f078153b8ff30103c
2025-05-12 14:14:01 +00:00
Dawid Małecki 241b1a6462 Add transform that moves comments for default exported variable declarations (#51135)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51135

In generated types default exported variables are re-declared which shadows attached tags and doc blocks. This transform moves necessary comments on top of re-declarations to keep them accessible.

Example output for SafeAreaView:

```ts
import type { ViewProps } from "../View/ViewPropTypes";
import View from "../View/View";
import * as React from "react";
declare const exported: (props: Omit<ViewProps, keyof {
  ref?: React.Ref<React.ComponentRef<typeof View>>;
}> & {
  ref?: React.Ref<React.ComponentRef<typeof View>>;
}) => React.ReactNode;
/**
 * Renders nested content and automatically applies paddings reflect the portion
 * of the view that is not covered by navigation bars, tab bars, toolbars, and
 * other ancestor views.
 *
 * Moreover, and most importantly, Safe Area's paddings reflect physical
 * limitation of the screen, such as rounded corners or camera notches (aka
 * sensor housing area on iPhone X).
 */
declare const SafeAreaView_DEFAULT: typeof exported;
declare type SafeAreaView_DEFAULT = typeof SafeAreaView_DEFAULT;
export default SafeAreaView_DEFAULT;
```

Changelog:
[Internal]

Reviewed By: huntie

Differential Revision: D74249424

fbshipit-source-id: 5cdd1c746e7fed99e3d3427d6ebf4c0e7ba3f3fd
2025-05-12 13:52:49 +00:00
Dawid Małecki e8b14c7b06 Attach @deprecated tag and doc block to ProgressBarAndroid (#51136)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51136

This diff attaches doc block to ProgressBarAndroid copied from the manual TS types.

Generated types result:

```ts
import * as React from "react";
import type $$IMPORT_TYPEOF_1$$ from "./ProgressBarAndroidNativeComponent";
type ProgressBarAndroidNativeComponentType = typeof $$IMPORT_TYPEOF_1$$;
import type { ProgressBarAndroidProps } from "./ProgressBarAndroidTypes";
export type { ProgressBarAndroidProps };
declare let ProgressBarAndroid: (props: Omit<ProgressBarAndroidProps, keyof {
  ref?: React.Ref<React.ComponentRef<ProgressBarAndroidNativeComponentType>>;
}> & {
  ref?: React.Ref<React.ComponentRef<ProgressBarAndroidNativeComponentType>>;
}) => React.ReactNode;
/**
 * ProgressBarAndroid has been extracted from react-native core and will be removed in a future release.
 * It can now be installed and imported from `react-native-community/progress-bar-android` instead of 'react-native'.
 * see https://github.com/react-native-community/progress-bar-android
 * deprecated
 */
declare const $$ProgressBarAndroid: typeof ProgressBarAndroid;
declare type $$ProgressBarAndroid = typeof $$ProgressBarAndroid;
export default $$ProgressBarAndroid;

```

Changelog:
[Internal]

Reviewed By: robhogan

Differential Revision: D73855212

fbshipit-source-id: c6c09ea68c9f61f305f96c0954370bb938fc59d9
2025-05-12 13:51:37 +00:00
Dawid Małecki 8b8e1055ae Move imported types from @react-native/assets-registry and @react-native/js-polyfills to react-native repo (#51192)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51192

The `build-types` script cannot currently resolve `react-native/assets-registry` and `react-native/js-polyfills`. This diff moves imported types from these packages to `react-native` to include them in generated types.

Changelog:
[Internal]

Reviewed By: huntie

Differential Revision: D74392568

fbshipit-source-id: cbce977b710f54dc53ce1b0fc080704b420490d4
2025-05-12 13:50:13 +00:00
Riccardo Cipolleschi cdf7d76101 [RN][Releases] Fix draft creation (#51158) 2025-05-12 14:49:17 +01:00
Kacper Rożniata 1c22a46cf6 fix(iOS): enable DEFINES_MODULE in React-jsc (#51160)
Summary:
Enables `DEFINES_MODULE` in `React-jsc.podspec`

After upgrading app to RN `0.79`, when installing pods with JSC enabled there is an error being thrown that

`The following Swift pods cannot yet be integrated as static libraries`
`The Swift pod 'RNFlashList' depends upon 'React-jsc', which does not define modules. ...`
when installing packages that use Swift

## Changelog:

[IOS] [CHANGED] -  enable `DEFINES_MODULE` in `React-jsc.podspec`

Pull Request resolved: https://github.com/facebook/react-native/pull/51160

Test Plan: RNTester runs and builds correctly

Reviewed By: huntie

Differential Revision: D74325357

Pulled By: cipolleschi

fbshipit-source-id: b994b7e678633440d5e362ae6965b2d5188d34f1
2025-05-12 13:41:22 +00:00
ismarbesic 7ce8f12549 Exclude selectively disabled libraries from codegen generation (#51078)
Summary:
Selectively disabling autolinking of a native dependency with components registered in the codegen configuration in react-native.config.js causes builds to crash upon launch on iOS. This is because the generated `RCTThirdPartyComponentsProvider.mm` file contains references to the excluded library using `NSClassFromString` causing the returned NSDictionary from `+[RCTThirdPartyComponentsProvider thirdPartyFabricComponents]` to be populated with nil values and therefore crashing the app. This has been confirmed in 0.78.2 and 0.79.2 but probably exists in 0.77.x as well.

The issue has been further described in https://github.com/facebook/react-native/issues/51077.

## Changelog:

[IOS][FIXED] - Skip codegen for selectively disabled libraries in react-native.config.js

Pull Request resolved: https://github.com/facebook/react-native/pull/51078

Test Plan:
1. Install a library that has the componentProvider field set in the codegen config (see reproducer) and install the iOS pods.
2. Build the app.
3. App should run successfully without any crashes.

Reviewed By: cortinico

Differential Revision: D74248371

Pulled By: cipolleschi

fbshipit-source-id: 1ff7b477ed3d94ca45616ae243d3d2d30bd897db
2025-05-12 13:39:24 +00:00
Jakub Piasecki ce4d7e5d52 Fix generated types in @react-native/virtualized-lists being used without opt-in (#51246)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51246

Changelog: [General][Fixed] Fix generated types in react-native/virtualized-lists being used without opt-in

D71969602 introduces `exports` field to `package.json` files in `react-native` and `virtualized-lists`. In that diff, the `types` in `virtualized-lists` by default pointed to the new generated types without requiring the opt-in.

This fixes that by requiring the opt-in before using the generated types.

Reviewed By: huntie

Differential Revision: D74573321

fbshipit-source-id: fe05b0204a7200c1c91aac2614aa786bbbced2a5
2025-05-12 13:34:50 +00:00
Dawid Małecki d5c6afaae0 Fix suggesting components from types_generated directory (#51101)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51101

TS LSP suggests importing/using components from `types_generated` directory which are exported under slightly different name than root exports. Prefixing default exports with `$$` fixes the issue.

Changelog:
[Internal]

Reviewed By: huntie

Differential Revision: D74177107

fbshipit-source-id: 86a6869c2aa7a113915184e4857a7882710b1db4
2025-05-12 13:18:20 +00:00
React Native Bot f70a146699 [LOCAL] Bump Podfile.lock 2025-05-07 11:41:41 +00:00
React Native Bot d9c2857e59 Release 0.80.0-rc.0
#publish-packages-to-npm&next
2025-05-07 10:17:06 +00:00
Jorge Cohen cbf1710fd5 Bump hermes version 2025-05-06 11:21:57 +01:00
139 changed files with 2167 additions and 1825 deletions
@@ -25,7 +25,7 @@ runs:
- name: Windows cache
uses: actions/cache@v4
with:
key: v2-hermes-${{ github.job }}-windows-${{ inputs.hermes-version }}-${{ inputs.react-native-version }}
key: v3-hermes-${{ github.job }}-windows-${{ inputs.hermes-version }}-${{ inputs.react-native-version }}
path: |
D:\tmp\hermes\win64-bin\
D:\tmp\hermes\hermes\icu\
@@ -63,7 +63,7 @@ runs:
$Env:PATH += ";$Env:CMAKE_DIR;$Env:MSBUILD_DIR"
$Env:ICU_ROOT = "$Env:HERMES_WS_DIR\icu"
cmake -S hermes -B build_release -G 'Visual Studio 16 2019' -Ax64 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=True -DHERMES_ENABLE_WIN10_ICU_FALLBACK=OFF
cmake -S hermes -B build_release -G 'Visual Studio 17 2022' -Ax64 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=True -DHERMES_ENABLE_WIN10_ICU_FALLBACK=OFF
if (-not $?) { throw "Failed to configure Hermes" }
echo "Running windows build..."
cd build_release
+1 -1
View File
@@ -24,6 +24,6 @@ jobs:
with:
script: |
const {createDraftRelease} = require('./.github/workflow-scripts/createDraftRelease.js');
const version = ${{ github.ref_name }}';
const version = '${{ github.ref_name }}';
const {isLatest} = require('./.github/workflow-scripts/publishTemplate.js');
await createDraftRelease(version, isLatest(), '${{secrets.REACT_NATIVE_BOT_GITHUB_TOKEN}}');
+1 -1
View File
@@ -120,7 +120,7 @@ jobs:
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
build_hermesc_windows:
runs-on: windows-2019
runs-on: windows-2025
needs: prepare_hermes_workspace
env:
HERMES_WS_DIR: 'D:\tmp\hermes'
+1 -23
View File
@@ -116,7 +116,7 @@ jobs:
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
build_hermesc_windows:
runs-on: windows-2019
runs-on: windows-2025
needs: prepare_hermes_workspace
env:
HERMES_WS_DIR: 'D:\tmp\hermes'
@@ -134,27 +134,6 @@ jobs:
hermes-version: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }}
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
build_android:
runs-on: 8-core-ubuntu
needs: [set_release_type]
container:
image: reactnativecommunity/react-native-android:latest
env:
TERM: "dumb"
GRADLE_OPTS: "-Dorg.gradle.daemon=false"
ORG_GRADLE_PROJECT_SIGNING_PWD: ${{ secrets.ORG_GRADLE_PROJECT_SIGNING_PWD }}
ORG_GRADLE_PROJECT_SIGNING_KEY: ${{ secrets.ORG_GRADLE_PROJECT_SIGNING_KEY }}
ORG_GRADLE_PROJECT_SONATYPE_USERNAME: ${{ secrets.ORG_GRADLE_PROJECT_SONATYPE_USERNAME }}
ORG_GRADLE_PROJECT_SONATYPE_PASSWORD: ${{ secrets.ORG_GRADLE_PROJECT_SONATYPE_PASSWORD }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build Android
uses: ./.github/actions/build-android
with:
release-type: ${{ needs.set_release_type.outputs.RELEASE_TYPE }}
gradle-cache-encryption-key: ${{ secrets.GRADLE_CACHE_ENCRYPTION_KEY }}
build_npm_package:
runs-on: 8-core-ubuntu
needs:
@@ -164,7 +143,6 @@ jobs:
build_hermes_macos,
build_hermesc_linux,
build_hermesc_windows,
build_android,
prebuild_apple_dependencies,
]
container:
+1 -1
View File
@@ -424,7 +424,7 @@ jobs:
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
build_hermesc_windows:
runs-on: windows-2019
runs-on: windows-2025
needs: prepare_hermes_workspace
env:
HERMES_WS_DIR: 'D:\tmp\hermes'
+10
View File
@@ -0,0 +1,10 @@
## Summary:
This change fixes the script that updates the RN Version to also update the Codegen snapshots so that they are in sync with the current version of React Native.
It also updates the Snapshot as it was failing in rc.0
## Changelog:
[Internal] - Fixed script that updates the react native versions
## Test Plan:
Tested locally by running `node ./scripts/releases/set-rn-artifacts-version --built-type release --to-version 0.80.0-rc.0` and verifying that the snapshot file was getting updated. I then run the `yarn test
generate-artifacts-executor-test.js` command to verify that the tests were passing.
+2
View File
@@ -55,6 +55,8 @@ nexusPublishing {
sonatype {
username.set(sonatypeUsername)
password.set(sonatypePassword)
nexusUrl.set(uri("https://ossrh-staging-api.central.sonatype.com/service/local/"))
snapshotRepositoryUrl.set(uri("https://central.sonatype.com/repository/maven-snapshots/"))
}
}
}
+1 -1
View File
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
+3 -5
View File
@@ -30,8 +30,7 @@
"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-offline": "dtslint --localTs node_modules/typescript/lib packages/react-native/types",
"test-typescript": "dtslint packages/react-native/types",
"test-typescript": "tsc -p packages/react-native/types/tsconfig.test.json",
"test": "jest",
"fantom": "JS_DIR='..' yarn jest --config packages/react-native-fantom/config/jest.config.js",
"trigger-react-native-release": "node ./scripts/releases-local/trigger-react-native-release.js",
@@ -50,10 +49,9 @@
"@babel/plugin-transform-regenerator": "^7.24.7",
"@babel/preset-env": "^7.25.3",
"@babel/preset-flow": "^7.24.7",
"@definitelytyped/dtslint": "^0.0.127",
"@jest/create-cache-key-function": "^29.7.0",
"@react-native/metro-babel-transformer": "0.80.0-main",
"@react-native/metro-config": "0.80.0-main",
"@react-native/metro-babel-transformer": "0.80.1",
"@react-native/metro-config": "0.80.1",
"@tsconfig/node18": "1.0.1",
"@types/react": "^19.0.0",
"@typescript-eslint/parser": "^7.1.1",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/assets-registry",
"version": "0.80.0-main",
"version": "0.80.1",
"description": "Asset support code for React Native.",
"license": "MIT",
"repository": {
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/babel-plugin-codegen",
"version": "0.80.0-main",
"version": "0.80.1",
"description": "Babel plugin to generate native module and view manager code for React Native.",
"license": "MIT",
"repository": {
@@ -26,7 +26,7 @@
],
"dependencies": {
"@babel/traverse": "^7.25.3",
"@react-native/codegen": "0.80.0-main"
"@react-native/codegen": "0.80.1"
},
"devDependencies": {
"@babel/core": "^7.25.2"
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/community-cli-plugin",
"version": "0.80.0-main",
"version": "0.80.1",
"description": "Core CLI commands for React Native",
"keywords": [
"react-native",
@@ -22,7 +22,7 @@
"dist"
],
"dependencies": {
"@react-native/dev-middleware": "0.80.0-main",
"@react-native/dev-middleware": "0.80.1",
"chalk": "^4.0.0",
"debug": "^4.4.0",
"invariant": "^2.2.4",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/core-cli-utils",
"version": "0.80.0-main",
"version": "0.80.1",
"description": "React Native CLI library for Frameworks to build on",
"license": "MIT",
"main": "./src/index.flow.js",
+3 -3
View File
@@ -1,9 +1,9 @@
@generated SignedSource<<c5f3f1de013841faf72c0a6052f5dc08>>
Git revision: bc635fa428baf08a0667f89e3ee03f92c2f96416
@generated SignedSource<<5409495e2dce8fc29e2085031ea1d9f7>>
Git revision: 343405ba784fca9290486cbce57e7f2ca953dc14
Built with --nohooks: false
Is local checkout: false
Remote URL: https://github.com/facebook/react-native-devtools-frontend
Remote branch: main
Remote branch: 0.80-stable
GN build args (overrides only):
is_official_build = true
Git status in checkout:
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
import*as e from"../../core/common/common.js";import"../../core/root/root.js";import*as i from"../../core/i18n/i18n.js";import*as t from"../../ui/legacy/legacy.js";const n={performance:"Performance",showPerformance:"Show Performance",record:"Record",stop:"Stop",recordAndReload:"Record and reload",saveProfile:"Save profile…",loadProfile:"Load profile…",previousFrame:"Previous frame",nextFrame:"Next frame",showRecentTimelineSessions:"Show recent timeline sessions",previousRecording:"Previous recording",nextRecording:"Next recording",hideChromeFrameInLayersView:"Hide `chrome` frame in Layers view"},o=i.i18n.registerUIStrings("panels/timeline/timeline-meta.ts",n),a=i.i18n.getLazilyComputedLocalizedString.bind(void 0,o);let r;async function l(){return r||(r=await import("./timeline.js")),r}function c(e){return void 0===r?[]:e(r)}t.ViewManager.registerViewExtension({location:"panel",id:"timeline",title:a(n.performance),commandPrompt:a(n.showPerformance),order:50,experiment:"enable-performance-panel",loadView:async()=>(await l()).TimelinePanel.TimelinePanel.instance()}),t.ActionRegistration.registerActionExtension({actionId:"timeline.toggle-recording",category:"PERFORMANCE",iconClass:"record-start",toggleable:!0,toggledIconClass:"record-stop",toggleWithRedColor:!0,contextTypes:()=>c((e=>[e.TimelinePanel.TimelinePanel])),loadActionDelegate:async()=>new((await l()).TimelinePanel.ActionDelegate),options:[{value:!0,title:a(n.record)},{value:!1,title:a(n.stop)}],bindings:[{platform:"windows,linux",shortcut:"Ctrl+E"},{platform:"mac",shortcut:"Meta+E"}]}),t.ActionRegistration.registerActionExtension({actionId:"timeline.record-reload",iconClass:"refresh",contextTypes:()=>c((e=>[e.TimelinePanel.TimelinePanel])),category:"PERFORMANCE",title:a(n.recordAndReload),loadActionDelegate:async()=>new((await l()).TimelinePanel.ActionDelegate),bindings:[{platform:"windows,linux",shortcut:"Ctrl+Shift+E"},{platform:"mac",shortcut:"Meta+Shift+E"}],experiment:"!react-native-specific-ui"}),t.ActionRegistration.registerActionExtension({category:"PERFORMANCE",actionId:"timeline.save-to-file",contextTypes:()=>c((e=>[e.TimelinePanel.TimelinePanel])),loadActionDelegate:async()=>new((await l()).TimelinePanel.ActionDelegate),title:a(n.saveProfile),bindings:[{platform:"windows,linux",shortcut:"Ctrl+S"},{platform:"mac",shortcut:"Meta+S"}]}),t.ActionRegistration.registerActionExtension({category:"PERFORMANCE",actionId:"timeline.load-from-file",contextTypes:()=>c((e=>[e.TimelinePanel.TimelinePanel])),loadActionDelegate:async()=>new((await l()).TimelinePanel.ActionDelegate),title:a(n.loadProfile),bindings:[{platform:"windows,linux",shortcut:"Ctrl+O"},{platform:"mac",shortcut:"Meta+O"}]}),t.ActionRegistration.registerActionExtension({actionId:"timeline.jump-to-previous-frame",category:"PERFORMANCE",title:a(n.previousFrame),contextTypes:()=>c((e=>[e.TimelinePanel.TimelinePanel])),loadActionDelegate:async()=>new((await l()).TimelinePanel.ActionDelegate),bindings:[{shortcut:"["}]}),t.ActionRegistration.registerActionExtension({actionId:"timeline.jump-to-next-frame",category:"PERFORMANCE",title:a(n.nextFrame),contextTypes:()=>c((e=>[e.TimelinePanel.TimelinePanel])),loadActionDelegate:async()=>new((await l()).TimelinePanel.ActionDelegate),bindings:[{shortcut:"]"}]}),t.ActionRegistration.registerActionExtension({actionId:"timeline.show-history",loadActionDelegate:async()=>new((await l()).TimelinePanel.ActionDelegate),category:"PERFORMANCE",title:a(n.showRecentTimelineSessions),contextTypes:()=>c((e=>[e.TimelinePanel.TimelinePanel])),bindings:[{platform:"windows,linux",shortcut:"Ctrl+H"},{platform:"mac",shortcut:"Meta+Y"}]}),t.ActionRegistration.registerActionExtension({actionId:"timeline.previous-recording",category:"PERFORMANCE",loadActionDelegate:async()=>new((await l()).TimelinePanel.ActionDelegate),title:a(n.previousRecording),contextTypes:()=>c((e=>[e.TimelinePanel.TimelinePanel])),bindings:[{platform:"windows,linux",shortcut:"Alt+Left"},{platform:"mac",shortcut:"Meta+Left"}]}),t.ActionRegistration.registerActionExtension({actionId:"timeline.next-recording",category:"PERFORMANCE",loadActionDelegate:async()=>new((await l()).TimelinePanel.ActionDelegate),title:a(n.nextRecording),contextTypes:()=>c((e=>[e.TimelinePanel.TimelinePanel])),bindings:[{platform:"windows,linux",shortcut:"Alt+Right"},{platform:"mac",shortcut:"Meta+Right"}]}),e.Settings.registerSettingExtension({category:"PERFORMANCE",storageType:"Synced",title:a(n.hideChromeFrameInLayersView),settingName:"frame-viewer-hide-chrome-window",settingType:"boolean",defaultValue:!1}),e.Linkifier.registerLinkifier({contextTypes:()=>c((e=>[e.CLSLinkifier.CLSRect])),loadLinkifier:async()=>(await l()).CLSLinkifier.Linkifier.instance()}),t.ContextMenu.registerItem({location:"timelineMenu/open",actionId:"timeline.load-from-file",order:10}),t.ContextMenu.registerItem({location:"timelineMenu/open",actionId:"timeline.save-to-file",order:15});
import*as e from"../../core/common/common.js";import"../../core/root/root.js";import*as i from"../../core/i18n/i18n.js";import*as t from"../../ui/legacy/legacy.js";const n={performance:"Performance",showPerformance:"Show Performance",record:"Record",stop:"Stop",recordAndReload:"Record and reload",saveProfile:"Save profile…",loadProfile:"Load profile…",previousFrame:"Previous frame",nextFrame:"Next frame",showRecentTimelineSessions:"Show recent timeline sessions",previousRecording:"Previous recording",nextRecording:"Next recording",hideChromeFrameInLayersView:"Hide `chrome` frame in Layers view"},o=i.i18n.registerUIStrings("panels/timeline/timeline-meta.ts",n),a=i.i18n.getLazilyComputedLocalizedString.bind(void 0,o);let r;async function l(){return r||(r=await import("./timeline.js")),r}function c(e){return void 0===r?[]:e(r)}t.ViewManager.registerViewExtension({location:"panel",id:"timeline",title:a(n.performance),commandPrompt:a(n.showPerformance),order:50,experiment:!0===globalThis.FB_ONLY__enablePerformance?void 0:"enable-performance-panel",loadView:async()=>(await l()).TimelinePanel.TimelinePanel.instance()}),t.ActionRegistration.registerActionExtension({actionId:"timeline.toggle-recording",category:"PERFORMANCE",iconClass:"record-start",toggleable:!0,toggledIconClass:"record-stop",toggleWithRedColor:!0,contextTypes:()=>c((e=>[e.TimelinePanel.TimelinePanel])),loadActionDelegate:async()=>new((await l()).TimelinePanel.ActionDelegate),options:[{value:!0,title:a(n.record)},{value:!1,title:a(n.stop)}],bindings:[{platform:"windows,linux",shortcut:"Ctrl+E"},{platform:"mac",shortcut:"Meta+E"}]}),t.ActionRegistration.registerActionExtension({actionId:"timeline.record-reload",iconClass:"refresh",contextTypes:()=>c((e=>[e.TimelinePanel.TimelinePanel])),category:"PERFORMANCE",title:a(n.recordAndReload),loadActionDelegate:async()=>new((await l()).TimelinePanel.ActionDelegate),bindings:[{platform:"windows,linux",shortcut:"Ctrl+Shift+E"},{platform:"mac",shortcut:"Meta+Shift+E"}],experiment:"!react-native-specific-ui"}),t.ActionRegistration.registerActionExtension({category:"PERFORMANCE",actionId:"timeline.save-to-file",contextTypes:()=>c((e=>[e.TimelinePanel.TimelinePanel])),loadActionDelegate:async()=>new((await l()).TimelinePanel.ActionDelegate),title:a(n.saveProfile),bindings:[{platform:"windows,linux",shortcut:"Ctrl+S"},{platform:"mac",shortcut:"Meta+S"}]}),t.ActionRegistration.registerActionExtension({category:"PERFORMANCE",actionId:"timeline.load-from-file",contextTypes:()=>c((e=>[e.TimelinePanel.TimelinePanel])),loadActionDelegate:async()=>new((await l()).TimelinePanel.ActionDelegate),title:a(n.loadProfile),bindings:[{platform:"windows,linux",shortcut:"Ctrl+O"},{platform:"mac",shortcut:"Meta+O"}]}),t.ActionRegistration.registerActionExtension({actionId:"timeline.jump-to-previous-frame",category:"PERFORMANCE",title:a(n.previousFrame),contextTypes:()=>c((e=>[e.TimelinePanel.TimelinePanel])),loadActionDelegate:async()=>new((await l()).TimelinePanel.ActionDelegate),bindings:[{shortcut:"["}]}),t.ActionRegistration.registerActionExtension({actionId:"timeline.jump-to-next-frame",category:"PERFORMANCE",title:a(n.nextFrame),contextTypes:()=>c((e=>[e.TimelinePanel.TimelinePanel])),loadActionDelegate:async()=>new((await l()).TimelinePanel.ActionDelegate),bindings:[{shortcut:"]"}]}),t.ActionRegistration.registerActionExtension({actionId:"timeline.show-history",loadActionDelegate:async()=>new((await l()).TimelinePanel.ActionDelegate),category:"PERFORMANCE",title:a(n.showRecentTimelineSessions),contextTypes:()=>c((e=>[e.TimelinePanel.TimelinePanel])),bindings:[{platform:"windows,linux",shortcut:"Ctrl+H"},{platform:"mac",shortcut:"Meta+Y"}]}),t.ActionRegistration.registerActionExtension({actionId:"timeline.previous-recording",category:"PERFORMANCE",loadActionDelegate:async()=>new((await l()).TimelinePanel.ActionDelegate),title:a(n.previousRecording),contextTypes:()=>c((e=>[e.TimelinePanel.TimelinePanel])),bindings:[{platform:"windows,linux",shortcut:"Alt+Left"},{platform:"mac",shortcut:"Meta+Left"}]}),t.ActionRegistration.registerActionExtension({actionId:"timeline.next-recording",category:"PERFORMANCE",loadActionDelegate:async()=>new((await l()).TimelinePanel.ActionDelegate),title:a(n.nextRecording),contextTypes:()=>c((e=>[e.TimelinePanel.TimelinePanel])),bindings:[{platform:"windows,linux",shortcut:"Alt+Right"},{platform:"mac",shortcut:"Meta+Right"}]}),e.Settings.registerSettingExtension({category:"PERFORMANCE",storageType:"Synced",title:a(n.hideChromeFrameInLayersView),settingName:"frame-viewer-hide-chrome-window",settingType:"boolean",defaultValue:!1}),e.Linkifier.registerLinkifier({contextTypes:()=>c((e=>[e.CLSLinkifier.CLSRect])),loadLinkifier:async()=>(await l()).CLSLinkifier.Linkifier.instance()}),t.ContextMenu.registerItem({location:"timelineMenu/open",actionId:"timeline.load-from-file",order:10}),t.ContextMenu.registerItem({location:"timelineMenu/open",actionId:"timeline.save-to-file",order:15});
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/debugger-frontend",
"version": "0.80.0-main",
"version": "0.80.1",
"description": "Debugger frontend for React Native based on Chrome DevTools",
"keywords": [
"react-native",
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/dev-middleware",
"version": "0.80.0-main",
"version": "0.80.1",
"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.80.0-main",
"@react-native/debugger-frontend": "0.80.1",
"chrome-launcher": "^0.15.2",
"chromium-edge-launcher": "^0.2.0",
"connect": "^3.6.5",
@@ -1,6 +1,6 @@
{
"name": "@react-native/eslint-config",
"version": "0.80.0-main",
"version": "0.80.1",
"description": "ESLint config for React Native",
"license": "MIT",
"repository": {
@@ -22,7 +22,7 @@
"dependencies": {
"@babel/core": "^7.25.2",
"@babel/eslint-parser": "^7.25.1",
"@react-native/eslint-plugin": "0.80.0-main",
"@react-native/eslint-plugin": "0.80.1",
"@typescript-eslint/eslint-plugin": "^7.1.1",
"@typescript-eslint/parser": "^7.1.1",
"eslint-config-prettier": "^8.5.0",
@@ -1,6 +1,6 @@
{
"name": "@react-native/eslint-plugin",
"version": "0.80.0-main",
"version": "0.80.1",
"description": "ESLint rules for @react-native/eslint-config",
"license": "MIT",
"repository": {
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/eslint-plugin-specs",
"version": "0.80.0-main",
"version": "0.80.1",
"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.80.0-main",
"@react-native/codegen": "0.80.1",
"make-dir": "^2.1.0",
"pirates": "^4.0.1",
"source-map-support": "0.5.0"
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/gradle-plugin",
"version": "0.80.0-main",
"version": "0.80.1",
"description": "Gradle Plugin for React Native",
"license": "MIT",
"repository": {
@@ -37,7 +37,7 @@ internal object DependencyUtils {
}
}
// We add the snapshot for users on nightlies.
mavenRepoFromUrl("https://oss.sonatype.org/content/repositories/snapshots/") { repo ->
mavenRepoFromUrl("https://central.sonatype.com/repository/maven-snapshots/") { repo ->
repo.content { it.excludeGroup("org.webkit") }
}
repositories.mavenCentral { repo ->
@@ -45,7 +45,7 @@ class DependencyUtilsTest {
@Test
fun configureRepositories_containsSnapshotRepo() {
val repositoryURI = URI.create("https://oss.sonatype.org/content/repositories/snapshots/")
val repositoryURI = URI.create("https://central.sonatype.com/repository/maven-snapshots/")
val project = createProject()
configureRepositories(project)
@@ -176,7 +176,7 @@ class DependencyUtilsTest {
@Test
fun configureRepositories_snapshotRepoHasHigherPriorityThanMavenCentral() {
val repositoryURI = URI.create("https://oss.sonatype.org/content/repositories/snapshots/")
val repositoryURI = URI.create("https://central.sonatype.com/repository/maven-snapshots/")
val mavenCentralURI = URI.create("https://repo.maven.apache.org/maven2/")
val project = createProject()
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
+6 -6
View File
@@ -1,6 +1,6 @@
{
"name": "helloworld",
"version": "0.80.0-main",
"version": "0.80.1",
"private": true,
"scripts": {
"bootstrap": "node ./cli.js bootstrap",
@@ -13,16 +13,16 @@
},
"dependencies": {
"react": "19.1.0",
"react-native": "1000.0.0"
"react-native": "0.80.1"
},
"devDependencies": {
"@babel/core": "^7.25.2",
"@babel/preset-env": "^7.25.3",
"@babel/runtime": "^7.25.0",
"@react-native/babel-preset": "0.80.0-main",
"@react-native/core-cli-utils": "0.80.0-main",
"@react-native/eslint-config": "0.80.0-main",
"@react-native/metro-config": "0.80.0-main",
"@react-native/babel-preset": "0.80.1",
"@react-native/core-cli-utils": "0.80.1",
"@react-native/eslint-config": "0.80.1",
"@react-native/metro-config": "0.80.1",
"chalk": "^4.1.2",
"commander": "^12.0.0",
"eslint": "^8.19.0",
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/metro-config",
"version": "0.80.0-main",
"version": "0.80.1",
"description": "Metro configuration for React Native.",
"license": "MIT",
"repository": {
@@ -26,8 +26,8 @@
"dist"
],
"dependencies": {
"@react-native/js-polyfills": "0.80.0-main",
"@react-native/metro-babel-transformer": "0.80.0-main",
"@react-native/js-polyfills": "0.80.1",
"@react-native/metro-babel-transformer": "0.80.1",
"metro-config": "^0.82.2",
"metro-runtime": "^0.82.2"
}
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/new-app-screen",
"version": "0.80.0-main",
"version": "0.80.1",
"description": "NewAppScreen component for React Native",
"keywords": [
"react-native"
+1 -1
View File
@@ -51,7 +51,7 @@ const Links: Array<{
{
title: 'Networking',
description: 'Use the Fetch API',
url: 'https://reactnative.dev/docs/navigation',
url: 'https://reactnative.dev/docs/network',
},
{
title: 'Showcase',
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/normalize-colors",
"version": "0.80.0-main",
"version": "0.80.1",
"description": "Color normalization for React Native.",
"license": "MIT",
"repository": {
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/js-polyfills",
"version": "0.80.0-main",
"version": "0.80.1",
"description": "Polyfills for React Native.",
"license": "MIT",
"repository": {
@@ -1,6 +1,6 @@
{
"name": "@react-native/babel-preset",
"version": "0.80.0-main",
"version": "0.80.1",
"description": "Babel preset for React Native applications",
"repository": {
"type": "git",
@@ -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.80.0-main",
"@react-native/babel-plugin-codegen": "0.80.1",
"babel-plugin-syntax-hermes-parser": "0.28.1",
"babel-plugin-transform-flow-enums": "^0.0.2",
"react-refresh": "^0.14.0"
@@ -1,6 +1,6 @@
{
"name": "@react-native/metro-babel-transformer",
"version": "0.80.0-main",
"version": "0.80.1",
"description": "Babel transformer for React Native applications.",
"repository": {
"type": "git",
@@ -27,7 +27,7 @@
],
"dependencies": {
"@babel/core": "^7.25.2",
"@react-native/babel-preset": "0.80.0-main",
"@react-native/babel-preset": "0.80.1",
"hermes-parser": "0.28.1",
"nullthrows": "^1.1.1"
},
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@react-native/bots",
"description": "React Native Bots",
"version": "0.80.0-main",
"version": "0.80.1",
"private": true,
"license": "MIT",
"repository": {
@@ -1,6 +1,6 @@
{
"name": "@react-native/codegen-typescript-test",
"version": "0.80.0-main",
"version": "0.80.1",
"private": true,
"description": "TypeScript related unit test for @react-native/codegen",
"license": "MIT",
@@ -19,7 +19,7 @@
"prepare": "yarn run build"
},
"dependencies": {
"@react-native/codegen": "0.80.0-main"
"@react-native/codegen": "0.80.1"
},
"devDependencies": {
"@babel/core": "^7.25.2",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/codegen",
"version": "0.80.0-main",
"version": "0.80.1",
"description": "Code generation tools for React Native",
"license": "MIT",
"repository": {
@@ -1,6 +1,6 @@
{
"name": "@react-native/compatibility-check",
"version": "0.80.0-main",
"version": "0.80.1",
"description": "Check a React Native app's boundary between JS and Native for incompatibilities",
"license": "MIT",
"repository": {
@@ -29,7 +29,7 @@
"dist"
],
"dependencies": {
"@react-native/codegen": "0.80.0-main"
"@react-native/codegen": "0.80.1"
},
"devDependencies": {
"flow-remove-types": "^2.237.2",
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@react-native/fantom",
"private": true,
"version": "0.80.0-main",
"version": "0.80.1",
"main": "src/index.js",
"description": "Internal integration testing and benchmarking tool for React Native",
"peerDependencies": {
@@ -1,6 +1,6 @@
{
"name": "@react-native/popup-menu-android",
"version": "0.80.0-main",
"version": "0.80.1",
"description": "PopupMenu for the Android platform",
"main": "index.js",
"files": [
@@ -21,7 +21,7 @@
},
"license": "MIT",
"devDependencies": {
"@react-native/codegen": "0.80.0-main"
"@react-native/codegen": "0.80.1"
},
"peerDependencies": {
"@types/react": "^19.0.0",
@@ -1,6 +1,6 @@
{
"name": "@react-native/oss-library-example",
"version": "0.80.0-main",
"version": "0.80.1",
"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,8 +26,8 @@
],
"devDependencies": {
"@babel/core": "^7.25.2",
"@react-native/babel-preset": "0.80.0-main",
"react-native": "1000.0.0"
"@react-native/babel-preset": "0.80.1",
"react-native": "0.80.1"
},
"peerDependencies": {
"react": "*",
@@ -25,7 +25,7 @@ const Animated: typeof AnimatedImplementation = Platform.isDisableAnimations
: AnimatedImplementation;
export default {
get FlatList(): AnimatedFlatList {
get FlatList(): AnimatedFlatList<any> {
return require('./components/AnimatedFlatList').default;
},
get Image(): AnimatedImage {
@@ -34,7 +34,7 @@ export default {
get ScrollView(): AnimatedScrollView {
return require('./components/AnimatedScrollView').default;
},
get SectionList(): AnimatedSectionList {
get SectionList(): AnimatedSectionList<any, any> {
return require('./components/AnimatedSectionList').default;
},
get Text(): AnimatedText {
@@ -37,7 +37,7 @@ export type {default as AnimatedDivision} from './nodes/AnimatedDivision';
export type {default as AnimatedModulo} from './nodes/AnimatedModulo';
export type {default as AnimatedMultiplication} from './nodes/AnimatedMultiplication';
export type {default as AnimatedSubtraction} from './nodes/AnimatedSubtraction';
export type {WithAnimatedValue} from './createAnimatedComponent';
export type {WithAnimatedValue, AnimatedProps} from './createAnimatedComponent';
export type {AnimatedComponentType as AnimatedComponent} from './createAnimatedComponent';
/**
@@ -8,13 +8,14 @@
* @format
*/
import type {AnimatedComponentType} from '../createAnimatedComponent';
import type {AnimatedProps} from '../createAnimatedComponent';
import FlatList from '../../Lists/FlatList';
import FlatList, {type FlatListProps} from '../../Lists/FlatList';
import createAnimatedComponent from '../createAnimatedComponent';
import * as React from 'react';
export default (createAnimatedComponent(FlatList): AnimatedComponentType<
React.ElementConfig<typeof FlatList>,
FlatList<mixed>,
>);
// $FlowExpectedError[unclear-type]
export default (createAnimatedComponent(FlatList): component<ItemT = any>(
ref?: React.RefSetter<FlatList<ItemT>>,
...props: AnimatedProps<FlatListProps<ItemT>>
));
@@ -8,15 +8,19 @@
* @format
*/
import type {SectionBase} from '../../Lists/SectionList';
import type {AnimatedComponentType} from '../createAnimatedComponent';
import type {AnimatedProps} from '../createAnimatedComponent';
import SectionList from '../../Lists/SectionList';
import SectionList, {type SectionListProps} from '../../Lists/SectionList';
import createAnimatedComponent from '../createAnimatedComponent';
import * as React from 'react';
export default (createAnimatedComponent(SectionList): AnimatedComponentType<
React.ElementConfig<typeof SectionList>,
// $FlowFixMe
export default (createAnimatedComponent(SectionList): component<
// $FlowExpectedError[unclear-type]
SectionList<any, SectionBase<any>>,
>);
ItemT = any,
// $FlowExpectedError[unclear-type]
SectionT = any,
>(
ref?: React.RefSetter<SectionList<ItemT, SectionT>>,
...props: AnimatedProps<SectionListProps<ItemT, SectionT>>
));
@@ -22,7 +22,7 @@ import invariant from 'invariant';
export type AnimatedPropsAllowlist = $ReadOnly<{
style?: ?AnimatedStyleAllowlist,
[string]: true,
[key: string]: true | AnimatedStyleAllowlist,
}>;
type TargetView = {
+6 -1
View File
@@ -22,7 +22,12 @@ import NativeAppState from './NativeAppState';
* - @platform android - on another Activity (even if it was launched by your app)
* @platform ios - inactive - This is a state that occurs when transitioning between foreground & background, and during periods of inactivity such as entering the multitasking view, opening the Notification Center or in the event of an incoming call.
*/
export type AppStateStatus = 'inactive' | 'background' | 'active';
export type AppStateStatus =
| 'inactive'
| 'background'
| 'active'
| 'extension'
| 'unknown';
/**
* change - This even is received when the app state has changed.
@@ -110,6 +110,7 @@ const ActivityIndicator = (
style={StyleSheet.compose(styles.container, style)}>
{Platform.OS === 'android' ? (
// $FlowFixMe[prop-missing] Flow doesn't know when this is the android component
// $FlowFixMe[incompatible-type]
<PlatformActivityIndicator {...nativeProps} {...androidProps} />
) : (
/* $FlowFixMe[incompatible-type] (>=0.106.0 site=react_native_android_fb) This comment
@@ -17,11 +17,23 @@ import Platform from '../../Utilities/Platform';
export type {ProgressBarAndroidProps};
// A utility type to preserve the semantics of the union uses in the definition
// of ProgressBarAndroidProps. TS's Omit does not distribute over unions, so
// we define our own version which does. This does not affect Flow.
// $FlowExpectedError[unclear-type]
type Omit<T, K> = T extends any ? Pick<T, Exclude<$Keys<T>, K>> : T;
/**
* ProgressBarAndroid has been extracted from react-native core and will be removed in a future release.
* It can now be installed and imported from `@react-native-community/progress-bar-android` instead of 'react-native'.
* @see https://github.com/react-native-community/progress-bar-android
* @deprecated
*/
let ProgressBarAndroid: component(
ref?: React.RefSetter<
React.ElementRef<ProgressBarAndroidNativeComponentType>,
>,
...props: ProgressBarAndroidProps
...props: Omit<ProgressBarAndroidProps, empty>
);
if (Platform.OS === 'android') {
@@ -17,28 +17,25 @@ import type {ViewProps} from '../View/ViewPropTypes';
* `indeterminate` can only be false if `styleAttr` is Horizontal, and requires a
* `progress` value.
*/
type ProgressBarAndroidStyleAttrProp =
| {
styleAttr: 'Horizontal',
indeterminate: false,
progress: number,
}
| {
styleAttr:
| 'Horizontal'
| 'Normal'
| 'Small'
| 'Large'
| 'Inverse'
| 'SmallInverse'
| 'LargeInverse',
indeterminate: true,
};
type DeterminateProgressBarAndroidStyleAttrProp = {
styleAttr: 'Horizontal',
indeterminate: false,
progress: number,
};
export type ProgressBarAndroidProps = $ReadOnly<{
...ViewProps,
...ProgressBarAndroidStyleAttrProp,
type IndeterminateProgressBarAndroidStyleAttrProp = {
styleAttr:
| 'Horizontal'
| 'Normal'
| 'Small'
| 'Large'
| 'Inverse'
| 'SmallInverse'
| 'LargeInverse',
indeterminate: true,
};
type ProgressBarAndroidBaseProps = $ReadOnly<{
/**
* Whether to show the ProgressBar (true, the default) or hide it (false).
*/
@@ -52,3 +49,15 @@ export type ProgressBarAndroidProps = $ReadOnly<{
*/
testID?: ?string,
}>;
export type ProgressBarAndroidProps =
| $ReadOnly<{
...ViewProps,
...ProgressBarAndroidBaseProps,
...DeterminateProgressBarAndroidStyleAttrProp,
}>
| $ReadOnly<{
...ViewProps,
...ProgressBarAndroidBaseProps,
...IndeterminateProgressBarAndroidStyleAttrProp,
}>;
+3 -3
View File
@@ -14,8 +14,8 @@ export const version: $ReadOnly<{
patch: number,
prerelease: string | null,
}> = {
major: 1000,
minor: 0,
patch: 0,
major: 0,
minor: 80,
patch: 1,
prerelease: null,
};
@@ -52,7 +52,7 @@ export default class NativeEventEmitter<
{
_nativeModule: ?NativeModule;
constructor(nativeModule: ?NativeModule) {
constructor(nativeModule?: ?NativeModule) {
if (Platform.OS === 'ios') {
invariant(
nativeModule != null,
@@ -18,10 +18,23 @@ export type ResolvedAssetSource = {
+scale: number,
};
import type {
AssetDestPathResolver,
PackagerAsset,
} from '@react-native/assets-registry/registry';
// From @react-native/assets-registry
type AssetDestPathResolver = 'android' | 'generic';
// From @react-native/assets-registry
type PackagerAsset = $ReadOnly<{
__packager_asset: boolean,
fileSystemLocation: string,
httpServerLocation: string,
width: ?number,
height: ?number,
scales: Array<number>,
hash: string,
name: string,
type: string,
resolver?: AssetDestPathResolver,
...
}>;
const PixelRatio = require('../Utilities/PixelRatio').default;
const Platform = require('../Utilities/Platform').default;
@@ -107,4 +107,6 @@ declare export const setStyleAttributePreprocessor: (
* An identity function for creating style sheets.
*/
// $FlowFixMe[unsupported-variance-annotation]
declare export const create: <+S: ____Styles_Internal>(obj: S) => $ReadOnly<S>;
declare export const create: <+S: ____Styles_Internal>(
obj: S & ____Styles_Internal,
) => $ReadOnly<S>;
@@ -21,6 +21,7 @@ import type {
____ViewStyle_InternalOverrides,
} from './private/_StyleSheetTypesOverrides';
import type {____TransformStyle_Internal} from './private/_TransformStyle';
import type {ColorValue} from './StyleSheet';
export type {____TransformStyle_Internal};
@@ -1001,7 +1002,8 @@ export type ____ImageStyle_InternalCore = $ReadOnly<{
resizeMode?: ImageResizeMode,
objectFit?: 'cover' | 'contain' | 'fill' | 'scale-down' | 'none',
tintColor?: ____ColorValue_Internal,
overlayColor?: string,
overlayColor?: ColorValue,
overflow?: 'visible' | 'hidden',
}>;
export type ____ImageStyle_Internal = $ReadOnly<{
@@ -1014,7 +1016,7 @@ export type ____DangerouslyImpreciseStyle_InternalCore = $ReadOnly<{
resizeMode?: ImageResizeMode,
objectFit?: 'cover' | 'contain' | 'fill' | 'scale-down' | 'none',
tintColor?: ____ColorValue_Internal,
overlayColor?: string,
overlayColor?: ColorValue,
}>;
export type ____DangerouslyImpreciseStyle_Internal = $ReadOnly<{
@@ -10,6 +10,25 @@
import type AnimatedNode from '../../Animated/nodes/AnimatedNode';
// Helper types to enforce that a single key is used in a transform object
// after generating a TypeScript definition file from the Flow types.
// $FlowExpectedError[unclear-type]
type KeysOfUnion<T> = T extends any ? $Keys<T> : empty;
// $FlowExpectedError[unclear-type]
type ValueOfUnion<T, K> = T extends any
? K extends $Keys<T>
? T[K]
: empty
: empty;
type MergeUnion<T> = {
[K in KeysOfUnion<T>]?: ValueOfUnion<T, K>,
};
type MaximumOneOf<T: {...}> = $Values<{
[K in keyof T]: $Exact<{
[P in keyof T]?: P extends K ? T[P] : empty,
}>,
}>;
export type ____TransformStyle_Internal = $ReadOnly<{
/**
* `transform` accepts an array of transformation objects. Each object specifies
@@ -29,27 +48,36 @@ export type ____TransformStyle_Internal = $ReadOnly<{
*/
transform?:
| $ReadOnlyArray<
| {+perspective: number | AnimatedNode}
| {+rotate: string | AnimatedNode}
| {+rotateX: string | AnimatedNode}
| {+rotateY: string | AnimatedNode}
| {+rotateZ: string | AnimatedNode}
| {+scale: number | AnimatedNode}
| {+scaleX: number | AnimatedNode}
| {+scaleY: number | AnimatedNode}
| {+translateX: number | string | AnimatedNode}
| {+translateY: number | string | AnimatedNode}
| {
+translate:
| [number | string | AnimatedNode, number | string | AnimatedNode]
| AnimatedNode,
}
| {+skewX: string | AnimatedNode}
| {+skewY: string | AnimatedNode}
// TODO: what is the actual type it expects?
| {
+matrix: $ReadOnlyArray<number | AnimatedNode> | AnimatedNode,
},
$ReadOnly<
MaximumOneOf<
MergeUnion<
| {+perspective: number | AnimatedNode}
| {+rotate: string | AnimatedNode}
| {+rotateX: string | AnimatedNode}
| {+rotateY: string | AnimatedNode}
| {+rotateZ: string | AnimatedNode}
| {+scale: number | AnimatedNode}
| {+scaleX: number | AnimatedNode}
| {+scaleY: number | AnimatedNode}
| {+translateX: number | string | AnimatedNode}
| {+translateY: number | string | AnimatedNode}
| {
+translate:
| [
number | string | AnimatedNode,
number | string | AnimatedNode,
]
| AnimatedNode,
}
| {+skewX: string | AnimatedNode}
| {+skewY: string | AnimatedNode}
// TODO: what is the actual type it expects?
| {
+matrix: $ReadOnlyArray<number | AnimatedNode> | AnimatedNode,
},
>,
>,
>,
>
| string,
/**
+2 -31
View File
@@ -13,6 +13,7 @@
import type {
AccessibilityActionEvent,
AccessibilityActionInfo,
AccessibilityProps,
AccessibilityRole,
AccessibilityState,
Role,
@@ -124,20 +125,7 @@ export type TextPropsAndroid = {
};
type TextBaseProps = $ReadOnly<{
/**
* Indicates whether the view is an accessibility element.
*
* See https://reactnative.dev/docs/text#accessible
*/
accessible?: ?boolean,
accessibilityActions?: ?$ReadOnlyArray<AccessibilityActionInfo>,
onAccessibilityAction?: ?(event: AccessibilityActionEvent) => mixed,
accessibilityHint?: ?Stringish,
accessibilityLanguage?: ?Stringish,
accessibilityLabel?: ?Stringish,
accessibilityRole?: ?AccessibilityRole,
accessibilityState?: ?AccessibilityState,
'aria-label'?: ?string,
/**
* Whether fonts should scale to respect Text Size accessibility settings.
@@ -152,24 +140,6 @@ type TextBaseProps = $ReadOnly<{
*
*/
android_hyphenationFrequency?: ?('normal' | 'none' | 'full'),
/**
* alias for accessibilityState
*
* see https://reactnative.dev/docs/accessibility#accessibilitystate
*/
'aria-busy'?: ?boolean,
'aria-checked'?: ?boolean | 'mixed',
'aria-disabled'?: ?boolean,
'aria-expanded'?: ?boolean,
'aria-selected'?: ?boolean,
/**
* Represents the nativeID of the associated label text. When the assistive technology focuses on the component with this props, the text is read aloud.
* This prop is listed for cross-platform reasons and has no real effect on Android or iOS.
*/
'aria-labelledby'?: ?string,
children?: ?React.Node,
/**
@@ -306,4 +276,5 @@ export type TextProps = $ReadOnly<{
...TextPropsIOS,
...TextPropsAndroid,
...TextBaseProps,
...AccessibilityProps,
}>;
@@ -156,10 +156,10 @@ declare export class AnimatedEvent {
exports[`public API should not change unintentionally Libraries/Animated/AnimatedExports.js 1`] = `
"declare const Animated: typeof AnimatedImplementation;
declare export default {
get FlatList(): AnimatedFlatList,
get FlatList(): AnimatedFlatList<any>,
get Image(): AnimatedImage,
get ScrollView(): AnimatedScrollView,
get SectionList(): AnimatedSectionList,
get SectionList(): AnimatedSectionList<any, any>,
get Text(): AnimatedText,
get View(): AnimatedView,
...typeof Animated,
@@ -190,7 +190,10 @@ export type { default as AnimatedDivision } from \\"./nodes/AnimatedDivision\\";
export type { default as AnimatedModulo } from \\"./nodes/AnimatedModulo\\";
export type { default as AnimatedMultiplication } from \\"./nodes/AnimatedMultiplication\\";
export type { default as AnimatedSubtraction } from \\"./nodes/AnimatedSubtraction\\";
export type { WithAnimatedValue } from \\"./createAnimatedComponent\\";
export type {
WithAnimatedValue,
AnimatedProps,
} from \\"./createAnimatedComponent\\";
export type { AnimatedComponentType as AnimatedComponent } from \\"./createAnimatedComponent\\";
declare export const add: typeof AnimatedImplementation.add;
declare export const attachNativeEvent: typeof AnimatedImplementation.attachNativeEvent;
@@ -611,10 +614,10 @@ exports[`public API should not change unintentionally Libraries/Animated/bezier.
`;
exports[`public API should not change unintentionally Libraries/Animated/components/AnimatedFlatList.js 1`] = `
"declare export default AnimatedComponentType<
React.ElementConfig<typeof FlatList>,
FlatList<mixed>,
>;
"declare export default component<ItemT = any>(
ref?: React.RefSetter<FlatList<ItemT>>,
...props: AnimatedProps<FlatListProps<ItemT>>
);
"
`;
@@ -638,10 +641,10 @@ declare export default typeof AnimatedScrollView;
`;
exports[`public API should not change unintentionally Libraries/Animated/components/AnimatedSectionList.js 1`] = `
"declare export default AnimatedComponentType<
React.ElementConfig<typeof SectionList>,
SectionList<any, SectionBase<any>>,
>;
"declare export default component<ItemT = any, SectionT = any>(
ref?: React.RefSetter<SectionList<ItemT, SectionT>>,
...props: AnimatedProps<SectionListProps<ItemT, SectionT>>
);
"
`;
@@ -904,7 +907,7 @@ declare export default class AnimatedObject extends AnimatedWithChildren {
exports[`public API should not change unintentionally Libraries/Animated/nodes/AnimatedProps.js 1`] = `
"export type AnimatedPropsAllowlist = $ReadOnly<{
style?: ?AnimatedStyleAllowlist,
[string]: true,
[key: string]: true | AnimatedStyleAllowlist,
}>;
type TargetViewInstance = React.ElementRef<React.ElementType>;
declare export default class AnimatedProps extends AnimatedNode {
@@ -1077,7 +1080,12 @@ exports[`public API should not change unintentionally Libraries/Animated/useAnim
`;
exports[`public API should not change unintentionally Libraries/AppState/AppState.js 1`] = `
"export type AppStateStatus = \\"inactive\\" | \\"background\\" | \\"active\\";
"export type AppStateStatus =
| \\"inactive\\"
| \\"background\\"
| \\"active\\"
| \\"extension\\"
| \\"unknown\\";
type AppStateEventDefinitions = {
change: [AppStateStatus],
memoryWarning: [],
@@ -1818,11 +1826,12 @@ declare export default function useAndroidRippleForView(
exports[`public API should not change unintentionally Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.js 1`] = `
"export type { ProgressBarAndroidProps };
type Omit<T, K> = T extends any ? Pick<T, Exclude<$Keys<T>, K>> : T;
declare let ProgressBarAndroid: component(
ref?: React.RefSetter<
React.ElementRef<ProgressBarAndroidNativeComponentType>,
>,
...props: ProgressBarAndroidProps
...props: Omit<ProgressBarAndroidProps, empty>
);
declare export default typeof ProgressBarAndroid;
"
@@ -1835,30 +1844,38 @@ declare export default typeof ProgressBarAndroidNativeComponent;
`;
exports[`public API should not change unintentionally Libraries/Components/ProgressBarAndroid/ProgressBarAndroidTypes.js 1`] = `
"type ProgressBarAndroidStyleAttrProp =
| {
styleAttr: \\"Horizontal\\",
indeterminate: false,
progress: number,
}
| {
styleAttr:
| \\"Horizontal\\"
| \\"Normal\\"
| \\"Small\\"
| \\"Large\\"
| \\"Inverse\\"
| \\"SmallInverse\\"
| \\"LargeInverse\\",
indeterminate: true,
};
export type ProgressBarAndroidProps = $ReadOnly<{
...ViewProps,
...ProgressBarAndroidStyleAttrProp,
"type DeterminateProgressBarAndroidStyleAttrProp = {
styleAttr: \\"Horizontal\\",
indeterminate: false,
progress: number,
};
type IndeterminateProgressBarAndroidStyleAttrProp = {
styleAttr:
| \\"Horizontal\\"
| \\"Normal\\"
| \\"Small\\"
| \\"Large\\"
| \\"Inverse\\"
| \\"SmallInverse\\"
| \\"LargeInverse\\",
indeterminate: true,
};
type ProgressBarAndroidBaseProps = $ReadOnly<{
animating?: ?boolean,
color?: ?ColorValue,
testID?: ?string,
}>;
export type ProgressBarAndroidProps =
| $ReadOnly<{
...ViewProps,
...ProgressBarAndroidBaseProps,
...DeterminateProgressBarAndroidStyleAttrProp,
}>
| $ReadOnly<{
...ViewProps,
...ProgressBarAndroidBaseProps,
...IndeterminateProgressBarAndroidStyleAttrProp,
}>;
"
`;
@@ -4152,7 +4169,7 @@ declare export default class NativeEventEmitter<
> = $ReadOnly<Record<string, $ReadOnlyArray<UnsafeObject>>>,
> implements IEventEmitter<TEventToArgsMap>
{
constructor(nativeModule: ?NativeModule): void;
constructor(nativeModule?: ?NativeModule): void;
addListener<TEvent: $Keys<TEventToArgsMap>>(
eventType: TEvent,
listener: (...args: TEventToArgsMap[TEvent]) => mixed,
@@ -4202,6 +4219,19 @@ exports[`public API should not change unintentionally Libraries/Image/AssetSourc
+uri: string,
+scale: number,
};
type AssetDestPathResolver = \\"android\\" | \\"generic\\";
type PackagerAsset = $ReadOnly<{
fileSystemLocation: string,
httpServerLocation: string,
width: ?number,
height: ?number,
scales: Array<number>,
hash: string,
name: string,
type: string,
resolver?: AssetDestPathResolver,
...
}>;
declare class AssetSourceResolver {
serverUrl: ?string;
jsbundleUrl: ?string;
@@ -7080,7 +7110,9 @@ declare export const setStyleAttributePreprocessor: (
property: string,
process: (nextProp: any) => any
) => void;
declare export const create: <+S: ____Styles_Internal>(obj: S) => $ReadOnly<S>;
declare export const create: <+S: ____Styles_Internal>(
obj: S & ____Styles_Internal
) => $ReadOnly<S>;
"
`;
@@ -7485,7 +7517,8 @@ export type ____ImageStyle_InternalCore = $ReadOnly<{
resizeMode?: ImageResizeMode,
objectFit?: \\"cover\\" | \\"contain\\" | \\"fill\\" | \\"scale-down\\" | \\"none\\",
tintColor?: ____ColorValue_Internal,
overlayColor?: string,
overlayColor?: ColorValue,
overflow?: \\"visible\\" | \\"hidden\\",
}>;
export type ____ImageStyle_Internal = $ReadOnly<{
...____ImageStyle_InternalCore,
@@ -7496,7 +7529,7 @@ export type ____DangerouslyImpreciseStyle_InternalCore = $ReadOnly<{
resizeMode?: ImageResizeMode,
objectFit?: \\"cover\\" | \\"contain\\" | \\"fill\\" | \\"scale-down\\" | \\"none\\",
tintColor?: ____ColorValue_Internal,
overlayColor?: string,
overlayColor?: ColorValue,
}>;
export type ____DangerouslyImpreciseStyle_Internal = $ReadOnly<{
...____DangerouslyImpreciseStyle_InternalCore,
@@ -7580,29 +7613,52 @@ export type ____ViewStyle_InternalOverrides = $ReadOnly<{}>;
`;
exports[`public API should not change unintentionally Libraries/StyleSheet/private/_TransformStyle.js 1`] = `
"export type ____TransformStyle_Internal = $ReadOnly<{
"type KeysOfUnion<T> = T extends any ? $Keys<T> : empty;
type ValueOfUnion<T, K> = T extends any
? K extends $Keys<T>
? T[K]
: empty
: empty;
type MergeUnion<T> = {
[K in KeysOfUnion<T>]?: ValueOfUnion<T, K>,
};
type MaximumOneOf<T: { ... }> = $Values<{
[K in keyof T]: $Exact<{
[P in keyof T]?: P extends K ? T[P] : empty,
}>,
}>;
export type ____TransformStyle_Internal = $ReadOnly<{
transform?:
| $ReadOnlyArray<
| { +perspective: number | AnimatedNode }
| { +rotate: string | AnimatedNode }
| { +rotateX: string | AnimatedNode }
| { +rotateY: string | AnimatedNode }
| { +rotateZ: string | AnimatedNode }
| { +scale: number | AnimatedNode }
| { +scaleX: number | AnimatedNode }
| { +scaleY: number | AnimatedNode }
| { +translateX: number | string | AnimatedNode }
| { +translateY: number | string | AnimatedNode }
| {
+translate:
| [number | string | AnimatedNode, number | string | AnimatedNode]
| AnimatedNode,
}
| { +skewX: string | AnimatedNode }
| { +skewY: string | AnimatedNode }
| {
+matrix: $ReadOnlyArray<number | AnimatedNode> | AnimatedNode,
},
$ReadOnly<
MaximumOneOf<
MergeUnion<
| { +perspective: number | AnimatedNode }
| { +rotate: string | AnimatedNode }
| { +rotateX: string | AnimatedNode }
| { +rotateY: string | AnimatedNode }
| { +rotateZ: string | AnimatedNode }
| { +scale: number | AnimatedNode }
| { +scaleX: number | AnimatedNode }
| { +scaleY: number | AnimatedNode }
| { +translateX: number | string | AnimatedNode }
| { +translateY: number | string | AnimatedNode }
| {
+translate:
| [
number | string | AnimatedNode,
number | string | AnimatedNode,
]
| AnimatedNode,
}
| { +skewX: string | AnimatedNode }
| { +skewY: string | AnimatedNode }
| {
+matrix: $ReadOnlyArray<number | AnimatedNode> | AnimatedNode,
},
>,
>,
>,
>
| string,
transformOrigin?:
@@ -7818,23 +7874,9 @@ export type TextPropsAndroid = {
minimumFontScale?: ?number,
};
type TextBaseProps = $ReadOnly<{
accessible?: ?boolean,
accessibilityActions?: ?$ReadOnlyArray<AccessibilityActionInfo>,
onAccessibilityAction?: ?(event: AccessibilityActionEvent) => mixed,
accessibilityHint?: ?Stringish,
accessibilityLanguage?: ?Stringish,
accessibilityLabel?: ?Stringish,
accessibilityRole?: ?AccessibilityRole,
accessibilityState?: ?AccessibilityState,
\\"aria-label\\"?: ?string,
allowFontScaling?: ?boolean,
android_hyphenationFrequency?: ?(\\"normal\\" | \\"none\\" | \\"full\\"),
\\"aria-busy\\"?: ?boolean,
\\"aria-checked\\"?: ?boolean | \\"mixed\\",
\\"aria-disabled\\"?: ?boolean,
\\"aria-expanded\\"?: ?boolean,
\\"aria-selected\\"?: ?boolean,
\\"aria-labelledby\\"?: ?string,
children?: ?React.Node,
ellipsizeMode?: ?(\\"clip\\" | \\"head\\" | \\"middle\\" | \\"tail\\"),
id?: string,
@@ -7865,6 +7907,7 @@ export type TextProps = $ReadOnly<{
...TextPropsIOS,
...TextPropsAndroid,
...TextBaseProps,
...AccessibilityProps,
}>;
"
`;
@@ -8892,8 +8935,33 @@ declare export default typeof rejectionTrackingOptions;
`;
exports[`public API should not change unintentionally Libraries/vendor/core/ErrorUtils.js 1`] = `
"export type ErrorUtils = ErrorUtilsT;
declare export default ErrorUtilsT;
"type ErrorHandler = (error: mixed, isFatal: boolean) => void;
type Fn<Args: $ReadOnlyArray<mixed>, Return> = (...Args) => Return;
export type ErrorUtils = {
applyWithGuard<TArgs: $ReadOnlyArray<mixed>, TOut>(
fun: Fn<TArgs, TOut>,
context?: mixed,
args?: ?TArgs,
unused_onError?: null,
unused_name?: ?string
): ?TOut,
applyWithGuardIfNeeded<TArgs: $ReadOnlyArray<mixed>, TOut>(
fun: Fn<TArgs, TOut>,
context?: mixed,
args?: ?TArgs
): ?TOut,
getGlobalHandler(): ErrorHandler,
guard<TArgs: $ReadOnlyArray<mixed>, TOut>(
fun: Fn<TArgs, TOut>,
name?: ?string,
context?: mixed
): ?(...TArgs) => ?TOut,
inGuard(): boolean,
reportError(error: mixed): void,
reportFatalError(error: mixed): void,
setGlobalHandler(fun: ErrorHandler): void,
};
declare export default ErrorUtils;
"
`;
@@ -9010,6 +9078,7 @@ export type {
SectionListProps,
SectionListRenderItem,
SectionListRenderItemInfo,
SectionListData,
} from \\"./Libraries/Lists/SectionList\\";
export { default as SectionList } from \\"./Libraries/Lists/SectionList\\";
export type {
+28 -4
View File
@@ -8,9 +8,33 @@
* @flow strict
*/
import type {ErrorUtilsT} from '@react-native/js-polyfills/error-guard';
export type ErrorUtils = ErrorUtilsT;
// From @react-native/js-polyfills
type ErrorHandler = (error: mixed, isFatal: boolean) => void;
type Fn<Args: $ReadOnlyArray<mixed>, Return> = (...Args) => Return;
export type ErrorUtils = {
applyWithGuard<TArgs: $ReadOnlyArray<mixed>, TOut>(
fun: Fn<TArgs, TOut>,
context?: mixed,
args?: ?TArgs,
unused_onError?: null,
unused_name?: ?string,
): ?TOut,
applyWithGuardIfNeeded<TArgs: $ReadOnlyArray<mixed>, TOut>(
fun: Fn<TArgs, TOut>,
context?: mixed,
args?: ?TArgs,
): ?TOut,
getGlobalHandler(): ErrorHandler,
guard<TArgs: $ReadOnlyArray<mixed>, TOut>(
fun: Fn<TArgs, TOut>,
name?: ?string,
context?: mixed,
): ?(...TArgs) => ?TOut,
inGuard(): boolean,
reportError(error: mixed): void,
reportFatalError(error: mixed): void,
setGlobalHandler(fun: ErrorHandler): void,
};
/**
* The particular require runtime that we are using looks for a global
@@ -24,4 +48,4 @@ export type ErrorUtils = ErrorUtilsT;
* that use it aren't just using a global variable, so simply export the global
* variable here. ErrorUtils is originally defined in a file named error-guard.js.
*/
export default (global.ErrorUtils: ErrorUtilsT);
export default global.ErrorUtils as ErrorUtils;
@@ -21,9 +21,9 @@ NSDictionary* RCTGetReactNativeVersion(void)
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^(void){
__rnVersion = @{
RCTVersionMajor: @(1000),
RCTVersionMinor: @(0),
RCTVersionPatch: @(0),
RCTVersionMajor: @(0),
RCTVersionMinor: @(80),
RCTVersionPatch: @(1),
RCTVersionPrerelease: [NSNull null],
};
});
@@ -170,10 +170,24 @@ static NSString *const kRCTLegacyInteropChildIndexKey = @"index";
- (void)mountChildComponentView:(UIView<RCTComponentViewProtocol> *)childComponentView index:(NSInteger)index
{
[_viewsToBeMounted addObject:@{
kRCTLegacyInteropChildIndexKey : [NSNumber numberWithInteger:index],
kRCTLegacyInteropChildComponentKey : childComponentView
}];
if (_adapter && index == _adapter.paperView.reactSubviews.count) {
// This is a new child view that is being added to the end of the children array.
// After the children is added, we need to call didUpdateReactSubviews to make sure that it is rendered.
// Without this change, the new child will not be rendered right away because the didUpdateReactSubviews is not
// called and the `finalizeUpdate` is not invoked.
if ([childComponentView isKindOfClass:[RCTLegacyViewManagerInteropComponentView class]]) {
UIView *target = ((RCTLegacyViewManagerInteropComponentView *)childComponentView).contentView;
[_adapter.paperView insertReactSubview:target atIndex:index];
} else {
[_adapter.paperView insertReactSubview:childComponentView atIndex:index];
}
[_adapter.paperView didUpdateReactSubviews];
} else {
[_viewsToBeMounted addObject:@{
kRCTLegacyInteropChildIndexKey : [NSNumber numberWithInteger:index],
kRCTLegacyInteropChildComponentKey : childComponentView
}];
}
}
- (void)unmountChildComponentView:(UIView<RCTComponentViewProtocol> *)childComponentView index:(NSInteger)index
@@ -2006,7 +2006,7 @@ public final class com/facebook/react/devsupport/DefaultDevLoadingViewImplementa
public final fun setDevLoadingEnabled (Z)V
}
public final class com/facebook/react/devsupport/DevServerHelper {
public class com/facebook/react/devsupport/DevServerHelper {
public fun <init> (Lcom/facebook/react/modules/debug/interfaces/DeveloperSettings;Landroid/content/Context;Lcom/facebook/react/packagerconnection/PackagerConnectionSettings;)V
public final fun closeInspectorConnection ()V
public final fun closePackagerConnection ()V
@@ -2015,12 +2015,12 @@ public final class com/facebook/react/devsupport/DevServerHelper {
public final fun downloadBundleFromURL (Lcom/facebook/react/devsupport/interfaces/DevBundleDownloadListener;Ljava/io/File;Ljava/lang/String;Lcom/facebook/react/devsupport/BundleDownloader$BundleInfo;Lokhttp3/Request$Builder;)V
public static synthetic fun downloadBundleFromURL$default (Lcom/facebook/react/devsupport/DevServerHelper;Lcom/facebook/react/devsupport/interfaces/DevBundleDownloadListener;Ljava/io/File;Ljava/lang/String;Lcom/facebook/react/devsupport/BundleDownloader$BundleInfo;Lokhttp3/Request$Builder;ILjava/lang/Object;)V
public final fun downloadBundleResourceFromUrlSync (Ljava/lang/String;Ljava/io/File;)Ljava/io/File;
public final fun getDevServerBundleURL (Ljava/lang/String;)Ljava/lang/String;
public final fun getDevServerSplitBundleURL (Ljava/lang/String;)Ljava/lang/String;
public final fun getSourceMapUrl (Ljava/lang/String;)Ljava/lang/String;
public final fun getSourceUrl (Ljava/lang/String;)Ljava/lang/String;
public fun getDevServerBundleURL (Ljava/lang/String;)Ljava/lang/String;
public fun getDevServerSplitBundleURL (Ljava/lang/String;)Ljava/lang/String;
public fun getSourceMapUrl (Ljava/lang/String;)Ljava/lang/String;
public fun getSourceUrl (Ljava/lang/String;)Ljava/lang/String;
public final fun getWebsocketProxyURL ()Ljava/lang/String;
public final fun isPackagerRunning (Lcom/facebook/react/devsupport/interfaces/PackagerStatusCallback;)V
public fun isPackagerRunning (Lcom/facebook/react/devsupport/interfaces/PackagerStatusCallback;)V
public final fun openDebugger (Lcom/facebook/react/bridge/ReactContext;Ljava/lang/String;)V
public final fun openInspectorConnection ()V
public final fun openPackagerConnection (Ljava/lang/String;Lcom/facebook/react/devsupport/DevServerHelper$PackagerCommandListener;)V
@@ -4656,7 +4656,7 @@ public abstract class com/facebook/react/uimanager/ViewGroupManager : com/facebo
public fun getShadowNodeClass ()Ljava/lang/Class;
public static final fun getViewZIndex (Landroid/view/View;)Ljava/lang/Integer;
public fun needsCustomLayoutForChildren ()Z
public final fun removeView (Landroid/view/ViewGroup;Landroid/view/View;)V
public fun removeView (Landroid/view/ViewGroup;Landroid/view/View;)V
public synthetic fun removeViewAt (Landroid/view/View;I)V
public fun removeViewAt (Landroid/view/ViewGroup;I)V
public static final fun setViewZIndex (Landroid/view/View;I)V
@@ -5123,13 +5123,13 @@ public final class com/facebook/react/uimanager/events/TouchEventType$Companion
public final fun getJSEventName (Lcom/facebook/react/uimanager/events/TouchEventType;)Ljava/lang/String;
}
public final class com/facebook/react/uimanager/layoutanimation/LayoutAnimationController {
public class com/facebook/react/uimanager/layoutanimation/LayoutAnimationController {
public fun <init> ()V
public final fun applyLayoutUpdate (Landroid/view/View;IIII)V
public final fun deleteView (Landroid/view/View;Lcom/facebook/react/uimanager/layoutanimation/LayoutAnimationListener;)V
public fun applyLayoutUpdate (Landroid/view/View;IIII)V
public fun deleteView (Landroid/view/View;Lcom/facebook/react/uimanager/layoutanimation/LayoutAnimationListener;)V
public final fun initializeFromConfig (Lcom/facebook/react/bridge/ReadableMap;Lcom/facebook/react/bridge/Callback;)V
public final fun reset ()V
public final fun shouldAnimateLayout (Landroid/view/View;)Z
public fun reset ()V
public fun shouldAnimateLayout (Landroid/view/View;)Z
}
public abstract interface class com/facebook/react/uimanager/layoutanimation/LayoutAnimationListener {
@@ -6565,7 +6565,6 @@ public class com/facebook/react/views/textinput/ReactEditText : androidx/appcomp
public fun addTextChangedListener (Landroid/text/TextWatcher;)V
protected final fun applyTextAttributes ()V
public final fun canUpdateWithEventCount (I)Z
public fun clearFocus ()V
protected final fun finalize ()V
public final fun getBorderColor (I)I
protected final fun getContainsImages ()Z
@@ -1,4 +1,4 @@
VERSION_NAME=1000.0.0
VERSION_NAME=0.80.1
react.internal.publishingGroup=com.facebook.react
android.useAndroidX=true
@@ -11,11 +11,13 @@ import android.content.Intent;
import android.content.res.Configuration;
import android.os.Bundle;
import android.view.KeyEvent;
import androidx.activity.OnBackPressedCallback;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import com.facebook.react.modules.core.DefaultHardwareBackBtnHandler;
import com.facebook.react.modules.core.PermissionAwareActivity;
import com.facebook.react.modules.core.PermissionListener;
import com.facebook.react.util.AndroidVersion;
import org.jetbrains.annotations.NotNull;
/** Base Activity for React Native applications. */
@@ -24,6 +26,18 @@ public abstract class ReactActivity extends AppCompatActivity
private final ReactActivityDelegate mDelegate;
// Due to enforced predictive back on targetSdk 36, 'onBackPressed()' is disabled by default.
// Using a workaround to trigger it manually.
private final OnBackPressedCallback mBackPressedCallback =
new OnBackPressedCallback(true) {
@Override
public void handleOnBackPressed() {
setEnabled(false);
onBackPressed();
setEnabled(true);
}
};
protected ReactActivity() {
mDelegate = createReactActivityDelegate();
}
@@ -45,6 +59,9 @@ public abstract class ReactActivity extends AppCompatActivity
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mDelegate.onCreate(savedInstanceState);
if (AndroidVersion.isAtLeastTargetSdk36(this)) {
getOnBackPressedDispatcher().addCallback(this, mBackPressedCallback);
}
}
@Override
@@ -103,6 +120,9 @@ public abstract class ReactActivity extends AppCompatActivity
@Override
public void invokeDefaultOnBackPressed() {
// Disabling callback so the fallback logic (finish activity) can run
// as super.onBackPressed() will call all enabled callbacks in the dispatcher.
mBackPressedCallback.setEnabled(false);
super.onBackPressed();
}
@@ -1076,6 +1076,10 @@ public class ReactInstanceManager {
if (reactPackage instanceof ViewManagerOnDemandReactPackage) {
Collection<String> names =
((ViewManagerOnDemandReactPackage) reactPackage).getViewManagerNames(context);
// When converting this class to Kotlin, you need to retain this null check
// or wrap around a try/catch otherwise this will cause a crash for OSS libraries
// that are not migrated to Kotlin yet and are returning null for
// `getViewManagerNames`
if (names != null) {
uniqueNames.addAll(names);
}
@@ -59,7 +59,7 @@ import okio.Okio
*/
@SuppressLint(
"StaticFieldLeak") // TODO: This entire class should be rewritten to don't use AsyncTask
public class DevServerHelper(
public open class DevServerHelper(
private val settings: DeveloperSettings,
private val applicationContext: Context,
private val packagerConnectionSettings: PackagerConnectionSettings
@@ -287,20 +287,20 @@ public class DevServerHelper(
additionalOptionsBuilder.toString())
}
public fun getDevServerBundleURL(jsModulePath: String): String =
public open fun getDevServerBundleURL(jsModulePath: String): String =
createBundleURL(jsModulePath, BundleType.BUNDLE, packagerConnectionSettings.debugServerHost)
public fun getDevServerSplitBundleURL(jsModulePath: String): String =
public open fun getDevServerSplitBundleURL(jsModulePath: String): String =
createSplitBundleURL(jsModulePath, packagerConnectionSettings.debugServerHost)
public fun isPackagerRunning(callback: PackagerStatusCallback) {
public open fun isPackagerRunning(callback: PackagerStatusCallback) {
packagerStatusCheck.run(packagerConnectionSettings.debugServerHost, callback)
}
public fun getSourceMapUrl(mainModuleName: String): String =
public open fun getSourceMapUrl(mainModuleName: String): String =
createBundleURL(mainModuleName, BundleType.MAP)
public fun getSourceUrl(mainModuleName: String): String =
public open fun getSourceUrl(mainModuleName: String): String =
createBundleURL(mainModuleName, BundleType.BUNDLE)
/**
@@ -18,7 +18,5 @@ public class ReactNativeFeatureFlagsOverrides_RNOSS_Stable_Android(
override fun useTurboModules(): Boolean = bridgelessEnabled || turboModulesEnabled
override fun updateRuntimeShadowNodeReferencesOnCommit(): Boolean = true
override fun useShadowNodeStateOnClone(): Boolean = true
}
@@ -12,9 +12,9 @@ package com.facebook.react.modules.systeminfo
public object ReactNativeVersion {
@JvmField
public val VERSION: Map<String, Any?> = mapOf(
"major" to 1000,
"minor" to 0,
"patch" to 0,
"major" to 0,
"minor" to 80,
"patch" to 1,
"prerelease" to null
)
}
@@ -69,6 +69,7 @@ import com.facebook.react.uimanager.ViewManager
import com.facebook.react.uimanager.ViewManagerRegistry
import com.facebook.react.uimanager.ViewManagerResolver
import com.facebook.react.uimanager.events.EventDispatcher
import com.facebook.react.util.RNLog
import com.facebook.soloader.SoLoader
import com.facebook.systrace.Systrace
import com.facebook.systrace.SystraceMessage
@@ -544,7 +545,18 @@ internal class ReactInstance(
for (reactPackage in reactPackages) {
if (reactPackage is ViewManagerOnDemandReactPackage) {
val names = reactPackage.getViewManagerNames(context)
uniqueNames.addAll(names)
// We need to null check here because some Java implementation of the
// `ViewManagerOnDemandReactPackage` interface could still return null even
// if the method is marked as returning a non-nullable collection in Kotlin.
// See https://github.com/facebook/react-native/issues/52014
@Suppress("SENSELESS_COMPARISON")
if (names == null) {
RNLog.w(
context,
"The ReactPackage called: `${reactPackage.javaClass.simpleName}` is returning null for getViewManagerNames(). This is violating the signature of the method. That method should be updated to return an empty collection.")
} else {
uniqueNames.addAll(names)
}
}
}
return uniqueNames
@@ -462,9 +462,9 @@ public class NativeViewHierarchyOptimizer {
return false;
}
ReadableMapKeySetIterator keyIterator = props.backingMap.keySetIterator();
ReadableMapKeySetIterator keyIterator = props.internal_backingMap().keySetIterator();
while (keyIterator.hasNextKey()) {
if (!ViewProps.isLayoutOnly(props.backingMap, keyIterator.nextKey())) {
if (!ViewProps.isLayoutOnly(props.internal_backingMap(), keyIterator.nextKey())) {
return false;
}
}
@@ -31,7 +31,12 @@ import com.facebook.react.bridge.ReadableMap
*/
public class ReactStylesDiffMap(props: ReadableMap) {
@JvmField internal val backingMap: ReadableMap = props
/**
* This backing map is annotated as JvmName("internal_backingMap") so can be accessed by Java
* consumers. This is used in Expo to override setting properties in some subclassed view-manager
* as this provides faster access to the underlying values.
*/
@get:JvmName("internal_backingMap") internal val backingMap: ReadableMap = props
public fun toMap(): Map<String, Any?> = backingMap.toHashMap()
@@ -49,7 +49,12 @@ constructor(reactContext: ReactApplicationContext? = null) :
parent.removeViewAt(index)
}
public fun removeView(parent: T, view: View) {
/**
* Expo overrides this function GroupViewManagerWrapper.kt`, which is a replacement view manager
* adding support for delegates receiving callbacks whenever one of the methods in the view
* manager are called.
*/
public open fun removeView(parent: T, view: View) {
UiThreadUtil.assertOnUiThread()
for (i in 0 until getChildCount(parent)) {
@@ -97,7 +97,7 @@ public abstract class ViewManager<T extends View, C extends ReactShadowNode>
*/
public void updateProperties(@NonNull T viewToUpdate, ReactStylesDiffMap props) {
ViewManagerDelegate<T> delegate = getOrCreateViewManagerDelegate();
Iterator<Map.Entry<String, Object>> iterator = props.backingMap.getEntryIterator();
Iterator<Map.Entry<String, Object>> iterator = props.internal_backingMap().getEntryIterator();
while (iterator.hasNext()) {
Map.Entry<String, Object> entry = iterator.next();
delegate.setProperty(viewToUpdate, entry.getKey(), entry.getValue());
@@ -29,7 +29,7 @@ import javax.annotation.concurrent.NotThreadSafe
*/
@NotThreadSafe
@LegacyArchitecture
public class LayoutAnimationController {
public open class LayoutAnimationController {
private val layoutCreateAnimation: AbstractLayoutAnimation = LayoutCreateAnimation()
private val layoutUpdateAnimation: AbstractLayoutAnimation = LayoutUpdateAnimation()
private val layoutDeleteAnimation: AbstractLayoutAnimation = LayoutDeleteAnimation()
@@ -68,7 +68,7 @@ public class LayoutAnimationController {
}
}
public fun reset() {
public open fun reset() {
layoutCreateAnimation.reset()
layoutUpdateAnimation.reset()
layoutDeleteAnimation.reset()
@@ -83,7 +83,7 @@ public class LayoutAnimationController {
}
}
public fun shouldAnimateLayout(viewToAnimate: View?): Boolean {
public open fun shouldAnimateLayout(viewToAnimate: View?): Boolean {
// if view parent is null, skip animation: view have been clipped, we don't want animation to
// resume when view is re-attached to parent, which is the standard android animation behavior.
// If there's a layout handling animation going on, it should be animated nonetheless since the
@@ -106,7 +106,7 @@ public class LayoutAnimationController {
* @param width the new width value for the view
* @param height the new height value for the view
*/
public fun applyLayoutUpdate(view: View, x: Int, y: Int, width: Int, height: Int) {
public open fun applyLayoutUpdate(view: View, x: Int, y: Int, width: Int, height: Int) {
assertOnUiThread()
val reactTag = view.id
@@ -167,7 +167,7 @@ public class LayoutAnimationController {
* @param listener Called once the animation is finished, should be used to completely remove the
* view.
*/
public fun deleteView(view: View, listener: LayoutAnimationListener) {
public open fun deleteView(view: View, listener: LayoutAnimationListener) {
assertOnUiThread()
val animation =
@@ -143,11 +143,11 @@ internal data class BorderRadiusStyle(
CornerRadii(it, width, height)
} ?: zeroRadii,
bottomLeft =
(endEnd ?: bottomStart ?: bottomRight ?: uniform)?.let {
(endEnd ?: bottomEnd ?: bottomRight ?: uniform)?.let {
CornerRadii(it, width, height)
} ?: zeroRadii,
bottomRight =
(startEnd ?: bottomEnd ?: bottomLeft ?: uniform)?.let {
(startEnd ?: bottomStart ?: bottomLeft ?: uniform)?.let {
CornerRadii(it, width, height)
} ?: zeroRadii,
width = width,
@@ -0,0 +1,30 @@
/*
* 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.
*/
package com.facebook.react.util
import android.content.Context
import android.os.Build
/** Helper class for checking Android version-related information. */
internal object AndroidVersion {
/**
* This is the version code for Android 16 (SDK Level 36). Delete it once we bump up the default
* compile SDK version to 36.
*/
private const val VERSION_CODE_BAKLAVA: Int = 36
/**
* This method is used to check if the current device is running Android 16 (SDK Level 36) or
* higher and the app is targeting Android 16 (SDK Level 36) or higher.
*/
@JvmStatic
fun isAtLeastTargetSdk36(context: Context): Boolean =
Build.VERSION.SDK_INT >= VERSION_CODE_BAKLAVA &&
context.applicationInfo.targetSdkVersion >= VERSION_CODE_BAKLAVA
}
@@ -20,11 +20,12 @@ import android.view.MotionEvent
import android.view.View
import android.view.ViewGroup
import android.view.ViewStructure
import android.view.Window
import android.view.WindowManager
import android.view.accessibility.AccessibilityEvent
import android.view.accessibility.AccessibilityNodeInfo
import android.widget.FrameLayout
import androidx.activity.ComponentDialog
import androidx.activity.OnBackPressedCallback
import androidx.annotation.UiThread
import androidx.core.view.WindowInsetsCompat
import androidx.core.view.WindowInsetsControllerCompat
@@ -49,10 +50,10 @@ import com.facebook.react.uimanager.ThemedReactContext
import com.facebook.react.uimanager.UIManagerModule
import com.facebook.react.uimanager.events.EventDispatcher
import com.facebook.react.views.common.ContextUtils
import com.facebook.react.views.modal.ReactModalHostView.DialogRootViewGroup
import com.facebook.react.views.view.ReactViewGroup
import com.facebook.react.views.view.setStatusBarTranslucency
import com.facebook.react.views.view.setSystemBarsTranslucency
import java.util.Objects
/**
* ReactModalHostView is a view that sits in the view hierarchy representing a Modal view.
@@ -71,7 +72,7 @@ public class ReactModalHostView(context: ThemedReactContext) :
ViewGroup(context), LifecycleEventListener {
@get:VisibleForTesting
public var dialog: Dialog? = null
public var dialog: ComponentDialog? = null
private set
public var transparent: Boolean = false
@@ -260,17 +261,34 @@ public class ReactModalHostView(context: ThemedReactContext) :
}
val currentActivity = getCurrentActivity()
val newDialog = Dialog(currentActivity ?: context, theme)
val newDialog = ComponentDialog(currentActivity ?: context, theme)
dialog = newDialog
Objects.requireNonNull<Window>(newDialog.window)
.setFlags(
WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE,
WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE)
val window = requireNotNull(newDialog.window)
window.setFlags(
WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE,
WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE)
newDialog.setContentView(contentView)
updateProperties()
newDialog.setOnShowListener(onShowListener)
val handleCloseAction: () -> Unit = {
val listener =
checkNotNull(onRequestCloseListener) {
"onRequestClose callback must be set if back key is expected to close the modal"
}
listener.onRequestClose(newDialog)
}
val backPressedCallback: OnBackPressedCallback =
object : OnBackPressedCallback(true) {
override fun handleOnBackPressed() {
handleCloseAction()
}
}
newDialog.onBackPressedDispatcher.addCallback(newDialog, backPressedCallback)
newDialog.setOnKeyListener(
object : DialogInterface.OnKeyListener {
override fun onKey(dialog: DialogInterface, keyCode: Int, event: KeyEvent): Boolean {
@@ -280,11 +298,7 @@ public class ReactModalHostView(context: ThemedReactContext) :
// to whether or not to allow the back/escape key to close the dialog. If it chooses
// to, it can just set visible to false on the Modal and the Modal will go away
if (keyCode == KeyEvent.KEYCODE_BACK || keyCode == KeyEvent.KEYCODE_ESCAPE) {
val listener =
checkNotNull(onRequestCloseListener) {
"onRequestClose callback must be set if back key is expected to close the modal"
}
listener.onRequestClose(dialog)
handleCloseAction()
return true
} else {
// We redirect the rest of the key events to the current activity, since the
@@ -301,19 +315,19 @@ public class ReactModalHostView(context: ThemedReactContext) :
}
})
newDialog.window?.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE)
window.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE)
if (hardwareAccelerated) {
newDialog.window?.addFlags(WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED)
window.addFlags(WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED)
}
val flagSecureSet = isFlagSecureSet(currentActivity)
if (flagSecureSet) {
newDialog.window?.setFlags(
window.setFlags(
WindowManager.LayoutParams.FLAG_SECURE, WindowManager.LayoutParams.FLAG_SECURE)
}
if (currentActivity?.isFinishing == false) {
newDialog.show()
updateSystemAppearance()
newDialog.window?.clearFlags(WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE)
window.clearFlags(WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE)
}
}
@@ -35,6 +35,7 @@ import android.view.Menu
import android.view.MenuItem
import android.view.MotionEvent
import android.view.View
import android.view.ViewGroup
import android.view.accessibility.AccessibilityNodeInfo
import android.view.inputmethod.EditorInfo
import android.view.inputmethod.InputConnection
@@ -359,11 +360,26 @@ public open class ReactEditText public constructor(context: Context) : AppCompat
super.onTextContextMenuItem(
if (id == android.R.id.paste) android.R.id.pasteAsPlainText else id)
override fun clearFocus() {
super.clearFocus()
internal fun clearFocusAndMaybeRefocus() {
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.P || !isInTouchMode) {
super.clearFocus()
} else {
// Avoid refocusing to a new view on old versions of Android by default
// by preventing `requestFocus()` on the rootView from moving focus to any child.
// https://cs.android.com/android/_/android/platform/frameworks/base/+/bdc66cb5a0ef513f4306edf9156cc978b08e06e4
val rootViewGroup = rootView as ViewGroup
val oldDescendantFocusability = rootViewGroup.descendantFocusability
rootViewGroup.descendantFocusability = ViewGroup.FOCUS_BLOCK_DESCENDANTS
super.clearFocus()
rootViewGroup.descendantFocusability = oldDescendantFocusability
}
hideSoftKeyboard()
}
internal fun clearFocusFromJS() {
clearFocusAndMaybeRefocus()
}
// For cases like autoFocus, or ref.focus() where we request focus programmatically and not
// through
// interacting with the EditText directly (like clicking on it). We cannot use stock
@@ -598,10 +614,6 @@ public open class ReactEditText public constructor(context: Context) : AppCompat
requestFocusProgrammatically()
}
internal fun clearFocusFromJS() {
clearFocus()
}
public fun incrementAndGetEventCounter(): Int = ++nativeEventCount
public fun maybeSetTextFromJS(reactTextUpdate: ReactTextUpdate) {
@@ -926,7 +926,7 @@ public open class ReactTextInputManager public constructor() :
}
if (shouldBlur) {
editText.clearFocus()
editText.clearFocusAndMaybeRefocus()
}
// Prevent default behavior except when we want it to insert a newline.
@@ -95,13 +95,13 @@ class BorderRadiusStyleTest {
arrayOf(
BorderRadiusProp.BORDER_RADIUS,
BorderRadiusProp.BORDER_BOTTOM_RIGHT_RADIUS,
BorderRadiusProp.BORDER_BOTTOM_START_RADIUS,
BorderRadiusProp.BORDER_BOTTOM_END_RADIUS,
BorderRadiusProp.BORDER_END_END_RADIUS),
ComputedBorderRadiusProp.COMPUTED_BORDER_BOTTOM_RIGHT_RADIUS to
arrayOf(
BorderRadiusProp.BORDER_RADIUS,
BorderRadiusProp.BORDER_BOTTOM_LEFT_RADIUS,
BorderRadiusProp.BORDER_BOTTOM_END_RADIUS,
BorderRadiusProp.BORDER_BOTTOM_START_RADIUS,
BorderRadiusProp.BORDER_START_END_RADIUS),
)
@@ -12,16 +12,16 @@
#include <cstdint>
#include <string_view>
#define REACT_NATIVE_VERSION_MAJOR 1000
#define REACT_NATIVE_VERSION_MINOR 0
#define REACT_NATIVE_VERSION_PATCH 0
#define REACT_NATIVE_VERSION_MAJOR 0
#define REACT_NATIVE_VERSION_MINOR 80
#define REACT_NATIVE_VERSION_PATCH 1
namespace facebook::react {
constexpr struct {
int32_t Major = 1000;
int32_t Minor = 0;
int32_t Patch = 0;
int32_t Major = 0;
int32_t Minor = 80;
int32_t Patch = 1;
std::string_view Prerelease = "";
} ReactNativeVersion;
@@ -32,6 +32,6 @@ Pod::Spec.new do |s|
s.dependency "React-jsi", version
s.subspec "Fabric" do |ss|
ss.pod_target_xcconfig = { "OTHER_CFLAGS" => "$(inherited)" }
ss.pod_target_xcconfig = { "OTHER_CFLAGS" => "$(inherited)", "DEFINES_MODULE" => "YES" }
end
end
@@ -26,9 +26,6 @@ class ReactNativeFeatureFlagsOverridesOSSStable
bool useNativeViewConfigsInBridgelessMode() override {
return true;
}
bool updateRuntimeShadowNodeReferencesOnCommit() override {
return true;
}
bool useShadowNodeStateOnClone() override {
return true;
}
@@ -982,15 +982,19 @@ void JavaTurboModule::configureEventEmitterCallback() {
FACEBOOK_JNI_THROW_PENDING_EXCEPTION();
}
jvalue arg;
arg.l =
JCxxCallbackImpl::newObjectCxxArgs([&](folly::dynamic args) {
auto eventName = args.at(0).asString();
auto& eventEmitter = static_cast<AsyncEventEmitter<folly::dynamic>&>(
*eventEmitterMap_[eventName].get());
eventEmitter.emit(args.size() > 1 ? std::move(args).at(1) : nullptr);
}).release();
env->CallVoidMethod(instance_.get(), cachedMethodId, arg);
auto callback = JCxxCallbackImpl::newObjectCxxArgs([&](folly::dynamic args) {
auto eventName = args.at(0).asString();
auto& eventEmitter = static_cast<AsyncEventEmitter<folly::dynamic>&>(
*eventEmitterMap_[eventName].get());
eventEmitter.emit(args.size() > 1 ? std::move(args).at(1) : nullptr);
});
jvalue args[1];
args[0].l = callback.release();
// CallVoidMethod is replaced with CallVoidMethodA as it's unsafe on 32bit and
// causes crashes https://github.com/facebook/react-native/issues/51628
env->CallVoidMethodA(instance_.get(), cachedMethodId, args);
FACEBOOK_JNI_THROW_PENDING_EXCEPTION();
}
@@ -242,8 +242,9 @@ void TimerManager::attachGlobals(jsi::Runtime& runtime) {
}
if (!args[0].isObject() || !args[0].asObject(rt).isFunction(rt)) {
// Do not throw any error to match web spec
return timerIndex_++;
// Do not throw any error to match web spec; instead return 0, an
// invalid timer id
return 0;
}
auto callback = args[0].getObject(rt).getFunction(rt);
@@ -300,8 +301,9 @@ void TimerManager::attachGlobals(jsi::Runtime& runtime) {
}
if (!args[0].isObject() || !args[0].asObject(rt).isFunction(rt)) {
throw jsi::JSError(
rt, "The first argument to setInterval must be a function.");
// Do not throw any error to match web spec; instead return 0, an
// invalid timer id
return 0;
}
auto callback = args[0].getObject(rt).getFunction(rt);
auto delay = count > 1
@@ -93,7 +93,9 @@ class TimerManager {
// Each timeout that is registered on this queue gets a sequential id. This
// is the global count from which those are assigned.
TimerHandle timerIndex_{0};
// As per WHATWG HTML 8.6.1 (Timers) ids must be greater than zero, i.e. start
// at 1
TimerHandle timerIndex_{1};
// The React Native microtask queue is used to back public APIs including
// `queueMicrotask`, `clearImmediate`, and `setImmediate` (which is used by
@@ -267,7 +267,9 @@ TEST_F(ReactInstanceTest, testSetTimeoutWithoutDelay) {
EXPECT_CALL(
*mockRegistry_,
createTimer(_, 0)); // If delay is not provided, it should use 0
eval("setTimeout(() => {});");
auto val = eval("setTimeout(() => {});");
expectNoError();
EXPECT_EQ(val.asNumber(), 1); // First timer id should start at 1
}
TEST_F(ReactInstanceTest, testSetTimeoutWithPassThroughArgs) {
@@ -299,8 +301,9 @@ TEST_F(ReactInstanceTest, testSetTimeoutWithInvalidArgs) {
getErrorMessage("setTimeout();"),
"setTimeout must be called with at least one argument (the function to call).");
eval("setTimeout('invalid');");
auto val = eval("setTimeout('invalid')");
expectNoError();
EXPECT_EQ(val.asNumber(), 0);
eval("setTimeout(() => {}, 'invalid');");
expectNoError();
@@ -417,9 +420,10 @@ TEST_F(ReactInstanceTest, testSetIntervalWithInvalidArgs) {
EXPECT_EQ(
getErrorMessage("setInterval();"),
"setInterval must be called with at least one argument (the function to call).");
EXPECT_EQ(
getErrorMessage("setInterval('invalid', 100);"),
"The first argument to setInterval must be a function.");
auto val = eval("setInterval('invalid', 100)");
expectNoError();
EXPECT_EQ(val.asNumber(), 0);
}
TEST_F(ReactInstanceTest, testClearInterval) {
+1
View File
@@ -106,6 +106,7 @@ export type {
SectionListProps,
SectionListRenderItem,
SectionListRenderItemInfo,
SectionListData,
} from './Libraries/Lists/SectionList';
export {default as SectionList} from './Libraries/Lists/SectionList';
+1
View File
@@ -14,6 +14,7 @@ module.exports = {
defaultPlatform: 'ios',
platforms: ['android', 'ios', 'native'],
},
resolver: require.resolve('./jest/resolver.js'),
transform: {
'^.+\\.(js|ts|tsx)$': 'babel-jest',
'^.+\\.(bmp|gif|jpg|jpeg|mp4|png|psd|svg|webp)$': require.resolve(
@@ -4,29 +4,29 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
* @flow strict-local
* @format
*/
'use strict';
import type {HostComponent} from '../../../../src/private/types/HostComponent';
import type {HostComponent} from '../src/private/types/HostComponent';
import requireNativeComponent from '../../../ReactNative/requireNativeComponent';
import requireNativeComponent from '../Libraries/ReactNative/requireNativeComponent';
import * as React from 'react';
const RCTRefreshControl: HostComponent<{}> = requireNativeComponent<{}>(
'RCTRefreshControl',
);
class RefreshControlMock extends React.Component<{...}> {
export default class RefreshControlMock extends React.Component<{...}> {
static latestRef: ?RefreshControlMock;
render(): React.Node {
return <RCTRefreshControl />;
}
componentDidMount() {
RefreshControlMock.latestRef = this;
}
render(): React.MixedElement {
return <RCTRefreshControl />;
}
}
module.exports = RefreshControlMock;
+31
View File
@@ -0,0 +1,31 @@
/**
* 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.
*
* @format
*/
'use strict';
module.exports = (path, options) => {
const originalPackageFilter = options.packageFilter;
return options.defaultResolver(path, {
...options,
packageFilter: pkg => {
const filteredPkg = originalPackageFilter
? originalPackageFilter(pkg)
: pkg;
// Temporarily allow any react-native subpaths to be resolved and
// mocked by Jest (backwards compatibility around RFC0894)
if (filteredPkg.name === 'react-native') {
delete filteredPkg.exports;
}
return filteredPkg;
},
});
};

Some files were not shown because too many files have changed in this diff Show More