@swc/jest

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

Library
npm
v0.2.39
85stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
42/100Fair
Development Activity44
Maintenance4
Community48
Maturity52
Momentum20

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
71/100Good
Architecture70
Code Quality74
Innovation62
Learning Curve78

@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 22 apps in this directory

TypeScript
72%
AGPL 3.0

APITable

Low Code Platforms · Databases

15,526

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

View details
53
Repo Health
77
Technical
60
Dependency
Built with
TypeScript72%
Java22%
Updated 9 months ago
TypeScript
69%
Other

Budibase

Low Code Platforms · No Code Platforms

28,220

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

View details
92
Repo Health
81
Technical
63
Dependency
Built with
TypeScript69%
Svelte26%
Updated today
TypeScript
54%
Other

Focalboard

Productivity · Project Management · Collaboration

26,409

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

View details
58
Repo Health
82
Technical
67
Dependency
Built with
TypeScript54%
Go40%
Updated 3 months ago
TypeScript
48%
AGPL 3.0

Grafana

Monitoring · Analytics

76,300

The open-source observability platform that unifies metrics, logs, and traces from any data source into dynamic, queryable dashboards.

View details
95
Repo Health
91
Technical
65
Dependency
Built with
TypeScript48%
Go46%
Updated today
TypeScript
97%
Other

GrowthBook

Developer Tools · Analytics · Monitoring

8,138

Open source feature flags, A/B testing, and warehouse-native experimentation that queries your existing data infrastructure—no data movement required.

View details
92
Repo Health
85
Technical
66
Dependency
Built with
TypeScript97%
Updated today
TypeScript
98%
Other

Hexabot

AI Development · Automation

1,186

Build and run agentic workflows across channels with YAML, tools, and RAG

View details
79
Repo Health
76
Technical
70
Dependency
Built with
TypeScript98%
Updated yesterday
TypeScript
71%
Other

highlight.io

Developer Tools · Analytics · Monitoring

9,367

Open-source full-stack monitoring that unifies session replay, error tracking, logging, and distributed tracing so you can stop context-switching between tools.

View details
69
Repo Health
78
Technical
66
Dependency
Built with
TypeScript71%
Go16%
Updated yesterday
TypeScript
97%
MPL 2.0

Logto

Authentication

14,380

Open-source auth infrastructure for SaaS and AI apps with OIDC, SAML, and RBAC

View details
91
Repo Health
83
Technical
67
Dependency
Built with
TypeScript97%
Updated today
TypeScript
51%
Other

Mattermost

Team Chat · Collaboration · Devops

38,838

Open core, self-hosted team collaboration with chat, AI agents, voice calling, and deep DevOps integrations — all under your control.

View details
96
Repo Health
87
Technical
66
Dependency
Built with
TypeScript51%
Go40%
Updated today

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

Search