-
-
Notifications
You must be signed in to change notification settings - Fork 234
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
add missing constants #312
Conversation
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.
LGTM, but I want a reference for that 2**28 - 1
value.
Reading https://nodejs.org/docs/latest/api/buffer.html#bufferconstantsmax_length , the value seems to be about 2**30-1
on 32-bit architectures.
I think any buffer
actually near these magnitudes will probably fail no matter, but, if we have a value, it should have a reference.
@dcousens - good point on the reference. I can't find where I got the initial value from, however, its now set to what it is in the current version of node. Please note this is for the max string length and not the max buffer length (https://nodejs.org/docs/latest/api/buffer.html#bufferconstantsmax_string_length). Max buffer length was already defined and just exported to match api spec. |
Thanks for the fast follow up @urg, LGTM! 💙 |
The tests are passing, the CI has other issues (see #332, I'll be resolving this before the next release). |
Looks that the typing file hasn't been upgraded to include the newly added constants. |
@jeremymeng I have this on my TODO, but I don't have an ETA for you |
add missing kStringMaxLength, constants.MAX_LENGTH & constants.MAX_STRING_LENGTH
fixes #311