Revert to prototypal-based syntax for backwards compatibility #23
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Following the discussion on winstonjs/winston-daily-rotate-file#154 and #22 this is a proposal to revert
Transport
andLegacyTransport
to the backwards compatible prototypal syntax.There are a few reasons this makes sense:
winston-transport
is a dependency ofwinston
it is likely (although not guaranteed) that other Transport authors will fail to include it in their owndependencies
.winston@2
transports out there that useTransport.call(this, opts)
. Even as those transports upgrade over the next while there will still be a lot of "example" code out there for folks to stub their toes on. Moving to this syntax avoids those potential gotchas.winston@2
andwinston@3
while the community migrates their code? By keeping the inheritance patterns the same we make this easier for them.@ChrisAlderson @DABH @jcrugzz @mattberther thoughts?