From 5862cf5cd014b7a6a21681379066738d8d7f48be Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 9 Sep 2025 11:04:02 +0000 Subject: [PATCH 1/2] chore(deps): bump uuid from 11.1.0 to 13.0.0 Bumps [uuid](https://github.com/uuidjs/uuid) from 11.1.0 to 13.0.0. - [Release notes](https://github.com/uuidjs/uuid/releases) - [Changelog](https://github.com/uuidjs/uuid/blob/main/CHANGELOG.md) - [Commits](https://github.com/uuidjs/uuid/compare/v11.1.0...v13.0.0) --- updated-dependencies: - dependency-name: uuid dependency-version: 13.0.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 78962df..d488ac8 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ "semver": "^7.0.0", "source-map-support": "^0.x", "teen_process": "^3.0.0", - "uuid": "^11.0.1", + "uuid": "^13.0.0", "which": "^5.0.0" }, "scripts": { From 9d45f60eab764ceb248aa6844aba3cc4465de28b Mon Sep 17 00:00:00 2001 From: Mykola Mokhnach Date: Thu, 9 Oct 2025 18:44:33 +0200 Subject: [PATCH 2/2] Fix uuid imports --- lib/helpers.js | 10 ++++++++++ lib/subcommands/io.js | 4 ++-- lib/subcommands/keychain.js | 4 ++-- lib/subcommands/push.js | 4 ++-- test/e2e/simctl-e2e-specs.js | 4 ++-- 5 files changed, 18 insertions(+), 8 deletions(-) diff --git a/lib/helpers.js b/lib/helpers.js index 1927303..0034fb4 100644 --- a/lib/helpers.js +++ b/lib/helpers.js @@ -25,3 +25,13 @@ export function normalizeVersion (version) { export function getXcrunBinary () { return process.env.XCRUN_BINARY || 'xcrun'; } + +/** + * Generate a UUID v4 + * + * @returns {Promise} + */ +export async function uuidV4 () { + const uuidLib = await import('uuid'); + return uuidLib.v4(); +} diff --git a/lib/subcommands/io.js b/lib/subcommands/io.js index 6c1dc62..31ad34c 100644 --- a/lib/subcommands/io.js +++ b/lib/subcommands/io.js @@ -1,8 +1,8 @@ import { rimraf } from 'rimraf'; -import { v4 as uuidV4 } from 'uuid'; import path from 'path'; import os from 'os'; import fs from 'fs/promises'; +import { uuidV4 } from '../helpers'; const commands = {}; @@ -19,7 +19,7 @@ const commands = {}; */ commands.getScreenshot = async function getScreenshot () { const udid = this.requireUdid('io screenshot'); - const pathToScreenshotPng = path.resolve(os.tmpdir(), `${uuidV4()}.png`); + const pathToScreenshotPng = path.resolve(os.tmpdir(), `${await uuidV4()}.png`); try { await this.exec('io', { args: [udid, 'screenshot', pathToScreenshotPng], diff --git a/lib/subcommands/keychain.js b/lib/subcommands/keychain.js index 9f8eb41..f1644f6 100644 --- a/lib/subcommands/keychain.js +++ b/lib/subcommands/keychain.js @@ -1,6 +1,6 @@ import os from 'os'; import fs from 'fs/promises'; -import { v4 as uuidV4 } from 'uuid'; +import { uuidV4 } from '../helpers'; import path from 'path'; import _ from 'lodash'; import { rimraf } from 'rimraf'; @@ -13,7 +13,7 @@ const commands = {}; * @param {(filePath: string) => Promise} onPayloadStored */ async function handleRawPayload (payload, onPayloadStored) { - const filePath = path.resolve(os.tmpdir(), `${uuidV4()}.pem`); + const filePath = path.resolve(os.tmpdir(), `${await uuidV4()}.pem`); try { if (_.isBuffer(payload)) { await fs.writeFile(filePath, payload); diff --git a/lib/subcommands/push.js b/lib/subcommands/push.js index 2d67e2d..eb65763 100644 --- a/lib/subcommands/push.js +++ b/lib/subcommands/push.js @@ -1,5 +1,5 @@ import { rimraf } from 'rimraf'; -import { v4 as uuidV4 } from 'uuid'; +import { uuidV4 } from '../helpers'; import path from 'path'; import os from 'os'; import fs from 'fs/promises'; @@ -28,7 +28,7 @@ const commands = {}; * @throws {Error} If the `udid` instance property is unset */ commands.pushNotification = async function pushNotification (payload) { - const dstPath = path.resolve(os.tmpdir(), `${uuidV4()}.json`); + const dstPath = path.resolve(os.tmpdir(), `${await uuidV4()}.json`); try { await fs.writeFile(dstPath, JSON.stringify(payload), 'utf8'); await this.exec('push', { diff --git a/test/e2e/simctl-e2e-specs.js b/test/e2e/simctl-e2e-specs.js index 585dac0..04ede28 100644 --- a/test/e2e/simctl-e2e-specs.js +++ b/test/e2e/simctl-e2e-specs.js @@ -3,7 +3,7 @@ import { Simctl } from '../../lib/simctl.js'; import xcode from 'appium-xcode'; import { retryInterval } from 'asyncbox'; import { rimraf } from 'rimraf'; -import { v4 as uuidV4 } from 'uuid'; +import { uuidV4 } from '../../lib/helpers'; import path from 'path'; import os from 'os'; import fs from 'fs/promises'; @@ -219,7 +219,7 @@ describe('simctl', function () { if (major < 8 || (major === 8 && minor < 1)) { return this.skip(); } - picturePath = path.join(os.tmpdir(), `${uuidV4()}.png`); + picturePath = path.join(os.tmpdir(), `${await uuidV4()}.png`); await fs.writeFile(picturePath, Buffer.from(BASE64_PNG, 'base64').toString('binary'), 'binary'); }); after(async function () {