Skip to content

fix(deps): stop shipping braces as a runtime dependency of the JS SDK - #36

Merged
jchristn merged 1 commit into
mainfrom
armada/claude/msn_muxq4e1v_XhSLY8WrNA5
Oct 7, 2026
Merged

jchristn merged 1 commit into
mainfrom
armada/claude/msn_muxq4e1v_XhSLY8WrNA5

Conversation

@jchristn

@jchristn jchristn commented Oct 7, 2026

Copy link
Copy Markdown
Collaborator

Summary

Addresses Dependabot alerts #175 and #176 (GHSA-vfj7-8cjw-p6xm: braces <= 3.0.3, stack exhaustion from deeply nested brace patterns).

No patched version of braces exists (3.0.3 is the latest release), so the package cannot be bumped or overridden to a fixed version. This PR does what can be done:

  • sdk/js/package.json: @babel/cli, jest, and msw move from dependencies to devDependencies. They are build/test tools only; nothing in src/ imports them. They were the only paths to braces (@babel/cli -> chokidar@3 -> braces, jest -> micromatch -> braces), so anyone installing litegraphdb no longer gets braces at runtime.
  • sdk/js/package-lock.json: regenerated. No versions changed; the affected subtrees are now marked "dev": true.

Remaining exposure / follow-up

  • Dashboard (#175): dashboard depends on the published litegraphdb@1.0.12 from npm, and that version lists jest and @babel/cli as runtime dependencies, so braces still shows up as runtime there. That clears once an SDK built from this change is published and the dashboard moves to it. The dashboard's own jest and lint-staged would still pull braces as a dev dependency (jest 29 and 30 both rely on micromatch 4).
  • Both alerts will stay open until upstream ships a fix. braces is only used here by build/test tooling on developer-written glob patterns, never on untrusted input, so it is reasonable to dismiss them as "tolerable risk". I have not dismissed them.

Test plan

  • npm ci + jest in sdk/js: 17 suites, 230 tests passed

🤖 Generated with Claude Code

Addresses Dependabot alerts #175 and #176 (GHSA-vfj7-8cjw-p6xm, braces
<= 3.0.3 stack-exhaustion DoS). No patched braces release exists (3.0.3 is
the latest), so the package cannot be upgraded; instead this removes it from
the SDK's runtime dependency graph.

Files modified:
- sdk/js/package.json: moved @babel/cli, jest, and msw from dependencies to
  devDependencies. They are build/test tools only (msw is imported only under
  test/, nothing in src/ imports any of them). They were the only runtime
  paths to braces (@babel/cli -> chokidar -> braces, jest -> micromatch ->
  braces), so consumers installing litegraphdb no longer pull braces.
- sdk/js/package-lock.json: regenerated with npm install --package-lock-only;
  braces, chokidar, micromatch, jest, msw and their subtrees are now marked
  "dev": true. No package versions changed.

Validation: npm ci + jest in sdk/js, 17 suites / 230 tests passed.

Armada-Mission-Id: msn_muxq4e1v_XhSLY8WrNA5
Armada-Voyage-Id: vyg_muxq4e1s_hBYds24msTq
Armada-Captain-Id: cpt_mutxrs2a_4g8cQVydfAH
Armada-Vessel-Id: vsl_muu352c3_Vm6XWUxcI8h

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jchristn
jchristn merged commit 07ec49c into main Oct 7, 2026
8 checks passed
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