Skip to content

Commit

Permalink
chore: Update package dependencies and remove unused entities
Browse files Browse the repository at this point in the history
  • Loading branch information
mayura-andrew committed Jul 31, 2024
1 parent b0bce78 commit 7010463
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 27 deletions.
23 changes: 1 addition & 22 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@
"pg": "^8.10.0",
"reflect-metadata": "^0.1.13",
"ts-node": "^10.9.1",
"typeorm": "^0.3.16",
"uuid": "^10.0.0"
"typeorm": "^0.3.16"
},
"devDependencies": {
"@types/bcrypt": "^5.0.0",
Expand All @@ -63,7 +62,6 @@
"@types/pg": "^8.10.1",
"@types/prettier": "^2.7.2",
"@types/supertest": "^2.0.12",
"@types/uuid": "^9.0.2",
"@typescript-eslint/eslint-plugin": "^5.62.0",
"@typescript-eslint/parser": "^5.59.5",
"eslint": "^8.46.0",
Expand Down
4 changes: 2 additions & 2 deletions src/entities/baseEntity.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { randomUUID } from 'crypto'
import {
BeforeInsert,
BeforeUpdate,
Column,
PrimaryGeneratedColumn
} from 'typeorm'
import { v4 as uuidv4 } from 'uuid'

class BaseEntity {
@PrimaryGeneratedColumn('uuid')
Expand All @@ -28,7 +28,7 @@ class BaseEntity {
@BeforeInsert()
async generateUuid(): Promise<void> {
if (!this.uuid) {
this.uuid = uuidv4()
this.uuid = randomUUID()
}
}
}
Expand Down

0 comments on commit 7010463

Please sign in to comment.