@swc/jest

A Jest transform that compiles TypeScript and JSX with the Rust-based SWC compiler instead of Babel.

Library
npm
v0.2.39
86 stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
43 /100 Fair
Development Activity 44
Maintenance 8
Community 48
Maturity 52
Momentum 20

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
71 /100 Good
Architecture 70
Code Quality 74
Innovation 62
Learning Curve 78

@swc/jest is Jest’s official-style integration for SWC, a Rust-based JavaScript/TypeScript compiler. Registered as a transform in jest.config.js, it replaces slower Babel- or ts-jest-based transforms with SWC’s native compilation, while still reading project .swcrc configuration, computing Jest-compatible cache keys, and supporting Jest’s code-coverage instrumentation hooks.

What You Get

  • A drop-in Jest transform registered via the transform config key, replacing babel-jest or ts-jest
  • Automatic .swcrc config loading with JSONC parsing, or inline transform options passed from jest.config.js
  • Correct ESM vs CommonJS module output based on Jest’s supportsStaticESM flag per test file
  • Coverage instrumentation support via automatic injection of the swc-plugin-coverage-instrument SWC plugin when Jest runs with —coverage

Common Use Cases

  • Speeding up a large Jest test suite’s TypeScript/JSX compilation by swapping ts-jest or babel-jest for SWC
  • Running Jest against ESM-authored source files with correct static-ESM output per Jest’s per-file module detection
  • Collecting accurate code coverage from SWC-compiled tests via the custom coverage instrumentation option
  • Sharing a single .swcrc configuration between a project’s build pipeline and its Jest test transform

Under The Hood

Architecture: index.ts exports createTransformer(), whose returned object implements Jest’s Transformer interface: process()/processAsync() call @swc/core’s transformSync/transform respectively, always overriding the module.type option per-file based on Jest’s supportsStaticESM flag, while getCacheKey() combines the SWC version, package version, and computed SWC options into a Jest-compatible cache key via @jest/create-cache-key-function; a separate buildSwcTransformOpts() helper merges explicit options with .swcrc (parsed via jsonc-parser to tolerate comments), defaults jsc.target from the running Node version, and forces jsc.transform.hidden.jest plus inline sourceMaps. Tech Stack: TypeScript compiled with tsc as part of a pnpm/Turborepo-style monorepo (swc-project/pkgs) alongside swc-loader and @swc/cli, with @swc/core and @jest/transform as its core dependency/peer surface and jsonc-parser for tolerant .swcrc parsing. Code Quality: The transformer is a single well-scoped 215-line index.ts with small pure helper functions (nodeTarget, insertInstrumentationOptions, set) and no classes; the monorepo runs eslint across packages, though this specific package’s own dedicated test suite is thin relative to its role as a widely-depended-on transform, relying more on downstream consumer test suites for real-world validation. API Design: Configuration is minimal, point Jest’s transform map at ‘@swc/jest’ with an optional inline options object, and it just works with existing .swcrc files, requiring no new mental model for teams already using SWC elsewhere in their toolchain.

Used by 47 apps in this directory

TypeScript
82%
Other

AFFiNE

Collaboration · Note Taking · Productivity

73,040

Write, draw, and plan in one infinite canvas — the open-source alternative to Notion and Miro that keeps your data yours.

View details
91
Repo Health
87
Technical
67
Dependency
Built with
TypeScript 82%
Rust 11%
Updated 1 weeks ago
TypeScript
56%
Other

agenta

AI Development · Developer Tools · Devops

4,788

The open-source LLMOps platform unifying prompt engineering, evaluation, and observability for teams building reliable LLM applications.

View details
91
Repo Health
77
Technical
67
Dependency
Built with
TypeScript 56%
Python 39%
Updated 1 weeks ago
TypeScript
72%
AGPL 3.0

APITable

Databases · Low Code Platforms

15,623

API-first collaborative spreadsheet-database platform that auto-generates REST APIs and lets teams build internal tools, CRMs, and dashboards without code.

View details
71
Repo Health
77
Technical
60
Dependency
Built with
TypeScript 72%
Java 22%
Updated 1 months ago
TypeScript
96%
Other

Amplication

AI Code Assistants · Automation · Developer Tools

16,015

Create production-ready backend services with your organization's standards baked in — generating NestJS, Prisma, and GraphQL code that you own and control.

View details
58
Repo Health
84
Technical
60
Dependency
Built with
TypeScript 96%
Updated 3 months ago
Python
55%
Other

authentik

Authentication · Security

25,758

The self-hosted Identity Provider that replaces Okta, Auth0, and Entra ID with a unified SSO platform supporting SAML, OAuth2/OIDC, LDAP, RADIUS, and WebAuthn.

View details
92
Repo Health
81
Technical
66
Dependency
Built with
Python 55%
TypeScript 36%
Updated 1 weeks ago
TypeScript
70%
Other

Budibase

Low Code Platforms · No Code Platforms

28,324

Build AI agents, automations, and internal apps on a single open-source platform with full self-hosting control.

View details
91
Repo Health
81
Technical
63
Dependency
Built with
TypeScript 70%
Svelte 26%
Updated 2 weeks ago
TypeScript
84%
Apache 2.0

Continue

AI Code Assistants · AI Development · Automation

36,049

Open-source coding agent for VS Code, JetBrains, and CLI with support for 30+ LLM providers.

View details
73
Repo Health
88
Technical
62
Dependency
Built with
TypeScript 84%
Updated 1 weeks ago
TypeScript
88%
MIT

Drawnix

Design Tools · Productivity

14,848

All-in-one open-source whiteboard combining mind maps, flowcharts, and freehand drawing on a single infinite canvas.

View details
65
Repo Health
69
Technical
79
Dependency
Built with
TypeScript 88%
Updated 1 months ago
TypeScript
54%
Other

Focalboard

Collaboration · Productivity · Project Management

26,491

Self-hosted, open source project management with Kanban, table, gallery, and calendar views — a privacy-first alternative to Trello, Notion, and Asana.

View details
56
Repo Health
82
Technical
64
Dependency
Built with
TypeScript 54%
Go 40%
Updated 4 months ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers