From 69a4fa325a77ebcbc6e2e77955637a4b0a08e16a Mon Sep 17 00:00:00 2001 From: Lukas Stracke Date: Mon, 17 Jul 2023 13:38:14 +0200 Subject: [PATCH] test(nextjs): Pin Nextjs 13 integration tests to `next@13.4.9` (#8551) As long as our SDK and `next@13.4.10` aren't compatible, we need to hard-pin our NextJS integration tests to `13.4.9` to unblock our CI. We need to revert this change once we figured out 13.4.10! (Set a reminder for myself) --- packages/nextjs/test/run-integration-tests.sh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/packages/nextjs/test/run-integration-tests.sh b/packages/nextjs/test/run-integration-tests.sh index 0eff88612e95..a5d42e527f07 100755 --- a/packages/nextjs/test/run-integration-tests.sh +++ b/packages/nextjs/test/run-integration-tests.sh @@ -67,13 +67,21 @@ for NEXTJS_VERSION in 10 11 12 13; do rm -rf node_modules .next .env.local 2>/dev/null || true echo "[nextjs@$NEXTJS_VERSION] Installing dependencies..." + # set the desired version of next long enough to run yarn, and then restore the old version (doing the restoration now # rather than during overall cleanup lets us look for "latest" in every loop) + + if [ "$NEXTJS_VERSION" -eq "13" ]; then + SPECIFIC_NEXT_VERSION="13.4.9" + else + SPECIFIC_NEXT_VERSION="$NEXTJS_VERSION.x" + fi + cp package.json package.json.bak if [[ $(uname) == "Darwin" ]]; then - sed -i "" /"next.*latest"/s/latest/"${NEXTJS_VERSION}.x"/ package.json + sed -i "" /"next.*latest"/s/latest/"${SPECIFIC_NEXT_VERSION}"/ package.json else - sed -i /"next.*latest"/s/latest/"${NEXTJS_VERSION}.x"/ package.json + sed -i /"next.*latest"/s/latest/"${SPECIFIC_NEXT_VERSION}"/ package.json fi # Next.js v13 requires React 18.2.0