Skip to content

Conversation

@matejchalk
Copy link
Collaborator

Fixes error in for Yarn v1 repo where there are no outdated packages, so yarn oudated --json doesn't print any JSON lines.

[ warn ] Plugins failed: 
[ warn ] Error: - Plugin JS Packages (js-packages) produced the following error:
  - file:///REDACTED/node_modules/@code-pushup/js-packages-plugin/src/lib/package-managers/yarn-classic/outdated-result.js:6
    const fields = yarnv1Outdated[1].data.head;
                                     ^
TypeError: Cannot read properties of undefined (reading 'data')
    at Object.yarnv1ToOutdatedResult [as unifyResult] (file:///REDACTED/node_modules/@code-pushup/js-packages-plugin/src/lib/package-managers/yarn-classic/outdated-result.js:6:38)
    at processOutdated (file:///REDACTED/node_modules/@code-pushup/js-packages-plugin/src/lib/runner/index.js:47:42)
    at async executeRunner (file:///REDACTED/node_modules/@code-pushup/js-packages-plugin/src/lib/runner/index.js:28:11)
    at async file:///REDACTED/node_modules/@code-pushup/js-packages-plugin/src/bin.js:5:1
Node.js v22.14.0

@github-actions github-actions bot added the 🧩 js-packages-plugin Plugin for audit and outdated dependencies label Mar 26, 2025
@matejchalk matejchalk marked this pull request as ready for review March 26, 2025 09:58
@matejchalk matejchalk requested a review from vmasek March 26, 2025 09:58
@github-actions
Copy link
Contributor

Code PushUp

🤨 Code PushUp report has both improvements and regressions – compared current commit 6c8c4ca with previous commit bf33ffa.

🕵️ See full comparison in Code PushUp portal 🔍

🏷️ Categories

🏷️ Category ⭐ Previous score ⭐ Current score 🔄 Score change
Performance 🟡 52 🔴 49 ↓ −3.2
Code coverage 🟢 90 🟢 90 ↓ −0.1
Security 🟡 67 🟡 67
Updates 🟡 81 🟡 81
Accessibility 🟢 92 🟢 92
Best Practices 🟢 100 🟢 100
SEO 🟡 61 🟡 61
Type Safety 🟢 100 🟢 100
Bug prevention 🟢 100 🟢 100
Miscellaneous 🟢 100 🟢 100
Code style 🟢 100 🟢 100
Documentation 🔴 23 🔴 23
👎 2 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 🟡 52 🔴 49 ↓ −3.2
Code coverage Code coverage metrics 🟢 90 🟢 90 ↓ −0.1

19 other groups are unchanged.

🛡️ Audits

🔌 Plugin 🛡️ Audit 📏 Previous value 📏 Current value 🔄 Value change
Lighthouse First Contentful Paint 🟨 2.7 s 🟥 3.1 s ↑ +12.5 %
Lighthouse Speed Index 🟥 5.9 s 🟥 6.4 s ↑ +8.9 %
Lighthouse Largest Contentful Paint 🟨 3.5 s 🟨 3.7 s ↑ +6.1 %
Lighthouse Time to Interactive 🟥 12.5 s 🟥 12.9 s ↑ +3.4 %
Lighthouse Total Blocking Time 🟥 3,870 ms 🟥 3,350 ms ↓ −13.4 %
Code coverage Branch coverage 🟨 86 % 🟨 86 % ↓ −0.1 %
Lighthouse Avoids enormous network payloads 🟩 Total size was 1,838 KiB 🟩 Total size was 1,839 KiB ↑ +0.1 %
Lighthouse Metrics 🟩 100% 🟩 100% ↑ +3.4 %
Lighthouse JavaScript execution time 🟥 5.6 s 🟥 5.9 s ↑ +6.1 %
Lighthouse Minimizes main-thread work 🟥 15.3 s 🟥 15.1 s ↓ −1.2 %
Lighthouse Uses efficient cache policy on static assets 🟨 28 resources found 🟨 28 resources found ↓ −0.1 %
Lighthouse Max Potential First Input Delay 🟥 1,560 ms 🟥 1,700 ms ↑ +8.6 %
Lighthouse Eliminate render-blocking resources 🟥 Potential savings of 810 ms 🟥 Potential savings of 690 ms ↓ −14 %
Lighthouse Initial server response time was short 🟩 Root document took 430 ms 🟩 Root document took 520 ms ↑ +22.4 %
Lighthouse Server Backend Latencies 🟩 310 ms 🟩 360 ms ↑ +15.2 %
Lighthouse Network Round Trip Times 🟩 20 ms 🟩 60 ms ↑ +141.1 %
Lighthouse Reduce unused CSS 🟥 Potential savings of 67 KiB 🟥 Potential savings of 67 KiB ↑ +3.3 %
JS Packages Outdated NPM dev dependencies. 🟨 52 outdated package versions (27 major, 19 minor, 6 patch) 🟨 53 outdated package versions (27 major, 19 minor, 6 patch, 1 prerelease) ↑ +1.9 %
Lighthouse Avoid large layout shifts 🟩 0 🟩 1 layout shift found ↑ +∞ %
Lighthouse Avoids an excessive DOM size 🟥 2,167 elements 🟥 2,166 elements ↓ −0.1 %
Lighthouse Cumulative Layout Shift 🟩 0 🟩 0.002 ↑ +∞ %

582 other audits are unchanged.

@matejchalk matejchalk merged commit a8cb081 into main Mar 26, 2025
17 checks passed
@matejchalk matejchalk deleted the fix-empty-yarn-outdated branch March 26, 2025 10:04
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants