mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2026-08-17 16:34:44 -05:00
fix: pin Yarn version from packageManager field in build scripts (#10156)
* 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.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user