diff --git a/src/server/visual-diff-reporter.js b/src/server/visual-diff-reporter.js index 17bce1c3..c2dc30b9 100644 --- a/src/server/visual-diff-reporter.js +++ b/src/server/visual-diff-reporter.js @@ -1,6 +1,6 @@ +import * as os from 'node:os'; import { cpSync, existsSync, mkdirSync, readFileSync, rmSync, writeFileSync } from 'node:fs'; import { dirname, join } from 'node:path'; -import * as os from 'node:os'; import { env } from 'node:process'; import { execSync } from 'node:child_process'; import { fileURLToPath } from 'node:url'; @@ -63,26 +63,20 @@ function createData(rootDir, updateGoldens, sessions) { const system = { platform: os.platform(), release: os.release(), - arch: os.arch(), - previous: metadata.system && { - platform: metadata.system.platform, - release: metadata.system.release, - arch: metadata.system.arch - } + arch: os.arch() }; if (isCI || updateGoldens) { metadata.browsers = Array.from(browsers.values()).map(b => { return { name: b.name, version: b.version }; }); - metadata.system = { - platform: system.platform, - release: system.release, - arch: system.arch - }; + metadata.system = system; writeFileSync(metadataPath, `${JSON.stringify(metadata, undefined, '\t')}\n`); } + const { previous: gc, ...previous } = metadata.system; + system.previous = previous; + return { browsers, files, numByteDiff, numFailed, numTests, system }; }