@axe-core/reporter-earl 4.7.4-alpha.408 → 4.7.4-alpha.409
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +5 -37
- package/dist/axeReporterEarl.js +33 -37
- package/dist/axeReporterEarl.mjs +33 -37
- package/esmTest.mjs +1 -1
- package/package.json +2 -2
- package/src/axeResultToEarl.ts +25 -27
- package/src/testResult.ts +8 -10
package/CHANGELOG.md
CHANGED
|
@@ -7,70 +7,38 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
7
7
|
|
|
8
8
|
**Note:** Version bump only for package @axe-core/reporter-earl
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
10
|
## [4.7.2](https://github.com/dequelabs/axe-core-npm/compare/v4.7.1...v4.7.2) (2023-06-01)
|
|
15
11
|
|
|
16
12
|
**Note:** Version bump only for package @axe-core/reporter-earl
|
|
17
13
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
14
|
## [4.7.1](https://github.com/dequelabs/axe-core-npm/compare/v4.7.0...v4.7.1) (2023-05-02)
|
|
23
15
|
|
|
24
16
|
**Note:** Version bump only for package @axe-core/reporter-earl
|
|
25
17
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
18
|
# [4.7.0](https://github.com/dequelabs/axe-core-npm/compare/v4.6.1...v4.7.0) (2023-04-28)
|
|
31
19
|
|
|
32
|
-
|
|
33
20
|
### Features
|
|
34
21
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
22
|
+
- enable esm import ([#713](https://github.com/dequelabs/axe-core-npm/issues/713)) ([076bfa9](https://github.com/dequelabs/axe-core-npm/commit/076bfa99f27f416b4eaff6d24cc23e8573fc72ee))
|
|
23
|
+
- Update axe-core to v4.7.0 ([#709](https://github.com/dequelabs/axe-core-npm/issues/709)) ([d418d09](https://github.com/dequelabs/axe-core-npm/commit/d418d093b4c462d5d60e0f7ad3d5147bcaf52aa2))
|
|
41
24
|
|
|
42
25
|
## [4.6.1](https://github.com/dequelabs/axe-core-npm/compare/v4.6.0...v4.6.1) (2023-03-28)
|
|
43
26
|
|
|
44
|
-
|
|
45
27
|
### Bug Fixes
|
|
46
28
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
29
|
+
- Update axe-core to v4.6.3 ([#698](https://github.com/dequelabs/axe-core-npm/issues/698)) ([a7d53a4](https://github.com/dequelabs/axe-core-npm/commit/a7d53a4876237c74bb8dc2836b703cdaf2f7ace5))
|
|
52
30
|
|
|
53
31
|
# [4.6.0](https://github.com/dequelabs/axe-core-npm/compare/v4.5.2...v4.6.0) (2023-01-19)
|
|
54
32
|
|
|
55
|
-
|
|
56
33
|
### Features
|
|
57
34
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
35
|
+
- Update axe-core to v4.6.1 ([#633](https://github.com/dequelabs/axe-core-npm/issues/633)) ([8bab5b2](https://github.com/dequelabs/axe-core-npm/commit/8bab5b23b3653a6a0603f10d889e22418a4fff3e))
|
|
63
36
|
|
|
64
37
|
## [4.5.2](https://github.com/dequelabs/axe-core-npm/compare/v4.5.1...v4.5.2) (2022-11-15)
|
|
65
38
|
|
|
66
|
-
|
|
67
39
|
### Bug Fixes
|
|
68
40
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
41
|
+
- update to use axe-core 4.5.2 ([#607](https://github.com/dequelabs/axe-core-npm/issues/607)) ([61312ff](https://github.com/dequelabs/axe-core-npm/commit/61312fff2e9ee4e0f218a29a1608f69b45206fad))
|
|
74
42
|
|
|
75
43
|
## [4.5.1](https://github.com/dequelabs/axe-core-npm/compare/v4.5.0...v4.5.1) (2022-11-03)
|
|
76
44
|
|
package/dist/axeReporterEarl.js
CHANGED
|
@@ -100,16 +100,14 @@ function cssToPointer(selector) {
|
|
|
100
100
|
return item;
|
|
101
101
|
}
|
|
102
102
|
function testResult({ description }, outcomes = []) {
|
|
103
|
-
return outcomes.map(
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
}
|
|
112
|
-
);
|
|
103
|
+
return outcomes.map(({ node, result }) => {
|
|
104
|
+
return {
|
|
105
|
+
"@type": "TestResult" /* TestResult */,
|
|
106
|
+
info: description,
|
|
107
|
+
outcome: "earl:" + result,
|
|
108
|
+
pointer: cssToPointer(node.selector)
|
|
109
|
+
};
|
|
110
|
+
});
|
|
113
111
|
}
|
|
114
112
|
|
|
115
113
|
// src/axeResultToEarl.ts
|
|
@@ -126,33 +124,31 @@ function axeResultToEarl(rawResults) {
|
|
|
126
124
|
outcome: "earl:inapplicable"
|
|
127
125
|
});
|
|
128
126
|
}
|
|
129
|
-
const newAsserts = results.map(
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
"
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
}
|
|
155
|
-
);
|
|
127
|
+
const newAsserts = results.map((result) => {
|
|
128
|
+
const match = axeResult.helpUrl.match(
|
|
129
|
+
/axe\/([1-9][0-9]*\.[1-9][0-9]*)\//
|
|
130
|
+
);
|
|
131
|
+
const version = match && match[1] || "";
|
|
132
|
+
return {
|
|
133
|
+
"@type": "Assertion" /* Assertion */,
|
|
134
|
+
mode: "earl:automatic",
|
|
135
|
+
assertedBy: {
|
|
136
|
+
"@id": `https://github.com/dequelabs/axe-core/releases/tag/${version}.0`,
|
|
137
|
+
"@type": ["earl:Assertor", "earl:Software", "doap:Project"],
|
|
138
|
+
"doap:name": "Axe",
|
|
139
|
+
"doap:vendor": {
|
|
140
|
+
"@id": "https://deque.com/",
|
|
141
|
+
"@type": "foaf:Organization",
|
|
142
|
+
"foaf:name": "Deque Systems"
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
test: {
|
|
146
|
+
"@type": "TestCase" /* TestCase */,
|
|
147
|
+
"@id": axeResult.helpUrl
|
|
148
|
+
},
|
|
149
|
+
result
|
|
150
|
+
};
|
|
151
|
+
});
|
|
156
152
|
return asserts.concat(newAsserts);
|
|
157
153
|
},
|
|
158
154
|
[]
|
package/dist/axeReporterEarl.mjs
CHANGED
|
@@ -79,16 +79,14 @@ function cssToPointer(selector) {
|
|
|
79
79
|
return item;
|
|
80
80
|
}
|
|
81
81
|
function testResult({ description }, outcomes = []) {
|
|
82
|
-
return outcomes.map(
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
}
|
|
91
|
-
);
|
|
82
|
+
return outcomes.map(({ node, result }) => {
|
|
83
|
+
return {
|
|
84
|
+
"@type": "TestResult" /* TestResult */,
|
|
85
|
+
info: description,
|
|
86
|
+
outcome: "earl:" + result,
|
|
87
|
+
pointer: cssToPointer(node.selector)
|
|
88
|
+
};
|
|
89
|
+
});
|
|
92
90
|
}
|
|
93
91
|
|
|
94
92
|
// src/axeResultToEarl.ts
|
|
@@ -105,33 +103,31 @@ function axeResultToEarl(rawResults) {
|
|
|
105
103
|
outcome: "earl:inapplicable"
|
|
106
104
|
});
|
|
107
105
|
}
|
|
108
|
-
const newAsserts = results.map(
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
"
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
}
|
|
134
|
-
);
|
|
106
|
+
const newAsserts = results.map((result) => {
|
|
107
|
+
const match = axeResult.helpUrl.match(
|
|
108
|
+
/axe\/([1-9][0-9]*\.[1-9][0-9]*)\//
|
|
109
|
+
);
|
|
110
|
+
const version = match && match[1] || "";
|
|
111
|
+
return {
|
|
112
|
+
"@type": "Assertion" /* Assertion */,
|
|
113
|
+
mode: "earl:automatic",
|
|
114
|
+
assertedBy: {
|
|
115
|
+
"@id": `https://github.com/dequelabs/axe-core/releases/tag/${version}.0`,
|
|
116
|
+
"@type": ["earl:Assertor", "earl:Software", "doap:Project"],
|
|
117
|
+
"doap:name": "Axe",
|
|
118
|
+
"doap:vendor": {
|
|
119
|
+
"@id": "https://deque.com/",
|
|
120
|
+
"@type": "foaf:Organization",
|
|
121
|
+
"foaf:name": "Deque Systems"
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
test: {
|
|
125
|
+
"@type": "TestCase" /* TestCase */,
|
|
126
|
+
"@id": axeResult.helpUrl
|
|
127
|
+
},
|
|
128
|
+
result
|
|
129
|
+
};
|
|
130
|
+
});
|
|
135
131
|
return asserts.concat(newAsserts);
|
|
136
132
|
},
|
|
137
133
|
[]
|
package/esmTest.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import defaultExport from './dist/axeReporterEarl.mjs';
|
|
2
2
|
import assert from 'assert';
|
|
3
3
|
|
|
4
|
-
const exportIsFunction = typeof
|
|
4
|
+
const exportIsFunction = typeof defaultExport === 'function';
|
|
5
5
|
assert(exportIsFunction, 'export is not a function');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@axe-core/reporter-earl",
|
|
3
|
-
"version": "4.7.4-alpha.
|
|
3
|
+
"version": "4.7.4-alpha.409+eb99c15",
|
|
4
4
|
"description": "A EARL+JSON-LD reporter for axe-core",
|
|
5
5
|
"main": "dist/axeReporterEarl.js",
|
|
6
6
|
"module": "./dist/axeReporterEarl.mjs",
|
|
@@ -55,5 +55,5 @@
|
|
|
55
55
|
"tsup": "^6.7.0",
|
|
56
56
|
"typescript": "^4.8.4"
|
|
57
57
|
},
|
|
58
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "eb99c1571486f66cae42c417943b6e70f15ec582"
|
|
59
59
|
}
|
package/src/axeResultToEarl.ts
CHANGED
|
@@ -16,33 +16,31 @@ export default function axeResultToEarl(rawResults: RawResult[]): Assertion[] {
|
|
|
16
16
|
});
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
const newAsserts = results.map(
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
'
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}
|
|
45
|
-
);
|
|
19
|
+
const newAsserts = results.map((result): Assertion => {
|
|
20
|
+
const match = axeResult.helpUrl.match(
|
|
21
|
+
/axe\/([1-9][0-9]*\.[1-9][0-9]*)\//
|
|
22
|
+
);
|
|
23
|
+
const version = (match && match[1]) || '';
|
|
24
|
+
return {
|
|
25
|
+
'@type': EarlType.Assertion,
|
|
26
|
+
mode: 'earl:automatic',
|
|
27
|
+
assertedBy: {
|
|
28
|
+
'@id': `https://github.com/dequelabs/axe-core/releases/tag/${version}.0`,
|
|
29
|
+
'@type': ['earl:Assertor', 'earl:Software', 'doap:Project'],
|
|
30
|
+
'doap:name': 'Axe',
|
|
31
|
+
'doap:vendor': {
|
|
32
|
+
'@id': 'https://deque.com/',
|
|
33
|
+
'@type': 'foaf:Organization',
|
|
34
|
+
'foaf:name': 'Deque Systems'
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
test: {
|
|
38
|
+
'@type': EarlType.TestCase,
|
|
39
|
+
'@id': axeResult.helpUrl
|
|
40
|
+
},
|
|
41
|
+
result
|
|
42
|
+
};
|
|
43
|
+
});
|
|
46
44
|
|
|
47
45
|
return asserts.concat(newAsserts);
|
|
48
46
|
},
|
package/src/testResult.ts
CHANGED
|
@@ -18,14 +18,12 @@ export default function testResult(
|
|
|
18
18
|
{ description }: RawResult,
|
|
19
19
|
outcomes: RawNodeResult[] = []
|
|
20
20
|
): TestResult[] {
|
|
21
|
-
return outcomes.map(
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}
|
|
30
|
-
);
|
|
21
|
+
return outcomes.map(({ node, result }): TestResult => {
|
|
22
|
+
return {
|
|
23
|
+
'@type': EarlType.TestResult,
|
|
24
|
+
info: description,
|
|
25
|
+
outcome: 'earl:' + result,
|
|
26
|
+
pointer: cssToPointer(node.selector)
|
|
27
|
+
};
|
|
28
|
+
});
|
|
31
29
|
}
|