web_ui: bump npm pins to newest stable
Some checks failed
dependency freshness / dependencies on newest stable (push) Waiting to run
file length / file-length (push) Waiting to run
md-naming / markdown naming convention (push) Waiting to run
palette drift / palette (push) Waiting to run
repo-contract / repo contract (push) Waiting to run
shared gate tests / gate unit tests (push) Waiting to run
ts_config tests / test (push) Has been cancelled
ts_core tests / test (push) Has been cancelled
web_ui tests / test (push) Has been cancelled

jsdom 31 rounds style numbers to 4 decimals; the range
slider test now compares percentages numerically.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WzxdWYDm7szKeXoi7rinEy
This commit is contained in:
Krzysztof Rudnicki 2026-11-08 18:43:33 +01:00
parent 3017bbf220
commit f71b0532fd
3 changed files with 275 additions and 322 deletions

View File

@ -9,7 +9,7 @@
"node": ">=24", "node": ">=24",
"pnpm": ">=10" "pnpm": ">=10"
}, },
"packageManager": "pnpm@12.16.1+sha512.091d1dee7927575661b25dab3c2ae31cafc1c54d6b71ed6a6600cf0c1cb10434a447eae14015f1b23e2e6bedeed79df94a932e2164d2832280dce3fb32f656d1", "packageManager": "pnpm@12.18.0+sha512.9d7882d5dc82147ecfc4e062aa34834e0ad0296710a1837a1115ae012127d36b7109e321ac1598a1dd0a65597681b1e99917e12ed0d749eae91187943363beb3",
"files": [ "files": [
"dist", "dist",
"src/*.astro" "src/*.astro"
@ -33,7 +33,7 @@
"coverage": "vitest run --coverage" "coverage": "vitest run --coverage"
}, },
"peerDependencies": { "peerDependencies": {
"astro": ">=7.4.0" "astro": "7.4.7"
}, },
"devDependencies": { "devDependencies": {
"@astrojs/check": "0.9.12", "@astrojs/check": "0.9.12",
@ -43,12 +43,12 @@
"@testing-library/jest-dom": "7.0.1", "@testing-library/jest-dom": "7.0.1",
"@testing-library/user-event": "14.6.8", "@testing-library/user-event": "14.6.8",
"@types/node": "26.6.6", "@types/node": "26.6.6",
"@vitest/coverage-v8": "5.0.5", "@vitest/coverage-v8": "5.1.0",
"astro": "7.4.4", "astro": "7.4.7",
"eslint": "10.14.0", "eslint": "10.14.0",
"jsdom": "30.1.3", "jsdom": "31.0.0",
"typescript": "6.0.3", "typescript": "6.0.3",
"typescript-eslint": "8.72.1", "typescript-eslint": "8.72.1",
"vitest": "5.0.5" "vitest": "5.1.0"
} }
} }

File diff suppressed because it is too large Load Diff

View File

@ -45,11 +45,13 @@ describe("rendering", () => {
it("positions the thumbs and the fill from lo and hi", () => { it("positions the thumbs and the fill from lo and hi", () => {
const { element } = mount({ hi: "70", lo: "20" }); const { element } = mount({ hi: "70", lo: "20" });
expect(thumb(element, "lo").style.left).toBe(`${String((2 / 9) * 100)}%`); // jsdom 31 rounds serialized style numbers to 4 decimals, so compare numerically.
expect(thumb(element, "hi").style.left).toBe(`${String((7 / 9) * 100)}%`); const percent = (value: string): number => Number(value.replace("%", ""));
expect(element.querySelector<HTMLElement>(".slider-fill")?.style.left).toBe( expect(percent(thumb(element, "lo").style.left)).toBeCloseTo((2 / 9) * 100, 3);
`${String((2 / 9) * 100)}%`, expect(percent(thumb(element, "hi").style.left)).toBeCloseTo((7 / 9) * 100, 3);
); expect(
percent(element.querySelector<HTMLElement>(".slider-fill")?.style.left ?? ""),
).toBeCloseTo((2 / 9) * 100, 3);
}); });
it("reports lo and hi as the distribution bounds when unconstrained", () => { it("reports lo and hi as the distribution bounds when unconstrained", () => {