Skip to content

Commit 3a62b13

Browse files
chore: Remove unused dependencies and bump vulnerable packages (#1898)
`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 --------- Co-authored-by: Amp <amp@ampcode.com>
1 parent aa22ff4 commit 3a62b13

7 files changed

Lines changed: 540 additions & 2066 deletions

File tree

‎.gitignore‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ next-env.d.ts
4646
# We ignore the generated file as it should always be generated
4747
public/changelog.rss
4848

49-
# baseai
50-
**/.baseai/
49+
# script output
50+
/logs
5151

5252
# env file
5353
.env

‎AGENTS.md‎

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,7 @@ To update the runLLM assistant ID or other settings, modify the Script component
4141
/>
4242
```
4343

44-
### Previous Integration
45-
46-
Previously used **Langbase** with custom React components. This has been completely removed:
47-
48-
- Removed `@langbase/components` and `langbase` packages
49-
- Removed custom chat components (`src/app/chat.tsx`, `src/components/ChatBot/`)
50-
- Removed API routes (`src/app/api/chat/`)
51-
- Removed memory creation scripts
44+
The previous **Langbase** / `baseai` chatbot integration has been fully removed (packages, components, API routes, `baseai/` memory config, and the `pnpm sync` script).
5245

5346
## Important Notes
5447

‎baseai/baseai.config.ts‎

Lines changed: 0 additions & 18 deletions
This file was deleted.

‎baseai/memory/memory-sg-docs-live/index.ts‎

Lines changed: 0 additions & 27 deletions
This file was deleted.

‎docs-chatbot.md‎

Lines changed: 0 additions & 11 deletions
This file was deleted.

‎package.json‎

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,12 @@
1111
"check-filenames": "node dev/check-filenames.mjs",
1212
"check-images": "node dev/check-images.mjs",
1313
"generate-mermaid-logos": "node dev/generate-aws-icons.mjs",
14-
"baseai": "baseai",
15-
"sync": "npx baseai@latest deploy -m memory-sg-docs-live",
1614
"format": "prettier --config ./prettier.config.js --cache --cache-strategy metadata --write=true '**/{*.{js?(on),ts?(x),md,mdx,s?css},.*.js?(on)}'"
1715
},
1816
"browserslist": "defaults, not ie <= 11",
1917
"dependencies": {
2018
"@algolia/autocomplete-core": "^1.13.0",
2119
"@algolia/client-search": "^4.22.1",
22-
"@baseai/core": "^0.9.41",
2320
"@docsearch/react": "^3.5.2",
2421
"@headlessui/react": "^1.7.17",
2522
"@heroicons/react": "^2.1.1",
@@ -43,11 +40,10 @@
4340
"fast-glob": "^3.3.2",
4441
"feed": "^4.2.2",
4542
"github-slugger": "^2.0.0",
46-
"js-yaml": "^4.1.0",
4743
"kbar": "0.1.0-beta.44",
4844
"lucide-react": "^0.372.0",
4945
"mdx": "^0.3.1",
50-
"mermaid": "^11.12.2",
46+
"mermaid": "^11.16.1",
5147
"next": "^14.2.23",
5248
"next-contentlayer": "^0.3.4",
5349
"next-themes": "^0.2.1",
@@ -71,13 +67,12 @@
7167
"unist-util-visit": "^5.0.0"
7268
},
7369
"devDependencies": {
74-
"baseai": "^0.9.41",
7570
"dotenv": "^16.4.7",
7671
"eslint": "8.45.0",
7772
"eslint-config-next": "13.4.16",
7873
"glob": "^11.0.3",
7974
"prettier": "^3.1.1",
8075
"prettier-plugin-tailwindcss": "^0.5.9",
81-
"sharp": "^0.32.6"
76+
"sharp": "^0.35.4"
8277
}
8378
}

0 commit comments

Comments
 (0)