@code-pushup/lighthouse-plugin 0.54.0 → 0.55.0
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/index.js +9 -15
- package/package.json +3 -3
package/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// packages/plugin-lighthouse/package.json
|
|
2
2
|
var name = "@code-pushup/lighthouse-plugin";
|
|
3
|
-
var version = "0.
|
|
3
|
+
var version = "0.55.0";
|
|
4
4
|
|
|
5
5
|
// packages/plugin-lighthouse/src/lib/constants.ts
|
|
6
6
|
import { DEFAULT_FLAGS } from "chrome-launcher/dist/flags.js";
|
|
@@ -37,7 +37,7 @@ function exists(value) {
|
|
|
37
37
|
return value != null;
|
|
38
38
|
}
|
|
39
39
|
function getMissingRefsForCategories(categories2, plugins) {
|
|
40
|
-
if (categories2.length === 0) {
|
|
40
|
+
if (!categories2 || categories2.length === 0) {
|
|
41
41
|
return false;
|
|
42
42
|
}
|
|
43
43
|
const auditRefsFromCategory = categories2.flatMap(
|
|
@@ -536,12 +536,9 @@ var unrefinedCoreConfigSchema = z14.object({
|
|
|
536
536
|
var coreConfigSchema = refineCoreConfig(unrefinedCoreConfigSchema);
|
|
537
537
|
function refineCoreConfig(schema) {
|
|
538
538
|
return schema.refine(
|
|
539
|
-
(
|
|
540
|
-
(
|
|
541
|
-
message: missingRefsForCategoriesErrorMsg(
|
|
542
|
-
coreCfg.categories ?? [],
|
|
543
|
-
coreCfg.plugins
|
|
544
|
-
)
|
|
539
|
+
({ categories: categories2, plugins }) => !getMissingRefsForCategories(categories2, plugins),
|
|
540
|
+
({ categories: categories2, plugins }) => ({
|
|
541
|
+
message: missingRefsForCategoriesErrorMsg(categories2, plugins)
|
|
545
542
|
})
|
|
546
543
|
);
|
|
547
544
|
}
|
|
@@ -596,19 +593,16 @@ var reportSchema = packageVersionSchema({
|
|
|
596
593
|
).merge(
|
|
597
594
|
z15.object(
|
|
598
595
|
{
|
|
599
|
-
categories: z15.array(categoryConfigSchema),
|
|
600
596
|
plugins: z15.array(pluginReportSchema).min(1),
|
|
597
|
+
categories: z15.array(categoryConfigSchema).optional(),
|
|
601
598
|
commit: commitSchema.describe("Git commit for which report was collected").nullable()
|
|
602
599
|
},
|
|
603
600
|
{ description: "Collect output data" }
|
|
604
601
|
)
|
|
605
602
|
).refine(
|
|
606
|
-
(
|
|
607
|
-
(
|
|
608
|
-
message: missingRefsForCategoriesErrorMsg(
|
|
609
|
-
report.categories,
|
|
610
|
-
report.plugins
|
|
611
|
-
)
|
|
603
|
+
({ categories: categories2, plugins }) => !getMissingRefsForCategories(categories2, plugins),
|
|
604
|
+
({ categories: categories2, plugins }) => ({
|
|
605
|
+
message: missingRefsForCategoriesErrorMsg(categories2, plugins)
|
|
612
606
|
})
|
|
613
607
|
);
|
|
614
608
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@code-pushup/lighthouse-plugin",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.55.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Code PushUp plugin for measuring web performance and quality with Lighthouse 🔥",
|
|
6
6
|
"homepage": "https://github.com/code-pushup/cli/tree/main/packages/plugin-lighthouse#readme",
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
"main": "./index.js",
|
|
39
39
|
"types": "./src/index.d.ts",
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@code-pushup/models": "0.
|
|
42
|
-
"@code-pushup/utils": "0.
|
|
41
|
+
"@code-pushup/models": "0.55.0",
|
|
42
|
+
"@code-pushup/utils": "0.55.0",
|
|
43
43
|
"ansis": "^3.3.0",
|
|
44
44
|
"chrome-launcher": "^1.1.1",
|
|
45
45
|
"lighthouse": "^12.0.0",
|