-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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: use @eggjs/multipart and @eggjs/view #5391
Conversation
Caution Review failedThe pull request is closed. WalkthroughThe changes remove and update references to the multipart package across the project. The old dependency and import for Changes
Possibly related issues
Possibly related PRs
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
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 (
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## next #5391 +/- ##
==========================================
- Coverage 94.95% 94.89% -0.06%
==========================================
Files 40 40
Lines 3746 3762 +16
Branches 355 352 -3
==========================================
+ Hits 3557 3570 +13
- Misses 189 192 +3 ☔ View full report in Codecov by Sentry. |
3addb1c
to
8738955
Compare
New dependencies detected. Learn more about Socket for GitHub ↗︎
|
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)
test/lib/core/view.test.ts (1)
21-26
: LGTM! Consider adding a clarifying comment.The async implementation aligns with the transition to @eggjs/view.
Consider adding a comment to clarify that this is a mock implementation:
class View { + // Mock implementation for view engine registration test async render() { return ''; } async renderString() { return ''; } }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (18)
index-old.d.ts
(0 hunks)package.json
(1 hunks)site/docs/advanced/view-plugin.zh-CN.md
(1 hunks)site/docs/basics/controller.md
(2 hunks)site/docs/basics/controller.zh-CN.md
(2 hunks)site/docs/basics/plugin.md
(1 hunks)site/docs/basics/plugin.zh-CN.md
(1 hunks)site/docs/core/view.md
(1 hunks)site/docs/intro/migration.md
(1 hunks)site/docs/intro/migration.zh-CN.md
(1 hunks)site/docs/tutorials/index.md
(1 hunks)site/docs/tutorials/index.zh-CN.md
(1 hunks)site/docs/tutorials/typescript.zh-CN.md
(1 hunks)src/app/extend/request.ts
(1 hunks)src/config/plugin.ts
(2 hunks)src/lib/types.ts
(2 hunks)test/index.test-d.ts
(1 hunks)test/lib/core/view.test.ts
(1 hunks)
💤 Files with no reviewable changes (1)
- index-old.d.ts
✅ Files skipped from review due to trivial changes (4)
- site/docs/core/view.md
- site/docs/tutorials/typescript.zh-CN.md
- site/docs/tutorials/index.md
- site/docs/advanced/view-plugin.zh-CN.md
🚧 Files skipped from review as they are similar to previous changes (8)
- src/app/extend/request.ts
- src/config/plugin.ts
- site/docs/basics/plugin.zh-CN.md
- site/docs/basics/plugin.md
- package.json
- site/docs/intro/migration.zh-CN.md
- site/docs/intro/migration.md
- test/index.test-d.ts
🧰 Additional context used
🪛 LanguageTool
site/docs/basics/controller.md
[uncategorized] ~318-~318: The preposition ‘of’ seems more likely in this position.
Context: ...quiring the Submitted Files The body
in the request can carry parameters as wel...
(AI_HYDRA_LEO_REPLACE_IN_OF)
⏰ Context from checks skipped due to timeout of 90000ms (20)
- GitHub Check: Node.js / Test (windows-latest, 22)
- GitHub Check: Node.js / Test (windows-latest, 20)
- GitHub Check: Node.js / Test (windows-latest, 18)
- GitHub Check: Node.js / Test (windows-latest, 20)
- GitHub Check: Node.js / Test (ubuntu-latest, 22)
- GitHub Check: Node.js / Test (windows-latest, 20)
- GitHub Check: Node.js / Test (windows-latest, 18)
- GitHub Check: Node.js / Test (ubuntu-latest, 20)
- GitHub Check: Node.js / Test (windows-latest, 18)
- GitHub Check: Node.js / Test (ubuntu-latest, 20)
- GitHub Check: Node.js / Test (ubuntu-latest, 18)
- GitHub Check: Node.js / Test (ubuntu-latest, 20)
- GitHub Check: Node.js / Test (macos-latest, 22)
- GitHub Check: Node.js / Test (ubuntu-latest, 18)
- GitHub Check: Node.js / Test (macos-latest, 20)
- GitHub Check: Node.js / Test (ubuntu-latest, 18)
- GitHub Check: Node.js / Test (macos-latest, 18)
- GitHub Check: Node.js / Test (ubuntu-latest, 22)
- GitHub Check: Node.js / Test (windows-latest, 22)
- GitHub Check: Node.js / Test (windows-latest, 20)
🔇 Additional comments (6)
site/docs/tutorials/index.zh-CN.md (1)
56-56
: Updated egg-view Link URLThe updated link now correctly points to [egg-view]: https://github.com/eggjs/view, which aligns with the new dependency and documentation updates. Please verify that all other documentation references have been updated consistently.
src/lib/types.ts (2)
30-31
: LGTM! New plugin imports added.The imports for @eggjs/multipart and @eggjs/view are correctly placed with other plugin imports and follow the established naming convention.
86-98
: Well-documented type definition!The PowerPartial type is well-implemented with:
- Clear JSDoc documentation and example
- Recursive type definition for deep partial types
- Useful for configuration objects like EggAppConfig
site/docs/basics/controller.zh-CN.md (2)
317-318
: LGTM! Updated multipart plugin reference.The reference has been correctly updated from egg-multipart to @eggjs/multipart, maintaining consistency with the package rename.
319-583
: Excellent documentation for file uploads!The documentation is comprehensive and well-structured:
- Clear examples for both File and Stream modes
- Proper handling of temporary files
- Security considerations and configuration options
- Best practices for file handling
site/docs/basics/controller.md (1)
318-592
: LGTM! Documentation updates are consistent.The English documentation:
- Correctly references @eggjs/multipart
- Maintains consistency with Chinese documentation
- Provides clear and accurate translations
🧰 Tools
🪛 LanguageTool
[uncategorized] ~318-~318: The preposition ‘of’ seems more likely in this position.
Context: ...quiring the Submitted Files Thebody
in the request can carry parameters as wel...(AI_HYDRA_LEO_REPLACE_IN_OF)
[uncategorized] ~321-~321: The official spelling of this programming framework is “Node.js”.
Context: ...ileMode: If you have no ideas about Nodejs's Stream at all, the
File` mode suits ...(NODE_JS)
[uncategorized] ~336-~336: Possible missing comma found.
Context: ...static front-end codes should look like this below: ```html <form method="POST" ...(AI_HYDRA_LEO_MISSING_COMMA)
[uncategorized] ~433-~433: The official spelling of this programming framework is “Node.js”.
Context: ... you are very familiar withStream
in Nodejs, you can choose this way. In a controll...(NODE_JS)
[style] ~479-~479: The contraction ‘there’re’ is uncommon in written English.
Context: ... To acquire the uploaded files easily, there're two conditions at least: - Only ONE fi...(THERE_RE_CONTRACTION_UNCOMMON)
[grammar] ~479-~479: Possible agreement error. Did you mean “leasts”, “littles”?
Context: ...iles easily, there're two conditions at least: - Only ONE file per time. - The field...(THERE_RE_MANY)
[typographical] ~482-~482: The word “otherwise” is an adverb that can’t be used like a conjunction, and therefore needs to be separated from the sentence.
Context: ...ile MUST be after the other fields in a form, otherwise you cannot get other fields after getti...(THUS_SENTENCE)
[uncategorized] ~570-~570: The hyphen in Newly-added is redundant.
Context: ....js`, or rewrite a whole white list: - Newly-added a file extension: ```js module.exports...(ADVERB_LY_HYPHEN_FIX)
[skip ci] ## [4.0.7](v4.0.6...v4.0.7) (2025-02-04) ### Bug Fixes * use @eggjs/multipart and @eggjs/view ([#5391](#5391)) ([c464cda](c464cda))
Summary by CodeRabbit
Chores
Documentation
egg-view-ejs
plugin.