Skip to content

Commit

Permalink
stream: move _writableState.buffer to EOL
Browse files Browse the repository at this point in the history
API was deprecated back in the 0.11 days.

PR-URL: #31165
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
  • Loading branch information
jasnell committed Feb 6, 2020
1 parent 7e911d8 commit 907c07f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
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

0 comments on commit 907c07f

Please sign in to comment.