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

fix: deprecate axe.commons.utils namespace #1330

Merged
merged 6 commits into from
Jan 25, 2019
Merged

Conversation

jeeyyy
Copy link
Contributor

@jeeyyy jeeyyy commented Jan 22, 2019

This PR does the below:

  • Migrated utility functions from axe.commons.utils namespace to axe.utils

Why?

  • There were a plethora of namespace pollution - eg: var utils = (commons.utils = axe.utils);

Closes issue: NA

Reviewer checks

Required fields, to be filled out by PR reviewer(s)

  • Follows the commit message policy, appropriate for next version
  • Has documentation updated, a DU ticket, or requires no documentation change
  • Includes new tests, or was unnecessary
  • Code is reviewed for security by: Stephen

@jeeyyy jeeyyy requested a review from a team as a code owner January 22, 2019 17:28
* @memberof axe.commons
*/

var utils = (commons.utils = axe.utils);
Copy link
Contributor

Choose a reason for hiding this comment

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

We need to keep this around. Removing this would be a breaking change.

Copy link
Member

Choose a reason for hiding this comment

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

What would this break?

Copy link
Contributor

Choose a reason for hiding this comment

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

Commons are pseudo-public. They are used in custom rules which clients use. We have to be careful about changing commons.

it('should be a function', function() {
assert.isFunction(axe.commons.utils.clone);
});
});
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here, we don't want to make a breaking change. Just check that assert.equal(axe.utils, axe.commons.utils).

@stephenmathieson
Copy link
Member

@WilcoFiers I don't understand why removing the aliased namespace would be a breaking change. From what I can tell, it's not part of any public API. Can you please clarify?

@jeeyyy jeeyyy merged commit df93272 into develop Jan 25, 2019
@jeeyyy jeeyyy deleted the deprecate-axe-commons-utils branch January 25, 2019 16:43
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.

3 participants