feat(deps): replaced external JSON/JSONL and text utilities with Bun built-in APIs

- Replaced external JSON/JSONL parsing libraries with Bun's built-in JSON5 and JSONL APIs across all packages.
- Removed dependencies: json5, ndjson, get-east-asian-width, json-stringify-safe, split2, through2, and @types/ndjson.
- Replaced custom text width and ANSI wrapping implementations with Bun.stringWidth() and Bun.wrapAnsi() APIs.
- Updated Bun type definitions from ^1.2.17 to ^1.2.18 and bun-types from ^1.3.5 to ^1.3.7.
- Refactored JSONL parsing throughout codebase to use Bun.JSONL.parse() and Bun.JSONL.parseChunk() with improved buffer management and error handling.
- Updated test assertions to use Bun.stringWidth() for dynamic width calculations instead of hardcoded values.
This commit is contained in:
can1357
2026-01-27 19:17:06 +01:00
parent 3cec31c57d
commit d9a3291641
31 changed files with 410 additions and 615 deletions
+3 -4
View File
@@ -107,10 +107,9 @@ export async function migrateSessionsFromAgentRoot(): Promise<void> {
if (isEnoent(err)) continue;
throw err;
}
const firstLine = content.split("\n")[0];
if (!firstLine?.trim()) continue;
const header = JSON.parse(firstLine);
const entries = Bun.JSONL.parse(content);
const header = entries[0];
if (!header) continue;
if (header.type !== "session" || !header.cwd) continue;
const cwd: string = header.cwd;