Skip to content

Conversation

@BioPhoton
Copy link
Collaborator

@BioPhoton BioPhoton commented Apr 14, 2024

This PR adds logic to be able to select the history range also by semver styles tag names.

It includes:

  • a new package compare-versions for the semver string comparison
  • new options semverTag to history command options
  • new git helper: ``
  • new utils semver.ts which maintains semver helper: normalizeSemver, isSemver, sortSemver
  • add helper to the history command: normalizeHashOptions
  • refactoring of git utils tests
    • split out new file git.commits-and-tags
    • separate tests onto 1 function per block => easier to keep overview and move tests
    • reduced integration and extended unit tests
  • add helper to test/utils to create git repos and add commits

Note

If the way how I implemented the git helper form test/utils I would also refactor the other tests in the same style.
Examples:

@github-actions github-actions bot added 📖 Project documentation improvements or additions to the project documentation 🔬 testing writing tests 🧩 cli 🧩 core labels Apr 14, 2024
@nx-cloud
Copy link

nx-cloud bot commented Apr 14, 2024

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 11aa822. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this CI Pipeline Execution


✅ Successfully ran 5 targets

Sent with 💌 from NxCloud.

@github-actions github-actions bot removed the 📖 Project documentation improvements or additions to the project documentation label Apr 14, 2024
@BioPhoton BioPhoton changed the title feat(cli): add "semverTag" options to history command feat(cli): add option semverTag to history command Apr 14, 2024
@github-actions
Copy link
Contributor

github-actions bot commented Apr 14, 2024

Code PushUp

🤨 Code PushUp report has both improvements and regressions – compared target commit bb6d45b with source commit f11f8a7.

🏷️ Categories

🏷️ Category ⭐ Current score ⭐ Previous score 🔄 Score change
Performance 🟡 87 🟡 85 ↑ +2.2
Updates 🟡 70 🟡 69 ↑ +0.7
Code coverage 🟡 67 🟡 67 ↑ +0.6
Accessibility 🟢 100 🟢 100
Best Practices 🟢 100 🟢 100
SEO 🟡 86 🟡 86
PWA 🟡 63 🟡 63
Bug prevention 🟢 100 🟢 100
Code style 🟢 99 🟢 99
Security 🟡 80 🟡 80
Custom checks 🟡 67 🟡 67

🗃️ Groups

👍 3 groups improved
🔌 Plugin 🗃️ Group ⭐ Current score ⭐ Previous score 🔄 Score change
Lighthouse Performance 🟡 87 🟡 85 ↑ +2.2
JS Packages NPM outdated dependencies 🟡 70 🟡 69 ↑ +0.7
Code coverage Code coverage metrics 🟡 67 🟡 67 ↑ +0.6

18 other groups are unchanged.

🛡️ Audits

👍 6 audits improved, 👎 4 audits regressed, 11 audits changed without impacting score
🔌 Plugin 🛡️ Audit 📏 Current value 📏 Previous value 🔄 Value change
Lighthouse Largest Contentful Paint element 🟥 2,920 ms 🟩 2,500 ms  −∞ %
Lighthouse Total Blocking Time 🟨 340 ms 🟨 490 ms ↓ −30 %
Lighthouse Largest Contentful Paint 🟨 2.9 s 🟩 2.5 s ↑ +17 %
Lighthouse Max Potential First Input Delay 🟥 370 ms 🟥 440 ms ↓ −14 %
JS Packages Outdated NPM dev dependencies. 🟥 48 outdated package versions (25 major, 19 minor, 4 patch) 🟥 45 outdated package versions (25 major, 14 minor, 6 patch) ↑ +7 %
Lighthouse First Contentful Paint 🟩 1.4 s 🟩 1.5 s ↓ −12 %
Lighthouse Time to Interactive 🟩 3.1 s 🟩 3.3 s ↓ −7 %
Code coverage Function coverage 🟨 61 % 🟨 59 % ↑ +3 %
Code coverage Branch coverage 🟨 82 % 🟨 82 %  +0 %
Code coverage Line coverage 🟨 64 % 🟨 65 % ↓ −2 %
Lighthouse Minimizes main-thread work 🟥 3.3 s 🟥 3.8 s ↓ −12 %
Lighthouse Properly size images 🟥 Potential savings of 327 KiB 🟥 Potential savings of 327 KiB ↓ −20 %
Lighthouse Metrics 🟩 3083 🟩 3331 ↓ −7 %
Lighthouse First Meaningful Paint 🟩 1.4 s 🟩 1.6 s ↓ −13 %
Lighthouse JavaScript execution time 🟩 0.9 s 🟩 0.8 s ↑ +13 %
Lighthouse Initial server response time was short 🟩 Root document took 80 ms 🟩 Root document took 0 ms ↑ +1800 %
Lighthouse Avoids enormous network payloads 🟩 Total size was 467 KiB 🟩 Total size was 467 KiB ↑ +0 %
Lighthouse Uses efficient cache policy on static assets 🟨 14 resources found 🟨 14 resources found ↑ +0 %
Lighthouse Speed Index 🟩 1.9 s 🟩 2.0 s ↓ −2 %
Lighthouse Server Backend Latencies 🟩 20 ms 🟩 10 ms ↑ +143 %
Lighthouse Network Round Trip Times 🟩 0 ms 🟩 0 ms ↑ +100 %

502 other audits are unchanged.

@BioPhoton BioPhoton marked this pull request as ready for review April 14, 2024 20:27
@BioPhoton BioPhoton requested a review from Tlacenka as a code owner April 14, 2024 20:27
@BioPhoton BioPhoton requested review from matejchalk and removed request for Tlacenka April 14, 2024 20:27
BioPhoton and others added 5 commits April 16, 2024 12:08
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>
Co-authored-by: Matěj Chalk <34691111+matejchalk@users.noreply.github.com>
@github-actions github-actions bot added the 📖 Project documentation improvements or additions to the project documentation label Apr 16, 2024
matejchalk
matejchalk previously approved these changes Apr 16, 2024
@BioPhoton BioPhoton enabled auto-merge (squash) April 16, 2024 12:02
@BioPhoton BioPhoton requested a review from matejchalk April 27, 2024 15:49
@BioPhoton BioPhoton changed the title feat(cli): add option semverTag to history command feat(cli): add option onlySemverTag to history command Apr 27, 2024
@BioPhoton BioPhoton merged commit 357b1fa into main Apr 29, 2024
@BioPhoton BioPhoton deleted the add-semver-tag-to-history-command branch April 29, 2024 14:21
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 🧩 utils

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants