Skip to content

fix: declare format-si-unit and zod as runtime dependencies#633

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

fix: declare format-si-unit and zod as runtime dependencies#633
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

A clean install of circuit-json alone cannot be imported:

Cannot find package 'format-si-unit' from '.../circuit-json/dist/index.mjs'

The published dist/index.mjs externally imports exactly two packages — format-si-unit and zod — and package.json declares no dependencies at all (both are devDependencies only). Consumers survive only when another package hoists these; strict/isolated layouts (pnpm) break regardless.

Verified on circuit-json@0.0.443: clean dir, bun add circuit-json, import * as cj from "circuit-json" → the error above.

Fix

Declare format-si-unit and zod in dependencies (moved out of devDependencies), lockfile synced.

The published dist/index.mjs externally imports format-si-unit and zod,
but package.json declares no dependencies at all — both are only
devDependencies. A clean install of circuit-json alone cannot be
imported:

  Cannot find package 'format-si-unit' from '.../circuit-json/dist/index.mjs'

Consumers only survive when another package happens to hoist these,
and strict/isolated layouts (pnpm) break regardless.

Fix: declare both packages in dependencies.
@yasdhf yasdhf force-pushed the fix/declare-runtime-dependencies branch from fcb7908 to 143bb8f 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