mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
doc: add missing deprecation code
Refs: https://github.com/nodejs/node/pull/29061 PR-URL: https://github.com/nodejs/node/pull/29969 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
This commit is contained in:
@@ -2532,8 +2532,8 @@ Type: Documentation-only (supports [`--pending-deprecation`][])
|
||||
The `process._tickCallback` property was never documented as
|
||||
an officially supported API.
|
||||
|
||||
<a id="DEP0XXX"></a>
|
||||
### DEP0XXX: `WriteStream.open()` and `ReadStream.open()` are internal
|
||||
<a id="DEP0135"></a>
|
||||
### DEP0135: `WriteStream.open()` and `ReadStream.open()` are internal
|
||||
<!-- YAML
|
||||
changes:
|
||||
- version: REPLACEME
|
||||
|
||||
@@ -114,7 +114,7 @@ Object.setPrototypeOf(ReadStream, Readable);
|
||||
|
||||
const openReadFs = internalUtil.deprecate(function() {
|
||||
_openReadFs(this);
|
||||
}, 'ReadStream.prototype.open() is deprecated', 'DEP0XXX');
|
||||
}, 'ReadStream.prototype.open() is deprecated', 'DEP0135');
|
||||
ReadStream.prototype.open = openReadFs;
|
||||
|
||||
function _openReadFs(stream) {
|
||||
@@ -299,7 +299,7 @@ WriteStream.prototype._final = function(callback) {
|
||||
|
||||
const openWriteFs = internalUtil.deprecate(function() {
|
||||
_openWriteFs(this);
|
||||
}, 'WriteStream.prototype.open() is deprecated', 'DEP0XXX');
|
||||
}, 'WriteStream.prototype.open() is deprecated', 'DEP0135');
|
||||
WriteStream.prototype.open = openWriteFs;
|
||||
|
||||
function _openWriteFs(stream) {
|
||||
|
||||
@@ -4,7 +4,7 @@ const fs = require('fs');
|
||||
|
||||
common.expectWarning(
|
||||
'DeprecationWarning',
|
||||
'ReadStream.prototype.open() is deprecated', 'DEP0XXX');
|
||||
'ReadStream.prototype.open() is deprecated', 'DEP0135');
|
||||
const s = fs.createReadStream('asd')
|
||||
// We don't care about errors in this test.
|
||||
.on('error', () => {});
|
||||
|
||||
@@ -25,7 +25,7 @@ if (process.argv[2] !== 'child') {
|
||||
|
||||
common.expectWarning(
|
||||
'DeprecationWarning',
|
||||
'WriteStream.prototype.open() is deprecated', 'DEP0XXX');
|
||||
'WriteStream.prototype.open() is deprecated', 'DEP0135');
|
||||
const s = fs.createWriteStream(`${tmpdir.path}/out`);
|
||||
s.open();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user