Repository navigation
fix(ui): use lru-cache v11 API in LineageSceneCache (unbreak main after #37062) - #37073
Conversation
#37062 bumped lru-cache to ^11.5.3, which drops the default export and renames del/reset to delete/clear. The default import broke the vite build (MISSING_EXPORT) and every LineageSceneCache test.
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically. Maintainers can bypass this check by adding the |
Code Review ✅ Approved🟡 Medium risk · Switching the lineage scene cache to lru-cache v11 methods could mis-handle invalidation, leaving stale or missing lineage scenes. Switches VerificationRules No rules evaluated Functional validation Not enabledAuto-approval Not enabledFor more verification details, comment OptionsDisplay: compact → Showing compact verification results. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
|



Describe your changes:
Fixes the
mainbreakage from #37062 (Dependabot:lru-cache→^11.5.3). No separate issue; this is a follow-up to that bump.lru-cache v11 removed the default export and renamed
del/resettodelete/clear.LineageSceneCache.utils.ts(from #29204) still used the v6 API, so since #37062 merged:[MISSING_EXPORT] "default" is not exported by "node_modules/lru-cache/dist/esm/browser/index.min.js"LineageSceneCache.utils.test.tstests (_lrucache.default is not a constructor)Every PR that merges
mainin picks this up (e.g. #37049).Changes in
LineageSceneCache.utils.ts:import { LRUCache } from 'lru-cache',del→delete,reset→clear. It's the onlylru-cacheimport in the UI.Type of change:
High-level design:
N/A — small change.
Tests:
Use cases covered
Unit tests
LineageSceneCache.utils.test.tscovers it. With lru-cache 11.5.3: 6/6 pass (before: 0/6 with the default import; 2/6 with only the import changed).tsc --stricton the file passes against v11's bundled types; eslint + prettier clean.Backend integration tests
Ingestion integration tests
Playwright (UI) tests
Manual testing performed
dist/esm/browser/index.min.js) exportsLRUCacheby name, which is what the vite build resolves.UI screen recording:
Not applicable — dependency API fix with no visible change.
Checklist: