Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[release] Don't lookup build-info.json when updating version numbers #32778

Merged
merged 2 commits into from
Mar 28, 2025

Conversation

poteto
Copy link
Member

@poteto poteto commented Mar 28, 2025

From what we can see, build-info.json is a vestigal file that we were previously including in builds but are no longer since 2022 (see #23257, which removes build-info.json which would have broken scripts/release/build-release-locally-commands/add-build-info-json.js).

Since this file is no longer built, instead of looking it up we default to the version that was passed in as an argument to scripts/release/prepare-release-from-npm.js. Since version is what is pulled from npm, there should only be 1 consistent version for all the packages that are pulled. Therefore, only 1 version (eg canary) needs to be replaced to the new stable version.

Stack created with Sapling. Best reviewed with ReviewStack.

@github-actions github-actions bot added the React Core Team Opened by a member of the React Core Team label Mar 28, 2025
Comment on lines -155 to -158
// Replace inline renderer version numbers (e.g. shared/ReactVersion).
while (afterContents.indexOf(reactVersion) >= 0) {
afterContents = afterContents.replace(reactVersion, newStableVersion);
}
Copy link
Member Author

Choose a reason for hiding this comment

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

Since we pull all the same versions in this command, this 2nd loop is basically a no-op after the first one.

@react-sizebot
Copy link

react-sizebot commented Mar 28, 2025

Comparing: ef4bc8b...6c5ca7a

Critical size changes

Includes critical production bundles, as well as any change greater than 2%:

Name +/- Base Current +/- gzip Base gzip Current gzip
oss-stable/react-dom/cjs/react-dom.production.js = 6.68 kB 6.68 kB = 1.83 kB 1.83 kB
oss-stable/react-dom/cjs/react-dom-client.production.js = 515.13 kB 515.13 kB = 91.78 kB 91.78 kB
oss-experimental/react-dom/cjs/react-dom.production.js = 6.69 kB 6.69 kB = 1.83 kB 1.83 kB
oss-experimental/react-dom/cjs/react-dom-client.production.js = 615.31 kB 615.31 kB = 108.87 kB 108.87 kB
facebook-www/ReactDOM-prod.classic.js = 647.04 kB 647.04 kB = 114.36 kB 114.36 kB
facebook-www/ReactDOM-prod.modern.js = 637.32 kB 637.32 kB = 112.79 kB 112.79 kB

Significant size changes

Includes any change greater than 0.2%:

(No significant changes)

Generated by 🚫 dangerJS against 6c5ca7a

poteto added 2 commits March 28, 2025 14:17

Verified

This commit was signed with the committer’s verified signature.
poteto lauren
I missed this the last time.

Verified

This commit was signed with the committer’s verified signature.
poteto lauren
From what we can see, `build-info.json` is a vestigal file that we were previously including in builds but are no longer since 2022 (see #23257, which removes `build-info.json` which would have broken scripts/release/build-release-locally-commands/add-build-info-json.js).

Since this file is no longer built, instead of looking it up we default to the `version` that was passed in as an argument to scripts/release/prepare-release-from-npm.js. Since `version` is what is pulled from npm, there should only be 1 consistent version for all the packages that are pulled. Therefore, only 1 version (eg canary) needs to be replaced to the new stable version.
poteto added a commit that referenced this pull request Mar 28, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
I missed this the last time.
---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed
with [ReviewStack](https://reviewstack.dev/facebook/react/pull/32777).
* #32778
* __->__ #32777
@poteto poteto merged commit 1825990 into main Mar 28, 2025
247 of 265 checks passed
@poteto poteto deleted the pr32778 branch March 28, 2025 18:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed React Core Team Opened by a member of the React Core Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants