Skip to content

Commit

Permalink
Merge branch 'develop' into moar-types
Browse files Browse the repository at this point in the history
  • Loading branch information
straker committed Oct 12, 2023
2 parents b93d6fb + 449feed commit ba8566d
Show file tree
Hide file tree
Showing 16 changed files with 780 additions and 293 deletions.
4 changes: 1 addition & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,7 @@ restore_build: &restore_build
commands:
browser-tools-job:
steps:
- browser-tools/install-browser-tools:
# TODO: remove when chromedriver downloads are fixed
chrome-version: 116.0.5845.96
- browser-tools/install-browser-tools

jobs:
# Fetch and cache dependencies.
Expand Down
40 changes: 40 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
version: 2

updates:
- package-ecosystem: 'github-actions'
directory: '/'
schedule:
interval: 'monthly'
open-pull-requests-limit: 10
commit-message:
prefix: 'chore'
groups:
# Any updates not caught by the group config will get individual PRs
gha-low-risk:
update-types:
- 'minor'
- 'patch'

- package-ecosystem: 'npm'
directory: '/'
schedule:
interval: 'monthly'
open-pull-requests-limit: 10
commit-message:
prefix: 'chore'
ignore:
# Prevent updates to ESM-only versions
- dependency-name: 'chalk'
versions: ['>=5.0.0']
- dependency-name: 'execa'
versions: ['>=6.0.0']
# Prevent Webpack error caused by v0.11+ of esbuild
# @see https://github.com/dequelabs/axe-core/issues/3771
- dependency-name: 'esbuild'
versions: ['>=0.11.0']
groups:
# Any updates not caught by the group config will get individual PRs
npm-low-risk:
update-types:
- 'minor'
- 'patch'
13 changes: 4 additions & 9 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,21 @@ jobs:
prettier:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
- name: Install dependencies
run: npm ci
- name: Cache node_modules
uses: actions/cache@v3
with:
path: |
./node_modules
key: npm-workspace-cache-${{ runner.os }}-${{ hashFiles('./package-lock.json') }}
- uses: actions/setup-node@v1
- uses: actions/setup-node@v3
with:
node-version: 16
cache: 'npm'
# Workflows are not allowed to edit workflows. As result, we need to prevent Prettier from formatting them.
- name: Prevent workflows from being formatted
run: echo ".github" >> .prettierignore
- run: npm run fmt
# Prevent the prettierignore change from being committed.
- run: git checkout .prettierignore
- uses: stefanzweifel/git-auto-commit-action@v4
- uses: stefanzweifel/git-auto-commit-action@8756aa072ef5b4a080af5dc8fef36c5d586e521d # tag=v5
with:
commit_message: ':robot: Automated formatting fixes'
4 changes: 2 additions & 2 deletions .github/workflows/label-extension-linter-issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ jobs:
issues: write
steps:
- name: Label Extension Issues
uses: andymckay/labeler@1.0.4
uses: andymckay/labeler@e6c4322d0397f3240f0e7e30a33b5c5df2d39e90 # tag=1
if: contains(toJson(github.event.issue.body), '### Product\n\naxe Extension\n\n')
with:
add-labels: 'extension'
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Label Linting Issues
uses: andymckay/labeler@1.0.4
uses: andymckay/labeler@e6c4322d0397f3240f0e7e30a33b5c5df2d39e90 # tag=1
if: contains(toJson(github.event.issue.body), '### Product\n\naxe Linter\n\n')
with:
add-labels: 'linting'
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,13 @@ jobs:
name: Create release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/cache@v3
with:
path: ./node_modules
key: npm-cache-${{ runner.os }}-${{ hashFiles('./package-lock.json') }}
- uses: actions/setup-node@v3
with:
node-version: 16
cache: 'npm'
- name: Run release script and open PR
run: |
git config user.name "API Team CI User"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-generated-files.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

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.8.2](https://github.com/dequelabs/axe-core/compare/v4.8.1...v4.8.2) (2023-09-18)

### Bug Fixes

- polyfill Object.hasOwn for node 14 ([#4152](https://github.com/dequelabs/axe-core/issues/4152)) ([c7b597b](https://github.com/dequelabs/axe-core/commit/c7b597b9ec9c74009f4ddac16d5311ee642ab352))

### [4.8.1](https://github.com/dequelabs/axe-core/compare/v4.8.0...v4.8.1) (2023-09-08)

### Bug Fixes
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.8.1",
"version": "4.8.2",
"deprecated": true,
"contributors": [
{
Expand Down
4 changes: 2 additions & 2 deletions build/configure.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ var clone = require('clone');
var doT = require('@deque/dot');
var templates = require('./templates');
var buildManual = require('./build-manual');
var entities = new (require('html-entities').AllHtmlEntities)();
var { encode } = require('html-entities');
var packageJSON = require('../package.json');
var doTRegex = /\{\{.+?\}\}/g;

Expand Down Expand Up @@ -365,7 +365,7 @@ function buildRules(grunt, options, commons, callback) {

result.push([
`[${rule.id}](https://dequeuniversity.com/rules/axe/${axeVersion}/${rule.id}?application=RuleDescription)`,
entities.encode(rule.metadata.description),
encode(rule.metadata.description),
impact,
rule.tags.join(', '),
issueType.join(', '),
Expand Down
14 changes: 4 additions & 10 deletions build/rule-generator/questions.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const fs = require('fs');
const globby = require('globby');
const { glob } = require('glob');
const directories = require('./directories');

/**
Expand Down Expand Up @@ -33,9 +33,7 @@ const validateGetRuleName = async input => {
throw new Error(`RULE name conflicts with an existing rule's filename.`);
}
// 3) ensure no rule id overlaps
const ruleSpecs = await globby(directories.rules, {
expandDirectories: { extensions: ['json'] }
});
const ruleSpecs = await glob(`${directories.rules}/**/*.json`);
const axeRulesIds = ruleSpecs.reduce((out, specPath) => {
const spec = require(specPath);
out.push(spec.id);
Expand Down Expand Up @@ -64,9 +62,7 @@ const validateGetCheckName = async input => {
);
}
// 2) ensure no check filename overlaps
const checkSpecs = await globby(directories.checks, {
expandDirectories: { extensions: ['json'] }
});
const checkSpecs = await glob(`${directories.checks}/**/*.json`);
// cannot use `fs.existsSync` here, as we do not know which category of checks to look under
const axeChecksFileNames = checkSpecs.map(
f => f.replace('.json', '').split('/').reverse()[0]
Expand All @@ -75,9 +71,7 @@ const validateGetCheckName = async input => {
throw new Error('CHECK name conflicts with an existing filename.');
}
// 3) ensure no check id overlaps
const ruleSpecs = await globby(directories.rules, {
expandDirectories: { extensions: ['json'] }
});
const ruleSpecs = await glob(`${directories.rules}/**/*.json`);
const axe = require(directories.axePath);
const axeChecksIds = ruleSpecs.reduce((out, specPath) => {
const spec = require(specPath);
Expand Down
11 changes: 8 additions & 3 deletions build/tasks/aria-supported.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
'use strict';

const { roles, aria: props } = require('aria-query');
const mdTable = require('markdown-table');
const format = require('../shared/format');

module.exports = function (grunt) {
Expand Down Expand Up @@ -50,10 +49,16 @@ module.exports = function (grunt) {
ariaAttrs,
listType
);
const attributesTableMarkdown = mdTable([
const formatMarkdownTableRow = columnValues =>
`| ${columnValues.join(' | ')} |`;
const attributesTableWithHeader = [
headings.attributesMdTableHeader,
['---', '---'],
...attributesTable
]);
];
const attributesTableMarkdown = attributesTableWithHeader
.map(formatMarkdownTableRow)
.join('\n');

const footnotes = [...rolesFootnotes, ...attributesFootnotes].map(
(footnote, index) => `[^${index + 1}]: ${footnote}`
Expand Down
Loading

0 comments on commit ba8566d

Please sign in to comment.