From 12deb38cbade6e2469925c249d89719d11968592 Mon Sep 17 00:00:00 2001 From: Dawid Malecki Date: Tue, 28 Oct 2025 16:29:56 +0100 Subject: [PATCH 1/9] run danger --- .github/workflows/danger-pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/danger-pr.yml b/.github/workflows/danger-pr.yml index cf28b788105a..06daf7ee8378 100644 --- a/.github/workflows/danger-pr.yml +++ b/.github/workflows/danger-pr.yml @@ -15,7 +15,7 @@ permissions: jobs: danger: runs-on: ubuntu-latest - if: github.repository == 'facebook/react-native' + if: github.repository == 'coado/react-native' steps: - uses: actions/checkout@v4 - name: Setup Node.js From 085854dade519ca8052f86edfe42f233ce3f547c Mon Sep 17 00:00:00 2001 From: Dawid Malecki Date: Tue, 28 Oct 2025 16:51:45 +0100 Subject: [PATCH 2/9] changing API --- packages/react-native/ReactNativeApi.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-native/ReactNativeApi.d.ts b/packages/react-native/ReactNativeApi.d.ts index 2ac82083cbfe..402e13c84392 100644 --- a/packages/react-native/ReactNativeApi.d.ts +++ b/packages/react-native/ReactNativeApi.d.ts @@ -36,7 +36,7 @@ declare const $$AnimatedImage: AnimatedComponentType< React.ComponentRef > declare const $$AnimatedImplementation: { - add: typeof addImpl + // add: typeof addImpl attachNativeEvent: typeof attachNativeEventImpl Color: typeof AnimatedColor_default createAnimatedComponent: typeof createAnimatedComponent_default From 2c2c7be5a4028a659212866a65630763543294a5 Mon Sep 17 00:00:00 2001 From: Dawid Malecki Date: Tue, 28 Oct 2025 16:52:53 +0100 Subject: [PATCH 3/9] change API --- packages/react-native/ReactNativeApi.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-native/ReactNativeApi.d.ts b/packages/react-native/ReactNativeApi.d.ts index 402e13c84392..2ac82083cbfe 100644 --- a/packages/react-native/ReactNativeApi.d.ts +++ b/packages/react-native/ReactNativeApi.d.ts @@ -36,7 +36,7 @@ declare const $$AnimatedImage: AnimatedComponentType< React.ComponentRef > declare const $$AnimatedImplementation: { - // add: typeof addImpl + add: typeof addImpl attachNativeEvent: typeof attachNativeEventImpl Color: typeof AnimatedColor_default createAnimatedComponent: typeof createAnimatedComponent_default From 6e1028be5458bd936623c0a40efbe15ebf14b3e3 Mon Sep 17 00:00:00 2001 From: Dawid Malecki Date: Tue, 28 Oct 2025 17:19:39 +0100 Subject: [PATCH 4/9] snapshot output --- private/react-native-bots/dangerfile.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/private/react-native-bots/dangerfile.js b/private/react-native-bots/dangerfile.js index 1bff20819a97..005ff55d67d7 100644 --- a/private/react-native-bots/dangerfile.js +++ b/private/react-native-bots/dangerfile.js @@ -39,6 +39,9 @@ const snapshot_output = JSON.parse( 'utf8', ), ); + +console.log('Snapshot output:', snapshot_output); + if (snapshot_output && snapshot_output.result !== 'NON_BREAKING') { const title = ':exclamation: JavaScript API change detected'; const idea = From 5db6f3cff8374623ca7055e88cad62861227b8c6 Mon Sep 17 00:00:00 2001 From: Dawid Malecki Date: Mon, 3 Nov 2025 10:36:36 +0100 Subject: [PATCH 5/9] changing api --- packages/react-native/ReactNativeApi.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-native/ReactNativeApi.d.ts b/packages/react-native/ReactNativeApi.d.ts index 2ac82083cbfe..ff992b3137d8 100644 --- a/packages/react-native/ReactNativeApi.d.ts +++ b/packages/react-native/ReactNativeApi.d.ts @@ -6115,7 +6115,7 @@ export { SectionListData, // 119baf83 SectionListProps, // c9ac8e07 SectionListRenderItem, // 1fad0435 - SectionListRenderItemInfo, // 745e1992 + SectionListRenderItemInfo, // 745e1994 Separators, // 6a45f7e3 Settings, // 4282b0da Share, // e4591b32 From 074b2daee01580175e2e6c7958ea5c5ecd0e7818 Mon Sep 17 00:00:00 2001 From: Dawid Malecki Date: Mon, 3 Nov 2025 10:37:45 +0100 Subject: [PATCH 6/9] revert: --- packages/react-native/ReactNativeApi.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-native/ReactNativeApi.d.ts b/packages/react-native/ReactNativeApi.d.ts index ff992b3137d8..2ac82083cbfe 100644 --- a/packages/react-native/ReactNativeApi.d.ts +++ b/packages/react-native/ReactNativeApi.d.ts @@ -6115,7 +6115,7 @@ export { SectionListData, // 119baf83 SectionListProps, // c9ac8e07 SectionListRenderItem, // 1fad0435 - SectionListRenderItemInfo, // 745e1994 + SectionListRenderItemInfo, // 745e1992 Separators, // 6a45f7e3 Settings, // 4282b0da Share, // e4591b32 From f931c523caebde6da28bc4559e66ffc67957edb6 Mon Sep 17 00:00:00 2001 From: Dawid Malecki Date: Mon, 3 Nov 2025 10:38:20 +0100 Subject: [PATCH 7/9] api change --- packages/react-native/ReactNativeApi.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-native/ReactNativeApi.d.ts b/packages/react-native/ReactNativeApi.d.ts index 2ac82083cbfe..073a1f2a9a1e 100644 --- a/packages/react-native/ReactNativeApi.d.ts +++ b/packages/react-native/ReactNativeApi.d.ts @@ -6109,7 +6109,7 @@ export { ScrollViewProps, // 27986ff5 ScrollViewPropsAndroid, // 84e2134b ScrollViewPropsIOS, // d83c9733 - ScrollViewScrollToOptions, // 3313411e + ScrollViewScrollToOptions, // 33134111 SectionBase, // b376bddc SectionList, // ff1193b2 SectionListData, // 119baf83 From adc4279fb37abdca35e776e3111a7ce5b1ebe730 Mon Sep 17 00:00:00 2001 From: Dawid Malecki Date: Mon, 3 Nov 2025 10:43:07 +0100 Subject: [PATCH 8/9] danger fix --- .../diff-js-api-breaking-changes/action.yml | 3 ++ private/react-native-bots/dangerfile.js | 32 ++++++++----------- 2 files changed, 17 insertions(+), 18 deletions(-) diff --git a/.github/actions/diff-js-api-breaking-changes/action.yml b/.github/actions/diff-js-api-breaking-changes/action.yml index bc45b1b207aa..8dbd744916d9 100644 --- a/.github/actions/diff-js-api-breaking-changes/action.yml +++ b/.github/actions/diff-js-api-breaking-changes/action.yml @@ -17,6 +17,9 @@ runs: env: SCRATCH_DIR: ${{ runner.temp }}/diff-js-api-breaking-changes run: | + # Check if the file was changed in this PR, if not, exit early without saving to the output.json + git diff --name-status | awk '{print $2}' | grep 'packages/react-native/ReactNativeApi.d.ts' || exit 0 + node ./scripts/js-api/diff-api-snapshot \ ${{ github.workspace }}/packages/react-native/ReactNativeApi.d.ts \ $SCRATCH_DIR/ReactNativeApi-after.d.ts \ diff --git a/private/react-native-bots/dangerfile.js b/private/react-native-bots/dangerfile.js index 005ff55d67d7..07a4a921e566 100644 --- a/private/react-native-bots/dangerfile.js +++ b/private/react-native-bots/dangerfile.js @@ -30,26 +30,22 @@ const isFromPhabricator = body_contains('differential revision:'); // Provides advice if a summary section is missing, or body is too short const includesSummary = body_contains('## summary', 'summary:'); -const snapshot_output = JSON.parse( - fs.readFileSync( - path.join( - process.env.RUNNER_TEMP, - 'diff-js-api-breaking-changes/output.json', - ), - 'utf8', - ), +const snapshot_path = path.join( + process.env.RUNNER_TEMP, + 'diff-js-api-breaking-changes/output.json', ); -console.log('Snapshot output:', snapshot_output); - -if (snapshot_output && snapshot_output.result !== 'NON_BREAKING') { - const title = ':exclamation: JavaScript API change detected'; - const idea = - 'This PR commits an update to ReactNativeApi.d.ts, indicating a change to React Native's public JavaScript API. ' + - 'Please include a clear changelog message. ' + - 'This change will be subject to extra review.\n\n' + - `This change was flagged as: ${snapshot_output.result}`; - warn(`${title} - ${idea}`); +if (fs.existsSync(snapshot_path)) { + const snapshot_output = JSON.parse(fs.readFileSync(snapshot_path, 'utf8')); + if (snapshot_output && snapshot_output.result !== 'NON_BREAKING') { + const title = ':exclamation: JavaScript API change detected'; + const idea = + 'This PR commits an update to ReactNativeApi.d.ts, indicating a change to React Native's public JavaScript API. ' + + 'Please include a clear changelog message. ' + + 'This change will be subject to extra review.\n\n' + + `This change was flagged as: ${snapshot_output.result}`; + warn(`${title} - ${idea}`); + } } const hasNoUsefulBody = From e164488890a1d0ca55beaddd20c4c718190e6ea3 Mon Sep 17 00:00:00 2001 From: Dawid Malecki Date: Mon, 3 Nov 2025 10:49:56 +0100 Subject: [PATCH 9/9] changing-api --- packages/react-native/ReactNativeApi.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-native/ReactNativeApi.d.ts b/packages/react-native/ReactNativeApi.d.ts index 073a1f2a9a1e..6befeb557b43 100644 --- a/packages/react-native/ReactNativeApi.d.ts +++ b/packages/react-native/ReactNativeApi.d.ts @@ -6115,7 +6115,7 @@ export { SectionListData, // 119baf83 SectionListProps, // c9ac8e07 SectionListRenderItem, // 1fad0435 - SectionListRenderItemInfo, // 745e1992 + SectionListRenderItemInfo, // 745e1995 Separators, // 6a45f7e3 Settings, // 4282b0da Share, // e4591b32