Skip to content

Add support for autorouterVersion="v5"#627

Merged
seveibar merged 1 commit intomainfrom
codex/add-support-for-autorouterversion-v5
Apr 4, 2026
Merged

Add support for autorouterVersion="v5"#627
seveibar merged 1 commit intomainfrom
codex/add-support-for-autorouterversion-v5

Conversation

@seveibar
Copy link
Copy Markdown
Contributor

@seveibar seveibar commented Apr 4, 2026

Motivation

  • The autorouter version enum needs to include v5 so consumers can specify the new autorouter runtime.
  • Validation schemas and generated documentation must reflect the new allowed value to keep runtime and docs in sync.

Description

  • Added "v5" to the autorouterVersion TypeScript union in lib/components/group.ts.
  • Updated the runtime Zod schema subcircuitGroupProps to accept "v5" (in lib/components/group.ts).
  • Added a unit test in tests/autorouter.test.ts asserting autorouterVersion: "v5" parses correctly.
  • Regenerated artifacts and docs so generated files reflect the change (generated/COMPONENT_TYPES.md, generated/PROPS_OVERVIEW.md, README.md).

Testing

  • Ran the generation scripts: bun scripts/generate-component-types.ts, bun scripts/generate-manual-edits-docs.ts, bun scripts/generate-readme-docs.ts, and bun scripts/generate-props-overview.ts (succeeded).
  • Executed tests with bun test tests/autorouter.test.ts which passed: 8 tests, 0 failures.
  • Type-checked with bunx tsc --noEmit (succeeded).
  • Ran formatting with bun run format (succeeded).

Codex Task

Comment on lines +45 to +51
test("supports autorouter version v5", () => {
const result = subcircuitGroupPropsWithBool.parse({
subcircuit: true,
autorouterVersion: "v5",
})
expect(result.autorouterVersion).toBe("v5")
})
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test file violates the rule that a *.test.ts file may have AT MOST one test(...) function. The file already contains at least one test() function (visible in the context at line 42), and this modification adds a second test() function on line 45. To fix this violation, split the tests into multiple numbered files such as autorouter1.test.ts and autorouter2.test.ts, with each file containing only one test() function.

Spotted by Graphite (based on custom rule: Custom rule)

Fix in Graphite


Is this helpful? React 👍 or 👎 to let us know.

@seveibar seveibar merged commit 0242272 into main Apr 4, 2026
5 checks passed
@tscircuitbot
Copy link
Copy Markdown
Contributor


Thank you for your contribution! 🎉

PR Rating: ⭐⭐
Impact: Minor

Track your contributions and see the leaderboard at: tscircuit Contribution Tracker


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants