Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unpin axe-core for compatibility with new versions #586

Open
nwalters512 opened this issue Oct 2, 2023 · 1 comment
Open

Unpin axe-core for compatibility with new versions #586

nwalters512 opened this issue Oct 2, 2023 · 1 comment

Comments

@nwalters512
Copy link

nwalters512 commented Oct 2, 2023

I recently updated axe-core to 4.8.2 in a project, but because the @sa11y/common package pins axe-core to 4.7.0, I end up with two distinct copies of axe-core in my project which don't have compatible types (see dequelabs/axe-core#4081). This causes TypeScript to complain:

    Type 'import("/home/runner/work/PrairieLearn/PrairieLearn/node_modules/axe-core/axe").Result' is not assignable to type 'import("/home/runner/work/PrairieLearn/PrairieLearn/node_modules/@sa11y/common/node_modules/axe-core/axe").Result'.
      Types of property 'nodes' are incompatible.
        Type 'import("/home/runner/work/PrairieLearn/PrairieLearn/node_modules/axe-core/axe").NodeResult[]' is not assignable to type 'import("/home/runner/work/PrairieLearn/PrairieLearn/node_modules/@sa11y/common/node_modules/axe-core/axe").NodeResult[]'.
          Type 'import("/home/runner/work/PrairieLearn/PrairieLearn/node_modules/axe-core/axe").NodeResult' is not assignable to type 'import("/home/runner/work/PrairieLearn/PrairieLearn/node_modules/@sa11y/common/node_modules/axe-core/axe").NodeResult'.
            Types of property 'target' are incompatible.
              Type 'UnlabelledFrameSelector' is not assignable to type 'string[]'.
                Type 'CrossTreeSelector' is not assignable to type 'string'.
                  Type 'ShadowDomSelector' is not assignable to type 'string'.

This library should almost definitely unpin axe-core to allow new minor versions to be used without @sa11y/common needing to explicitly change.

I'd be happy to make this change if a maintainer could confirm that it will be accepted. It's not clear to me why the @sa11y/* packages pin dependencies in the first place.

@nwalters512
Copy link
Author

@navateja-alagam @jaig-0911 can y'all take a look at this? I'm currently stuck in a situation where I cannot upgrade axe-core because @sa11y/format has pinned it at an older version. This is very uncommon in the JS package ecosystem, so unless there's a good reason it's pinned to an old version, I'd love to open a PR unpinning axe-core.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant