From 1861bd3a7c58a7e254a70265f577a64c89c3f5c1 Mon Sep 17 00:00:00 2001 From: Saad Najmi Date: Fri, 20 Mar 2026 14:53:37 -0500 Subject: [PATCH 1/3] fix: fix yarn constraints failures after release bumps Add constraint pinning private @react-native-macos/* packages to 0.1.0 (non-forked internal tooling shouldn't track the release version). Also update eslint react-native-manifest rule to use macOS fork names, normalize nx-release-version to 0.1.0, and make virtualized-lists public (it's a forked package that should be publishable). Co-Authored-By: Claude Opus 4.6 --- packages/nx-release-version/package.json | 2 +- packages/virtualized-lists/package.json | 1 - .../rules/react-native-manifest.js | 5 +++-- yarn.config.cjs | 20 +++++++++++++++++++ 4 files changed, 24 insertions(+), 4 deletions(-) diff --git a/packages/nx-release-version/package.json b/packages/nx-release-version/package.json index e9bf940e49d1..c0043f1a426d 100644 --- a/packages/nx-release-version/package.json +++ b/packages/nx-release-version/package.json @@ -1,6 +1,6 @@ { "name": "@react-native-macos/nx-release-version", - "version": "0.0.1-dev", + "version": "0.1.0", "private": true, "description": "Nx Release Version Actions for React Native macOS", "homepage": "https://github.com/microsoft/react-native-macos/tree/HEAD/packages/nx-release-version#readme", diff --git a/packages/virtualized-lists/package.json b/packages/virtualized-lists/package.json index 216d8442942a..c5ff43fcfe0c 100644 --- a/packages/virtualized-lists/package.json +++ b/packages/virtualized-lists/package.json @@ -1,7 +1,6 @@ { "name": "@react-native-macos/virtualized-lists", "version": "0.81.0-main", - "private": true, "description": "Virtualized lists for React Native macOS.", "license": "MIT", "repository": { diff --git a/private/eslint-plugin-monorepo/rules/react-native-manifest.js b/private/eslint-plugin-monorepo/rules/react-native-manifest.js index ff073946ac17..428af1f1b776 100644 --- a/private/eslint-plugin-monorepo/rules/react-native-manifest.js +++ b/private/eslint-plugin-monorepo/rules/react-native-manifest.js @@ -18,7 +18,8 @@ * (which depends on the `react-native` package). */ const PACKAGE_CONSTRAINTS = { - '@react-native/monorepo': { + // [macOS] Use fork package names instead of upstream names + '@react-native-macos/monorepo': { disallowed: [ { property: 'dependencies', @@ -27,7 +28,7 @@ const PACKAGE_CONSTRAINTS = { }, ], }, - 'react-native': { + 'react-native-macos': { disallowed: [ { property: 'devDependencies', diff --git a/yarn.config.cjs b/yarn.config.cjs index bffe9b7c2759..968b0d29ca35 100644 --- a/yarn.config.cjs +++ b/yarn.config.cjs @@ -158,6 +158,25 @@ function enforceReactNativeMacOSDependencyConsistency({Yarn}) { } } +/** + * Enforce that private @react-native-macos/ scoped packages (i.e. internal + * tooling that is not forked from upstream) have a fixed version of 0.1.0. + * These packages do not track the react-native-macos release version. + * @param {Context} context + */ +function enforceReactNativeMacosPrivatePackageVersion({Yarn}) { + if (!isMainBranch({Yarn})) { + for (const workspace of Yarn.workspaces()) { + const isReactNativeMacosScoped = workspace.ident?.startsWith('@react-native-macos/'); + const isPrivate = workspace.manifest.private; + + if (isReactNativeMacosScoped && isPrivate) { + workspace.set('version', '0.1.0'); + } + } + } +} + module.exports = defineConfig({ constraints: async ctx => { enforcePrivateReactNativeScopedPackages(ctx); @@ -165,5 +184,6 @@ module.exports = defineConfig({ enforceReactNativeDependencyConsistency(ctx); enforceReactNativeMacosVersionConsistency(ctx); enforceReactNativeMacOSDependencyConsistency(ctx); + enforceReactNativeMacosPrivatePackageVersion(ctx); }, }); \ No newline at end of file From bbf847e2194fd24a5d5be31253ddcf8034eee166 Mon Sep 17 00:00:00 2001 From: Saad Najmi Date: Fri, 20 Mar 2026 15:08:52 -0500 Subject: [PATCH 2/3] fix: update react-native-manifest test for macOS fork names Update test cases to use @react-native-macos/monorepo and react-native-macos instead of upstream names. Co-Authored-By: Claude Opus 4.6 --- .../rules/__tests__/react-native-manifest-test.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/private/eslint-plugin-monorepo/rules/__tests__/react-native-manifest-test.js b/private/eslint-plugin-monorepo/rules/__tests__/react-native-manifest-test.js index c0ec67da127b..bfa555d3e70a 100644 --- a/private/eslint-plugin-monorepo/rules/__tests__/react-native-manifest-test.js +++ b/private/eslint-plugin-monorepo/rules/__tests__/react-native-manifest-test.js @@ -36,8 +36,9 @@ ruleTester.run('react-native-manifest', rule, { }), }, { + // [macOS] Use fork package names code: JSON.stringify({ - name: '@react-native/monorepo', + name: '@react-native-macos/monorepo', devDependencies: { dependencyB: '1.0.0', }, @@ -45,7 +46,7 @@ ruleTester.run('react-native-manifest', rule, { }, { code: JSON.stringify({ - name: 'react-native', + name: 'react-native-macos', dependencies: { dependencyA: '1.0.0', }, @@ -54,8 +55,9 @@ ruleTester.run('react-native-manifest', rule, { ], invalid: [ { + // [macOS] Use fork package names code: JSON.stringify({ - name: '@react-native/monorepo', + name: '@react-native-macos/monorepo', dependencies: { dependencyA: '1.0.0', }, @@ -73,7 +75,7 @@ ruleTester.run('react-native-manifest', rule, { }, { code: JSON.stringify({ - name: 'react-native', + name: 'react-native-macos', devDependencies: { dependencyA: '1.0.0', }, From a8ce6f558e6a58d026d4b860d77935dfff029b11 Mon Sep 17 00:00:00 2001 From: Saad Najmi Date: Fri, 20 Mar 2026 15:50:34 -0500 Subject: [PATCH 3/3] fix: include codegen snapshot in nx release changed files The snapshot file was being updated by updateReactNativeArtifacts but not included in the changedFiles list returned to nx, so it wasn't staged in the release commit. Co-Authored-By: Claude Opus 4.6 --- packages/nx-release-version/index.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/packages/nx-release-version/index.js b/packages/nx-release-version/index.js index 47d00ee01aed..f34d124080ad 100644 --- a/packages/nx-release-version/index.js +++ b/packages/nx-release-version/index.js @@ -64,6 +64,16 @@ async function runSetVersion() { 'Core', 'ReactNativeVersion.js', ), + path.join( + REPO_ROOT, + 'packages', + 'react-native', + 'scripts', + 'codegen', + '__tests__', + '__snapshots__', + 'generate-artifacts-executor-test.js.snap', + ), ]; }