-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
buffer: do not always use defaults #20054
Conversation
The Buffer#(read|write)U?Int(B|L)E functions should not use a default value. This is very likely a bug and it was never documented that way. Besides that this also improves the tests by adding more tests and by refactoring them to less code lines.
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
LGTM I suppose, seems a bit late to be squeezing something like this into 10 though |
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
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.
Nit though: part of test style changes look unrelated, and I am not sure if those should be done in a semver-major commit. /cc @MylesBorins
@ChALkeR I can split the tests into a different PR if you want. But since it is work: are you fine with landing it as is? |
The Buffer#(read|write)U?Int(B|L)E functions should not use a default value. This is very likely a bug and it was never documented that way. Besides that this also improves the tests by adding more tests and by refactoring them to less code lines. PR-URL: nodejs#20054 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Khaidi Chu <i@2333.moe> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
No one complaint in the last 11 days, so I went ahead and landed it as is. Landed in 60b5b38 |
Backport of a changed test from nodejs#20054
The Buffer#(read|write)U?Int(B|L)E functions should not use a default
value. This is very likely a bug and it was never documented that
way.
I checked this against gzemnid and it did not show a single module using
this pattern. I personally say it is a bug if the user calls these functions
without arguments, because it is not clear what happens.
Besides that this also improves the tests by adding more tests and by
refactoring them to less code lines.
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes