prisma/ecosystem-tests

check-for-update doesn't bump `resolutions` in package.json

Jolg42 opened this issue · 1 comments

We implemented something that looks like we handle resolutions and update prisma dependencies versions here

hasResolutions="$(node -e "$pkg;console.log(!!pkg.resolutions)")"
if [ "$hasResolutions" = "true" ]; then
echo "note: project uses `resolutions`"
vCLI="$(node -e "$pkg;console.log(pkg.resolutions['prisma'])")"
if [ "$vCLI" != "" ]; then
if [ "$v" != "$vCLI" ]; then
if [ "$branch" != "dev" ]; then
run_sync "$dir" "$branch"
fi
echo "$item: prisma expected $v, actual $vCLI"
json -I -f package.json -e "this.resolutions['prisma']='$v'"
fi
vPrismaClient="$(node -e "$pkg;console.log(pkg.resolutions['@prisma/client'])")"
if [ "$v" != "$vPrismaClient" ]; then
if [ "$branch" != "dev" ]; then
run_sync "$dir" "$branch"
fi
echo "$item: @prisma/client expected $v, actual $vPrismaClient"
json -I -f package.json -e "this.resolutions['@prisma/client']='$v'"
fi
fi

Though resolutions for the [vercel-with-redwood](https://github.com/prisma/ecosystem-tests/tree/dev/platforms-serverless-vercel/vercel-with-redwood) directory were not updated since a long time and I did it manually in:
#3004

We should check if there is a bug in check-for-update.sh logic.