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(create-cli): package to align with package managers init command #779

Merged
merged 95 commits into from
Aug 19, 2024

Conversation

BioPhoton
Copy link
Collaborator

@BioPhoton BioPhoton commented Aug 2, 2024

Note

I get a resource blocked error in in the skipped tests which I can not resolve.

This PR introduces a "create" package for the cli package.
Many package manager support this format.

npx init @code-pushup/cli => npm exec @code-pushup/create-cli

It includes:

  • adding the new package
  • adding logic to execute the nx-plugin logic
  • extend the configuration generator with a skipNxJson option

Related to:
#739 cc @grizlizli

@github-actions github-actions bot added 📖 Project documentation improvements or additions to the project documentation 🔬 testing writing tests 🧩 nx-plugin 🛠️ tooling labels Aug 2, 2024
@BioPhoton BioPhoton mentioned this pull request Aug 2, 2024
2 tasks
Copy link

github-actions bot commented Aug 2, 2024

Code PushUp

🤨 Code PushUp report has both improvements and regressions – compared target commit eb4f54a with source commit 304b229.

🕵️ See full comparison in Code PushUp portal 🔍

🏷️ Categories

🏷️ Category ⭐ Previous score ⭐ Current score 🔄 Score change
Performance 🔴 46 🔴 37 ↓ −8.9
Code coverage 🟡 90 🟡 90 ↓ −0.1
Code style 🟢 99 🟢 99 ↑ +0
Custom checks 🟡 67 🟡 67
Security 🟢 100 🟢 100
Updates 🟡 78 🟡 78
Accessibility 🟢 91 🟢 91
Best Practices 🟢 100 🟢 100
SEO 🟡 61 🟡 61
Bug prevention 🟢 100 🟢 100
👍 1 group improved, 👎 2 groups regressed, 👍 1 audit improved, 👎 9 audits regressed, 11 audits changed without impacting score

🗃️ Groups

🔌 Plugin 🗃️ Group ⭐ Previous score ⭐ Current score 🔄 Score change
Lighthouse Performance 🔴 46 🔴 37 ↓ −8.9
Code coverage Code coverage metrics 🟡 90 🟡 90 ↓ −0.1
ESLint Suggestions 🟢 99 🟢 99 ↑ +0

17 other groups are unchanged.

🛡️ Audits

🔌 Plugin 🛡️ Audit 📏 Previous value 📏 Current value 🔄 Value change
Lighthouse Eliminate render-blocking resources 🟨 Potential savings of 0 ms 🟥 Potential savings of 1,800 ms ↑ +∞ %
Lighthouse Reduce unused CSS 🟨 Potential savings of 106 KiB 🟥 Potential savings of 106 KiB ↑ +∞ %
Lighthouse First Meaningful Paint 🟨 3.1 s 🟥 4.2 s ↑ +37 %
Lighthouse Largest Contentful Paint 🟨 3.8 s 🟥 4.6 s ↑ +21 %
Lighthouse First Contentful Paint 🟥 3.0 s 🟥 3.7 s ↑ +23 %
Lighthouse Speed Index 🟥 7.8 s 🟥 11.2 s ↑ +43 %
Lighthouse Time to Interactive 🟥 18.8 s 🟥 19.5 s ↑ +4 %
Code coverage Function coverage 🟩 92.3 % 🟩 92.1 % ↓ +0 %
Code coverage Branch coverage 🟨 84.8 % 🟨 84.7 % ↓ +0 %
Code coverage Line coverage 🟩 91.8 % 🟩 91.9 % ↑ +0 %
Lighthouse Minimizes main-thread work 🟥 25.0 s 🟥 28.2 s ↑ +13 %
Lighthouse Max Potential First Input Delay 🟥 2,740 ms 🟥 4,450 ms ↑ +63 %
Lighthouse JavaScript execution time 🟥 12.8 s 🟥 11.9 s ↓ −7 %
Lighthouse Avoids enormous network payloads 🟩 Total size was 1,808 KiB 🟩 Total size was 1,809 KiB ↑ +0 %
Lighthouse Metrics 🟩 100% 🟩 100% ↑ +4 %
Lighthouse Total Blocking Time 🟥 12,600 ms 🟥 12,940 ms ↑ +3 %
Lighthouse Uses efficient cache policy on static assets 🟨 28 resources found 🟨 28 resources found ↓ +0 %
Lighthouse Server Backend Latencies 🟩 180 ms 🟩 320 ms ↑ +73 %
Lighthouse Initial server response time was short 🟩 Root document took 310 ms 🟩 Root document took 430 ms ↑ +40 %
Lighthouse Network Round Trip Times 🟩 20 ms 🟩 60 ms ↑ +302 %
Lighthouse Avoids an excessive DOM size 🟥 2,222 elements 🟥 2,223 elements ↑ +0 %

488 other audits are unchanged.

@BioPhoton BioPhoton marked this pull request as ready for review August 2, 2024 23:31
@BioPhoton BioPhoton requested a review from matejchalk August 2, 2024 23:31
@BioPhoton BioPhoton added the 🤓 UX UX improvement for CLI users label Aug 3, 2024
packages/create-cli/README.md Outdated Show resolved Hide resolved
packages/create-cli/src/index.ts Outdated Show resolved Hide resolved
packages/create-cli/src/lib/init.ts Outdated Show resolved Hide resolved
packages/create-cli/src/lib/utils.ts Outdated Show resolved Hide resolved
packages/create-cli/src/lib/utils.ts Outdated Show resolved Hide resolved
packages/create-cli/src/lib/constants.ts Outdated Show resolved Hide resolved
packages/create-cli/project.json Outdated Show resolved Hide resolved
packages/nx-plugin/src/index.ts Outdated Show resolved Hide resolved
BioPhoton and others added 16 commits August 5, 2024 12:58
Co-authored-by: Matěj Chalk <34691111+matejchalk@users.noreply.github.com>
Co-authored-by: Matěj Chalk <34691111+matejchalk@users.noreply.github.com>
Co-authored-by: Matěj Chalk <34691111+matejchalk@users.noreply.github.com>
…est.ts

Co-authored-by: Matěj Chalk <34691111+matejchalk@users.noreply.github.com>
Co-authored-by: Matěj Chalk <34691111+matejchalk@users.noreply.github.com>
@BioPhoton BioPhoton requested a review from matejchalk August 19, 2024 01:20
e2e/create-cli-e2e/tests/init.e2e.test.ts Outdated Show resolved Hide resolved
global-setup.e2e.ts Outdated Show resolved Hide resolved
tools/scripts/publish.mjs Outdated Show resolved Hide resolved
BioPhoton and others added 3 commits August 19, 2024 13:52
Co-authored-by: Matěj Chalk <34691111+matejchalk@users.noreply.github.com>
matejchalk
matejchalk previously approved these changes Aug 19, 2024
global-setup.e2e.ts Outdated Show resolved Hide resolved
global-setup.e2e.ts Outdated Show resolved Hide resolved
Co-authored-by: Matěj Chalk <34691111+matejchalk@users.noreply.github.com>
Co-authored-by: Matěj Chalk <34691111+matejchalk@users.noreply.github.com>
matejchalk
matejchalk previously approved these changes Aug 19, 2024
BioPhoton and others added 4 commits August 19, 2024 14:11
Co-authored-by: Matěj Chalk <34691111+matejchalk@users.noreply.github.com>
Co-authored-by: Matěj Chalk <34691111+matejchalk@users.noreply.github.com>
@BioPhoton BioPhoton merged commit 890a7fe into main Aug 19, 2024
30 checks passed
@BioPhoton BioPhoton deleted the add-create-cli-package branch August 19, 2024 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🦾 CI/CD continuous integration and deployment 🧩 nx-plugin 📖 Project documentation improvements or additions to the project documentation 🔬 testing writing tests 🛠️ tooling 🤓 UX UX improvement for CLI users
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants