Skip to content

fix: declare runtime dependencies (@tscircuit/circuit-json-util, transformation-matrix)#164

Open
yasdhf wants to merge 1 commit into
tscircuit:mainfrom
yasdhf:fix/declare-runtime-dependencies
Open

fix: declare runtime dependencies (@tscircuit/circuit-json-util, transformation-matrix)#164
yasdhf wants to merge 1 commit into
tscircuit:mainfrom
yasdhf:fix/declare-runtime-dependencies

Conversation

@yasdhf

@yasdhf yasdhf commented Jul 1, 2026

Copy link
Copy Markdown

Problem

Clean install can't import the package — bun add @tscircuit/checks then import "@tscircuit/checks" throws Cannot find module '@tscircuit/circuit-json-util'.

Build is tsup-node (no bundling). The shipped dist imports @tscircuit/circuit-json-util (declared only in devDependencies, ×20 in lib/) and transformation-matrix (not declared, ×1).

Fix

Per this repo's dependency-check (internal_lib): external → dependencies, internal @tscircuit/*peerDependencies ("*").

  • transformation-matrixdependencies
  • @tscircuit/circuit-json-utilpeerDependencies ("*"), kept pinned in devDependencies

bunx @tscircuit/dependency-check passes; build / format / test / type-check green.

Verification

Built (tsup-node) and packed; clean install resolves. Full end-to-end import also needs the circuit-json root fix (tscircuit/circuit-json#633). Same class as tscircuit/dsn-converter#514, tscircuit/matchpack#150, tscircuit/calculate-packing#101.

Build is tsup-node (no bundling). The shipped dist imports transformation-matrix
(undeclared) and @tscircuit/circuit-json-util (devDependencies only), so a clean
install + import throws "Cannot find module".

Per the repo's dependency-check (internal_lib): transformation-matrix (external)
-> dependencies; @tscircuit/circuit-json-util (internal) -> peerDependencies ("*").
`bunx @tscircuit/dependency-check` now passes.
@yasdhf
yasdhf force-pushed the fix/declare-runtime-dependencies branch from c39fbdc to 393bdc9 Compare July 1, 2026 23:55
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