You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Stage 7: small dependency cleanups (final modernization stage)
Seventh and final step of the frontend modernization: the remaining
small, independently-swappable dependencies flagged in the original
audit.
- downshift: removed entirely (declared but zero usages - TagSelector.tsx
already implements its own combobox logic by hand).
- lodash.clonedeep: removed; its one call site (cloning a dashboard entry
before editing) now uses structuredClone, standard in all supported
runtimes.
- @rooks/use-interval / @rooks/use-timeout: inlined as ~15-line custom
hooks in utils/hooks.ts (ref-based latest-callback pattern, matching
each package's actual behavior) - each package was a thin wrapper
around setInterval/setTimeout, not worth a dependency for 5 call sites.
- color-hash: 1.0.3 -> 2.0.2, dropped the `@ts-expect-error` in favor of
the real @types/color-hash declarations.
- react-grid-layout: 0.16.6 -> 1.5.3, not the current 2.x line - v2 is a
hooks-based rewrite that dropped WidthProvider (and the whole class-
component API this app's DashboardPage.tsx is built around) in favor
of new hooks, which would be a real rewrite, not a dependency bump. 1.x
keeps the same WidthProvider/class-component shape (confirmed by
diffing its source against 0.16) while being multiple years of
bugfixes newer. Paired with @types/react-grid-layout@1.3.6 (the last
version with real declarations - 2.x's types package is a stub
pointing at the source package's own bundled types, which only exist
in react-grid-layout v2). This also let the React-18-children cast
added in the MUI stage be removed - 1.3.6's types already declare
children correctly.
- react-color (ancient 3.0.0-beta.3, unmaintained) -> react-colorful:
swapped the hue-only SliderPicker for HexColorPicker (react-colorful
has no dedicated hue-slider export, only full pickers) in the two tag
color-editing dialogs - a small, visible UI change but a maintained,
dependency-free, actively-secure package.
- react-infinite: removed. Its virtualized-scroll usage in
timespan/DoneTrackers.tsx was replaced with a plain IntersectionObserver
sentinel that calls the same fetchMore() on scroll-into-view - this is
a personal time log, not large enough to need DOM virtualization, and
it deleted the height-tracking ref/effect machinery that existed only
to feed react-infinite's layout calculations.
- @fullcalendar/*: 4.3.x -> 6.1.21 across all six packages. This was the
largest real API migration in this stage: initialView (was
defaultView), datesSet (was datesRender), headerToolbar (was header),
dayHeaderFormat (was columnHeaderFormat), eventContent + eventDidMount
replacing the single DOM-mutating eventRender (v5+ moved event
rendering to a declarative model - content injection is now separate
from post-mount DOM side effects), EventChangeArg's oldEvent (was
prevEvent on the resize handler specifically, inconsistent with the
drop handler's already-correct oldEvent - once fixed both handlers
were identical and got merged into one). The bundled per-package CSS
imports (main.css) are gone - v5+ injects its own styles - which also
meant the app's custom FullCalendarStyling.tsx overrides needed their
selectors updated for the new DOM/class names (.fc-content ->
.fc-event-main, .fc-time-grid-event -> .fc-timegrid-event, .fc-today ->
.fc-day-today, etc.); the dead v4 day-grid/month-view rules were
dropped since this app only ever shows timeGrid views. Also had to
add an explicit `.fc { height: 100% }` rule, since fc's height:"parent"
option stopped auto-filling its container - unclear whether that's a
behavior change or just newly needing the CSS assist since the
removed default stylesheet controlled it before.
Verified: eslint/tsc/vitest clean, make lint-js/test-js/build-js, a real
go build + running binary, and browser walkthroughs of every affected
surface individually - the react-colorful picker (dialog open, pick a
color, save), the react-grid-layout dashboard (create, enter edit mode,
add-entry grid tile), and FullCalendar (week view renders pixel-similar
to before, an active tracker's event shows the live-updating STOP button
via eventContent, drag/resize/click handlers all still fire) - all zero
console errors. Final `yarn audit`: 114 critical/664 high/350 moderate/89
low -> 0 critical/8 high/6 moderate/0 low, all of which are transitive
lodash/d3-color findings from recharts (deliberately kept unchanged per
the modernization plan - bumping it is a separate, larger effort with
its own breaking-change surface, noted as a follow-up rather than done
here).
0 commit comments