fix: allow tsci push without entrypoint when circuit.json exists#2952
Open
64johnlee wants to merge 1 commit into
Open
fix: allow tsci push without entrypoint when circuit.json exists#295264johnlee wants to merge 1 commit into
64johnlee wants to merge 1 commit into
Conversation
Closes tscircuit#2797. When no configured `mainEntrypoint` and no standard `index.{circuit.,}tsx` are found, fall back to using the first discovered `circuit.json` / `*.circuit.json` file as an implicit entrypoint. This matches `tsci dev`, which already accepts a prebuilt circuit.json. - lib/shared/get-entrypoint.ts: recursive circuit.json scan with the same depth/results/boundary guards as findEntrypointsRecursively; skips node_modules, dist, and dot-dirs; runs only after all existing entrypoint detection paths have failed - cli/build/register.ts: when the chosen entrypoint isn't a .ts/.tsx file (e.g. a circuit.json), skip transpilation gracefully instead of failing the build - tests/get-entrypoint.test.ts: covers circuit.json fallback and tsx preference over circuit.json
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.
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 devwhich already supports circuit.json files as valid build targets.Fixes #2797
Changes
Testing
tsci pushworks without package.json when circuit.json exists