Skip to content

React version field should match package.json#24445

Merged
acdlite merged 1 commit into
react:mainfrom
acdlite:react-verison-match
Apr 26, 2022
Merged

React version field should match package.json#24445
acdlite merged 1 commit into
react:mainfrom
acdlite:react-verison-match

Conversation

@acdlite

@acdlite acdlite commented Apr 26, 2022

Copy link
Copy Markdown
Collaborator

The version field exported by the React package currently corresponds to the @next release for that build. This updates the build script to output the same version that is used in the package.json file.

It works by doing a find-and-replace of the React version after the build has completed. This is a bit weird but it saves us from having to build the @next and @latest releases separately; they are identical except for the version numbers.

@facebook-github-bot facebook-github-bot added CLA Signed React Core Team Opened by a member of the React Core Team labels Apr 26, 2022
@sizebot

sizebot commented Apr 26, 2022

Copy link
Copy Markdown

Comparing: bd08137...9153ed7

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.min.js +0.01% 131.53 kB 131.55 kB = 42.11 kB 42.11 kB
oss-experimental/react-dom/cjs/react-dom.production.min.js = 136.80 kB 136.79 kB = 43.68 kB 43.68 kB
facebook-www/ReactDOM-prod.classic.js = 441.05 kB 441.08 kB +0.02% 80.44 kB 80.45 kB
facebook-www/ReactDOM-prod.modern.js = 426.30 kB 426.29 kB = 78.26 kB 78.26 kB
facebook-www/ReactDOMForked-prod.classic.js = 441.05 kB 441.08 kB +0.02% 80.44 kB 80.46 kB

Significant size changes

Includes any change greater than 0.2%:

Expand to show
Name +/- Base Current +/- gzip Base gzip Current gzip
oss-stable-semver/react/cjs/react.production.min.js = 6.93 kB 6.91 kB = 2.72 kB 2.70 kB

Generated by 🚫 dangerJS against 9153ed7

@acdlite
acdlite force-pushed the react-verison-match branch 3 times, most recently from 91965e0 to da75479 Compare April 26, 2022 20:15
The `version` field exported by the React package currently corresponds
to the `@next` release for that build. This updates the build script
to output the same version that is used in the package.json file.

It works by doing a find-and-replace of the React version after the
build has completed. This is a bit weird but it saves us from having
to build the `@next` and `@latest` releases separately; they are
identical except for the version numbers.
@acdlite
acdlite force-pushed the react-verison-match branch from da75479 to 9153ed7 Compare April 26, 2022 20:19
@acdlite
acdlite merged commit 22edb9f into react:main Apr 26, 2022
facebook-github-bot pushed a commit to react/react-native that referenced this pull request Jun 6, 2022
Summary:
This sync includes the following changes:
- **[dd4950c](react/react@dd4950c90 )**: [Flight] Implement useId hook ([#24172](react/react#24172)) //<Josh Story>//
- **[26a5b3c](react/react@26a5b3c7f )**: Explicitly set `highWaterMark` to 0 for `ReadableStream` ([#24641](react/react#24641)) //<Josh Larson>//
- **[aec5759](react/react@aec575914 )**: [Fizz] Send errors down to client ([#24551](react/react#24551)) //<Josh Story>//
- **[a276638](react/react@a2766387e )**: [Fizz] Improve text separator byte efficiency ([#24630](react/react#24630)) //<Josh Story>//
- **[f786053](react/react@f7860538a )**: Fix typo in useSyncExternalStore main entry point error ([#24631](react/react#24631)) //<François Chalifour>//
- **[1bed207](react/react@1bed20731 )**: Add a module map option to the Webpack Flight Client ([#24629](react/react#24629)) //<Sebastian Markbåge>//
- **[b2763d3](react/react@b2763d3ea )**: Move hydration code out of normal Suspense path ([#24532](react/react#24532)) //<Andrew Clark>//
- **[357a613](react/react@357a61324 )**: [DevTools][Transition Tracing] Added support for Suspense Boundaries ([#23365](react/react#23365)) //<Luna Ruan>//
- **[2c8a145](react/react@2c8a1452b )**: Fix ignored setState in Safari when iframe is touched ([#24459](react/react#24459)) //<dan>//
- **[6266263](react/react@62662633d )**: Remove enableFlipOffscreenUnhideOrder ([#24545](react/react#24545)) //<Ricky>//
- **[34da5aa](react/react@34da5aa69 )**: Only treat updates to lazy as a new mount in legacy mode ([#24530](react/react#24530)) //<Ricky>//
- **[46a6d77](react/react@46a6d77e3 )**: Unify JSResourceReference Interfaces ([#24507](react/react#24507)) //<Timothy Yung>//
- **[6cbf0f7](react/react@6cbf0f7fa )**: Fork ReactSymbols ([#24484](react/react#24484)) //<Ricky>//
- **[a10a9a6](react/react@a10a9a6b5 )**: Add test for hiding children after layout destroy ([#24483](react/react#24483)) //<Ricky>//
- **[b4eb0ad](react/react@b4eb0ad71 )**: Do not replay erroring beginWork with invokeGuardedCallback when suspended or previously errored ([#24480](react/react#24480)) //<Josh Story>//
- **[99eef9e](react/react@99eef9e2d )**: Hide children of Offscreen after destroy effects ([#24446](react/react#24446)) //<Ricky>//
- **[ce13860](react/react@ce1386028 )**: Remove enablePersistentOffscreenHostContainer flag ([#24460](react/react#24460)) //<Andrew Clark>//
- **[72b7462](react/react@72b7462fe )**: Bump local package.json versions for 18.1 release ([#24447](react/react#24447)) //<Andrew Clark>//
- **[22edb9f](react/react@22edb9f77 )**: React `version` field should match package.json ([#24445](react/react#24445)) //<Andrew Clark>//
- **[6bf3dee](react/react@6bf3deef5 )**: Upgrade react-shallow-renderer to support react 18 ([#24442](react/react#24442)) //<Michael サイトー 中村 Bashurov>//

Changelog:
[General][Changed] - React Native sync for revisions bd4784c...d300ceb

jest_e2e[run_all_tests]

Reviewed By: cortinico, kacieb

Differential Revision: D36874368

fbshipit-source-id: c0ee015f4ef2fa56e57f7a1f6bc37dd05c949877
mrizwanashiq pushed a commit to mrizwanashiq/react that referenced this pull request Jun 25, 2026
The `version` field exported by the React package currently corresponds
to the `@next` release for that build. This updates the build script
to output the same version that is used in the package.json file.

It works by doing a find-and-replace of the React version after the
build has completed. This is a bit weird but it saves us from having
to build the `@next` and `@latest` releases separately; they are
identical except for the version numbers.
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.

4 participants