Javascript dependency: Bump use-resize-observer from 9.1.0 to 10.0.0 (#10265) - #10299
Javascript dependency: Bump use-resize-observer from 9.1.0 to 10.0.0 (#10265)#10299dpage wants to merge 1 commit into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (2)
Included review availability: Your plan includes up to 8 reviews per rolling hour; 7 remain after this review. WalkthroughThe PR updates ChangesResize observer update
Estimated code review effort: 1 (Trivial) | ~3 minutes Merge Risk: ⚪ Minimal · up to This updates the resize-observer dependency and its import to preserve Object Explorer behavior; no actionable merge-blocking risk remains beyond normal checks and review. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…gadmin-org#10265) v10 removes the default export in favour of a named one, so the import in PgTreeView had to change with it; left as it was, useResizeObserver resolves to undefined and the Object Explorer dies when the hook is called. The rest of the v10 changes cost us nothing: it drops the /polyfilled entrypoint and its @juggle/resize-observer dependency, no longer takes react-dom as a peer, and requires React >= 18.2, which is comfortably met on React 19. The hook still returns the { ref, width, height } shape the tree destructures. Verified by hand in Chrome and Safari with the tree expanded through databases, schemas, tables and tablespaces, resizing the panel and the window.
538ad0d to
7cc2628
Compare
Supersedes #10265, which could not be merged as it stood.
use-resize-observer 10.0.0 removes the default export in favour of a named one, whilst
web/pgadmin/static/js/PgTreeView/index.jsx:19imported it as a default. Left alone,useResizeObserverresolves toundefinedand the Object Explorer dies the moment the hook is called, so the bump needs the import change to go with it:I checked the published package rather than relying on the release notes: v10 exports
useResizeObserveras a named export only, in bothdist/index.mjsanddist/index.cjs, with no default in either. The hook signature still returns the{ ref, width, height }shape that line 81 destructures, this is the only use of the package in the tree, and there is no webpack or jest alias for it.The rest of v10 costs us nothing: it drops the
/polyfilledentrypoint and the@juggle/resize-observerdependency, no longer takesreact-domas a peer, and requires React >= 18.2, comfortably met on React 19.Testing
Verified by hand in both Chrome and Safari against a local PostgreSQL 18, with the tree expanded through databases, schemas, casts, tables and tablespaces, resizing both the Object Explorer panel and the window. The tree renders and redraws correctly in both.
Worth stating why this one was hand-tested rather than merged on a green board:
run-javascript-testscannot see this class of breakage, since the component only fails when it mounts. That is exactly how the pickr bump in #10264 reached master and took the feature tests down for three days (reverted in #10278), and why #10287 was closed rather than merged.Summary by CodeRabbit