Don't depend on uuid

This commit is contained in:
Andras Schmelczer 2025-12-14 17:08:37 +00:00
parent 439c066b57
commit e103bba12c
4 changed files with 14 additions and 442 deletions

View file

@ -17,7 +17,6 @@
"minimatch": "^10.1.1",
"p-queue": "^9.0.1",
"reconcile-text": "^0.8.0",
"uuid": "^13.0.0",
"@types/node": "^25.0.2",
"ts-loader": "^9.5.4",
"tslib": "2.8.1",
@ -28,4 +27,4 @@
"webpack-merge": "^6.0.1",
"@sentry/browser": "^10.30.0"
}
}
}

View file

@ -1,4 +1,4 @@
import { v4 as uuidv4 } from "uuid";
export function createClientId(): string {
// @ts-expect-error, injected by webpack
@ -8,8 +8,8 @@ export function createClientId(): string {
typeof navigator !== "undefined"
? navigator.platform // eslint-disable-line @typescript-eslint/no-deprecated
: typeof process !== "undefined"
? process.platform
: "unknown";
? process.platform
: "unknown";
return `vault-link/${packageVersion} (${uuidv4()}; ${platform})`;
return `vault-link/${packageVersion} (${Math.round(Math.random() * 1e10)}; ${platform})`;
}