Skip to content

Should we switch SWC or Esbuild for the Test Runners? #1042

Open

Description

@iHiD

@SleeplessByte As discussed on whatsapp! Two potentially alternatives, both faster, only real difference is some error messages change.

Draft PRs:

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.

Activity

  1. SleeplessByte commented on Nov 21, 2026

    @SleeplessByte
    Member

    What i think would be worth to explore before going either direction is to see:

    1. 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.
    2. 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.
    3. 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.
    4. 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.
    5. 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.

  2. exercism-agent commented on Nov 23, 2026

    @exercism-agent
    Contributor

    @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:

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions