groupon / node-cached

A simple caching library for node.js, inspired by the Play cache API
BSD 3-Clause "New" or "Revised" License
94 stars 15 forks source link

v5 cannot be installed with yarn #41

Closed ccinelli closed 5 years ago

ccinelli commented 6 years ago

Any reason why you added this?

  "engines": {
    "yarn": "0.0.0",

If I try to install with yarn I get:

error cached@5.0.0: The engine "yarn" is incompatible with this module. Expected version "0.0.0". Got "1.12.1"
error Found incompatible module
mastermatt commented 5 years ago

It looks like Groupon has done this for all their JS repos that "aren't yarn compatible". They responded to a similar issue opened here https://github.com/groupon/cson-parser/issues/74#issuecomment-438339958.

Maybe @jkrems could shed some more light on the issue. It seems to me, the intent was to stop devs working on their libs with Yarn, but the effect is now consumers of the libs can't use Yarn (or have to ignore-engines).

My understanding is that package-lock.json (or yarn.lock) files are only used when within the package repository, for development of the package itself. When the package is listed as a dependency in some downstream package or application, it's own lockfile is ignored.

jkrems commented 5 years ago

Sorry, this kept getting buried in my inbox. I just pushed a change that removes the engines entry. We'll see that we update our automation to deal with this and/or find better ways to signal yarn that it shouldn't be used in this repo.