Skip to content

Commit

Permalink
perf(security): use builtin UUID support
Browse files Browse the repository at this point in the history
- Replace client generator with crypto API.
- Remove uuid package.
  • Loading branch information
skjsjhb committed Jan 18, 2025
1 parent 62a723f commit 95e8dfb
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 12 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@
"react-i18next": "^15.4.0",
"react-use": "^17.6.0",
"superserial": "^0.3.5",
"uuid": "^11.0.3",
"wouter": "^3.3.5",
"yaml": "^2.7.0"
},
Expand Down
9 changes: 0 additions & 9 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/main/conf/conf.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { Channels } from "@/main/ipc/channels";
import { ipcMain } from "electron";
import fs from "fs-extra";
import { randomUUID } from "node:crypto";
import os from "node:os";
import path from "path";
import * as uuid from "uuid";

/**
* The config (v2) module which has enhanced type support.
Expand Down Expand Up @@ -158,7 +158,7 @@ const DEFAULT_CONFIG = {
/**
* The ID to identify the client.
*/
id: uuid.v7().replaceAll("-", "")
id: randomUUID().replaceAll("-", "")
},

/**
Expand Down

0 comments on commit 95e8dfb

Please sign in to comment.