Skip to content

Commit e4a8256

Browse files
committed
doc: add missing deprecation code
Refs: nodejs#29061
1 parent 7991b57 commit e4a8256

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

doc/api/deprecations.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -2532,8 +2532,8 @@ Type: Documentation-only (supports [`--pending-deprecation`][])
25322532
The `process._tickCallback` property was never documented as
25332533
an officially supported API.
25342534
2535-
<a id="DEP0XXX"></a>
2536-
### DEP0XXX: `WriteStream.open()` and `ReadStream.open()` are internal
2535+
<a id="DEP0135"></a>
2536+
### DEP0135: `WriteStream.open()` and `ReadStream.open()` are internal
25372537
<!-- YAML
25382538
changes:
25392539
- version: REPLACEME

lib/internal/fs/streams.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ Object.setPrototypeOf(ReadStream, Readable);
114114

115115
const openReadFs = internalUtil.deprecate(function() {
116116
_openReadFs(this);
117-
}, 'ReadStream.prototype.open() is deprecated', 'DEP0XXX');
117+
}, 'ReadStream.prototype.open() is deprecated', 'DEP0135');
118118
ReadStream.prototype.open = openReadFs;
119119

120120
function _openReadFs(stream) {
@@ -299,7 +299,7 @@ WriteStream.prototype._final = function(callback) {
299299

300300
const openWriteFs = internalUtil.deprecate(function() {
301301
_openWriteFs(this);
302-
}, 'WriteStream.prototype.open() is deprecated', 'DEP0XXX');
302+
}, 'WriteStream.prototype.open() is deprecated', 'DEP0135');
303303
WriteStream.prototype.open = openWriteFs;
304304

305305
function _openWriteFs(stream) {

test/parallel/test-fs-read-stream-patch-open.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const fs = require('fs');
44

55
common.expectWarning(
66
'DeprecationWarning',
7-
'ReadStream.prototype.open() is deprecated', 'DEP0XXX');
7+
'ReadStream.prototype.open() is deprecated', 'DEP0135');
88
const s = fs.createReadStream('asd')
99
// We don't care about errors in this test.
1010
.on('error', () => {});

test/parallel/test-fs-write-stream-patch-open.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ if (process.argv[2] !== 'child') {
2525

2626
common.expectWarning(
2727
'DeprecationWarning',
28-
'WriteStream.prototype.open() is deprecated', 'DEP0XXX');
28+
'WriteStream.prototype.open() is deprecated', 'DEP0135');
2929
const s = fs.createWriteStream(`${tmpdir.path}/out`);
3030
s.open();
3131

0 commit comments

Comments
 (0)