-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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(node/buffer): utf8ToBytes should return a Uint8Array #20769
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.
Is there a test that could be added or enabled in cli/tests/node_compat/config.jsonc
?
I tried enabling all and ended up to find that there wasn't anything more to enable, at least not anything related to this issue. |
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's a few more tests enabled so that's great 👍 thanks for fixing this Aapo!
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 2
utf8ToBytes
was in a different file from the otherToBytes
functions, which lead to it being missed in my earlier performance refactoring of Buffer internal APIs. It was the only one (yes, I made sure :) ) like this so I decided to move it into the same helper file as the other functions.