Skip to content

Commit 8f49537

Browse files
authored
Merge pull request #37 from ThomasOliver545/2022/update-deps
2022/update deps
2 parents 8d7e79d + 0f6af7c commit 8f49537

File tree

9 files changed

+19708
-21108
lines changed

9 files changed

+19708
-21108
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,13 @@ If you are coming from a specific video, you can have a look at the commits, the
22
Hint: Upon 2022 the new features are not prefixed like this anymore (cause there isn't a video for every step anymore).
33

44
# Updated 2022 (Project now dockerized)
5-
This Project is now dockerized.
5+
1. Angular is updated to v13 and NestJS is updated to v8.
6+
2. This Project is now dockerized.
67
We have one Dockerfile for the api (NestJS) and one for the frontend(Angular).
78
On the top file level there is a `docker-compose.yml` file that you can start, there is also the database and everything configured. So you don't need to do anything else than run `docker-compose up`.
89

10+
(A Video covering these updates will be released within January 2022).
11+
912
# Instructions to run the Project
1013

1114
## With Docker

api/package-lock.json

Lines changed: 0 additions & 12649 deletions
This file was deleted.

api/package.json

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -22,48 +22,48 @@
2222
"test:e2e": "jest --config ./test/jest-e2e.json"
2323
},
2424
"dependencies": {
25-
"@nestjs/common": "^7.0.0",
26-
"@nestjs/config": "^0.4.0",
27-
"@nestjs/core": "^7.0.0",
28-
"@nestjs/jwt": "^7.0.0",
29-
"@nestjs/passport": "^7.0.0",
30-
"@nestjs/platform-express": "^7.2.0",
25+
"@nestjs/common": "^8.2.4",
26+
"@nestjs/config": "^1.1.5",
27+
"@nestjs/core": "^8.2.4",
28+
"@nestjs/jwt": "^8.0.0",
29+
"@nestjs/passport": "^8.0.1",
30+
"@nestjs/platform-express": "^8.2.4",
3131
"@nestjs/serve-static": "^2.1.3",
32-
"@nestjs/typeorm": "^7.0.0",
33-
"bcrypt": "^4.0.1",
34-
"nestjs-typeorm-paginate": "^2.0.3",
32+
"@nestjs/typeorm": "^8.0.2",
33+
"bcrypt": "^5.0.1",
34+
"nestjs-typeorm-paginate": "^3.1.3",
3535
"passport": "^0.4.1",
3636
"passport-jwt": "^4.0.0",
37-
"pg": "^8.0.3",
37+
"pg": "^8.6.0",
3838
"reflect-metadata": "^0.1.13",
3939
"rimraf": "^3.0.2",
40-
"rxjs": "^6.5.4",
40+
"rxjs": "^7.2.0",
4141
"slugify": "^1.4.5",
42-
"typeorm": "^0.2.25",
42+
"typeorm": "^0.2.41",
4343
"uuid": "^8.2.0"
4444
},
4545
"devDependencies": {
46-
"@nestjs/cli": "^7.0.0",
47-
"@nestjs/schematics": "^7.0.0",
48-
"@nestjs/testing": "^7.0.0",
49-
"@types/express": "^4.17.3",
50-
"@types/jest": "25.1.4",
51-
"@types/node": "^13.9.1",
46+
"@nestjs/cli": "^8.1.6",
47+
"@nestjs/schematics": "^8.0.5",
48+
"@nestjs/testing": "^8.2.4",
49+
"@types/express": "^4.17.13",
50+
"@types/jest": "27.0.2",
51+
"@types/node": "^16.0.0",
5252
"@types/passport-jwt": "^3.0.3",
53-
"@types/supertest": "^2.0.8",
54-
"@typescript-eslint/eslint-plugin": "^2.23.0",
55-
"@typescript-eslint/parser": "^2.23.0",
56-
"eslint": "^6.8.0",
57-
"eslint-config-prettier": "^6.10.0",
58-
"eslint-plugin-import": "^2.20.1",
59-
"jest": "^25.1.0",
60-
"prettier": "^1.19.1",
61-
"supertest": "^4.0.2",
62-
"ts-jest": "25.2.1",
63-
"ts-loader": "^6.2.1",
64-
"ts-node": "^8.6.2",
65-
"tsconfig-paths": "^3.9.0",
66-
"typescript": "^3.7.4"
53+
"@types/supertest": "^2.0.11",
54+
"@typescript-eslint/eslint-plugin": "^5.0.0",
55+
"@typescript-eslint/parser": "^5.0.0",
56+
"eslint": "^8.0.1",
57+
"eslint-config-prettier": "^8.3.0",
58+
"eslint-plugin-prettier": "^4.0.0",
59+
"jest": "^27.2.5",
60+
"prettier": "^2.3.2",
61+
"supertest": "^6.1.3",
62+
"ts-jest": "^27.0.3",
63+
"ts-loader": "^9.2.3",
64+
"ts-node": "^10.0.0",
65+
"tsconfig-paths": "^3.10.1",
66+
"typescript": "^4.3.5"
6767
},
6868
"jest": {
6969
"moduleFileExtensions": [

api/src/user/service/user.service.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ export class UserService {
6666

6767
paginateFilterByUsername(options: IPaginationOptions, user: User): Observable<Pagination<User>>{
6868
return from(this.userRepository.findAndCount({
69-
skip: options.page * options.limit || 0,
70-
take: options.limit || 10,
69+
skip: Number(options.page) * Number(options.limit) || 0,
70+
take: Number(options.limit) || 10,
7171
order: {id: "ASC"},
7272
select: ['id', 'name', 'username', 'email', 'role'],
7373
where: [
@@ -80,15 +80,15 @@ export class UserService {
8080
links: {
8181
first: options.route + `?limit=${options.limit}`,
8282
previous: options.route + ``,
83-
next: options.route + `?limit=${options.limit}&page=${options.page +1}`,
84-
last: options.route + `?limit=${options.limit}&page=${Math.ceil(totalUsers / options.limit)}`
83+
next: options.route + `?limit=${options.limit}&page=${Number(options.page) + 1}`,
84+
last: options.route + `?limit=${options.limit}&page=${Math.ceil(totalUsers / Number(options.limit))}`
8585
},
8686
meta: {
87-
currentPage: options.page,
87+
currentPage: Number(options.page),
8888
itemCount: users.length,
89-
itemsPerPage: options.limit,
89+
itemsPerPage: Number(options.limit),
9090
totalItems: totalUsers,
91-
totalPages: Math.ceil(totalUsers / options.limit)
91+
totalPages: Math.ceil(totalUsers / Number(options.limit))
9292
}
9393
};
9494
return usersPageable;

frontend/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ speed-measure-plugin*.json
3232
.history/*
3333

3434
# misc
35+
/.angular/cache
3536
/.sass-cache
3637
/connect.lock
3738
/coverage

frontend/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ WORKDIR /thomas/frontend/src/app
66
COPY package*.json ./
77

88
RUN npm install
9-
RUN npm install -g @angular/cli@12.0.0
9+
RUN npm install -g @angular/cli@13.0.0
1010

1111
COPY . .
1212

0 commit comments

Comments
 (0)