Skip to content

Commit 7621183

Browse files
authored
[VBLOCKS-5595] Yarn 4 upgrade (#619)
* feat: upgrade yarn version to 4.10.3 * fix: use classic nodeModules for test app * fix: circleci config * fix: add corepack to circleci config * fix: use sudo for corepack enable * fix: reorganize yarn commands * fix: yarn install cwd flag * fix: update android image * fix: enable corepack without sudo
1 parent 7032a31 commit 7621183

File tree

9 files changed

+24225
-17177
lines changed

9 files changed

+24225
-17177
lines changed

.circleci/config.yml

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ parameters:
2929
executors:
3030
default:
3131
docker:
32-
- image: cimg/node:18.19
32+
- image: cimg/node:22.21
3333
working_directory: ~/project
3434
ios-executor:
3535
macos:
@@ -45,16 +45,22 @@ commands:
4545
- attach_workspace:
4646
at: ~/project
4747

48+
enable-corepack:
49+
steps:
50+
- run:
51+
name: Enable corepack
52+
command: |
53+
sudo corepack enable
54+
4855
install-dependencies:
4956
steps:
5057
- run:
5158
name: Install dependencies
5259
command: |
53-
yarn run build:constants
54-
cd test/TwilioVoiceExampleNewArch && npm ci && cd ../..
55-
yarn install --cwd test/app --frozen-lockfile
5660
yarn install --frozen-lockfile
61+
yarn run build:constants
5762
yarn run build:errors
63+
yarn --cwd test/app install --frozen-lockfile
5864
5965
setup-pods:
6066
description: Setup pods used for ios builds
@@ -161,6 +167,7 @@ jobs:
161167
steps:
162168
- checkout
163169
- attach_project
170+
- enable-corepack
164171
- restore_cache:
165172
keys:
166173
- dependencies-{{ checksum "package.json" }}
@@ -184,6 +191,7 @@ jobs:
184191
executor: default
185192
steps:
186193
- attach_project
194+
- enable-corepack
187195
- run:
188196
name: Lint files
189197
command: |
@@ -193,6 +201,7 @@ jobs:
193201
executor: default
194202
steps:
195203
- attach_project
204+
- enable-corepack
196205
- run:
197206
name: Typecheck files
198207
command: |
@@ -202,6 +211,7 @@ jobs:
202211
executor: default
203212
steps:
204213
- attach_project
214+
- enable-corepack
205215
- run:
206216
name: Run unit tests
207217
command: |
@@ -214,6 +224,7 @@ jobs:
214224
executor: default
215225
steps:
216226
- attach_project
227+
- enable-corepack
217228
- run:
218229
name: Build package
219230
command: |
@@ -223,6 +234,7 @@ jobs:
223234
executor: default
224235
steps:
225236
- attach_project
237+
- enable-corepack
226238
- run:
227239
name: Build docs and check for API changes
228240
command: |
@@ -233,6 +245,7 @@ jobs:
233245
executor: default
234246
steps:
235247
- attach_project
248+
- enable-corepack
236249
- run:
237250
name: Build errors and check for changes
238251
command: |
@@ -248,6 +261,7 @@ jobs:
248261
default: true
249262
steps:
250263
- checkout
264+
- enable-corepack
251265
- install-dependencies
252266
- when:
253267
condition: << parameters.dry-run >>
@@ -269,6 +283,7 @@ jobs:
269283
type: string
270284
steps:
271285
- checkout
286+
- enable-corepack
272287
- install-dependencies
273288
- generate-client-identity
274289
- setup-e2e-creds
@@ -289,14 +304,18 @@ jobs:
289304
executor:
290305
name: android/android-machine
291306
resource-class: large
292-
tag: 2024.04.1
307+
tag: 2025.10.1
293308
parameters:
294309
detox_configuration:
295310
type: string
296311
steps:
297312
- android/change-java-version:
298313
java-version: 17
299314
- checkout
315+
- run:
316+
name: Enable corepack (without sudo)
317+
command: |
318+
corepack enable
300319
- install-dependencies
301320
- generate-client-identity
302321
- setup-e2e-creds

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ node_modules/
4949
npm-debug.log
5050
yarn-debug.log
5151
yarn-error.log
52+
.yarn/
5253

5354
# BUCK
5455
buck-out/

.yarnrc

Lines changed: 0 additions & 3 deletions
This file was deleted.

.yarnrc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
nodeLinker: node-modules

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,5 +166,6 @@
166166
"dependencies": {
167167
"@twilio/voice-errors": "1.8.0",
168168
"eventemitter3": "^4.0.7"
169-
}
169+
},
170+
"packageManager": "[email protected]"
170171
}

test/app/.yarnrc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
nodeLinker: node-modules

test/app/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,6 @@
4040
},
4141
"engines": {
4242
"node": ">=18"
43-
}
43+
},
44+
"packageManager": "[email protected]"
4445
}

0 commit comments

Comments
 (0)