mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-29 10:10:30 +08:00
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:
+1
-6
@@ -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 = [
|
||||
|
||||
@@ -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>)
|
||||
|
||||
@@ -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("");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user