Skip to content
Closed
Changes from all commits
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
fs: Refactor the import of internalUtil
  • Loading branch information
rickyes committed May 8, 2020
commit 95d58e7e82005be2fe98478ca7e65785279f1237
6 changes: 3 additions & 3 deletions lib/internal/fs/streams.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const {
ERR_OUT_OF_RANGE,
ERR_STREAM_DESTROYED
} = require('internal/errors').codes;
const internalUtil = require('internal/util');
const { deprecate } = require('internal/util');
const { validateNumber } = require('internal/validators');
const fs = require('fs');
const { Buffer } = require('buffer');
Expand Down Expand Up @@ -142,7 +142,7 @@ function ReadStream(path, options) {
ObjectSetPrototypeOf(ReadStream.prototype, Readable.prototype);
ObjectSetPrototypeOf(ReadStream, Readable);

const openReadFs = internalUtil.deprecate(function() {
const openReadFs = deprecate(function() {
_openReadFs(this);
}, 'ReadStream.prototype.open() is deprecated', 'DEP0135');
ReadStream.prototype.open = openReadFs;
Expand Down Expand Up @@ -370,7 +370,7 @@ WriteStream.prototype._final = function(callback) {
callback();
};

const openWriteFs = internalUtil.deprecate(function() {
const openWriteFs = deprecate(function() {
_openWriteFs(this);
}, 'WriteStream.prototype.open() is deprecated', 'DEP0135');
WriteStream.prototype.open = openWriteFs;
Expand Down