GithubHelp home page GithubHelp logo

Comments (5)

ayrton avatar ayrton commented on June 2, 2024

As a workaround I believe we can loosen up the dependency to do ^2.1.0 | ^3.0.0. See this diff.

We only have one use case with react-element-to-jsx library so far.

from chai-enzyme.

ayrton avatar ayrton commented on June 2, 2024

@ljharb how do you see the most ideal solution?

from chai-enzyme.

ljharb avatar ljharb commented on June 2, 2024

That won't solve it, since npm will still try to install the latest.

The ideal solution is that nothing is a singleton and nothing needs peer deps :-) but React is a singleton, so all react things must only specify React things as peer deps. In other words, if I want to use chai-enzyme (with react-element-to-jsx-string as a dependency), i must install react-addons-test-utils as a top-level dep.

Another alternative is to simply remove that feature, and drop the dependency.

from chai-enzyme.

ayrton avatar ayrton commented on June 2, 2024

I think it's best to pin chai-enzyme to 0.4.2, which is the latest release that doesn't pull in react-element-to-jsx-string.

As an aside react-element-to-jsx-string supports react 0.14.8 and above while we support 0.14 and above, maybe we should bump this too? thoughts? cc @vesln

from chai-enzyme.

ljharb avatar ljharb commented on June 2, 2024

bumping to the latest 0.14 seems just fine

from chai-enzyme.

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.