Skip to content

Conversation

Saadnajmi
Copy link
Collaborator

@Saadnajmi Saadnajmi commented Jul 22, 2025

Summary:

This PR does several things at once, all in order to improve release flow.

  • Updates Yarn to 4.9.2 (Contains a speed fix by @dannyvv )
  • Moves our namespace from @react-native-mac to @react-native-macos (Turns out @dannyvv had ownership of it, and transferred it so our bot can use it 😄)
  • Updates NX to version 21.

That last one comes with a bunch of changes, as NX 21 comes with a revamped implementation of nx release:

  • Moves the project relationship from "independent" to the default "fixed". This means 'react-native-macosand@react-native-macos/virtualized-listswill always have the same version, and git tags / changelings are all centralized on the react-native-macos version, and followv*..`
  • Updates our package nx-release-version from being a generator to a version action. This is a new thing with Nx 21's release flow. It behaves the same.
  • Now, by default, local dependency protocols are preserved. We still can't use this with Yarn 4 & nx to publish, so on stable branches, I'll undo the workspace:* for just react-native-macos's dependency on virtualized lists.

Between simplifying the graph with the "fixed" project relationship, preserving the local dependency protocols, and maybe some logic update to ns release's bump algorithm, nx release now does what I want it to and only bumps react-native-macos and virtualized-lists, instead of also bumping private packages like rn-tester, and @react-native/oss-library-example. This unblocks a persistent bug I had on the stable branches where releases would fail after version bump.

Test Plan:

nx release --dry-run seems to do what I want it to.

@Saadnajmi Saadnajmi marked this pull request as draft July 23, 2025 00:59
@Saadnajmi Saadnajmi force-pushed the nx-release-21 branch 6 times, most recently from aadec46 to 31c1f4a Compare July 23, 2025 02:04
@Saadnajmi Saadnajmi changed the title feat: use react-native-macos namespace, update to nx 21 chore: update to nx 21 Jul 23, 2025
@Saadnajmi Saadnajmi marked this pull request as ready for review July 23, 2025 23:22
Copy link

@JasonVMo JasonVMo left a comment

Choose a reason for hiding this comment

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

The changes look good, one thing to consider is changing the nx dependency to use ^ so that you can update to newer releases just via lockfile changes.

@Saadnajmi Saadnajmi merged commit 1156c64 into microsoft:main Jul 25, 2025
20 checks passed
Saadnajmi added a commit that referenced this pull request Jul 25, 2025
Saadnajmi added a commit that referenced this pull request Jul 25, 2025
Saadnajmi added a commit that referenced this pull request Jul 25, 2025
Saadnajmi added a commit that referenced this pull request Aug 1, 2025
## Summary:

With #2560 and followup changes, we call `yarn npm publish` directly
instead of `nx release publish` (Which indirectly used npm publish).
Yarn's NPM publish command grabs its auth token from `.yarnrc.yml`, not
`.npmrc`. Let's update our CI steps that set this.


## Test Plan:

Tested that I can call `yarn config set / unset` to set and unset these
values.
@Saadnajmi Saadnajmi deleted the nx-release-21 branch August 8, 2025 22:03
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.

2 participants