Giter Site home page Giter Site logo

Comments (7)

cshouts-tasc avatar cshouts-tasc commented on May 21, 2024

It seems like npm has already solved this problem. Make axe-core a peer dependency and everything will work as intended with the developers preferred version of axe-core without any additional setup on their end.

Current consumers of the package should be able to continue using cy.injectAxe() and cy.configureAxe() in the same way they do today.

from cypress-axe.

aldosuwandi avatar aldosuwandi commented on May 21, 2024

Currently, axe-core is bundled within this library, so unless we change the build setup, the peer dependency approach won't work.
see: #37 (comment)

The proposed solution should work if we decide to keep the bundled approach. But, if we want to unbundle it; then, peer dependency should be enough.

from cypress-axe.

sapegin avatar sapegin commented on May 21, 2024

Now I see the problem! It's bundling all dependencies, which doesn't sound like an optimal solution:

"build": "parcel build src/index.js --bundle-node-modules",

And looks like there were reasons to bundle it though I'm not sure what exactly was the problem:

#37 (comment)

from cypress-axe.

sapegin avatar sapegin commented on May 21, 2024

I've done some experiments on my project that uses cypress-axe.

When I try to use not bundled code, it fails with β€œfs.readFileSync is not a function”:

image

However, using axe.source as suggested in #38 works fine.

I suggest we make a version with axe.source without bundling and see what other problems folks may have.

from cypress-axe.

sapegin avatar sapegin commented on May 21, 2024

I've opened a pull request #69 β€” this works perfectly in my project. Would be great if anyone else could test it too.

from cypress-axe.

aldosuwandi avatar aldosuwandi commented on May 21, 2024

Thanks, @sapegin. I'm not sure either why @avanslaars decided to bundle it. If we can unbundle it, that will be great.
I tried PR #69 in my project and found an issue. Please see my comment here.

from cypress-axe.

github-actions avatar github-actions commented on May 21, 2024

πŸŽ‰ This issue has been resolved in version 0.9.0 πŸŽ‰

The release is available on:

Your semantic-release bot πŸ“¦πŸš€

from cypress-axe.

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.