Skip to content

ci: OPTIC-2173: Run yarn3 #7538

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 21 additions & 7 deletions .github/actions/setup-frontend-environment/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ inputs:
required: false
yarn-version:
description: yarn version
default: "1.22"
default: "3.8.7"
required: false
directory:
description: frontend directory
Expand All @@ -23,16 +23,19 @@ runs:
with:
node-version: "${{ inputs.node-version }}"

- name: Upgrade Yarn
env:
VERSION: "${{ inputs.yarn-version }}"
- name: Set Yarn version
shell: bash
run: npm install -g "yarn@${VERSION}"
run: |
corepack enable
corepack prepare yarn@${{ inputs.yarn-version }} --activate
corepack yarn --version
which yarn
ls -l $(which yarn)

- name: Get yarn cache directory path
id: yarn-cache-dir-path
shell: bash
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
run: echo "dir=${{ inputs.directory }}/.yarn/cache" >> $GITHUB_OUTPUT

- name: Configure yarn cache
uses: actions/cache@v4
Expand All @@ -47,4 +50,15 @@ runs:
- name: Install yarn dependencies
working-directory: "${{ inputs.directory }}"
shell: bash
run: yarn install --frozen-lockfile
run: yarn install --immutable

- name: Debug Yarn version
shell: bash
run: yarn --version

- name: Debug PATH and corepack
shell: bash
run: |
echo $PATH
which yarn
corepack --version
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,12 @@ docker-compose.override.yml

# Local Netlify folder
.netlify

# Yarn Berry (Yarn 2+) - non-zero-installs setup for all subdirectories
**/.pnp.*
**/.yarn/*
!**/.yarn/patches
!**/.yarn/plugins
!**/.yarn/releases
!**/.yarn/sdks
!**/.yarn/versions
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ COPY web/yarn.lock .
COPY web/tools tools
RUN --mount=type=cache,target=${YARN_CACHE_FOLDER},sharing=locked \
--mount=type=cache,target=${NX_CACHE_DIRECTORY},sharing=locked \
yarn install --prefer-offline --no-progress --pure-lockfile --frozen-lockfile --ignore-engines --non-interactive --production=false
yarn install --immutable --immutable-cache

COPY web .
COPY pyproject.toml ../pyproject.toml
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ docker-collectstatic-dev:

# Install modules
frontend-install:
cd web && yarn install --frozen-lockfile;
cd web && yarn install --immutable;

# Alias for backward compatibility
frontend-setup: frontend-install
Expand Down
875 changes: 875 additions & 0 deletions web/.yarn/releases/yarn-3.8.7.cjs

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions web/.yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
enableImmutableInstalls: true

nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-3.8.7.cjs
2 changes: 1 addition & 1 deletion web/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Datamanager is an advanced tool specifically for data exploration within Label S
## Installation Instructions

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

2 - **Environment Configuration (Optional for HMR):**
- If you want to enable Hot Module Replacement (HMR), create an `.env` file in the root Label Studio directory.
Expand Down
3 changes: 2 additions & 1 deletion web/biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"**/tsconfig*",
"libs/editor/examples/**/*.json",
"libs/editor/src/examples/**/annotations/1.json",
"apps/labelstudio-e2e/**"
"apps/labelstudio-e2e/**",
".yarn/**"
],
"maxSize": 3670016
},
Expand Down
875 changes: 875 additions & 0 deletions web/libs/editor/tests/e2e/.yarn/releases/yarn-3.8.7.cjs

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions web/libs/editor/tests/e2e/.yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
enableImmutableInstalls: true

nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-3.8.7.cjs
3 changes: 1 addition & 2 deletions web/libs/editor/tests/e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,9 @@
"cookie": "0.7.0",
"debug": "^4.3.1",
"electron": "^22.3.25",
"**/express/path-to-regexp": "0.1.12",
"follow-redirects": "^1.15.5",
"ws": ">=7.5.10",
"send": "0.19.0"
},
"dependencies": {}
"packageManager": "[email protected]"
}
Loading
Loading