guides: fix nits in buffer-constructor-deprecation#1679
guides: fix nits in buffer-constructor-deprecation#1679fhemberger merged 2 commits intonodejs:masterfrom vsemozhetbyt:doc-guide-buffer-constructor-deprecation
Conversation
There was a problem hiding this comment.
It seems we have not --pending-deprecation in NODE_OPTIONS.
There was a problem hiding this comment.
There was a problem hiding this comment.
Yes, we have it as a separate cli key, but not as a NODE_OPTIONS env variable part option.
There was a problem hiding this comment.
I'm not sure I follow, --pending-deprecation is a CLI option right? If so it should work when used via NODE_OPTIONS which allows to specify CLI options in the environment via a space-separated list.
There was a problem hiding this comment.
It seems we have a whitelist of cli keys that are allowed in NODE_OPTIONS:
Node options that are allowed are: ...
There was a problem hiding this comment.
I think it is simply not listed there.
There was a problem hiding this comment.
Node.js 10 doc has not it as well:
https://nodejs.org/dist/latest-v10.x/docs/api/cli.html#cli_node_options_options
If it does work, maybe the API docs need updating.
There was a problem hiding this comment.
Yes it seems outdated, see https://github.com/nodejs/node/blob/master/src/node.cc#L3156-L3198
There was a problem hiding this comment.
Thank you. I will revert this change.
There was a problem hiding this comment.
PR to update the API doc: nodejs/node#21229
There was a problem hiding this comment.
console tag seems to produce weird rendering:
|
I am a bit confused by this fragment in the example code. Are the condition check and error message in some contradiction? |
|
cc @nodejs/documentation @nodejs/buffer |
Yes, I think so the message should be 'The "size" argument must not be of type number.' |
@fhinkel Is this an appropriate fix? |
|
@vsemozhetbyt Thanks! |

This PR unify some formatting differences across the doc and fix some other nits.