Skip to content

build(deps): bump Next.js to 16.4.6, off a version next build refuses - #2489

Merged
iray-tno merged 1 commit into
mainfrom
build/next-16-4-6
Dec 1, 2026
Merged

iray-tno merged 1 commit into
mainfrom
build/next-16-4-6

Conversation

@iray-tno

@iray-tno iray-tno commented Dec 1, 2026

Copy link
Copy Markdown
Owner

What this changes

next@16 now resolves to 16.4.6 across the workspace instead of 16.4.1. The cause was the next@16: '16.4.1' override in pnpm-workspace.yaml, not the manifests' ^16.4.0 ranges, so this changes the override and raises the ranges to match:

  • pnpm-workspace.yaml: override next@16 16.4.1 → 16.4.6. The comment now says why it has to follow the newest patch.
  • examples/next-demo/package.json: next ^16.4.0 → ^16.4.6, @next/mdx ^16.3.6 → ^16.4.6 (it was locked at 16.3.7 and is now 16.4.6).
  • packages/next/package.json: devDependency next ^16.4.0 → ^16.4.6. The generator copies devDependencies from the existing manifest rather than owning them, so I changed it with pnpm add -D. node scripts/package-metadata.mjs --check reports no drift. The peer range >=15 is unchanged.

Why 16.4.1 failed locally but passed in CI: Next 16.4 defaults experimental.agentUpgrade to 'security'. next build throws SecurityFatalError for a version with a published advisory only when getAgentName() finds a coding agent in the environment (next/dist/lib/upgrade/nudge.js). With no agent present and no TTY, as on CI, it returns without checking. So next-integration passed on 16.4.1 (e.g. run 46579957844, ▲ Next.js 16.4.1 (Turbopack)), but any agent running the both-bundler check locally hit the error every time.

CI coverage: ci.yml's test job does not run @hozo/example-next. It is run by next-integration.yml, which is path-filtered to packages/next/** and examples/next-demo/** and so runs on this PR. It also runs in deploy-pages.yml's scheduled integration report on main, under || true.

What was measured

Run on Windows through mise exec --, inside an agent session (the setting that failed before):

  • pnpm --filter @hozo/compiler build:native, turbo run build --filter='@hozo/example-next^...': 13/13 tasks successful
  • pnpm --filter @hozo/example-next test: ▲ Next.js 16.4.6 (Turbopack) … Next.js build check passed (68 artifacts), ▲ Next.js 16.4.6 (webpack) … Next.js build check passed (46 artifacts), exit 0. On 16.4.1 it stopped with SecurityFatalError during the Turbopack build.
  • pnpm lint: Checked 2273 files … No fixes applied.
  • pnpm test: exit 0; turbo 24 successful, 24 total, 44 successful, 44 total, 37 successful, 37 total; no fail count above 0
  • pnpm docs:check: all current
  • Lockfile: no 16.4.1 left; next@16.4.6 and @next/mdx@16.4.6. As a side effect of re-resolution, the second next instance's react peer moved from 19.2.8 to 19.3.0, matching its react-dom@19.3.0.

No conformance number is involved.

Anything left open

  • The override will need another bump whenever Next publishes an advisory against 16.4.6, or agent-driven local builds will break again. Setting experimental.agentUpgrade: false in the example's next.config.mjs would stop the hard failure, but it would also hide real advisories, so I left it alone.
  • No changeset: only a devDependency of @hozo/next and a private example change, and the published peer range is untouched.

🤖 Generated with Claude Code

The workspace override pinned next@16 to 16.4.1. Next 16.4's agent
upgrade check makes `next build` throw SecurityFatalError for a version
with a published advisory whenever it detects a coding agent, so the
both-bundler check in examples/next-demo could not finish locally.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@iray-tno iray-tno added bug Something behaves differently from what it claims taken:claude-2 Being worked on by claude-2 labels Dec 1, 2026
@iray-tno
iray-tno merged commit 61e1822 into main Dec 1, 2026
7 of 8 checks passed
@iray-tno
iray-tno deleted the build/next-16-4-6 branch December 1, 2026 07:14
iray-tno added a commit that referenced this pull request Dec 1, 2026
…ection advisory (#2490)

## What this changes

Adds `cross-spawn@7: '>=7.1.2 <8'` to `overrides` in
`pnpm-workspace.yaml`, with a comment that says where it reaches the
tree and when to remove it, like the handlebars and js-yaml entries
above it.


[GHSA-ghv9-86vm-4v8m](GHSA-ghv9-86vm-4v8m)
(critical: command injection on Windows when spawning batch files)
covers `>=7.0.0 <7.1.0` and was fixed in releases published 2026-11-29.
The Expo demo reaches 7.0.6 through `@expo/cli` > `@expo/spawn-async`.
`main` resolves the same 7.0.6, so the Security Audit fails on every PR
that touches the lockfile. It failed on #2489 for this reason, not
because of anything in #2489. The next weekly run on `main` would also
fail.

7.1.2 has the same dependencies (`which ^2`, `path-key ^3`,
`shebang-command ^2`) and `engines` (`node >= 8`) as 7.0.x.

## What was measured

- `pnpm install --lockfile-only`: both `cross-spawn` entries in
`pnpm-lock.yaml` now resolve to 7.1.2.
- `pnpm audit --audit-level=high` exits 0, with `22 vulnerabilities
found, Severity: 7 low | 15 moderate`. Before, it reported 23
vulnerabilities with 1 critical (this one), which matched the CI run on
#2489.
- The lockfile diff also moves the `expo-router` peer hash, and for one
`expo-router` instance (the one with `react@19.2.8`, the one CI runs) it
resolves the Radix tabs' types-only peer `@types/react-dom` to 19.2.4, a
version the lockfile already has. Without the override, `pnpm install
--lockfile-only` on `main` leaves the lockfile unchanged, so the
override caused this re-resolution. No runtime package changes version.

## Anything left open

- Remove the override once Expo's `@expo/spawn-async` range moves to 7.1
or later.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something behaves differently from what it claims taken:claude-2 Being worked on by claude-2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant