diff --git a/packages/@ionic/cli/package.json b/packages/@ionic/cli/package.json index c79d41b496..410509643a 100644 --- a/packages/@ionic/cli/package.json +++ b/packages/@ionic/cli/package.json @@ -65,8 +65,7 @@ "superagent-proxy": "^2.0.0", "tar": "^6.0.1", "through2": "^3.0.0", - "tslib": "1.11.2", - "uuid": "^8.1.0" + "tslib": "1.11.2" }, "devDependencies": { "@types/debug": "^4.1.1", @@ -83,7 +82,6 @@ "@types/superagent-proxy": "^2.0.0", "@types/tar": "^4.0.0", "@types/through2": "^2.0.33", - "@types/uuid": "^8.0.0", "jest": "^25.1.0", "jest-cli": "^26.0.1", "lint-staged": "^10.0.2", diff --git a/packages/@ionic/cli/src/lib/utils/uuid.ts b/packages/@ionic/cli/src/lib/utils/uuid.ts index bacea88ef5..80cd6bc6cc 100644 --- a/packages/@ionic/cli/src/lib/utils/uuid.ts +++ b/packages/@ionic/cli/src/lib/utils/uuid.ts @@ -1,7 +1,10 @@ -import { v4 as uuidv4 } from 'uuid'; - export function generateUUID(): string { - return uuidv4().toString(); + return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, c => { + const r = Math.random() * 16 | 0; + const v = c === 'x' ? r : (r & 0x3 | 0x8); + + return v.toString(16); + }); } export function shortid(): string {