Skip to content

Commit a4df731

Browse files
Saadnajmiclaude
andauthored
fix: use 1000.0.0 for private @react-native-macos/ package versions (#2910)
## Summary - Update `enforceReactNativeMacosPrivatePackageVersion` constraint to use `1000.0.0` instead of `0.1.0`, matching the upstream convention for non-published packages - Remove the `isMainBranch` guard so the constraint applies consistently on all branches See also: #2909 (0.81-stable counterpart) ## Test plan - [ ] `yarn constraints` passes on main 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 429f532 commit a4df731

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

yarn.config.cjs

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -159,20 +159,17 @@ function enforceReactNativeMacOSDependencyConsistency({Yarn}) {
159159
}
160160

161161
/**
162-
* Enforce that private @react-native-macos/ scoped packages (i.e. internal
163-
* tooling that is not forked from upstream) have a fixed version of 0.1.0.
164-
* These packages do not track the react-native-macos release version.
162+
* Enforce that all private @react-native-macos/ scoped packages use a fixed
163+
* version of 1000.0.0, so they are decoupled from release versioning.
165164
* @param {Context} context
166165
*/
167166
function enforceReactNativeMacosPrivatePackageVersion({Yarn}) {
168-
if (!isMainBranch({Yarn})) {
169-
for (const workspace of Yarn.workspaces()) {
170-
const isReactNativeMacosScoped = workspace.ident?.startsWith('@react-native-macos/');
171-
const isPrivate = workspace.manifest.private;
167+
for (const workspace of Yarn.workspaces()) {
168+
const isReactNativeMacosScoped = workspace.ident?.startsWith('@react-native-macos/');
169+
const isPrivate = workspace.manifest.private;
172170

173-
if (isReactNativeMacosScoped && isPrivate) {
174-
workspace.set('version', '0.1.0');
175-
}
171+
if (isReactNativeMacosScoped && isPrivate) {
172+
workspace.set('version', '1000.0.0');
176173
}
177174
}
178175
}

0 commit comments

Comments
 (0)