fix(ci): resolve pipeline #516 audit and test failures
All checks were successful
ci/woodpecker/push/orchestrator Pipeline was successful
ci/woodpecker/push/web Pipeline was successful
ci/woodpecker/push/api Pipeline was successful

- Add pnpm overrides for minimatch (>=10.2.1) and tar (>=7.5.8)
  to resolve high-severity audit findings blocking CI
- Add localStorage mock to web vitest setup to fix ThemeProvider
  test failures (localStorage.clear not a function)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-21 14:07:26 -06:00
parent 0a780a5062
commit 8f9eac7a94
3 changed files with 61 additions and 86 deletions

View File

@@ -24,3 +24,33 @@ Object.defineProperty(window, "matchMedia", {
dispatchEvent: () => false,
}),
});
// Ensure localStorage exists with a full Storage API for tests.
// Avoid touching the built-in accessor (which emits warnings in Node).
let storageStore: Record<string, string> = {};
const storageMock: Storage = {
getItem: (key: string): string | null => storageStore[key] ?? null,
setItem: (key: string, value: string): void => {
storageStore[key] = value;
},
removeItem: (key: string): void => {
// eslint-disable-next-line @typescript-eslint/no-dynamic-delete
delete storageStore[key];
},
clear: (): void => {
storageStore = {};
},
get length(): number {
return Object.keys(storageStore).length;
},
key: (index: number): string | null => {
const keys = Object.keys(storageStore);
return keys[index] ?? null;
},
};
Object.defineProperty(window, "localStorage", {
value: storageMock,
writable: true,
configurable: true,
});