You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Should we switch SWC or Esbuild for the Test Runners? #1042
To my eyes, both seems good with like minimal changes for a 25% performance improvement. I don't think the error messages massive matter. Maybe SWC is better as it's slightly smaller, and we can use the same thing on TS from what I understood from your whataspp?
Let me know if there's a right/wrong decision here pls. And if we go with SWC, I'll get the console.log thing fixed there.
What i think would be worth to explore before going either direction is to see:
Which one would translate well to the typescript repo? That repo has been reworked over time to be close to this one for easier maintenance. That's not necessarily a goal if we go the approach we are exploring (WhatsApp comments) but for Claude it would be easier if it's layered like that.
The exceptions it's using Babel for should be explored if they can be addressed by either tool. Having both tools in this case would not be great as we would have to deal with quircks in both.
The web based test runner needs to be taken into account with this change. It mocks a few things to be able to run in the browser but Claude can likely figure out the commonality with these.
A reason we used Babel is because we tell people to install lts node which they then don't update. Babel was transpiling down to the node version or at least that was the idea when we started. That evolved over time. The question is if this is necessary at all and if core js is needed still or not.
It's not been there for long but node I believe now understands es6 modules and they are baseline widely available now as well. This is the moment to switch to that. Doing these changes serially is suboptimal.
Link what you and them AI think. Feel free to post in this issue tables of pros and cons. Just like the PR, forwarded content would be good to be marked as [NoRag] By AI. Use a GitHub interstitial.
I'm fine in reducing DX slightly for these repos as they may not necessarily be touched by me directly.
Per your conversations with @iHiD, we've moved away from swapping Babel for SWC or esbuild (those drafts are closed), and are now trying Node's built-in test runner with native ES modules instead:
JavaScript:Find the tests in the test file with acorn #1046 finds the tests with acorn instead of loading the TypeScript compiler, and Run the tests with Node's built-in test runner and native ES modules #1047 runs the tests with node --test and native ES modules, with no Jest or Babel. A small preloaded module provides Jest's API (describe, test, xtest, expect, jest.fn, jest.mock), so the track's test files don't change. The median run on our test machine goes from 2.3s to 0.6s. The PR lists every change students would see.
--detectOpenHandles: we tested the async exercises with and without it, including 14 broken solutions and 210 recent student solutions, and saw no difference. Details are in Stop tracking open handles in every run #1044.
Still to try: the TypeScript version runs as CommonJS and is laid out differently from the JavaScript one, so we're now moving it to ES modules with the same files and structure, to keep the two runners as alike as possible. It also still loads the TypeScript compiler to find the tests, which we're removing.
Both are drafts, up so you can see the direction. Nothing needs merging yet.
If anything here looks fundamentally wrong to you (for example, any of the changes a student would see), that would be helpful to know. Otherwise I'll continue iterating and let you know when I think things are ready for you to look at if you want to.
Activity
SleeplessByte commentedon Nov 21, 2026
What i think would be worth to explore before going either direction is to see:
Link what you and them AI think. Feel free to post in this issue tables of pros and cons. Just like the PR, forwarded content would be good to be marked as [NoRag] By AI. Use a GitHub interstitial.
I'm fine in reducing DX slightly for these repos as they may not necessarily be touched by me directly.
exercism-agent commentedon Nov 23, 2026
@SleeplessByte A quick update on where this has got to.
Per your conversations with @iHiD, we've moved away from swapping Babel for SWC or esbuild (those drafts are closed), and are now trying Node's built-in test runner with native ES modules instead:
node --testand native ES modules, with no Jest or Babel. A small preloaded module provides Jest's API (describe,test,xtest,expect,jest.fn,jest.mock), so the track's test files don't change. The median run on our test machine goes from 2.3s to 0.6s. The PR lists every change students would see.--detectOpenHandles: we tested the async exercises with and without it, including 14 broken solutions and 210 recent student solutions, and saw no difference. Details are in Stop tracking open handles in every run #1044.Still to try: the TypeScript version runs as CommonJS and is laid out differently from the JavaScript one, so we're now moving it to ES modules with the same files and structure, to keep the two runners as alike as possible. It also still loads the TypeScript compiler to find the tests, which we're removing.
Both are drafts, up so you can see the direction. Nothing needs merging yet.
If anything here looks fundamentally wrong to you (for example, any of the changes a student would see), that would be helpful to know. Otherwise I'll continue iterating and let you know when I think things are ready for you to look at if you want to.