-
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: export Router Class #277
Conversation
WalkthroughThe pull request introduces updates to the Changes
Sequence DiagramsequenceDiagram
participant App as EggCore
participant Router as Router
participant Middleware as Middleware
App->>Router: Initialize router
App->>Middleware: Register middleware
App->>App: Lifecycle management
App->>App: beforeStart()
App->>App: ready()
App->>App: close()
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (2)
🔇 Additional comments (2)src/egg.ts (1)
Exporting the Router here makes it easily accessible to consumers without requiring them to import from "@eggjs/router" directly. This aligns with the convention of exporting all relevant classes from a single entry point. package.json (1)
The bump from "^2.20.1" to "^2.20.2" for "@eggjs/koa" seems minor, suggesting bug fixes or small improvements. Verify that no breaking changes impact integration with the newly exported Router. Use the following script to search for usage of Koa APIs and confirm compatibility with the updated version: ✅ Verification successfulLet me gather more information about the specific version changes. Version update from 2.20.1 to 2.20.2 is safe to proceed The update only includes a bug fix that makes the Context state property overridable by Sub Class, which doesn't affect Router integration. The change is backward compatible and improves type flexibility. No breaking changes were introduced that would impact the Router functionality. 🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Description: scanning the codebase for references to @eggjs/koa to confirm no new breakages
rg '@eggjs/koa' -A 10
Length of output: 3656 Script: #!/bin/bash
# Check the changelog or release notes for @eggjs/koa v2.20.2
gh release view v2.20.2 --repo eggjs/koa || true
# Check git history for any recent changes related to Router integration
rg -l "Router|router" --type ts
Length of output: 1185 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 (
|
commit: |
[skip ci] ## [6.2.3](v6.2.2...v6.2.3) (2024-12-19) ### Bug Fixes * export Router Class ([#277](#277)) ([acf5958](acf5958))
Summary by CodeRabbit
New Features
Router
class from@eggjs/router
.EggCore
class.Bug Fixes
@eggjs/koa
, potentially addressing minor issues.Documentation
EggCore
class to guide users on best practices.