Skip to content

Commit 950b04f

Browse files
authored
fix: globally install corepack (#4741)
1 parent f80e57e commit 950b04f

11 files changed

+20
-30
lines changed

.github/workflows/buildandtest.yml

+7-7
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
if: ${{ needs.diff_check.outputs.skip_ci != 'true' }}
2424
steps:
2525
- uses: actions/checkout@v4
26-
- run: corepack enable
26+
- run: npm i -g corepack
2727
- uses: actions/setup-node@v4
2828
with:
2929
node-version: 18
@@ -41,7 +41,7 @@ jobs:
4141
if: ${{ needs.diff_check.outputs.skip_ci != 'true' }}
4242
steps:
4343
- uses: actions/checkout@v4
44-
- run: corepack enable
44+
- run: npm i -g corepack
4545
- uses: actions/setup-node@v4
4646
with:
4747
node-version: 18
@@ -59,7 +59,7 @@ jobs:
5959
if: ${{ needs.diff_check.outputs.skip_ci != 'true' }}
6060
steps:
6161
- uses: actions/checkout@v4
62-
- run: corepack enable
62+
- run: npm i -g corepack
6363
- uses: actions/setup-node@v4
6464
with:
6565
node-version: 18
@@ -82,7 +82,7 @@ jobs:
8282
if: ${{ needs.diff_check.outputs.skip_ci != 'true' }}
8383
steps:
8484
- uses: actions/checkout@v4
85-
- run: corepack enable
85+
- run: npm i -g corepack
8686
- uses: actions/setup-node@v4
8787
with:
8888
node-version: 18
@@ -125,7 +125,7 @@ jobs:
125125
YARN_ENABLE_IMMUTABLE_INSTALLS: false
126126
steps:
127127
- uses: actions/checkout@v4
128-
- run: corepack enable
128+
- run: npm i -g corepack
129129
- uses: actions/setup-node@v4
130130
with:
131131
node-version: 18
@@ -155,7 +155,7 @@ jobs:
155155
if: ${{ needs.diff_check.outputs.skip_ci != 'true' }}
156156
steps:
157157
- uses: actions/checkout@v4
158-
- run: corepack enable
158+
- run: npm i -g corepack
159159
- uses: actions/setup-node@v4
160160
with:
161161
node-version: 18
@@ -189,7 +189,7 @@ jobs:
189189
dev: [true, false]
190190
steps:
191191
- uses: actions/checkout@v4
192-
- run: corepack enable
192+
- run: npm i -g corepack
193193
- uses: actions/setup-node@v4
194194
with:
195195
node-version: 18

.github/workflows/codegen.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
--targetPlatform ios
3838
steps:
3939
- uses: actions/checkout@v4
40-
- run: corepack enable
40+
- run: npm i -g corepack
4141
- uses: actions/setup-node@v4
4242
with:
4343
node-version: 18

.github/workflows/e2e.yml

+3-5
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ jobs:
5656
- run: sudo xcode-select -s /Applications/Xcode_14.2.app/Contents/Developer
5757
if: ${{ matrix.platform == 'ios' }}
5858

59-
- run: corepack enable
59+
- run: npm i -g corepack
6060
- uses: actions/setup-node@v4
6161
with:
6262
node-version: 18
@@ -227,7 +227,7 @@ jobs:
227227
- run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode-version }}.app/Contents/Developer
228228
if: ${{ matrix.platform == 'ios' }}
229229

230-
- run: corepack enable
230+
- run: npm i -g corepack
231231
- uses: actions/setup-node@v4
232232
with:
233233
node-version: 18
@@ -353,9 +353,7 @@ jobs:
353353
path: dev-packages/e2e-tests
354354

355355
- name: Enable Corepack
356-
run: |
357-
npm install -g [email protected]
358-
corepack enable
356+
run: npm i -g corepack
359357
- uses: actions/setup-node@v4
360358
with:
361359
node-version: 20

.github/workflows/native-tests.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,7 @@ jobs:
2525
- uses: actions/checkout@v4
2626

2727
- name: Enable Corepack
28-
run: |
29-
npm install -g [email protected]
30-
corepack enable
28+
run: npm i -g corepack
3129
- uses: actions/setup-node@v4
3230
with:
3331
node-version: 18

.github/workflows/release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
with:
2929
token: ${{ steps.token.outputs.token }}
3030
fetch-depth: 0
31-
- run: corepack enable
31+
- run: npm i -g corepack
3232
- uses: actions/setup-node@v4
3333
with:
3434
node-version: 18

.github/workflows/sample-application-expo.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,7 @@ jobs:
4747
- uses: actions/checkout@v4
4848

4949
- name: Enable Corepack
50-
run: |
51-
npm install -g [email protected]
52-
corepack enable
50+
run: npm i -g corepack
5351
- uses: actions/setup-node@v4
5452
with:
5553
node-version: 18

.github/workflows/sample-application.yml

+2-6
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,7 @@ jobs:
6161
- uses: actions/checkout@v4
6262

6363
- name: Enable Corepack
64-
run: |
65-
npm install -g [email protected]
66-
corepack enable
64+
run: npm i -g corepack
6765
- uses: actions/setup-node@v4
6866
with:
6967
node-version: 18
@@ -263,9 +261,7 @@ jobs:
263261
run: unzip ${{ env.ANDROID_APP_ARCHIVE_PATH }}
264262

265263
- name: Enable Corepack
266-
run: |
267-
npm install -g [email protected]
268-
corepack enable
264+
run: npm i -g corepack
269265
- uses: actions/setup-node@v4
270266
with:
271267
node-version: 18

.github/workflows/testflight.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
ruby-version: '3.3.0' # based on what is used in the sample
2727
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
2828
cache-version: 1 # cache the installed gems
29-
- run: corepack enable
29+
- run: npm i -g corepack
3030
- uses: actions/setup-node@v4
3131
with:
3232
node-version: 18

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ This repository contains mono repository structure with multiple React Native an
1212

1313
# Requirements
1414

15-
- nodejs 18 (with corepack enabled)
15+
- nodejs 18 (with corepack globally installed)
1616
- yarn version specified in `package.json` (at the moment version 3.6)
1717

1818
## Building

samples/expo/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"export:web": "expo export --dump-sourcemap --clear --platform web",
1515
"prebuild": "expo prebuild --clean --no-install",
1616
"set-version": "npx react-native-version --skip-tag --never-amend",
17-
"eas-build-pre-install": "corepack enable && yarn install --no-immutable --inline-builds && yarn workspace @sentry/react-native build"
17+
"eas-build-pre-install": "npm i -g corepack && yarn install --no-immutable --inline-builds && yarn workspace @sentry/react-native build"
1818
},
1919
"dependencies": {
2020
"@sentry/react-native": "6.11.0-beta.0",

scripts/update-package-json.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# expects `$repo`, `$tagPrefix` and `$packages` (array) variables to be defined, see e.g. update-javascript.sh
22

3-
corepack enable # This repository uses Yarn v3 which requires corepack to be enabled
3+
npm i -g corepack # This repository uses Yarn v3 which requires corepack to be installed
44

55
monorepoRoot="$(dirname "$0")/.."
66

0 commit comments

Comments
 (0)