diff --git a/cli.js b/cli.js index 3dd107b8..4e7bc826 100644 --- a/cli.js +++ b/cli.js @@ -316,7 +316,6 @@ const scanInit = async argvs => { data.userDataDirectory = clonedDataDir; printMessage([`Purple HATS version: ${appVersion}`, 'Starting scan...'], messageOptions); - constants.appVersion = appVersion; if (argvs.scanner === constants.scannerTypes.custom) { try { diff --git a/mergeAxeResults.js b/mergeAxeResults.js index 91125230..eeb973c4 100644 --- a/mergeAxeResults.js +++ b/mergeAxeResults.js @@ -7,7 +7,7 @@ import path from 'path'; import { fileURLToPath } from 'url'; import ejs, { compile } from 'ejs'; import constants from './constants/constants.js'; -import { getCurrentTime, getStoragePath } from './utils.js'; +import { getCurrentTime, getStoragePath, getVersion } from './utils.js'; import { consoleLogger, silentLogger } from './logs.js'; import itemTypeDescription from './constants/itemTypeDescription.js'; import { chromium } from 'playwright'; @@ -412,7 +412,7 @@ export const generateArtifacts = async ( pagesScanned, customFlowLabel, ) => { - const phAppVersion = constants.appVersion; + const phAppVersion = getVersion(); const storagePath = getStoragePath(randomToken); const directory = `${storagePath}/${constants.allIssueFileName}`; const allIssues = { diff --git a/package-lock.json b/package-lock.json index 162e1404..81885fb6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8808,7 +8808,7 @@ "convert-source-map": "^1.7.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", - "json5": "^2.2.2", + "json5": "^2.2.3", "semver": "^6.3.1" }, "dependencies": {