Skip to content

chore: Remove unused dependencies and bump vulnerable packages - #1898

Merged
marcleblanc2 merged 3 commits into
mainfrom
remove-baseai-and-bump-vulnerable-deps
Sep 11, 2026
Merged

chore: Remove unused dependencies and bump vulnerable packages#1898
marcleblanc2 merged 3 commits into
mainfrom
remove-baseai-and-bump-vulnerable-deps

Conversation

@marcleblanc2

@marcleblanc2 marcleblanc2 commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

pnpm audit on main: 184 advisories (4 critical, 71 high). After this PR: 40 (2 critical, 17 high), all of which are pinned by next 14 or contentlayer 0.3.4.

Changes

  • Remove baseai / @baseai/core, the baseai/ memory config, docs-chatbot.md, and the pnpm sync script. The Langbase chatbot was replaced by runLLM and nothing imports these. They alone pulled in hono (34 advisories), tar (12, incl. 1 critical), xlsx (2 high, no fix available), form-data, yaml, uuid, and most of the minimatch / brace-expansion hits.
  • Remove js-yaml from direct dependencies: never imported by src/ or dev/.
  • mermaid 11.12 → 11.16: carries the dompurify XSS fixes, the only vulnerable code that actually ships to visitors' browsers.
  • sharp 0.32 → 0.35 (devDep, build only): libvips / libheif CVEs.
  • Re-resolve vulnerable transitives within their existing semver ranges (minimatch, brace-expansion, picomatch, nanoid, protobufjs, @grpc/grpc-js, ...). Lockfile loses ~2,000 lines.
  • .gitignore: add /logs for script output, drop the stale **/.baseai/ entry.

Verification

  • Clicked through Vercel preview, checked Mermaid diagrams, search, nav menu, it all works

With node 20.20 / pnpm 10.25 (per .tool-versions):

  • npx tsc --noEmit clean, pnpm lint clean
  • pnpm build: 521 documents, 526 static pages, dev/check-links / check-filenames / check-images / generate-mermaid-icons all pass; route table unchanged
  • Both pages with Mermaid diagrams (admin/architecture, self-hosted/sourcegraph-nginx-mermaid) render correctly under next start in headless Chrome
  • pnpm why baseai hono tar xlsx → not found; rg baseai → only the AGENTS.md history note

@vercel

vercel Bot commented Sep 10, 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 Sep 11, 2026 1:46am UTC

Request Review

@marcleblanc2 marcleblanc2 changed the title Remove dead baseai dependency and bump vulnerable packages Remove unused dependencies and bump vulnerable packages Sep 10, 2026
@marcleblanc2 marcleblanc2 changed the title Remove unused dependencies and bump vulnerable packages chore: Remove unused dependencies and bump vulnerable packages Sep 10, 2026
@marcleblanc2
marcleblanc2 requested a review from a team September 10, 2026 07:21

@pjlast pjlast left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure how to judge this one 😆 but the idea makes sense. So going to :trust:

@marcleblanc2
marcleblanc2 enabled auto-merge (squash) September 11, 2026 01:43
marcleblanc2 and others added 3 commits September 10, 2026 19:43
pnpm audit: 184 advisories -> 40 (critical 4 -> 2, high 71 -> 17).

- Remove baseai / @baseai/core, the baseai/ memory config, docs-chatbot.md
  and the `pnpm sync` script. The Langbase chatbot was replaced by runLLM;
  nothing imports these. They alone pulled in hono (34 advisories),
  tar (12), xlsx (2 high, no fix available) and more.
- Remove js-yaml: declared as a direct dependency but never imported.
- Bump mermaid 11.12 -> 11.16 (dompurify XSS fixes in the client bundle)
  and sharp 0.32 -> 0.35 (libvips / libheif CVEs).
- Re-resolve vulnerable transitives within their existing ranges
  (minimatch, brace-expansion, picomatch, nanoid, protobufjs, ...).
- Ignore /logs for script output; drop the stale **/.baseai/ entry.
- Add dev/TODO.md with the remaining work: Dependabot + audit CI gate,
  contentlayer -> contentlayer2, next 14 -> 15.

The 40 remaining advisories are all pinned by next 14 (fixes only in
15.5.x) or contentlayer 0.3.4 (unmaintained since 2023).

Verified with node 20 / pnpm 10.25 from .tool-versions: tsc, lint and
build (521 documents, 526 static pages, dev/check-* scripts) pass; the two
mermaid pages render.

Amp-Thread-ID: https://ampcode.com/threads/T-01a089d0-ddce-722d-8215-0d6d244d062b
Co-authored-by: Amp <amp@ampcode.com>
@marcleblanc2
marcleblanc2 force-pushed the remove-baseai-and-bump-vulnerable-deps branch from ed73544 to 2d8e83f Compare September 11, 2026 01:43
@marcleblanc2
marcleblanc2 merged commit 3a62b13 into main Sep 11, 2026
3 checks passed
@marcleblanc2
marcleblanc2 deleted the remove-baseai-and-bump-vulnerable-deps branch September 11, 2026 01:46
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.

2 participants