Skip to content

Commit

Permalink
Fix Transform from readable-stream using create-react-app (#1521)
Browse files Browse the repository at this point in the history
* Fix Transform readable-stream

Create react app bug

* import stream from readable-stream
  • Loading branch information
jamesbechet authored and DABH committed Nov 5, 2018
1 parent 2c2bc15 commit c42ab7f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/winston/logger.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

'use strict';

const stream = require('readable-stream');
const { Stream, Transform } = require('readable-stream');
const asyncForEach = require('async/forEach');
const { LEVEL, SPLAT } = require('triple-beam');
const isStream = require('is-stream');
Expand All @@ -20,9 +20,9 @@ const config = require('./config');
/**
* TODO: add class description.
* @type {Logger}
* @extends {stream.Transform}
* @extends {Transform}
*/
class Logger extends stream.Transform {
class Logger extends Transform {
/**
* Constructor function for the Logger object responsible for persisting log
* messages and metadata to one or more transports.
Expand Down Expand Up @@ -398,7 +398,7 @@ class Logger extends stream.Transform {
* @returns {Stream} - TODO: add return description.
*/
stream(options = {}) {
const out = new stream.Stream();
const out = new Stream();
const streams = [];

out._streams = streams;
Expand Down

0 comments on commit c42ab7f

Please sign in to comment.