-
Notifications
You must be signed in to change notification settings - Fork 373
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(rc): Fix Version update time parsing failure #1089
Conversation
7d41cf5
to
e540ddd
Compare
|
@@ -394,4 +390,8 @@ class VersionImpl implements Version { | |||
updateTime: this.updateTime, | |||
} | |||
} | |||
|
|||
private isValidTimestamp(timestamp: string): boolean { | |||
return validator.isNonEmptyString(timestamp) && (new Date(timestamp)).getTime() > 0; |
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.
This validation fails for timestamps before January 1, 1970
and considers strings such as "1.2"
as valid timestamps. I think that would be okay for this particular scenario. Open to suggestions!
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.
Looks good. I'd recommend adding another test case for getTemplate()
so that both old and new date formats get tested.
* fix(rc): Fix Version update time parsing failure * Add test cases for 3 and 6 ms places
Resolves: #1088