Skip to content

fix: allow tsci push without entrypoint when circuit.json exists#2952

Open
64johnlee wants to merge 29 commits into
tscircuit:mainfrom
64johnlee:fix/issue-2797
Open

fix: allow tsci push without entrypoint when circuit.json exists#2952
64johnlee wants to merge 29 commits into
tscircuit:mainfrom
64johnlee:fix/issue-2797

Conversation

@64johnlee
Copy link
Copy Markdown

Summary

When no tsx/ts entrypoint files are found, getEntrypoint() now falls back to checking for circuit.json files. This mirrors the behavior of tsci dev which already supports circuit.json files as valid build targets.

Fixes #2797

Changes

  • Added circuit.json fallback in getEntrypoint()
  • When no index.tsx/index.ts/index.circuit.tsx found, search for *.circuit.json or circuit.json
  • If found, use it as the entrypoint (same as tsci dev behavior)

Testing

  • All existing tests pass
  • Added test: tsci push works without package.json when circuit.json exists

64johnlee and others added 29 commits May 20, 2026 13:14
When no tsx/ts entrypoint files are found, getEntrypoint() now falls back
to checking for circuit.json files. This mirrors the behavior of `tsci dev`
which already supports circuit.json files as valid build targets.

Fixes tscircuit#2797
…BoardFiles

Previously, transpilation was skipped whenever `includeBoardFiles` was
configured and `--transpile` wasn't explicitly passed, even when a valid
TypeScript library entrypoint (e.g. `index.circuit.tsx`) was present.
Now the skip only applies when the resolved entrypoint is not a real
`.ts`/`.tsx` file (e.g. a `.circuit.json` fallback or absent).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…d files config

Previously, transpilation was only skipped for non-TS entrypoints when
hasConfiguredIncludeBoardFiles was true, causing getBuildEntrypoints to
attempt transpiling a circuit.json file when no board files config exists.

Also removes CI artifact bump lines from AGENTS.md.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
circuit-json@0.0.425 removed the `ms` named export that @tscircuit/props
was importing. tscircuit@0.0.1778-libonly bundles @tscircuit/props@0.0.536
which no longer imports `ms`, fixing the smoke-init-test CI failure.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The previous tscircuit bump to 0.0.1778-libonly caused a stale bun.lock
where tscircuit@0.0.1778-libonly required @tscircuit/props@^0.0.536 but
the lock resolved 0.0.532, creating a nested @tscircuit/props@0.0.536
inside tscircuit's node_modules. This version conflict caused the
circuit-json ms export error during the smoke-init-test.

Downgrading to 0.0.1772-libonly (matching upstream main) fixes the
dependency resolution and aligns the bun.lock with the working config.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
globbySync from globby@14 is an ESM-only package whose transitive deps
(fast-glob etc.) are not available in the globally-installed packed
bundle, causing dist/cli/main.js to fail at module load time and
breaking all commands including tsci init.

Replace with findCircuitJsonFiles(), a recursive fs.readdirSync helper
matching the existing findEntrypointsRecursively() pattern — no external
dependencies required.
…ardFiles configured

The previous audit fix changed the log message for the circuit.json
entrypoint path, breaking two existing tests that assert the original
"Skipping transpilation because includeBoardFiles is configured..."
message. Preserve that message when hasConfiguredIncludeBoardFiles is
true; only use the new message when it is false (the previously
unhandled case that was the actual bug).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
bun install fails on Windows with ENOENT when deeply nested node_modules
paths exceed the 260-character limit (tscircuit→poppygl→readable-stream→
string_decoder chain). Enable the LongPathsEnabled registry key before
installing dependencies.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…rror

@tscircuit/props@0.0.532 imports { ms } from circuit-json at runtime via
@tscircuit/runframe. Without pinning circuit-json as a peer dep, npm may
install a version whose ESM bundle doesn't expose the ms export at the
path that Node resolves, causing SyntaxError on global install.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…tatic-assets test

The Bun plugin registered by registerStaticAssetLoaders was computing a
path relative to process.cwd() when loading static assets (glb, step,
etc.). When the importing process runs from a different working directory
than the project root—as happens in tests and CI—this produced a path
with ../ traversal instead of the expected absolute path.

The fix is to return args.path directly (the absolute path Bun already
resolved) rather than re-computing a CWD-relative path. The
convertModelUrlsToFileUrls helper handles both absolute paths and
file:// URLs, so this change is safe for all consumers. The rollup
static-asset-plugin is unchanged and still writes relative paths into
the transpiled bundle—only the runtime loader value is affected.

Also removes the now-unused getBaseUrlFromTsConfig helper.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
When installed globally via npm, the peer dep chain from @tscircuit/checks
resolves circuit-json@"*" to 0.0.232 (which lacks the `ms` export required
by @tscircuit/props). Adding circuit-json>=0.0.425 as an explicit peer dep
forces npm to intersect all constraints and hoist >=0.0.425 to the top level.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…nspile-static-assets test"

This reverts commit 79e3508.
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.

tsci push fails when no index.circuit.tsx file and no mainEntrypoint

1 participant