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
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
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
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
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
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
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
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
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
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49064
Update `public-api-test` to disregard all object/type members prefixed with an underscore (`_`). These are considered existing internal APIs.
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D68895376
fbshipit-source-id: db581df7cc37802fa5f7d3aa4d7c07514223209a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49060
We want to hide private properties from JS public API interface. The stripPrivateProperties transform removes all private nodes of type ObjectTypeProperty, Property, PropertyDefinition and MethodDefinition. There is also a change in transforms reducer that incorporates `print` function from hermes-transform which modifies the code base on the transformed ast (transformed.mutatedCode seems to be a code before the transform operation).
## Changelog:
[Internal] - Added transform that strips private properties in build-types script
Reviewed By: huntie
Differential Revision: D68892853
fbshipit-source-id: 5035fd4339aa6294d972e7aff0eb563f48d4c3d2