-
Notifications
You must be signed in to change notification settings - Fork 84
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: support + wildcast #694
Conversation
WalkthroughThe recent updates enhance the Changes
Poem
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 as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #694 +/- ##
=======================================
Coverage 96.82% 96.82%
=======================================
Files 181 181
Lines 18014 18018 +4
Branches 2340 2340
=======================================
+ Hits 17442 17446 +4
Misses 572 572 ☔ View full report in Codecov by Sentry. |
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
Outside diff range and nitpick comments (3)
app/core/service/PackageVersionFileService.ts (2)
Line range hint
49-49
: Consider specifying a more explicit type thanany
.- #unpkgWhiteListAllowPackages: Record<string, { + #unpkgWhiteListAllowPackages: Record<string, { version: string; }>This change will enhance type safety by explicitly defining the expected structure of the objects within the record.
Line range hint
203-203
: Use template literals for better readability and consistency.- this.logger.warn('[package:version:syncPackageVersionFiles] check lock:%s fail', lockName); + this.logger.warn(`[package:version:syncPackageVersionFiles] check lock:${lockName} fail`);test/port/controller/PackageVersionFileController/listFiles.test.ts (1)
Line range hint
9-10
: Ensure proper typing for test setup variables.- let publisher; - let adminUser; + let publisher: User; + let adminUser: Admin;Specifying explicit types for these variables will improve type safety and code readability.
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (2)
- app/core/service/PackageVersionFileService.ts (1 hunks)
- test/port/controller/PackageVersionFileController/listFiles.test.ts (2 hunks)
Additional Context Used
Biome (16)
app/core/service/PackageVersionFileService.ts (14)
49-49: This type annotation is trivially inferred from its initialization.
97-97: Unexpected any. Specify a different type.
98-98: Unexpected any. Specify a different type.
203-203: Template literals are preferred over string concatenation.
306-309: This else clause can be omitted because previous branches break early.
306-309: This expression always returns false, because the string is converted and will never match
17-20: All these imports are only used as types.
20-21: All these imports are only used as types.
21-22: All these imports are only used as types.
22-23: All these imports are only used as types.
24-25: All these imports are only used as types.
25-26: All these imports are only used as types.
26-27: All these imports are only used as types.
27-28: All these imports are only used as types.
test/port/controller/PackageVersionFileController/listFiles.test.ts (2)
9-9: This variable implicitly has the any type.
10-10: This variable implicitly has the any type.
Additional comments not posted (1)
app/core/service/PackageVersionFileService.ts (1)
119-123
: Ensure proper handling of prerelease versions in version checks.The use of
semver.satisfies
with theincludePrerelease
option correctly implements the desired functionality to include prerelease versions in compatibility checks. This aligns with the PR's objective to support+
wildcard in version matching.
semver
semver
进行版本匹配判断Summary by CodeRabbit
New Features
Tests
baz
with version*
.