-
Notifications
You must be signed in to change notification settings - Fork 91
ci: adjustments after next@16 stable release #3195
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| - name: Resolve Next.js version | ||
| id: resolve-next-version | ||
| shell: bash | ||
| run: | | ||
| RESOLVED_VERSION=$(npm view next@${{ matrix.version }} version) | ||
| echo "version=$RESOLVED_VERSION" >> $GITHUB_OUTPUT | ||
| echo "Resolved Next.js version for 'next@${{ matrix.version }}' is '$RESOLVED_VERSION'" | ||
| - name: Decide Node Version | ||
| id: decide-node-version | ||
| shell: bash | ||
| run: | | ||
| NODE_VERSION=18.x | ||
| if [ "${{ matrix.version}}" = "canary" ]; then | ||
| # this is not ideal, because we set node@20 just when explicitly using canary tag as target | ||
| # but next@canary are still on 15 major, so we can't yet use major version of resolved next version | ||
| # as condition | ||
| if [[ "${{ steps.resolve-next-version.outputs.version }}" == "16."* ]]; then | ||
| # Next@16 requires Node.js 20+ | ||
| NODE_VERSION=20.x | ||
| fi | ||
| echo "version=$NODE_VERSION" >> $GITHUB_OUTPUT | ||
| echo "Node version for 'next@${{ matrix.version }}' is '$NODE_VERSION'" | ||
| - name: 'Install Node' | ||
| echo "Node version for 'next@${{ steps.resolve-next-version.outputs.version }}' is '$NODE_VERSION'" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is pretty much the change repeated in couple of places:
- move
Resolve Next.js versionstep to be beforeDecide Node Version - if resolved next version starts with
16.- use node@20, otherwise - use node@18 (and for next.js repo tests also use same logic to decide if default bundler is webpack or turbopack). We were checking if we testnext@canarybefore because minimum node version bump landed in v15 canaries (but only was released in v16 stable)
everything else in github action workflows is just prettier auto-formatting which makes the diff messy
📊 Package size report No changes
Unchanged files
🤖 This report was automatically generated by pkg-size-action |
|
|
||
| export const config = { | ||
| runtime: 'nodejs', | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this cause build failures now:
[proxy-i18n-skip-normalize] > Build error occurred
[proxy-i18n-skip-normalize] Error: Route segment config is not allowed in Proxy file at "./proxy.ts". Proxy always runs on Node.js runtime. Learn more: https://nextjs.org/docs/messages/middleware-to-proxy
Note that this test fixture was added yesterday specifically for next@16 while there were lot of Next.js PRs still in flight and I wasn't sure what the handling will be - see #3190 (review)
| return ( | ||
| (isNextCanary() && nextVersionSatisfies('>=15.5.1-canary.4')) || | ||
| nextVersionSatisfies('>=16.0.0') | ||
| ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another change that graduated from canary-only to be enabled in stable releases (this is used in our tests only to make correct assertions, it doesn't change actual support for it)
Description
All of these are adjustments to tests and test setup:
canarywhen deciding to use node@20 (which is now minimun node version needed for next@16), but now with next@16 stable release this no longer make sense to do, so now we finally check major of resolved next version to decide node version