Repository navigation
build(deps): bump Next.js to 16.4.6, off a version next build refuses - #2489
Merged
Merged
Conversation
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
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)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this changes
next@16now resolves to 16.4.6 across the workspace instead of 16.4.1. The cause was thenext@16: '16.4.1'override inpnpm-workspace.yaml, not the manifests'^16.4.0ranges, so this changes the override and raises the ranges to match:pnpm-workspace.yaml: overridenext@1616.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: devDependencynext^16.4.0→^16.4.6. The generator copiesdevDependenciesfrom the existing manifest rather than owning them, so I changed it withpnpm add -D.node scripts/package-metadata.mjs --checkreports no drift. The peer range>=15is unchanged.Why 16.4.1 failed locally but passed in CI: Next 16.4 defaults
experimental.agentUpgradeto'security'.next buildthrowsSecurityFatalErrorfor a version with a published advisory only whengetAgentName()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. Sonext-integrationpassed 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'stestjob does not run@hozo/example-next. It is run bynext-integration.yml, which is path-filtered topackages/next/**andexamples/next-demo/**and so runs on this PR. It also runs indeploy-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 successfulpnpm --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 withSecurityFatalErrorduring the Turbopack build.pnpm lint:Checked 2273 files … No fixes applied.pnpm test: exit 0; turbo24 successful, 24 total,44 successful, 44 total,37 successful, 37 total; nofailcount above 0pnpm docs:check: all current16.4.1left;next@16.4.6and@next/mdx@16.4.6. As a side effect of re-resolution, the secondnextinstance'sreactpeer moved from 19.2.8 to 19.3.0, matching itsreact-dom@19.3.0.No conformance number is involved.
Anything left open
experimental.agentUpgrade: falsein the example'snext.config.mjswould stop the hard failure, but it would also hide real advisories, so I left it alone.@hozo/nextand a private example change, and the published peer range is untouched.🤖 Generated with Claude Code