diff --git a/src-ui/package.json b/src-ui/package.json index 9a3288e20..931536584 100644 --- a/src-ui/package.json +++ b/src-ui/package.json @@ -36,7 +36,7 @@ "rxjs": "^7.8.2", "tslib": "^2.8.1", "utif": "^3.1.0", - "uuid": "^11.1.0", + "uuid": "^13.0.0", "zone.js": "^0.15.1" }, "devDependencies": { diff --git a/src-ui/pnpm-lock.yaml b/src-ui/pnpm-lock.yaml index a7bd82568..5c75a1419 100644 --- a/src-ui/pnpm-lock.yaml +++ b/src-ui/pnpm-lock.yaml @@ -84,8 +84,8 @@ importers: specifier: ^3.1.0 version: 3.1.0 uuid: - specifier: ^11.1.0 - version: 11.1.0 + specifier: ^13.0.0 + version: 13.0.0 zone.js: specifier: ^0.15.1 version: 0.15.1 @@ -6610,8 +6610,8 @@ packages: resolution: {integrity: sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==} engines: {node: '>= 0.4.0'} - uuid@11.1.0: - resolution: {integrity: sha512-0/A9rDy9P7cJ+8w1c9WD9V//9Wj15Ce2MPz8Ri6032usz+NfePxx5AcN3bN+r6ZL6jEo066/yNYB3tn4pQEx+A==} + uuid@13.0.0: + resolution: {integrity: sha512-XQegIaBTVUjSHliKqcnFqYypAd4S+WCYt5NIeRs6w/UAry7z8Y9j5ZwRRL4kzq9U3sD6v+85er9FvkEaBpji2w==} hasBin: true uuid@8.3.2: @@ -14279,7 +14279,7 @@ snapshots: utils-merge@1.0.1: {} - uuid@11.1.0: {} + uuid@13.0.0: {} uuid@8.3.2: {} diff --git a/src-ui/setup-jest.ts b/src-ui/setup-jest.ts index c52c00647..c7bcabddb 100644 --- a/src-ui/setup-jest.ts +++ b/src-ui/setup-jest.ts @@ -145,4 +145,14 @@ HTMLCanvasElement.prototype.getContext = < typeof HTMLCanvasElement.prototype.getContext >jest.fn() +jest.mock('uuid', () => ({ + v4: jest.fn(() => + 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (char: string) => { + const random = Math.floor(Math.random() * 16) + const value = char === 'x' ? random : (random & 0x3) | 0x8 + return value.toString(16) + }) + ), +})) + jest.mock('pdfjs-dist')