From 0537cbfb100f0ddd0c65687a60de88c29979987c Mon Sep 17 00:00:00 2001 From: MHSanaei Date: Sat, 20 Jun 2026 22:40:24 +0200 Subject: [PATCH] chore: bump dompurify to 3.4.11 and expand VS Code tasks - override dompurify to ^3.4.11 (fixes setConfig hook-pollution XSS advisory in the transitive swagger-ui-react dep) - add frontend tasks (build, dev, gen, lint, test, typecheck, install, ncu) and go tasks (fmt, modernize, modernize -fix) - add compound tasks: build:full (frontend + go) and check:all --- .vscode/tasks.json | 223 ++++++++++++++++++++++++++++++++++++- frontend/package-lock.json | 6 +- frontend/package.json | 1 + 3 files changed, 223 insertions(+), 7 deletions(-) diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 0644bb9da..9cd83d6e4 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -74,15 +74,230 @@ { "label": "go: fmt", "type": "shell", - "command": "gofmt", + "command": "go", "args": [ - "-l", - "-w", - "." + "fmt", + "./..." ], "options": { "cwd": "${workspaceFolder}" }, + "problemMatcher": [ + "$go" + ] + }, + { + "label": "go: modernize", + "type": "shell", + "command": "modernize", + "args": [ + "./..." + ], + "options": { + "cwd": "${workspaceFolder}" + }, + "problemMatcher": [ + "$go" + ] + }, + { + "label": "go: modernize -fix", + "type": "shell", + "command": "modernize", + "args": [ + "-fix", + "./..." + ], + "options": { + "cwd": "${workspaceFolder}" + }, + "problemMatcher": [ + "$go" + ] + }, + { + "label": "frontend: ncu -u", + "type": "shell", + "command": "npx", + "args": [ + "npm-check-updates", + "-u" + ], + "options": { + "cwd": "${workspaceFolder}/frontend" + }, + "problemMatcher": [] + }, + { + "label": "frontend: install", + "type": "shell", + "command": "npm", + "args": [ + "install" + ], + "options": { + "cwd": "${workspaceFolder}/frontend" + }, + "problemMatcher": [] + }, + { + "label": "frontend: dev", + "type": "shell", + "command": "npm", + "args": [ + "run", + "dev" + ], + "options": { + "cwd": "${workspaceFolder}/frontend" + }, + "isBackground": true, + "problemMatcher": [], + "presentation": { + "panel": "dedicated", + "group": "dev" + } + }, + { + "label": "frontend: build", + "type": "shell", + "command": "npm", + "args": [ + "run", + "build" + ], + "options": { + "cwd": "${workspaceFolder}/frontend" + }, + "problemMatcher": [ + "$tsc" + ], + "group": "build" + }, + { + "label": "frontend: gen", + "type": "shell", + "command": "npm", + "args": [ + "run", + "gen" + ], + "options": { + "cwd": "${workspaceFolder}/frontend" + }, + "problemMatcher": [] + }, + { + "label": "frontend: lint", + "type": "shell", + "command": "npm", + "args": [ + "run", + "lint" + ], + "options": { + "cwd": "${workspaceFolder}/frontend" + }, + "problemMatcher": [ + "$eslint-stylish" + ] + }, + { + "label": "frontend: test", + "type": "shell", + "command": "npm", + "args": [ + "run", + "test" + ], + "options": { + "cwd": "${workspaceFolder}/frontend" + }, + "problemMatcher": [], + "group": "test" + }, + { + "label": "frontend: test:watch", + "type": "shell", + "command": "npm", + "args": [ + "run", + "test:watch" + ], + "options": { + "cwd": "${workspaceFolder}/frontend" + }, + "isBackground": true, + "problemMatcher": [], + "group": "test", + "presentation": { + "panel": "dedicated", + "group": "test" + } + }, + { + "label": "frontend: typecheck", + "type": "shell", + "command": "npm", + "args": [ + "run", + "typecheck" + ], + "options": { + "cwd": "${workspaceFolder}/frontend" + }, + "problemMatcher": [ + "$tsc" + ] + }, + { + "label": "frontend: gen:zod", + "type": "shell", + "command": "npm", + "args": [ + "run", + "gen:zod" + ], + "options": { + "cwd": "${workspaceFolder}/frontend" + }, + "problemMatcher": [] + }, + { + "label": "frontend: gen:api", + "type": "shell", + "command": "npm", + "args": [ + "run", + "gen:api" + ], + "options": { + "cwd": "${workspaceFolder}/frontend" + }, + "problemMatcher": [] + }, + { + "label": "build: full (frontend + go)", + "dependsOrder": "sequence", + "dependsOn": [ + "frontend: build", + "go: build" + ], + "problemMatcher": [], + "group": { + "kind": "build", + "isDefault": false + } + }, + { + "label": "check: all", + "dependsOn": [ + "go: vet", + "go: test", + "frontend: lint", + "frontend: typecheck", + "frontend: test" + ], "problemMatcher": [] } ] diff --git a/frontend/package-lock.json b/frontend/package-lock.json index b1cf05ffe..1a1603ceb 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -4388,9 +4388,9 @@ "license": "MIT" }, "node_modules/dompurify": { - "version": "3.4.10", - "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.4.10.tgz", - "integrity": "sha512-0xzNv0e7oYC6yyuOGZIABPM4qtg3QxLFniDNPP4ZP90wR8Yq3zgwpRbrNiT4N3IKqDbbYFEJLV+JWEs19aZ//w==", + "version": "3.4.11", + "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.4.11.tgz", + "integrity": "sha512-zhlUV12GsaRzMsf9q5M254YhA4+VuF0fG+QFqu6aYpoGlKtz+w8//jBcGVYBgQkR5GHjUomejY84AV+/uPbWdw==", "license": "(MPL-2.0 OR Apache-2.0)", "optionalDependencies": { "@types/trusted-types": "^2.0.7" diff --git a/frontend/package.json b/frontend/package.json index 59f337941..47ba87c47 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -61,6 +61,7 @@ "vitest": "^4.1.9" }, "overrides": { + "dompurify": "^3.4.11", "react-copy-to-clipboard": "^5.1.1", "react-inspector": "^9.0.0", "react-debounce-input": {