Conversation
WalkthroughAdded an external dependency declaration in the tsdown config for the mock package, specifying Mocha as an external module via external: ['mocha']. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used📓 Path-based instructions (3)packages/*/tsdown.config.ts📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
{packages,plugins,tools}/**/tsdown.config.ts📄 CodeRabbit inference engine (CLAUDE.md)
Files:
**/*.ts📄 CodeRabbit inference engine (AGENTS.md)
Files:
🧠 Learnings (8)📓 Common learnings📚 Learning: 2025-09-15T01:56:16.297ZApplied to files:
📚 Learning: 2025-09-14T08:41:30.618ZApplied to files:
📚 Learning: 2025-09-15T01:56:16.297ZApplied to files:
📚 Learning: 2025-09-15T01:56:16.297ZApplied to files:
📚 Learning: 2025-09-15T01:56:16.297ZApplied to files:
📚 Learning: 2025-09-15T01:56:16.297ZApplied to files:
📚 Learning: 2025-09-15T01:56:16.297ZApplied to files:
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (12)
🔇 Additional comments (1)
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 |
Summary of ChangesHello @fengmk2, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces a configuration change to the Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request correctly configures mocha as an external dependency in the tsdown build configuration. This is the right approach, as mocha is a testing framework and should not be bundled with the library. The change is a good fix.
As a related improvement, I suggest adding mocha to the peerDependencies in package.json. The @eggjs/mock package provides Mocha-specific integrations (e.g., in src/register.ts and src/inject_mocha.ts), implying that a consuming project is expected to have mocha installed. Declaring it as a peer dependency makes this requirement explicit and helps prevent potential issues for users of this package.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## next #5535 +/- ##
=======================================
Coverage 75.87% 75.87%
=======================================
Files 114 114
Lines 5770 5770
Branches 1152 1151 -1
=======================================
Hits 4378 4378
Misses 1212 1212
Partials 180 180 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|

https://github.com/eggjs/egg/actions/runs/17981525063/job/51148558853
Summary by CodeRabbit