Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): update dependency typescript to v5 #297

Merged
merged 5 commits into from
Jun 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
"@semantic-release/changelog": "6.0.3",
"@semantic-release/exec": "6.0.3",
"@semantic-release/git": "10.0.1",
"@tsconfig/node16-strictest": "1.0.4",
"@tsconfig/node20": "^20.1.4",
"@types/bcryptjs": "2.4.6",
"@types/cookie-parser": "1.4.7",
"@types/express": "4.17.21",
Expand Down Expand Up @@ -119,11 +119,10 @@
"ts-loader": "9.5.1",
"ts-node": "10.9.2",
"tsconfig-paths": "4.2.0",
"txtgen": "3.0.2",
"typeorm-extension": "2.8.1",
"typescript": "4.9.5"
"typescript": "5.4.5"
},
"engines": {
"node": ">=14"
"node": ">=20"
}
}
308 changes: 149 additions & 159 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

10 changes: 8 additions & 2 deletions src/auth/dto/__snapshots__/login-user.dto.spec.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ exports[`Login user validations should require all properties 1`] = `
"minLength": "password must be longer than or equal to 8 characters",
},
"property": "password",
"target": LoginUser {},
"target": LoginUser {
"password": undefined,
"username": undefined,
},
"value": undefined,
},
ValidationError {
Expand All @@ -25,7 +28,10 @@ exports[`Login user validations should require all properties 1`] = `
"maxLength": "username must be shorter than or equal to 30 characters",
},
"property": "username",
"target": LoginUser {},
"target": LoginUser {
"password": undefined,
"username": undefined,
},
"value": undefined,
},
]
Expand Down
18 changes: 15 additions & 3 deletions src/auth/dto/__snapshots__/register-user.dto.spec.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ exports[`Register user validations should require all properties 1`] = `
"isString": "email must be a string",
},
"property": "email",
"target": RegisterUser {},
"target": RegisterUser {
"email": undefined,
"password": undefined,
"username": undefined,
},
"value": undefined,
},
ValidationError {
Expand All @@ -25,7 +29,11 @@ exports[`Register user validations should require all properties 1`] = `
"minLength": "password must be longer than or equal to 8 characters",
},
"property": "password",
"target": RegisterUser {},
"target": RegisterUser {
"email": undefined,
"password": undefined,
"username": undefined,
},
"value": undefined,
},
ValidationError {
Expand All @@ -38,7 +46,11 @@ exports[`Register user validations should require all properties 1`] = `
"maxLength": "username must be shorter than or equal to 30 characters",
},
"property": "username",
"target": RegisterUser {},
"target": RegisterUser {
"email": undefined,
"password": undefined,
"username": undefined,
},
"value": undefined,
},
]
Expand Down
2 changes: 1 addition & 1 deletion src/auth/factories/update-user.factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export const updateUserFactory = FactoryBuilder.of(UpdateUser)
.props({
bio: faker.hacker.phrase,
email: () => faker.internet.email().toLowerCase(),
image: faker.internet.avatar,
image: faker.image.avatarGitHub,
newPassword: () => faker.internet.password({ length: 12, memorable: true }),
password: () => faker.internet.password(),
username: () => faker.internet.userName().toLowerCase(),
Expand Down
2 changes: 1 addition & 1 deletion src/auth/factories/user.factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export const userFactory = setSeederFactory(User, (faker) =>
User.fromPartial({
bio: faker.hacker.phrase(),
email: normalizeEmail(faker.internet.email()),
image: faker.internet.avatar(),
image: faker.image.avatarGitHub(),
password: credentials.password,
username: faker.internet.userName().toLowerCase(),
}),
Expand Down
3 changes: 1 addition & 2 deletions src/blog/factories/article.factory.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import * as txtgen from 'txtgen';
import { setSeederFactory } from 'typeorm-extension';

import { Article } from '~blog/entities/article.entity';

export const articleFactory = setSeederFactory(Article, (faker) =>
Article.fromPartial({
title: faker.company.catchPhrase(),
content: txtgen.paragraph(),
content: faker.lorem.paragraph(),
createdAt: faker.date.past(),
}),
);
3 changes: 1 addition & 2 deletions src/blog/factories/comment.factory.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import * as txtgen from 'txtgen';
import { setSeederFactory } from 'typeorm-extension';

import { Comment } from '~blog/entities/comment.entity';

export const commentFactory = setSeederFactory(Comment, (faker) =>
Comment.fromPartial({
body: txtgen.sentence(),
body: faker.lorem.sentence(),
createdAt: faker.date.past(),
}),
);
6 changes: 3 additions & 3 deletions src/blog/factories/create-article.factory.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { faker } from '@faker-js/faker';
import { FactoryBuilder } from 'factory.io';
import { paragraph, sentence } from 'txtgen';

import { CreateArticle } from '~blog/dto/create-article.dto';

export const createArticleFactory = FactoryBuilder.of(CreateArticle)
.props({
content: paragraph,
title: sentence,
content: faker.lorem.paragraph,
title: faker.lorem.sentence,
})
.build();
5 changes: 2 additions & 3 deletions src/blog/factories/update-article.factory.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import { faker } from '@faker-js/faker';
import { FactoryBuilder } from 'factory.io';
import { paragraph, sentence } from 'txtgen';

import { UpdateArticle } from '~blog/dto/update-article.dto';

export const updateArticleFactory = FactoryBuilder.of(UpdateArticle)
.props({
...(faker.datatype.boolean()
? { content: paragraph }
: { title: sentence }),
? { content: faker.lorem.paragraph }
: { title: faker.lorem.sentence }),
})
.build();
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "@tsconfig/node16-strictest/tsconfig.json",
"extends": "@tsconfig/node20/tsconfig.json",
"compilerOptions": {
"declaration": true,
"removeComments": true,
Expand All @@ -12,6 +12,7 @@
"baseUrl": ".",
"incremental": true,
"resolveJsonModule": true,
"strict": true,
"paths": {
"~app/*": ["src/*"],
"~auth/*": ["src/auth/*"],
Expand Down
Loading