Skip to content

Commit 907c07f

Browse files
committed
stream: move _writableState.buffer to EOL
API was deprecated back in the 0.11 days. PR-URL: #31165 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Robert Nagy <[email protected]>
1 parent 7e911d8 commit 907c07f

File tree

2 files changed

+6
-11
lines changed

2 files changed

+6
-11
lines changed

doc/api/deprecations.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,9 @@ The `_linklist` module is deprecated. Please use a userland alternative.
8282
### DEP0003: `_writableState.buffer`
8383
<!-- YAML
8484
changes:
85+
- version: REPLACEME
86+
pr-url: https://github.com/nodejs/node/pull/31165
87+
description: End-of-Life
8588
- version:
8689
- v4.8.6
8790
- v6.12.0
@@ -92,10 +95,10 @@ changes:
9295
description: Runtime deprecation.
9396
-->
9497

95-
Type: Runtime
98+
Type: End-of-Life
9699

97-
The `_writableState.buffer` property is deprecated. Use the
98-
`_writableState.getBuffer()` method instead.
100+
The `_writableState.buffer` has been removed. Use `_writableState.getBuffer()`
101+
instead.
99102

100103
<a id="DEP0004"></a>
101104
### DEP0004: `CryptoStream.prototype.readyState`

lib/_stream_writable.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ const {
3737
module.exports = Writable;
3838
Writable.WritableState = WritableState;
3939

40-
const internalUtil = require('internal/util');
4140
const EE = require('events');
4241
const Stream = require('stream');
4342
const { Buffer } = require('buffer');
@@ -195,13 +194,6 @@ WritableState.prototype.getBuffer = function getBuffer() {
195194
return out;
196195
};
197196

198-
ObjectDefineProperty(WritableState.prototype, 'buffer', {
199-
get: internalUtil.deprecate(function writableStateBufferGetter() {
200-
return this.getBuffer();
201-
}, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' +
202-
'instead.', 'DEP0003')
203-
});
204-
205197
// Test _writableState for inheritance to account for Duplex streams,
206198
// whose prototype chain only points to Readable.
207199
var realHasInstance;

0 commit comments

Comments
 (0)