fix: export missing TimeRange type#2590
Conversation
The TimeRange type is defined in shared/date/types.ts but was not re-exported from shared/index.ts, making it unavailable to consumers while the similar DateRange type is exported. Fixes unovue#2589 Signed-off-by: bahtya <bahtyar153@qq.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthroughRe-exports the Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@packages/core/src/shared/index.ts`:
- Line 5: The barrel export in shared/index.ts references TimeRange but the
./date index does not re-export it; open the date module's index (where other
types like DateRange, DateStep, DateValue are exported) and add an export for
TimeRange that forwards it from the underlying types file (e.g., export { type
TimeRange } from './types'), ensuring the symbol TimeRange is exported alongside
the existing DateRange/DateStep/DateValue exports so the shared/index.ts
re-export succeeds.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 5312e04d-8b48-47bf-85dc-f65bc4ddbc26
📒 Files selected for processing (1)
packages/core/src/shared/index.ts
The shared/index.ts re-exports TimeRange from ./date, but TimeRange was missing from the date barrel (shared/date/index.ts). This caused a resolution failure. TimeRange is defined in shared/date/types.ts alongside DateRange and other date types, so it belongs in the same barrel export. Verified: build passes and TimeRange appears in dist/shared.d.ts. Bahtya
|
Fixed the CodeRabbit issue: added Build verified: |
|
Friendly ping — CodeRabbit review is passing with no actionable comments. This is a small type-export-only change (2 lines) that fixes #2589. Would appreciate a maintainer review when you get a chance. Thanks! |
commit: |
Problem
Fixes #2589
The
TimeRangetype is defined inshared/date/types.tsand used internally byTimeRangeField, but it is not re-exported fromshared/index.ts. This makes it unavailable to consumers, while the analogousDateRangetype is properly exported.Fix
Add
TimeRangeto the existing export line inpackages/core/src/shared/index.ts:Testing
TimeRangewas already defined and used internally; this just makes it available to library consumersSummary by CodeRabbit