From 01c92b2303f9acd291a25c6fc476c9a12d99dbd6 Mon Sep 17 00:00:00 2001 From: Ly Tuan Kiet Date: Tue, 26 Nov 2024 04:33:23 +0700 Subject: [PATCH] Update package.json to include SWC dependencies and refactor Jest configuration; remove unused DevtoolsModule import from app.module.ts for cleaner code. --- package.json | 12 ++++++++++-- src/app.module.ts | 5 ----- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index ba89e22..70ff73b 100644 --- a/package.json +++ b/package.json @@ -112,6 +112,8 @@ "@nestjs/schematics": "^10.0.0", "@nestjs/testing": "^10.0.0", "@stylistic/eslint-plugin-js": "^2.9.0", + "@swc/cli": "^0.5.1", + "@swc/core": "^1.9.3", "@types/bcryptjs": "^2.4.6", "@types/express": "^4.17.17", "@types/jest": "^29.5.2", @@ -142,13 +144,19 @@ "ws": "^8.18.0" }, "jest": { - "moduleFileExtensions": ["js", "json", "ts"], + "moduleFileExtensions": [ + "js", + "json", + "ts" + ], "rootDir": "src", "testRegex": ".*\\.spec\\.ts$", "transform": { "^.+\\.(t|j)s$": "ts-jest" }, - "collectCoverageFrom": ["**/*.(t|j)s"], + "collectCoverageFrom": [ + "**/*.(t|j)s" + ], "coverageDirectory": "../coverage", "testEnvironment": "node" }, diff --git a/src/app.module.ts b/src/app.module.ts index 098a709..44b6f69 100644 --- a/src/app.module.ts +++ b/src/app.module.ts @@ -1,4 +1,3 @@ -import { DevtoolsModule } from '@nestjs/devtools-integration' import { ClerkModule } from './Clerk/clerk.module' import { ConfigModule } from '@nestjs/config' import { GraphqlModule } from './Graphql/graphql.module' @@ -10,10 +9,6 @@ import { CronModule } from './Cron/cron.module' @Module({ imports: [ - DevtoolsModule.register({ - http: process.env.NODE_ENV !== 'production', - port: 8000, - }), ConfigModule.forRoot({ isGlobal: true, }),