diff --git a/package-lock.json b/package-lock.json index 262cb7a7e..3b5831675 100644 --- a/package-lock.json +++ b/package-lock.json @@ -39,7 +39,6 @@ "seedrandom": "^3.0.5", "ts-node": "^10.9.2", "tsx": "^4.17.0", - "uuid": "^14.0.0", "winston": "^3.17.0", "ws": "^8.18.0", "zod": "^4.0.5" @@ -11983,19 +11982,6 @@ "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", "license": "MIT" }, - "node_modules/uuid": { - "version": "14.0.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-14.0.0.tgz", - "integrity": "sha512-Qo+uWgilfSmAhXCMav1uYFynlQO7fMFiMVZsQqZRMIXp0O7rR7qjkj+cPvBHLgBqi960QCoo/PH2/6ZtVqKvrg==", - "funding": [ - "https://github.com/sponsors/broofa", - "https://github.com/sponsors/ctavan" - ], - "license": "MIT", - "bin": { - "uuid": "dist-node/bin/uuid" - } - }, "node_modules/v8-compile-cache-lib": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", @@ -12296,22 +12282,6 @@ } } }, - "node_modules/vite-tsconfig-paths/node_modules/typescript": { - "version": "5.9.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", - "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", - "dev": true, - "license": "Apache-2.0", - "optional": true, - "peer": true, - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=14.17" - } - }, "node_modules/vite/node_modules/@esbuild/aix-ppc64": { "version": "0.27.2", "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.27.2.tgz", diff --git a/package.json b/package.json index 3689a7313..2cd9c63ef 100644 --- a/package.json +++ b/package.json @@ -123,7 +123,6 @@ "seedrandom": "^3.0.5", "ts-node": "^10.9.2", "tsx": "^4.17.0", - "uuid": "^14.0.0", "winston": "^3.17.0", "ws": "^8.18.0", "zod": "^4.0.5" diff --git a/src/client/UsernameInput.ts b/src/client/UsernameInput.ts index 69082ebea..c5defb899 100644 --- a/src/client/UsernameInput.ts +++ b/src/client/UsernameInput.ts @@ -1,7 +1,6 @@ import { LitElement, html } from "lit"; import { customElement, property, state } from "lit/decorators.js"; -import { v4 as uuidv4 } from "uuid"; -import { translateText } from "../client/Utils"; +import { generateCryptoRandomUUID, translateText } from "../client/Utils"; import { sanitizeClanTag } from "../core/Util"; import { MAX_CLAN_TAG_LENGTH, @@ -224,7 +223,7 @@ export class UsernameInput extends LitElement { } export function genAnonUsername(): string { - const uuid = uuidv4(); + const uuid = generateCryptoRandomUUID(); const cleanUuid = uuid.replace(/-/g, "").toLowerCase(); const decimal = BigInt(`0x${cleanUuid}`); const threeDigits = decimal % 1000n;