-
-
Notifications
You must be signed in to change notification settings - Fork 1
feat!: warning for h3 and hone utils #70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughThe PR introduces a deprecation warning system by creating a new Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~15 minutes
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 inconclusive)
✅ Passed checks (2 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 |
commit: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
src/utils.ts (1)
6-28: LGTM! Clean deprecation warning utility.The implementation is solid: checking console availability, deduplicating warnings via the
hasWarnedcache, and providing a simple public API. This is an appropriate pattern for deprecation warnings.Optional consideration: The
hasWarnedcache grows unbounded. For deprecation warnings with a fixed set of messages (as in this PR), this is negligible. If the utility were to be used more broadly with dynamic messages, consider adding a cache size limit or TTL, but for the current use case this is perfectly fine.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
src/h3.ts(14 hunks)src/hono.ts(14 hunks)src/utils.ts(1 hunks)
🧰 Additional context used
🧬 Code graph analysis (2)
src/hono.ts (1)
src/utils.ts (1)
warnOnce(23-28)
src/h3.ts (1)
src/utils.ts (1)
warnOnce(23-28)
🔇 Additional comments (2)
src/hono.ts (1)
28-28: Excellent deprecation strategy.The deprecation warnings are consistently applied across all Hono utilities, placed at function entry, and provide clear migration guidance to users. The underlying functionality remains unchanged, ensuring backward compatibility while guiding users toward the unified
@intlify/utilsAPI.Also applies to: 61-63, 95-97, 130-132, 151-153, 192-194, 218-220, 255-257, 277-279, 316-318, 336-338, 354-356, 376-378, 395-397
src/h3.ts (1)
28-28: LGTM! Consistent H3 deprecation warnings.The deprecation approach mirrors
src/hono.tsperfectly, maintaining consistency across framework-specific entry points. All warnings are properly placed and provide clear migration paths to the unified API.Also applies to: 65-67, 103-105, 137-139, 158-160, 199-201, 225-227, 261-263, 283-285, 321-323, 341-343, 359-361, 381-383, 400-402
Description
Linked Issues
related #69
Additional context
Summary by CodeRabbit