-
Notifications
You must be signed in to change notification settings - Fork 92
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
fix: improve lifecycle deprecated message #275
Conversation
WalkthroughThe pull request introduces updates to the deprecation messages in the Changes
Poem
Tip CodeRabbit's docstrings feature is now available as part of our Early Access Program! Simply use the command Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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 (3)
src/egg.ts (3)
236-236
: Update URL format for consistencyThe deprecation message URL should follow the standard EggJS documentation URL format.
- this.deprecate('`beforeStart` was deprecated, please use "Life Cycles" instead, see https://www.eggjs.org/advanced/loader#life-cycles'); + this.deprecate('`beforeStart` was deprecated, please use "Life Cycles" instead, see https://eggjs.org/advanced/loader-life-cycles');
279-279
: Update URL format for consistencyThe deprecation message URL should follow the standard EggJS documentation URL format.
- this.deprecate('`readyCallback` was deprecated, please use "Life Cycles" instead, see https://www.eggjs.org/advanced/loader#life-cycles'); + this.deprecate('`readyCallback` was deprecated, please use "Life Cycles" instead, see https://eggjs.org/advanced/loader-life-cycles');
296-296
: Update URL format for consistencyThe deprecation message URL should follow the standard EggJS documentation URL format.
- this.deprecate('`beforeClose` was deprecated, please use "Life Cycles" instead, see https://www.eggjs.org/advanced/loader#life-cycles'); + this.deprecate('`beforeClose` was deprecated, please use "Life Cycles" instead, see https://eggjs.org/advanced/loader-life-cycles');
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
src/egg.ts
(3 hunks)
🔇 Additional comments (1)
src/egg.ts (1)
Line range hint 236-296
: LGTM! Clear and consistent deprecation messages
The changes improve the clarity of deprecation messages across all lifecycle methods (beforeStart
, readyCallback
, and beforeClose
). The messages are consistent in their structure and effectively guide users to the Life Cycles documentation.
commit: |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #275 +/- ##
=======================================
Coverage 92.89% 92.89%
=======================================
Files 10 10
Lines 3294 3294
Branches 529 529
=======================================
Hits 3060 3060
Misses 234 234 ☔ View full report in Codecov by Sentry. |
[skip ci] ## [6.2.1](v6.2.0...v6.2.1) (2024-12-18) ### Bug Fixes * improve lifecycle deprecated message ([#275](#275)) ([ff906ee](ff906ee))
Summary by CodeRabbit
Bug Fixes
beforeStart
,readyCallback
, andbeforeClose
methods to clarify recommended alternatives.Documentation