Skip to content

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

Open
hanna-skryl wants to merge 1 commit intomainfrom
lighthouse-plugin-binding
Open

feat(plugin-lighthouse): add setup wizard binding#1277
hanna-skryl wants to merge 1 commit intomainfrom
lighthouse-plugin-binding

Conversation

@hanna-skryl
Copy link
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
Copy link

nx-cloud bot commented Mar 25, 2026

View your CI Pipeline Execution ↗ for commit 7d03bc0

Command Status Duration Result
nx run ci:code-pushup -- merge-diffs --files=/h... ✅ Succeeded 5s View ↗
nx run-many --targets=code-pushup --parallel=fa... ✅ Succeeded 1m 35s View ↗
nx run-many --targets=code-pushup --parallel=fa... ✅ Succeeded 14m 33s View ↗
nx run-many -t unit-test,int-test ✅ Succeeded 9s View ↗

☁️ Nx Cloud last updated this comment at 2026-03-25 21:29:10 UTC

@pkg-pr-new
Copy link

pkg-pr-new bot commented Mar 25, 2026

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/nx-plugin

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

@code-pushup/axe-plugin

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/axe-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: 7d03bc0

@github-actions
Copy link
Contributor

github-actions bot commented Mar 25, 2026

Code PushUp

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

🕵️ See full comparison in Code PushUp portal 🔍

🏷️ Categories

🏷️ Category ⭐ Previous score ⭐ Current score 🔄 Score change
Performance 🔴 35 🔴 37 ↑ +2.3
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, 👍 4 audits improved, 👎 5 audits regressed, 17 audits changed without impacting score

🗃️ Groups

🔌 Plugin 🗃️ Group ⭐ Previous score ⭐ Current score 🔄 Score change
Lighthouse Performance 🔴 35 🔴 37 ↑ +2.3
JSDocs coverage Documentation coverage 🟡 51 🟡 51 ↓ −0.1
Code coverage Code coverage metrics 🟢 92 🟢 92 ↓ −0.1

31 other groups are unchanged.

🛡️ Audits

🔌 Plugin 🛡️ Audit 📏 Previous value 📏 Current value 🔄 Value change
Lighthouse Speed Index 🟥 6.3 s 🟨 5.7 s ↓ −9.8 %
Lighthouse Total Blocking Time 🟥 2,950 ms 🟥 2,090 ms ↓ −29.1 %
Lighthouse First Contentful Paint 🟥 3.2 s 🟥 3.1 s ↓ −1.6 %
Lighthouse Time to Interactive 🟥 15.0 s 🟥 14.0 s ↓ −6.5 %
JSDocs coverage Types coverage 🟥 284 undocumented types 🟥 290 undocumented types ↑ +2.1 %
JSDocs coverage Variables coverage 🟥 314 undocumented variables 🟥 321 undocumented variables ↑ +2.2 %
JSDocs coverage Functions coverage 🟥 657 undocumented functions 🟥 665 undocumented functions ↑ +1.2 %
Code coverage Function coverage 🟩 93.9 % 🟩 93.8 % ↓ −0.1 %
Code coverage Branch coverage 🟨 89.2 % 🟨 89.2 % ↓ −0.1 %
Lighthouse Avoids enormous network payloads 🟩 Total size was 2,457 KiB 🟩 Total size was 2,442 KiB ↓ −0.6 %
Lighthouse Minimizes main-thread work 🟥 13.5 s 🟥 10.6 s ↓ −21.5 %
Lighthouse JavaScript execution time 🟥 4.1 s 🟥 2.9 s ↓ −28.2 %
Lighthouse Metrics 🟩 100% 🟩 100% ↓ −6.5 %
Lighthouse Reduce unused JavaScript 🟥 Potential savings of 270 KiB 🟥 Potential savings of 291 KiB ↑ +79.1 %
Lighthouse Server Backend Latencies 🟩 880 ms 🟩 220 ms ↓ −74.6 %
Lighthouse Uses efficient cache policy on static assets 🟨 31 resources found 🟨 31 resources found ↓ −0.1 %
Lighthouse Largest Contentful Paint 🟥 13.5 s 🟥 13.2 s ↓ −2.5 %
Lighthouse Remove duplicate modules in JavaScript bundles 🟥 Potential savings of 106 KiB 🟥 Potential savings of 111 KiB ↑ +106.7 %
Lighthouse Reduce unused CSS 🟥 Potential savings of 111 KiB 🟥 Potential savings of 111 KiB ↓ −23 %
Lighthouse Max Potential First Input Delay 🟥 1,360 ms 🟥 1,220 ms ↓ −9.9 %
Lighthouse Initial server response time was short 🟩 Root document took 540 ms 🟩 Root document took 470 ms ↓ −12.7 %
Lighthouse Network Round Trip Times 🟩 20 ms 🟩 10 ms ↓ −44.6 %
JS packages Vulnerabilities for npm prod dependencies. 🟥 19 vulnerabilities (2 critical, 7 high, 3 moderate, 7 low) 🟥 20 vulnerabilities (2 critical, 7 high, 4 moderate, 7 low) ↑ +5.3 %
Lighthouse Avoids an excessive DOM size 🟥 2,347 elements 🟥 2,348 elements ↑ +0.1 %
Code coverage Line coverage 🟩 92.2 % 🟩 92.2 % ↓ −0.1 %
Lighthouse Cumulative Layout Shift 🟩 0 🟩 0 ↑ +∞ %

652 other audits are unchanged.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 25, 2026

Code PushUp

🤨 Code PushUp report has both improvements and regressions – compared current commit 19baff4 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 coverage Documentation coverage 🔴 24 🔴 23 ↓ −0.4
Code coverage Code coverage metrics 🟢 90 🟢 91 ↑ +0.3

13 other groups are unchanged.

🛡️ Audits

🔌 Plugin 🛡️ Audit 📏 Previous value 📏 Current value 🔄 Value change
JSDocs coverage Types coverage 🟥 8 undocumented types 🟥 9 undocumented types ↑ +12.5 %
JSDocs coverage Functions coverage 🟥 51 undocumented functions 🟥 56 undocumented functions ↑ +9.8 %
Code coverage Function coverage 🟨 89.9 % 🟩 90.5 % ↑ +0.8 %
Code coverage Branch coverage 🟩 91.1 % 🟩 90.5 % ↓ −0.7 %
Code coverage Line 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.2
Code coverage 🟢 99 🟢 99 ↑ +0.1

4 other categories are unchanged.

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

🗃️ Groups

🔌 Plugin 🗃️ Group ⭐ Previous score ⭐ Current score 🔄 Score change
JSDocs coverage Documentation coverage 🔴 48 🔴 48 ↓ −0.2
Code coverage Code coverage metrics 🟢 99 🟢 99 ↑ +0.1

13 other groups are unchanged.

🛡️ Audits

🔌 Plugin 🛡️ Audit 📏 Previous value 📏 Current value 🔄 Value change
JSDocs coverage Variables coverage 🟥 22 undocumented variables 🟥 29 undocumented variables ↑ +31.8 %
JSDocs coverage Functions coverage 🟥 47 undocumented functions 🟥 50 undocumented functions ↑ +6.4 %
Code coverage Branch coverage 🟩 98.8 % 🟩 98.9 % ↑ +0.1 %
Code coverage Line coverage 🟩 99.8 % 🟩 99.9 % ↑ +0.1 %
JSDocs coverage Types 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 coverage Documentation coverage 🟡 67 🟡 67 ↓ −0.2
Code coverage Code coverage metrics 🟢 94 🟢 94 ↓ −0.1

10 other groups are unchanged.

🛡️ Audits

🔌 Plugin 🛡️ Audit 📏 Previous value 📏 Current value 🔄 Value change
JSDocs coverage Types coverage 🟥 64 undocumented types 🟥 68 undocumented types ↑ +6.3 %
Code coverage Line 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 coverage Code coverage metrics 🟢 94 🟢 94 ↓ −0.1
JSDocs coverage Documentation coverage 🟡 61 🟡 61 ↑ +0.1

13 other groups are unchanged.

🛡️ Audits

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

441 other audits are unchanged.

💼 Project plugin-js-packages

🥳 Code PushUp report has improved.

🕵️ See full comparison in Code PushUp portal 🔍

🏷️ Category ⭐ Previous score ⭐ Current score 🔄 Score change
Code coverage 🟡 87 🟡 87 ↑ +0.1

5 other categories are unchanged.

👍 1 group improved, 👍 1 audit improved

🗃️ Groups

🔌 Plugin 🗃️ Group ⭐ Previous score ⭐ Current score 🔄 Score change
Code coverage Code coverage metrics 🟡 87 🟡 87 ↑ +0.1

14 other groups are unchanged.

🛡️ Audits

🔌 Plugin 🛡️ Audit 📏 Previous value 📏 Current value 🔄 Value change
Code coverage Branch coverage 🟩 95 % 🟩 95 % ↑ +0.1 %

443 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 coverage Documentation coverage 🟡 68 🟡 68 ↑ +0.1

14 other groups are unchanged.

🛡️ Audits

All of 444 audits are unchanged.


8 other projects are unchanged.

@hanna-skryl hanna-skryl force-pushed the lighthouse-plugin-binding branch from ce78358 to 6ef64ba Compare March 25, 2026 15:24
@hanna-skryl hanna-skryl marked this pull request as ready for review March 25, 2026 15:42
@hanna-skryl hanna-skryl requested a review from BioPhoton as a code owner March 25, 2026 15:42
@hanna-skryl hanna-skryl requested a review from matejchalk March 25, 2026 15:42
@hanna-skryl hanna-skryl force-pushed the lighthouse-plugin-binding branch from 6ef64ba to 7d03bc0 Compare March 25, 2026 21:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Lighthouse plugin setup wizard

1 participant