-
Notifications
You must be signed in to change notification settings - Fork 167
Migrate Jest tooling to SWC #1239
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Co-authored-by: hortison <160366376+hortison@users.noreply.github.com>
Co-authored-by: hortison <160366376+hortison@users.noreply.github.com>
leecalcote
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Builds should speed up just a little.
This brings the ecosystem's build tooling in alignment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request migrates the Jest test transpilation infrastructure from ts-jest to SWC, aligning with the repository's ESNext build setup and improving build performance. The migration replaces ts-jest with @swc/jest and introduces a shared .swcrc configuration file.
Changes:
- Replaced ts-jest with @swc/core and @swc/jest in dependencies
- Updated jest.config.js to use @swc/jest transformer with CommonJS module output
- Added .swcrc configuration file with TypeScript/React support and ESM defaults
Reviewed changes
Copilot reviewed 2 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| package.json | Replaced ts-jest with @swc/core (^1.10.12) and @swc/jest (^0.2.37) |
| package-lock.json | Updated dependency tree with SWC packages and removed ts-jest related dependencies (bs-logger, handlebars, make-error, etc.) |
| jest.config.js | Replaced ts-jest preset with @swc/jest transform configuration targeting CommonJS modules |
| .swcrc | Added SWC configuration with ES2021 target, TypeScript/React support, and ES6 module type |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Lee Calcote <leecalcote@gmail.com>
Migrated test transpilation from ts-jest to SWC to align with the repo’s ESNext setup and speed up builds.
@swc/jesttransform and added shared.swcrctuned for TS/React with ESM defaults and Jest CJS output.@swc/core/@swc/jest, removed ts-jest, refreshed lockfile.Example transform configuration:
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.