Skip to content

Commit de6302f

Browse files
committed
ci: OPTIC-2173: Run yarn3
ci: OPTIC-2173: Run yarn3 - step 2 ci: OPTIC-2173: Run yarn3 - fix version ci: OPTIC-2173: Run yarn3 - update cache format ci: OPTIC-2173: Run yarn3 - update cache format - colors output ci: OPTIC-2173: Run yarn3 - adding debug ci: OPTIC-2173: Run yarn3 - fix ci: OPTIC-2173: Run yarn3 - fix
1 parent ade0e61 commit de6302f

File tree

7 files changed

+29920
-21171
lines changed

7 files changed

+29920
-21171
lines changed

.github/actions/setup-frontend-environment/action.yml

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ inputs:
88
required: false
99
yarn-version:
1010
description: yarn version
11-
default: "1.22"
11+
default: "3.6.4"
1212
required: false
1313
directory:
1414
description: frontend directory
@@ -23,28 +23,42 @@ runs:
2323
with:
2424
node-version: "${{ inputs.node-version }}"
2525

26-
- name: Upgrade Yarn
27-
env:
28-
VERSION: "${{ inputs.yarn-version }}"
26+
- name: Set Yarn version
2927
shell: bash
30-
run: npm install -g "yarn@${VERSION}"
28+
run: |
29+
corepack enable
30+
corepack prepare yarn@${{ inputs.yarn-version }} --activate
31+
corepack yarn --version
32+
which yarn
33+
ls -l $(which yarn)
3134
3235
- name: Get yarn cache directory path
3336
id: yarn-cache-dir-path
3437
shell: bash
35-
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
38+
run: echo "dir=${{ inputs.directory }}/.yarn/cache" >> $GITHUB_OUTPUT
3639

3740
- name: Configure yarn cache
3841
uses: actions/cache@v4
3942
with:
4043
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
4144
key: ${{ runner.os }}-node-${{ inputs.node-version }}-${{ hashFiles('**/yarn.lock') }}
4245

46+
- name: Install yarn dependencies
47+
working-directory: "${{ inputs.directory }}"
48+
shell: bash
49+
run: yarn install --immutable
50+
4351
- name: Print Yarn cache size
4452
shell: bash
4553
run: du -d 0 -h ${{ steps.yarn-cache-dir-path.outputs.dir }}
4654

47-
- name: Install yarn dependencies
48-
working-directory: "${{ inputs.directory }}"
55+
- name: Debug Yarn version
56+
shell: bash
57+
run: yarn --version
58+
59+
- name: Debug PATH and corepack
4960
shell: bash
50-
run: yarn install --frozen-lockfile
61+
run: |
62+
echo $PATH
63+
which yarn
64+
corepack --version

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ COPY web/yarn.lock .
3636
COPY web/tools tools
3737
RUN --mount=type=cache,target=${YARN_CACHE_FOLDER},sharing=locked \
3838
--mount=type=cache,target=${NX_CACHE_DIRECTORY},sharing=locked \
39-
yarn install --prefer-offline --no-progress --pure-lockfile --frozen-lockfile --ignore-engines --non-interactive --production=false
39+
yarn install --immutable --immutable-cache
4040

4141
COPY web .
4242
COPY pyproject.toml ../pyproject.toml

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ docker-collectstatic-dev:
3838

3939
# Install modules
4040
frontend-install:
41-
cd web && yarn install --frozen-lockfile;
41+
cd web && yarn install --immutable;
4242

4343
# Alias for backward compatibility
4444
frontend-setup: frontend-install

web/.yarnrc.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
enableImmutableInstalls: true
2+
3+
nodeLinker: node-modules
4+
5+
yarnPath: .yarn/releases/yarn-3.6.4.cjs

web/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Datamanager is an advanced tool specifically for data exploration within Label S
1616
## Installation Instructions
1717

1818
1 - **Dependencies Installation:**
19-
- Execute `yarn install --frozen-lockfile` to install all necessary dependencies.
19+
- Execute `yarn install --immutable` to install all necessary dependencies.
2020

2121
2 - **Environment Configuration (Optional for HMR):**
2222
- If you want to enable Hot Module Replacement (HMR), create an `.env` file in the root Label Studio directory.

web/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,6 @@
230230
"body-parser": "^1.20.3",
231231
"axios": "^1.8.2",
232232
"cookie": "0.7.0",
233-
"**/bin-check/**/cross-spawn": "6.0.6",
234233
"d3-color": "3.1.0",
235234
"debug": "4.3.1",
236235
"diff": "3.5.0",
@@ -259,5 +258,6 @@
259258
"from": "./node_modules/@martel/audio-file-decoder/decode-audio.wasm",
260259
"to": "./node_modules/@martel/audio-file-decoder/dist/decode-audio.wasm"
261260
}
262-
]
261+
],
262+
"packageManager": "[email protected]"
263263
}

0 commit comments

Comments
 (0)