Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
[squash] remove deprecation for pipesCount
  • Loading branch information
starkwang committed Jul 12, 2019
commit 27ab4d9c0709c2f1d8cc6df243a4b0982b3953c1
14 changes: 0 additions & 14 deletions doc/api/deprecations.md
Original file line number Diff line number Diff line change
Expand Up @@ -2498,20 +2498,6 @@ Type: Runtime
Passing a callback to [`worker.terminate()`][] is deprecated. Use the returned
`Promise` instead, or a listener to the worker’s `'exit'` event.

<a id="DEP0133"></a>
### DEP0133: _readableState.pipesCount
<!-- YAML
changes:
- version: REPLACEME
pr-url: https://github.com/nodejs/node/pull/28583
description: Documentation-only.
-->

Type: Documentation-only

`_readableState.pipesCount` is deprecated. Please use
`_readableState.pipes.length` instead.

[`--http-parser=legacy`]: cli.html#cli_http_parser_library
[`--pending-deprecation`]: cli.html#cli_pending_deprecation
[`Buffer.allocUnsafeSlow(size)`]: buffer.html#buffer_class_method_buffer_allocunsafeslow_size
Expand Down
7 changes: 3 additions & 4 deletions lib/_stream_readable.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ const EE = require('events');
const Stream = require('stream');
const { Buffer } = require('buffer');

const internalUtil = require('internal/util');
const debug = require('internal/util/debuglog').debuglog('stream');
const BufferList = require('internal/streams/buffer_list');
const destroyImpl = require('internal/streams/destroy');
Expand Down Expand Up @@ -148,11 +147,11 @@ function ReadableState(options, stream, isDuplex) {
}
}

// Legacy getter for `pipesCount`
Object.defineProperty(ReadableState.prototype, 'pipesCount', {
get: internalUtil.deprecate(function() {
get() {
return this.pipes.length;
}, '_readableState.pipesCount is deprecated. ' +
'Use _readableState.pipes.length instead.', 'DEP0133'),
}
});

function Readable(options) {
Expand Down
12 changes: 0 additions & 12 deletions test/parallel/test-stream-pipescount-deprecation-warning.js

This file was deleted.