Skip to content

Commit a064103

Browse files
authored
fix(security): fix npm audit (#7824)
# Motivation Npm detected a security vulnerability: ``` @sveltejs/kit <=2.57.0 Severity: high @sveltejs/kit: Unvalidated redirect in handle hook causes Denial-of-Service - GHSA-3f6h-2hrp-w5wx @sveltejs/adapter-node has a BODY_SIZE_LIMIT bypass - GHSA-2crg-3p73-43xp fix available via `npm audit fix` ``` # Changes Run npm audit fix + fix TS new detection. # Tests Tests should pass. # Todos - [x] Accessibility (a11y) – any impact? - [x] Changelog – is it needed?
1 parent 87857e4 commit a064103

File tree

3 files changed

+17
-6
lines changed

3 files changed

+17
-6
lines changed

frontend/package-lock.json

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frontend/src/app.d.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,14 @@ declare namespace App {
77
// interface Error {}
88
// interface Platform {}
99
}
10+
11+
/** WICG File System Access — TypeScript's bundled `lib.dom` does not declare `showSaveFilePicker` on `Window`. */
12+
interface Window {
13+
showSaveFilePicker?: (options: {
14+
suggestedName?: string;
15+
types?: Array<{
16+
description: string;
17+
accept: Record<string, string[]>;
18+
}>;
19+
}) => Promise<FileSystemFileHandle>;
20+
}

frontend/src/lib/utils/reporting.save-csv-to-file.utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const saveFileWithPicker = async ({
2323
description: string;
2424
}) => {
2525
try {
26-
const handle = await window.showSaveFilePicker({
26+
const handle = await window.showSaveFilePicker!({
2727
suggestedName: `${fileName}.csv`,
2828
types: [
2929
{

0 commit comments

Comments
 (0)