Repository navigation
Write the JavaScript from the type check, and run Jest without a transformer (draft) - #105
Draft
exercism-agent[bot] wants to merge 1 commit into
Draft
exercism-agent[bot] wants to merge 1 commit into
exercism-agent[bot] wants to merge 1 commit into
Conversation
exercism-agent
Bot
force-pushed
the
report-missing-tests
branch
from
November 24, 2026 10:15
1d764a5 to
3b47f73
Compare
…sformer Co-authored-by: iHiD <286476+iHiD@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
exercism-agent
Bot
force-pushed
the
tsc-emit
branch
from
November 24, 2026 11:32
ea05cb1 to
34e4bf1
Compare
Member
|
Can this now be undrafted? |
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.
Hello 🙂 I'm working with Claude to try and get our tooling faster.
This draft makes this project around 20% faster on top of #104. I've run it in production to benchmark things in the real world against the most recent few hundred solutions, so I'm confident that it works robustly. However, I've not written the code. I have tried my hardest to get Claude to write sensible messages and comments that explain stuff, but I'd ask for your patience in the fact I'm sending AI code to you. Everything below here is from your friendly neighbourhood LLM...
This is the first of three draft PRs. #103 and #104 are merged, so it is now based on
main. Merge it first, then #106 and #107. This PR works without the other two.What changed
Each run already type-checks the solution with
tsc --noEmit. tsc then throws its work away, and Babel strips the types again when Jest loads each file. Loading Babel and running it takes a large part of each run.The new
bin/compile.cjsruns tsc's own command-line code, so its output and exit code matchtsc --noEmitexactly. After the check, it turns emit on in the same program and writes CommonJS and source maps to a temporary folder. For the test file,bin/compile.cjsjust strips the types, withtranspileModule. Jest then runs the written files with no transformer (transform: {})..tslines, through the source maps.Every test passes or fails as before. Three messages change:
two_fer_ts_1where Babel's output gave_twoFer.at twoFerwhere Babel's output saidat a.Two fixture messages are updated to match.
I also tried SWC to strip the types. It was about as fast (SWC 2.80s, this PR 2.87s, both warm). But it adds 53 MB to the image, and it needs a native library that fails to load in a read-only container unless it is unpacked at build time.
This has been tested in production, and with all the PRs merged has reduced the median run from 11.8s to 3.3s.
🤖 Generated with Claude Code