Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
971b9f3
cleanup
camillobruni Jul 8, 2026
d68769b
fx
camillobruni Jul 8, 2026
07daaa1
fix
camillobruni Jul 8, 2026
1d72049
update
camillobruni Jul 9, 2026
9c7cfed
fixed
camillobruni Jul 9, 2026
af5657b
adding
camillobruni Jul 9, 2026
8b91136
format
camillobruni Jul 9, 2026
8cd41a9
fx
camillobruni Jul 9, 2026
681cb21
skippy
camillobruni Jul 9, 2026
6d6d17e
moar-format
camillobruni Jul 9, 2026
4fbddd6
fx
camillobruni Jul 13, 2026
f3190ab
Merge branch 'main' into 2026-07-08_build-all
camillobruni Jul 13, 2026
fd2a280
update
camillobruni Jul 13, 2026
0919da7
fx
camillobruni Jul 13, 2026
05c81ea
pre-format
camillobruni Jul 13, 2026
dcbd5ae
merge
camillobruni Jul 15, 2026
6897123
rebuilding
camillobruni Jul 15, 2026
8ca4c8f
rebuild-all
camillobruni Jul 15, 2026
12df868
fix
camillobruni Jul 15, 2026
48bac26
Merge branch 'main' into 2026-07-08_build-all
camillobruni Jul 16, 2026
b58f017
regen
camillobruni Jul 16, 2026
4971733
rebuild
camillobruni Jul 16, 2026
7be26c2
fx
camillobruni Jul 20, 2026
0e7e296
add-better-error
camillobruni Jul 21, 2026
c3cf9b7
fx
camillobruni Jul 21, 2026
b819931
format
camillobruni Jul 21, 2026
4d9a4e2
fix-path
camillobruni Jul 21, 2026
5aa929a
reorder
camillobruni Jul 21, 2026
84701ca
cleanup-build-scripts
camillobruni Jul 21, 2026
7e1bc2f
readd-stcokcharts
camillobruni Jul 21, 2026
7e40669
update
camillobruni Jul 21, 2026
6c47916
merge0main
camillobruni Jul 21, 2026
4e79818
fix-test
camillobruni Jul 23, 2026
009f97d
Merge branch 'main' into 2026-07-08_build-all
camillobruni Aug 24, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Build

on:
push:
branches: ["main"]
pull_request:
branches: ["main"]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout Branch
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version-file: "package.json"
cache: "npm"

- name: Install Node Packages
run: npm ci

- name: Build Workloads
run: npm run build:all -- --check
14 changes: 5 additions & 9 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CI
name: Test

on:
push:
Expand All @@ -12,7 +12,7 @@ on:
jobs:
linters:
name: Linters
runs-on: macos-latest
runs-on: ubuntu-latest
steps:
- name: Checkout Branch
uses: actions/checkout@v4
Expand Down Expand Up @@ -63,17 +63,13 @@ jobs:
- name: Run Node Unit Tests
run: npm test

build:
name: Build
test:
name: Test
runs-on: macos-latest
strategy:
matrix:
browser: [chrome, firefox, safari]
browser: [chrome, firefox]
steps:
- name: Install Firefox
if: ${{ matrix.browser == 'firefox' }}
run: brew install --cask firefox

- name: Checkout Branch
uses: actions/checkout@v4

Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
"pretty:fix": "prettier --write ./",
"format": "node tests/format.mjs",
"format:all": "node tests/format.mjs --all",
"build": "node tests/build.mjs",
"build:all": "node tests/build.mjs --all",
"test:chrome": "node tests/run-unittests.mjs --browser=chrome",
"test:firefox": "node tests/run-unittests.mjs --browser=firefox",
"test:safari": "node tests/run-unittests.mjs --browser=safari",
Expand Down
7 changes: 7 additions & 0 deletions resources/shared/generate-resources.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,10 @@ export function generateResourcesFile(distPath) {
fs.writeFileSync(path.join(absoluteDist, "resources.txt"), `${relativePaths.join("\n")}\n`, "utf8");
console.log(`Generated resources.txt at ${distPath}`);
}

import { fileURLToPath } from "node:url";

if (process.argv[1] && fileURLToPath(import.meta.url) === process.argv[1]) {
const targetDir = process.argv[2] || "dist";
generateResourcesFile(path.resolve(process.cwd(), targetDir));
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ export class BenchmarkSuite {
this.tests = tests;
}


async runAndRecord(params, onProgress) {
const measuredValues = {
tests: {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,9 @@ export function forceLayout(body, layoutMode = "getBoundingRectAndElementFromPoi
throw Error(`Invalid layoutMode: ${layoutMode}`);
}
}

export function skipInShell(context) {
if (typeof window === "undefined" || typeof document === "undefined")
// Skip in non-browser environments
context.skip();
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ export class Params {
// "generate": generate a random seed
// <integer>: use the provided integer as a seed
shuffleSeed = "off";
// Param to tweak the relative complexity of all suites.
// The default is 1.0, and for suites supporting this param, the duration
// roughly scales with the complexity.
complexity = 1.0;
// Choices: "getBoundingClientRect" or "getBoundingRectAndElementFromPoint"
layoutMode = LAYOUT_MODES[0];
// Measure more workload prepare time.
Expand All @@ -49,8 +53,17 @@ export class Params {
}
}

_parseInt(value, errorMessage) {
_parseNumber(value, errorMessage, minValue = 0) {
const number = Number(value);
if (!Number.isFinite(number) && errorMessage)
throw new Error(`Invalid ${errorMessage} param: '${value}', expected Number.`);
if (number < minValue)
throw new Error(`Invalid ${errorMessage} param: '${value}', value must be >= ${minValue}.`);
return number;
}

_parseInt(value, errorMessage, minValue = 0) {
const number = this._parseNumber(value, errorMessage, minValue);
if (!Number.isInteger(number) && errorMessage)
throw new Error(`Invalid ${errorMessage} param: '${value}', expected int.`);
return parseInt(number);
Expand All @@ -71,6 +84,7 @@ export class Params {
this.warmupBeforeSync = this._parseIntParam(searchParams, "warmupBeforeSync", 0);
this.measurementMethod = this._parseEnumParam(searchParams, "measurementMethod", ["raf"]);
this.shuffleSeed = this._parseShuffleSeed(searchParams);
this.complexity = this._parserNumberParam(searchParams, "complexity", 0);
this.layoutMode = this._parseEnumParam(searchParams, "layoutMode", LAYOUT_MODES);
this.measurePrepare = this._parseBooleanParam(searchParams, "measurePrepare");
this.config = this._parseConfig(searchParams);
Expand All @@ -89,13 +103,18 @@ export class Params {
return true;
}

_parseIntParam(searchParams, paramKey, minValue) {
_parserNumberParam(searchParams, paramKey, minValue) {
if (!searchParams.has(paramKey))
return defaultParams[paramKey];
const parsedValue = this._parseNumber(searchParams.get(paramKey), "waitBeforeSync", minValue);
searchParams.delete(paramKey);
return parsedValue;
}

const parsedValue = this._parseInt(searchParams.get(paramKey), "waitBeforeSync");
if (parsedValue < minValue)
throw new Error(`Invalid ${paramKey} param: '${parsedValue}', value must be >= ${minValue}.`);
_parseIntParam(searchParams, paramKey, minValue) {
if (!searchParams.has(paramKey))
return defaultParams[paramKey];
const parsedValue = this._parseInt(searchParams.get(paramKey), "waitBeforeSync", minValue);
searchParams.delete(paramKey);
return parsedValue;
}
Expand Down Expand Up @@ -211,6 +230,10 @@ export class Params {
toSearchParams() {
return this.toSearchParamsObject().toString();
}

isDefault() {
return this === defaultParams;
}
}

function isValidJsonUrl(url) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1,12 @@
export const numberOfItemsToAdd = 100;
import { params } from "./params.mjs";

export const defaultNumberOfItemsToAdd = 100;
export let numberOfItemsToAdd = defaultNumberOfItemsToAdd;

export function getNumberOfItemsToAdd() {
return numberOfItemsToAdd;
}

export function handleComplexityChange() {
numberOfItemsToAdd = Math.round(defaultNumberOfItemsToAdd * params.complexity);
}
2 changes: 2 additions & 0 deletions suites-experimental/javascript-wc-indexeddb/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
"scripts": {
"dev": "http-server ./ -p 7005 -c-1 --cors -o",
"build": "node scripts/build.mjs",
"build:resources": "node ../../resources/shared/generate-resources.mjs dist",
"postbuild": "npm run build:resources",
"serve": "http-server ./dist -p 7006 -c-1 --cors -o"
},
"keywords": [],
Expand Down
3 changes: 0 additions & 3 deletions suites-experimental/javascript-wc-indexeddb/scripts/build.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import path from "path";
import { generateResourcesFile } from "../../../resources/shared/generate-resources.mjs";
import fs from "fs/promises";
import { dirname } from "path";

Expand Down Expand Up @@ -167,4 +165,3 @@ const build = async () => {
};

await build();
await generateResourcesFile(path.join(import.meta.dirname, "../dist"));
4 changes: 3 additions & 1 deletion suites-experimental/responsive-design/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@
"serve": "web-dev-server --config web-dev-server.config.mjs",
"prebuild": "npm run build:main-css && npm run build:chat-window-css",
"build": "rollup --config rollup.config.js",
"build:main-css": "npx tailwindcss -i ./src/input.css -o ./src/tailwind.generated.css --minify",
"build:chat-window-css": "npx tailwindcss -c ./tailwind.chat-window.config.js -i ./src/input.css -o ./src/tailwind.chat-window.generated.css --minify",
"build:main-css": "npx tailwindcss -i ./src/input.css -o ./src/tailwind.generated.css --minify",
"build:resources": "node ../../resources/shared/generate-resources.mjs dist",
"postbuild": "npm run build:resources",
"dev": "concurrently \"npm:dev:*\"",
"dev:main-css": "npx tailwindcss -i ./src/input.css -o ./src/tailwind.generated.css --watch",
"dev:chat-window-css": "npx tailwindcss -c ./tailwind.chat-window.config.js -i ./src/input.css -o ./src/tailwind.chat-window.generated.css --watch",
Expand Down
2 changes: 2 additions & 0 deletions suites-experimental/todomvc-localstorage/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
"scripts": {
"dev": "http-server ./ -p 7001 -c-1 --cors",
"build": "node scripts/build.mjs",
"build:resources": "node ../../resources/shared/generate-resources.mjs dist",
"postbuild": "npm run build:resources",
"serve": "http-server ./dist -p 7002 -c-1 --cors"
},
"dependencies": {
Expand Down
2 changes: 0 additions & 2 deletions suites-experimental/todomvc-localstorage/scripts/build.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { generateResourcesFile } from "../../../resources/shared/generate-resources.mjs";
import fs from "fs/promises";
import path from "path";

Expand Down Expand Up @@ -55,4 +54,3 @@ const build = async () => {
};

await build();
await generateResourcesFile(path.join(import.meta.dirname, "../dist"));
1 change: 0 additions & 1 deletion suites/charts/dist/assets/chartjs-7fd89fd7.js.map

This file was deleted.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions suites/charts/dist/assets/chartjs.js.map

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion suites/charts/dist/assets/developer-4ed993c7.js.map

This file was deleted.

1 change: 1 addition & 0 deletions suites/charts/dist/assets/developer.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion suites/charts/dist/assets/flights-airports-9a9e6422.js.map

This file was deleted.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions suites/charts/dist/assets/flights-airports.js.map

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion suites/charts/dist/assets/index-4ed993c7.js.map

This file was deleted.

1 change: 1 addition & 0 deletions suites/charts/dist/assets/index.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion suites/charts/dist/assets/plot-562fbdb6.js.map

This file was deleted.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions suites/charts/dist/assets/plot.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions suites/charts/dist/chartjs.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
align-items: center;
}
</style>
<script type="module" crossorigin src="./assets/chartjs-7fd89fd7.js"></script>
<link rel="modulepreload" crossorigin href="./assets/flights-airports-9a9e6422.js">
<script type="module" crossorigin src="./assets/chartjs.js"></script>
<link rel="modulepreload" crossorigin href="./assets/flights-airports.js">
</head>
<body>
<div id="app">
Expand Down
4 changes: 2 additions & 2 deletions suites/charts/dist/observable-plot.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
min-width: 30px;
}
</style>
<script type="module" crossorigin src="./assets/plot-562fbdb6.js"></script>
<link rel="modulepreload" crossorigin href="./assets/flights-airports-9a9e6422.js">
<script type="module" crossorigin src="./assets/plot.js"></script>
<link rel="modulepreload" crossorigin href="./assets/flights-airports.js">
</head>
<body>
<div id="app">
Expand Down
16 changes: 8 additions & 8 deletions suites/charts/dist/resources.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
assets/chartjs-7fd89fd7.js
assets/chartjs-7fd89fd7.js.map
assets/developer-4ed993c7.js.map
assets/flights-airports-9a9e6422.js
assets/flights-airports-9a9e6422.js.map
assets/index-4ed993c7.js.map
assets/plot-562fbdb6.js
assets/plot-562fbdb6.js.map
assets/chartjs.js
assets/chartjs.js.map
assets/developer.js.map
assets/flights-airports.js
assets/flights-airports.js.map
assets/index.js.map
assets/plot.js
assets/plot.js.map
chartjs.html
developer.html
index.html
Expand Down
2 changes: 2 additions & 0 deletions suites/charts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
"scripts": {
"dev": "vite",
"build": "vite build",
"build:resources": "node ../../resources/shared/generate-resources.mjs dist",
"postbuild": "npm run build:resources",
"preview": "vite preview"
},
"devDependencies": {
Expand Down
1 change: 0 additions & 1 deletion suites/editors/dist/assets/codemirror-521de7ab.js.map

This file was deleted.

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions suites/editors/dist/assets/codemirror.js.map

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion suites/editors/dist/assets/index.es-02a92ebc.js.map

This file was deleted.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading