Skip to content

Updating integrate-rn script #15671

Open
protikbiswas100 wants to merge 6 commits intomainfrom
integrate-rn
Open

Updating integrate-rn script #15671
protikbiswas100 wants to merge 6 commits intomainfrom
integrate-rn

Conversation

@protikbiswas100
Copy link
Contributor

@protikbiswas100 protikbiswas100 commented Feb 17, 2026

Description

yarn integrate-rn script doesn't update the nightly build version in all packages.json file during integration requiring us to manually update the files. This PR fixes the integrate-rn script.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)

Why

yarn integrate-rn script doesn't update the nightly build version in all packages.json file during integration requiring us to manually update the files. This PR fixes the integrate-rn script.

Resolves [https://github.com//issues/15504]

What

Updated below
overrides.json baseVersion not updating (integrateRN.ts): upgradePlatformOverrides was calling upgradeOverrides() without passing reactNativeVersion, so the library fell back to auto-detecting from Node's module cache (which could resolve the old version). Fixed by explicitly passing the new version.

@react-native/* deps in package.json files not updating (upgradeDependencies.ts): Only 3 specific @react-native/* packages (metro-config, metro-babel-transformer, babel-preset) were hardcoded for nightly bumps. Other packages like @react-native/new-app-screen, @react-native/eslint-config, @react-native/popup-menu-android were missed. Fixed by adding a generic bumpReactNativeNightlyDeps helper that bumps any @react-native/* dependency referencing a nightly version, applied across all packages' dependencies and devDependencies.

Stale compiled output (bin.js): The script runs from compiled JS in lib-commonjs/, so source changes had no effect until manually rebuilt. Fixed by adding an automatic tsc compilation step in bin.js before execution.

Screenshots

Before
before

After
integrarte-rn-after
Tested with updating nightly build version 0.83.0-nightly-20250917-18cb4edfa to 0.83.0-nightly-20250922-5ef054921
using yarn integrate-rn 0.83.0-nightly-20250922-5ef054921
All of the 4 remaining results are expected:

3 change files → historical records from the previous integration, cleaned up by beachball later
1 overrides.json per-override baseVersion → a conflict that couldn't be auto-merged, requires manual resolution using react-native-platform-override upgrade

Changelog

Should this change be included in the release notes: no

Add a brief summary of the change to use in the release notes for the next release.

Microsoft Reviewers: Open in CodeFlow

@protikbiswas100 protikbiswas100 requested a review from a team as a code owner February 17, 2026 04:11
@protikbiswas100 protikbiswas100 marked this pull request as draft February 17, 2026 04:11
@protikbiswas100
Copy link
Contributor Author

/azp run PR

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@protikbiswas100
Copy link
Contributor Author

/azp run PR

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@protikbiswas100 protikbiswas100 marked this pull request as ready for review February 17, 2026 10:04
Copy link
Contributor

@iamAbhi-916 iamAbhi-916 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vineethkuttan has to verify with the next integration chunk!

@protikbiswas100
Copy link
Contributor Author

/azp run PR

@azure-pipelines
Copy link

Azure Pipelines failed to run 1 pipeline(s).

@protikbiswas100
Copy link
Contributor Author

/azp run PR

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@vineethkuttan
Copy link
Contributor

My current integration is going to finish, Will test this with next integration and will share my review

*/

// Ensure the package is built from latest source before running
const {execSync} = require('child_process');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an anti pattern.

Rather than doing this, we should just move to executing the TS directly. node 22 supports running ts scripts directly. So there is no need to compile integrate-rn at all. -- We should only be running tsc during build to do type checking.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants