Skip to content

Commit

Permalink
Merge pull request #3761 from dequelabs/release-4.5.1
Browse files Browse the repository at this point in the history
chore(release): 4.5.1
  • Loading branch information
straker authored Nov 1, 2022
2 parents 8ce3098 + a9cc7de commit 6200ce3
Show file tree
Hide file tree
Showing 15 changed files with 117 additions and 102 deletions.
43 changes: 29 additions & 14 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
- run: npm run eslint

# Run the test suite.
test_unix:
test_chrome:
<<: *defaults
<<: *unix_box
steps:
Expand All @@ -60,8 +60,18 @@ jobs:
- <<: *restore_dependency_cache_unix
- run: npx browser-driver-manager install chromedriver --verbose
- run: npm run build
- run: npm run test -- --browsers Chrome,Firefox
- run: npm run test -- --browsers Chrome
- run: npm run test:integration:chrome

test_firefox:
<<: *defaults
<<: *unix_box
steps:
- browser-tools/install-browser-tools
- checkout
- <<: *restore_dependency_cache_unix
- run: npm run build
- run: npm run test -- --browsers Firefox
- run: npm run test:integration:firefox

# Run examples under `doc/examples`
Expand Down Expand Up @@ -276,38 +286,41 @@ workflows:
requires:
- dependencies_unix
# Run tests on all commits, but after installing dependencies
- test_unix:
- test_chrome:
requires:
- lint
- test_firefox:
requires:
- test_chrome
- test_examples:
requires:
- test_unix
- test_chrome
- test_act:
requires:
- test_unix
- test_chrome
- test_aria_practices:
requires:
- test_unix
- test_chrome
- test_locales:
requires:
- test_unix
- test_chrome
- test_virtual_rules:
requires:
- test_unix
- test_chrome
- build_api_docs:
requires:
- test_unix
- test_chrome
- test_rule_help_version:
requires:
- test_unix
- test_chrome
- test_node:
requires:
- test_unix
- test_chrome
# Hold for approval
- hold:
type: approval
requires:
- test_unix
- test_chrome
- test_examples
- test_locales
- test_virtual_rules
Expand All @@ -322,7 +335,8 @@ workflows:
- next_release:
requires:
- dependencies_unix
- test_unix
- test_chrome
- test_firefox
- test_examples
- test_locales
- test_virtual_rules
Expand All @@ -334,7 +348,8 @@ workflows:
- release:
requires:
- dependencies_unix
- test_unix
- test_chrome
- test_firefox
- test_examples
- test_locales
- test_virtual_rules
Expand Down
20 changes: 18 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ module.exports = {
sourceType: 'module'
},
env: {
browser: true,
// do not access global window properties without going through window
browser: false,
es6: true
},
globals: {
Expand All @@ -95,14 +96,29 @@ module.exports = {
parserOptions: {
sourceType: 'module'
},
env: {},
env: {
browser: false
},
globals: {},
rules: {
'func-names': [2, 'as-needed'],
'prefer-const': 2,
'no-use-before-define': 'off'
}
},
{
// polyfills are mostly copy-pasted from sources so we don't control their styling
files: ['lib/core/utils/pollyfills.js'],
env: {
browser: false
},
rules: {
'func-names': 0,
'no-bitwise': 0,
curly: 0,
eqeqeq: 0
}
},
{
files: ['test/act-rules/**/*.js', 'test/aria-practices/**/*.js'],
env: {
Expand Down
13 changes: 13 additions & 0 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Formatter

on: [pull_request]

jobs:
prettier:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Prettify the code
uses: creyD/prettier_action@v4.2
with:
prettier_options: '--write .'
2 changes: 1 addition & 1 deletion .github/workflows/update-generated-files.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:

- name: Build
run: |
npm install
npm ci
npm run build
- name: Check for changes
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

### [4.5.1](https://github.com/dequelabs/axe-core/compare/v4.5.0...v4.5.1) (2022-11-01)

### Bug Fixes

- allow axe to run in certain configurations of jsdom ([#3755](https://github.com/dequelabs/axe-core/issues/3755)) ([b74c5d4](https://github.com/dequelabs/axe-core/commit/b74c5d41c4041554c9dd1c00dfd6387cb069d1a5))
- prevent crash on jsdom when preloading CSSOM ([#3754](https://github.com/dequelabs/axe-core/issues/3754)) ([b1f0c6b](https://github.com/dequelabs/axe-core/commit/b1f0c6bba2debc6c6a106412da530975cd4ade24))

## [4.5.0](https://github.com/dequelabs/axe-core/compare/v4.4.3...v4.5.0) (2022-10-17)

### Features
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "axe-core",
"version": "4.5.0",
"version": "4.5.1",
"contributors": [
{
"name": "David Sturley",
Expand Down
2 changes: 1 addition & 1 deletion lib/commons/color/get-background-stack.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import reduceToElementsBelowFloating from '../dom/reduce-to-elements-below-float
* @return {Boolean}
*/
function isInlineDescendant(node, descendant) {
const CONTAINED_BY = Node.DOCUMENT_POSITION_CONTAINED_BY;
const CONTAINED_BY = window.Node.DOCUMENT_POSITION_CONTAINED_BY;
// eslint-disable-next-line no-bitwise
if (!(node.compareDocumentPosition(descendant) & CONTAINED_BY)) {
return false;
Expand Down
4 changes: 2 additions & 2 deletions lib/core/utils/dq-element.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ function getSource(element) {
return '';
}
var source = element.outerHTML;
if (!source && typeof XMLSerializer === 'function') {
source = new XMLSerializer().serializeToString(element);
if (!source && typeof window.XMLSerializer === 'function') {
source = new window.XMLSerializer().serializeToString(element);
}
return truncate(source || '');
}
Expand Down
2 changes: 1 addition & 1 deletion lib/core/utils/parse-crossorigin-stylesheet.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function parseCrossOriginStylesheet(
importedUrls.push(url);

return new Promise((resolve, reject) => {
const request = new XMLHttpRequest();
const request = new window.XMLHttpRequest();
request.open('GET', url);

request.timeout = constants.preload.timeout;
Expand Down
5 changes: 2 additions & 3 deletions lib/core/utils/pollyfills.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable */
/*
These polyfills came directly from the ES Specification itself
Contained within:
Expand Down Expand Up @@ -348,8 +347,8 @@ if (!Array.prototype.flat) {

// linked from MDN docs on isConnected
// @see https://gist.github.com/eligrey/f109a6d0bf4efe3461201c3d7b745e8f
if (window.Node && !('isConnected' in Node.prototype)) {
Object.defineProperty(Node.prototype, 'isConnected', {
if (window.Node && !('isConnected' in window.Node.prototype)) {
Object.defineProperty(window.Node.prototype, 'isConnected', {
get() {
return (
!this.ownerDocument ||
Expand Down
10 changes: 7 additions & 3 deletions lib/core/utils/preload-cssom.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,9 +187,13 @@ function getStylesheetsFromDocumentFragment(rootNode, convertDataToStylesheet) {
* @returns {Array<Object>}
*/
function getStylesheetsFromDocument(rootNode) {
return Array.from(rootNode.styleSheets).filter(sheet =>
filterMediaIsPrint(sheet.media.mediaText)
);
return Array.from(rootNode.styleSheets).filter(sheet => {
if (!sheet.media) {
return false;
}

return filterMediaIsPrint(sheet.media.mediaText);
});
}

/**
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "axe-core",
"description": "Accessibility engine for automated Web UI testing",
"version": "4.5.0",
"version": "4.5.1",
"license": "MPL-2.0",
"engines": {
"node": ">=4"
Expand Down
4 changes: 4 additions & 0 deletions sri-history.json
Original file line number Diff line number Diff line change
Expand Up @@ -314,5 +314,9 @@
"4.5.0": {
"axe.js": "sha256-AYLBIQscniY92RkIlsESUAIu3cOplhUmJ3Y4/DKR4SE=",
"axe.min.js": "sha256-cdG6H1F9kSiSIpyWgjGYXkbV3mcfc6/SvE7Zbq2km/A="
},
"4.5.1": {
"axe.js": "sha256-IkK+029qUdULyO88zkDU2TeO5kQB8AjncJvjmFKqBHQ=",
"axe.min.js": "sha256-Ost3Bp9ymk0FCZFL9pOU2g/ph8u06GuVCm8go6W+THw="
}
}
Loading

0 comments on commit 6200ce3

Please sign in to comment.