Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Suppress Circular Dependencies Warnings related to D3 (#1501)
# Pull Request ## 🤨 Rationale The d3 library chooses to intentionally keep circular dependencies: d3/d3-selection#168 Rollup reports circular dependencies as warnings but to limit verbosity only show the first few so all we see are warnings related to d3. Example: ``` > rollup --bundleConfigAsCjs --config dist/esm/all-components.js → dist/all-components-bundle.js... (!) Circular dependencies ../../node_modules/d3-selection/src/selection/index.js -> ../../node_modules/d3-selection/src/selection/select.js -> ../../node_modules/d3-selection/src/selection/index.js ../../node_modules/d3-selection/src/selection/index.js -> ../../node_modules/d3-selection/src/selection/selectAll.js -> ../../node_modules/d3-selection/src/selection/index.js ../../node_modules/d3-selection/src/selection/index.js -> ../../node_modules/d3-selection/src/selection/filter.js -> ../../node_modules/d3-selection/src/selection/index.js ...and 12 more created dist/all-components-bundle.js in 12.3s ``` If we introduce circular dependencies or add a library that introduces additional circular dpendencies they may be missed. ## 👩💻 Implementation Implemented a rollup onwarn handler that can filter out the d3 libraries circular dependency warnings. ## 🧪 Testing Validated locally that choosing a more specific prefix like `d3-selection` will filter only warnings for that subset and let others through. ## ✅ Checklist - [x] I have updated the project documentation to reflect my changes or determined no changes are needed.
- Loading branch information