From 06c86ab9e5ab71f3b1211cd1e71d642589832261 Mon Sep 17 00:00:00 2001 From: Roman Date: Wed, 27 May 2026 19:45:16 +0100 Subject: [PATCH] feat!: replace `uuid` dependency with `crypto.randomUUID` --- lib/pbxProject.js | 4 ++-- package-lock.json | 11 +---------- package.json | 5 ++--- 3 files changed, 5 insertions(+), 15 deletions(-) diff --git a/lib/pbxProject.js b/lib/pbxProject.js index c711fa2..a0e6fb4 100644 --- a/lib/pbxProject.js +++ b/lib/pbxProject.js @@ -21,7 +21,7 @@ const util = require('util'); const f = util.format; const EventEmitter = require('events').EventEmitter; const path = require('path'); -const uuid = require('uuid'); +const crypto = require('crypto'); const fork = require('child_process').fork; const PBXWriter = require('./pbxWriter'); const PBXFile = require('./pbxFile'); @@ -88,7 +88,7 @@ PBXProject.prototype.allUuids = function () { }; PBXProject.prototype.generateUuid = function () { - const id = uuid.v4() + const id = crypto.randomUUID() .replace(/-/g, '') .substr(0, 24) .toUpperCase(); diff --git a/package-lock.json b/package-lock.json index ba7c7f6..b99110b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,8 +9,7 @@ "version": "3.0.2-dev", "license": "Apache-2.0", "dependencies": { - "simple-plist": "^1.1.0", - "uuid": "^7.0.3" + "simple-plist": "^1.1.0" }, "devDependencies": { "@cordova/eslint-config": "^6.0.1", @@ -3237,14 +3236,6 @@ "punycode": "^2.1.0" } }, - "node_modules/uuid": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-7.0.3.tgz", - "integrity": "sha512-DPSke0pXhTZgoF/d+WSt2QaKMCFSfx7QegxEWT+JOuHF5aWrKEn0G+ztjuJg/gG8/ItK+rbPCD/yNv8yyih6Cg==", - "bin": { - "uuid": "dist/bin/uuid" - } - }, "node_modules/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 66b7370..ed1f5c1 100644 --- a/package.json +++ b/package.json @@ -7,11 +7,10 @@ "repository": "github:apache/cordova-node-xcode", "bugs": "https://github.com/apache/cordova-node-xcode/issues", "engines": { - "node": ">=10.0.0" + "node": ">=20.0.0" }, "dependencies": { - "simple-plist": "^1.1.0", - "uuid": "^7.0.3" + "simple-plist": "^1.1.0" }, "devDependencies": { "@cordova/eslint-config": "^6.0.1",