Fix: barrel imports - #295
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📝 WalkthroughWalkthroughThe package version is updated to ChangesComponent release update
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 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 |
There was a problem hiding this comment.
Pull request overview
Updates the library’s component “barrel” export strategy to reduce unintended dependency requirements from importing lib/components, and documents the preferred per-module import approach for consumers.
Changes:
- Removed
UploadInputV3from thesrc/components/index.jsbarrel export and listed it under the “3rd party deps” commented-out section. - Added README guidance recommending direct per-component import paths and explaining why some components are excluded from the barrel.
- Bumped the package version to
5.0.44-beta.0.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/components/index.js | Removes UploadInputV3 from the barrel and documents it as excluded due to external deps. |
| readme.md | Adds guidance on importing from individual component paths and rationale for excluding some exports from the barrel. |
| package.json | Updates package version to 5.0.44-beta.0. |
Suppressed comments (1)
readme.md:31
- This new "Importing Components" section makes the following "Enviroment Variables" heading look like a sub-section of it. If this is meant to be a top-level section, bump it back to
##and fix the spelling to "Environment".
will not resolve them.
### Enviroment Variables
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| export {default as GroupedDropdown} from './inputs/grouped-dropdown' | ||
| export {default as UploadInput} from './inputs/upload-input' | ||
| export {default as UploadInputV2} from './inputs/upload-input-v2' | ||
| export {default as UploadInputV3} from './inputs/upload-input-v3' |
There was a problem hiding this comment.
@santipalenque Removing this export still breaks one consumer in summit-admin master.
fntechgit/summit-admin#1013 migrated the barrel imports of UploadInputV3 to the path import, but src/components/forms/event-category-form.js:33 was added by #1024 (merged 55 minutes after #1013) and still does:
import { UploadInputV3 } from "openstack-uicore-foundation/lib/components";
Because lib/ is a compiled UMD bundle, a missing named export is not a build error — it resolves to undefined and the event category edit page will fail at render ("Element type is invalid") as soon as summit-admin bumps to a uicore version that includes this change.
Suggested fix: land a one-line follow-up in summit-admin switching that import to
import UploadInputV3 from "openstack-uicore-foundation/lib/components/inputs/upload-input-v3";
(same pattern as #1013) and merge it before, or together with, the uicore bump that picks this PR up.
There was a problem hiding this comment.
commited change, now admin is safe for this version change: fntechgit/summit-admin@4bc167d
7e1eebf to
2b9ef04
Compare
https://app.clickup.com/t/9014802374/86baz0zt6
Summary by CodeRabbit
5.0.44-beta.0.