-
Notifications
You must be signed in to change notification settings - Fork 149
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
ADR 30 : New handshake for the bolt protocol #1243
Conversation
Timezones with minute offsets not divisible by 60 were causing issues for converting from the driver implementation of Date and Datetime to JS Date. A better implementation has been created and some documentation has been updated to reflect limitations that already existed.
This reverts commit 3104a29.
This reverts commit ff3dd5f.
|
||
let major | ||
let minor | ||
versions.sort((a, b) => Number(b.major + '.' + b.minor) - Number(a.major + '.' + a.minor)) |
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.
It may not be an issue, but have you checked this covers trailing zeros in the conversation?
So Number(major + '.' + minor)
converts versions into floats (5.7 becomes 5.7 but 4.10 might not behave as expected?)
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.
Good catch that I really should have realized myself! Thank you!
versions.sort((a, b) => Number(b.major + '.' + b.minor) - Number(a.major + '.' + a.minor)) | ||
for (let i = 0; i < versions.length; i++) { | ||
const version = versions[i] | ||
if (AVAILABLE_BOLT_PROTOCOLS.includes(Number(version.major + '.' + version.minor))) { |
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.
If no version matches, major and minor will be undefined, does this lead to any unexpected errors?
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.
Nice job 👍
Implements the handshake v2 protocol, allowing for more granular selection of bolt protocol versions.