refactor: simplify Phase 1 infrastructure code

- cache-invalidation: extract isExpectedRevalidateError helper
- integration-data-cache: flatten early-return chain, extract eviction
- redis-handler: extract StoredEntry type, readStreamBody, ensureConnected
- svg-purify: single getOwnPropertyDescriptor lookup per prop
- session-scoped-providers: simplify auth flow
- retryable-loader: use function declarations
- translation/request: replace spread-in-reduce with for loop
This commit is contained in:
Thomas Camlong committed 2026-08-07 21:04:42 +02:00
1 parent b3b2d5a022
commit 33293ba1cf
8 files changed
+148 -134

No files matched your search

+3 -3
View File
@@ -1,7 +1,7 @@
export const createRetryableLoader = <TKey, TValue>(loaders: ReadonlyMap<TKey, () => Promise<TValue>>) => {
export function createRetryableLoader<TKey, TValue>(loaders: ReadonlyMap<TKey, () => Promise<TValue>>) {
const promises = new Map<TKey, Promise<TValue>>();
return (key: TKey) => {
return function load(key: TKey) {
const existing = promises.get(key);
if (existing) return existing;
@@ -15,4 +15,4 @@ export const createRetryableLoader = <TKey, TValue>(loaders: ReadonlyMap<TKey, (
});
return promise;
};
};
}