Skip to content

Commit 4a28bb7

Browse files
Saadnajmiclaude
andcommitted
fix(0.81): run yarn pack from monorepo root where Berry is active
The previous commit used yarn --cwd from the testcli directory, but that invokes the global yarn 1.x which refuses to run due to the packageManager field. Split into two steps: yarn pack runs from the monorepo checkout (where Yarn Berry is active), then npm install installs the tarball in the test project. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent b901cec commit 4a28bb7

1 file changed

Lines changed: 14 additions & 9 deletions

File tree

.github/workflows/microsoft-test-react-native-macos-init.yml

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -52,19 +52,24 @@ jobs:
5252
npx --yes @react-native-community/cli init testcli --version ${{ steps.rn-version.outputs.version }}
5353
working-directory: ${{ runner.temp }}
5454

55+
- name: Pack local react-native-macos
56+
working-directory: packages/react-native
57+
run: |
58+
set -eox pipefail
59+
# Pack the local package into a tarball. This runs the "prepack"
60+
# script which generates the FBReactNativeSpec codegen headers
61+
# (React/FBReactNativeSpec/) that are shipped in published releases.
62+
yarn pack -o ${{ runner.temp }}/react-native-macos.tgz
63+
5564
- name: Install local react-native-macos
5665
working-directory: ${{ runner.temp }}/testcli
5766
run: |
5867
set -eox pipefail
59-
# Pack the local package into a tarball first. This runs the
60-
# "prepack" script which generates the FBReactNativeSpec codegen
61-
# headers (React/FBReactNativeSpec/) that are shipped in published
62-
# releases. Then install from the tarball so the test project
63-
# matches a normal user's node_modules layout: no symlinks (which
64-
# cause module instance duplication) and pre-generated codegen
65-
# headers present (which the build relies on to skip regeneration).
66-
yarn --cwd ${{ github.workspace }}/packages/react-native pack -o ${{ runner.temp }}/react-native-macos.tgz
67-
yarn add ${{ runner.temp }}/react-native-macos.tgz
68+
# Install from the tarball so the test project matches a normal
69+
# user's node_modules layout: no symlinks (which cause module
70+
# instance duplication) and pre-generated codegen headers present
71+
# (which the build relies on to skip regeneration).
72+
npm install ${{ runner.temp }}/react-native-macos.tgz
6873
6974
- name: Apply macOS template
7075
working-directory: ${{ runner.temp }}/testcli

0 commit comments

Comments
 (0)