Repository navigation
TS17: port the browser tests, scripts and build config to TypeScript - #31
Merged
Merged
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Renames tests/smoke, ui, arena-browser, dev-ui, e2e-local, chrome, build-versions, upload-workerd and seed-local, scripts/*.mjs (og-image, devtools, release, test-all, live-chat-e2e, install-hooks, build-characters, lib/zip-read, lib/png-io), tests/port/port-check.test.mjs and vite.config.js to .ts with types only, lists them in the strict programs, and updates package.json, the hooks, deploy.yml and the docs.
Finesssee
force-pushed
the
port/ts17-scripts
branch
from
October 11, 2026 20:22
ace396d to
7d6d855
Compare
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.
TS17 of the TypeScript port: the browser tests, scripts and build config move to strict TypeScript, types only.
What moved
tests/: smoke, ui, arena-browser, dev-ui, e2e-local, chrome, build-versions, upload-workerd, seed-local, andtests/port/port-check.test(.mjsto.ts)scripts/: og-image, devtools, release, test-all, live-chat-e2e, install-hooks, build-characters,lib/zip-read,lib/png-io(.mjsto.ts)vite.config.jstovite.config.ts(site.config.jsstays JavaScript)Each file is listed in one strict program:
tsconfig.strict.json: Node-only scripts and runners.tsconfig.strict-tests.json: Playwright code that imports no Worker module (dev-ui, og-image, live-chat-e2e), and the character build. The Worker types declareBufferasanythere, which hides its methods intsconfig.strict.json.tsconfig.strict-tests-shared.json: browser tests that import a Worker module (smoke, ui, arena-browser, e2e-local).Every
as,!andLoosehas its reason on the same line or the line above. Page callbacks in smoke, e2e-local, live-chat-e2e and arena-browser reach their page globals through a module-scopeddeclare const window, so they need no cast.References are updated in package.json scripts,
.githooks/pre-commitandpre-push,deploy.yml(node scripts/release.ts),.coderabbit.yaml, AGENTS.md (8179 bytes), DESIGN.md, docs, comments incloudflare.config.ts,server/andsrc/, and the path strings in tests.tests/dev-release.test.tsnow imports the types fromscripts/release.tsinstead of keeping its own copies.port-check
The served hash in the built
overlay.htmlisoverlay.js?v=15ab3b21f0, the same as main's.Checks
bun run check: pass (format, lint, typecheck, 359 unit tests pass, 0 fail; the pre-commit hook ran it again with gitleaks)bun run test:port: 101 pass, 0 failbun run test:all: all 11 steps pass (smoke, ui, dev-ui, arena browser and e2e local in headed Chrome). Run withMINI_PORT=5287, because another worktree's dev server held the default port 5199. The first run on 5199 failed at the harness step for that reason. The last push after that run added only comments anddeclarelines, and port-check on the final head still shows 0 different.Left as is
tests/upload-workerd.tsimportsminiflare, whichpackage.jsondoesn't declare (same as before; no dependency added).src/served/overlay.tsstill saysvite.config.jsin a comment. Changing it would change the served code hash.public/_headersstill saysvite.config.js. public/ ships as written, so this comment stays until a change that isn't a port.tests/port/port-check.test.tsstill name.jsand.mjsfiles on purpose.seCallinscripts/devtools.tscasts aURLSearchParamsas unknown as stringinside a template literal. Without the cast, oxlint'srestrict-template-expressionsflags it, and a runtime change wasn't allowed in a port.