Add diff-api-snapshot action to danger#52045
Closed
coado wants to merge 5 commits intofacebook:mainfrom
Closed
Conversation
Contributor
|
@coado has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
coado
added a commit
to coado/react-native
that referenced
this pull request
Jun 23, 2025
Summary: This is a work in progress PR that adds breaking change detection to danger. The danger is ran on a base revision from which there is no easy access to the API snapshot from the PR. The Github action fetches the PR and stores the "current" snapshot in the temporary directory which is then used in the `diff-api-snapshot` script. It is compared to the previous snapshot from the base revision which can be easily accessed by reading from `packages/react-native/ReactNativeApi.d.ts`. ## Changelog: <!-- Help reviewers and the release process by writing your own changelog entry. Pick one each for the category and type tags: [ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message For more details, see: https://reactnative.dev/contributing/changelogs-in-pull-requests Test Plan: Tested on react-native fork with personal access token. {F1979339175} #16 Differential Revision: D76735630 Pulled By: coado
0d79ef4 to
e11aca5
Compare
Contributor
|
This pull request was exported from Phabricator. Differential Revision: D76735630 |
Contributor
|
@coado has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
631437c to
71937d2
Compare
Contributor
|
This pull request was exported from Phabricator. Differential Revision: D76735630 |
Summary: This diff commits our V2 JavaScript API snapshot for React Native. This is a new format and workflow that replaces the previous `public-api-test` Jest test. Please look at the file header for up-to-date instructions on updating the API snapshot. Changelog: [Internal] Reviewed By: huntie Differential Revision: D77532617
Summary: This diff adds excution of `yarn build-types --validate` to run RN JS API snapshot validation on CI. ### Motivation Detect react-native public API changes before they land. Changelog: [Internal] Reviewed By: huntie Differential Revision: D76340729
Summary: This diff deletes `public-api-test` for detecting changes in public API. It is replaced with public API snapshot validation (in D76340729) for better detection and understanding of changes that influence external interfaces. Changelog: [Internal] Reviewed By: huntie Differential Revision: D77531763
Summary: This is a work in progress PR that adds breaking change detection to danger. ## Changelog: <!-- Help reviewers and the release process by writing your own changelog entry. Pick one each for the category and type tags: [ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message For more details, see: https://reactnative.dev/contributing/changelogs-in-pull-requests Reviewed By: huntie Differential Revision: D76735630 Pulled By: coado
71937d2 to
8e4a9e7
Compare
Contributor
|
This pull request was exported from Phabricator. Differential Revision: D76735630 |
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
This PR connects breaking change detection with a danger bot. The action takes snapshot from
mainbranch and from the PR as inputs todiff-api-snapshot(saved in runner temp directory).Changelog:
[Internal]
Test Plan:
Tested on my react-native fork coado#19