Skip to content
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

stream: move _writableState.buffer to EOL #31165

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions doc/api/deprecations.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ The `_linklist` module is deprecated. Please use a userland alternative.
### DEP0003: `_writableState.buffer`
<!-- YAML
changes:
- version: REPLACEME
pr-url: https://github.com/nodejs/node/pull/31165
description: End-of-Life
- version:
- v4.8.6
- v6.12.0
Expand All @@ -92,10 +95,10 @@ changes:
description: Runtime deprecation.
-->

Type: Runtime
Type: End-of-Life

The `_writableState.buffer` property is deprecated. Use the
`_writableState.getBuffer()` method instead.
The `_writableState.buffer` has been removed. Use `_writableState.getBuffer()`
instead.

<a id="DEP0004"></a>
### DEP0004: `CryptoStream.prototype.readyState`
Expand Down
8 changes: 0 additions & 8 deletions lib/_stream_writable.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ const {
module.exports = Writable;
Writable.WritableState = WritableState;

const internalUtil = require('internal/util');
const EE = require('events');
const Stream = require('stream');
const { Buffer } = require('buffer');
Expand Down Expand Up @@ -195,13 +194,6 @@ WritableState.prototype.getBuffer = function getBuffer() {
return out;
};

ObjectDefineProperty(WritableState.prototype, 'buffer', {
get: internalUtil.deprecate(function writableStateBufferGetter() {
return this.getBuffer();
}, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' +
'instead.', 'DEP0003')
});

// Test _writableState for inheritance to account for Duplex streams,
// whose prototype chain only points to Readable.
var realHasInstance;
Expand Down