-
Notifications
You must be signed in to change notification settings - Fork 91
fix: revalidate sort bug #647
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
base: master
Are you sure you want to change the base?
Conversation
得加个单测确保一下 |
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
< 8000 p dir="auto">得加个单测确保一下 又调整了一下,排序放在循环体内,复杂度为n平方,有超时风险。 |
c16139b
to
4a867cf
Compare
@@ -250,6 +250,9 @@ export class BinarySyncerService extends AbstractService { | |||
for (const item of existsItems) { | |||
existsMap.set(item.name, item); | |||
} | |||
const latestItem = sortBy(fetchItems, item => { | |||
return new Date(item.date); | |||
}).pop(); |
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.
如果 dir.endsWith(latestVersionParent) 不满足的时候时候不需要设置 🤔
@UestcCarpediem 用例修复下? 🙏🏻 |
好的 |
4a867cf
to
2470621
Compare
|
#646 修复在同步过程中,revalidate 时 lodash sortby 无法正 8000 将 18-Dec-2019 16:41 格式的date排序导致 diff 添加了非预期的 dir