lighthouse 9.3.1-dev.20220131 → 9.3.1-dev.20220204
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/lighthouse-cli/test/smokehouse/core-tests.js +2 -0
- package/lighthouse-cli/test/smokehouse/readme.md +4 -0
- package/lighthouse-cli/test/smokehouse/report-assert.js +36 -0
- package/lighthouse-core/audits/seo/hreflang.js +2 -17
- package/lighthouse-core/fraggle-rock/gather/navigation-runner.js +4 -5
- package/lighthouse-core/fraggle-rock/gather/snapshot-runner.js +4 -5
- package/lighthouse-core/fraggle-rock/gather/timespan-runner.js +4 -5
- package/lighthouse-core/index.js +3 -3
- package/lighthouse-core/runner.js +79 -52
- package/package.json +1 -1
- package/readme.md +1 -1
- package/third-party/axe/LICENSE +362 -0
- package/third-party/axe/README.md +6 -0
- package/third-party/axe/valid-langs.js +110 -0
- package/third-party/snyk/snapshot.json +1 -0
- package/tsconfig.json +1 -0
- package/types/smokehouse.d.ts +3 -0
|
@@ -60,6 +60,7 @@ import seoPassing from './test-definitions/seo-passing.js';
|
|
|
60
60
|
import seoStatus403 from './test-definitions/seo-status-403.js';
|
|
61
61
|
import seoTapTargets from './test-definitions/seo-tap-targets.js';
|
|
62
62
|
import sourceMaps from './test-definitions/source-maps.js';
|
|
63
|
+
import timing from './test-definitions/timing.js';
|
|
63
64
|
|
|
64
65
|
/** @type {ReadonlyArray<Smokehouse.TestDfn>} */
|
|
65
66
|
const smokeTests = [
|
|
@@ -119,6 +120,7 @@ const smokeTests = [
|
|
|
119
120
|
seoStatus403,
|
|
120
121
|
seoTapTargets,
|
|
121
122
|
sourceMaps,
|
|
123
|
+
timing,
|
|
122
124
|
];
|
|
123
125
|
|
|
124
126
|
export default smokeTests;
|
|
@@ -64,11 +64,15 @@ Individual elements of an array can be asserted by using numeric properties in a
|
|
|
64
64
|
|
|
65
65
|
However, if an array literal is used as the expectation, an extra condition is enforced that the actual array _must_ have the same length as the provided expected array.
|
|
66
66
|
|
|
67
|
+
Arrays can be checked against a subset of elements using the special `_includes` property. The value of `_includes` _must_ be an array. Each assertion in `_includes` will remove the matching item from consideration for the rest.
|
|
68
|
+
|
|
67
69
|
**Examples**:
|
|
68
70
|
| Actual | Expected | Result |
|
|
69
71
|
| -- | -- | -- |
|
|
70
72
|
| `[{url: 'http://badssl.com'}, {url: 'http://example.com'}]` | `{1: {url: 'http://example.com'}}` | ✅ PASS |
|
|
71
73
|
| `[{timeInMs: 5}, {timeInMs: 15}]` | `{length: 2}` | ✅ PASS |
|
|
74
|
+
| `[{timeInMs: 5}, {timeInMs: 15}]` | `{_includes: [{timeInMs: 5}]}` | ✅ PASS |
|
|
75
|
+
| `[{timeInMs: 5}, {timeInMs: 15}]` | `{_includes: [{timeInMs: 5}, {timeInMs: 5}]}` | ❌ FAIL |
|
|
72
76
|
| `[{timeInMs: 5}, {timeInMs: 15}]` | `[{timeInMs: 5}]` | ❌ FAIL |
|
|
73
77
|
|
|
74
78
|
### Special environment checks
|
|
@@ -111,6 +111,35 @@ function findDifference(path, actual, expected) {
|
|
|
111
111
|
const keyPath = path + keyAccessor;
|
|
112
112
|
const expectedValue = expected[key];
|
|
113
113
|
|
|
114
|
+
if (key === '_includes') {
|
|
115
|
+
if (!Array.isArray(expectedValue)) throw new Error('Array subset must be array');
|
|
116
|
+
if (!Array.isArray(actual)) {
|
|
117
|
+
return {
|
|
118
|
+
path,
|
|
119
|
+
actual: 'Actual value is not an array',
|
|
120
|
+
expected,
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
const actualCopy = [...actual];
|
|
125
|
+
for (const expectedEntry of expectedValue) {
|
|
126
|
+
const matchingIndex =
|
|
127
|
+
actualCopy.findIndex(actualEntry => !findDifference(keyPath, actualEntry, expectedEntry));
|
|
128
|
+
if (matchingIndex !== -1) {
|
|
129
|
+
actualCopy.splice(matchingIndex, 1);
|
|
130
|
+
continue;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
return {
|
|
134
|
+
path,
|
|
135
|
+
actual: 'Item not found in array',
|
|
136
|
+
expected: expectedEntry,
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
continue;
|
|
141
|
+
}
|
|
142
|
+
|
|
114
143
|
const actualValue = actual[key];
|
|
115
144
|
const subDifference = findDifference(keyPath, actualValue, expectedValue);
|
|
116
145
|
|
|
@@ -305,6 +334,12 @@ function collateResults(localConsole, actual, expected) {
|
|
|
305
334
|
return makeComparison(auditName + ' audit', actualResult, expectedResult);
|
|
306
335
|
});
|
|
307
336
|
|
|
337
|
+
const timingAssertions = [];
|
|
338
|
+
if (expected.lhr.timing) {
|
|
339
|
+
const comparison = makeComparison('timing', actual.lhr.timing, expected.lhr.timing);
|
|
340
|
+
timingAssertions.push(comparison);
|
|
341
|
+
}
|
|
342
|
+
|
|
308
343
|
/** @type {Comparison[]} */
|
|
309
344
|
const requestCountAssertion = [];
|
|
310
345
|
if (expected.networkRequests) {
|
|
@@ -322,6 +357,7 @@ function collateResults(localConsole, actual, expected) {
|
|
|
322
357
|
...requestCountAssertion,
|
|
323
358
|
...artifactAssertions,
|
|
324
359
|
...auditAssertions,
|
|
360
|
+
...timingAssertions,
|
|
325
361
|
];
|
|
326
362
|
}
|
|
327
363
|
|
|
@@ -11,9 +11,8 @@
|
|
|
11
11
|
|
|
12
12
|
const Audit = require('../audit.js');
|
|
13
13
|
const i18n = require('../../lib/i18n/i18n.js');
|
|
14
|
-
const
|
|
14
|
+
const {isValidLang} = require('../../../third-party/axe/valid-langs.js');
|
|
15
15
|
|
|
16
|
-
const VALID_LANGS = importValidLangs();
|
|
17
16
|
const NO_LANGUAGE = 'x-default';
|
|
18
17
|
|
|
19
18
|
const UIStrings = {
|
|
@@ -33,20 +32,6 @@ const UIStrings = {
|
|
|
33
32
|
|
|
34
33
|
const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings);
|
|
35
34
|
|
|
36
|
-
/**
|
|
37
|
-
* Import list of valid languages from axe core.
|
|
38
|
-
* This is a huge array of language codes that can be stored more efficiently if we will need to
|
|
39
|
-
* shrink the bundle size.
|
|
40
|
-
* @return {Array<string>}
|
|
41
|
-
*/
|
|
42
|
-
function importValidLangs() {
|
|
43
|
-
// Define a window-ish object so axe will export to it.
|
|
44
|
-
const window = {getComputedStyle: () => {}};
|
|
45
|
-
eval(axeLibSource);
|
|
46
|
-
// @ts-expect-error
|
|
47
|
-
return window.axe.utils.validLangs();
|
|
48
|
-
}
|
|
49
|
-
|
|
50
35
|
/**
|
|
51
36
|
* @param {string} href
|
|
52
37
|
* @return {boolean}
|
|
@@ -66,7 +51,7 @@ function isExpectedLanguageCode(hreflang) {
|
|
|
66
51
|
|
|
67
52
|
// hreflang can consist of language-script-region, we are validating only language
|
|
68
53
|
const [lang] = hreflang.split('-');
|
|
69
|
-
return
|
|
54
|
+
return isValidLang(lang.toLowerCase());
|
|
70
55
|
}
|
|
71
56
|
|
|
72
57
|
class Hreflang extends Audit {
|
|
@@ -287,7 +287,8 @@ async function navigation(options) {
|
|
|
287
287
|
skipAboutBlank: configContext.skipAboutBlank,
|
|
288
288
|
};
|
|
289
289
|
|
|
290
|
-
|
|
290
|
+
const runnerOptions = {config, computedCache};
|
|
291
|
+
const artifacts = await Runner.gather(
|
|
291
292
|
async () => {
|
|
292
293
|
const driver = new Driver(page);
|
|
293
294
|
const requestedUrl = URL.normalizeUrl(url);
|
|
@@ -298,11 +299,9 @@ async function navigation(options) {
|
|
|
298
299
|
|
|
299
300
|
return finalizeArtifacts(baseArtifacts, artifacts);
|
|
300
301
|
},
|
|
301
|
-
|
|
302
|
-
config,
|
|
303
|
-
computedCache: new Map(),
|
|
304
|
-
}
|
|
302
|
+
runnerOptions
|
|
305
303
|
);
|
|
304
|
+
return Runner.audit(artifacts, runnerOptions);
|
|
306
305
|
}
|
|
307
306
|
|
|
308
307
|
module.exports = {
|
|
@@ -26,7 +26,8 @@ async function snapshot(options) {
|
|
|
26
26
|
const computedCache = new Map();
|
|
27
27
|
const url = await options.page.url();
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
const runnerOptions = {config, computedCache};
|
|
30
|
+
const artifacts = await Runner.gather(
|
|
30
31
|
async () => {
|
|
31
32
|
const baseArtifacts = await getBaseArtifacts(config, driver, {gatherMode: 'snapshot'});
|
|
32
33
|
baseArtifacts.URL.requestedUrl = url;
|
|
@@ -50,11 +51,9 @@ async function snapshot(options) {
|
|
|
50
51
|
const artifacts = await awaitArtifacts(artifactState);
|
|
51
52
|
return finalizeArtifacts(baseArtifacts, artifacts);
|
|
52
53
|
},
|
|
53
|
-
|
|
54
|
-
config,
|
|
55
|
-
computedCache,
|
|
56
|
-
}
|
|
54
|
+
runnerOptions
|
|
57
55
|
);
|
|
56
|
+
return Runner.audit(artifacts, runnerOptions);
|
|
58
57
|
}
|
|
59
58
|
|
|
60
59
|
module.exports = {
|
|
@@ -50,7 +50,8 @@ async function startTimespan(options) {
|
|
|
50
50
|
return {
|
|
51
51
|
async endTimespan() {
|
|
52
52
|
const finalUrl = await options.page.url();
|
|
53
|
-
|
|
53
|
+
const runnerOptions = {config, computedCache};
|
|
54
|
+
const artifacts = await Runner.gather(
|
|
54
55
|
async () => {
|
|
55
56
|
baseArtifacts.URL.requestedUrl = requestedUrl;
|
|
56
57
|
baseArtifacts.URL.finalUrl = finalUrl;
|
|
@@ -63,11 +64,9 @@ async function startTimespan(options) {
|
|
|
63
64
|
const artifacts = await awaitArtifacts(artifactState);
|
|
64
65
|
return finalizeArtifacts(baseArtifacts, artifacts);
|
|
65
66
|
},
|
|
66
|
-
|
|
67
|
-
config,
|
|
68
|
-
computedCache,
|
|
69
|
-
}
|
|
67
|
+
runnerOptions
|
|
70
68
|
);
|
|
69
|
+
return Runner.audit(artifacts, runnerOptions);
|
|
71
70
|
},
|
|
72
71
|
};
|
|
73
72
|
}
|
package/lighthouse-core/index.js
CHANGED
|
@@ -47,11 +47,11 @@ async function lighthouse(url, flags = {}, configJSON, userConnection) {
|
|
|
47
47
|
const connection = userConnection || new ChromeProtocol(flags.port, flags.hostname);
|
|
48
48
|
|
|
49
49
|
// kick off a lighthouse run
|
|
50
|
-
const
|
|
50
|
+
const artifacts = await Runner.gather(() => {
|
|
51
51
|
const requestedUrl = URL.normalizeUrl(url);
|
|
52
52
|
return Runner._gatherArtifactsFromBrowser(requestedUrl, options, connection);
|
|
53
|
-
};
|
|
54
|
-
return Runner.
|
|
53
|
+
}, options);
|
|
54
|
+
return Runner.audit(artifacts, options);
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
/**
|
|
@@ -28,14 +28,16 @@ const {version: lighthouseVersion} = require('../package.json');
|
|
|
28
28
|
class Runner {
|
|
29
29
|
/**
|
|
30
30
|
* @template {LH.Config.Config | LH.Config.FRConfig} TConfig
|
|
31
|
-
* @param {
|
|
32
|
-
* @param {{config: TConfig, computedCache: Map<string, ArbitraryEqualityMap
|
|
31
|
+
* @param {LH.Artifacts} artifacts
|
|
32
|
+
* @param {{config: TConfig, driverMock?: Driver, computedCache: Map<string, ArbitraryEqualityMap>}} options
|
|
33
33
|
* @return {Promise<LH.RunnerResult|undefined>}
|
|
34
34
|
*/
|
|
35
|
-
static async
|
|
36
|
-
const
|
|
35
|
+
static async audit(artifacts, options) {
|
|
36
|
+
const {config, computedCache} = options;
|
|
37
|
+
const settings = config.settings;
|
|
38
|
+
|
|
37
39
|
try {
|
|
38
|
-
const runnerStatus = {msg: '
|
|
40
|
+
const runnerStatus = {msg: 'Audit phase', id: 'lh:runner:audit'};
|
|
39
41
|
log.time(runnerStatus, 'verbose');
|
|
40
42
|
|
|
41
43
|
/**
|
|
@@ -44,24 +46,14 @@ class Runner {
|
|
|
44
46
|
*/
|
|
45
47
|
const lighthouseRunWarnings = [];
|
|
46
48
|
|
|
47
|
-
const sentryContext = Sentry.getContext();
|
|
48
|
-
Sentry.captureBreadcrumb({
|
|
49
|
-
message: 'Run started',
|
|
50
|
-
category: 'lifecycle',
|
|
51
|
-
data: sentryContext?.extra,
|
|
52
|
-
});
|
|
53
|
-
|
|
54
|
-
const artifacts = await this.gatherAndManageArtifacts(gatherFn, runOpts);
|
|
55
|
-
|
|
56
49
|
// Potentially quit early
|
|
57
50
|
if (settings.gatherMode && !settings.auditMode) return;
|
|
58
51
|
|
|
59
|
-
|
|
60
|
-
if (!runOpts.config.audits) {
|
|
52
|
+
if (!config.audits) {
|
|
61
53
|
throw new Error('No audits to evaluate.');
|
|
62
54
|
}
|
|
63
|
-
const auditResultsById = await Runner._runAudits(settings,
|
|
64
|
-
lighthouseRunWarnings,
|
|
55
|
+
const auditResultsById = await Runner._runAudits(settings, config.audits, artifacts,
|
|
56
|
+
lighthouseRunWarnings, computedCache);
|
|
65
57
|
|
|
66
58
|
// LHR construction phase
|
|
67
59
|
const resultsStatus = {msg: 'Generating results...', id: 'lh:runner:generate'};
|
|
@@ -82,8 +74,8 @@ class Runner {
|
|
|
82
74
|
|
|
83
75
|
/** @type {Record<string, LH.RawIcu<LH.Result.Category>>} */
|
|
84
76
|
let categories = {};
|
|
85
|
-
if (
|
|
86
|
-
categories = ReportScoring.scoreAllCategories(
|
|
77
|
+
if (config.categories) {
|
|
78
|
+
categories = ReportScoring.scoreAllCategories(config.categories, auditResultsById);
|
|
87
79
|
}
|
|
88
80
|
|
|
89
81
|
log.timeEnd(resultsStatus);
|
|
@@ -108,7 +100,7 @@ class Runner {
|
|
|
108
100
|
audits: auditResultsById,
|
|
109
101
|
configSettings: settings,
|
|
110
102
|
categories,
|
|
111
|
-
categoryGroups:
|
|
103
|
+
categoryGroups: config.groups || undefined,
|
|
112
104
|
stackPacks: stackPacks.getStackPacks(artifacts.Stacks),
|
|
113
105
|
timing: this._getTiming(artifacts),
|
|
114
106
|
i18n: {
|
|
@@ -134,12 +126,7 @@ class Runner {
|
|
|
134
126
|
|
|
135
127
|
return {lhr, artifacts, report};
|
|
136
128
|
} catch (err) {
|
|
137
|
-
|
|
138
|
-
if (err.friendlyMessage) {
|
|
139
|
-
err.friendlyMessage = format.getFormatted(err.friendlyMessage, settings.locale);
|
|
140
|
-
}
|
|
141
|
-
await Sentry.captureException(err, {level: 'fatal'});
|
|
142
|
-
throw err;
|
|
129
|
+
throw Runner.createRunnerError(err, settings);
|
|
143
130
|
}
|
|
144
131
|
}
|
|
145
132
|
|
|
@@ -150,38 +137,72 @@ class Runner {
|
|
|
150
137
|
*
|
|
151
138
|
* @template {LH.Config.Config | LH.Config.FRConfig} TConfig
|
|
152
139
|
* @param {(runnerData: {config: TConfig, driverMock?: Driver}) => Promise<LH.Artifacts>} gatherFn
|
|
153
|
-
* @param {{config: TConfig, driverMock?: Driver}} options
|
|
140
|
+
* @param {{config: TConfig, driverMock?: Driver, computedCache: Map<string, ArbitraryEqualityMap>}} options
|
|
154
141
|
* @return {Promise<LH.Artifacts>}
|
|
155
142
|
*/
|
|
156
|
-
static async
|
|
143
|
+
static async gather(gatherFn, options) {
|
|
157
144
|
const settings = options.config.settings;
|
|
158
145
|
|
|
159
|
-
// Gather phase
|
|
160
146
|
// Either load saved artifacts from disk or from the browser.
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
if (!requestedUrl) {
|
|
169
|
-
throw new Error('Cannot run audit mode on empty URL');
|
|
170
|
-
}
|
|
171
|
-
} else {
|
|
172
|
-
artifacts = await gatherFn({
|
|
173
|
-
config: options.config,
|
|
174
|
-
driverMock: options.driverMock,
|
|
147
|
+
try {
|
|
148
|
+
const sentryContext = Sentry.getContext();
|
|
149
|
+
Sentry.captureBreadcrumb({
|
|
150
|
+
message: 'Run started',
|
|
151
|
+
category: 'lifecycle',
|
|
152
|
+
data: sentryContext?.extra,
|
|
175
153
|
});
|
|
176
154
|
|
|
177
|
-
|
|
178
|
-
|
|
155
|
+
/** @type {LH.Artifacts} */
|
|
156
|
+
let artifacts;
|
|
157
|
+
if (settings.auditMode && !settings.gatherMode) {
|
|
158
|
+
// No browser required, just load the artifacts from disk.
|
|
179
159
|
const path = this._getDataSavePath(settings);
|
|
180
|
-
|
|
160
|
+
artifacts = assetSaver.loadArtifacts(path);
|
|
161
|
+
const requestedUrl = artifacts.URL.requestedUrl;
|
|
162
|
+
|
|
163
|
+
if (!requestedUrl) {
|
|
164
|
+
throw new Error('Cannot run audit mode on empty URL');
|
|
165
|
+
}
|
|
166
|
+
} else {
|
|
167
|
+
const runnerStatus = {msg: 'Gather phase', id: 'lh:runner:gather'};
|
|
168
|
+
log.time(runnerStatus, 'verbose');
|
|
169
|
+
|
|
170
|
+
artifacts = await gatherFn({
|
|
171
|
+
config: options.config,
|
|
172
|
+
driverMock: options.driverMock,
|
|
173
|
+
});
|
|
174
|
+
|
|
175
|
+
log.timeEnd(runnerStatus);
|
|
176
|
+
|
|
177
|
+
// If `gather` is run multiple times before `audit`, the timing entries for each `gather` can pollute one another.
|
|
178
|
+
// We need to clear the timing entries at the end of gathering.
|
|
179
|
+
// Set artifacts.Timing again to ensure lh:runner:gather is included.
|
|
180
|
+
artifacts.Timing = log.takeTimeEntries();
|
|
181
|
+
|
|
182
|
+
// -G means save these to disk (e.g. ./latest-run).
|
|
183
|
+
if (settings.gatherMode) {
|
|
184
|
+
const path = this._getDataSavePath(settings);
|
|
185
|
+
await assetSaver.saveArtifacts(artifacts, path);
|
|
186
|
+
}
|
|
181
187
|
}
|
|
188
|
+
|
|
189
|
+
return artifacts;
|
|
190
|
+
} catch (err) {
|
|
191
|
+
throw Runner.createRunnerError(err, settings);
|
|
182
192
|
}
|
|
193
|
+
}
|
|
183
194
|
|
|
184
|
-
|
|
195
|
+
/**
|
|
196
|
+
* @param {any} err
|
|
197
|
+
* @param {LH.Config.Settings} settings
|
|
198
|
+
*/
|
|
199
|
+
static createRunnerError(err, settings) {
|
|
200
|
+
// i18n LighthouseError strings.
|
|
201
|
+
if (err.friendlyMessage) {
|
|
202
|
+
err.friendlyMessage = format.getFormatted(err.friendlyMessage, settings.locale);
|
|
203
|
+
}
|
|
204
|
+
Sentry.captureException(err, {level: 'fatal'});
|
|
205
|
+
return err;
|
|
185
206
|
}
|
|
186
207
|
|
|
187
208
|
/**
|
|
@@ -197,8 +218,11 @@ class Runner {
|
|
|
197
218
|
const timingEntriesKeyValues = [
|
|
198
219
|
...timingEntriesFromArtifacts,
|
|
199
220
|
...timingEntriesFromRunner,
|
|
200
|
-
|
|
201
|
-
|
|
221
|
+
].map(entry => /** @type {[string, PerformanceEntry]} */ ([
|
|
222
|
+
// As entries can share a name and start time, dedupe based on the name, startTime and duration
|
|
223
|
+
`${entry.startTime}-${entry.name}-${entry.duration}`,
|
|
224
|
+
entry,
|
|
225
|
+
]));
|
|
202
226
|
const timingEntries = Array.from(new Map(timingEntriesKeyValues).values())
|
|
203
227
|
// Truncate timestamps to hundredths of a millisecond saves ~4KB. No need for microsecond
|
|
204
228
|
// resolution.
|
|
@@ -212,8 +236,11 @@ class Runner {
|
|
|
212
236
|
entryType: entry.entryType,
|
|
213
237
|
};
|
|
214
238
|
}).sort((a, b) => a.startTime - b.startTime);
|
|
215
|
-
const
|
|
216
|
-
|
|
239
|
+
const gatherEntry = timingEntries.find(e => e.name === 'lh:runner:gather');
|
|
240
|
+
const auditEntry = timingEntries.find(e => e.name === 'lh:runner:audit');
|
|
241
|
+
const gatherTiming = gatherEntry?.duration || 0;
|
|
242
|
+
const auditTiming = auditEntry?.duration || 0;
|
|
243
|
+
return {entries: timingEntries, total: gatherTiming + auditTiming};
|
|
217
244
|
}
|
|
218
245
|
|
|
219
246
|
/**
|
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -313,7 +313,7 @@ yarn type-check
|
|
|
313
313
|
|
|
314
314
|
### Docs
|
|
315
315
|
|
|
316
|
-
Some of our docs have tests that run only in CI by default. If you end up needing to modify our documentation, you'll need to run `yarn test-docs` locally to make sure they pass.
|
|
316
|
+
Some of our docs have tests that run only in CI by default. If you end up needing to modify our documentation, you'll need to run `yarn build-pack && yarn test-docs` locally to make sure they pass.
|
|
317
317
|
|
|
318
318
|
**Additional Dependencies**
|
|
319
319
|
- `brew install jq`
|
|
@@ -0,0 +1,362 @@
|
|
|
1
|
+
Mozilla Public License, version 2.0
|
|
2
|
+
|
|
3
|
+
1. Definitions
|
|
4
|
+
|
|
5
|
+
1.1. "Contributor"
|
|
6
|
+
|
|
7
|
+
means each individual or legal entity that creates, contributes to the
|
|
8
|
+
creation of, or owns Covered Software.
|
|
9
|
+
|
|
10
|
+
1.2. "Contributor Version"
|
|
11
|
+
|
|
12
|
+
means the combination of the Contributions of others (if any) used by a
|
|
13
|
+
Contributor and that particular Contributor's Contribution.
|
|
14
|
+
|
|
15
|
+
1.3. "Contribution"
|
|
16
|
+
|
|
17
|
+
means Covered Software of a particular Contributor.
|
|
18
|
+
|
|
19
|
+
1.4. "Covered Software"
|
|
20
|
+
|
|
21
|
+
means Source Code Form to which the initial Contributor has attached the
|
|
22
|
+
notice in Exhibit A, the Executable Form of such Source Code Form, and
|
|
23
|
+
Modifications of such Source Code Form, in each case including portions
|
|
24
|
+
thereof.
|
|
25
|
+
|
|
26
|
+
1.5. "Incompatible With Secondary Licenses"
|
|
27
|
+
means
|
|
28
|
+
|
|
29
|
+
a. that the initial Contributor has attached the notice described in
|
|
30
|
+
Exhibit B to the Covered Software; or
|
|
31
|
+
|
|
32
|
+
b. that the Covered Software was made available under the terms of
|
|
33
|
+
version 1.1 or earlier of the License, but not also under the terms of
|
|
34
|
+
a Secondary License.
|
|
35
|
+
|
|
36
|
+
1.6. "Executable Form"
|
|
37
|
+
|
|
38
|
+
means any form of the work other than Source Code Form.
|
|
39
|
+
|
|
40
|
+
1.7. "Larger Work"
|
|
41
|
+
|
|
42
|
+
means a work that combines Covered Software with other material, in a
|
|
43
|
+
separate file or files, that is not Covered Software.
|
|
44
|
+
|
|
45
|
+
1.8. "License"
|
|
46
|
+
|
|
47
|
+
means this document.
|
|
48
|
+
|
|
49
|
+
1.9. "Licensable"
|
|
50
|
+
|
|
51
|
+
means having the right to grant, to the maximum extent possible, whether
|
|
52
|
+
at the time of the initial grant or subsequently, any and all of the
|
|
53
|
+
rights conveyed by this License.
|
|
54
|
+
|
|
55
|
+
1.10. "Modifications"
|
|
56
|
+
|
|
57
|
+
means any of the following:
|
|
58
|
+
|
|
59
|
+
a. any file in Source Code Form that results from an addition to,
|
|
60
|
+
deletion from, or modification of the contents of Covered Software; or
|
|
61
|
+
|
|
62
|
+
b. any new file in Source Code Form that contains any Covered Software.
|
|
63
|
+
|
|
64
|
+
1.11. "Patent Claims" of a Contributor
|
|
65
|
+
|
|
66
|
+
means any patent claim(s), including without limitation, method,
|
|
67
|
+
process, and apparatus claims, in any patent Licensable by such
|
|
68
|
+
Contributor that would be infringed, but for the grant of the License,
|
|
69
|
+
by the making, using, selling, offering for sale, having made, import,
|
|
70
|
+
or transfer of either its Contributions or its Contributor Version.
|
|
71
|
+
|
|
72
|
+
1.12. "Secondary License"
|
|
73
|
+
|
|
74
|
+
means either the GNU General Public License, Version 2.0, the GNU Lesser
|
|
75
|
+
General Public License, Version 2.1, the GNU Affero General Public
|
|
76
|
+
License, Version 3.0, or any later versions of those licenses.
|
|
77
|
+
|
|
78
|
+
1.13. "Source Code Form"
|
|
79
|
+
|
|
80
|
+
means the form of the work preferred for making modifications.
|
|
81
|
+
|
|
82
|
+
1.14. "You" (or "Your")
|
|
83
|
+
|
|
84
|
+
means an individual or a legal entity exercising rights under this
|
|
85
|
+
License. For legal entities, "You" includes any entity that controls, is
|
|
86
|
+
controlled by, or is under common control with You. For purposes of this
|
|
87
|
+
definition, "control" means (a) the power, direct or indirect, to cause
|
|
88
|
+
the direction or management of such entity, whether by contract or
|
|
89
|
+
otherwise, or (b) ownership of more than fifty percent (50%) of the
|
|
90
|
+
outstanding shares or beneficial ownership of such entity.
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
2. License Grants and Conditions
|
|
94
|
+
|
|
95
|
+
2.1. Grants
|
|
96
|
+
|
|
97
|
+
Each Contributor hereby grants You a world-wide, royalty-free,
|
|
98
|
+
non-exclusive license:
|
|
99
|
+
|
|
100
|
+
a. under intellectual property rights (other than patent or trademark)
|
|
101
|
+
Licensable by such Contributor to use, reproduce, make available,
|
|
102
|
+
modify, display, perform, distribute, and otherwise exploit its
|
|
103
|
+
Contributions, either on an unmodified basis, with Modifications, or
|
|
104
|
+
as part of a Larger Work; and
|
|
105
|
+
|
|
106
|
+
b. under Patent Claims of such Contributor to make, use, sell, offer for
|
|
107
|
+
sale, have made, import, and otherwise transfer either its
|
|
108
|
+
Contributions or its Contributor Version.
|
|
109
|
+
|
|
110
|
+
2.2. Effective Date
|
|
111
|
+
|
|
112
|
+
The licenses granted in Section 2.1 with respect to any Contribution
|
|
113
|
+
become effective for each Contribution on the date the Contributor first
|
|
114
|
+
distributes such Contribution.
|
|
115
|
+
|
|
116
|
+
2.3. Limitations on Grant Scope
|
|
117
|
+
|
|
118
|
+
The licenses granted in this Section 2 are the only rights granted under
|
|
119
|
+
this License. No additional rights or licenses will be implied from the
|
|
120
|
+
distribution or licensing of Covered Software under this License.
|
|
121
|
+
Notwithstanding Section 2.1(b) above, no patent license is granted by a
|
|
122
|
+
Contributor:
|
|
123
|
+
|
|
124
|
+
a. for any code that a Contributor has removed from Covered Software; or
|
|
125
|
+
|
|
126
|
+
b. for infringements caused by: (i) Your and any other third party's
|
|
127
|
+
modifications of Covered Software, or (ii) the combination of its
|
|
128
|
+
Contributions with other software (except as part of its Contributor
|
|
129
|
+
Version); or
|
|
130
|
+
|
|
131
|
+
c. under Patent Claims infringed by Covered Software in the absence of
|
|
132
|
+
its Contributions.
|
|
133
|
+
|
|
134
|
+
This License does not grant any rights in the trademarks, service marks,
|
|
135
|
+
or logos of any Contributor (except as may be necessary to comply with
|
|
136
|
+
the notice requirements in Section 3.4).
|
|
137
|
+
|
|
138
|
+
2.4. Subsequent Licenses
|
|
139
|
+
|
|
140
|
+
No Contributor makes additional grants as a result of Your choice to
|
|
141
|
+
distribute the Covered Software under a subsequent version of this
|
|
142
|
+
License (see Section 10.2) or under the terms of a Secondary License (if
|
|
143
|
+
permitted under the terms of Section 3.3).
|
|
144
|
+
|
|
145
|
+
2.5. Representation
|
|
146
|
+
|
|
147
|
+
Each Contributor represents that the Contributor believes its
|
|
148
|
+
Contributions are its original creation(s) or it has sufficient rights to
|
|
149
|
+
grant the rights to its Contributions conveyed by this License.
|
|
150
|
+
|
|
151
|
+
2.6. Fair Use
|
|
152
|
+
|
|
153
|
+
This License is not intended to limit any rights You have under
|
|
154
|
+
applicable copyright doctrines of fair use, fair dealing, or other
|
|
155
|
+
equivalents.
|
|
156
|
+
|
|
157
|
+
2.7. Conditions
|
|
158
|
+
|
|
159
|
+
Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in
|
|
160
|
+
Section 2.1.
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
3. Responsibilities
|
|
164
|
+
|
|
165
|
+
3.1. Distribution of Source Form
|
|
166
|
+
|
|
167
|
+
All distribution of Covered Software in Source Code Form, including any
|
|
168
|
+
Modifications that You create or to which You contribute, must be under
|
|
169
|
+
the terms of this License. You must inform recipients that the Source
|
|
170
|
+
Code Form of the Covered Software is governed by the terms of this
|
|
171
|
+
License, and how they can obtain a copy of this License. You may not
|
|
172
|
+
attempt to alter or restrict the recipients' rights in the Source Code
|
|
173
|
+
Form.
|
|
174
|
+
|
|
175
|
+
3.2. Distribution of Executable Form
|
|
176
|
+
|
|
177
|
+
If You distribute Covered Software in Executable Form then:
|
|
178
|
+
|
|
179
|
+
a. such Covered Software must also be made available in Source Code Form,
|
|
180
|
+
as described in Section 3.1, and You must inform recipients of the
|
|
181
|
+
Executable Form how they can obtain a copy of such Source Code Form by
|
|
182
|
+
reasonable means in a timely manner, at a charge no more than the cost
|
|
183
|
+
of distribution to the recipient; and
|
|
184
|
+
|
|
185
|
+
b. You may distribute such Executable Form under the terms of this
|
|
186
|
+
License, or sublicense it under different terms, provided that the
|
|
187
|
+
license for the Executable Form does not attempt to limit or alter the
|
|
188
|
+
recipients' rights in the Source Code Form under this License.
|
|
189
|
+
|
|
190
|
+
3.3. Distribution of a Larger Work
|
|
191
|
+
|
|
192
|
+
You may create and distribute a Larger Work under terms of Your choice,
|
|
193
|
+
provided that You also comply with the requirements of this License for
|
|
194
|
+
the Covered Software. If the Larger Work is a combination of Covered
|
|
195
|
+
Software with a work governed by one or more Secondary Licenses, and the
|
|
196
|
+
Covered Software is not Incompatible With Secondary Licenses, this
|
|
197
|
+
License permits You to additionally distribute such Covered Software
|
|
198
|
+
under the terms of such Secondary License(s), so that the recipient of
|
|
199
|
+
the Larger Work may, at their option, further distribute the Covered
|
|
200
|
+
Software under the terms of either this License or such Secondary
|
|
201
|
+
License(s).
|
|
202
|
+
|
|
203
|
+
3.4. Notices
|
|
204
|
+
|
|
205
|
+
You may not remove or alter the substance of any license notices
|
|
206
|
+
(including copyright notices, patent notices, disclaimers of warranty, or
|
|
207
|
+
limitations of liability) contained within the Source Code Form of the
|
|
208
|
+
Covered Software, except that You may alter any license notices to the
|
|
209
|
+
extent required to remedy known factual inaccuracies.
|
|
210
|
+
|
|
211
|
+
3.5. Application of Additional Terms
|
|
212
|
+
|
|
213
|
+
You may choose to offer, and to charge a fee for, warranty, support,
|
|
214
|
+
indemnity or liability obligations to one or more recipients of Covered
|
|
215
|
+
Software. However, You may do so only on Your own behalf, and not on
|
|
216
|
+
behalf of any Contributor. You must make it absolutely clear that any
|
|
217
|
+
such warranty, support, indemnity, or liability obligation is offered by
|
|
218
|
+
You alone, and You hereby agree to indemnify every Contributor for any
|
|
219
|
+
liability incurred by such Contributor as a result of warranty, support,
|
|
220
|
+
indemnity or liability terms You offer. You may include additional
|
|
221
|
+
disclaimers of warranty and limitations of liability specific to any
|
|
222
|
+
jurisdiction.
|
|
223
|
+
|
|
224
|
+
4. Inability to Comply Due to Statute or Regulation
|
|
225
|
+
|
|
226
|
+
If it is impossible for You to comply with any of the terms of this License
|
|
227
|
+
with respect to some or all of the Covered Software due to statute,
|
|
228
|
+
judicial order, or regulation then You must: (a) comply with the terms of
|
|
229
|
+
this License to the maximum extent possible; and (b) describe the
|
|
230
|
+
limitations and the code they affect. Such description must be placed in a
|
|
231
|
+
text file included with all distributions of the Covered Software under
|
|
232
|
+
this License. Except to the extent prohibited by statute or regulation,
|
|
233
|
+
such description must be sufficiently detailed for a recipient of ordinary
|
|
234
|
+
skill to be able to understand it.
|
|
235
|
+
|
|
236
|
+
5. Termination
|
|
237
|
+
|
|
238
|
+
5.1. The rights granted under this License will terminate automatically if You
|
|
239
|
+
fail to comply with any of its terms. However, if You become compliant,
|
|
240
|
+
then the rights granted under this License from a particular Contributor
|
|
241
|
+
are reinstated (a) provisionally, unless and until such Contributor
|
|
242
|
+
explicitly and finally terminates Your grants, and (b) on an ongoing
|
|
243
|
+
basis, if such Contributor fails to notify You of the non-compliance by
|
|
244
|
+
some reasonable means prior to 60 days after You have come back into
|
|
245
|
+
compliance. Moreover, Your grants from a particular Contributor are
|
|
246
|
+
reinstated on an ongoing basis if such Contributor notifies You of the
|
|
247
|
+
non-compliance by some reasonable means, this is the first time You have
|
|
248
|
+
received notice of non-compliance with this License from such
|
|
249
|
+
Contributor, and You become compliant prior to 30 days after Your receipt
|
|
250
|
+
of the notice.
|
|
251
|
+
|
|
252
|
+
5.2. If You initiate litigation against any entity by asserting a patent
|
|
253
|
+
infringement claim (excluding declaratory judgment actions,
|
|
254
|
+
counter-claims, and cross-claims) alleging that a Contributor Version
|
|
255
|
+
directly or indirectly infringes any patent, then the rights granted to
|
|
256
|
+
You by any and all Contributors for the Covered Software under Section
|
|
257
|
+
2.1 of this License shall terminate.
|
|
258
|
+
|
|
259
|
+
5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user
|
|
260
|
+
license agreements (excluding distributors and resellers) which have been
|
|
261
|
+
validly granted by You or Your distributors under this License prior to
|
|
262
|
+
termination shall survive termination.
|
|
263
|
+
|
|
264
|
+
6. Disclaimer of Warranty
|
|
265
|
+
|
|
266
|
+
Covered Software is provided under this License on an "as is" basis,
|
|
267
|
+
without warranty of any kind, either expressed, implied, or statutory,
|
|
268
|
+
including, without limitation, warranties that the Covered Software is free
|
|
269
|
+
of defects, merchantable, fit for a particular purpose or non-infringing.
|
|
270
|
+
The entire risk as to the quality and performance of the Covered Software
|
|
271
|
+
is with You. Should any Covered Software prove defective in any respect,
|
|
272
|
+
You (not any Contributor) assume the cost of any necessary servicing,
|
|
273
|
+
repair, or correction. This disclaimer of warranty constitutes an essential
|
|
274
|
+
part of this License. No use of any Covered Software is authorized under
|
|
275
|
+
this License except under this disclaimer.
|
|
276
|
+
|
|
277
|
+
7. Limitation of Liability
|
|
278
|
+
|
|
279
|
+
Under no circumstances and under no legal theory, whether tort (including
|
|
280
|
+
negligence), contract, or otherwise, shall any Contributor, or anyone who
|
|
281
|
+
distributes Covered Software as permitted above, be liable to You for any
|
|
282
|
+
direct, indirect, special, incidental, or consequential damages of any
|
|
283
|
+
character including, without limitation, damages for lost profits, loss of
|
|
284
|
+
goodwill, work stoppage, computer failure or malfunction, or any and all
|
|
285
|
+
other commercial damages or losses, even if such party shall have been
|
|
286
|
+
informed of the possibility of such damages. This limitation of liability
|
|
287
|
+
shall not apply to liability for death or personal injury resulting from
|
|
288
|
+
such party's negligence to the extent applicable law prohibits such
|
|
289
|
+
limitation. Some jurisdictions do not allow the exclusion or limitation of
|
|
290
|
+
incidental or consequential damages, so this exclusion and limitation may
|
|
291
|
+
not apply to You.
|
|
292
|
+
|
|
293
|
+
8. Litigation
|
|
294
|
+
|
|
295
|
+
Any litigation relating to this License may be brought only in the courts
|
|
296
|
+
of a jurisdiction where the defendant maintains its principal place of
|
|
297
|
+
business and such litigation shall be governed by laws of that
|
|
298
|
+
jurisdiction, without reference to its conflict-of-law provisions. Nothing
|
|
299
|
+
in this Section shall prevent a party's ability to bring cross-claims or
|
|
300
|
+
counter-claims.
|
|
301
|
+
|
|
302
|
+
9. Miscellaneous
|
|
303
|
+
|
|
304
|
+
This License represents the complete agreement concerning the subject
|
|
305
|
+
matter hereof. If any provision of this License is held to be
|
|
306
|
+
unenforceable, such provision shall be reformed only to the extent
|
|
307
|
+
necessary to make it enforceable. Any law or regulation which provides that
|
|
308
|
+
the language of a contract shall be construed against the drafter shall not
|
|
309
|
+
be used to construe this License against a Contributor.
|
|
310
|
+
|
|
311
|
+
|
|
312
|
+
10. Versions of the License
|
|
313
|
+
|
|
314
|
+
10.1. New Versions
|
|
315
|
+
|
|
316
|
+
Mozilla Foundation is the license steward. Except as provided in Section
|
|
317
|
+
10.3, no one other than the license steward has the right to modify or
|
|
318
|
+
publish new versions of this License. Each version will be given a
|
|
319
|
+
distinguishing version number.
|
|
320
|
+
|
|
321
|
+
10.2. Effect of New Versions
|
|
322
|
+
|
|
323
|
+
You may distribute the Covered Software under the terms of the version
|
|
324
|
+
of the License under which You originally received the Covered Software,
|
|
325
|
+
or under the terms of any subsequent version published by the license
|
|
326
|
+
steward.
|
|
327
|
+
|
|
328
|
+
10.3. Modified Versions
|
|
329
|
+
|
|
330
|
+
If you create software not governed by this License, and you want to
|
|
331
|
+
create a new license for such software, you may create and use a
|
|
332
|
+
modified version of this License if you rename the license and remove
|
|
333
|
+
any references to the name of the license steward (except to note that
|
|
334
|
+
such modified license differs from this License).
|
|
335
|
+
|
|
336
|
+
10.4. Distributing Source Code Form that is Incompatible With Secondary
|
|
337
|
+
Licenses If You choose to distribute Source Code Form that is
|
|
338
|
+
Incompatible With Secondary Licenses under the terms of this version of
|
|
339
|
+
the License, the notice described in Exhibit B of this License must be
|
|
340
|
+
attached.
|
|
341
|
+
|
|
342
|
+
Exhibit A - Source Code Form License Notice
|
|
343
|
+
|
|
344
|
+
This Source Code Form is subject to the
|
|
345
|
+
terms of the Mozilla Public License, v.
|
|
346
|
+
2.0. If a copy of the MPL was not
|
|
347
|
+
distributed with this file, You can
|
|
348
|
+
obtain one at
|
|
349
|
+
http://mozilla.org/MPL/2.0/.
|
|
350
|
+
|
|
351
|
+
If it is not possible or desirable to put the notice in a particular file,
|
|
352
|
+
then You may include the notice in a location (such as a LICENSE file in a
|
|
353
|
+
relevant directory) where a recipient would be likely to look for such a
|
|
354
|
+
notice.
|
|
355
|
+
|
|
356
|
+
You may add additional accurate notices of copyright ownership.
|
|
357
|
+
|
|
358
|
+
Exhibit B - "Incompatible With Secondary Licenses" Notice
|
|
359
|
+
|
|
360
|
+
This Source Code Form is "Incompatible
|
|
361
|
+
With Secondary Licenses", as defined by
|
|
362
|
+
the Mozilla Public License, v. 2.0.
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
// Copied from https://github.com/dequelabs/axe-core/blob/develop/lib/core/utils/valid-langs.js
|
|
3
|
+
// Modifications:
|
|
4
|
+
// - ESM to commonjs
|
|
5
|
+
|
|
6
|
+
/*
|
|
7
|
+
In order to reduce the file size of axe-core, this file was specially encoded. Normally, an array of strings of each valid ISO 639-1/2 code is 20kb gzipped. Encoding the codes is only 2kb gzipped.
|
|
8
|
+
|
|
9
|
+
The encoding is a trie data structure. Normally storing a trie as a true binary tree would take up more space than just an array of strings. However, there is a technique to store large amounts of data as a nested array of integers (borrowed from the Js13kGames game jam - https://keithclark.github.io/ZzFXM/) that gzipps extremely well.
|
|
10
|
+
|
|
11
|
+
The encoding was generated by storing the trie of strings as a sequence of nested arrays, where each index represents the letter (a = 1, b = 2, etc.). For example, 'aaa' is stored as `[,[,[,1]]`. We can also use the 0 index to know if `aa` is valid by padding the end of the string with '`' (which gives 0 index as `'`'.charCodeAt(0) - 96` = 0). For example, both `aaa` and `aa` are stored as `[,[,[1,1]]]` (where `a` is not a valid lang).
|
|
12
|
+
|
|
13
|
+
If we need to edit the list of langs, use the code below on the page https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry:
|
|
14
|
+
|
|
15
|
+
const str = document.querySelector('pre').innerHTML;
|
|
16
|
+
const langs = new Set();
|
|
17
|
+
const encodedLangs = [];
|
|
18
|
+
|
|
19
|
+
str.split('%%').forEach(language => {
|
|
20
|
+
const properties = language.split('\n');
|
|
21
|
+
for (let i = 0; i < properties.length; i++) {
|
|
22
|
+
const property = properties[i];
|
|
23
|
+
const match = property.match(/(?<type>\w+): (?<value>\w+)/);
|
|
24
|
+
if (!match) continue;
|
|
25
|
+
|
|
26
|
+
const { type, value } = match.groups;
|
|
27
|
+
if (type === 'Type' && value !== 'language') return;
|
|
28
|
+
if (type === 'Subtag') {
|
|
29
|
+
langs.add(value);
|
|
30
|
+
}
|
|
31
|
+
if (type === 'Deprecated') {
|
|
32
|
+
langs.delete(value);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
Array.from(langs).forEach(lang => {
|
|
38
|
+
lang = lang.padEnd(3, '`');
|
|
39
|
+
let array = encodedLangs;
|
|
40
|
+
lang.split('').forEach((char, i) => {
|
|
41
|
+
// index is 1 indexed
|
|
42
|
+
const index = char.charCodeAt(0) - 96;
|
|
43
|
+
|
|
44
|
+
if (i < lang.length - 1) {
|
|
45
|
+
array[index] = array[index] || [];
|
|
46
|
+
array = array[index];
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
array[index] = 1
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
JSON.stringify(encodedLangs).replace(/null/g, '');
|
|
55
|
+
*/
|
|
56
|
+
|
|
57
|
+
// prettier-ignore
|
|
58
|
+
/* eslint-disable-next-line */
|
|
59
|
+
const langs = [,[,[1,1,1,1,1,1,1,1,1,1,,1,1,1,1,1,1,1,,1,1,1,1,1,1,,1],[1,1,1,1,1,1,1,1,1,1,1,,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[,1,1,,1,1,1,,1,1,,1,1,1,1,,1,1,1,1,1,1,1,1,1,1,1],[,1,1,,1,1,1,1,1,1,1,,1,,1,1,1,1,1,1,1,1,,1,1,1,1],[1,1,1,1,1,1,,,,,,1,1,1,1,,,1,1,1,,1,,1,,1,1],[1,1,1,,1,1,,1,1,1,,1,,,1,1,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,1,,,,,1,1,,,,,,,,,,,1],,[,1],[,,,,,,,,,,,,,,,,,,,,,,,,1],[,,1,,,,,1,,,1,,,,1,,1],[,1,,,,,,,,,1]]];
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Determine if a string is a valid language code
|
|
63
|
+
* @method isValidLang
|
|
64
|
+
* @memberof axe.utils
|
|
65
|
+
* @param {String} lang String to test if a valid language code
|
|
66
|
+
* @returns {Boolean}
|
|
67
|
+
*/
|
|
68
|
+
function isValidLang(lang) {
|
|
69
|
+
let array = langs;
|
|
70
|
+
|
|
71
|
+
// padEnd is not supported in IE11
|
|
72
|
+
while (lang.length < 3) {
|
|
73
|
+
lang += '`';
|
|
74
|
+
}
|
|
75
|
+
for (let i = 0; i <= lang.length - 1; i++) {
|
|
76
|
+
const index = lang.charCodeAt(i) - 96;
|
|
77
|
+
array = array[index];
|
|
78
|
+
if (!array) {
|
|
79
|
+
return false;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
return true;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Returns array of valid language codes
|
|
88
|
+
* @deprecated
|
|
89
|
+
* @method validLangs
|
|
90
|
+
* @memberof axe.utils
|
|
91
|
+
* @return {Array<string>} Valid language codes
|
|
92
|
+
*/
|
|
93
|
+
function validLangs(langArray) {
|
|
94
|
+
// account for our external API tests passing non-array things
|
|
95
|
+
langArray = Array.isArray(langArray) ? langArray : langs;
|
|
96
|
+
|
|
97
|
+
let codes = [];
|
|
98
|
+
langArray.forEach((lang, index) => {
|
|
99
|
+
const char = String.fromCharCode(index + 96).replace('`', '');
|
|
100
|
+
if (Array.isArray(lang)) {
|
|
101
|
+
codes = codes.concat(validLangs(lang).map(newLang => char + newLang));
|
|
102
|
+
} else {
|
|
103
|
+
codes.push(char);
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
return codes;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
module.exports = {isValidLang};
|
|
@@ -133,6 +133,7 @@
|
|
|
133
133
|
{"id":"npm:mustache:20110814","severity":"medium","semver":{"vulnerable":["< 0.3.1"]}}
|
|
134
134
|
],
|
|
135
135
|
"next":[
|
|
136
|
+
{"id":"SNYK-JS-NEXT-2388583","severity":"medium","semver":{"vulnerable":[">=12.0.0 <12.0.9"]}},
|
|
136
137
|
{"id":"SNYK-JS-NEXT-2312745","severity":"high","semver":{"vulnerable":[">=12.0.0 <12.0.5",">=11.1.0 <11.1.3"]}},
|
|
137
138
|
{"id":"SNYK-JS-NEXT-1577139","severity":"medium","semver":{"vulnerable":[">=10.0.0 <11.1.1"]}},
|
|
138
139
|
{"id":"SNYK-JS-NEXT-1540422","severity":"medium","semver":{"vulnerable":["<11.1.0"]}},
|
package/tsconfig.json
CHANGED