fix: revalidate sort bug#647
Open
UestcCarpediem wants to merge 1 commit intocnpm:masterfrom
Open
Conversation
Member
|
得加个单测确保一下 |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #647 +/- ##
=======================================
Coverage 96.82% 96.82%
=======================================
Files 180 180
Lines 17626 17630 +4
Branches 2293 2297 +4
=======================================
+ Hits 17067 17071 +4
Misses 559 559 ☔ View full report in Codecov by Sentry. |
f10a271 to
c16139b
Compare
Author
又调整了一下,排序放在循环体内,复杂度为n平方,有超时风险。 |
c16139b to
4a867cf
Compare
elrrrrrrr
reviewed
Mar 8, 2024
| } | ||
| const latestItem = sortBy(fetchItems, item => { | ||
| return new Date(item.date); | ||
| }).pop(); |
Member
There was a problem hiding this comment.
如果 dir.endsWith(latestVersionParent) 不满足的时候时候不需要设置 🤔
Member
|
@UestcCarpediem 用例修复下? 🙏🏻 |
Author
好的 |
4a867cf to
2470621
Compare
Author
|
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

#646 修复在同步过程中,revalidate 时 lodash sortby 无法正常将 18-Dec-2019 16:41 格式的date排序导致 diff 添加了非预期的 dir