chore: bump next to 16.2.1 and fix deferred build#1496
Conversation
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
🦋 Changeset detectedLatest commit: 58dccb7 The changes in this PR will be included in the next version bump. This PR includes changesets to release 16 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
📊 Benchmark Results
workflow with no steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Express | Nitro | Next.js (Turbopack) workflow with 1 step💻 Local Development
▲ Production (Vercel)
🔍 Observability: Nitro | Express | Next.js (Turbopack) workflow with 10 sequential steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Express | Nitro | Next.js (Turbopack) workflow with 25 sequential steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Express | Next.js (Turbopack) | Nitro workflow with 50 sequential steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Next.js (Turbopack) | Express | Nitro Promise.all with 10 concurrent steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Next.js (Turbopack) | Nitro | Express Promise.all with 25 concurrent steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Next.js (Turbopack) | Nitro | Express Promise.all with 50 concurrent steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Express | Nitro | Next.js (Turbopack) Promise.race with 10 concurrent steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Nitro | Next.js (Turbopack) | Express Promise.race with 25 concurrent steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Nitro | Next.js (Turbopack) | Express Promise.race with 50 concurrent steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Nitro | Next.js (Turbopack) | Express workflow with 10 sequential data payload steps (10KB)💻 Local Development
▲ Production (Vercel)
🔍 Observability: Express | Nitro | Next.js (Turbopack) workflow with 25 sequential data payload steps (10KB)💻 Local Development
▲ Production (Vercel)
🔍 Observability: Express | Next.js (Turbopack) | Nitro workflow with 50 sequential data payload steps (10KB)💻 Local Development
▲ Production (Vercel)
🔍 Observability: Express | Next.js (Turbopack) | Nitro workflow with 10 concurrent data payload steps (10KB)💻 Local Development
▲ Production (Vercel)
🔍 Observability: Nitro | Next.js (Turbopack) | Express workflow with 25 concurrent data payload steps (10KB)💻 Local Development
▲ Production (Vercel)
🔍 Observability: Express | Nitro | Next.js (Turbopack) workflow with 50 concurrent data payload steps (10KB)💻 Local Development
▲ Production (Vercel)
🔍 Observability: Express | Next.js (Turbopack) | Nitro Stream Benchmarks (includes TTFB metrics)workflow with stream💻 Local Development
▲ Production (Vercel)
🔍 Observability: Express | Next.js (Turbopack) | Nitro stream pipeline with 5 transform steps (1MB)💻 Local Development
▲ Production (Vercel)
🔍 Observability: Express | Nitro | Next.js (Turbopack) 10 parallel streams (1MB each)💻 Local Development
▲ Production (Vercel)
🔍 Observability: Nitro | Express | Next.js (Turbopack) fan-out fan-in 10 streams (1MB each)💻 Local Development
▲ Production (Vercel)
🔍 Observability: Nitro | Express | Next.js (Turbopack) SummaryFastest Framework by WorldWinner determined by most benchmark wins
Fastest World by FrameworkWinner determined by most benchmark wins
Column Definitions
Worlds:
|
🧪 E2E Test Results❌ Some tests failed Summary
❌ Failed Tests🌍 Community Worlds (55 failed)mongodb (2 failed):
redis (2 failed):
turso (51 failed):
Details by Category✅ ▲ Vercel Production
✅ 💻 Local Development
✅ 📦 Local Production
✅ 🐘 Local Postgres
✅ 🪟 Windows
❌ 🌍 Community Worlds
✅ 📋 Other
|
# Conflicts: # pnpm-lock.yaml
There was a problem hiding this comment.
Pull request overview
Updates the repo’s Next.js version to 16.2.1 and adjusts the @workflow/next deferred builder behavior to ensure step sources are transformed correctly under newer Next.js builds.
Changes:
- Bump
nextto 16.2.1 across multiple apps/packages and refreshpnpm-lock.yaml. - Change deferred step route generation to copy all transitive step sources (including SDK sources) so they’re transformed in “step mode”.
- Update dev e2e test gating for deferred step-copy behavior.
Reviewed changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| workbench/swc-playground/package.json | Bumps next to 16.2.1 for the SWC playground app. |
| workbench/nextjs-webpack/package.json | Bumps next to 16.2.1 for the webpack workbench. |
| workbench/nextjs-turbopack/package.json | Bumps next to 16.2.1 for the turbopack workbench. |
| pnpm-lock.yaml | Lockfile refresh reflecting Next 16.2.1 and related dependency graph changes. |
| packages/next/src/builder-deferred.ts | Changes deferred step build to copy all discovered step sources so Next transforms them. |
| packages/next/package.json | Bumps next devDependency to 16.2.1 for @workflow/next. |
| packages/core/e2e/dev.test.ts | Updates detection/gating for deferred step-copy-related dev tests. |
| docs/package.json | Bumps next to 16.2.1 for the docs site. |
| .changeset/deep-shirts-hammer.md | Adds a patch changeset for @workflow/next related to the update. |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| c12@3.3.3(magicast@0.5.2): | ||
| dependencies: | ||
| chokidar: 5.0.0 | ||
| confbox: 0.2.4 | ||
| confbox: 0.2.2 | ||
| defu: 6.1.4 |
There was a problem hiding this comment.
The lockfile update includes additional dependency version shifts beyond the Next.js bump (e.g. confbox resolution changes here). If these are unintended, try regenerating the lockfile with the repo’s standard pnpm version/settings to keep the diff minimal; otherwise, please mention in the PR description that lockfile churn is expected.
| "lucide-react": "^0.454.0", | ||
| "monaco-editor": "latest", | ||
| "monaco-vim": "0.4.4", | ||
| "next": "16.1.6", | ||
| "next": "16.2.1", | ||
| "next-themes": "latest", |
There was a problem hiding this comment.
PR description says the Next.js bump is limited to packages/next and the two Next.js workbenches, but this PR also updates next in workbench/swc-playground. Please update the PR description (and/or title) to reflect all packages being modified so reviewers can assess impact correctly.
| "motion": "^12.23.25", | ||
| "nanoid": "5.1.6", | ||
| "next": "16.1.6", | ||
| "next": "16.2.1", | ||
| "next-themes": "^0.4.6", | ||
| "next-validate-link": "^1.6.3", |
There was a problem hiding this comment.
PR description says the Next.js bump is limited to packages/next and the two Next.js workbenches, but this PR also updates next in docs. Please update the PR description (and/or title) to reflect all packages being modified so reviewers can assess impact correctly.
| // Copy all discovered step sources so they are transformed in step mode. | ||
| // Importing raw node_modules files directly can bypass loader transforms, | ||
| // which prevents step registrars from being emitted. | ||
| const copiedStepSourceFiles = stepFiles; | ||
| const copiedDiscoveredStepFiles = await this.copyDiscoveredStepFiles({ |
There was a problem hiding this comment.
This PR is titled/described as a Next.js version bump, but this change also alters deferred step handling (now copying all transitive step sources, including SDK sources). Please call out this behavioral change explicitly in the PR description/release notes, since it can affect build output size and watch/build performance.
| const supportsDeferredStepCopies = generatedStep.includes( | ||
| path.join('.well-known', 'workflow', 'v1', 'step', 'route.js') | ||
| ); |
There was a problem hiding this comment.
finalConfig.canary is no longer used to gate deferred step copy tests, but the DevTestConfig type still includes canary?: boolean. Either remove this config flag (to avoid implying it has an effect) or keep using it here if callers still rely on it.
| const supportsDeferredStepCopies = generatedStep.includes( | |
| path.join('.well-known', 'workflow', 'v1', 'step', 'route.js') | |
| ); | |
| const supportsDeferredStepCopies = | |
| typeof finalConfig.canary === 'boolean' | |
| ? finalConfig.canary | |
| : generatedStep.includes( | |
| path.join('.well-known', 'workflow', 'v1', 'step', 'route.js') | |
| ); |
| "@workflow/next": patch | ||
| --- | ||
|
|
||
| Update NextJS to 16.2 |
There was a problem hiding this comment.
This changeset note says "Update NextJS to 16.2" but the actual bump in this PR is to 16.2.1. Please make the note match the exact version to avoid ambiguity in release notes.
| Update NextJS to 16.2 | |
| Update NextJS to 16.2.1 |
Summary
nextfrom 16.1.6 to 16.2.1 inpackages/next(devDependencies),workbench/nextjs-turbopack(dependencies), andworkbench/nextjs-webpack(dependencies)Test plan
🤖 Generated with Claude Code