우리의 그래프 데이터베이스는 업스트림에서 버려졌습니다 — 여기 6-라인 마이그레이션이 있습니다 (EngramGraph 0.3.0)

작성자

카테고리:

← 피드로
DEV Community · AsiaOstrich · 2026-06-24 개발(SW)

AsiaOstrich

In October 2025, Kùzu Inc. archived KuzuDB — the embedded graph database — with a one-line note: “Kuzu is working on something new.” The npm package was deprecated, and its transitive dependencies ([email protected], npmlog, gauge) carried 5 high-severity vulnerabilities with no fix coming.

EngramGraph runs on an embedded graph database. That database was Kuzu.

EngramGraph 0.3.0 is the migration release — and the migration turned out to be far cheaper than expected. Here’s why, and what we learned.

The fix: ryugraph

The community responded to KuzuDB’s abandonment with several forks. We evaluated them and picked ryugraph (Predictable Labs):

  • MIT licensed, actively maintained, published on npm
  • Designed as a drop-in Kuzu replacement — and in our experience, it actually is
  • Same storage format lineage: existing .engram/graph.db files keep working

The core API — prepare(), execute(), query(), getAll() — is signature-identical to kuzu. Our entire test suite (69 tests) passed on the first run after the swap.

Why the migration was 6 lines

One architectural decision from day one paid for itself here: every raw database call goes through a single thin wrapper (GraphConnection, ~80 lines). The other 20+ call sites in the codebase only ever see the wrapper.

So the migration was:

  1. package.json: kuzuryugraph
  2. connection.ts: one import line
  3. Two type-only imports (KuzuValueRyuValue)

That’s it. If your project wraps its native dependencies behind one interface, an upstream abandonment becomes an afternoon, not a quarter.

The leftover CVEs (and the override trick)

Swapping kuzu killed the deprecated-toolchain CVEs, but ryugraph itself pins cmake-js@^7.3.0, whose [email protected] carries known path-traversal CVEs. The fix exists upstream (cmake-js@8 uses a patched tar) — ryugraph just hasn’t bumped yet.

npm overrides to the rescue:

"overrides": { "cmake-js": "^8.0.0" }

Enter fullscreen mode Exit fullscreen mode

npm audit: 5 high → 0.

One caveat worth knowing: npm overrides don’t propagate to downstream consumers. If you depend on engramgraph (or anything that depends on ryugraph), add the same override to your own package.json until ryugraph bumps cmake-js upstream.

Upgrading

npm install [email protected]

Enter fullscreen mode Exit fullscreen mode

One breaking change: the KuzuValue type is now RyuValue. If you imported it, update the import — everything else is unchanged.

MIT · Node ≥ 22 · github.com/AsiaOstrich/EngramGraph

원문에서 계속 ↗

코멘트

답글 남기기

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다