From 6c006935ff673f7a00b1dee8b73d8bfaffd6a893 Mon Sep 17 00:00:00 2001 From: soulgalore Date: Sat, 5 Oct 2024 16:23:25 +0200 Subject: [PATCH] Drop uuid dependecy --- index.js | 4 ++-- package-lock.json | 11 +---------- package.json | 3 +-- 3 files changed, 4 insertions(+), 14 deletions(-) diff --git a/index.js b/index.js index 5899bbd..6b83f16 100644 --- a/index.js +++ b/index.js @@ -3,7 +3,7 @@ const { name, version, homepage } = require('./package'); const urlParser = require('url'); -const { v1 } = require('uuid'); +const crypto = require('crypto'); const dayjs = require('dayjs'); const debug = require('debug')(name); const ignoredEvents = require('./lib/ignoredEvents'); @@ -89,7 +89,7 @@ module.exports = { if (pages.some(page => page.__frameId === rootFrame)) { continue; } - currentPageId = v1(); + currentPageId = crypto.randomUUID(); const title = method === 'Page.navigatedWithinDocument' ? params.url : ''; const page = { diff --git a/package-lock.json b/package-lock.json index c50c142..9ad0dcb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,8 +11,7 @@ "dependencies": { "dayjs": "1.11.7", "debug": "4.3.4", - "tough-cookie": "5.0.0", - "uuid": "9.0.0" + "tough-cookie": "5.0.0" }, "devDependencies": { "ava": "~0.25.0", @@ -6959,14 +6958,6 @@ "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", "dev": true }, - "node_modules/uuid": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.0.tgz", - "integrity": "sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg==", - "bin": { - "uuid": "dist/bin/uuid" - } - }, "node_modules/validate-npm-package-license": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", diff --git a/package.json b/package.json index 9b876dd..d425ad0 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,6 @@ "dependencies": { "dayjs": "1.11.7", "debug": "4.3.4", - "tough-cookie": "5.0.0", - "uuid": "9.0.0" + "tough-cookie": "5.0.0" } }