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

feat(webdriverio): Upgrade to axe-core@4.3.3 #331

Merged
merged 13 commits into from
Aug 25, 2021

Conversation

michael-siek
Copy link
Member

@michael-siek michael-siek commented Aug 13, 2021

Blocked by: #333

@michael-siek michael-siek requested a review from a team August 13, 2021 18:16
@@ -1,18 +1,23 @@
import type { RunOptions, AxeResults } from 'axe-core';
import { source } from 'axe-core';
import { source, ContextObject } from 'axe-core';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We shouldn't use axe.source. JavaScript no longer guarantees Function.prototype.toString() returning the complete source. Should use fs.readFileSync instead.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

JavaScript no longer guarantees Function.prototype.toString() returning the complete source.

Can you provide your source for this information?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From https://tc39.es/Function-prototype-toString-revision/#proposal-sec-function.prototype.tostring:

If func is a Bound Function exotic object or a built-in Function object, then return an implementation-dependent String source code representation of func. The representation must have the syntax of a NativeFunction. Additionally, if func is a Well-known Intrinsic Object and is not identified as an anonymous function, the portion of the returned String that would be matched by PropertyName must be the initial value of the name property of func.

If I'm reading this correctly, Function#toString() is fine for our use case.

packages/webdriverio/src/index.ts Outdated Show resolved Hide resolved
packages/webdriverio/src/index.ts Show resolved Hide resolved
packages/webdriverio/src/index.ts Outdated Show resolved Hide resolved
packages/webdriverio/src/index.ts Outdated Show resolved Hide resolved
packages/webdriverio/src/test.ts Outdated Show resolved Hide resolved
packages/webdriverio/src/types.ts Show resolved Hide resolved
packages/webdriverio/src/utils/index.ts Outdated Show resolved Hide resolved
packages/webdriverio/src/index.ts Show resolved Hide resolved
packages/webdriverio/src/utils/index.ts Outdated Show resolved Hide resolved
packages/webdriverio/package.json Outdated Show resolved Hide resolved
packages/webdriverio/src/index.ts Outdated Show resolved Hide resolved
packages/webdriverio/src/test.ts Show resolved Hide resolved
packages/webdriverio/src/test.ts Show resolved Hide resolved
packages/webdriverio/src/test.ts Outdated Show resolved Hide resolved
packages/webdriverio/src/utils.ts Outdated Show resolved Hide resolved
packages/webdriverio/src/test.ts Outdated Show resolved Hide resolved
packages/webdriverio/package.json Outdated Show resolved Hide resolved
packages/webdriverio/src/test.ts Outdated Show resolved Hide resolved
packages/webdriverio/src/test.ts Outdated Show resolved Hide resolved
packages/webdriverio/src/test.ts Outdated Show resolved Hide resolved
packages/webdriverio/src/test.ts Outdated Show resolved Hide resolved
packages/webdriverio/src/utils.ts Show resolved Hide resolved
michael-siek and others added 2 commits August 23, 2021 21:18
Co-authored-by: Steven Lambert <2433219+straker@users.noreply.github.com>
packages/webdriverio/src/utils.ts Outdated Show resolved Hide resolved
packages/webdriverio/src/utils.ts Outdated Show resolved Hide resolved
packages/webdriverio/src/utils.ts Show resolved Hide resolved
@straker straker changed the title feat(webdriverio): Upgrade to axe-core@4.3.2 feat(webdriverio): Upgrade to axe-core@4.3.3 Aug 24, 2021
@michael-siek michael-siek merged commit 2135347 into develop Aug 25, 2021
@michael-siek michael-siek deleted the feat/axe-core@4.3.2-webdriverio branch August 25, 2021 12:57
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

Successfully merging this pull request may close these issues.

None yet

4 participants