Skip to content

deps: Override transitive packages flagged by Dependabot - #2110

Closed
marcleblanc2 wants to merge 2 commits into
mainfrom
marc/deps/transitive-overrides
Closed

marcleblanc2 wants to merge 2 commits into
mainfrom
marc/deps/transitive-overrides

Conversation

@marcleblanc2

Copy link
Copy Markdown
Contributor

What

Adds pnpm.overrides for eight transitive packages and esbuild as a devDependency.

Why

Closes 12 of the 24 open Dependabot alerts. None are direct dependencies; they come in under contentlayer2, mermaid, eslint, and postcss.

Alert Severity Package Was → now Pulled in by
#314 high source-map-js 1.2.1 → 1.2.2 postcss
#306, #305 high, low @grpc/grpc-js 1.14.4 → 1.14.6 contentlayer2 (OTel exporter)
#282, #281 high toml 3.0.0 → 4.3.0 contentlayer2 → remark-mdx-frontmatter
#303, #302 medium brace-expansion 1.1.18 → 1.1.21, 5.0.9 → 5.0.12 eslint, glob
#194 medium uuid 9.0.1 → 11.1.1 contentlayer2 → mdx-bundler
#27 medium esbuild 0.18.20 → 0.25.12 contentlayer2 (peer)
#316, #307 low dompurify 3.4.15 → 3.4.17 mermaid
#315 low katex 0.16.47 → 0.18.10 mermaid

esbuild is only a peer of contentlayer2 and mdx-bundler (>=0.17 / 0.*), and overrides do not reach auto-installed peers, so it is a devDependency instead.

Two overrides cross the parent's declared range, both in code paths no page uses:

  • katex ^0.18: mermaid 11 declares ^0.16. Only used for math in diagrams. Bumping mermaid to 12 (which declares ^0.18) is the cleaner fix later and drops this override.
  • toml ^4: remark-mdx-frontmatter declares ^3. Only used for +++ TOML frontmatter; every page uses YAML.

Not in this PR

Test plan

  • pnpm install: no new peer warnings (the lucide-react / React 19 one is pre-existing)
  • pnpm run build: 1494 static pages
  • pnpm run lint: 0 errors, same 8 pre-existing warnings as main
  • pnpm start and loaded /admin/architecture in headless Chrome: the Mermaid diagram renders with the new dompurify and katex
  • Vercel preview build on this PR

Closes Dependabot alerts #314 (source-map-js), #316 and #307 (dompurify),
#315 (katex), #306 and #305 (@grpc/grpc-js), #303 and #302
(brace-expansion), #282 and #281 (toml), #194 (uuid), and #27 (esbuild).

None of these are direct dependencies, so pnpm.overrides pins the patched
ranges. esbuild is only a peer of contentlayer2 and mdx-bundler, which
overrides do not reach, so it becomes a devDependency instead.

Two overrides cross a parent's declared range: katex ^0.18 (mermaid 11
declares ^0.16; only used for math in diagrams, which no page has) and
toml ^4 (remark-mdx-frontmatter declares ^3; only used for +++ TOML
frontmatter, which no page has).

Amp-Thread-ID: https://ampcode.com/threads/T-01a17ac5-7379-71a7-997b-fc6a725d4672
Co-authored-by: Amp <[email protected]>
@vercel

vercel Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
sourcegraph-docs Ready Ready Preview Oct 27, 2026 12:49am UTC

Request Review

@github-actions

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

@github-actions

This comment has been minimized.

@marcleblanc2

Copy link
Copy Markdown
Contributor Author

Folding into #2109: bumping mermaid to 12 and refreshing the stale lockfile entries covers most of these without overrides.

@marcleblanc2
marcleblanc2 deleted the marc/deps/transitive-overrides branch October 27, 2026 01:24
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