diff --git a/.github/workflows/check-javascript-style.yml b/.github/workflows/check-javascript-style.yml index 80626dbc24b..3d2845b9e6c 100644 --- a/.github/workflows/check-javascript-style.yml +++ b/.github/workflows/check-javascript-style.yml @@ -22,7 +22,7 @@ jobs: - name: Upgrade yarn run: | yarn set version berry - yarn set version 4 + yarn set version $(node -p "require('./web/package.json').packageManager.split('@')[1]") - name: Install Node modules run: | diff --git a/.github/workflows/run-feature-tests-epas.yml b/.github/workflows/run-feature-tests-epas.yml index 58eb7034a7d..058612c1955 100644 --- a/.github/workflows/run-feature-tests-epas.yml +++ b/.github/workflows/run-feature-tests-epas.yml @@ -144,7 +144,7 @@ jobs: - name: Upgrade yarn run: | yarn set version berry - yarn set version 4 + yarn set version $(node -p "require('./web/package.json').packageManager.split('@')[1]") - name: Build the JS bundle run: | diff --git a/.github/workflows/run-feature-tests-pg.yml b/.github/workflows/run-feature-tests-pg.yml index fc6e3d22b29..922d68ac3e8 100644 --- a/.github/workflows/run-feature-tests-pg.yml +++ b/.github/workflows/run-feature-tests-pg.yml @@ -154,7 +154,7 @@ jobs: - name: Upgrade yarn run: | yarn set version berry - yarn set version 4 + yarn set version $(node -p "require('./web/package.json').packageManager.split('@')[1]") - name: Build the JS bundle run: | diff --git a/.github/workflows/run-javascript-tests.yml b/.github/workflows/run-javascript-tests.yml index bcd82ff8d4b..d38c146c126 100644 --- a/.github/workflows/run-javascript-tests.yml +++ b/.github/workflows/run-javascript-tests.yml @@ -31,7 +31,7 @@ jobs: - name: Upgrade yarn run: | yarn set version berry - yarn set version 4 + yarn set version $(node -p "require('./web/package.json').packageManager.split('@')[1]") - name: Install Node modules run: | diff --git a/pkg/linux/build-functions.sh b/pkg/linux/build-functions.sh index 8197e78f3e1..6553fe08d60 100644 --- a/pkg/linux/build-functions.sh +++ b/pkg/linux/build-functions.sh @@ -209,8 +209,12 @@ _build_runtime() { # Install the runtime node_modules pushd "${BUNDLEDIR}/resources/app" > /dev/null || exit - yarn set version berry - yarn set version 4 + YARN_VERSION=$(node -p "require('./package.json').packageManager.split('@')[1]") + if [ -z "${YARN_VERSION}" ]; then + echo "ERROR: Could not determine Yarn version from package.json packageManager field." + exit 1 + fi + yarn set version "${YARN_VERSION}" yarn workspaces focus --production # remove the yarn cache @@ -257,8 +261,12 @@ _copy_code() { find "${SERVERROOT}/usr/${APP_NAME}/venv/" -name "_tkinter*" -print0 | xargs -0 rm -rf pushd "${SOURCEDIR}/web" > /dev/null || exit - yarn set version berry - yarn set version 4 + YARN_VERSION=$(node -p "require('./package.json').packageManager.split('@')[1]") + if [ -z "${YARN_VERSION}" ]; then + echo "ERROR: Could not determine Yarn version from package.json packageManager field." + exit 1 + fi + yarn set version "${YARN_VERSION}" yarn install yarn run bundle popd > /dev/null || exit diff --git a/runtime/package.json b/runtime/package.json index f32f7cd6a25..7e0d52fb05e 100644 --- a/runtime/package.json +++ b/runtime/package.json @@ -10,7 +10,7 @@ "start": "electron .", "linter": "yarn run eslint -c .eslintrc.js ." }, - "packageManager": "yarn@4.9.2", + "packageManager": "yarn@4.15.0", "devDependencies": { "@eslint/js": "^10.0.1", "electron": "^42.3.3",