mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-15 19:30:38 +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:
@@ -5,8 +5,7 @@ import { commentSchema } from "./comment.js";
|
||||
import { authorSchema } from "../shared.js";
|
||||
|
||||
export type IssueState =
|
||||
| { status: "open" }
|
||||
| { status: "closed"; reason: "other" | "solved" };
|
||||
{ status: "open" } | { status: "closed"; reason: "other" | "solved" };
|
||||
|
||||
const issueStateSchema = z.union([
|
||||
z.object({ status: z.literal("open") }),
|
||||
|
||||
@@ -101,6 +101,4 @@ export type Patch = z.infer<typeof patchSchema>;
|
||||
export const patchesSchema = array(patchSchema) satisfies ZodSchema<Patch[]>;
|
||||
|
||||
export type LifecycleState =
|
||||
| { status: "draft" }
|
||||
| { status: "open" }
|
||||
| { status: "archived" };
|
||||
{ status: "draft" } | { status: "open" } | { status: "archived" };
|
||||
|
||||
Generated
+907
-428
File diff suppressed because it is too large
Load Diff
+24
-24
@@ -26,8 +26,8 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/js": "^10.0.1",
|
||||
"@playwright/test": "^1.60.0",
|
||||
"@sveltejs/vite-plugin-svelte": "^7.1.2",
|
||||
"@playwright/test": "^1.61.1",
|
||||
"@sveltejs/vite-plugin-svelte": "^7.2.0",
|
||||
"@tsconfig/svelte": "^5.0.8",
|
||||
"@types/js-yaml": "^4.0.9",
|
||||
"@types/katex": "^0.16.8",
|
||||
@@ -36,54 +36,54 @@
|
||||
"@types/md5": "^2.3.6",
|
||||
"@types/node": "^24",
|
||||
"@types/wait-on": "^5.3.4",
|
||||
"@typescript-eslint/parser": "^8.59.3",
|
||||
"@typescript-eslint/parser": "^8.63.0",
|
||||
"chalk": "^5.6.2",
|
||||
"config": "^4.4.1",
|
||||
"eslint": "^10.3.0",
|
||||
"config": "^4.4.2",
|
||||
"eslint": "^10.6.0",
|
||||
"eslint-config-prettier": "^10.1.8",
|
||||
"eslint-plugin-svelte": "^3.17.1",
|
||||
"eslint-plugin-svelte": "^3.20.0",
|
||||
"execa": "^9.6.1",
|
||||
"get-port": "^7.2.0",
|
||||
"globals": "^17.6.0",
|
||||
"happy-dom": "^20.9.0",
|
||||
"globals": "^17.7.0",
|
||||
"jsdom": "^29.1.1",
|
||||
"mdsvex": "^0.12.7",
|
||||
"prettier": "^3.8.3",
|
||||
"prettier-plugin-svelte": "^3.5.2",
|
||||
"prettier": "^3.9.4",
|
||||
"prettier-plugin-svelte": "^4.1.1",
|
||||
"rehype-slug": "^6.0.0",
|
||||
"remark-unwrap-images": "^4.0.1",
|
||||
"rimraf": "^6.1.3",
|
||||
"shiki": "^4.3.1",
|
||||
"svelte-check": "^4.4.8",
|
||||
"svelte-eslint-parser": "^1.6.1",
|
||||
"svelte-check": "^4.7.2",
|
||||
"svelte-eslint-parser": "^1.8.0",
|
||||
"typescript": "^6.0.3",
|
||||
"typescript-eslint": "^8.59.3",
|
||||
"vite": "^8.0.13",
|
||||
"vitest": "^4.1.6",
|
||||
"typescript-eslint": "^8.63.0",
|
||||
"vite": "^8.1.4",
|
||||
"vitest": "^4.1.10",
|
||||
"wait-on": "^9.0.10"
|
||||
},
|
||||
"dependencies": {
|
||||
"@wooorm/starry-night": "^3.9.0",
|
||||
"@wooorm/starry-night": "^3.10.0",
|
||||
"async-mutex": "^0.5.0",
|
||||
"baconjs": "^3.0.23",
|
||||
"bs58": "^6.0.0",
|
||||
"buffer": "^6.0.3",
|
||||
"compare-versions": "^6.1.1",
|
||||
"dompurify": "^3.4.3",
|
||||
"dompurify": "^3.4.12",
|
||||
"fuzzysort": "^3.1.0",
|
||||
"hast-util-to-dom": "^4.0.1",
|
||||
"hast-util-to-html": "^9.0.5",
|
||||
"js-yaml": "^4.1.1",
|
||||
"linkify-it": "^5.0.0",
|
||||
"js-yaml": "^5.2.1",
|
||||
"linkify-it": "^5.0.2",
|
||||
"lodash": "^4.18.1",
|
||||
"lru-cache": "^11.3.6",
|
||||
"marked": "^18.0.3",
|
||||
"lru-cache": "^11.5.2",
|
||||
"marked": "^18.0.5",
|
||||
"marked-emoji": "^2.0.3",
|
||||
"marked-footnote": "^1.4.0",
|
||||
"marked-katex-extension": "^5.1.8",
|
||||
"marked-katex-extension": "^5.1.10",
|
||||
"marked-linkify-it": "^3.1.15",
|
||||
"md5": "^2.3.0",
|
||||
"mermaid": "^11.15.0",
|
||||
"svelte": "^5.55.7",
|
||||
"mermaid": "^11.16.0",
|
||||
"svelte": "^5.56.4",
|
||||
"twemoji": "^14.0.2",
|
||||
"zod": "^4.4.3"
|
||||
}
|
||||
|
||||
+1
-1
@@ -2,6 +2,6 @@
|
||||
set -e
|
||||
|
||||
npx tsc --noEmit
|
||||
npx svelte-check --tsconfig tsconfig.json --fail-on-warnings --compiler-warnings options_missing_custom_element:ignore
|
||||
npx svelte-check --tsconfig tsconfig.json --config ./vite.config.ts --fail-on-warnings --compiler-warnings options_missing_custom_element:ignore
|
||||
npx eslint --cache --cache-location node_modules/.cache/eslint --max-warnings 0 .
|
||||
npx prettier "**/*.@(ts|js|svelte|json|css|html|yml)" --ignore-path .gitignore --ignore-path .prettierignore --check --cache
|
||||
|
||||
+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("");
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@ export default defineConfig({
|
||||
buildTimeConfig: JSON.stringify(config.util.toObject()),
|
||||
},
|
||||
test: {
|
||||
environment: "happy-dom",
|
||||
environment: "jsdom",
|
||||
include: ["tests/unit/**/*.test.ts"],
|
||||
reporters: "verbose",
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user