fix: remove uuid dependency in favor of native node crypto.randomUUID

This commit is contained in:
Karol Sójko
2026-09-08 12:44:41 +02:00
parent 31d2b8a092
commit 7f179f63f2
4 changed files with 3 additions and 11 deletions
Generated
+1 -3
View File
@@ -6557,11 +6557,9 @@ const RAW_RUNTIME_STATE =
["@standardnotes/domain-core", "workspace:packages/domain-core"],\
["@types/jest", "npm:29.5.2"],\
["@types/node", "npm:20.5.7"],\
["@types/uuid", "npm:9.0.3"],\
["jest", "virtual:fd909b174d079e30b336c4ce72c38a88c1e447767b1a8dd7655e07719a1e31b97807f0931368724fc78897ff15e6a6d00b83316c0f76d11f85111f342e08bb79#npm:29.5.0"],\
["ts-jest", "virtual:fd909b174d079e30b336c4ce72c38a88c1e447767b1a8dd7655e07719a1e31b97807f0931368724fc78897ff15e6a6d00b83316c0f76d11f85111f342e08bb79#npm:29.1.0"],\
["typescript", "patch:typescript@npm%3A5.0.4#optional!builtin<compat/typescript>::version=5.0.4&hash=b5f058"],\
["uuid", "npm:9.0.0"]\
["typescript", "patch:typescript@npm%3A5.0.4#optional!builtin<compat/typescript>::version=5.0.4&hash=b5f058"]\
],\
"linkType": "SOFT"\
}]\
-4
View File
@@ -29,13 +29,9 @@
"lint:fix": "eslint . --ext .ts --fix",
"test": "jest --coverage --no-cache --passWithNoTests --maxWorkers=2"
},
"dependencies": {
"uuid": "^9.0.0"
},
"devDependencies": {
"@types/jest": "^29.5.1",
"@types/node": "^20.5.7",
"@types/uuid": "^9.0.3",
"jest": "^29.5.0",
"ts-jest": "^29.1.0",
"typescript": "^5.0.4"
@@ -1,10 +1,10 @@
/* istanbul ignore file */
import { v4 as uuid } from 'uuid'
import { randomUUID } from 'node:crypto'
import { Id } from './Id'
export class UniqueEntityId extends Id<string | number> {
constructor(id?: string | number) {
super(id ? id : uuid())
super(id ? id : randomUUID())
}
}
-2
View File
@@ -5912,11 +5912,9 @@ __metadata:
dependencies:
"@types/jest": "npm:^29.5.1"
"@types/node": "npm:^20.5.7"
"@types/uuid": "npm:^9.0.3"
jest: "npm:^29.5.0"
ts-jest: "npm:^29.1.0"
typescript: "npm:^5.0.4"
uuid: "npm:^9.0.0"
languageName: unknown
linkType: soft