forked from mirrors/misskey
enhance(dev): tweak Frontend Chunk Report
This commit is contained in:
parent
5d8c31b6e5
commit
f5806a0560
1 changed files with 2 additions and 12 deletions
14
.github/scripts/frontend-js-size.mjs
vendored
14
.github/scripts/frontend-js-size.mjs
vendored
|
|
@ -274,23 +274,13 @@ const allChunkKeys = [
|
|||
const comparisonRows = getChunkComparisonRows(commonChunkKeys, before, after);
|
||||
const allComparisonRows = getChunkComparisonRows(allChunkKeys, before, after);
|
||||
|
||||
const changedRows = allComparisonRows
|
||||
.filter((row) => row.changeType !== 'unchanged');
|
||||
const diffRows = [
|
||||
...changedRows
|
||||
.filter((row) => row.changeType === 'updated')
|
||||
.sort(compareComparisonRows)
|
||||
.slice(0, 30),
|
||||
...changedRows
|
||||
.filter((row) => row.changeType !== 'updated')
|
||||
.sort(compareComparisonRows),
|
||||
].sort(compareComparisonRows);
|
||||
const changedRows = allComparisonRows.filter((row) => row.changeType !== 'unchanged');
|
||||
const diffSummary = summarizeChanges(changedRows);
|
||||
|
||||
const diffTotal = {
|
||||
beforeSize: allComparisonRows.reduce((sum, row) => sum + row.beforeSize, 0),
|
||||
afterSize: allComparisonRows.reduce((sum, row) => sum + row.afterSize, 0),
|
||||
};
|
||||
const diffRows = changedRows.sort(compareComparisonRows).slice(0, 30); // TODO: 実際に30を超えて切り捨てられたrowがあった場合はその旨をmarkdown内に表示するようにする
|
||||
|
||||
const startupKeys = new Set([
|
||||
...before.startupKeys,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue