diff --git a/package.json b/package.json index 34d5164e..8b722220 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,8 @@ "license": "ISC", "dependencies": { "@whatwg-node/fetch": "^0.2.9", - "parse-duration": "^1.0.2" + "parse-duration": "^1.0.2", + "uuid": "^9.0.0" }, "scripts": { "build": "node utils/update-version.mjs && bob build", @@ -25,6 +26,7 @@ "@changesets/changelog-github": "^0.4.7", "@changesets/cli": "^2.24.2", "@types/jest": "^29.2.3", + "@types/uuid": "^9.0.2", "@typescript-eslint/eslint-plugin": "5.45.0", "@typescript-eslint/parser": "5.45.0", "bob-the-bundler": "^4.0.0", diff --git a/src/index.ts b/src/index.ts index 7e41b803..7f43a2f2 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,5 +1,4 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ -import { randomUUID } from "crypto"; +import { v4 as randomUUID } from "uuid"; import parseDuration, { Units } from "parse-duration"; import { INTERNAL_VERSION, diff --git a/yarn.lock b/yarn.lock index d6a45372..e57ced83 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1103,6 +1103,11 @@ resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-2.0.1.tgz#20f18294f797f2209b5f65c8e3b5c8e8261d127c" integrity sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw== +"@types/uuid@^9.0.2": + version "9.0.2" + resolved "https://registry.yarnpkg.com/@types/uuid/-/uuid-9.0.2.tgz#ede1d1b1e451548d44919dc226253e32a6952c4b" + integrity sha512-kNnC1GFBLuhImSnV7w4njQkUiJi0ZXUycu1rUaouPqiKlXkh77JKgdRnTAp1x5eBwcIwbtI+3otwzuIDEuDoxQ== + "@types/yargs-parser@*": version "21.0.0" resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-21.0.0.tgz#0c60e537fa790f5f9472ed2776c2b71ec117351b" @@ -4615,6 +4620,11 @@ uri-js@^4.2.2: dependencies: punycode "^2.1.0" +uuid@^9.0.0: + version "9.0.0" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-9.0.0.tgz#592f550650024a38ceb0c562f2f6aa435761efb5" + integrity sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg== + v8-compile-cache-lib@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz#6336e8d71965cb3d35a1bbb7868445a7c05264bf"