Skip to content

Commit 7a7e2fe

Browse files
remove uuid package to use built-in crypto (#59)
1 parent 6d57320 commit 7a7e2fe

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838
"reflect-metadata": "0.2.2",
3939
"tslib": "2.8.1",
4040
"typeorm": "0.3.26",
41-
"uuid": "11.1.0",
4241
"zod": "4.1.7"
4342
},
4443
"devDependencies": {
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1+
import { randomUUID } from 'crypto';
12
import { injectable } from 'inversify';
2-
import { v4 as uuidv4 } from 'uuid';
33

44
import type { IIDGenerator } from '@/core/id/id-generator.interface';
55

66
@injectable()
77
export class UUIDGenerator implements IIDGenerator {
88
generate() {
9-
return uuidv4();
9+
return randomUUID();
1010
}
1111
}

yarn.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5146,7 +5146,7 @@ uri-js@^4.2.2:
51465146
dependencies:
51475147
punycode "^2.1.0"
51485148

5149-
uuid@11.1.0, uuid@^11.1.0:
5149+
uuid@^11.1.0:
51505150
version "11.1.0"
51515151
resolved "https://registry.yarnpkg.com/uuid/-/uuid-11.1.0.tgz#9549028be1753bb934fc96e2bca09bb4105ae912"
51525152
integrity sha512-0/A9rDy9P7cJ+8w1c9WD9V//9Wj15Ce2MPz8Ri6032usz+NfePxx5AcN3bN+r6ZL6jEo066/yNYB3tn4pQEx+A==

0 commit comments

Comments
 (0)