Skip to content

Commit

Permalink
build: Replace babel with swc
Browse files Browse the repository at this point in the history
  • Loading branch information
Valentin Palkovič committed Mar 28, 2022
1 parent c9dbea9 commit d0e68ed
Show file tree
Hide file tree
Showing 5 changed files with 193 additions and 1,117 deletions.
13 changes: 0 additions & 13 deletions .babelrc.json

This file was deleted.

19 changes: 19 additions & 0 deletions .swcrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"module": {
"type": "commonjs"
},
"jsc": {
"parser": {
"syntax": "typescript",
"tsx": false,
"decorators": false,
"dynamicImport": false,
"target": "es2016"
}
},
"env": {
"targets": {
"node": "14"
}
}
}
2 changes: 1 addition & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ module.exports = {
coverageProvider: 'v8',
timers: 'modern',
transform: {
'^.+\\.[t|j]sx?$': 'babel-jest',
'^.+\\.(t|j)sx?$': ['@swc/jest'],
},
}
13 changes: 5 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,25 +32,24 @@
"@prisma/sdk": "3.11.1"
},
"devDependencies": {
"@babel/cli": "^7.14.8",
"@babel/core": "^7.15.0",
"@babel/preset-env": "^7.15.0",
"@babel/preset-typescript": "^7.15.0",
"@prisma/client": "3.11.1",
"@semantic-release/changelog": "^6.0.1",
"@semantic-release/commit-analyzer": "^9.0.2",
"@semantic-release/git": "^10.0.1",
"@semantic-release/github": "^8.0.2",
"@semantic-release/npm": "^9.0.0",
"@semantic-release/release-notes-generator": "^10.0.3",
"@swc/cli": "^0.1.56",
"@swc/core": "^1.2.160",
"@swc/jest": "^0.2.20",
"@types/jest": "27.4.1",
"@types/json-schema": "^7.0.9",
"@types/node": "^17.0.0",
"@typescript-eslint/eslint-plugin": "5.16.0",
"@typescript-eslint/parser": "5.16.0",
"ajv": "^8.6.2",
"ajv-formats": "^2.1.1",
"babel-jest": "^27.1.0",
"browserslist": "^4.20.2",
"conventional-changelog-conventionalcommits": "^4.6.3",
"eslint": "8.11.0",
"eslint-config-prettier": "8.5.0",
Expand All @@ -61,15 +60,13 @@
"prettier": "2.6.1",
"prisma": "^3.0.1",
"semantic-release": "^19.0.2",
"ts-jest": "^27.0.5",
"ts-node": "^10.2.1",
"typescript": "^4.4.2"
},
"scripts": {
"generate": "prisma generate",
"clean": "rm -rf dist",
"type-check": "tsc",
"build": "npm run clean && babel src --out-dir dist --extensions '.ts'",
"build": "npm run clean && swc src --out-dir dist --extensions '.ts'",
"test": "jest src",
"lint": "eslint --ext .ts \"src/**/*.ts\"",
"lint:fix": "npm run lint --fix",
Expand Down
Loading

0 comments on commit d0e68ed

Please sign in to comment.