@@ -30,7 +30,7 @@ echo "Running integration tests on Node $NODE_VERSION"
3030# make a backup of our config file so we can restore it when we're done
3131mv next.config.js next.config.js.bak
3232
33- for NEXTJS_VERSION in 10 11 12; do
33+ for NEXTJS_VERSION in 10 11 12 13 ; do
3434
3535 # export this to the env so that we can behave differently depending on which version of next we're testing, without
3636 # having to pass this value from function to function to function to the one spot, deep in some callstack, where we
@@ -44,8 +44,14 @@ for NEXTJS_VERSION in 10 11 12; do
4444 fi
4545
4646 # Next.js v11 requires at least Node v12
47- if [ " $NODE_MAJOR " -lt " 12" ] && [ " $NEXTJS_VERSION " -eq " 11" ]; then
48- echo " [nextjs$NEXTJS_VERSION ] Not compatible with Node $NODE_MAJOR "
47+ if [ " $NODE_MAJOR " -lt " 12" ] && [ " $NEXTJS_VERSION " -ge " 11" ]; then
48+ echo " [nextjs@$NEXTJS_VERSION ] Not compatible with Node $NODE_MAJOR "
49+ exit 0
50+ fi
51+
52+ # Next.js v13 requires at least Node v14
53+ if [ " $NODE_MAJOR " -lt " 14" ] && [ " $NEXTJS_VERSION " -ge " 13" ]; then
54+ echo " [nextjs@$NEXTJS_VERSION ] Not compatible with Node $NODE_MAJOR "
4955 exit 0
5056 fi
5157
@@ -61,6 +67,11 @@ for NEXTJS_VERSION in 10 11 12; do
6167 else
6268 sed -i /" next.*latest" /s/latest/" ${NEXTJS_VERSION} .x" / package.json
6369 fi
70+
71+ # Next.js v13 requires React 18.2.0
72+ if [ " $NEXTJS_VERSION " -eq " 13" ]; then
73+ 74+ fi
6475 # We have to use `--ignore-engines` because sucrase claims to need Node 12, even though tests pass just fine on Node
6576 # 10
6677 yarn --no-lockfile --ignore-engines --silent > /dev/null 2>&1
@@ -84,11 +95,11 @@ for NEXTJS_VERSION in 10 11 12; do
8495 # https://github.com/webpack/webpack/issues/14532#issuecomment-947513562
8596 # Context: https://github.com/vercel/next.js/issues/30078#issuecomment-947338268
8697 if [ " $NODE_MAJOR " -gt " 17" ] && [ " $WEBPACK_VERSION " -eq " 4" ]; then
87- echo " [nextjs$NEXTJS_VERSION | webpack@$WEBPACK_VERSION ] Node $NODE_MAJOR not compatible with Webpack $WEBPACK_VERSION "
98+ echo " [nextjs@ $NEXTJS_VERSION | webpack@$WEBPACK_VERSION ] Node $NODE_MAJOR not compatible with Webpack $WEBPACK_VERSION "
8899 exit 0
89100 fi
90101 if [ " $NODE_MAJOR " -gt " 17" ] && [ " $NEXTJS_VERSION " -eq " 10" ]; then
91- echo " [nextjs$NEXTJS_VERSION | webpack@$WEBPACK_VERSION ] Node $NODE_MAJOR not compatible with Webpack $WEBPACK_VERSION "
102+ echo " [nextjs@ $NEXTJS_VERSION | webpack@$WEBPACK_VERSION ] Node $NODE_MAJOR not compatible with Webpack $WEBPACK_VERSION "
92103 exit 0
93104 fi
94105
0 commit comments