-
Notifications
You must be signed in to change notification settings - Fork 68
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
fix(packages/cli): revert ESM #730
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this need to be more complicated than:
export const getAxeSource = (axePath = require.resolve('axe-core')): string => {
return fs.readFileSync(axePath, 'utf-8')
}
...and if not, do we really need this function?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but as said before, there was probably a reason we did funky path lookups. Please make sure that there isn't some obscure requirement we're breaking by using require.resolve()
.
Should we remove the ESM stuff in the CLI package (since it's not used/needed)? |
I think we should not support ESM in CLI |
I am in favour of that - but IMO it should happen outside of this PR |
…nto fix/axe-core-cli-sorce-path
not required
This PR reverts the recent conversion to ESM for CLI as it's not required which should fix the pathing for the CLI binary when looking for the axe-core source.
Closes: #729
Closes: #726