Skip to content

chore: regenerate Streamdown TSRX declarations and check them in CI - #1335

Merged
trueadm merged 1 commit into
mainfrom
chore/streamdown-types-check
Sep 27, 2026
Merged

trueadm merged 1 commit into
mainfrom
chore/streamdown-types-check

Conversation

@trueadm

@trueadm trueadm commented Sep 26, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Regenerate Streamdown's committed src/**/*.tsrx.d.ts declarations. They had been stale since feat(streamdown): add Octane binding #432, and node scripts/generate-tsrx-types.mjs --check failed for 21 files on main.
  • Add pnpm --dir packages/streamdown types:check to the root test precheck chain, next to Visx's types:check, so CI catches future drift. It takes about 2 seconds per shard.

Where the drift came from

Both changes come from real source changes, not the local environment:

The generator uses the typescript package, not tsgo. Locally that resolves to 5.9.3, the catalog pin CI installs, and pnpm install --frozen-lockfile confirmed the local install matches the lockfile.

No changeset

@octanejs/streamdown publishes only dist. scripts/build.mjs regenerates dist/types from source with --out-dir, so the published types already match this output. The committed src declarations are used only by the package's typetests and check-public-types.mjs.

Validation

  • pnpm format:check: ran pnpm format:files:check on the changed files only
  • pnpm typecheck: ran pnpm --dir packages/streamdown typecheck only (passes)
  • pnpm test: ran the full precheck chain (three upstream, Visx compile/types, Streamdown types), all passing; did not run the Vitest suite, since nothing Vitest imports changed
  • targeted tests:
    • pnpm --dir packages/streamdown types:check passes (declarations current plus public-export parity)
    • Negative check: appending a line to one declaration makes types:check exit 1
    • pnpm ci:workflow:test: 276 pass, 0 fail
    • pnpm sync produced no other changes

Risk / follow-ups

  • Because of the new memo return type, each memo'd declaration repeats its full destructured parameter list twice. A type annotation in the source would shorten that, but it isn't needed for correctness.

Provenance

  • An agent produced this diff (agent-authored)

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.


Note

Low Risk
Generated declaration and CI script changes only; no runtime or published-package behavior changes.

Overview
Refreshes committed Streamdown src/**/*.tsrx.d.ts output so it matches the current TSRX generator and Octane typings (21 files were out of date on main).

Declaration updates reflect upstream type changes only: component return types move from Octane.JSX.Element to top-level JSX.Element, and memo-wrapped exports (Block, Streamdown, CodeBlockBody) now use the expanded memo return shape instead of ComponentBody<…>.

Root test now runs pnpm --dir packages/streamdown types:check alongside Visx’s checks, so CI fails if those generated declarations drift again. Published dist types are unchanged; these files support in-repo typetests and public-export checks.

Reviewed by Cursor Bugbot for commit a6e29ee. Bugbot is set up for automated code reviews on this repo. Configure here.

The committed src/**/*.tsrx.d.ts files had drifted since #432: #1069 added a
top-level JSX namespace to octane/jsx-runtime, and #943 changed memo's return
type. Streamdown's types:check was never run by CI, so the drift went unnoticed.

Regenerate the declarations and run `pnpm --dir packages/streamdown types:check`
as a root `test` precheck alongside Visx's.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions github-actions Bot added agent-authored Diff or issue body substantially produced by an AI agent chore PR: tooling, dependencies, repo maintenance labels Sep 26, 2026
@github-actions
github-actions Bot marked this pull request as draft September 26, 2026 19:32
@trueadm
trueadm marked this pull request as ready for review September 26, 2026 19:41
@trueadm
trueadm merged commit be7b643 into main Sep 27, 2026
46 of 58 checks passed
@trueadm
trueadm deleted the chore/streamdown-types-check branch September 27, 2026 11:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent-authored Diff or issue body substantially produced by an AI agent chore PR: tooling, dependencies, repo maintenance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant