-
Notifications
You must be signed in to change notification settings - Fork 25
Add support for Next.js 16 #288
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
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.
Pull Request Overview
This PR adds support for Next.js version 16 to the Apollo Server integration library. The changes consolidate API resolver imports across Next.js versions 13-16, update package dependencies, and streamline CI/CD workflows.
Key changes:
- Unified API resolver imports for Next.js versions 13 through 16 to use the same import path
- Added Next.js 16 as a peer dependency and included it in the testing matrix
- Simplified linting and formatting commands to check entire codebase instead of just changed files
Reviewed Changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/tests/integration.test.ts | Consolidated API resolver imports for Next.js 13-16 into a single case statement and removed deprecated dev parameter |
| package.json | Added next16 alias, updated peer dependencies to include ^16.0.0, added test:next16 script, and simplified linting commands |
| renovate.json5 | Added version constraint configuration for next16 package |
| .github/workflows/check.yml | Removed fetch-depth parameter from checkout action |
| .changeset/modern-wombats-rhyme.md | Added changeset entry documenting Next.js 16 support |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| }, | ||
| "check:eslint": { | ||
| "command": "eslint --ignore-path .prettierignore $(git diff --diff-filter d --name-only HEAD~1 | grep -E '\\.(js|ts)$' | xargs)" | ||
| "command": "eslint --ignore-path .prettierignore ." |
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.
Since eslint and prettier finish super quick I changed this so we check every file instead of just the changed files.
| { | ||
| matchPackageNames: ['next16'], | ||
| allowedVersions: '16.x', | ||
| }, |
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.
We want next16 to stay on v16 so we have to pin it.
| ({ apiResolver } = await import('next15/dist/server/api-utils/node/api-resolver')); | ||
| break; | ||
| case '16': | ||
| ({ apiResolver } = await import('next16/dist/server/api-utils/node/api-resolver')); |
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.
Luckily there doesn't seem to be any internal changes.
Fixes #287