Skip to content

Commit f376efa

Browse files
authored
feat: upgrade all dependencies to latest (#42)
* feat: upgrade uuid to version 13.0.0 and update transformIgnorePatterns in test configuration * feat: upgrade apollo server to latest with version from 4 to 5 migration - Install seperated express dependency * feat: upgrade all dependencies to latest * refactor: apply lint and prettier according to upgraded version
1 parent 393822d commit f376efa

File tree

8 files changed

+3007
-3548
lines changed

8 files changed

+3007
-3548
lines changed

.prettierrc

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,16 @@
22
"plugins": ["@trivago/prettier-plugin-sort-imports"],
33
"singleQuote": true,
44
"trailingComma": "all",
5-
"importOrder": ["^@nestjs/(.*)$", "<THIRD_PARTY_MODULES>", "^src/(.*)$", "^[./]"],
5+
"importOrder": [
6+
"^@nestjs/(.*)$",
7+
"<THIRD_PARTY_MODULES>",
8+
"^src/(.*)$",
9+
"^[./]"
10+
],
611
"importOrderSeparation": true,
712
"importOrderSortSpecifiers": true,
8-
"importOrderParserPlugins" : ["typescript", "[\"decorators-legacy\", {\"decoratorsBeforeExport\": true}]"]
9-
}
13+
"importOrderParserPlugins": [
14+
"typescript",
15+
"[\"decorators-legacy\", {\"decoratorsBeforeExport\": true}]"
16+
]
17+
}

README.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,10 @@ NestJS boilerplate with TypeORM, GraphQL and PostgreSQL
77
- [1. Open for Contribution](#1-open-for-contribution)
88

99
- [2. Getting Started](#2-getting-started)
10-
1110
- [2.1. Installation](#21-installation)
1211
- [2.2. Run](#22-run)
1312

1413
- [3. Docker](#3-docker)
15-
1614
- [3.1. Docker Compose Installation](#31-docker-compose-installation)
1715
- [3.2. Before Getting Started](#32-before-getting-started)
1816
- [3.3. Run](#33-run)
@@ -24,11 +22,9 @@ NestJS boilerplate with TypeORM, GraphQL and PostgreSQL
2422
- [5. PostgreSQL Database](#5-postgresql-database)
2523

2624
- [6. TypeORM](#6-typeorm)
27-
2825
- [6.1. Migration Setup and Usage](#61-migration-setup-and-usage)
2926

3027
- [7. GraphQL](#7-graphql)
31-
3228
- [7.1. Protected Queries/Mutation By Role](#71-protected-queriesmutation-by-role)
3329
- [7.2. GraphQL Query To Select and Relations](#72-graphql-query-to-select-and-relations)
3430
- [7.3. Field-Level Permission](#73-field-level-permission)
@@ -39,24 +35,20 @@ NestJS boilerplate with TypeORM, GraphQL and PostgreSQL
3935
- [9. Code generator](#9-code-generator)
4036

4137
- [10. Caching](#10-caching)
42-
4338
- [10.1. How To Use](#101-how-to-use)
4439

4540
- [11. TDD](#11-tdd)
46-
4741
- [11.1. Introduction](#111-introduction)
4842
- [11.2. Before Getting Started](#112-before-getting-started)
4943
- [11.3. Unit Test (with mock)](#113-unit-test-with-mock)
5044
- [11.4. Integration Test (with in-memory DB)](#114-integration-test-with-in-memory-db)
5145
- [11.5. End To End Test (with docker)](#115-end-to-end-test-with-docker)
5246

5347
- [12. CI](#12-ci)
54-
5548
- [12.1. Github Actions](#121-github-actions)
5649
- [12.2. Husky v9](#122-husky-v9)
5750

5851
- [13. SWC Compiler](#13-swc-compiler)
59-
6052
- [13.1. SWC + Jest error resolution](#131-swc--jest-error-resolution)
6153

6254
- [14. Todo](#14-todo)
@@ -494,13 +486,11 @@ db.public.registerFunction({
494486
## 14. Todo
495487
496488
- [x] TDD
497-
498489
- [x] Unit Test (Use mock)
499490
- [x] Integration Test (Use in-memory DB)
500491
- [x] End To End Test (Use docker)
501492
502493
- [x] CI
503-
504494
- [x] Github actions
505495
- [x] husky
506496

package.json

Lines changed: 50 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -37,80 +37,81 @@
3737
"migration:revert": "yarn typeorm migration:revert"
3838
},
3939
"dependencies": {
40-
"@apollo/server": "^4.12.2",
41-
"@aws-sdk/client-s3": "^3.842.0",
42-
"@aws-sdk/lib-storage": "^3.842.0",
43-
"@aws-sdk/types": "^3.840.0",
44-
"@nestjs/apollo": "^13.1.0",
45-
"@nestjs/axios": "^4.0.0",
40+
"@apollo/server": "^5.2.0",
41+
"@as-integrations/express5": "^1.1.2",
42+
"@aws-sdk/client-s3": "^3.943.0",
43+
"@aws-sdk/lib-storage": "^3.943.0",
44+
"@aws-sdk/types": "^3.936.0",
45+
"@nestjs/apollo": "^13.2.1",
46+
"@nestjs/axios": "^4.0.1",
4647
"@nestjs/cache-manager": "^3.0.1",
47-
"@nestjs/common": "^11.1.3",
48+
"@nestjs/common": "^11.1.9",
4849
"@nestjs/config": "^4.0.2",
49-
"@nestjs/core": "^11.1.3",
50-
"@nestjs/graphql": "^13.1.0",
51-
"@nestjs/jwt": "^11.0.0",
50+
"@nestjs/core": "^11.1.9",
51+
"@nestjs/graphql": "^13.2.0",
52+
"@nestjs/jwt": "^11.0.1",
5253
"@nestjs/passport": "^11.0.5",
53-
"@nestjs/platform-express": "^11.1.3",
54+
"@nestjs/platform-express": "^11.1.9",
5455
"@nestjs/terminus": "^11.0.0",
5556
"@nestjs/typeorm": "^11.0.0",
5657
"apollo-server-core": "^3.13.0",
5758
"apollo-server-express": "^3.13.0",
58-
"axios": "^1.10.0",
59+
"axios": "^1.13.2",
5960
"bcrypt": "^6.0.0",
60-
"cache-manager": "^7.0.1",
61+
"cache-manager": "^7.2.5",
6162
"class-transformer": "^0.5.1",
62-
"class-validator": "^0.14.2",
63-
"graphql": "^16.11.0",
63+
"class-validator": "^0.14.3",
64+
"graphql": "^16.12.0",
6465
"graphql-type-json": "^0.3.2",
6566
"graphql-upload": "^13.0.0",
66-
"ora": "^8.2.0",
67+
"ora": "^9.0.0",
6768
"passport": "^0.7.0",
6869
"passport-jwt": "^4.0.1",
6970
"passport-local": "^1.0.0",
7071
"pg": "^8.16.3",
7172
"reflect-metadata": "^0.2.2",
72-
"rimraf": "^6.0.1",
73+
"rimraf": "^6.1.2",
7374
"rxjs": "^7.8.2",
74-
"typeorm": "^0.3.25",
75-
"uuid": "^11.1.0"
75+
"typeorm": "^0.3.27",
76+
"uuid": "^13.0.0"
7677
},
7778
"devDependencies": {
78-
"@eslint/eslintrc": "^3.3.1",
79-
"@eslint/js": "^9.30.1",
80-
"@nestjs/cli": "^11.0.7",
81-
"@nestjs/schematics": "^11.0.5",
82-
"@nestjs/testing": "^11.1.3",
83-
"@swc/cli": "^0.7.7",
84-
"@swc/core": "^1.12.11",
85-
"@swc/jest": "^0.2.38",
86-
"@trivago/prettier-plugin-sort-imports": "^5.2.2",
87-
"@types/bcrypt": "^5.0.2",
88-
"@types/express": "^5.0.3",
79+
"@eslint/eslintrc": "^3.3.3",
80+
"@eslint/js": "^9.39.1",
81+
"@nestjs/cli": "^11.0.14",
82+
"@nestjs/schematics": "^11.0.9",
83+
"@nestjs/testing": "^11.1.9",
84+
"@swc/cli": "^0.7.9",
85+
"@swc/core": "^1.15.3",
86+
"@swc/jest": "^0.2.39",
87+
"@trivago/prettier-plugin-sort-imports": "^6.0.0",
88+
"@types/bcrypt": "^6.0.0",
89+
"@types/express": "^5.0.6",
8990
"@types/graphql-upload": "^8.0.12",
9091
"@types/jest": "30.0.0",
91-
"@types/node": "^22.15.31",
92+
"@types/node": "^24.10.1",
9293
"@types/passport-jwt": "^4.0.1",
9394
"@types/passport-local": "^1.0.38",
9495
"@types/supertest": "^6.0.3",
95-
"@types/uuid": "^10.0.0",
96-
"@typescript-eslint/eslint-plugin": "^8.36.0",
97-
"@typescript-eslint/parser": "^8.36.0",
98-
"eslint": "^9.30.1",
99-
"eslint-config-prettier": "^10.1.5",
100-
"eslint-plugin-prettier": "^5.5.1",
101-
"globals": "^16.3.0",
96+
"@types/uuid": "^11.0.0",
97+
"@typescript-eslint/eslint-plugin": "^8.48.1",
98+
"@typescript-eslint/parser": "^8.48.1",
99+
"eslint": "^9.39.1",
100+
"eslint-config-prettier": "^10.1.8",
101+
"eslint-plugin-prettier": "^5.5.4",
102+
"globals": "^16.5.0",
102103
"husky": "^9.1.7",
103-
"jest": "^30.0.4",
104+
"jest": "^30.2.0",
104105
"pg-mem": "^3.0.5",
105-
"plop": "^4.0.1",
106-
"prettier": "^3.6.2",
106+
"plop": "^4.0.4",
107+
"prettier": "^3.7.3",
107108
"source-map-support": "^0.5.21",
108-
"supertest": "^7.1.3",
109-
"ts-jest": "^29.4.0",
110-
"ts-loader": "^9.5.2",
109+
"supertest": "^7.1.4",
110+
"ts-jest": "^29.4.6",
111+
"ts-loader": "^9.5.4",
111112
"ts-node": "^10.9.2",
112113
"tsconfig-paths": "^4.2.0",
113-
"typescript": "5.8.3"
114+
"typescript": "5.9.3"
114115
},
115116
"jest": {
116117
"moduleFileExtensions": [
@@ -138,6 +139,9 @@
138139
"**/*.(t|j)s"
139140
],
140141
"coverageDirectory": "coverage",
141-
"testEnvironment": "node"
142+
"testEnvironment": "node",
143+
"transformIgnorePatterns": [
144+
"node_modules/(?!(uuid)/)"
145+
]
142146
}
143147
}

src/common/config/graphql-config.service.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@ import { httpStatusPlugin } from '../exceptions/exception.plugin';
1515
import { EnvironmentVariables } from '../helper/env.validation';
1616

1717
@Injectable()
18-
export class GraphqlConfigService
19-
implements GqlOptionsFactory<ApolloDriverConfig>
20-
{
18+
export class GraphqlConfigService implements GqlOptionsFactory<ApolloDriverConfig> {
2119
constructor(
2220
private readonly configService: ConfigService<EnvironmentVariables>,
2321
) {}

src/common/graphql/utils/types.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,9 @@ export interface GetInfoFromQueryProps<Entity> {
111111
select: FindOptionsSelect<Entity>;
112112
}
113113

114-
export interface AddKeyValueInObjectProps<Entity>
115-
extends GetInfoFromQueryProps<Entity> {
114+
export interface AddKeyValueInObjectProps<
115+
Entity,
116+
> extends GetInfoFromQueryProps<Entity> {
116117
stack: string[];
117118
expandRelation?: boolean;
118119
}

src/common/interceptors/repository.interceptor.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ import { DataSource, EntityTarget, ObjectLiteral } from 'typeorm';
1212
import { REPOSITORY_INTERCEPTOR } from '../decorators/repository-interceptor.decorator';
1313

1414
@Injectable()
15-
export class QueryIntercepter<T extends ObjectLiteral>
16-
implements NestInterceptor
17-
{
15+
export class QueryIntercepter<
16+
T extends ObjectLiteral,
17+
> implements NestInterceptor {
1818
constructor(private readonly dataSource: DataSource) {}
1919

2020
intercept(context: ExecutionContext, next: CallHandler): Observable<unknown> {

test/jest-e2e.json

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,10 @@
11
{
2-
"moduleFileExtensions": [
3-
"js",
4-
"json",
5-
"ts"
6-
],
2+
"moduleFileExtensions": ["js", "json", "ts"],
73
"rootDir": ".",
84
"testEnvironment": "node",
95
"testRegex": ".e2e-spec.ts$",
106
"transform": {
117
"^.+\\.(t|j)s$": "ts-jest"
128
},
13-
"moduleDirectories": [
14-
"<rootDir>/../",
15-
"node_modules"
16-
]
17-
}
9+
"moduleDirectories": ["<rootDir>/../", "node_modules"]
10+
}

0 commit comments

Comments
 (0)