lighthouse 13.4.1-dev.20260902 → 13.4.1-dev.20260910
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/core/audits/deprecations.js +1 -2
- package/core/runner.js +21 -0
- package/package.json +1 -1
|
@@ -81,8 +81,7 @@ class Deprecations extends Audit {
|
|
|
81
81
|
/** @type {LH.Audit.Details.TableItem} */
|
|
82
82
|
const item = {
|
|
83
83
|
value: deprecationMeta.message || legacyMessage || deprecation.type,
|
|
84
|
-
|
|
85
|
-
source: Audit.makeSourceLocation(url, lineNumber, columnNumber - 1, bundle),
|
|
84
|
+
source: Audit.makeSourceLocation(url, lineNumber, columnNumber, bundle),
|
|
86
85
|
subItems,
|
|
87
86
|
};
|
|
88
87
|
return item;
|
package/core/runner.js
CHANGED
|
@@ -70,10 +70,31 @@ class Runner {
|
|
|
70
70
|
// Use version from gathering stage.
|
|
71
71
|
// If accessibility gatherer didn't run or errored, it won't be in credits.
|
|
72
72
|
const axeVersion = artifacts.Accessibility?.version;
|
|
73
|
+
/** @type {Record<string, string|undefined>} */
|
|
73
74
|
const credits = {
|
|
74
75
|
'axe-core': axeVersion,
|
|
75
76
|
};
|
|
76
77
|
|
|
78
|
+
// Add plugins to the credits.
|
|
79
|
+
//
|
|
80
|
+
// This won't work in bundled environments, but we currently don't ship plugins
|
|
81
|
+
// in DevTools or PSI. So until we do, don't bother figuring out how to support
|
|
82
|
+
// bundled code.
|
|
83
|
+
if (resolvedConfig.categories) {
|
|
84
|
+
for (const categoryId of Object.keys(resolvedConfig.categories)) {
|
|
85
|
+
const isPlugin = categoryId.startsWith('lighthouse-plugin-') ||
|
|
86
|
+
categoryId.startsWith('@') && categoryId.includes('/lighthouse-plugin-');
|
|
87
|
+
if (!isPlugin) continue;
|
|
88
|
+
|
|
89
|
+
try {
|
|
90
|
+
const require = (await import('module')).createRequire(import.meta.url);
|
|
91
|
+
credits[categoryId] = require(`${categoryId}/package.json`).version;
|
|
92
|
+
} catch {
|
|
93
|
+
// Ignore if we can't find it.
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
77
98
|
/** @type {Record<string, LH.RawIcu<LH.Result.Category>>} */
|
|
78
99
|
let categories = {};
|
|
79
100
|
if (resolvedConfig.categories) {
|
package/package.json
CHANGED