Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: add missing deprecation code #29969

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions doc/api/deprecations.md
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions lib/internal/fs/streams.js
Expand Up @@ -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) {
Expand Down Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-fs-read-stream-patch-open.js
Expand Up @@ -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', () => {});
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-fs-write-stream-patch-open.js
Expand Up @@ -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();

Expand Down