Giter Site home page Giter Site logo

Comments (6)

nkbt avatar nkbt commented on May 31, 2024

Peer deps are not deprecated and libraries are encouraged to use them to give devs more freedom. So devs can potentially use incompatible versions that can still work well.

Dependencies work in a different way and do not suit for writing small libs/plugins.

from eslint-loader.

MoOx avatar MoOx commented on May 31, 2024

Agree with @nkbt.

from eslint-loader.

Pomax avatar Pomax commented on May 31, 2024

Wait, no they don't? As far as the docs surrounding NPM3 suggest, peer dependencies and plain dependencies now work exactly the same. Version conflicts are simply resolved by giving the module that needs a conflicting version w.r.t. the version already found at the root level its own local ./node_modules dir, which solves the conflict due to how dependency resolution still happens (bottom-up, checking local, then up until the project root, then system cache). They're not "deprecated" in the sense that they'll still work, but the need for them has vanished as of npm3.

from eslint-loader.

nkbt avatar nkbt commented on May 31, 2024

@Pomax this is not how dependencies and peerDependencies work. Peer dependencies do not resolve themselves for a library if version is incompatible with end-product. Dependencies do. Which means you end up with, for example, two React libraries in your project if you use dependencies instead of peer ones. With peer deps you as a developer will decide if you are ok with using incompatible peer dep (that is used in your product), and that might work out well.

from eslint-loader.

Pomax avatar Pomax commented on May 31, 2024

I see, thanks.

from eslint-loader.

nkbt avatar nkbt commented on May 31, 2024

np 👌

from eslint-loader.

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.