From c5c0a4fdd0d17bbfb1d99efd43d7b84cee396fd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20O=C5=BC=C3=B3g?= Date: Fri, 11 Feb 2022 15:44:32 +0100 Subject: [PATCH] Intent fix from 2 to 4 --- jest.config.js | 38 ++++++------ nest-cli.json | 4 +- package.json | 144 ++++++++++++++++++++++---------------------- tsconfig.build.json | 9 ++- tsconfig.json | 48 ++++++++------- 5 files changed, 125 insertions(+), 118 deletions(-) diff --git a/jest.config.js b/jest.config.js index 8b2b0cd..b951d92 100644 --- a/jest.config.js +++ b/jest.config.js @@ -1,21 +1,21 @@ module.exports = { - preset: 'ts-jest', - testEnvironment: 'node', - collectCoverageFrom: [ - './src/**', - '!**/node_modules/**', - '!**/config/**', - '!**/*.module.ts', - '!**/*.schema.ts', - '!./src/App.ts', - '!./src/main.ts', - '!./src/constants/**', - '!./src/config/**', - '!./src/tests/**', - ], - moduleNameMapper: { "@src/(.*)": "/src/$1" }, - coverageReporters: [ 'text', 'text-summary', 'html', 'clover' ], - setupFilesAfterEnv: [ './src/tests/setupTests.ts' ], - testRegex: '.*\\.spec\\.ts$', - transform: { '^.+\\.(t|j)s$': 'ts-jest' }, + preset: 'ts-jest', + testEnvironment: 'node', + collectCoverageFrom: [ + './src/**', + '!**/node_modules/**', + '!**/config/**', + '!**/*.module.ts', + '!**/*.schema.ts', + '!./src/App.ts', + '!./src/main.ts', + '!./src/constants/**', + '!./src/config/**', + '!./src/tests/**', + ], + moduleNameMapper: { '@src/(.*)': '/src/$1' }, + coverageReporters: [ 'text', 'text-summary', 'html', 'clover' ], + setupFilesAfterEnv: [ './src/tests/setupTests.ts' ], + testRegex: '.*\\.spec\\.ts$', + transform: { '^.+\\.(t|j)s$': 'ts-jest' }, }; diff --git a/nest-cli.json b/nest-cli.json index 56167b3..ba9fe8d 100644 --- a/nest-cli.json +++ b/nest-cli.json @@ -1,4 +1,4 @@ { - "collection": "@nestjs/schematics", - "sourceRoot": "src" + "collection": "@nestjs/schematics", + "sourceRoot": "src" } diff --git a/package.json b/package.json index c239b67..9320d49 100644 --- a/package.json +++ b/package.json @@ -1,74 +1,74 @@ { - "name": "findme-server", - "version": "0.1.2", - "description": "", - "author": "Findock", - "private": true, - "scripts": { - "prebuild": "rimraf dist", - "build": "nest build", - "format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"", - "start": "nest start", - "start:dev": "nest start --watch", - "start:debug": "nest start --debug --watch", - "start:prod": "node dist/main", - "lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix", - "test:lint": "eslint \"{src,apps,libs,test}/**/*.ts\"", - "test": "jest", - "test:watch": "jest --watch", - "test:cov": "jest --coverage", - "test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand", - "docker:up": "docker-compose up", - "docker:up -d": "docker-compose up -d", - "docker:down": "docker-compose down", - "docker:clear": "docker rmi findme-server_app" - }, - "dependencies": { - "@nestjs/common": "^8.0.0", - "@nestjs/config": "^1.1.6", - "@nestjs/core": "^8.0.0", - "@nestjs/mongoose": "^9.0.2", - "@nestjs/platform-express": "^8.0.0", - "@nestjs/swagger": "^5.2.0", - "@types/crypto-js": "^4.1.0", - "@types/faker": "5.5.9", - "@types/figlet": "^1.5.4", - "@types/gradient-string": "^1.1.2", - "class-transformer": "^0.5.1", - "class-validator": "^0.13.2", - "crypto-js": "^4.1.1", - "faker": "5.5.3", - "figlet": "^1.5.2", - "gradient-string": "^2.0.0", - "i": "^0.3.7", - "mongoose": "^6.2.0", - "npm": "^8.4.1", - "reflect-metadata": "^0.1.13", - "rimraf": "^3.0.2", - "rxjs": "^7.2.0", - "swagger-ui-express": "^4.3.0" - }, - "devDependencies": { - "@nestjs/cli": "^8.0.0", - "@nestjs/schematics": "^8.0.0", - "@nestjs/testing": "^8.0.0", - "@types/express": "^4.17.13", - "@types/jest": "27.0.2", - "@types/node": "^16.0.0", - "@types/supertest": "^2.0.11", - "@typescript-eslint/eslint-plugin": "^5.0.0", - "@typescript-eslint/parser": "^5.0.0", - "eslint": "^8.0.1", - "eslint-config-prettier": "^8.3.0", - "eslint-plugin-prettier": "^4.0.0", - "jest": "^27.2.5", - "prettier": "^2.3.2", - "source-map-support": "^0.5.20", - "supertest": "^6.1.3", - "ts-jest": "^27.0.3", - "ts-loader": "^9.2.3", - "ts-node": "^10.0.0", - "tsconfig-paths": "^3.10.1", - "typescript": "^4.3.5" - } + "name": "findme-server", + "version": "0.1.2", + "description": "", + "author": "Findock", + "private": true, + "scripts": { + "prebuild": "rimraf dist", + "build": "nest build", + "format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"", + "start": "nest start", + "start:dev": "nest start --watch", + "start:debug": "nest start --debug --watch", + "start:prod": "node dist/main", + "lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix", + "test:lint": "eslint \"{src,apps,libs,test}/**/*.ts\"", + "test": "jest", + "test:watch": "jest --watch", + "test:cov": "jest --coverage", + "test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand", + "docker:up": "docker-compose up", + "docker:up -d": "docker-compose up -d", + "docker:down": "docker-compose down", + "docker:clear": "docker rmi findme-server_app" + }, + "dependencies": { + "@nestjs/common": "^8.0.0", + "@nestjs/config": "^1.1.6", + "@nestjs/core": "^8.0.0", + "@nestjs/mongoose": "^9.0.2", + "@nestjs/platform-express": "^8.0.0", + "@nestjs/swagger": "^5.2.0", + "@types/crypto-js": "^4.1.0", + "@types/faker": "5.5.9", + "@types/figlet": "^1.5.4", + "@types/gradient-string": "^1.1.2", + "class-transformer": "^0.5.1", + "class-validator": "^0.13.2", + "crypto-js": "^4.1.1", + "faker": "5.5.3", + "figlet": "^1.5.2", + "gradient-string": "^2.0.0", + "i": "^0.3.7", + "mongoose": "^6.2.0", + "npm": "^8.4.1", + "reflect-metadata": "^0.1.13", + "rimraf": "^3.0.2", + "rxjs": "^7.2.0", + "swagger-ui-express": "^4.3.0" + }, + "devDependencies": { + "@nestjs/cli": "^8.0.0", + "@nestjs/schematics": "^8.0.0", + "@nestjs/testing": "^8.0.0", + "@types/express": "^4.17.13", + "@types/jest": "27.0.2", + "@types/node": "^16.0.0", + "@types/supertest": "^2.0.11", + "@typescript-eslint/eslint-plugin": "^5.0.0", + "@typescript-eslint/parser": "^5.0.0", + "eslint": "^8.0.1", + "eslint-config-prettier": "^8.3.0", + "eslint-plugin-prettier": "^4.0.0", + "jest": "^27.2.5", + "prettier": "^2.3.2", + "source-map-support": "^0.5.20", + "supertest": "^6.1.3", + "ts-jest": "^27.0.3", + "ts-loader": "^9.2.3", + "ts-node": "^10.0.0", + "tsconfig-paths": "^3.10.1", + "typescript": "^4.3.5" + } } diff --git a/tsconfig.build.json b/tsconfig.build.json index 64f86c6..8a789fd 100644 --- a/tsconfig.build.json +++ b/tsconfig.build.json @@ -1,4 +1,9 @@ { - "extends": "./tsconfig.json", - "exclude": ["node_modules", "test", "dist", "**/*spec.ts"] + "extends": "./tsconfig.json", + "exclude": [ + "node_modules", + "test", + "dist", + "**/*spec.ts" + ] } diff --git a/tsconfig.json b/tsconfig.json index 4a060c4..1465c42 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,26 +1,28 @@ { - "compilerOptions": { - "module": "commonjs", - "declaration": true, - "removeComments": true, - "emitDecoratorMetadata": true, - "experimentalDecorators": true, - "allowSyntheticDefaultImports": true, - "target": "es2017", - "sourceMap": true, - "outDir": "./dist", - "baseUrl": "./", - "incremental": true, - "skipLibCheck": true, - "strictNullChecks": false, - "noImplicitAny": false, - "strictBindCallApply": false, - "forceConsistentCasingInFileNames": false, - "noFallthroughCasesInSwitch": false, - "resolveJsonModule": true, - "esModuleInterop": true, - "paths": { - "@src/*": ["src/*"] + "compilerOptions": { + "module": "commonjs", + "declaration": true, + "removeComments": true, + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "allowSyntheticDefaultImports": true, + "target": "es2017", + "sourceMap": true, + "outDir": "./dist", + "baseUrl": "./", + "incremental": true, + "skipLibCheck": true, + "strictNullChecks": false, + "noImplicitAny": false, + "strictBindCallApply": false, + "forceConsistentCasingInFileNames": false, + "noFallthroughCasesInSwitch": false, + "resolveJsonModule": true, + "esModuleInterop": true, + "paths": { + "@src/*": [ + "src/*" + ] + } } - } }