From 8ae478caa1b0e16d86ec5d156aee36a32626853e Mon Sep 17 00:00:00 2001 From: Ashesh Vashi Date: Thu, 16 Jul 2026 10:58:49 +0530 Subject: [PATCH 1/3] fix: pin Yarn version from packageManager field in build scripts Replace hardcoded 'yarn set version 4' in build-functions.sh with a dynamic lookup from each workspace's package.json packageManager field. Also syncs runtime yarn version to 4.15.0 to match web/package.json. Fixes CI build failures caused by Yarn 4.x fetching a newer patch that produces different builtin compat hashes, breaking --immutable lockfile validation. --- pkg/linux/build-functions.sh | 8 ++++---- runtime/package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pkg/linux/build-functions.sh b/pkg/linux/build-functions.sh index 8197e78f3e1..a5f354c4448 100644 --- a/pkg/linux/build-functions.sh +++ b/pkg/linux/build-functions.sh @@ -209,8 +209,8 @@ _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]") + yarn set version "${YARN_VERSION}" yarn workspaces focus --production # remove the yarn cache @@ -257,8 +257,8 @@ _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]") + 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", From 1a88a77c9879e4b267b0acbbff3cdb841d2f970f Mon Sep 17 00:00:00 2001 From: Ashesh Vashi Date: Thu, 16 Jul 2026 11:03:15 +0530 Subject: [PATCH 2/3] fix: pin Yarn version in GH Actions workflows from packageManager field --- .github/workflows/check-javascript-style.yml | 2 +- .github/workflows/run-feature-tests-epas.yml | 2 +- .github/workflows/run-feature-tests-pg.yml | 2 +- .github/workflows/run-javascript-tests.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) 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: | From 07eb1deef84f86b791bb8425b4ad80e22053567d Mon Sep 17 00:00:00 2001 From: Ashesh Vashi Date: Thu, 16 Jul 2026 11:04:29 +0530 Subject: [PATCH 3/3] fix: validate YARN_VERSION before yarn set version in build script --- pkg/linux/build-functions.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkg/linux/build-functions.sh b/pkg/linux/build-functions.sh index a5f354c4448..6553fe08d60 100644 --- a/pkg/linux/build-functions.sh +++ b/pkg/linux/build-functions.sh @@ -210,6 +210,10 @@ _build_runtime() { # Install the runtime node_modules pushd "${BUNDLEDIR}/resources/app" > /dev/null || exit 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 @@ -258,6 +262,10 @@ _copy_code() { pushd "${SOURCEDIR}/web" > /dev/null || exit 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