Giter Site home page Giter Site logo

dependency issues about karma-mocha HOT 4 CLOSED

karma-runner avatar karma-runner commented on August 9, 2024
dependency issues

from karma-mocha.

Comments (4)

dignifiedquire avatar dignifiedquire commented on August 9, 2024

Hey,

happy to hear you are considering using karma to test mocha :)

To be honest I'm not a big fan of peerDependencies in general, especially in npm@2. We had a lot if issues with them in development as we use it for specifying the karma version. With npm@3 they are much better I think.
As for what to do now, I would like to keep moch as a peerDependency, mostly for consistency woth other karma plugins and hope npm@3 gets adopted quickly.

For using it in mocha I would suggest having an afterInstall step that deleted node_modules/mocha and symlinks it to ../ so that karma-mocha uses the actual moch version. We do the same thing at the moment on the karma main repo to work around the auto install of peerDependencies.
Would that work for you?

We should change that * dependency to be a bit more restrictive to avoid issues with api changes you are right there.

from karma-mocha.

boneskull avatar boneskull commented on August 9, 2024

Currently npm v3 throws a max call stack exception if a package is symlinked to itself. I'm not sure if that's a real bug; at the very least they should have a friendlier error message. I'll inquire over there.

from karma-mocha.

maksimr avatar maksimr commented on August 9, 2024

@boneskull

With npm v3, an unmet peer dep will result in a warning only.

I think warning better than README.md. Users don't read README. For testing mocha you can manually link mocha as node_module in mocha directory.

Thanks

from karma-mocha.

maksimr avatar maksimr commented on August 9, 2024

Already fixed in this PR

from karma-mocha.

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.