Skip to content

feat(utils): integrate logger with executeProcess - #1137

Merged
matejchalk merged 9 commits into
mainfrom
log-execute-process
Nov 7, 2025
Merged

feat(utils): integrate logger with executeProcess#1137
matejchalk merged 9 commits into
mainfrom
log-execute-process

Conversation

@matejchalk

@matejchalkmatejchalk commented Nov 5, 2025

Copy link
Copy Markdown
Collaborator

Part of #888

This PR integrates the logger.command() spinner with executeProcess.

  • A spinner with the command and args is always printed.
  • The process's stdout and stderr content is printed if verbose or the process fails.

I also made some further changes that were related:

  • To avoid having to sync the duplicated executeProcess, I've refactored to a dynamic import as I suggested in refactor(utils): command helper #1113 (comment).
  • The process observer is no longer needed to print logs, so I removed many usages. I also removed the process timings, since the spinner already prints the duration.
  • Finally, I removed the debug and silent options from @code-pushup/ci package in favour of having log verbosity inferred from the CP_VERBOSE environment variable, which reduces complexity.

@nx-cloud

nx-cloudBot commented Nov 5, 2025

Copy link
Copy Markdown

View your CI Pipeline Execution ↗ for commit 20aeeb3

CommandStatusDurationResult
nx affected -t e2e-test --parallel=1✅ Succeeded11m 52sView ↗

☁️ Nx Cloud last updated this comment at 2025-11-06 13:13:25 UTC

Comment threadpackages/utils/src/lib/execute-process.ts
@pkg-pr-new

pkg-pr-newBot commented Nov 5, 2025

Copy link
Copy Markdown

Open in StackBlitz

@code-pushup/ci

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/ci@1137

@code-pushup/cli

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/cli@1137

@code-pushup/core

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/core@1137

@code-pushup/create-cli

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/create-cli@1137

@code-pushup/models

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/models@1137

@code-pushup/nx-plugin

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/nx-plugin@1137

@code-pushup/coverage-plugin

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/coverage-plugin@1137

@code-pushup/eslint-plugin

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/eslint-plugin@1137

@code-pushup/jsdocs-plugin

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/jsdocs-plugin@1137

@code-pushup/js-packages-plugin

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/js-packages-plugin@1137

@code-pushup/lighthouse-plugin

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/lighthouse-plugin@1137

@code-pushup/typescript-plugin

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/typescript-plugin@1137

@code-pushup/utils

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/utils@1137

@code-pushup/models-transformers

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/models-transformers@1137

commit: 20aeeb3

@github-actionsgithub-actionsBot added the 🧩 js-packages-plugin Plugin for audit and outdated dependencies label Nov 6, 2025
@github-actions

github-actionsBot commented Nov 6, 2025

Copy link
Copy Markdown
Contributor

Code PushUp

🤨 Code PushUp report has both improvements and regressions – compared current commit c1dc139 with previous commit a72e87c.

🕵️ See full comparison in Code PushUp portal 🔍

🏷️ Categories

🏷️ Category⭐ Previous score⭐ Current score🔄 Score change
Performance🔴 34🔴 35↑ +0.4
Code coverage🟡 88🟡 88↑ +0.1
Documentation🔴 36🔴 36↓ −0.1
Security🟡 56🟡 56
Updates🟡 73🟡 73
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
👍 2 groups improved, 👎 1 group regressed, 👍 4 audits improved, 👎 3 audits regressed, 15 audits changed without impacting score

🗃️ Groups

🔌 Plugin🗃️ Group⭐ Previous score⭐ Current score🔄 Score change
LighthousePerformance🔴 34🔴 35↑ +0.4
Code coverageCode coverage metrics🟡 88🟡 88↑ +0.1
JSDoc coverageDocumentation coverage🔴 36🔴 36↓ −0.1

18 other groups are unchanged.

🛡️ Audits

🔌 Plugin🛡️ Audit📏 Previous value📏 Current value🔄 Value change
LighthouseSpeed Index🟥 7.5 s🟥 6.9 s↓ −7.9 %
LighthouseTime to Interactive🟥 13.9 s🟥 13.4 s↓ −3.3 %
LighthouseTotal Blocking Time🟥 1,820 ms🟥 1,940 ms↑ +6.6 %
JSDoc coverageFunctions coverage🟥 525 undocumented functions🟥 524 undocumented functions↓ −0.2 %
Code coverageBranch coverage🟨 86.4 %🟨 86.5 %↑ +0.1 %
Code coverageFunction coverage🟨 89.4 %🟨 89.4 %↑ +0.1 %
Code coverageLine coverage🟨 84.6 %🟨 84.5 %↓ −0.1 %
LighthouseAvoids enormous network payloads🟩 Total size was 2,066 KiB🟩 Total size was 2,043 KiB↓ −1.1 %
LighthouseLargest Contentful Paint🟥 12.5 s🟥 10.9 s↓ −12.3 %
LighthouseServer Backend Latencies🟩 1,650 ms🟩 210 ms↓ −87.2 %
LighthouseMinimizes main-thread work🟥 13.8 s🟥 13.0 s↓ −6.2 %
LighthouseMetrics🟩 100%🟩 100%↓ −3.3 %
LighthouseUses efficient cache policy on static assets🟨 31 resources found🟨 31 resources found↓ −0.1 %
LighthouseMax Potential First Input Delay🟥 1,650 ms🟥 1,280 ms↓ −22.1 %
LighthouseJavaScript execution time🟥 5.2 s🟥 4.9 s↓ −6.1 %
LighthouseRemove duplicate modules in JavaScript bundles🟥 Potential savings of 105 KiB🟥 Potential savings of 105 KiB↓ −36.2 %
LighthouseReduce unused CSS🟥 Potential savings of 92 KiB🟥 Potential savings of 92 KiB↑ +40.6 %
LighthouseReduce unused JavaScript🟥 Potential savings of 180 KiB🟥 Potential savings of 180 KiB↑ +13.9 %
LighthouseInitial server response time was short🟩 Root document took 580 ms🟩 Root document took 480 ms↓ −18.2 %
LighthouseNetwork Round Trip Times🟩 60 ms🟩 40 ms↓ −32.2 %
LighthouseFirst Contentful Paint🟥 3.4 s🟥 3.4 s↑ +0.1 %
JSDoc coverageProperties coverage🟥 14 undocumented properties🟥 16 undocumented properties↑ +14.3 %

588 other audits are unchanged.

@matejchalk
matejchalk marked this pull request as ready for review November 6, 2025 12:13
@matejchalk
matejchalk merged commit 7b9b6a9 into mainNov 7, 2025
32 of 33 checks passed
@matejchalk
matejchalk deleted the log-execute-process branch November 7, 2025 08:39
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🧩 ci🧩 core🧩 create-cli🧩 js-packages-pluginPlugin for audit and outdated dependencies🧩 nx-plugin📖 Project documentationimprovements or additions to the project documentation🔬 testingwriting tests🛠️ tooling🧩 utils

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@matejchalk@vmasek@github-advanced-security@hanna-skryl