From f6a0b1fb5a47af6304e42d6126177646e2c71b1b Mon Sep 17 00:00:00 2001 From: Lukas Stracke Date: Mon, 17 Jul 2023 13:05:21 +0200 Subject: [PATCH 1/2] test(nextjs): Pin nextjs13 integration tests to 13.4.9 --- packages/nextjs/test/integration/next-env.d.ts | 1 + packages/nextjs/test/run-integration-tests.sh | 12 ++++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/packages/nextjs/test/integration/next-env.d.ts b/packages/nextjs/test/integration/next-env.d.ts index 4f11a03dc6cc..fd36f9494e2c 100644 --- a/packages/nextjs/test/integration/next-env.d.ts +++ b/packages/nextjs/test/integration/next-env.d.ts @@ -1,5 +1,6 @@ /// /// +/// // NOTE: This file should not be edited // see https://nextjs.org/docs/basic-features/typescript for more information. 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 From df9bdf90915c21bf233eaeff1f8f2c1baf324bf2 Mon Sep 17 00:00:00 2001 From: Lukas Stracke Date: Mon, 17 Jul 2023 13:24:09 +0200 Subject: [PATCH 2/2] Update packages/nextjs/test/integration/next-env.d.ts --- packages/nextjs/test/integration/next-env.d.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/nextjs/test/integration/next-env.d.ts b/packages/nextjs/test/integration/next-env.d.ts index fd36f9494e2c..4f11a03dc6cc 100644 --- a/packages/nextjs/test/integration/next-env.d.ts +++ b/packages/nextjs/test/integration/next-env.d.ts @@ -1,6 +1,5 @@ /// /// -/// // NOTE: This file should not be edited // see https://nextjs.org/docs/basic-features/typescript for more information.