Git Product home page Git Product logo

Comments (12)

okkez avatar okkez commented on July 3, 2024

Do you use fluent-logger's winston support?
It is optional, so we don't set the dependency for winston.

Maybe, you need to add the dependency for [email protected] in your package.json.

from fluent-logger-node.

jessebond2 avatar jessebond2 commented on July 3, 2024

Nope! Never even heard of that package before. Downgrading to 2.7.0 removed this issue.

from fluent-logger-node.

okkez avatar okkez commented on July 3, 2024

Can you show me the reproducible code and package.json?

from fluent-logger-node.

fogine avatar fogine commented on July 3, 2024

Confirming that the version 2.8.0 is broken - aka. not backward compatible.
winstonjs/winston-syslog#95

winston-transport is not a dependency of Winston v2.x, only 3.0.

thus, when requiring winston-transport HERE, all code which runs with winston v2.x) is effectively broken if i'm not mistaken.

To fix this issue, I suggest reverting the 2.8 release by releasing 2.8.1. You can then release the code with winston 3.x support only as 3.0.0...

from fluent-logger-node.

okkez avatar okkez commented on July 3, 2024

Users must set dependencies to winston@2 or winston@3 in their own package.json because fluent-logger's winston support is optional.

from fluent-logger-node.

fogine avatar fogine commented on July 3, 2024

@okkez , that's not the issue.
Users have already installed winston@2 / winston@3 explicitly in their project. The problem is that fluent-logger prior version 2.8.0 worked with winston@2, however since version 2.8.0 of fluent-logger which explicitly requires winston-transport, it breaks the compatibility with winston@2
From winston-transport project page:

Base stream implementations for winston@3 and up.

So based on the above quote, fluent-logger should not require its users to install the winston-transport package along basic winston package

from fluent-logger-node.

fogine avatar fogine commented on July 3, 2024

This is an example of a public project which fails to build since the [email protected] release: https://travis-ci.org/BohemiaInteractive/bi-logger/builds/395486808
https://github.com/BohemiaInteractive/bi-logger/tree/develop

from fluent-logger-node.

fogine avatar fogine commented on July 3, 2024

@okkez , I do no really agree with the solution of stating in the readme that the release 2.8.0 is not backward compatible with the previous 2.7.0 release of fluent-logger...

Could we please revert the 2.8 release by releasing 2.8.1 which would still support winston@2 and then release the code with winston 3.x support only as v3.0.0...
Which would follow standard rules of semver (which npm uses) ?

from fluent-logger-node.

okkez avatar okkez commented on July 3, 2024

I've added note to README.md for this issue.
And I've release new major version 3.0.0.

from fluent-logger-node.

fogine avatar fogine commented on July 3, 2024

@okkez , Okay, to fix projects which have in their package.json for example:

"dependencies": {
    "fluent-logger": "^2.4.0"
}

could we npm unpublish [email protected] ?
Otherwise, npm will automatically update to [email protected] which is not backward compatible...

Also I'm proposing to update readme like this:

-**NOTE** If you use `winston@2`, you can use `[email protected]` or earlier. If you use `winston@3`, you can use `[email protected]` or later.
+**NOTE** If you use `winston@2`, you can use `[email protected]` or earlier. If you use `winston@3`, you can use `[email protected]` or later.

from fluent-logger-node.

okkez avatar okkez commented on July 3, 2024

@fogine If you want [email protected] you can create the PR to 2.8 branch.
Could you create the PR for [email protected]?
I will merge it and publish [email protected].

from fluent-logger-node.

okkez avatar okkez commented on July 3, 2024

Released v2.8.1

from fluent-logger-node.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.