@axe-core/reporter-earl 4.7.4-alpha.407 → 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 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
- * enable esm import ([#713](https://github.com/dequelabs/axe-core-npm/issues/713)) ([076bfa9](https://github.com/dequelabs/axe-core-npm/commit/076bfa99f27f416b4eaff6d24cc23e8573fc72ee))
36
- * 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))
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
- * 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))
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
- * 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))
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
- * 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))
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
 
@@ -100,16 +100,14 @@ function cssToPointer(selector) {
100
100
  return item;
101
101
  }
102
102
  function testResult({ description }, outcomes = []) {
103
- return outcomes.map(
104
- ({ node, result }) => {
105
- return {
106
- "@type": "TestResult" /* TestResult */,
107
- info: description,
108
- outcome: "earl:" + result,
109
- pointer: cssToPointer(node.selector)
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
- (result) => {
131
- const match = axeResult.helpUrl.match(
132
- /axe\/([1-9][0-9]*\.[1-9][0-9]*)\//
133
- );
134
- const version = match && match[1] || "";
135
- return {
136
- "@type": "Assertion" /* Assertion */,
137
- mode: "earl:automatic",
138
- assertedBy: {
139
- "@id": `https://github.com/dequelabs/axe-core/releases/tag/${version}.0`,
140
- "@type": ["earl:Assertor", "earl:Software", "doap:Project"],
141
- "doap:name": "Axe",
142
- "doap:vendor": {
143
- "@id": "https://deque.com/",
144
- "@type": "foaf:Organization",
145
- "foaf:name": "Deque Systems"
146
- }
147
- },
148
- test: {
149
- "@type": "TestCase" /* TestCase */,
150
- "@id": axeResult.helpUrl
151
- },
152
- result
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
  []
@@ -79,16 +79,14 @@ function cssToPointer(selector) {
79
79
  return item;
80
80
  }
81
81
  function testResult({ description }, outcomes = []) {
82
- return outcomes.map(
83
- ({ node, result }) => {
84
- return {
85
- "@type": "TestResult" /* TestResult */,
86
- info: description,
87
- outcome: "earl:" + result,
88
- pointer: cssToPointer(node.selector)
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
- (result) => {
110
- const match = axeResult.helpUrl.match(
111
- /axe\/([1-9][0-9]*\.[1-9][0-9]*)\//
112
- );
113
- const version = match && match[1] || "";
114
- return {
115
- "@type": "Assertion" /* Assertion */,
116
- mode: "earl:automatic",
117
- assertedBy: {
118
- "@id": `https://github.com/dequelabs/axe-core/releases/tag/${version}.0`,
119
- "@type": ["earl:Assertor", "earl:Software", "doap:Project"],
120
- "doap:name": "Axe",
121
- "doap:vendor": {
122
- "@id": "https://deque.com/",
123
- "@type": "foaf:Organization",
124
- "foaf:name": "Deque Systems"
125
- }
126
- },
127
- test: {
128
- "@type": "TestCase" /* TestCase */,
129
- "@id": axeResult.helpUrl
130
- },
131
- result
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(defaultExport) === 'function';
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.407+ca07660",
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": "ca07660635fbc6c0e498d4326213b3901bdf3698"
58
+ "gitHead": "eb99c1571486f66cae42c417943b6e70f15ec582"
59
59
  }
@@ -16,33 +16,31 @@ export default function axeResultToEarl(rawResults: RawResult[]): Assertion[] {
16
16
  });
17
17
  }
18
18
 
19
- const newAsserts = results.map(
20
- (result): Assertion => {
21
- const match = axeResult.helpUrl.match(
22
- /axe\/([1-9][0-9]*\.[1-9][0-9]*)\//
23
- );
24
- const version = (match && match[1]) || '';
25
- return {
26
- '@type': EarlType.Assertion,
27
- mode: 'earl:automatic',
28
- assertedBy: {
29
- '@id': `https://github.com/dequelabs/axe-core/releases/tag/${version}.0`,
30
- '@type': ['earl:Assertor', 'earl:Software', 'doap:Project'],
31
- 'doap:name': 'Axe',
32
- 'doap:vendor': {
33
- '@id': 'https://deque.com/',
34
- '@type': 'foaf:Organization',
35
- 'foaf:name': 'Deque Systems'
36
- }
37
- },
38
- test: {
39
- '@type': EarlType.TestCase,
40
- '@id': axeResult.helpUrl
41
- },
42
- result
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
- ({ node, result }): TestResult => {
23
- return {
24
- '@type': EarlType.TestResult,
25
- info: description,
26
- outcome: 'earl:' + result,
27
- pointer: cssToPointer(node.selector)
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
  }
package/src/types.ts CHANGED
@@ -12,12 +12,6 @@ export interface EarlResult {
12
12
  assertions: Assertion[];
13
13
  }
14
14
 
15
- type outcome =
16
- | 'earl:inapplicable'
17
- | 'earl:passed'
18
- | 'earl:incomplete'
19
- | 'earl:failed';
20
-
21
15
  export interface Assertion {
22
16
  '@type': EarlType.Assertion;
23
17
  mode: 'earl:automatic';