mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-21 00:09:51 +02:00
Format message
This commit is contained in:
@@ -56,18 +56,21 @@ const main = async () => {
|
|||||||
const oldStats = await readStats('./cypress/snapshots/stats/base/**/*.json');
|
const oldStats = await readStats('./cypress/snapshots/stats/base/**/*.json');
|
||||||
const newStats = await readStats('./cypress/snapshots/stats/head/**/*.json');
|
const newStats = await readStats('./cypress/snapshots/stats/head/**/*.json');
|
||||||
const diff = Object.entries(newStats)
|
const diff = Object.entries(newStats)
|
||||||
|
.filter(([, value]) => value > 2048)
|
||||||
.map(([key, value]) => {
|
.map(([key, value]) => {
|
||||||
const oldValue = oldStats[key];
|
const oldValue = oldStats[key];
|
||||||
const delta = value - oldValue;
|
const delta = value - oldValue;
|
||||||
return [
|
const output = [
|
||||||
key,
|
key,
|
||||||
formatSize(oldValue),
|
formatSize(oldValue),
|
||||||
formatSize(value),
|
formatSize(value),
|
||||||
formatSize(delta),
|
formatSize(delta),
|
||||||
percentageDifference(oldValue, value),
|
percentageDifference(oldValue, value),
|
||||||
].map((v) => v.toString());
|
];
|
||||||
|
console.log(output);
|
||||||
|
return output;
|
||||||
})
|
})
|
||||||
.filter(([, , , delta]) => delta !== '0');
|
.filter(([, , , delta]) => delta !== '0 Bytes');
|
||||||
if (diff.length === 0) {
|
if (diff.length === 0) {
|
||||||
console.log('No changes in bundle sizes');
|
console.log('No changes in bundle sizes');
|
||||||
return;
|
return;
|
||||||
|
Reference in New Issue
Block a user