-
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: deprecate parent property #8332
Conversation
0ee50f4
to
81fdc17
Compare
Hmm I don’t want to hijack #7964 with a discussion of this specific issue, so I’m commenting here. |
I find it a bit annoying b/c it's undocumented, and untested. Honestly we might as well just set |
c133999
to
83c7a88
Compare
@nodejs/ctc How do we feel about just doc-deprecating this, based on #7964 (comment)?
|
I'm good with a docs-only deprecation |
Buffer objects expose the underlying `Uint8Array`'s `buffer` property by default. This patch formally documents it.
81fdc17
to
e693c92
Compare
e693c92
to
f993ee6
Compare
Updated the PR with docs-only deprecation. PTAL. |
### buf.parent | ||
|
||
> Stability: 0 - Deprecated: Use [`buf.buffer`] instead. | ||
|
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.
Might add here a quick comment saying something like:
The `buf.parent` property is a deprecated alias for `buf.buffer`.
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.
Ack!
`buffer.parent` property is actually a wrapper over `buffer.buffer` property. This patch actually doc-deprecates it and points the users to the `buffer.buffer` property.
f993ee6
to
a4a43ac
Compare
Buffer objects expose the underlying `Uint8Array`'s `buffer` property by default. This patch formally documents it. PR-URL: #8332 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trevor Norris <trev.norris@gmail.com>
`buffer.parent` property is actually an alias of `buffer.buffer` property. This patch actually doc-deprecates it and points the users to the `buffer.buffer` property. PR-URL: #8332 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Buffer objects expose the underlying `Uint8Array`'s `buffer` property by default. This patch formally documents it. PR-URL: nodejs#8332 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trevor Norris <trev.norris@gmail.com>
`buffer.parent` property is actually an alias of `buffer.buffer` property. This patch actually doc-deprecates it and points the users to the `buffer.buffer` property. PR-URL: nodejs#8332 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trevor Norris <trev.norris@gmail.com>
@Fishrock123 bot should not be tagging semver major commits for lts |
Checklist
make -j4 test
(UNIX), orvcbuild test nosign
(Windows) passesAffected core subsystem(s)
buffer
Description of change
The
buffer
property already exposes the underlying buffer object. Sothis property is being deprecated.
Refer: #8266
Refer: #8311
cc @nodejs/buffer