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

feat: make portal-client dependency optional #837

Merged
merged 2 commits into from
Oct 15, 2024

Conversation

hanna-skryl
Copy link
Collaborator

@hanna-skryl hanna-skryl commented Oct 11, 2024

Closes #474

  • Make @code-pushup/portal-client an optional peer dependency in the @code-pushup/core package.
  • Update the core package to use dynamic imports for @code-pushup/portal-client.
  • Add a utility function to handle the loading of the portal client.
  • Update the installation instructions to guide users on omitting optional dependencies, including details for npm, pnpm, and yarn setups.

@hanna-skryl hanna-skryl self-assigned this Oct 11, 2024
@github-actions github-actions bot added 📖 Project documentation improvements or additions to the project documentation 🧩 core 🧩 utils 🛠️ tooling 🧩 cli labels Oct 11, 2024
Copy link

github-actions bot commented Oct 11, 2024

Code PushUp

🤨 Code PushUp report has both improvements and regressions – compared target commit 01f02b6 with source commit c420a68.

🕵️ See full comparison in Code PushUp portal 🔍

🏷️ Categories

🏷️ Category ⭐ Previous score ⭐ Current score 🔄 Score change
Performance 🟡 52 🔴 43 ↓ −8.9
Code coverage 🟢 90 🟢 90 ↓ −0.1
Custom checks 🟡 67 🟡 67
Security 🟡 82 🟡 82
Updates 🟡 77 🟡 77
Accessibility 🟢 91 🟢 91
Best Practices 🟢 100 🟢 100
SEO 🟡 61 🟡 61
Bug prevention 🟢 100 🟢 100
Code style 🟢 99 🟢 99
👎 2 groups regressed, 👍 2 audits improved, 👎 6 audits regressed, 11 audits changed without impacting score

🗃️ Groups

🔌 Plugin 🗃️ Group ⭐ Previous score ⭐ Current score 🔄 Score change
Lighthouse Performance 🟡 52 🔴 43 ↓ −8.9
Code coverage Code coverage metrics 🟢 90 🟢 90 ↓ −0.1

18 other groups are unchanged.

🛡️ Audits

🔌 Plugin 🛡️ Audit 📏 Previous value 📏 Current value 🔄 Value change
Lighthouse Largest Contentful Paint 🟨 3.2 s 🟥 4.2 s ↑ +32.2 %
Lighthouse First Contentful Paint 🟥 3.2 s 🟥 3.6 s ↑ +15.5 %
Lighthouse First Meaningful Paint 🟨 3.2 s 🟨 3.6 s ↑ +15.5 %
Lighthouse Speed Index 🟥 6.4 s 🟥 6.6 s ↑ +2.2 %
Lighthouse Time to Interactive 🟥 19.6 s 🟥 17.8 s ↓ −8.8 %
Code coverage Branch coverage 🟨 85.4 % 🟨 85.3 % ↓ −0.1 %
Code coverage Line coverage 🟩 91.5 % 🟩 91.5 % ↓ −0.1 %
Code coverage Function coverage 🟩 92.4 % 🟩 92.4 % ↑ +0.1 %
Lighthouse Avoids enormous network payloads 🟩 Total size was 1,823 KiB 🟩 Total size was 1,818 KiB ↓ −0.2 %
Lighthouse Minimizes main-thread work 🟥 24.3 s 🟥 22.4 s ↓ −8 %
Lighthouse Total Blocking Time 🟥 9,650 ms 🟥 7,920 ms ↓ −18 %
Lighthouse Metrics 🟩 100% 🟩 100% ↓ −8.8 %
Lighthouse Max Potential First Input Delay 🟥 4,900 ms 🟥 3,220 ms ↓ −34.3 %
Lighthouse JavaScript execution time 🟥 11.8 s 🟥 11.0 s ↓ −6.1 %
Lighthouse Eliminate render-blocking resources 🟥 Potential savings of 1,270 ms 🟥 Potential savings of 1,490 ms ↑ +16.6 %
Lighthouse Uses efficient cache policy on static assets 🟨 27 resources found 🟨 27 resources found ↑ +0.1 %
Lighthouse Server Backend Latencies 🟩 150 ms 🟩 220 ms ↑ +47.6 %
Lighthouse Network Round Trip Times 🟩 20 ms 🟩 60 ms ↑ +173.3 %
Lighthouse Initial server response time was short 🟩 Root document took 410 ms 🟩 Root document took 380 ms ↓ −5.9 %

494 other audits are unchanged.

@hanna-skryl hanna-skryl force-pushed the feat/make-portal-client-dependency-optional branch from 0bdf575 to bc325eb Compare October 11, 2024 23:46
@github-actions github-actions bot added the 🔬 testing writing tests label Oct 12, 2024
@hanna-skryl hanna-skryl force-pushed the feat/make-portal-client-dependency-optional branch from bcdcf92 to 88b7fcd Compare October 12, 2024 00:39
@hanna-skryl hanna-skryl marked this pull request as ready for review October 12, 2024 01:31
packages/cli/README.md Outdated Show resolved Hide resolved
@hanna-skryl hanna-skryl force-pushed the feat/make-portal-client-dependency-optional branch from ebb2469 to 2971290 Compare October 14, 2024 16:40
@hanna-skryl hanna-skryl merged commit 12ecf6a into main Oct 15, 2024
17 checks passed
@hanna-skryl hanna-skryl deleted the feat/make-portal-client-dependency-optional branch October 15, 2024 12:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🧩 cli 🧩 core 📖 Project documentation improvements or additions to the project documentation 🔬 testing writing tests 🛠️ tooling
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make portal-client dependency optional
3 participants