Commit Graph

495 Commits

Author SHA1 Message Date
Sam Zhou 020c92efac Deploy 0.281.0 to xplat (#53607)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53607

[changelog](https://github.com/facebook/flow/blob/main/Changelog.md)
Changelog: [Internal]

Reviewed By: gkz

Differential Revision: D81728906

fbshipit-source-id: 161eb62d7520398c97f05db40676e1ea2ac4d0a9
2025-09-04 16:51:26 -07:00
Sam Zhou 6c7c518d42 Turn on experimental.natural_inference.local_object_literals.followup_fix in xplat (#53528)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53528

Changelog: [Internal]

Reviewed By: marcoww6

Differential Revision: D81289138

fbshipit-source-id: 05e2f5ad337f616a92df97ea52af8891448e122f
2025-08-29 06:25:57 -07:00
Sam Zhou 502325fbce Turn on flags that will be on by default in 0.281 in oss projects
Summary: Changelog: [Internal]

Reviewed By: gkz

Differential Revision: D81190534

fbshipit-source-id: 83be2aed3d13e225bfc9c07c57da22324c04ce77
2025-08-27 19:15:07 -07:00
Sam Zhou 09312027db Require error code in suppressions, and kill $FlowIssue and $FlowIgnore in react-native (#53487)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53487

Changelog: [Internal]

Reviewed By: marcoww6

Differential Revision: D81150232

fbshipit-source-id: 23320495061c7c78ced8f95db90101c4b55d9690
2025-08-27 13:14:20 -07:00
Sam Zhou 1618a8ed4f Deploy 0.280.0 to xplat (#53486)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53486

[changelog](https://github.com/facebook/flow/blob/main/Changelog.md)
Changelog: [Internal]

Reviewed By: panagosg7

Differential Revision: D81138527

fbshipit-source-id: c17ba243ef18cb4f9e107b717c6875b2868fea45
2025-08-27 10:18:17 -07:00
Sam Zhou b23c558a20 Kill $FlowExpectedError as a type across fbsource (#53378)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53378

Changelog: [Internal]

Reviewed By: gkz

Differential Revision: D80573556

fbshipit-source-id: 4d8fc85d563977deb83abdd278175c960f54fd13
2025-08-20 13:35:28 -07:00
Sam Zhou cf664c65e2 Standardize subtyping error code into incompatible-type in react native and metro (#53312)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53312

Changelog: [Internal]

Reviewed By: jbrown215

Differential Revision: D80400976

fbshipit-source-id: 196af69c0b9621b2a2675b232406639773e04933
2025-08-18 09:04:31 -07:00
Marco Wang 0e6b94f4ab Deploy 0.279.0 to xplat (#53308)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53308

[changelog](https://github.com/facebook/flow/blob/main/Changelog.md)
Changelog: [Internal]

Reviewed By: gkz

Differential Revision: D80365942

fbshipit-source-id: 097eee50914f1d14391ada61c7e4176c4a70779e
2025-08-15 17:29:05 -07:00
Sam Zhou 01d5eebdb7 Remove random variants of suppress_types that have been fully cleaned up
Summary: Changelog: [Internal]

Reviewed By: marcoww6

Differential Revision: D79652708

fbshipit-source-id: 8027082b0566cca5700d40860272b7683082b275
2025-08-05 11:02:53 -07:00
Pieter Vanderwerff 4c7d7a903e Deploy 0.278.0 to xplat (#52994)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52994

[changelog](https://github.com/facebook/flow/blob/main/Changelog.md)
Changelog: [Internal]

Reviewed By: SamChou19815

Differential Revision: D79463433

fbshipit-source-id: c6f24199c7899dd618e807b2cd65b0b3673c92ce
2025-08-01 16:51:38 -07:00
Sam Zhou c43a39925f Replace $FlowIssue with $FlowFixMe (#52976)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52976

Changelog: [Internal]

Reviewed By: GijsWeterings

Differential Revision: D79400163

fbshipit-source-id: b0c4f10b18b99550bdf95be620187f011b62f2f7
2025-08-01 07:50:00 -07:00
Sam Zhou 70f7a50e2f Deploy 0.277.1 to xplat
Summary:
[changelog](https://github.com/facebook/flow/blob/main/Changelog.md)
Changelog: [Internal]

Reviewed By: marcoww6

Differential Revision: D78923286

fbshipit-source-id: fd0b20090a7cd5c5ff64c1dd976e6a8f5e2b59d7
2025-07-24 16:24:20 -07:00
Marco Wang 690cb00353 Deploy 0.276.0 to xplat (#52720)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52720

Changelog: [Internal]

Reviewed By: SamChou19815

Differential Revision: D78605229

fbshipit-source-id: 59ae4a2f316cee8415f6ef2984ca74f906ae0377
2025-07-19 11:08:41 -07:00
Sam Zhou 0666885f6a Deploy 0.275.0 to xplat
Summary: Changelog: [Internal]

Reviewed By: marcoww6

Differential Revision: D77800436

fbshipit-source-id: ff5a6a629c950959678d6a6311cda053f6b5dd4c
2025-07-04 11:55:28 -07:00
George Zahariev 9a2c422b80 Deploy 0.274.2 to xplat (#52329)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52329

Changelog: [Internal]

Reviewed By: SamChou19815

Differential Revision: D77485965

fbshipit-source-id: 6a0b1a85696335a796133e665f41034e00d47ea3
2025-06-28 12:23:25 -07:00
George Zahariev 56ccc87e63 Enable experimental.pattern_matching=true [DO NOT SHIP] (#52302)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52302

Enable experimental.pattern_matching=true

Changelog: [internal]

Reviewed By: pieterv

Differential Revision: D77367102

fbshipit-source-id: a71352a58470c30fa7e466a67cb1909d80f0363e
2025-06-26 11:48:02 -07:00
George Zahariev 7d84158700 Deploy 0.274.1 to xplat (#52287)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52287

 Deploy 0.274.1 to xplat

Changelog: [Internal]

Reviewed By: marcoww6

Differential Revision: D77349884

fbshipit-source-id: 44ebd2c111a6077dbf2e7beb60369283b2256feb
2025-06-26 05:45:51 -07:00
George Zahariev a2a72e239d Enable experimental Flow 'match' syntax for react-native-github/packages/react-native/src/private/components/virtualview/ (#52236)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52236

Enable experimental Flow 'match' syntax for `react-native-github/packages/react-native/src/private/components/virtualview/` and adopt in one case to see if there are any issues.

Changelog: [Internal]

Reviewed By: yungsters

Differential Revision: D77250963

fbshipit-source-id: 0b2a5817a05f3332031f0c0590fe956eaa74ddd3
2025-06-24 17:55:57 -07:00
Sam Zhou e3047db0dc Deploy 0.274.0 to xplat
Summary: Changelog: [Internal]

Reviewed By: gkz

Differential Revision: D77246379

fbshipit-source-id: 4a86da380109e85b5e1d53f5723f6ea07e6ea429
2025-06-24 12:58:53 -07:00
Tim Yung f53f6137e6 RN: Migrate View to Component Syntax (#52018)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52018

Migrates `View` to use Flow's [Component Syntax](https://flow.org/en/docs/react/component-syntax/).

Component Syntax offers more concise syntax for expressing component definitions and eliminates the need for `View` to be cast as a component type. Component types improve type safety by more accurately modeling `ref` as props and enabling the use of modern type utilities such as `React.PropsOf<Component>` and `React.RefOf<Component>`.

This represents the first introduction of Component Syntax in the open source React Native repository, which is lowered to standard JavaScript through the use of [`hermes-parser`](https://www.npmjs.com/package/hermes-parser) and the following supporting packages:

- [`babel-plugin-syntax-hermes-parser`](https://www.npmjs.com/package/babel-plugin-syntax-hermes-parser)
- [`hermes-eslint`](https://www.npmjs.com/package/hermes-eslint)
- [`prettier-plugin-hermes-parser`](https://www.npmjs.com/package/prettier-plugin-hermes-parser)

By default, [`react-native/babel-preset`](https://www.npmjs.com/package/react-native/babel-preset) already provides configuration for `babel-plugin-syntax-hermes-parser`.

Although this is the first usage of Component Syntax, there are already Flow syntax features used in React Native that have required `hermes-parser` (e.g. [type casting expressions](https://flow.org/en/docs/types/casting/), [type guards](https://flow.org/en/docs/types/type-guards/), [const expressions](https://flow.org/en/docs/types/const-expression/)). As such, we do not anticipate this to introduce new build configuration problems for developers.

Changelog:
[Internal]

Reviewed By: javache, NickGerleman

Differential Revision: D76632879

fbshipit-source-id: e0a83dfc2e2014933000083de1825a311faad707
2025-06-16 06:52:07 -07:00
Pieter Vanderwerff c79e55f79d Deploy 0.273.1 to xplat (#51968)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51968

Changelog: [Internal]

Reviewed By: gkz

Differential Revision: D76477358

fbshipit-source-id: a26827e7e3dcd265549d681bc9e3991c0ef2ad52
2025-06-11 20:05:55 -07:00
Tim Yung f0f71ea914 RN: Move {packages => private}/helloworld (#51934)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51934

Moves `packages/helloworld` to `private/helloworld`.

Changelog:
[Internal]

Reviewed By: huntie

Differential Revision: D76356557

fbshipit-source-id: 92b20d75a8f2badb3c685d4918fe692623d9c04d
2025-06-11 17:39:26 -07:00
Tim Yung 683054c512 RN: Move {packages => private}/react-native-bots (#51932)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51932

Moves `packages/react-native-bots` to `private/react-native-bots`.

Changelog:
[Internal]

Reviewed By: huntie

Differential Revision: D76354266

fbshipit-source-id: 6ca714c8b0c881b073d84a2f033f78d366ed3f24
2025-06-10 16:37:49 -07:00
Sam Zhou 1e967ca983 Deploy 0.272.2 to xplat (#51717)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51717

Changelog: [Internal]

Reviewed By: gkz

Differential Revision: D75715829

fbshipit-source-id: 8074481b11bfd28817b1caf315c8009cf6ae3807
2025-05-31 06:19:34 -07:00
Tim Yung 1fd9508ecc RN: Refactor Jest Default Mocks (#51669)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51669

Refactors the default mocks initialized in `packages/react-native/jest/setup.js` so that each mock is defined in its own file.

This provides several benefits, including:

- The ability to use `import` statements without worrying about eager initialization of dependencies before `globals` is setup.
- The ability to verify mocks export the same types as the actual module, using a new Flow-typed `mock` helper function.
- The ergonomic of implementing mocks with more complex logic, without having to split them out into a separate module (e.g. `mockModal`, `mockScrollView`).

As part of this migration, I also fixed any minor discrepancies to match the actual type definition. For more involved discrepancies (e.g. missing methods), I added type suppressions for now to minimize breaking changes.

Changelog:
[General][Changed] - Improved default mocking for Jest unit tests.

Reviewed By: javache

Differential Revision: D75575421

fbshipit-source-id: 98d60e10b753f1505ffdccf5f12f5d3ef306ebb5
2025-05-29 07:52:38 -07:00
Sam Zhou 5dbe32ee14 Deploy 0.272.1 to xplat (#51584)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51584

Changelog: [Internal]

Reviewed By: panagosg7

Differential Revision: D75356543

fbshipit-source-id: 29234de4f1b6ee2b8857b24a5de566a4afd31030
2025-05-25 08:36:30 -07:00
Alex Taylor (alta) 535444bca4 Deploy 0.272.0 to xplat (#51536)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51536

Changelog: [Internal]

Reviewed By: SamChou19815

Differential Revision: D75228208

fbshipit-source-id: ad6666deedd976b02e8e0e475831df27b3a63984
2025-05-22 13:22:01 -07:00
Alex Hunt 44e36e6d9f Consolidate location for Flow libdefs (#51539)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51539

Follow up to D70322032. Relocates some of our newly added Flow library definitions into the package level `flow/` directory, to help disambiguate their use.

**Types directories after changes**

`packages/react-native/`

- `flow/` — Longstanding location for Flow package/global library definitions. Not imported by source code.
- `src/types/` — Contains public typedefs useful to 3P consumers (TypeScript) (today, just `globals.d.ts` as one module). Not imported by source code.
- `src/private/types/` — Source type modules **in Flow**, that **are imported** by other files in `src/private/`.

Changelog: [Internal]

Reviewed By: christophpurrer

Differential Revision: D75060846

fbshipit-source-id: 750a31e11b8f65579ce0831273df4d3b86335bdc
2025-05-22 10:34:04 -07:00
Sam Zhou 249a24ac75 Deploy 0.271.0 to xplat (#51376)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51376

Changelog: [Internal]

Reviewed By: jbrown215

Differential Revision: D74836348

fbshipit-source-id: 33c354c4e2e59baf4815bc6c58fc3ca0066763df
2025-05-15 15:10:02 -07:00
Pieter Vanderwerff e30ba139b6 Deploy 0.270.0 to xplat (#51278)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51278

Changelog: [Internal]

Reviewed By: SamChou19815

Differential Revision: D74622474

fbshipit-source-id: 6735c16ed9677050dc476e30671448d52c5ed6dd
2025-05-12 19:39:07 -07:00
Alex Taylor (alta) 78e45e5828 Deploy 0.269.1 to xplat (#50993)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50993

Changelog: [Internal]

Reviewed By: SamChou19815

Differential Revision: D73853679

fbshipit-source-id: 4860c205f764a0be14080015cab1759bb59f442b
2025-04-29 10:24:21 -07:00
Alex Hunt 0968707ef7 Create src/fb_internal/ directory, initially migrate VirtualView (#50965)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50965

While D72228547 has recently disallowed all `./src/*` subpath imports from React Native (functionally, `./src/private/*`), we have a number of APIs that are imported from Meta product code legitimately — e.g. as part of validating under-development React Native features internally in real Meta apps.

This diff defines a new, exported `./src/fb_internal/*` subpath via `package.json#exports`, which will allow us to expose select entry points for this purpose.

Changelog: [Internal]

Reviewed By: rubennorte

Differential Revision: D73770609

fbshipit-source-id: 397019669e565b95a86302ef30f80b65a17dcc0d
2025-04-29 07:52:24 -07:00
Sam Zhou 3ab7c26e20 Deploy 0.268.0 to xplat (#50769)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50769

Changelog: [Internal]

Reviewed By: gkz

Differential Revision: D73120518

fbshipit-source-id: 34017d8c5be1200e669d97012be3d329c815e607
2025-04-16 12:54:38 -07:00
Panos Vekris ef12ecfa92 Deploy 0.267.0 to xplat (#50674)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50674

Changelog: [Internal]

Reviewed By: mvitousek

Differential Revision: D72888246

fbshipit-source-id: 88aa6dad3a968858a22aaa43a2118aa4a0ec5f82
2025-04-11 23:22:56 -07:00
Sam Zhou 398ac1f716 Deploy 0.266.1 to xplat (#50387)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50387

Changelog: [Internal]

Reviewed By: gkz

Differential Revision: D72133412

fbshipit-source-id: f7719284db67537a2c652ea56d9f9050210da7d4
2025-03-30 11:01:43 -07:00
Alex Taylor (alta) 798c3dd842 Deploy 0.266.0 to xplat (#50373)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50373

Changelog: [Internal]

Reviewed By: jbrown215, SamChou19815, panagosg7

Differential Revision: D72061660

fbshipit-source-id: a6862fe0e1f62992b76145006b3f8bc3ad788258
2025-03-28 13:07:06 -07:00
Sam Zhou 796cc43ec4 Deploy 0.265.3 to xplat (#50083)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50083

Changelog: [Internal]

Reviewed By: gkz

Differential Revision: D71354083

fbshipit-source-id: 33fe2c11ad8cba88d3d206a15976510991d3663e
2025-03-17 19:58:21 -07:00
Sam Zhou bcd6b5fbd9 Deploy 0.265.2 to xplat (#50041)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50041

Changelog: [Internal]

Reviewed By: panagosg7

Differential Revision: D71200832

fbshipit-source-id: a2f267c5b2beabe527f958bfc4557bafc04d27de
2025-03-14 14:57:39 -07:00
Pieter Vanderwerff 934c4465ae Deploy 0.265.0 to fbsource (#50025)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50025

Changelog: [Internal]

Reviewed By: gkz

Differential Revision: D71158296

fbshipit-source-id: db3e5678c97536517cdb0375843f2c882d5213f9
2025-03-13 17:18:45 -07:00
Tim Yung 1bb7446993 RN: Set react.runtime=automatic in Flow Config (#50001)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50001

Updates `react-native/.flowconfig` with the following option:

```
react.runtime=automatic
```

This adjusts Flow to model the current behavior of React and JSX, relaxing the requirement that JSX elements have `React` within scope.

Changelog:
[General][Changed] - Changed Flow for the React Native monorepo, so that `React` no longer has to be in scope when using JSX.

Reviewed By: javache

Differential Revision: D71096283

fbshipit-source-id: 65762ac39206c682b7be5d3f512b2b83f7eb1b49
2025-03-13 04:09:43 -07:00
Sam Zhou 7c5995df4a Deploy 0.263.0 to xplat (#49825)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49825

Changelog: [Internal]

Reviewed By: pieterv

Differential Revision: D70595199

fbshipit-source-id: a3be1b74cca99f0ff79aca4dd51059b3b09facb2
2025-03-04 21:35:46 -08:00
Rubén Norte e808011b26 Move environment types (globals) from flow-typed/environment to src/types (#49724)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49724

Changelog: [internal]

This moves the type definitions for the globals defined by React Native from the repository root to the `react-native` package, in the same directory as the existing TypeScript definitions. This will make it easier for end users to configure the globals from RN using the right source of truth.

Reviewed By: huntie

Differential Revision: D70322032

fbshipit-source-id: 932df75ded0c254f2acb32e865cbbb9474c94159
2025-02-28 05:58:45 -08:00
Alex Taylor (alta) daed8e2f8c Deploy 0.262.0 to xplat (#49708)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49708

Changelog: [Internal]

Reviewed By: SamChou19815

Differential Revision: D70277654

fbshipit-source-id: e215e392aa6e06181f2df03ce8b9b873807f3b86
2025-02-27 08:55:49 -08:00
Sam Zhou b53e86b4bd Deploy 0.261.2 to xplat
Summary: Changelog: [Internal]

Reviewed By: gkz

Differential Revision: D69816782

fbshipit-source-id: c4d1e7bff3333fe8075816542d0b316408363f86
2025-02-18 18:11:49 -08:00
Sam Zhou b45851aecf Deploy 0.261.1 to xplat
Summary: Changelog: [Internal]

Reviewed By: alexmckenley

Differential Revision: D69622197

fbshipit-source-id: 3ddf9f8cb015825ea76be39a28525b75bbc8c03f
2025-02-13 18:13:15 -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
Alex Taylor (alta) 32fcd2733e Deploy 0.260.0 to xplat (#49319)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49319

Changelog: [Internal]

Reviewed By: panagosg7

Differential Revision: D69438322

fbshipit-source-id: 1906cfc76125e1bb7244b2a40536c3268a914ecf
2025-02-11 09:34:17 -08:00
Sam Zhou 7278ff01d7 Deploy 0.259.1 to xplat (#48751)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48751

Changelog: [Internal]

Reviewed By: gkz

Differential Revision: D68294434

fbshipit-source-id: 8827369836906464566069cf22b584a4c672ec92
2025-01-16 16:29:30 -08:00
Pieter Vanderwerff c65117eba9 Deploy 0.259.0 to fbsource (#48744)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48744

Changelog: [Internal]

Reviewed By: SamChou19815

Differential Revision: D68279682

fbshipit-source-id: 2a7e19b75863d5fd31037e04fa334efda28de79e
2025-01-16 11:43:13 -08:00