Gathering detailed insights and metrics for @swc-node/jest
Gathering detailed insights and metrics for @swc-node/jest
Gathering detailed insights and metrics for @swc-node/jest
Gathering detailed insights and metrics for @swc-node/jest
npm install @swc-node/jest
@swc-node/register@1.10.9
Published on 17 Jul 2024
@swc-node/register@1.10.8
Published on 16 Jul 2024
@swc-node/register@1.10.5
Published on 13 Jul 2024
@swc-node/register@1.10.3
Published on 08 Jul 2024
@swc-node/register@1.10.1
Published on 05 Jul 2024
@swc-node/register@1.10.0
Published on 28 Jun 2024
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
1,812 Stars
971 Commits
76 Forks
13 Watching
7 Branches
50 Contributors
Updated on 27 Nov 2024
Minified
Minified + Gzipped
TypeScript (94.89%)
JavaScript (4.98%)
Shell (0.13%)
Cumulative downloads
Total Downloads
Last day
-25.7%
5,914
Compared to previous day
Last week
26.1%
41,911
Compared to previous week
Last month
30.5%
140,539
Compared to previous month
Last year
-17.7%
1,665,555
Compared to previous year
3
3
2
swc-node
🚀 Help me to become a full-time open-source developer by sponsoring me on Github
Fast TypeScript/JavaScript
transformer without node-gyp
and postinstall script.
Run TypeScript with node, without compilation or typechecking:
1npm i -D @swc-node/register 2node -r @swc-node/register script.ts 3node --import @swc-node/register/esm-register script.ts # for esm project with node>=20.6 4node --loader @swc-node/register/esm script.ts # for esm project with node<=20.5, deprecated
Pass --enable-source-maps
to node for esm projects
Set environment variable SWCRC=true when you would like to load .swcrc file
1SWCRC=true node -r @swc-node/register script.ts
1#!/usr/bin/env -S node --import @swc-node/register/esm-register 2 3// your code
run with shebang, add TS_NODE_PROJECT=null
(#!/usr/bin/env TS_NODE_PROJECT=null node --import @swc-node/register/esm-register
) to use ignore tsconfig.json
Fastest TypeScript
transformer.
Detail: @swc-node/core
transform RxJS
AjaxObservable.ts
to ES2015 & CommonJSJavaScript
. Benchmark code: bench
Hardware info:
Model Name: MacBook Pro
Model Identifier: MacBookPro15,1
Processor Name: 6-Core Intel Core i7
Processor Speed: 2.6 GHz
Number of Processors: 1
Total Number of Cores: 6
L2 Cache (per Core): 256 KB
L3 Cache: 12 MB
Hyper-Threading Technology: Enabled
Memory: 16 GB
transformSync
1esbuild x 510 ops/sec ±1.28% (88 runs sampled) 2@swc-node/core x 438 ops/sec ±1.00% (88 runs sampled) 3typescript x 28.83 ops/sec ±10.20% (52 runs sampled) 4babel x 24.21 ops/sec ±10.66% (46 runs sampled) 5Transform rxjs/AjaxObservable.ts benchmark bench suite: Fastest is esbuild
transform
parallelUV_THREADPOOL_SIZE=11 yarn bench
1@swc-node/core x 1,253 ops/sec ±0.90% (75 runs sampled) 2esbuild x 914 ops/sec ±1.31% (77 runs sampled) 3Transform rxjs/AjaxObservable.ts parallel benchmark bench suite: Fastest is @swc-node/core
yarn bench
1@swc-node/core x 1,123 ops/sec ±0.95% (77 runs sampled) 2esbuild x 847 ops/sec ±3.74% (71 runs sampled) 3Transform rxjs/AjaxObservable.ts parallel benchmark bench suite: Fastest is @swc-node/core
Fastest jest TypeScript
transformer.
Detail: @swc-node/jest
Testing in pure
TypeScript
project, compile target isES2018
. Running withnpx jest --no-cache
,ts-jest
was configured withisolatedModules: true
Test Suites: 49 passed, 49 total
Tests: 254 passed, 254 total
Snapshots: 53 passed, 53 total
Time: 54.631 s
Ran all test suites.
✨ Done in 62.71s.
Test Suites: 49 passed, 49 total
Tests: 254 passed, 254 total
Snapshots: 53 passed, 53 total
Time: 10.511 s
Ran all test suites.
✨ Done in 14.34s.
Faster ts-node/register/transpile-only
alternative.
Detail: @swc-node/register
pnpm i
pnpm build
pnpm test
No vulnerabilities found.
No security vulnerabilities found.