Skip to content

Commit e1f43a2

Browse files
refactor: shorten version parsing in json export
1 parent e609440 commit e1f43a2

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/report-formatters/json.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ import { logger, OUTPUT_LEVELS } from "../lib/logger.js";
22
import chalk from "chalk";
33
import fs from "fs";
44

5-
const packageJson = JSON.parse(fs.readFileSync("package.json", "utf8"));
6-
const version = packageJson.version;
5+
const version = JSON.parse(fs.readFileSync("package.json", "utf8")).version;
76

87
export function exportJsonReport(lhResults, filePath = null) {
98
logger.verbose("Starting JSON export...");

0 commit comments

Comments
 (0)