Skip to content

Commit

Permalink
Add test asserting shape of public JS API (#42265)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #42265

Adds a snapshot test against the `react-native` package which emits the shape of all Flow-typed modules under `Libraries/`, as an approximation of the public JS API.

This provides:
- Visibility for maintainers on any PR which changes the shape of the public API.
- An at-a-glance diff of changed APIs between React Native versions (useful for library integrators and the Release Crew).

Note — **workflow change**: Maintainers modifying public files/function signatures under Libraries/ will need to run `yarn jest -u` and commit the updated snapshot changes.

Changelog: [Internal]

Reviewed By: TheSavior, philIip, mdvacca

Differential Revision: D52729777

fbshipit-source-id: 90ca2924b50205485b6d49e52a2889d8e00a43b9
  • Loading branch information
huntie authored and facebook-github-bot committed Jan 14, 2024
1 parent e859f6c commit 9eb5833
Show file tree
Hide file tree
Showing 3 changed files with 10,801 additions and 0 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@
"flow-bin": "^0.226.0",
"glob": "^7.1.1",
"hermes-eslint": "0.18.2",
"hermes-transform": "0.18.2",
"inquirer": "^7.1.0",
"jest": "^29.6.3",
"jest-junit": "^10.0.0",
Expand Down
Loading

0 comments on commit 9eb5833

Please sign in to comment.