Skip to content

deps(dashboard): pin sharp forward without taking Next 16 with it - #86

Merged
blitzcrieg1 merged 2 commits into
masterfrom
deps/sharp-override
Aug 22, 2026
Merged

deps(dashboard): pin sharp forward without taking Next 16 with it#86
blitzcrieg1 merged 2 commits into
masterfrom
deps/sharp-override

Conversation

@blitzcrieg1

Copy link
Copy Markdown
Owner

Alternative to #85. Read this before merging that one.

#85 is not what its title says

It is titled "bump sharp and next". The diff is:

-"next": "15.5.21",
+"next": "16.3.2",

That is a major framework upgrade, hours after the Next 15 migration, arriving through a transitive dependency. Dependabot's own body says the two "need to be updated together".

It already fails CI. next lint was removed in Next 16, so the lint step reads lint as a directory:

Invalid project directory provided, no such directory: .../apps/dashboard/lint

Merging it means also migrating next lint → ESLint CLI, and probably eslint@8eslint@9 with a matching eslint-config-next@16.

The advisory is real and unreachable here

The sharp alert is genuine: high severity, inherited libvips CVEs. But sharp is an optional transitive of next, and its only caller is Next's image optimizer, which:

  • next.config.js disables via images: { unoptimized: true }
  • cannot run in a static export at all (output: "export" requires it disabled)

next/image is used once, in mission-control.tsx, and resolves to a plain <img>.

So the vulnerable code is installed and never invoked.

What this PR does instead

An npm overrides entry forces sharp to 0.35.3 while next stays at 15.5.21:

next@15.5.21
`-- sharp@0.35.3

The alert closes, the framework does not move, and Next 16 becomes a decision taken deliberately rather than one arrived at through a dependency this build never calls.

The override is a pin, not a fix, so package.json carries an overridesNote with the reason and the removal condition. npm ignores unknown top-level keys; verified install still resolves correctly with it present.

Verified

  • sharp resolves 0.35.3, next stays 15.5.21
  • tsc --noEmit clean
  • lint clean (still works, because this is not Next 16)
  • 99 tests pass
  • Static export builds both routes

Recommendation

Merge this, close #85, and schedule Next 16 as its own piece of work when it is worth doing. If you would rather do Next 16 now, close this instead and I will do the lint migration properly, but it should be a choice rather than a side effect.

🤖 Generated with Claude Code

blitzcrieg1 and others added 2 commits August 22, 2026 21:21
Dependabot #85 is titled as a sharp bump and is actually a Next 16 major. Its
own body says the two "need to be updated together", and the diff moves next
from 15.5.21 to 16.3.2. It fails CI already: `next lint` was removed in 16, so
the lint step reads "lint" as a directory and exits 1.

The advisory it fixes is real (high, libvips CVE-2026-33327 and friends) and
unreachable here. sharp is an optional transitive of next and its only caller is
the image optimizer, which `next.config.js` disables with
`images: { unoptimized: true }` and which cannot run in a static export at all.
`next/image` is used once, in mission-control.tsx, and resolves to a plain img.

So an npm override forces sharp to 0.35.3 while next stays at 15.5.21. The
alert closes, the framework does not move, and Next 16 becomes a decision taken
deliberately rather than one arrived at through a transitive dependency of a
package this build never invokes.

The override is a pin rather than a fix and should be removed when Next ships a
15.x that depends on sharp 0.35 itself, or when the Next 16 migration happens on
purpose. Noted in package.json rather than left for somebody to find.

Verified: sharp resolves 0.35.3, next stays 15.5.21, typecheck clean, lint
clean, 99 tests pass, static export builds both routes.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The previous commit message said the pin was noted in package.json. It was not,
because JSON has no comments and I did not stop to solve that before claiming
it. An overridesNote key does the job: npm ignores unknown top-level fields, and
the next person to read the file finds the reason and the removal condition
without going through git log.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@blitzcrieg1
blitzcrieg1 merged commit e3f2a82 into master Aug 22, 2026
9 checks passed
@blitzcrieg1
blitzcrieg1 deleted the deps/sharp-override branch August 22, 2026 20:13
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 22, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant