Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(plugin-js-packages): make optional deps opt-in, adjust weights #686

Merged
merged 1 commit into from
May 29, 2024

Conversation

Tlacenka
Copy link
Collaborator

@Tlacenka Tlacenka commented May 29, 2024

In this PR, I make the following changes:

  • dependency groups are configurable
  • weights are adjusted to make optional dependencies have less influence on the score

As a side-effect, optional audits will no longer appear on portal for our current CLI config (can be changed).

@Tlacenka Tlacenka requested a review from matejchalk May 29, 2024 10:48
@Tlacenka Tlacenka self-assigned this May 29, 2024
@github-actions github-actions bot added 📖 Project documentation improvements or additions to the project documentation 🔬 testing writing tests 🧩 js-packages-plugin Plugin for audit and outdated dependencies labels May 29, 2024
Copy link

Code PushUp

🤨 Code PushUp report has both improvements and regressions – compared target commit 66746de with source commit 94ad38a.

🏷️ Categories

🏷️ Category ⭐ Current score ⭐ Previous score 🔄 Score change
Updates 🟢 93 🟡 71 ↑ +22
Performance 🟡 74 🟢 93 ↓ −18.8
Accessibility 🟢 100 🟢 98 ↑ +1.8
Security 🟢 95 🟢 94 ↑ +1.3
Code coverage 🟡 70 🟡 70 ↓ +0
Best Practices 🟢 100 🟢 100
SEO 🟡 86 🟡 86
PWA 🟡 63 🟡 63
Bug prevention 🟢 100 🟢 100
Code style 🟢 100 🟢 100
Custom checks 🟡 67 🟡 67

🗃️ Groups

👍 3 groups improved, 👎 2 groups regressed
🔌 Plugin 🗃️ Group ⭐ Current score ⭐ Previous score 🔄 Score change
JS Packages NPM outdated dependencies 🟢 93 🟡 71 ↑ +22
Lighthouse Performance 🟡 74 🟢 93 ↓ −18.8
Lighthouse Accessibility 🟢 100 🟢 98 ↑ +1.8
JS Packages NPM audit 🟢 95 🟢 94 ↑ +1.3
Code coverage Code coverage metrics 🟡 70 🟡 70 ↓ +0

9 other groups are unchanged.

🛡️ Audits

👍 2 audits improved, 👎 10 audits regressed, 9 audits changed without impacting score
🔌 Plugin 🛡️ Audit 📏 Current value 📏 Previous value 🔄 Value change
Lighthouse Largest Contentful Paint element 🟥 2,950 ms 🟩 2,050 ms  −∞ %
Lighthouse Background and foreground colors have a sufficient contrast ratio 🟩 0 🟥 0  −∞ %
Lighthouse Total Blocking Time 🟨 470 ms 🟩 90 ms ↑ +458 %
Lighthouse Largest Contentful Paint 🟨 3.0 s 🟩 2.0 s ↑ +44 %
Lighthouse Max Potential First Input Delay 🟥 260 ms 🟨 220 ms ↑ +17 %
Lighthouse First Contentful Paint 🟨 1.9 s 🟩 1.1 s ↑ +65 %
Lighthouse First Meaningful Paint 🟩 2.1 s 🟩 1.1 s ↑ +83 %
Lighthouse Speed Index 🟩 2.9 s 🟩 1.2 s ↑ +140 %
Lighthouse Cumulative Layout Shift 🟨 0.167 🟨 0.148  −∞ %
Lighthouse Time to Interactive 🟩 3.4 s 🟩 2.5 s ↑ +34 %
Code coverage Line coverage 🟨 66 % 🟨 66 %  +0 %
Code coverage Branch coverage 🟨 82 % 🟨 82 %  +0 %
Lighthouse Metrics 🟩 3389 🟩 2534 ↑ +34 %
Lighthouse Minimizes main-thread work 🟥 3.5 s 🟥 2.7 s ↑ +31 %
Lighthouse Server Backend Latencies 🟩 150 ms 🟩 40 ms ↑ +322 %
Lighthouse Properly size images 🟥 Potential savings of 240 KiB 🟥 Potential savings of 240 KiB ↓ −5 %
Lighthouse JavaScript execution time 🟩 0.1 s 🟩 0.1 s ↑ +65 %
Lighthouse Initial server response time was short 🟩 Root document took 20 ms 🟩 Root document took 10 ms ↑ +50 %
Lighthouse Avoids enormous network payloads 🟩 Total size was 432 KiB 🟩 Total size was 432 KiB ↓ +0 %
Lighthouse Network Round Trip Times 🟩 10 ms 🟩 20 ms ↓ −29 %
Lighthouse Uses efficient cache policy on static assets 🟨 11 resources found 🟨 11 resources found ↓ +0 %

227 other audits are unchanged.

Copy link
Collaborator

@matejchalk matejchalk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 👍

@Tlacenka Tlacenka merged commit 74241e8 into main May 29, 2024
21 checks passed
@Tlacenka Tlacenka deleted the js-packages/defaults-improvement branch May 29, 2024 11:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🧩 js-packages-plugin Plugin for audit and outdated dependencies 📖 Project documentation improvements or additions to the project documentation 🔬 testing writing tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants