Skip to content

fix(app): make postcss override track the direct dep ($postcss) — unblocks the /app Dependabot lane - #189

Merged
BitmapAsset merged 1 commit into
mainfrom
fix/app-postcss-override-conflict
Sep 3, 2026
Merged

fix(app): make postcss override track the direct dep ($postcss) — unblocks the /app Dependabot lane#189
BitmapAsset merged 1 commit into
mainfrom
fix/app-postcss-override-conflict

Conversation

@BitmapAsset

Copy link
Copy Markdown
Owner

What

app/package.json had overrides.postcss pinned to the literal ^8.5.18, identical to devDependencies.postcss. npm rejects any bump of a direct dependency once its override spec no longer matches, so every Dependabot /app run failed:

npm error code EOVERRIDE
npm error Override for postcss@8.5.26 conflicts with direct dependency

That kills the whole npm_and_yarn in /app job — not just the postcss update. Latest occurrence: run 33746071743 (2026-09-03 10:48Z, failure).

Why it existed

Introduced in 1a9ea0d (2026-07-27, "security(deps): purge stale RuneBolt copies and patch dependency CVEs"), which bumped the direct dep ^8.5.0^8.5.18 and added the matching override to force transitive copies up to the same floor. Correct intent, self-blocking implementation.

How

Switch to npm's dependency-reference syntax "postcss": "$postcss". The override now resolves to whatever the direct dev-dependency spec is, so Dependabot can bump the direct dep and the override follows automatically — no recurring maintenance, no re-break.

The override is kept, not deleted. Removing it outright lets a transitive copy resolve down to postcss@8.4.31 (via next), which npm audit flags high. $postcss keeps a single hoisted copy.

How verified — node v20.20.2 / npm 10.8.2 (CI's toolchain)

Check Result
npm ls postcss --all exactly one copy: postcss@8.5.23 (≥ 8.4.31 CVE floor)
Dependabot's own command replayed
npm install postcss@8.5.26 --force --ignore-scripts --package-lock-only
EOVERRIDE on main; succeeds here → devDeps ^8.5.26, override follows
npx prisma generate + npx tsc --noEmit clean
npm run lint 0 errors (167 pre-existing warnings)
npm run build success
npm audit postcss advisories gone; 3 remaining high (deepmerge-ts@prisma/configprisma) are byte-identical to main and out of scope — fixing them needs a breaking prisma downgrade

Other overrides audited

axios, brace-expansion, sharp, esbuild, valibot are all transitive-only pins with no matching entry in dependencies/devDependencies, so none can trigger EOVERRIDE. Left as-is.

Scope: app/package.json + app/package-lock.json only.

app/package.json pinned `overrides.postcss` to the literal `^8.5.18`
while `devDependencies.postcss` was the same literal. npm refuses any
bump of a direct dependency whose override spec no longer matches it,
so every Dependabot /app run died with:

    npm error code EOVERRIDE
    npm error Override for postcss@8.5.26 conflicts with direct dependency

That failed the whole `npm_and_yarn in /app` job, not just postcss —
the entire /app update lane has been blocked since the override landed
in 1a9ea0d (2026-07-27 CVE patch pass).

Fix: use npm's dependency-reference syntax `"postcss": "$postcss"`, so
the override always resolves to whatever the direct dev-dependency spec
is. Dependabot can now bump the direct dep and the override follows
automatically, with no further maintenance.

The override is kept, not removed: deleting it lets a transitive copy
resolve down to postcss@8.4.31 (pulled via next), which npm audit flags
high. With `$postcss` every resolved copy is a single postcss@8.5.23.

Verified under CI's toolchain (node v20.20.2 / npm 10.8.2):
- npm ls postcss --all -> exactly one copy, postcss@8.5.23
- replayed Dependabot's own command,
  `npm install postcss@8.5.26 --force --ignore-scripts --package-lock-only`:
  EOVERRIDE on main, succeeds here (devDeps -> ^8.5.26, override follows)
- npx tsc --noEmit: clean
- npm run lint: 0 errors
- npm run build: success
- npm audit: postcss advisories gone; the 3 remaining high findings
  (deepmerge-ts -> @prisma/config -> prisma) are unchanged from main

The other five overrides (axios, brace-expansion, sharp, esbuild,
valibot) are transitive-only pins with no matching direct dependency,
so they cannot hit EOVERRIDE and are left as-is.
@vercel

vercel Bot commented Sep 3, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
app Ready Ready Preview Sep 3, 2026 11:48am UTC
workspace Ready Ready Preview Sep 3, 2026 11:48am UTC

Request Review

@BitmapAsset
BitmapAsset merged commit c69d490 into main Sep 3, 2026
12 of 13 checks passed
@BitmapAsset
BitmapAsset deleted the fix/app-postcss-override-conflict branch September 3, 2026 11:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant