fix: declare runtime dependencies (@flatten-js/core, math-utils, solver-utils) - #101
Open
yasdhf wants to merge 1 commit into
Open
fix: declare runtime dependencies (@flatten-js/core, math-utils, solver-utils)#101yasdhf wants to merge 1 commit into
yasdhf wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
yasdhf
force-pushed
the
fix/declare-runtime-dependencies
branch
from
July 1, 2026 23:48
56437da to
d7f9da7
Compare
Build is tsup-node (no bundling). The shipped dist imports @flatten-js/core,
@tscircuit/math-utils and @tscircuit/solver-utils while they sat only in
devDependencies, so a clean `bun add calculate-packing` + import throws
"Cannot find module '@flatten-js/core'".
Per the repo's dependency-check (internal_lib): external deps go in
dependencies, internal @tscircuit/* modules in peerDependencies ("*").
So: @flatten-js/core -> dependencies; math-utils + solver-utils -> peerDependencies.
`bunx @tscircuit/dependency-check` now passes.
yasdhf
force-pushed
the
fix/declare-runtime-dependencies
branch
from
July 1, 2026 23:55
d7f9da7 to
b85e26e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
A clean install can't import the package:
Build is
tsup-node(no bundling — imports stay external), but three packages the shippeddistimports were declared only indevDependencies, so consumers never received them. Real runtime imports inlib/:@tscircuit/math-utils×21,@tscircuit/solver-utils×4,@flatten-js/core×3.Fix
Following this repo's
dependency-check(internal_lib): external packages go independencies, internal@tscircuit/*inpeerDependencies("*").@flatten-js/core→dependencies@tscircuit/math-utils,@tscircuit/solver-utils→peerDependencies("*"), kept pinned indevDependenciesbunx @tscircuit/dependency-checkpasses; format-check / test / type-check green.Verification
Built, packed, installed the tarball in a clean project —
@flatten-js/coreresolves and the internal peers auto-install. (A full end-to-end import also needs thecircuit-json@0.0.443root fix, tscircuit/circuit-json#633, which ships the same defect.)Same class as tscircuit/dsn-converter#514, tscircuit/matchpack#150, tscircuit/checks#164.