From 245ac1fa043a5d24e9c56a4b9fbb99897d4e60c3 Mon Sep 17 00:00:00 2001 From: Saad Najmi Date: Mon, 25 Aug 2025 11:26:42 -0700 Subject: [PATCH 1/2] fix(constraints): enforcePrivateReactNativeScopedPackages checks workspaces instead of dependencies --- yarn.config.cjs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/yarn.config.cjs b/yarn.config.cjs index 567c97a3ecd4..bffe9b7c2759 100644 --- a/yarn.config.cjs +++ b/yarn.config.cjs @@ -60,11 +60,11 @@ const isMainBranch = ({Yarn}) => { * @param {Context} context */ function enforcePrivateReactNativeScopedPackages({Yarn}) { - for (const dependency of Yarn.dependencies()) { - if (dependency.ident.startsWith('@react-native/')) { - Yarn.workspace({ident: dependency.ident})?.set('private', true); + for (const workspace of Yarn.workspaces()) { + if (workspace.ident?.startsWith('@react-native/') && !PACKAGES_TO_IGNORE.includes(workspace.ident)) { + workspace.set('private', true); } - } + } } /** From 4ecac2008e8c77cef119693e22bf10eee1c43048 Mon Sep 17 00:00:00 2001 From: Saad Najmi Date: Mon, 25 Aug 2025 11:30:12 -0700 Subject: [PATCH 2/2] `yarn constraints --fix` --- packages/react-native-compatibility-check/package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/react-native-compatibility-check/package.json b/packages/react-native-compatibility-check/package.json index 6c25ca3431d3..69ccc77b6e42 100644 --- a/packages/react-native-compatibility-check/package.json +++ b/packages/react-native-compatibility-check/package.json @@ -1,6 +1,7 @@ { "name": "@react-native/compatibility-check", "version": "0.79.0-main", + "private": true, "description": "Check a React Native app's boundary between JS and Native for incompatibilities", "license": "MIT", "repository": {