Skip to content

Commit b5fb022

Browse files
committed
chore(deps): replace external uuid dependency with node:crypto
1 parent d4d025f commit b5fb022

File tree

3 files changed

+4
-37
lines changed

3 files changed

+4
-37
lines changed

lib/utils/create-config-factory.util.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { FactoryProvider } from '@nestjs/common/interfaces';
2-
import { v4 as uuid } from 'uuid';
32
import { ConfigFactory } from '../interfaces';
43
import { getConfigToken } from './get-config-token.util';
54
import { ConfigFactoryKeyHost } from './register-as.util';
5+
import { randomUUID } from "crypto";
66

77
/**
88
* @publicApi
@@ -11,7 +11,7 @@ export function createConfigProvider(
1111
factory: ConfigFactory & ConfigFactoryKeyHost,
1212
): FactoryProvider {
1313
return {
14-
provide: factory.KEY || getConfigToken(uuid()),
14+
provide: factory.KEY || getConfigToken(randomUUID()),
1515
useFactory: factory,
1616
inject: [],
1717
};

package-lock.json

+1-32
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-3
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@
2020
"dependencies": {
2121
"dotenv": "16.4.5",
2222
"dotenv-expand": "10.0.0",
23-
"lodash": "4.17.21",
24-
"uuid": "9.0.1"
23+
"lodash": "4.17.21"
2524
},
2625
"devDependencies": {
2726
"@commitlint/cli": "19.3.0",
@@ -33,7 +32,6 @@
3332
"@types/jest": "29.5.12",
3433
"@types/lodash": "4.17.0",
3534
"@types/node": "20.12.7",
36-
"@types/uuid": "9.0.8",
3735
"@typescript-eslint/eslint-plugin": "7.8.0",
3836
"@typescript-eslint/parser": "7.8.0",
3937
"eslint": "8.57.0",

0 commit comments

Comments
 (0)