@jsenv/lighthouse-impact 4.0.0-alpha.1 → 4.0.0-alpha.2

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": "@jsenv/lighthouse-impact",
3
- "version": "4.0.0-alpha.1",
3
+ "version": "4.0.0-alpha.2",
4
4
  "description": "Package description",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -19,7 +19,7 @@ export const generateLighthouseReport = async (
19
19
  handleSIGINT = true,
20
20
  logLevel,
21
21
 
22
- chromiumPort,
22
+ chromiumDebuggingPort,
23
23
  // I'm pretty sure these options are given to lighthouse
24
24
  // so that it knows how chrome is currently configured
25
25
  // lighthouse won't actually enable the emulated screen width
@@ -46,8 +46,10 @@ export const generateLighthouseReport = async (
46
46
  htmlFileLog = true,
47
47
  } = {},
48
48
  ) => {
49
- if (chromiumPort === undefined) {
50
- throw new Error(`"chromiumPort" is required, got ${chromiumPort}`)
49
+ if (chromiumDebuggingPort === undefined) {
50
+ throw new Error(
51
+ `"chromiumDebuggingPort" is required, got ${chromiumDebuggingPort}`,
52
+ )
51
53
  }
52
54
 
53
55
  const generateReportOperation = Abort.startOperation()
@@ -70,7 +72,7 @@ export const generateLighthouseReport = async (
70
72
  }
71
73
  const lighthouseOptions = {
72
74
  extends: "lighthouse:default",
73
- port: chromiumPort,
75
+ port: chromiumDebuggingPort,
74
76
  settings: {
75
77
  formFactor: emulatedMobile ? "mobile" : "desktop",
76
78
  throttling,
@@ -2,7 +2,7 @@ import { generateLighthouseReport } from "./generate/generate_lighthouse_report.
2
2
 
3
3
  export const runLighthouseOnPlaywrightPage = async (
4
4
  page,
5
- { chromiumPort, ...options },
5
+ { chromiumDebuggingPort, ...options },
6
6
  ) => {
7
7
  const url = page.url()
8
8
  const userAgent = await page.evaluate(() => {
@@ -60,7 +60,7 @@ export const runLighthouseOnPlaywrightPage = async (
60
60
  })
61
61
 
62
62
  const report = await generateLighthouseReport(url, {
63
- chromiumPort,
63
+ chromiumDebuggingPort,
64
64
  emulatedScreenWidth: screenWidth,
65
65
  emulatedScreenHeight: screenHeight,
66
66
  emulatedDeviceScaleFactor: deviceScaleFactor,