From 22a731eeca5fba6fc33dee415618bd05ee19b9d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sander=20Blomv=C3=A5gnes?= Date: Tue, 24 Sep 2024 14:11:46 +0200 Subject: [PATCH 1/4] feat!: increased the minimum node version from v14 to v18 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f341f82..71fed0d 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "version": "1.8.2", "description": "Library to create Formatted Excel Files.", "engines": { - "node": ">=14.0.0" + "node": ">=18.0.0" }, "keywords": [ "excel", From 25ca76fb1ceb8952831109ea181571f1b92662d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sander=20Blomv=C3=A5gnes?= Date: Tue, 24 Sep 2024 14:19:30 +0200 Subject: [PATCH 2/4] reactor: replaced uuid package with native node function --- package-lock.json | 16 +--------------- package.json | 1 - source/lib/classes/comment.js | 5 ++--- 3 files changed, 3 insertions(+), 19 deletions(-) diff --git a/package-lock.json b/package-lock.json index 963d708..8579759 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,7 +18,6 @@ "lodash.reduce": "^4.6.0", "lodash.uniqueid": "^4.0.1", "mime": "^3.0.0", - "uuid": "^9.0.0", "xmlbuilder": "^15.1.1" }, "devDependencies": { @@ -35,7 +34,7 @@ "xpath.js": "^1.1.0" }, "engines": { - "node": ">=14.0.0" + "node": ">=18.0.0" } }, "node_modules/@ampproject/remapping": { @@ -5163,14 +5162,6 @@ "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" }, - "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/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", @@ -9180,11 +9171,6 @@ "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" }, - "uuid": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.0.tgz", - "integrity": "sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg==" - }, "which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", diff --git a/package.json b/package.json index 71fed0d..b0eba78 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,6 @@ "lodash.reduce": "^4.6.0", "lodash.uniqueid": "^4.0.1", "mime": "^3.0.0", - "uuid": "^9.0.0", "xmlbuilder": "^15.1.1" }, "devDependencies": { diff --git a/source/lib/classes/comment.js b/source/lib/classes/comment.js index ec6e1e6..572bdba 100644 --- a/source/lib/classes/comment.js +++ b/source/lib/classes/comment.js @@ -1,5 +1,4 @@ -// const uuid = require('uuid/v4'); -const { v4: uuid } = require('uuid'); +const { randomUUID } = require('crypto'); const utils = require('../utils'); // ยง18.7.3 Comment @@ -7,7 +6,7 @@ class Comment { constructor(ref, comment, options = {}) { this.ref = ref; this.comment = comment; - this.uuid = '{' + uuid().toUpperCase() + '}'; + this.uuid = '{' + randomUUID().toUpperCase() + '}'; this.row = utils.getExcelRowCol(ref).row; this.col = utils.getExcelRowCol(ref).col; this.marginLeft = options.marginLeft || ((this.col) * 88 + 8) + 'pt'; From 4020143a6634e95e2d20c913d8d449ca7c89b909 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sander=20Blomv=C3=A5gnes?= Date: Tue, 24 Sep 2024 14:24:17 +0200 Subject: [PATCH 3/4] fix: changed minimum version to 14.17 as this was when randomUUID was introduced --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b0eba78..a8f71fb 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "version": "1.8.2", "description": "Library to create Formatted Excel Files.", "engines": { - "node": ">=18.0.0" + "node": ">=14.17.0" }, "keywords": [ "excel", From 3af920d3044892cfaf5f16296542ff52505c9a2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sander=20Blomv=C3=A5gnes?= Date: Tue, 24 Sep 2024 14:24:58 +0200 Subject: [PATCH 4/4] fix: changed minimum version to 14.17 as this was when randomUUID was introduced --- package-lock.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package-lock.json b/package-lock.json index 8579759..5d81b96 100644 --- a/package-lock.json +++ b/package-lock.json @@ -34,7 +34,7 @@ "xpath.js": "^1.1.0" }, "engines": { - "node": ">=18.0.0" + "node": ">=14.17.0" } }, "node_modules/@ampproject/remapping": {