Skip to content

Commit 3716542

Browse files
authored
[chore] Upgrade repository to Yarn 4 with Mise (#3406)
## Why - Repository maintenance: standardize on Yarn 4 managed via Mise. - Prepare for introducing minimum package-age constraints in dependency policy. ## How - Migrated repo tooling to Yarn 4 with Mise. - Updated CI and scripts for Yarn 4 behavior: - Lerna invoked via `yarn run -T lerna`. - Coverage args forwarded correctly (`-- --coverage`). - Removed unsupported Yarn 4 `--silent` usage. - Added missing package-local script dependencies surfaced by Yarn 4 (`jest`, `oxlint`, `rimraf`). - Increased `EasCommand` coverage test timeout from 30s to 60s. (Was consistently failing in CI.) ## Test Plan - CI only: `Run tests` matrix (including Node 20 coverage) and other touched workflows. - Release behavior will be verified during the normal release run.
1 parent 50b9be9 commit 3716542

24 files changed

Lines changed: 22848 additions & 16805 deletions

File tree

.github/workflows/release.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ jobs:
3232
- uses: actions/checkout@v4
3333
- uses: ./.github/actions/setup-mise
3434
- name: Install dependencies
35-
run: yarn install --frozen-lockfile --check-files
35+
run: yarn install --immutable
3636
- name: Build
3737
run: yarn build
3838
- name: Publish packages to npm
39-
run: yarn lerna publish from-package --yes --no-verify-access
39+
run: yarn run -T lerna publish from-package --yes --no-verify-access
4040
- name: Add latest-eas-build-staging tag
4141
env:
4242
NODE_AUTH_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }}
@@ -64,12 +64,12 @@ jobs:
6464
- uses: ./.github/actions/setup-mise
6565
- name: Install dependencies
6666
working-directory: ./scripts
67-
run: yarn install --frozen-lockfile --check-files
67+
run: yarn install --immutable
6868
- name: Resolve version
6969
run: echo "EAS_CLI_VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV
7070
- name: Update changelog
7171
working-directory: ./scripts
72-
run: yarn --silent release-changelog $EAS_CLI_VERSION > /tmp/current-changelog
72+
run: yarn release-changelog $EAS_CLI_VERSION > /tmp/current-changelog
7373
- name: Publish release
7474
run: gh release edit v$EAS_CLI_VERSION --draft=false -F /tmp/current-changelog
7575
env:

.github/workflows/test-graphql.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@ jobs:
2020
- uses: actions/checkout@v2
2121
- name: Setup tools
2222
uses: ./.github/actions/setup-mise
23-
- run: yarn install --frozen-lockfile
23+
- run: yarn install --immutable
2424
- run: yarn verify-graphql-code
2525
working-directory: packages/eas-cli

.github/workflows/test-scripts.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,5 @@ jobs:
2424
- uses: actions/checkout@v2
2525
- name: Setup tools
2626
uses: ./.github/actions/setup-mise
27-
- run: yarn install --frozen-lockfile --check-files
27+
- run: yarn install --immutable
2828
- run: yarn typecheck

.github/workflows/test.yml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,16 @@ jobs:
2222
name: Test with Node ${{ matrix.node }}
2323
steps:
2424
- uses: actions/checkout@v2
25+
- name: Setup tools
26+
uses: ./.github/actions/setup-mise
2527
- name: Setup node
2628
uses: actions/setup-node@v2
2729
with:
2830
node-version: ${{ matrix.node }}
29-
- run: yarn install --frozen-lockfile --check-files
31+
- name: Install dependencies
32+
run: yarn install --immutable
33+
env:
34+
YARN_ENABLE_HARDENED_MODE: ${{ matrix.coverage == true && '1' || '0' }}
3035
- run: yarn typecheck
3136
- run: |
3237
git config --global user.email "tester@expo.dev"
@@ -38,27 +43,30 @@ jobs:
3843
- name: Run tests (affected)
3944
# PRs: only run tests for changed packages + dependents.
4045
if: ${{ !matrix.coverage && github.event_name == 'pull_request' }}
41-
run: yarn lerna run test --since ${{ github.event.pull_request.base.sha }} --include-dependents
46+
run: yarn run -T lerna run test --since ${{ github.event.pull_request.base.sha }} --include-dependents
4247
env:
4348
NODE_OPTIONS: --max-old-space-size=8192
4449
- name: Run tests (all)
4550
# Pushes to main: run all package tests.
4651
if: ${{ !matrix.coverage && github.event_name == 'push' }}
47-
run: yarn lerna run test
52+
run: yarn run -T lerna run test
4853
env:
4954
NODE_OPTIONS: --max-old-space-size=8192
5055
- name: Run tests (coverage)
5156
# Coverage on PRs and main; per-package reports are uploaded to Codecov.
5257
if: ${{ matrix.coverage }}
53-
run: yarn lerna run test -- -- --coverage
58+
run: yarn run -T lerna run test -- --coverage
5459
env:
5560
# Oclif seems to cause OOM errors when testing with coverage enabled.
5661
# Remove this whenever we solved those OOM errors.
5762
NODE_OPTIONS: --max-old-space-size=8192
5863
- run: yarn lint
5964
- run: yarn fmt:check
60-
- run: yarn install --frozen-lockfile --check-files
65+
- name: Install scripts dependencies
66+
run: yarn install --immutable
6167
working-directory: ./scripts
68+
env:
69+
YARN_ENABLE_HARDENED_MODE: ${{ matrix.coverage == true && '1' || '0' }}
6270
- uses: codecov/codecov-action@v1
6371
if: ${{ matrix.coverage }}
6472
with:

.github/workflows/trigger-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
git checkout main
3636
git config --global user.email "support+ci@expo.io"
3737
git config --global user.name "Expo CI"
38-
yarn install --frozen-lockfile --check-files
38+
yarn install --immutable
3939
yarn build
4040
if [[ "$INPUT_VERSION" == "" ]]; then
4141
echo "Releasing with default version"

.github/workflows/worker.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828

2929
- uses: ./.github/actions/setup-mise
3030

31-
- run: yarn install --frozen-lockfile --check-files
31+
- run: yarn install --immutable
3232

3333
- run: yarn typecheck
3434

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ dist
2020

2121
# Node
2222
node_modules
23+
**/.yarn/install-state.gz
2324
*-debug.log
2425
*-error.log
2526

.yarnrc

Lines changed: 0 additions & 1 deletion
This file was deleted.

.yarnrc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
defaultSemverRangePrefix: ''
2+
nodeLinker: node-modules

CLAUDE.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,8 @@ yarn start-allow-unused
9898
### Testing
9999

100100
```bash
101-
yarn lerna run test # Run all tests across packages
102-
yarn lerna run test -- --watch # Watch mode across packages (heavier)
101+
yarn run -T lerna run test # Run all tests across packages
102+
yarn run -T lerna run test -- --watch # Watch mode across packages (heavier)
103103
#
104104
# If you use `yarn test`, remember to pass args through two separators:
105105
# yarn test -- -- --watch
@@ -349,5 +349,5 @@ See `LICENSE` (MIT) and `LICENSE-BUSL` (BUSL-1.1) for details.
349349
## Important Notes
350350

351351
- **Node Version**: Requires Node.js (managed via Mise)
352-
- **Package Manager**: Uses Yarn 1.22.21
352+
- **Package Manager**: Uses Yarn 4.12.0
353353
- **Compilation Target**: CommonJS with Node resolution

0 commit comments

Comments
 (0)