Skip to content

Commit

Permalink
remove uuid in favor of nanoid
Browse files Browse the repository at this point in the history
  • Loading branch information
hmalik88 committed Dec 11, 2024
1 parent 4e41234 commit 621d9f9
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 16 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@
"ts-node": "^10.9.1",
"tsx": "^4.19.1",
"typescript": "~5.3.3",
"uuid": "^11.0.3",
"vite": "^4.3.9"
},
"packageManager": "[email protected]",
Expand Down
3 changes: 1 addition & 2 deletions packages/snaps-controllers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,7 @@
"readable-stream": "^3.6.2",
"readable-web-to-node-stream": "^3.0.2",
"semver": "^7.5.4",
"tar-stream": "^3.1.7",
"uuid": "^11.0.3"
"tar-stream": "^3.1.7"
},
"devDependencies": {
"@esbuild-plugins/node-globals-polyfill": "^0.2.3",
Expand Down
4 changes: 2 additions & 2 deletions packages/snaps-controllers/src/cronjob/CronjobController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {
} from '@metamask/snaps-utils';
import { assert, Duration, hasProperty, inMilliseconds } from '@metamask/utils';
import { castDraft } from 'immer';
import { v4 as uuid } from 'uuid';
import { nanoid } from 'nanoid';

import type {
GetAllSnaps,
Expand Down Expand Up @@ -502,7 +502,7 @@ export class CronjobController extends BaseController<
* @returns An id.
*/
private generateBackgroundEventId(): string {
const id = uuid();
const id = nanoid();
if (this.state.events[id]) {
this.generateBackgroundEventId();

Check warning on line 507 in packages/snaps-controllers/src/cronjob/CronjobController.ts

View check run for this annotation

Codecov / codecov/patch

packages/snaps-controllers/src/cronjob/CronjobController.ts#L507

Added line #L507 was not covered by tests
}
Expand Down
11 changes: 0 additions & 11 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5783,7 +5783,6 @@ __metadata:
tar-stream: "npm:^3.1.7"
ts-node: "npm:^10.9.1"
typescript: "npm:~5.3.3"
uuid: "npm:^11.0.3"
vite: "npm:^4.3.9"
vite-tsconfig-paths: "npm:^4.0.5"
wdio-chromedriver-service: "npm:^8.1.1"
Expand Down Expand Up @@ -20523,7 +20522,6 @@ __metadata:
ts-node: "npm:^10.9.1"
tsx: "npm:^4.19.1"
typescript: "npm:~5.3.3"
uuid: "npm:^11.0.3"
vite: "npm:^4.3.9"
languageName: unknown
linkType: soft
Expand Down Expand Up @@ -22673,15 +22671,6 @@ __metadata:
languageName: node
linkType: hard

"uuid@npm:^11.0.3":
version: 11.0.3
resolution: "uuid@npm:11.0.3"
bin:
uuid: dist/esm/bin/uuid
checksum: 10/251385563195709eb0697c74a834764eef28e1656d61174e35edbd129288acb4d95a43f4ce8a77b8c2fc128e2b55924296a0945f964b05b9173469d045625ff2
languageName: node
linkType: hard

"uuid@npm:^8.3.2":
version: 8.3.2
resolution: "uuid@npm:8.3.2"
Expand Down

0 comments on commit 621d9f9

Please sign in to comment.