-
Notifications
You must be signed in to change notification settings - Fork 89
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: only get packageId from database #768
Conversation
WalkthroughThe pull request modifies the Changes
Sequence Diagram(s)sequenceDiagram
participant Client as Client
participant Service as PackageVersionService
participant Repo as packageRepository
Client->>Service: findBlockInfo()
Service->>Repo: findPackageId()
alt packageId found
Repo-->>Service: packageId
Service->>Repo: findPackageBlock(packageId)
Repo-->>Service: block info
Service-->>Client: block info
else packageId not found
Repo-->>Service: null
Service-->>Client: null
end
Poem
Warning There were issues while running some tools. Please review the errors and either fix the tool’s configuration or disable the tool if it’s a critical failure. 🔧 ESLint
app/core/service/PackageVersionService.tsOops! Something went wrong! :( ESLint: 8.57.1 ESLint couldn't find the plugin "eslint-plugin-eggache". (The package "eslint-plugin-eggache" was not found when loaded as a Node module from the directory "".) It's likely that the plugin isn't installed correctly. Try reinstalling by running the following:
The plugin "eslint-plugin-eggache" was referenced from the config file in ".eslintrc » eslint-config-egg/typescript » ./index.js". If you still can't figure out the problem, please stop by https://eslint.org/chat/help to chat with the team. 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
⏰ Context from checks skipped due to timeout of 90000ms (10)
🔇 Additional comments (1)
✨ Finishing Touches
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. 🪧 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.
PR Overview
This PR refactors the logic in PackageVersionService to fetch only the packageId from the database instead of the full package object.
- Replaced the call to findPackage, which returned a package object, with findPackageId to retrieve only the packageId.
- Updated the subsequent call to findPackageBlock to use the packageId directly.
Reviewed Changes
File | Description |
---|---|
app/core/service/PackageVersionService.ts | Updated to query and use the packageId directly, streamlining the block info retrieval logic |
Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #768 +/- ##
=======================================
Coverage 96.43% 96.43%
=======================================
Files 192 192
Lines 19313 19313
Branches 2526 2526
=======================================
Hits 18625 18625
Misses 688 688 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
[skip ci] ## [3.75.1](v3.75.0...v3.75.1) (2025-03-09) ### Bug Fixes * only get packageId from database ([#768](#768)) ([bc068d1](bc068d1))
Summary by CodeRabbit