From f599c2d9345b7711a6692e76268c5ffdd7a0a837 Mon Sep 17 00:00:00 2001 From: Ioannis Mertzanis Date: Thu, 27 Apr 2023 14:00:16 +0300 Subject: [PATCH] Use uuid module --- .changeset/lovely-pandas-smoke.md | 5 +++++ index.ts | 4 ++-- package.json | 3 ++- pnpm-lock.yaml | 26 +++++++++++--------------- 4 files changed, 20 insertions(+), 18 deletions(-) create mode 100644 .changeset/lovely-pandas-smoke.md diff --git a/.changeset/lovely-pandas-smoke.md b/.changeset/lovely-pandas-smoke.md new file mode 100644 index 0000000..f1b7ca0 --- /dev/null +++ b/.changeset/lovely-pandas-smoke.md @@ -0,0 +1,5 @@ +--- +"klironomiko": patch +--- + +Use uuid module diff --git a/index.ts b/index.ts index c3009bf..8f8894e 100644 --- a/index.ts +++ b/index.ts @@ -1,4 +1,4 @@ -import { uuid } from "uuidv4"; +import { v4 as uuidv4 } from "uuid"; type Relatives = { spouse: Spouse; @@ -60,7 +60,7 @@ export function calculateHeirPercentage(relatives: Relatives) { return; } - relative.uuid = uuid().replace(/-/g, ""); + relative.uuid = uuidv4().replace(/-/g, ""); if (relative.descendants) { relative.descendants.forEach((descendant) => { diff --git a/package.json b/package.json index acad236..7a79b6d 100644 --- a/package.json +++ b/package.json @@ -16,11 +16,12 @@ "devDependencies": { "@changesets/cli": "^2.26.1", "@types/node": "^18.16.0", + "@types/uuid": "^9.0.1", "cli": "link:@@changesets/cli", "tsup": "^6.7.0", "typescript": "^5.0.4" }, "dependencies": { - "uuidv4": "^6.2.13" + "uuid": "^9.0.0" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 14ab0ab..61e3fd3 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1,9 +1,9 @@ lockfileVersion: '6.0' dependencies: - uuidv4: - specifier: ^6.2.13 - version: 6.2.13 + uuid: + specifier: ^9.0.0 + version: 9.0.0 devDependencies: '@changesets/cli': @@ -12,6 +12,9 @@ devDependencies: '@types/node': specifier: ^18.16.0 version: 18.16.0 + '@types/uuid': + specifier: ^9.0.1 + version: 9.0.1 cli: specifier: link:@@changesets/cli version: link:@@changesets/cli @@ -535,9 +538,9 @@ packages: resolution: {integrity: sha512-KQf+QAMWKMrtBMsB8/24w53tEsxllMj6TuA80TT/5igJalLI/zm0L3oXRbIAl4Ohfc85gyHX/jhMwsVkmhLU4A==} dev: true - /@types/uuid@8.3.4: - resolution: {integrity: sha512-c/I8ZRb51j+pYGAu5CrFMRxqZ2ke4y2grEBO5AUjgSkSk+qT2Ea+OdWElz/OiMf5MNpn2b17kuVBwZLQJXzihw==} - dev: false + /@types/uuid@9.0.1: + resolution: {integrity: sha512-rFT3ak0/2trgvp4yYZo5iKFEPsET7vKydKF+VRCxlQ9bpheehyAJH89dAkaLEq/j/RZXJIqcgsmPJKUP1Z28HA==} + dev: true /ansi-colors@4.1.3: resolution: {integrity: sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==} @@ -2313,18 +2316,11 @@ packages: engines: {node: '>= 4.0.0'} dev: true - /uuid@8.3.2: - resolution: {integrity: sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==} + /uuid@9.0.0: + resolution: {integrity: sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg==} hasBin: true dev: false - /uuidv4@6.2.13: - resolution: {integrity: sha512-AXyzMjazYB3ovL3q051VLH06Ixj//Knx7QnUSi1T//Ie3io6CpsPu9nVMOx5MoLWh6xV0B9J0hIaxungxXUbPQ==} - dependencies: - '@types/uuid': 8.3.4 - uuid: 8.3.2 - dev: false - /validate-npm-package-license@3.0.4: resolution: {integrity: sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==} dependencies: