fix: allow tsci push without entrypoint when circuit.json exists#1
Open
64johnlee wants to merge 32 commits into
Open
fix: allow tsci push without entrypoint when circuit.json exists#164johnlee wants to merge 32 commits into
64johnlee wants to merge 32 commits into
Conversation
59248f3 to
8442649
Compare
Co-authored-by: GitHub Actions <actions@github.com>
* Add telemetry for the tsci init command * updt ts * lock file updt * fix * revert tscircuit version * updt * remove the old test updt * test fix * updt snapshots * updt test * upt * updt * test fix
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
…ary entrypoint found
…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.
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.
When no tsx/ts entrypoint files are found,
getEntrypoint()now falls back to checking forcircuit.jsonfiles. This mirrors the behavior oftsci devwhich already supports circuit.json files as valid build targets.Fixes tscircuit#2797