diff --git a/package-lock.json b/package-lock.json index 721541c88eccd5ccc71cf07c6ef4943277d8d147..87b7ef0c830f3c4ac3bfad12f6ec2fce855ce137 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,11 +20,12 @@ "nice-grpc": "^2.1.7", "path": "^0.12.7", "typescript": "^5.3.3", - "uuidv4": "^6.2.13" + "uuid": "^9.0.1" }, "devDependencies": { "@types/express-ws": "^3.0.4", "@types/lodash": "^4.14.202", + "@types/uuid": "^9.0.8", "grpc-tools": "^1.12.4", "ts-proto": "^1.167.2" } @@ -233,9 +234,10 @@ } }, "node_modules/@types/uuid": { - "version": "8.3.4", - "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-8.3.4.tgz", - "integrity": "sha512-c/I8ZRb51j+pYGAu5CrFMRxqZ2ke4y2grEBO5AUjgSkSk+qT2Ea+OdWElz/OiMf5MNpn2b17kuVBwZLQJXzihw==" + "version": "9.0.8", + "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-9.0.8.tgz", + "integrity": "sha512-jg+97EGIcY9AGHJJRaaPVgetKDsrTgbRjQ5Msgjh/DQKEFl0DtyRr/VCOyD1T2R1MNeWPK/u7JoGhlDZnKBAfA==", + "dev": true }, "node_modules/@types/ws": { "version": "8.5.10", @@ -1757,22 +1759,17 @@ } }, "node_modules/uuid": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], "bin": { "uuid": "dist/bin/uuid" } }, - "node_modules/uuidv4": { - "version": "6.2.13", - "resolved": "https://registry.npmjs.org/uuidv4/-/uuidv4-6.2.13.tgz", - "integrity": "sha512-AXyzMjazYB3ovL3q051VLH06Ixj//Knx7QnUSi1T//Ie3io6CpsPu9nVMOx5MoLWh6xV0B9J0hIaxungxXUbPQ==", - "dependencies": { - "@types/uuid": "8.3.4", - "uuid": "8.3.2" - } - }, "node_modules/vary": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", diff --git a/package.json b/package.json index f9c05a654e081adc537cb816bf1c202db3a86312..4f3a1c3230b30b0ba15e5992ddb9165bfd8c285a 100644 --- a/package.json +++ b/package.json @@ -21,11 +21,12 @@ "nice-grpc": "^2.1.7", "path": "^0.12.7", "typescript": "^5.3.3", - "uuidv4": "^6.2.13" + "uuid": "^9.0.1" }, "devDependencies": { "@types/express-ws": "^3.0.4", "@types/lodash": "^4.14.202", + "@types/uuid": "^9.0.8", "grpc-tools": "^1.12.4", "ts-proto": "^1.167.2" } diff --git a/src/tests/grpcTests.ts b/src/tests/grpcTests.ts index da8952805e539376ba01b9f70ff668afac7b02a7..266b73998fe10b4c8b08f631515b2e11c5855e6b 100644 --- a/src/tests/grpcTests.ts +++ b/src/tests/grpcTests.ts @@ -4,7 +4,7 @@ import { createChannel, createClient } from 'nice-grpc'; import { Order, TestResults, UserPatchRequest } from "../types"; import { avgRuntime } from "../testing"; import constants from "../constants"; -import { uuid } from "uuidv4"; +import { v4 } from "uuid"; export default class GrpcTestSuite implements ITestSuite { private channel: any; @@ -185,7 +185,7 @@ export default class GrpcTestSuite implements ITestSuite { results.ordersByUser = await avgRuntime(async () => await this.testOrdersByUser(constants.TEST_USER_ID), iterations, constants.EXPECTED_ORDERSBYUSER); results.orderById = await avgRuntime(async () => await this.testOrderById(constants.TEST_ORDER_ID), iterations, constants.EXPECTED_ORDER); results.allUsers = await avgRuntime(async () => await this.testAllUsers(), iterations, constants.EXPECTED_USERS); - results.insertOrder = await avgRuntime(async () => await this.testInsertOrder({ id: uuid(), ...constants.TEST_ORDER }), iterations); + results.insertOrder = await avgRuntime(async () => await this.testInsertOrder({ id: v4(), ...constants.TEST_ORDER }), iterations); results.updateUser = await avgRuntime(async () => await this.testUpdateUser(constants.TEST_UPDATE), iterations); return results; } diff --git a/src/tests/restTests.ts b/src/tests/restTests.ts index 580a439d408c83be1ca3a557888a1302114a1200..54b9878615db2ac88f301d0106ec828dfab33f3e 100644 --- a/src/tests/restTests.ts +++ b/src/tests/restTests.ts @@ -1,7 +1,7 @@ import { ITestSuite } from '../interfaces'; import { Category, EndpointReturn, Order, Product, TestResults, User, UserPatchRequest } from '../types'; import { avgRuntime } from '../testing'; -import { uuid } from 'uuidv4'; +import { v4 } from "uuid"; import constants from '../constants'; export default class RestTestSuite implements ITestSuite { @@ -216,7 +216,7 @@ export default class RestTestSuite implements ITestSuite { results.ordersByUser = await avgRuntime(async () => await this.testOrdersByUser(constants.TEST_USER_ID), iterations, constants.EXPECTED_ORDERSBYUSER); results.orderById = await avgRuntime(async () => await this.testOrderById(constants.TEST_ORDER_ID), iterations, constants.EXPECTED_ORDER); results.allUsers = await avgRuntime(async () => await this.testAllUsers(), iterations, constants.EXPECTED_USERS); - results.insertOrder = await avgRuntime(async () => await this.testInsertOrder({ id: uuid(), ...constants.TEST_ORDER }), iterations); + results.insertOrder = await avgRuntime(async () => await this.testInsertOrder({ id: v4(), ...constants.TEST_ORDER }), iterations); results.updateUser = await avgRuntime(async () => await this.testUpdateUser(constants.TEST_UPDATE), iterations); return results;