Skip to content

Commit 91a6c46

Browse files
vladholubievclaude
andcommitted
chore: replace @shelf/babel-config with @swc/jest
- Remove @babel/cli, @babel/core, and @shelf/babel-config dependencies - Replace babel-jest transform with @swc/jest in jest preset - Update build command to use tsc instead of babel - Update tsconfig.json with ESNext module target and proper outDir configuration - Add TypeScript syntax support to SWC Jest configuration - All tests, lint, and type-check commands pass successfully 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent c8ffdf6 commit 91a6c46

File tree

3 files changed

+22
-10
lines changed

3 files changed

+22
-10
lines changed

package.json

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@
2121
"lib/"
2222
],
2323
"scripts": {
24-
"build": "rm -rf lib/ && pnpm run build:types && babel src --out-dir lib --ignore '**/*.test.ts' --extensions '.ts'",
25-
"build:types": "tsc --emitDeclarationOnly --declaration --isolatedModules false --declarationDir lib",
24+
"build": "rm -rf lib/ && tsc",
2625
"lint": "pnpm run lint:ci --fix",
2726
"lint:ci": "eslint . --quiet",
2827
"prepack": "pnpm run build",
@@ -31,9 +30,6 @@
3130
"type-check": "tsc --noEmit",
3231
"type-check:watch": "pnpm run type-check --watch"
3332
},
34-
"babel": {
35-
"extends": "@shelf/babel-config/backend"
36-
},
3733
"prettier": "@shelf/prettier-config",
3834
"jest": {
3935
"preset": "./jest-preset.js"
@@ -43,13 +39,11 @@
4339
"mongodb-memory-server": "10.3.0"
4440
},
4541
"devDependencies": {
46-
"@babel/cli": "7.28.0",
47-
"@babel/core": "7.28.0",
4842
"@jest/environment": "30.2.0",
49-
"@shelf/babel-config": "3.0.0",
5043
"@shelf/eslint-config": "5.2.3",
5144
"@shelf/prettier-config": "1.0.0",
5245
"@shelf/tsconfig": "0.1.0",
46+
"@swc/jest": "0.2.31",
5347
"@types/jest": "29.5.14",
5448
"@types/node": "22",
5549
"eslint": "9.32.0",

src/index.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,16 @@ export default {
66
globalSetup: resolve(__dirname, './setup.js'),
77
globalTeardown: resolve(__dirname, './teardown.js'),
88
testEnvironment: resolve(__dirname, './environment.js'),
9+
transform: {
10+
'^.+\\.(t|j)sx?$': [
11+
'@swc/jest',
12+
{
13+
jsc: {
14+
parser: {
15+
syntax: 'typescript',
16+
},
17+
},
18+
},
19+
],
20+
},
921
};

tsconfig.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
{
22
"extends": "@shelf/tsconfig/backend",
33
"compilerOptions": {
4-
"strict": true
4+
"strict": true,
5+
"module": "commonjs",
6+
"target": "ESNext",
7+
"moduleResolution": "node",
8+
"declaration": true,
9+
"resolveJsonModule": false,
10+
"outDir": "lib"
511
},
6-
"exclude": ["node_modules"],
12+
"exclude": ["node_modules", "**/*.test.*", "**/*.mock.ts"],
713
"include": ["src"]
814
}

0 commit comments

Comments
 (0)