From 5c82009c762a9015947f327225301876edea4935 Mon Sep 17 00:00:00 2001 From: owjs3901 Date: Wed, 18 Nov 2026 17:47:22 +0900 Subject: [PATCH 1/5] fix(landing): type the benchmark data by the fields the page reads The first benchmark refresh (db5006294) rewrote benchmark-results.json in the current format, where clientBytes and sizes are filled in, while the frozen e2e fixture still has them null. benchmark-data.ts typed both as `typeof live`, so the fixture no longer matched and every landing build failed type checking. The page now declares only the fields Bench reads, which both files have. Co-Authored-By: Claude Opus 5.5 --- apps/landing/src/app/benchmark-data.ts | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/apps/landing/src/app/benchmark-data.ts b/apps/landing/src/app/benchmark-data.ts index 2c8538018..0f6118de0 100644 --- a/apps/landing/src/app/benchmark-data.ts +++ b/apps/landing/src/app/benchmark-data.ts @@ -12,5 +12,27 @@ import fixture from '../../../../e2e/fixtures/benchmark-results.json' export const BENCHMARK_SOURCE = process.env.LANDING_BENCHMARK_DATA === 'fixture' ? 'fixture' : 'live' -export const benchmarkResults: typeof live = +// The fields the page reads. The refresh rewrites the live file in its +// current format while the fixture keeps the format it was frozen in, so the +// page must not depend on any field it does not read. +export interface BenchmarkResults { + run: { + id: string + url: string + commit: string + next: string + devupUi: string + sha: string + } + samples: number + rows: { + table: string + target: string + version: string + median: number + bytes: number + }[] +} + +export const benchmarkResults: BenchmarkResults = BENCHMARK_SOURCE === 'fixture' ? fixture : live From c45a27c50519ddda1558b2dd3bfbde990e2d1e2e Mon Sep 17 00:00:00 2001 From: owjs3901 Date: Wed, 18 Nov 2026 17:52:25 +0900 Subject: [PATCH 2/5] fix(benchmark): write long number arrays as Prettier fills them formatJson put each item of a too-long array on its own line, but Prettier fills arrays of numbers several to a line. The first refresh therefore committed a benchmark/history.json that `bun run lint` rejects. Long number arrays are now filled the same way, and history.json is rewritten with it. Co-Authored-By: Claude Opus 5.5 --- benchmark-record.js | 35 +++++++++++++++---- benchmark/history.json | 14 ++------ .../src/__tests__/benchmark-record.test.ts | 25 ++++++++++--- 3 files changed, 51 insertions(+), 23 deletions(-) diff --git a/benchmark-record.js b/benchmark-record.js index 10414f772..2a25c9309 100644 --- a/benchmark-record.js +++ b/benchmark-record.js @@ -161,17 +161,40 @@ export function trend(history, target, control) { .join('\n') } -/** JSON as Prettier prints it here: two spaces, short arrays of numbers or strings on one line */ +/** + * A long array of numbers as Prettier fills it: as many items on each line as + * fit, every line but the last ending in a comma + */ +function fillNumbers(indent, key, values) { + const inner = `${indent} ` + const lines = [] + let line = inner + for (const [index, value] of values.entries()) { + const item = index < values.length - 1 ? `${value},` : value + const next = line === inner ? `${inner}${item}` : `${line} ${item}` + if (line !== inner && next.length > PRINT_WIDTH) { + lines.push(line) + line = `${inner}${item}` + } else line = next + } + return `${indent}${key}[\n${[...lines, line].join('\n')}\n${indent}]` +} + +/** + * JSON as Prettier prints it here: two spaces, short arrays of numbers or + * strings on one line, and longer arrays of numbers filled over lines + */ export function formatJson(value) { return ( JSON.stringify(value, null, 2).replace( /^( *)(.*)\[\n((?:\1 {2}(?:-?[\d.e+-]+|"[^"\n]*"|null),?\n)+)\1\]/gm, (whole, indent, key, items) => { - const line = `${indent}${key}[${items - .trim() - .split(/,\n */) - .join(', ')}]` - return line.length + 1 <= PRINT_WIDTH ? line : whole + const values = items.trim().split(/,\n */) + const line = `${indent}${key}[${values.join(', ')}]` + if (line.length + 1 <= PRINT_WIDTH) return line + return values.every((item) => /^-?[\d.e+-]+$/.test(item)) + ? fillNumbers(indent, key, values) + : whole }, ) + '\n' ) diff --git a/benchmark/history.json b/benchmark/history.json index 64aa42d83..db66941d8 100644 --- a/benchmark/history.json +++ b/benchmark/history.json @@ -60,12 +60,7 @@ "devup-ui-single-turbo": [3.85, 3.815, 3.852, 28914697, 325, 571234], "devup-ui-turbo": [3.885, 3.881, 3.886, 28940461, 356, 571297], "vanilla-extract-devup-ui": [ - 3.819, - 3.792, - 3.864, - 28964098, - 376, - 571331 + 3.819, 3.792, 3.864, 28964098, 376, 571331 ], "tailwind-turbo-devup-ui": [3.803, 3.798, 3.806, 28926709, 381, 571325], "vinext-devup-ui": [1.895, 1.848, 1.997, 1290682, 10529, 486447], @@ -74,12 +69,7 @@ "devup-ui-large-wasm": [13.951, 13.575, 14.281, 88999119, 1592, 934533], "devup-ui-large-turbo": [5.407, 5.255, 5.555, 38645324, 1512, 571629], "devup-ui-large-turbo-wasm": [ - 5.847, - 5.742, - 5.959, - 38663728, - 1512, - 571629 + 5.847, 5.742, 5.959, 38663728, 1512, 571629 ] } } diff --git a/packages/plugin-utils/src/__tests__/benchmark-record.test.ts b/packages/plugin-utils/src/__tests__/benchmark-record.test.ts index 6481bf36d..e7075a0e5 100644 --- a/packages/plugin-utils/src/__tests__/benchmark-record.test.ts +++ b/packages/plugin-utils/src/__tests__/benchmark-record.test.ts @@ -373,20 +373,35 @@ describe('benchmark refresh order', () => { }) describe('benchmark JSON', () => { - it('prints short arrays on one line and long ones one item per line', () => { + it('prints short arrays on one line, fills long numbers and splits long strings', () => { const long = Array.from({ length: 12 }, (_, index) => 1_000_000 + index) + const longNames = Array.from( + { length: 6 }, + (_, index) => `target-${index}-xxxxxxxx`, + ) + // As Prettier prints them, so `bun run lint` accepts what the refresh writes expect( - formatJson({ short: [1, 2.5, null], names: ['a', 'b'], long, empty: [] }), + formatJson({ + short: [1, 2.5, null], + names: ['a', 'b'], + long, + longNames, + empty: [], + }), ).toBe( [ '{', ' "short": [1, 2.5, null],', ' "names": ["a", "b"],', ' "long": [', - ...long.map( - (value, index) => - ` ${value}${index === long.length - 1 ? '' : ','}`, + ' 1000000, 1000001, 1000002, 1000003, 1000004, 1000005, 1000006, 1000007,', + ' 1000008, 1000009, 1000010, 1000011', + ' ],', + ' "longNames": [', + ...longNames.map( + (name, index) => + ` "${name}"${index === longNames.length - 1 ? '' : ','}`, ), ' ],', ' "empty": []', From a351323a4f3c8a301eb3d491a439a4e917070ef5 Mon Sep 17 00:00:00 2001 From: owjs3901 Date: Wed, 18 Nov 2026 17:52:59 +0900 Subject: [PATCH 3/5] fix(benchmark): refill the arrays main's latest refresh recorded Co-Authored-By: Claude Opus 5.5 --- benchmark/history.json | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/benchmark/history.json b/benchmark/history.json index 74fc7dff7..0b0b6e67d 100644 --- a/benchmark/history.json +++ b/benchmark/history.json @@ -105,12 +105,7 @@ "devup-ui-large-wasm": [16.822, 16.767, 17.14, 89000733, 1592, 934533], "devup-ui-large-turbo": [6.343, 6.291, 6.485, 38651995, 1512, 571629], "devup-ui-large-turbo-wasm": [ - 6.927, - 6.85, - 7.186, - 38676657, - 1512, - 571629 + 6.927, 6.85, 7.186, 38676657, 1512, 571629 ] } } From ecfa4a219fd2f63c12f53ef0fb61793c5a1b1d4e Mon Sep 17 00:00:00 2001 From: owjs3901 Date: Wed, 18 Nov 2026 18:18:13 +0900 Subject: [PATCH 4/5] fix(benchmark): refill the arrays main's latest refresh recorded Co-Authored-By: Claude Opus 5.5 --- benchmark/history.json | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/benchmark/history.json b/benchmark/history.json index 3d0137350..0125a480e 100644 --- a/benchmark/history.json +++ b/benchmark/history.json @@ -134,12 +134,7 @@ "devup-ui-single-turbo": [5.136, 5.007, 5.305, 28901694, 325, 571234], "devup-ui-turbo": [5.17, 5.123, 5.288, 28950247, 356, 571297], "vanilla-extract-devup-ui": [ - 5.005, - 4.986, - 5.215, - 28964779, - 376, - 571331 + 5.005, 4.986, 5.215, 28964779, 376, 571331 ], "tailwind-turbo-devup-ui": [5.185, 5.149, 5.366, 28928475, 381, 571325], "vinext-devup-ui": [2.858, 2.837, 2.983, 1290682, 10529, 486447], @@ -148,12 +143,7 @@ "devup-ui-large-wasm": [20.538, 20.511, 20.603, 88999216, 1592, 934533], "devup-ui-large-turbo": [7.253, 7.236, 7.379, 38661348, 1512, 571629], "devup-ui-large-turbo-wasm": [ - 7.792, - 7.697, - 7.802, - 38686094, - 1512, - 571629 + 7.792, 7.697, 7.802, 38686094, 1512, 571629 ] } } From fb6ede399bb928266b802ccb5c9ef7455b4e3a73 Mon Sep 17 00:00:00 2001 From: owjs3901 Date: Wed, 18 Nov 2026 18:48:16 +0900 Subject: [PATCH 5/5] fix(benchmark): refill the arrays main's latest refresh recorded Co-Authored-By: Claude Opus 5.5 --- benchmark/history.json | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/benchmark/history.json b/benchmark/history.json index 7a28f5ea7..6afa71008 100644 --- a/benchmark/history.json +++ b/benchmark/history.json @@ -172,12 +172,7 @@ "devup-ui-single-turbo": [4.67, 4.638, 4.694, 28916568, 325, 571234], "devup-ui-turbo": [4.777, 4.683, 4.87, 28956268, 356, 571297], "vanilla-extract-devup-ui": [ - 4.597, - 4.506, - 4.627, - 28953896, - 376, - 571331 + 4.597, 4.506, 4.627, 28953896, 376, 571331 ], "tailwind-turbo-devup-ui": [4.603, 4.594, 4.833, 28925356, 381, 571325], "vinext-devup-ui": [2.467, 2.316, 2.521, 1287690, 9033, 484951], @@ -186,12 +181,7 @@ "devup-ui-large-wasm": [16.845, 16.789, 17.405, 88997162, 1388, 934329], "devup-ui-large-turbo": [6.429, 6.26, 6.601, 38651438, 1512, 571629], "devup-ui-large-turbo-wasm": [ - 6.888, - 6.729, - 7.032, - 38662944, - 1512, - 571629 + 6.888, 6.729, 7.032, 38662944, 1512, 571629 ] } }