From 442ffc59a2cace9349e84833dca97b29c90c2da6 Mon Sep 17 00:00:00 2001 From: Praveen Gupta Date: Thu, 16 Nov 2023 01:46:53 +0100 Subject: [PATCH] remove packageJson.name from installationId --- .../platform-core/src/usage-data/get_installation_id.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/platform-core/src/usage-data/get_installation_id.ts b/packages/platform-core/src/usage-data/get_installation_id.ts index 84311b596c..3b8b2343cc 100644 --- a/packages/platform-core/src/usage-data/get_installation_id.ts +++ b/packages/platform-core/src/usage-data/get_installation_id.ts @@ -1,18 +1,16 @@ import { userInfo } from 'os'; import { v5 as uuidV5 } from 'uuid'; -import { CwdPackageJsonReader } from '../cwd_package_json_reader.js'; // eslint-disable-next-line spellcheck/spell-checker const AMPLIFY_CLI_UUID_NAMESPACE = 'e7368840-2eb6-4042-99b4-9d6c2a9370e6'; // A random v4 UUID /** - * Generates a consistent installation Uuid from the cwd + packageJsonName + userName + * Generates a consistent installation Uuid from the library installation path + userName */ export const getInstallationUuid = ( namespace: string = AMPLIFY_CLI_UUID_NAMESPACE ) => { - const packageJsonName = new CwdPackageJsonReader().read().name; const userName = userInfo().username; const modulePath = __dirname; - return uuidV5(modulePath + packageJsonName + userName, namespace); + return uuidV5(modulePath + userName, namespace); };