Skip to content

feat(plugin-lighthouse): add setup wizard binding - #1277

Merged
hanna-skryl merged 3 commits into
mainfrom
lighthouse-plugin-binding
Mar 26, 2026
Merged

feat(plugin-lighthouse): add setup wizard binding#1277
hanna-skryl merged 3 commits into
mainfrom
lighthouse-plugin-binding

Conversation

@hanna-skryl

Copy link
Copy Markdown
Collaborator

Closes#1257

Lighthouse plugin binding for the setup wizard. Prompts for target URL(s) and category selection, then generates plugin initialization code with lighthouseGroupRefs expressions for category refs.

When categories are selected, the plugin is declared as a variable so it can be referenced in both the plugins array and category refs. Without categories, the plugin call is inlined.

Extends the codegen to support:

  • pluginDeclaration on PluginCodegenResult - emits a const declaration before the config export
  • CategoryCodegenConfig - allows expression-based refs alongside static refs
  • Category merge logic extracted into codegen-categories.ts with support for mixed static and expression refs

@nx-cloud

nx-cloudBot commented Mar 25, 2026

Copy link
Copy Markdown

View your CI Pipeline Execution ↗ for commit 30f3a2c

CommandStatusDurationResult
nx run ci:code-pushup -- merge-diffs --files=/h...✅ Succeeded5sView ↗
nx run-many --targets=code-pushup --parallel=fa...✅ Succeeded1m 32sView ↗
nx run-many --targets=code-pushup --parallel=fa...✅ Succeeded13m 44sView ↗
nx run-many -t unit-test,int-test✅ Succeeded10sView ↗

☁️ Nx Cloud last updated this comment at 2026-03-26 13:47:31 UTC

@pkg-pr-new

pkg-pr-newBot commented Mar 25, 2026

Copy link
Copy Markdown

Open in StackBlitz

@code-pushup/ci

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/ci@1277

@code-pushup/cli

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/cli@1277

@code-pushup/core

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/core@1277

@code-pushup/create-cli

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/create-cli@1277

@code-pushup/models

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/models@1277

@code-pushup/axe-plugin

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/axe-plugin@1277

@code-pushup/nx-plugin

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/nx-plugin@1277

@code-pushup/coverage-plugin

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/coverage-plugin@1277

@code-pushup/eslint-plugin

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/eslint-plugin@1277

@code-pushup/js-packages-plugin

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/js-packages-plugin@1277

@code-pushup/jsdocs-plugin

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/jsdocs-plugin@1277

@code-pushup/lighthouse-plugin

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/lighthouse-plugin@1277

@code-pushup/typescript-plugin

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/typescript-plugin@1277

@code-pushup/utils

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/utils@1277

commit: 30f3a2c

@github-actions

github-actionsBot commented Mar 25, 2026

Copy link
Copy Markdown
Contributor

Code PushUp

🤨 Code PushUp report has both improvements and regressions – compared current commit 8c2f660 with previous commit 28f5ad1.

🕵️ See full comparison in Code PushUp portal 🔍

🏷️ Categories

🏷️ Category⭐ Previous score⭐ Current score🔄 Score change
Performance🔴 35🔴 36↑ +1.8
Documentation🟡 51🟡 51↓ −0.1
Code coverage🟢 92🟢 92↓ −0.1
Bug prevention🟡 75🟡 75↓ −0.1
Axe Accessibility🟡 88🟡 88↓ −0.1
Code style🟢 100🟢 100
Security🔴 0🔴 0
Updates🟡 73🟡 73
Type Safety🟡 67🟡 67
Miscellaneous🟡 67🟡 67
Accessibility🟢 92🟢 92
Best Practices🟢 100🟢 100
SEO🟢 92🟢 92
👍 1 group improved, 👎 2 groups regressed, 👍 3 audits improved, 👎 6 audits regressed, 14 audits changed without impacting score

🗃️ Groups

🔌 Plugin🗃️ Group⭐ Previous score⭐ Current score🔄 Score change
LighthousePerformance🔴 35🔴 36↑ +1.8
JSDocs coverageDocumentation coverage🟡 51🟡 51↓ −0.1
Code coverageCode coverage metrics🟢 92🟢 92↓ −0.1

31 other groups are unchanged.

🛡️ Audits

🔌 Plugin🛡️ Audit📏 Previous value📏 Current value🔄 Value change
LighthouseInitial server response time was short🟩 Root document took 540 ms🟥 Root document took 620 ms↑ +15.2 %
LighthouseSpeed Index🟥 6.3 s🟨 5.5 s↓ −12.1 %
LighthouseFirst Contentful Paint🟥 3.2 s🟨 3.0 s↓ −5.1 %
JSDocs coverageTypes coverage🟥 284 undocumented types🟥 290 undocumented types↑ +2.1 %
JSDocs coverageVariables coverage🟥 314 undocumented variables🟥 322 undocumented variables↑ +2.5 %
JSDocs coverageFunctions coverage🟥 657 undocumented functions🟥 666 undocumented functions↑ +1.4 %
Code coverageFunction coverage🟩 93.9 %🟩 93.8 %↓ −0.1 %
Code coverageBranch coverage🟨 89.2 %🟨 89.2 %↓ −0.1 %
Code coverageLine coverage🟩 92.2 %🟩 92.2 %↑ +0.1 %
LighthouseAvoids enormous network payloads🟩 Total size was 2,457 KiB🟩 Total size was 2,461 KiB↑ +0.1 %
LighthouseMinimizes main-thread work🟥 13.5 s🟥 12.5 s↓ −7.8 %
LighthouseMetrics🟩 100%🟩 100%↓ −2.5 %
LighthouseTime to Interactive🟥 15.0 s🟥 14.6 s↓ −2.5 %
LighthouseUses efficient cache policy on static assets🟨 31 resources found🟨 31 resources found↓ −0.1 %
LighthouseServer Backend Latencies🟩 880 ms🟩 1,140 ms↑ +29.8 %
LighthouseTotal Blocking Time🟥 2,950 ms🟥 2,710 ms↓ −8.1 %
LighthouseRemove duplicate modules in JavaScript bundles🟥 Potential savings of 106 KiB🟥 Potential savings of 110 KiB↑ +50 %
LighthouseJavaScript execution time🟥 4.1 s🟥 3.9 s↓ −3.7 %
LighthouseLargest Contentful Paint🟥 13.5 s🟥 13.4 s↓ −0.8 %
LighthouseMax Potential First Input Delay🟥 1,360 ms🟥 1,350 ms↓ −0.5 %
JS packagesVulnerabilities for npm prod dependencies.🟥 19 vulnerabilities (2 critical, 7 high, 3 moderate, 7 low)🟥 21 vulnerabilities (2 critical, 8 high, 4 moderate, 7 low)↑ +10.5 %
LighthouseNetwork Round Trip Times🟩 20 ms🟩 20 ms↑ +8.8 %
LighthouseAvoids an excessive DOM size🟥 2,347 elements🟥 2,348 elements↑ +0.1 %

655 other audits are unchanged.

@github-actions

github-actionsBot commented Mar 25, 2026

Copy link
Copy Markdown
Contributor

Code PushUp

🤨 Code PushUp report has both improvements and regressions – compared current commit 8c2f660 with previous commit 28f5ad1.

💼 Project create-cli

🤨 Code PushUp report has both improvements and regressions.

🕵️ See full comparison in Code PushUp portal 🔍

🏷️ Category⭐ Previous score⭐ Current score🔄 Score change
Documentation🔴 24🔴 23↓ −0.4
Code coverage🟢 90🟢 91↑ +0.3

4 other categories are unchanged.

👍 1 group improved, 👎 1 group regressed, 👍 2 audits improved, 👎 3 audits regressed

🗃️ Groups

🔌 Plugin🗃️ Group⭐ Previous score⭐ Current score🔄 Score change
JSDocs coverageDocumentation coverage🔴 24🔴 23↓ −0.4
Code coverageCode coverage metrics🟢 90🟢 91↑ +0.3

13 other groups are unchanged.

🛡️ Audits

🔌 Plugin🛡️ Audit📏 Previous value📏 Current value🔄 Value change
JSDocs coverageTypes coverage🟥 8 undocumented types🟥 9 undocumented types↑ +12.5 %
JSDocs coverageFunctions coverage🟥 51 undocumented functions🟥 56 undocumented functions↑ +9.8 %
Code coverageFunction coverage🟨 89.9 %🟩 90.5 %↑ +0.8 %
Code coverageBranch coverage🟩 91.1 %🟩 90.5 %↓ −0.7 %
Code coverageLine coverage🟩 91.6 %🟩 92.2 %↑ +0.6 %

438 other audits are unchanged.

💼 Project plugin-lighthouse

🤨 Code PushUp report has both improvements and regressions.

🕵️ See full comparison in Code PushUp portal 🔍

🏷️ Category⭐ Previous score⭐ Current score🔄 Score change
Documentation🔴 48🔴 48↓ −0.3
Code coverage🟢 99🟢 99↓ −0.1

4 other categories are unchanged.

👎 2 groups regressed, 👍 1 audit improved, 👎 3 audits regressed, 1 audit changed without impacting score

🗃️ Groups

🔌 Plugin🗃️ Group⭐ Previous score⭐ Current score🔄 Score change
JSDocs coverageDocumentation coverage🔴 48🔴 48↓ −0.3
Code coverageCode coverage metrics🟢 99🟢 99↓ −0.1

13 other groups are unchanged.

🛡️ Audits

🔌 Plugin🛡️ Audit📏 Previous value📏 Current value🔄 Value change
JSDocs coverageVariables coverage🟥 22 undocumented variables🟥 30 undocumented variables↑ +36.4 %
JSDocs coverageFunctions coverage🟥 47 undocumented functions🟥 51 undocumented functions↑ +8.5 %
Code coverageBranch coverage🟩 98.8 %🟩 98.5 %↓ −0.3 %
Code coverageLine coverage🟩 99.8 %🟩 99.9 %↑ +0.1 %
JSDocs coverageTypes coverage🟥 12 undocumented types🟥 13 undocumented types↑ +8.3 %

439 other audits are unchanged.

💼 Project models

😟 Code PushUp report has regressed.

🕵️ See full comparison in Code PushUp portal 🔍

🏷️ Category⭐ Previous score⭐ Current score🔄 Score change
Documentation🟡 67🟡 67↓ −0.2
Code coverage🟢 94🟢 94↓ −0.1

2 other categories are unchanged.

👎 2 groups regressed, 👎 2 audits regressed

🗃️ Groups

🔌 Plugin🗃️ Group⭐ Previous score⭐ Current score🔄 Score change
JSDocs coverageDocumentation coverage🟡 67🟡 67↓ −0.2
Code coverageCode coverage metrics🟢 94🟢 94↓ −0.1

10 other groups are unchanged.

🛡️ Audits

🔌 Plugin🛡️ Audit📏 Previous value📏 Current value🔄 Value change
JSDocs coverageTypes coverage🟥 64 undocumented types🟥 68 undocumented types↑ +6.3 %
Code coverageLine coverage🟩 94.6 %🟩 94 %↓ −0.7 %

435 other audits are unchanged.

💼 Project utils

🤨 Code PushUp report has both improvements and regressions.

🕵️ See full comparison in Code PushUp portal 🔍

🏷️ Category⭐ Previous score⭐ Current score🔄 Score change
Code coverage🟢 94🟢 94↓ −0.1
Documentation🟡 61🟡 61↑ +0.1

4 other categories are unchanged.

👍 1 group improved, 👎 1 group regressed, 👍 1 audit improved, 👎 2 audits regressed

🗃️ Groups

🔌 Plugin🗃️ Group⭐ Previous score⭐ Current score🔄 Score change
Code coverageCode coverage metrics🟢 94🟢 94↓ −0.1
JSDocs coverageDocumentation coverage🟡 61🟡 61↑ +0.1

13 other groups are unchanged.

🛡️ Audits

🔌 Plugin🛡️ Audit📏 Previous value📏 Current value🔄 Value change
JSDocs coverageFunctions coverage🟥 255 undocumented functions🟥 255 undocumented functions +0 %
Code coverageFunction coverage🟩 95.1 %🟩 94.9 %↓ −0.2 %
Code coverageLine coverage🟩 97.4 %🟩 97.4 %↓ −0.1 %

441 other audits are unchanged.

💼 Project plugin-coverage

🥳 Code PushUp report has improved.

🕵️ See full comparison in Code PushUp portal 🔍

🏷️ Category⭐ Previous score⭐ Current score🔄 Score change
Documentation🟡 68🟡 68↑ +0.1

5 other categories are unchanged.

👍 1 group improved

🗃️ Groups

🔌 Plugin🗃️ Group⭐ Previous score⭐ Current score🔄 Score change
JSDocs coverageDocumentation coverage🟡 68🟡 68↑ +0.1

14 other groups are unchanged.

🛡️ Audits

All of 444 audits are unchanged.


9 other projects are unchanged.

@hanna-skryl
hanna-skrylforce-pushed the lighthouse-plugin-binding branch from ce78358 to 6ef64baCompareMarch 25, 2026 15:24
@hanna-skryl
hanna-skryl marked this pull request as ready for review March 25, 2026 15:42
@hanna-skryl
hanna-skrylforce-pushed the lighthouse-plugin-binding branch from 6ef64ba to 7d03bc0CompareMarch 25, 2026 21:10
Comment threadpackages/create-cli/README.md Outdated
Comment threadpackages/plugin-lighthouse/src/lib/binding.ts
@hanna-skryl
hanna-skryl merged commit 46a81be into mainMar 26, 2026
24 checks passed
@hanna-skryl
hanna-skryl deleted the lighthouse-plugin-binding branch March 26, 2026 14:11
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Lighthouse plugin setup wizard

2 participants

@hanna-skryl@matejchalk