buffer: convert buffer.transcode to use internal/errors#16352
buffer: convert buffer.transcode to use internal/errors#16352starkwang wants to merge 1 commit intonodejs:masterfrom
buffer.transcode to use internal/errors#16352Conversation
lib/buffer.js
Outdated
There was a problem hiding this comment.
please capitalize Buffer and Uint8Array.
There was a problem hiding this comment.
Most of the ERR_INVALID_ARG_TYPE errors in lib are using lower case.
For example:
https://github.com/nodejs/node/blob/master/lib/buffer.js#L198
https://github.com/nodejs/node/blob/master/lib/buffer.js#L225
https://github.com/nodejs/node/blob/master/lib/util.js#L965
Here is just for unitarity. It may need another PR to capitalize them.
There was a problem hiding this comment.
I think we should follow the convention of the docs here (lower case for primitives and capitals for others..)
There was a problem hiding this comment.
Those existing uses really ought to have been capitalized, we just missed them on the review, unfortunately.
jasnell
left a comment
There was a problem hiding this comment.
LGTM with the buffer and uint8array changed to Buffer and Uint8Array
`buffer.transcode` is still using raw TypeError. This change is to convert it to use internal/errors. Ref: nodejs#11273
da00b76 to
0117db7
Compare
|
Pushed commit to address comment. |
`buffer.transcode` is still using raw TypeError. This change is to convert it to use internal/errors. Ref: #11273 PR-URL: #16352 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
|
Landed in e79a61c , thanks for the contribution! |
|
I added the |
`buffer.transcode` is still using raw TypeError. This change is to convert it to use internal/errors. Ref: nodejs/node#11273 PR-URL: nodejs/node#16352 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
`buffer.transcode` is still using raw TypeError. This change is to convert it to use internal/errors. Ref: nodejs/node#11273 PR-URL: nodejs/node#16352 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
buffer.transcodeis still using raw TypeError. This change is to convert it to useinternal/errors.Ref: #11273
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passesAffected core subsystem(s)
buffer