Commit Graph

1089 Commits

Author SHA1 Message Date
Alex Hunt f940be1caa Remove index.js.flow shim from Node packages (#49461)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49461

Flow now supports Package Exports 🎉. This means we can delete the compatiblity pattern in each of our build-enabled Node.js packages.

This simplifies the internal package structure needed to support Flow while developing from source in the monorepo — no prod impact.

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D69741143

fbshipit-source-id: 070715cb6beb00eb393186dbf95856ceb87fabef
2025-02-17 05:44:22 -08:00
Jakub Piasecki f15f618503 Sort entry points, add clipboard and AccessibilityInfo (#49458)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49458

Changelog: [Internal]

Sorts the entry points in the TS generator script and adds `Clipboard` and `AccessibilityInfo` which, as far as I can see, require no changes for their types to align with OSS.

Reviewed By: huntie

Differential Revision: D69663092

fbshipit-source-id: cfdb9ab5c07105497a1cdf4ebdc8de1e34b510bd
2025-02-17 02:59:58 -08:00
Riccardo Cipolleschi 69a4d32028 Add function to package the xcframework (#49434)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49434

This change adds a function to create the xcframework sarting from the various .framework's slice built before.

## Changelog:
[Internal] - Add function to create the xcframework

Reviewed By: cortinico

Differential Revision: D69660662

fbshipit-source-id: f58034c75cce3d242910d0ec1512be28059771ca
2025-02-14 10:20:10 -08:00
Riccardo Cipolleschi f05ebd5d9d Add logic to copy headers to .framework (#49433)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49433

This change adds the logic to copy the Headers files from the dependency folder to the generated frameworks folder.

There is a slight possibility that this function will be implemented by the Swift PM build system, as I open [this question](https://forums.swift.org/t/xcodebuild-does-not-generate-headers-if-the-source-is-swift-pm/77856) on the Swift forums.

In that case, we would be able to drop this.

## Changelog:
[Internal] - Add function to copy headers over to the .frameworks

Reviewed By: cortinico

Differential Revision: D69656046

fbshipit-source-id: e9d4f0f53ea57bc0df86fc9194cdf9fc1f372730
2025-02-14 10:20:10 -08:00
Dawid Małecki 893d1c5fed Add I18nManager and Vibration to buildTypes and align Flow with TS types (#49420)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49420

Changelog:
[Internal]

Reviewed By: huntie

Differential Revision: D69460878

fbshipit-source-id: 09cc702892ed93b6d413e1700e02151aa600bd18
2025-02-14 05:45:28 -08:00
Iwo Plaza ae1a33875e Re-include ActionSheetIOS and Share in automatic type def generation (#49411)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49411

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D69606078

fbshipit-source-id: e5fa3b6a50a6f53436cc7429f224c9f8353d6c8c
2025-02-14 04:56:00 -08:00
Jakub Piasecki 7295a0b9df Align Blob types with OSS (#49390)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49390

Na
Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D69586908

fbshipit-source-id: 017c427f381e075e4f6a440ab30ae0df79573793
2025-02-14 03:18:48 -08:00
Riccardo Cipolleschi dd0e1f24d1 Add build function to the prepare-ios-script (#49363)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49363

This change adds the `build()` function that calls xcodebuild to prepare the ReactNativeDependencies.framework

This functio creates the frameworks in the /react-native/third-party/.build folder

## Changelog:
[Internal] - Add build folder to the `prepare-ios-script`

Reviewed By: cortinico

Differential Revision: D69533218

fbshipit-source-id: edc9281e9270970084aa0f56b52ced4579df3473
2025-02-13 13:55:51 -08:00
Riccardo Cipolleschi b98362e311 Add code to keep only required files for dependencies (#49360)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49360

We don't need the whole dependencies archiveto build the dependencies. But usually we only need a subset of them.

This change add a functionality to the script to remove the unnecessary files.

## Changelog:
[Internal] - Add feature to remove unnecessary files from 3p dependencies.

Reviewed By: cortinico

Differential Revision: D69518656

fbshipit-source-id: b071626a1894261b75023023b7f7eeb2730282a2
2025-02-13 13:55:51 -08:00
Riccardo Cipolleschi 7db0abf61b [Download and patch Glog dependency (#49336)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49336

This change adds the step to download the glog dependency and run the prepare_glog script that we have in the codebase

## Changelog:
[Internal] - Download Glog and patch it.

Reviewed By: cortinico

Differential Revision: D69466238

fbshipit-source-id: df0b4e29d4ff7d0d61f92a52141935472fa964fe
2025-02-13 13:55:51 -08:00
Riccardo Cipolleschi 9f23118716 Add function to download dependencies (#49335)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49335

This change adds a function in the prebuild script to download a 3p dependency in the react native monorepo.

## Changelog:
[Internal] - Add function to download 3rd party dependencies

Reviewed By: cortinico

Differential Revision: D69464429

fbshipit-source-id: 2d035168c2390eb9fa9e2338976fce15d86fb68c
2025-02-13 13:55:51 -08:00
Riccardo Cipolleschi 47c2c01ded Prepare flow script for iOS prebuilds (#49334)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49334

This diff adds a script in the `react-native/script/releases` folder that we will use as base to prepare prebuilds for iOS

The script can be invoked from the repository root with
```
node scripts/releases/prepare-ios-prebuilds.js
```

## Changelog:
[Internal] - Add scripts to prepare ios prebuilds

Reviewed By: cortinico

Differential Revision: D69461691

fbshipit-source-id: 8d33955dd799f95c43de565e48360558d7d946d4
2025-02-13 13:55:51 -08:00
Sam Zhou a1eb6de691 Pre-suppress errors ahead of 0.261.1 release in xplat
Summary: Changelog: [Internal]

Reviewed By: panagosg7

Differential Revision: D69610953

fbshipit-source-id: 3eec28d72e26c2f48542523dd610590e298eba69
2025-02-13 13:04:53 -08:00
Jakub Piasecki 88fc9a3415 Align AppState types with TypeScript definitions (#49248)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49248

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D69176965

fbshipit-source-id: ffc82068dcf1451b858c3465c40f22427d4dd158
2025-02-13 04:14:15 -08:00
Jakub Piasecki 43cf02336d Update ignore files and translate script (#49389)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49389

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D69586220

fbshipit-source-id: a6c2f5e91055a6449087db3107c137dc49ea6d91
2025-02-13 03:59:37 -08:00
Panos Vekris 413730ecb3 Back out "Deploy 0.261.0 to xplat"
Summary:
Original commit changeset: cf5953b1afc2

Original Phabricator Diff: D69562137

Reviewed By: SamChou19815

Differential Revision: D69570236

fbshipit-source-id: 7cfa9cf51aa3662d4339e020f8ae5065c8f5c358
2025-02-12 19:14:21 -08:00
Sam Zhou 9a401c8103 Deploy 0.261.0 to xplat
Summary: Changelog: [Internal]

Reviewed By: gkz

Differential Revision: D69562137

fbshipit-source-id: cf5953b1afc242bf2571ad7c4362ef9485d8e846
2025-02-12 18:12:54 -08:00
Eli White 60e3921f9c Initial Open Sourcing of React Native Compatibility Check (#49340)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49340

This tool enables checking the boundary between JavaScript and Native for
backwards incompatible changes to protect against crashes.

This is useful for:

- Local Development
- Over the Air updates on platforms that support it
- Theoretically: Server Components with React Native

Check out the Readme for more information

Changelog: [General][Added] Open Sourcing React Native's Compatibility Check

Reviewed By: panagosg7

Differential Revision: D69476742

fbshipit-source-id: 8af6039839c5475c1258fa82d9750a9320cf0751
2025-02-12 08:24:13 -08:00
Jakub Piasecki 2a99b22a44 Update module resolution for type generation (#49351)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49351

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D69521547

fbshipit-source-id: 5d37875da91341ad1882733f5ee842a819558f85
2025-02-12 07:34:36 -08:00
Jakub Piasecki 1d7de4261f Add transform that replaces empty type with never (#49331)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49331

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D69465686

fbshipit-source-id: ef5e5eeedb6cd1bc89529d11bbf1ff7490daf704
2025-02-12 03:20:15 -08:00
Dawid Małecki bf282146b6 Add UIManager to build-types and align Flow with TS defs (#49322)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49322

Changelog:
[Internal]

Reviewed By: huntie

Differential Revision: D69241595

fbshipit-source-id: 00dafa499fe70f47395ab363f6565619e1877bae
2025-02-12 02:00:10 -08:00
Qian Wu df3a60293c Revert D69277991: Initial Open Sourcing of React Native Compatibility Check
Differential Revision:
D69277991

Original commit changeset: 886a983d4b17

Original Phabricator Diff: D69277991

fbshipit-source-id: f69d528d87c22d03b0c3e654733c8efa89104df0
2025-02-11 10:35:55 -08:00
Eli White 6590bb3e14 Initial Open Sourcing of React Native Compatibility Check (#49311)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49311

This tool enables checking the boundary between JavaScript and Native for
backwards incompatible changes to protect against crashes.

This is useful for:

- Local Development
- Over the Air updates on platforms that support it
- Theoretically: Server Components with React Native

Check out the Readme for more information

Changelog: [General][Added] Open Sourcing React Native's Compatibility Check

Reviewed By: yungsters

Differential Revision: D69277991

fbshipit-source-id: 886a983d4b17609ce771cdd93b75f34bbd8417dc
2025-02-11 08:23:16 -08:00
Jakub Piasecki f1a3ff0dd1 Update RCTDeviceEventEmitter singleton instantiation (#49085)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49085

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D68953499

fbshipit-source-id: ea469813593cc4bcb746345a78c68dc7b0b4d56d
2025-02-11 05:42:24 -08:00
Jakub Piasecki 7dbfc1099c Align EventEmitter definitions with TypeScript (#49206)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49206

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D68953500

fbshipit-source-id: 0e936e8423f8792db34d6b44b1620dde5bd13a47
2025-02-11 05:42:24 -08:00
Jakub Piasecki d4506c30d7 Use local version of flow-api-translator when building TS types (#49294)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49294

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D69237317

fbshipit-source-id: 8cfffb85cbb05cd1edb18358dbdea68aac84f988
2025-02-10 08:33:12 -08:00
Dawid Małecki 13f4b7619d Generate TS types for LogBox and Systrace (#49160)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49160

Changelog:
[Internal]

Reviewed By: robhogan

Differential Revision: D69053361

fbshipit-source-id: f877efe11aa9cd29257d3ac34b040e70ec8746d5
2025-02-10 04:09:03 -08:00
Jakub Piasecki c0415adb11 Add transform that replaces requires with imports (#49228)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49228

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D69247874

fbshipit-source-id: 8b4ea4b358c1c8714237e0109cf5a9492528016b
2025-02-10 01:32:35 -08:00
Alex Hunt f96f1a6e11 Add signedsource and generated header to build-types (#49259)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49259

Also exclude `types_generated/` under ESLint + Prettier — paired with the removed `format` annotation.

Changelog: [Internal]

Reviewed By: j-piasecki

Differential Revision: D69306215

fbshipit-source-id: f2bfbeb3ce691ebf86b63fc498ae3847873c83ee
2025-02-07 08:40:09 -08:00
Alex Hunt 0d7379b9fe Tree-shake non-type imports (#49258)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49258

Updates dependency resolution in `yarn build-types` to happen after the `translateFlowToFlowDef` step. This means that we prune all non-type imports, massively reducing the input files of the program when building types only.

Changelog: [Internal]

Reviewed By: j-piasecki

Differential Revision: D69302812

fbshipit-source-id: aa80bea17cb584b747cb31c003e87fe00afd1e16
2025-02-07 08:40:09 -08:00
Alex Hunt a7a513fc96 Add module resolution to build-types (#49257)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49257

Adds minimal dependency resolution to `yarn build-types`.

- This enables us to opt in React Native APIs by entry point, with the build script resolving all necessary dependencies. Improves correctness and removes concern of globbing paths manually.

Other notes:

- The `ActionSheetIOS.js` entry point is temporarily disabled as input; needs further work.

Changelog: [Internal]

Reviewed By: j-piasecki

Differential Revision: D69255015

fbshipit-source-id: 2d99c014b50e41e4695549f46ca874a2b546f545
2025-02-07 08:40:09 -08:00
Dawid Małecki 09740c9001 Add Share path to build-types script and align Flow with TS types (#49167)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49167

Changelog:
[Internal]

Reviewed By: huntie

Differential Revision: D69119294

fbshipit-source-id: 5d7a10fee47da8d8ffa07f8481060d0176618ce9
2025-02-07 04:56:26 -08:00
Alex Hunt b54efb8d0d Update multi-platform handling in build-types, add debug logs (#49224)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49224

Refactor / quality pass.

- Remove `micromatch`, replace with glob ignores.
- Move and simplify platfom-specific file logic: mutate `files` as a single `Set`, reduce iterations.
    - This is reconfigured so that the input file path globs need only match `*.js` sources.
- Introduce `debug` logs and expose convenience `--debug` script flag.
- Move output error detection into inner function implementation.

Changelog: [Internal]

Metro changelog: Internal

Reviewed By: j-piasecki

Differential Revision: D69240543

fbshipit-source-id: c2faef8212a2995936362b3d33d189c405bd879d
2025-02-06 08:49:29 -08:00
Jakub Piasecki eae7d3c6a1 Update types exposed by Alert and the module structure (#49157)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49157

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D69044715

fbshipit-source-id: 05486d9c9be161a3604ef535d260f525d7c9e9d1
2025-02-06 03:59:28 -08:00
Dawid Małecki 5f110c416b Add Settings path to build-types script and align Flow with TS types (#49175)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49175

Changelog:
[Internal]

Reviewed By: huntie

Differential Revision: D69121991

fbshipit-source-id: 022d56e823aae884ce10fd24cc9701b02db19e9f
2025-02-06 03:02:42 -08:00
Riccardo Cipolleschi 3033aaaef1 Remove last remnant of CircleCI from comments (#49203)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49203

There are some leftover references to CircleCI in some comments. Let's remove it.

## Changelog:
[Internal] - Remove remaining CircleCI references from comments

Reviewed By: huntie

Differential Revision: D69182573

fbshipit-source-id: ea6cfe98422527d094ad4410cdd2a1a87dd61ddb
2025-02-05 09:55:00 -08:00
Riccardo Cipolleschi 07699e5838 Remove last remnant of CircleCI from npm-utils (#49202)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49202

There are some leftover references to CircleCI in these scripts. Let's remove it.

## Changelog:
[Internal] - Remove remaining CircleCI references from npm-utils scripts

Reviewed By: huntie

Differential Revision: D69182550

fbshipit-source-id: d8707abba3e01c26c8d7170522333dcbc039c19d
2025-02-05 09:55:00 -08:00
Jakub Piasecki 289bdb6b1b Enable TypeScript generation for ToastAndroid (#49095)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49095

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D68958757

fbshipit-source-id: 3e06201936e2beda4d6a0e591dcd4a619b169795
2025-02-05 08:15:17 -08:00
Jakub Piasecki 43f07ae9a5 Update common interface shadowing for type generation (#49205)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49205

Changelog: [Internal]

Updates how name shadowing works for the TS type generation prototype to align more with how Flow does it - `.js.flow` files shadow every other file with the same name, then `.js` file (if exists) is treated as the common interface.

The script still uses `.flow.js` for common interface, which will be changed in another diff.

Reviewed By: huntie

Differential Revision: D68958772

fbshipit-source-id: caa390711f2bcd7666d875703fc316d874500a0d
2025-02-05 08:15:17 -08:00
Riccardo Cipolleschi 480b2335c9 Remove circleci folder (#49121)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49121

This change removes the scripts/circleci folder and the last poll-maven script which was not used.

## Changelog:
[Internal] - Remove the circleci folder script

Reviewed By: cortinico, huntie

Differential Revision: D69047603

fbshipit-source-id: a4f1f100d71d792edf42c8d4cb6a0b8d8e7e5260
2025-02-03 14:07:07 -08:00
Riccardo Cipolleschi ae7175d0ab Move analisys scripts to .github folder (#49123)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49123

Previously, we used to have CI workflows scripts in a `react-native/scripts/circleci` folder.
Now that we are not using CircleCI anymore, we move those scripts to the `.github/workflow-scripts` folder.

## Changelog:
[Internal] - Move ci scripts to the `.github/workflow-scripts` folder

Reviewed By: cortinico, huntie

Differential Revision: D69047581

fbshipit-source-id: 6a5d8525e526cc7521d42e2be9530deb09914fdc
2025-02-03 10:02:19 -08:00
Riccardo Cipolleschi d654ae51bb Remove references from CircleCI from the release scripts (#49122)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49122

This change updates the Release testing and the release scripts by removing any reference to CircleCI

## Changelog:
[Internal] - Remove CircleCI references from Release and Release testing scripts

Reviewed By: cortinico, huntie

Differential Revision: D69047479

fbshipit-source-id: 14a394b879c03cd81a8d043036c43839a38602c7
2025-02-03 10:02:19 -08:00
Riccardo Cipolleschi 870aca62de Remove references of CircleCI from the readme (#49120)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49120

This change removes any reference of CircleCI from the READMEs in React Native

## Changelog
[Internal] - Remove CircleCI references

Reviewed By: cortinico, huntie

Differential Revision: D69047437

fbshipit-source-id: 602350372c1d869098be0c8da7cb3db2077474d8
2025-02-03 10:02:19 -08:00
Riccardo Cipolleschi 839eb44300 Remove CircleCI configuration (#49119)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49119

This change removes the .circleci folder and the workflow that we run on CircleCI

## Changelog:
[Internal] - Remove CircleCI config

Reviewed By: cortinico, huntie

Differential Revision: D69047483

fbshipit-source-id: 0020a4ff69d035e939e01079059ba2743aee55fe
2025-02-03 10:02:19 -08:00
Rubén Norte 2f27327f33 Rename src/private/specs as src/private/specs_DEPRECATED (#49068)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49068

Changelog: [internal]

Renamed directory to better signal it's deprecated and added README.md to clarify intent.

Reviewed By: huntie

Differential Revision: D68895998

fbshipit-source-id: 5bc70d0782194db27c27cc89cc402d99f11aafa4
2025-02-03 09:15:31 -08:00
Alex Hunt 4348a57503 Fix build-types script, align internal babel-register (#49133)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49133

Follow up to D68960540.

Changelog: [Internal]

Reviewed By: robhogan

Differential Revision: D69053411

fbshipit-source-id: ffc8aba923aab8f4cd0d74fb61c49893ff09b6c1
2025-02-03 08:32:39 -08:00
Jakub Piasecki 8d90be814e Refactor ActionSheetIOS to better align with OSS types (#49094)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49094

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D68957719

fbshipit-source-id: 4e4738a619583000ea6fe78808d46e300428504a
2025-02-03 04:47:06 -08:00
Alex Hunt 3cf400a51b Convert build scripts to regular Flow syntax (#49103)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49103

Changelog: [Internal]

Reviewed By: j-piasecki

Differential Revision: D68960540

fbshipit-source-id: 0ac01529eaea97db98b85b6021532092997d633b
2025-02-03 03:49:23 -08:00
Alex Hunt e1575857dd Relocate babel-register script (#49102)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49102

Moves this script one level up. In the next diff, will be used to support execution of scripts themselves, as well as `packages/`.

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D68960279

fbshipit-source-id: 7b62420c269dc1c1366ac9a827db078d34cb86c5
2025-02-03 03:49:23 -08:00
Alex Hunt cd78f44e58 Remove unused checkForGitChanges script (#49099)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49099

Changelog: [Internal]

Reviewed By: EdmondChuiHW

Differential Revision: D68960652

fbshipit-source-id: 138e83dfedef7ea717502a1e964eb802dae678c4
2025-01-31 09:18:31 -08:00