Skip to content

chore: migrate type checking to tsrs - #374

Merged
petebacondarwin merged 3 commits into
mainfrom
tsrs
Oct 21, 2026
Merged

petebacondarwin merged 3 commits into
mainfrom
tsrs

Conversation

@penalosa

Copy link
Copy Markdown
Collaborator

Switch the CLI, generator plugin, and container fixture type checks from tsgo to pinned tsrs@0.18.0-ts7.1.0-dev.20260929. Remove @typescript/native-preview, update the lockfile, and refresh tooling references.

Validated with pnpm install --frozen-lockfile and pnpm check.

@penalosa
penalosa marked this pull request as ready for review October 20, 2026 18:42
@penalosa
penalosa requested review from a team, dimitropoulos and srikrsna as code owners October 20, 2026 18:42
@pkg-pr-new

pkg-pr-new Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
npm i https://pkg.pr.new/cf@374

commit: a27de44

@github-actions

github-actions Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

cf --help startup

mean stddev min max
PR 278.1 ms 4.0 ms 270.7 ms 285.7 ms
base 278.2 ms 8.7 ms 269.2 ms 305.8 ms

Δ (PR vs base): — -0.0 ms (-0.0%)

Measured with hyperfine on ubuntu-latest (3 warmup runs, 20 timed runs). CI numbers carry ±a few ms of runner jitter; treat small deltas as noise.

Comment thread packages/cli/vite.config.ts
@ask-bonk

ask-bonk Bot commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

🤖 I've done a thorough review of your PR.

Migrates repository type checking from tsgo to tsrs.

  1. High: tsrs has no Windows binary, breaking Windows type checks. Posted a suggestion on packages/cli/vite.config.ts:43 to restore the fallback.

github run

@clanky-the-clanker

clanky-the-clanker Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

✅ Approved — This is a clean tooling swap from tsgo to an exact-pinned tsrs, with no runtime code affected and no tsgo or @​typescript/native-preview references left outside the lockfile.

The decision is advisory: this comment never approves, blocks or requests changes on the pull request.


✅ All checks passed

🔒 Security: ✅ LGTM

This change affects only development tooling, with no runtime, auth or secrets impact. tsrs is pinned to an exact version, 0.18.0-ts7.1.0-dev.20260929. That replaces the floating latest tag used for @typescript/native-preview, so installs can no longer pick up a different checker version without notice. This review did not cover the pnpm-lock.yaml changes or where the tsrs package comes from.


📖 AGENTS.md: ✅ LGTM

The AGENTS.md edits replace tsgo with tsrs consistently across the root and CLI files. The guidance against reintroducing tsc still holds, and it now names the new tool.


📋 Code Quality: ✅ LGTM

Both task:check:type commands now call tsrs with the same flags as before: packages/cli/vite.config.ts and fixtures/vite-container-project/vite.config.ts. The fixture no longer declares its own type-checker dependency. That matches packages/cli, which already used the root devDependency. Searching the tree finds no other tsgo or @typescript/native-preview references outside the lockfile.


⚡ Performance: ✅ LGTM

The change only replaces the type-check command and its dependency. It adds no runtime code.


📝 Documentation: ✅ LGTM

The tooling references in AGENTS.md, packages/cli/AGENTS.md, the CI workflow comment and the review agent prompt now all name tsrs. The command comments for pnpm check and pnpm check:type describe what they do without naming a specific tool.


Reviewed commit: a27de44c

@dario-piotrowicz dario-piotrowicz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good to me, with the exception of the windows binary issue which I think should get solved before merging this PR

@dario-piotrowicz

Copy link
Copy Markdown
Member

oh, it is kind of nice that in cloudflare/workers-sdk#16384 CI actually became red because of the windows issue, are we missing some windows type-checkings/builds here? 🤔

@petebacondarwin

Copy link
Copy Markdown
Collaborator

If I understand correctly, the concern is only that we can't check types of this monorepo when running in Windows?
If that is the case, then I don't think we should worry. We don't develop this repo on Windows, and the type checking locally and in the CI on non-Windows should be enough to catch any broken types.

@ask-bonk

ask-bonk Bot commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

LGTM

github run

@petebacondarwin
petebacondarwin added this pull request to the merge queue Oct 21, 2026
Merged via the queue into main with commit 4d6928c Oct 21, 2026
13 checks passed
@petebacondarwin
petebacondarwin deleted the tsrs branch October 21, 2026 10:40
@penalosa

Copy link
Copy Markdown
Collaborator Author

Looks good to me, with the exception of the windows binary issue which I think should get solved before merging this PR

@dario-piotrowicz They're working on a windows binary, and in the meantime I think development on this repo not working in Windows is an okay tradeoff

@dario-piotrowicz

Copy link
Copy Markdown
Member

If I understand correctly, the concern is only that we can't check types of this monorepo when running in Windows? If that is the case, then I don't think we should worry. We don't develop this repo on Windows, and the type checking locally and in the CI on non-Windows should be enough to catch any broken types.

Yes, I was thinking of the windows support in particular for external contributors that might want to pull down the repo and work on it on windows. That's probably not a huge issue for the time being in any case 👍

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.

3 participants