From c9fb976ec0d1a542e057e5cb69b26969775f7c8a Mon Sep 17 00:00:00 2001 From: Akira Fujiu Date: Fri, 19 Jan 2024 16:31:14 +0900 Subject: [PATCH] feat: use randomUUID from Node.js instead of uuid --- index.js | 4 ++-- package.json | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/index.js b/index.js index 8c5a44e..a522d44 100644 --- a/index.js +++ b/index.js @@ -1,5 +1,5 @@ 'use strict' -const { v4: uuidv4 } = require('uuid'); +const {randomUUID} = require('crypto') const archy = require('archy') const libCoverage = require('istanbul-lib-coverage') const {dirname, resolve} = require('path') @@ -50,7 +50,7 @@ class ProcessInfo { Object.assign(this, defaults(), fields) if (!this.uuid) { - this.uuid = uuidv4() + this.uuid = randomUUID() } } diff --git a/package.json b/package.json index 52d91f0..a44fafc 100644 --- a/package.json +++ b/package.json @@ -18,8 +18,7 @@ "cross-spawn": "^7.0.3", "istanbul-lib-coverage": "^3.2.0", "p-map": "^3.0.0", - "rimraf": "^3.0.0", - "uuid": "^8.3.2" + "rimraf": "^3.0.0" }, "devDependencies": { "standard-version": "^7.0.0", @@ -27,7 +26,7 @@ "nyc": "^15.1.0" }, "engines": { - "node": ">=8" + "node": ">=16" }, "tap": { "check-coverage": true,