Upgrade npm dependencies

This also upgrades dompurify to the latest version, outside our cooldown
window, for a security fix (verified safe with extra security checks).

Newer dompurify versions expose a bug where happy-dom renders one of our
custom elements incorrectly in tests, unlike real browsers. Switch the unit
test environment from happy-dom to jsdom to fix the failing tests.
This commit is contained in:
Rūdolfs Ošiņš
2026-07-16 11:34:41 +02:00
parent 447d8887a3
commit 3c2935704f
9 changed files with 942 additions and 473 deletions
+1 -6
View File
@@ -3,12 +3,7 @@ import { cached } from "@app/lib/cache";
type AtomType = "A" | "B" | "C" | "D";
type ShapeModel =
| "rose"
| "starburst"
| "ringed"
| "tip"
| "notched"
| "hollow";
"rose" | "starburst" | "ringed" | "tip" | "notched" | "hollow";
type AtomMode = "bands-ABC" | "angle-stripes" | "parity-ACB" | "balanced-rand";
const PALETTE = [
+2 -2
View File
@@ -1,4 +1,4 @@
import yaml from "js-yaml";
import { load } from "js-yaml";
const FRONTMATTER_RE = /^---\r?\n([\s\S]*?)\r?\n---\r?\n?/;
@@ -12,7 +12,7 @@ export function parseFrontmatter(input: string): ParsedFrontmatter {
if (!match) {
return { data: {}, content: input };
}
const parsed = yaml.load(match[1]);
const parsed = load(match[1]);
const data =
parsed && typeof parsed === "object" && !Array.isArray(parsed)
? (parsed as Record<string, unknown>)
+4 -6
View File
@@ -77,12 +77,10 @@
});
function deselectHandler(e: MouseEvent) {
if (
!(
e.target instanceof HTMLElement &&
e.target.closest("[data-file-diff-select]")
)
) {
if (!(
e.target instanceof HTMLElement &&
e.target.closest("[data-file-diff-select]")
)) {
updateHash("");
}
}