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 6ef64ba

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 27s View ↗
nx run-many --targets=code-pushup --parallel=fa... ✅ Succeeded 13m 25s View ↗
nx run-many -t unit-test,int-test ✅ Succeeded 59s View ↗

☁️ Nx Cloud last updated this comment at 2026-03-25 15:41:57 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/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/eslint-plugin

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

@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 3546faa with previous commit 28f5ad1.

🕵️ See full comparison in Code PushUp portal 🔍

🏷️ Categories

🏷️ Category ⭐ Previous score ⭐ Current score 🔄 Score change
Performance 🔴 35 🔴 34 ↓ −0.6
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
👎 3 groups regressed, 👍 1 audit improved, 👎 5 audits regressed, 15 audits changed without impacting score

🗃️ Groups

🔌 Plugin 🗃️ Group ⭐ Previous score ⭐ Current score 🔄 Score change
Lighthouse Performance 🔴 35 🔴 34 ↓ −0.6
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 🟥 6.9 s ↑ +8.9 %
Lighthouse First Contentful Paint 🟥 3.2 s 🟥 3.1 s ↓ −1.3 %
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 🟥 666 undocumented functions ↑ +1.4 %
Code coverage Function coverage 🟩 93.9 % 🟩 93.8 % ↓ −0.1 %
Lighthouse Avoids enormous network payloads 🟩 Total size was 2,457 KiB 🟩 Total size was 2,440 KiB ↓ −0.7 %
Lighthouse Minimizes main-thread work 🟥 13.5 s 🟥 12.8 s ↓ −5.3 %
Lighthouse Server Backend Latencies 🟩 880 ms 🟩 270 ms ↓ −69.9 %
Lighthouse JavaScript execution time 🟥 4.1 s 🟥 4.3 s ↑ +6.8 %
Lighthouse Time to Interactive 🟥 15.0 s 🟥 14.8 s ↓ −1.1 %
Lighthouse Metrics 🟩 100% 🟩 100% ↓ −1.1 %
Lighthouse Largest Contentful Paint 🟥 13.5 s 🟥 13.4 s ↓ −1.1 %
Lighthouse Max Potential First Input Delay 🟥 1,360 ms 🟥 1,270 ms ↓ −6.6 %
Lighthouse Uses efficient cache policy on static assets 🟨 31 resources found 🟨 31 resources found ↑ +0.1 %
Lighthouse Total Blocking Time 🟥 2,950 ms 🟥 2,920 ms ↓ −1 %
Lighthouse Initial server response time was short 🟩 Root document took 540 ms 🟩 Root document took 520 ms ↓ −4.3 %
Lighthouse Network Round Trip Times 🟩 20 ms 🟩 10 ms ↓ −57.2 %
Lighthouse Avoids an excessive DOM size 🟥 2,347 elements 🟥 2,348 elements ↑ +0.1 %
Code coverage Branch coverage 🟨 89.2 % 🟨 89.2 % ↓ −0.1 %
Code coverage Line coverage 🟩 92.2 % 🟩 92.2 % ↓ −0.1 %

657 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 3546faa 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.3
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.3
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 🟥 51 undocumented functions ↑ +8.5 %
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-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.


9 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
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