Commit Graph

7 Commits

Author SHA1 Message Date
Sam Zhou 7ba64ca0f1 Pre-suppress errors for improved typing of Array.{includes,indexOf,lastIndexOf} in xplat
Summary:
In Flow 0.284, we will have a stricter version of `Array<T>.includes`. Instead of accepting `mixed`, we will only accept `T` to help catch logical errors. We did the same for `Array.indexOf` and `Array.lastIndexOf` as well.

This diff pre-suppresses newly discovered errors in part of the codebase.

Changelog: [Internal]

Reviewed By: marcoww6

Differential Revision: D82784398

fbshipit-source-id: 6cb11809844f964e0604d33b9f7a3989074cd1cc
2025-09-19 07:17:14 -07:00
Marco Wang 8351a5d186 Pre-Suppress errors for xplat/js for general strict comparison in non-generated files (#53342)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53342

Commands

```
scripts/flow/tool add-comments --comment 'Error discovered during Constant Condition roll out. See https://fburl.com/workplace/4oq3zi07.' .
```
```
arc f
```

drop-conflicts

Reviewed By: SamChou19815

Differential Revision: D80487235

fbshipit-source-id: 9e7c1a2641ddc0da0400fa1aff598b112a0434d5
2025-08-19 01:09:22 -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
Sam Zhou af1bcb6d44 Mass replace $FlowIgnore with $FlowFixMe in react-native (#53076)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53076

Changelog: [Internal]

Reviewed By: marcoww6

Differential Revision: D79672242

fbshipit-source-id: 560f057d8658ed602cf7241e584bade70d8f3a99
2025-08-05 15:44:41 -07:00
Sam Zhou 6c8bcad054 Make functions async and add await to prepare for prettier v3 upgrade: 1/n (#52768)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52768

Prettier v3 has an async API. This diff adds in await ahead of the upgrade to prepare for the API change.

Changelog: [Internal]

Reviewed By: pieterv

Differential Revision: D78752354

fbshipit-source-id: c0d27a6c863747b71852e72a22687d1fe1d9f76f
2025-07-22 13:28:03 -07:00
Alex Hunt fc5e33b582 Reorganise shared script utils (#52473)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52473

Shared utils that were located in the root of `scripts/` are now colocated closer to their dependencies or moved to `scripts/shared/` — simplifying the root directory layout.

Changelog: [Internal]

Reviewed By: robhogan

Differential Revision: D77873875

fbshipit-source-id: e04dba41a1ef811d32793931033fdfa93afad0cd
2025-07-08 06:10:36 -07:00
Alex Hunt 918f02dcc3 Consolidate JS API scripts under scripts/js-api/, update docs (#52469)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52469

Organise `scripts/build-types/` and `scripts/diff-api-snapshot/` into a single grouping `scripts/js-api/` parent dir — matching the newly relocated `scripts/cxx-api/`.

Changelog: [Internal]

Reviewed By: robhogan

Differential Revision: D77865488

fbshipit-source-id: 33754d9275e65c3bda686294f18d855221ec7bff
2025-07-07 15:04:37 -07:00