@code-pushup/lighthouse-plugin 0.77.0 → 0.79.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@code-pushup/lighthouse-plugin",
3
- "version": "0.77.0",
3
+ "version": "0.79.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",
@@ -36,8 +36,8 @@
36
36
  },
37
37
  "type": "module",
38
38
  "dependencies": {
39
- "@code-pushup/models": "0.77.0",
40
- "@code-pushup/utils": "0.77.0",
39
+ "@code-pushup/models": "0.79.0",
40
+ "@code-pushup/utils": "0.79.0",
41
41
  "ansis": "^3.3.0",
42
42
  "chrome-launcher": "^1.1.1",
43
43
  "lighthouse": "^12.0.0",
@@ -47,7 +47,7 @@
47
47
  "src",
48
48
  "!**/*.tsbuildinfo"
49
49
  ],
50
+ "types": "./src/index.d.ts",
50
51
  "module": "./src/index.js",
51
- "main": "./src/index.js",
52
- "types": "./src/index.d.ts"
52
+ "main": "./src/index.js"
53
53
  }
@@ -4,7 +4,7 @@ import { normalizeFlags } from './normalize-flags.js';
4
4
  import { normalizeUrlInput, processAuditsAndGroups } from './processing.js';
5
5
  import { createRunnerFunction } from './runner/runner.js';
6
6
  export function lighthousePlugin(urls, flags) {
7
- const { skipAudits, onlyAudits, onlyCategories, ...unparsedFlags } = normalizeFlags(flags ?? {});
7
+ const { skipAudits, onlyAudits, onlyCategories, scoreTargets, ...unparsedFlags } = normalizeFlags(flags ?? {});
8
8
  const { urls: normalizedUrls, context } = normalizeUrlInput(urls);
9
9
  const { audits, groups } = processAuditsAndGroups(normalizedUrls, {
10
10
  skipAudits,
@@ -27,6 +27,7 @@ export function lighthousePlugin(urls, flags) {
27
27
  ...unparsedFlags,
28
28
  }),
29
29
  context,
30
+ ...(scoreTargets && { scoreTargets }),
30
31
  };
31
32
  }
32
33
  //# sourceMappingURL=lighthouse-plugin.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"lighthouse-plugin.js","sourceRoot":"","sources":["../../../src/lib/lighthouse-plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,OAAO,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAC5E,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAG1D,MAAM,UAAU,gBAAgB,CAC9B,IAAoB,EACpB,KAAyB;IAEzB,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,cAAc,EAAE,GAAG,aAAa,EAAE,GAChE,cAAc,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC;IAE9B,MAAM,EAAE,IAAI,EAAE,cAAc,EAAE,OAAO,EAAE,GAAG,iBAAiB,CAAC,IAAI,CAAC,CAAC;IAElE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,sBAAsB,CAAC,cAAc,EAAE;QAChE,UAAU;QACV,UAAU;QACV,cAAc;KACf,CAAC,CAAC;IAEH,MAAM,WAAW,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAChD,oBAAoB,CACkB,CAAC;IAEzC,OAAO;QACL,IAAI,EAAE,sBAAsB;QAC5B,WAAW,EAAE,WAAW,CAAC,IAAI;QAC7B,OAAO,EAAE,WAAW,CAAC,OAAO;QAC5B,KAAK,EAAE,YAAY;QACnB,IAAI,EAAE,YAAY;QAClB,MAAM;QACN,MAAM;QACN,MAAM,EAAE,oBAAoB,CAAC,cAAc,EAAE;YAC3C,UAAU;YACV,UAAU;YACV,cAAc;YACd,GAAG,aAAa;S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AAY,IAAI,EAAE,YAAY,EAAE,CAAC;KACtC,CAAC;AACJ,CAAC"}
@@ -1,10 +1,12 @@
1
1
  import type { CliFlags } from 'lighthouse';
2
+ import type { PluginScoreTargets } from '@code-pushup/models';
2
3
  import type { ExcludeNullableProps } from '@code-pushup/utils';
3
4
  import type { LIGHTHOUSE_GROUP_SLUGS } from './constants.js';
4
5
  export type LighthouseOptions = ExcludeNullableProps<Partial<Omit<CliFlags, '_' | 'precomputedLanternDataPath' | 'enableErrorReporting' | 'list-all-audits' | 'list-locales' | 'list-trace-categories' | 'chromeIgnoreDefaultFlags' | 'onlyCategories' | 'onlyAudits' | 'skipAudits'>>> & {
5
6
  onlyGroups?: string | string[];
6
7
  onlyAudits?: string | string[];
7
8
  skipAudits?: string | string[];
9
+ scoreTargets?: PluginScoreTargets;
8
10
  };
9
11
  export type LighthouseGroupSlug = (typeof LIGHTHOUSE_GROUP_SLUGS)[number];
10
12
  export type WeightedUrl = Record<string, number>;