From 8c6dc51715c187a915e056af5e1655b9fa64e4d0 Mon Sep 17 00:00:00 2001 From: Saad Najmi Date: Tue, 14 Apr 2026 13:55:03 -0700 Subject: [PATCH 1/2] Add publishConfig.executableFiles for yarn pack compatibility yarn pack strips execute permissions from shell scripts. Setting publishConfig.executableFiles ensures the published tarball retains correct permissions for all .sh files. Co-Authored-By: Claude Opus 4.6 --- ...microsoft-test-react-native-macos-init.yml | 4 ++-- packages/react-native/package.json | 21 +++++++++++++++++++ 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/.github/workflows/microsoft-test-react-native-macos-init.yml b/.github/workflows/microsoft-test-react-native-macos-init.yml index cf5543cb372a..9d11e4765708 100644 --- a/.github/workflows/microsoft-test-react-native-macos-init.yml +++ b/.github/workflows/microsoft-test-react-native-macos-init.yml @@ -62,8 +62,8 @@ jobs: run: | set -eox pipefail npm install ${{ runner.temp }}/react-native-macos.tgz - # yarn pack strips execute bits from shell scripts. - # publishConfig.executableFiles could fix this but doesn't support globs. + # yarn pack strips execute bits; publishConfig.executableFiles restores them + # at publish time, but we also chmod here for local CI packs. find node_modules/react-native-macos/scripts -name '*.sh' -exec chmod +x {} + - name: Apply macOS template diff --git a/packages/react-native/package.json b/packages/react-native/package.json index 874cc2cb47f8..b8408b9a3d7f 100644 --- a/packages/react-native/package.json +++ b/packages/react-native/package.json @@ -27,6 +27,27 @@ "react-native": "cli.js", "react-native-macos": "cli.js" }, + "publishConfig": { + "executableFiles": [ + "scripts/find-node-for-xcode.sh", + "scripts/ios-configure-glog.sh", + "scripts/node-binary.sh", + "scripts/packager.sh", + "scripts/react-native-xcode.sh", + "scripts/react_native_pods_utils/script_phases.sh", + "scripts/update-ruby.sh", + "scripts/xcode/ccache-clang.sh", + "scripts/xcode/ccache-clang++.sh", + "scripts/xcode/with-environment.sh", + "sdks/hermes-engine/utils/build-apple-framework.sh", + "sdks/hermes-engine/utils/build-hermes-xcode.sh", + "sdks/hermes-engine/utils/build-hermesc-xcode.sh", + "sdks/hermes-engine/utils/build-ios-framework.sh", + "sdks/hermes-engine/utils/build-mac-framework.sh", + "sdks/hermes-engine/utils/copy-hermes-xcode.sh", + "sdks/hermes-engine/utils/create-dummy-hermes-xcframework.sh" + ] + }, "main": "./index.js", "types": "types", "exports": { From 8926ccd7759974fc0fda350526d75bd0c48201c7 Mon Sep 17 00:00:00 2001 From: Saad Najmi Date: Tue, 14 Apr 2026 18:40:08 -0700 Subject: [PATCH 2/2] Remove chmod workaround now that publishConfig.executableFiles is set Co-Authored-By: Claude Opus 4.6 --- .github/workflows/microsoft-test-react-native-macos-init.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/microsoft-test-react-native-macos-init.yml b/.github/workflows/microsoft-test-react-native-macos-init.yml index 9d11e4765708..e9cfd19d0fe4 100644 --- a/.github/workflows/microsoft-test-react-native-macos-init.yml +++ b/.github/workflows/microsoft-test-react-native-macos-init.yml @@ -62,9 +62,6 @@ jobs: run: | set -eox pipefail npm install ${{ runner.temp }}/react-native-macos.tgz - # yarn pack strips execute bits; publishConfig.executableFiles restores them - # at publish time, but we also chmod here for local CI packs. - find node_modules/react-native-macos/scripts -name '*.sh' -exec chmod +x {} + - name: Apply macOS template working-directory: ${{ runner.temp }}/testcli