Skip to content

Commit

Permalink
chore(deps): replace external uuid dependency with node:crypto
Browse files Browse the repository at this point in the history
  • Loading branch information
Motii1 committed Apr 30, 2024
1 parent d4d025f commit b5fb022
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 37 deletions.
4 changes: 2 additions & 2 deletions lib/utils/create-config-factory.util.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { FactoryProvider } from '@nestjs/common/interfaces';
import { v4 as uuid } from 'uuid';
import { ConfigFactory } from '../interfaces';
import { getConfigToken } from './get-config-token.util';
import { ConfigFactoryKeyHost } from './register-as.util';
import { randomUUID } from "crypto";

/**
* @publicApi
Expand All @@ -11,7 +11,7 @@ export function createConfigProvider(
factory: ConfigFactory & ConfigFactoryKeyHost,
): FactoryProvider {
return {
provide: factory.KEY || getConfigToken(uuid()),
provide: factory.KEY || getConfigToken(randomUUID()),
useFactory: factory,
inject: [],
};
Expand Down
33 changes: 1 addition & 32 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 @@ -20,8 +20,7 @@
"dependencies": {
"dotenv": "16.4.5",
"dotenv-expand": "10.0.0",
"lodash": "4.17.21",
"uuid": "9.0.1"
"lodash": "4.17.21"
},
"devDependencies": {
"@commitlint/cli": "19.3.0",
Expand All @@ -33,7 +32,6 @@
"@types/jest": "29.5.12",
"@types/lodash": "4.17.0",
"@types/node": "20.12.7",
"@types/uuid": "9.0.8",
"@typescript-eslint/eslint-plugin": "7.8.0",
"@typescript-eslint/parser": "7.8.0",
"eslint": "8.57.0",
Expand Down

0 comments on commit b5fb022

Please sign in to comment.