Skip to content

Commit fc83cd8

Browse files
committed
zlib: set zlib.bytesRead end-of-life
1 parent 291d90a commit fc83cd8

File tree

2 files changed

+4
-22
lines changed

2 files changed

+4
-22
lines changed

doc/api/deprecations.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2284,6 +2284,9 @@ core and obsoleted by the removal of NPN (Next Protocol Negotiation) support.
22842284

22852285
<!-- YAML
22862286
changes:
2287+
- version: REPLACEME
2288+
pr-url: https://github.com/nodejs/node/pull/XXXXX
2289+
description: End-of-Life.
22872290
- version: v11.0.0
22882291
pr-url: https://github.com/nodejs/node/pull/23308
22892292
description: Runtime deprecation.
@@ -2292,7 +2295,7 @@ changes:
22922295
description: Documentation-only deprecation.
22932296
-->
22942297

2295-
Type: Runtime
2298+
Type: End-of-Life
22962299

22972300
Deprecated alias for [`zlib.bytesWritten`][]. This original name was chosen
22982301
because it also made sense to interpret the value as the number of bytes

lib/zlib.js

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,6 @@ const {
4747
genericNodeError,
4848
} = require('internal/errors');
4949
const { Transform, finished } = require('stream');
50-
const {
51-
deprecate,
52-
} = require('internal/util');
5350
const {
5451
isArrayBufferView,
5552
isAnyArrayBuffer,
@@ -272,24 +269,6 @@ ObjectDefineProperty(ZlibBase.prototype, '_closed', {
272269
},
273270
});
274271

275-
// `bytesRead` made sense as a name when looking from the zlib engine's
276-
// perspective, but it is inconsistent with all other streams exposed by Node.js
277-
// that have this concept, where it stands for the number of bytes read
278-
// *from* the stream (that is, net.Socket/tls.Socket & file system streams).
279-
ObjectDefineProperty(ZlibBase.prototype, 'bytesRead', {
280-
__proto__: null,
281-
configurable: true,
282-
enumerable: true,
283-
get: deprecate(function() {
284-
return this.bytesWritten;
285-
}, 'zlib.bytesRead is deprecated and will change its meaning in the ' +
286-
'future. Use zlib.bytesWritten instead.', 'DEP0108'),
287-
set: deprecate(function(value) {
288-
this.bytesWritten = value;
289-
}, 'Setting zlib.bytesRead is deprecated. ' +
290-
'This feature will be removed in the future.', 'DEP0108'),
291-
});
292-
293272
/**
294273
* @this ZlibBase
295274
* @returns {void}

0 commit comments

Comments
 (0)