Skip to content

fix: declare runtime dependencies (math-utils, calculate-packing, graphics-debug)#150

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

fix: declare runtime dependencies (math-utils, calculate-packing, graphics-debug)#150
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/matchpack then import throws Cannot find module.

Build is tsup-node (no bundling), but three packages the shipped dist imports were declared only in devDependencies. Real runtime imports in lib/: graphics-debug ×12, @tscircuit/math-utils ×5, calculate-packing ×4.

Fix

Per the tscircuit dependency-check convention (internal_lib): external → dependencies, internal @tscircuit/*peerDependencies ("*").

  • calculate-packing, graphics-debugdependencies
  • @tscircuit/math-utilspeerDependencies ("*"), kept pinned in devDependencies

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

Verification

Built and packed; clean install resolves this package's deps. (calculate-packing@0.0.75 has the same defect — fixed in tscircuit/calculate-packing#101 — and the tree bottoms out at circuit-json, tscircuit/circuit-json#633.) Same class as tscircuit/dsn-converter#514.

@vercel

vercel Bot commented Jul 1, 2026

Copy link
Copy Markdown

@yasdhf is attempting to deploy a commit to the tscircuit Team on Vercel.

A member of the Team first needs to authorize it.

Build is tsup-node (no bundling). The shipped dist imports calculate-packing,
graphics-debug and @tscircuit/math-utils while they sat only in devDependencies,
so a clean `bun add @tscircuit/matchpack` + import throws "Cannot find module".

Following the tscircuit dependency-check convention (internal_lib): external
packages -> dependencies, internal @tscircuit/* -> peerDependencies ("*").
So: calculate-packing + graphics-debug -> dependencies; math-utils -> peerDependencies.
@yasdhf
yasdhf force-pushed the fix/declare-runtime-dependencies branch from a6d8479 to da1e8b8 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