Skip to content

chore: use @code-pushup/nx-plugin in repo - #1091

Open
BioPhoton wants to merge 87 commits into
mainfrom
use-cp-nx-plugin
Open

chore: use @code-pushup/nx-plugin in repo#1091
BioPhoton wants to merge 87 commits into
mainfrom
use-cp-nx-plugin

Conversation

@BioPhoton

@BioPhotonBioPhoton commented Aug 27, 2025

Copy link
Copy Markdown
Collaborator

Precondition:

This PR includes:

  •  use plugin for main and cached targets
  • use executor on all targets
  • remove existing target configurations in projects
  • add docs
  • add validation helper script

Related:
closes#971

TODO Run local code

tsx is a utility to run TypeScript files in node which is growing in popularity:
https://tsx.is

Behind the scenes it is invoking node with relevant --require and --import flags.

If the user is invoking Nx via a script which is being invoked via tsx, then we
do not need to register any transpiler at all as the environment will have already
been configured by tsx. In fact, registering a transpiler such as ts-node or swc
in this case causes issues.

Because node is being invoked by tsx, the tsx binary does not end up in the final
process.argv and so we need to check a few possible things to account for usage
via different package managers (e.g. pnpm does not set process._ to tsx, but rather
pnpm itself, modern yarn does not set process._ at all etc.).

Changes where tested by:

  1. npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/nx-plugin@1091
  2. add plugin inc options to nx.json
{
"pluginsConfig": {
"@code-pushup/nx-plugin": {
"projectPrefix": "cli",
"bin": "packages/cli/src/index.ts",
"env": {
"NODE_OPTIONS": "--import tsx",
"TSX_TSCONFIG_PATH": "tsconfig.base.json"
}
}
},
"plugins": [
{
"plugin": "@code-pushup/nx-plugin",
"options": {
"targetName": "cp"
}
}
]
}

@nx-cloud

nx-cloudBot commented Aug 28, 2025

Copy link
Copy Markdown

View your CI Pipeline Execution ↗ for commit b403f8e

CommandStatusDurationResult
nx run ci:code-pushup -- merge-diffs --files=/h...❌ Failed1sView ↗
nx run-many --targets=code-pushup --parallel=fa...✅ Succeeded2m 47sView ↗
nx run-many --targets=code-pushup --parallel=fa...✅ Succeeded21m 8sView ↗
nx run-many -t unit-test,int-test✅ Succeeded39sView ↗

☁️ Nx Cloud last updated this comment at 2026-02-23 09:43:06 UTC

@pkg-pr-new

pkg-pr-newBot commented Aug 28, 2025

Copy link
Copy Markdown

Open in StackBlitz

@code-pushup/ci

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

@code-pushup/cli

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

@code-pushup/core

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

@code-pushup/create-cli

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

@code-pushup/models

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

@code-pushup/axe-plugin

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/axe-plugin@1091

@code-pushup/nx-plugin

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

@code-pushup/coverage-plugin

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

@code-pushup/eslint-plugin

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

@code-pushup/js-packages-plugin

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

@code-pushup/jsdocs-plugin

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

@code-pushup/lighthouse-plugin

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

@code-pushup/typescript-plugin

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

@code-pushup/utils

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

commit: b403f8e

Comment threade2e/nx-plugin-e2e/tests/plugin-create-nodes.e2e.test.ts Outdated
@github-actionsgithub-actionsBot added the 📖 Project documentation improvements or additions to the project documentation label Sep 4, 2025
# Conflicts:
#	packages/nx-plugin/src/executors/cli/schema.json
#	packages/nx-plugin/src/executors/cli/schema.ts
@BioPhoton
BioPhoton marked this pull request as ready for review September 4, 2025 14:23
Michael Hladky added 2 commits December 4, 2025 21:11
# Conflicts:
#	e2e/nx-plugin-e2e/tests/plugin-create-nodes.e2e.test.ts
#	packages/nx-plugin/src/executors/cli/executor.int.test.ts
#	packages/nx-plugin/src/executors/cli/executor.unit.test.ts
#	packages/utils/src/index.ts
#	packages/utils/src/lib/logger.ts
#	packages/utils/src/lib/transform.unit.test.ts
@github-actions

github-actionsBot commented Dec 15, 2025

Copy link
Copy Markdown
Contributor

Code PushUp

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

🕵️ See full comparison in Code PushUp portal 🔍

🏷️ Categories

🏷️ Category⭐ Previous score⭐ Current score🔄 Score change
Security🔴 39🔴 0↓ −38.7
Performance🔴 36🔴 47↑ +10.4
Best Practices🟢 100🟢 97↓ −3.4
Updates🟡 75🟡 72↓ −3.3
Code coverage🟢 93🟢 93↓ −0.1
Bug prevention🟡 75🟡 75↓ −0.1
Axe Accessibility🟡 88🟡 88↓ −0.1
Code style🟢 100🟢 100
Type Safety🟡 67🟡 67
Miscellaneous🟡 67🟡 67
Documentation🟡 53🟡 53
Accessibility🟢 92🟢 92
SEO🟢 92🟢 92
👍 1 group improved, 👎 4 groups regressed, 👍 5 audits improved, 👎 7 audits regressed, 18 audits changed without impacting score

🗃️ Groups

🔌 Plugin🗃️ Group⭐ Previous score⭐ Current score🔄 Score change
JS packagesnpm audit🔴 39🔴 0↓ −38.7
LighthousePerformance🔴 36🔴 47↑ +10.4
LighthouseBest Practices🟢 100🟢 97↓ −3.4
JS packagesnpm outdated dependencies🟡 75🟡 72↓ −3.3
Code coverageCode coverage metrics🟢 93🟢 93↓ −0.1

29 other groups are unchanged.

🛡️ Audits

🔌 Plugin🛡️ Audit📏 Previous value📏 Current value🔄 Value change
LighthouseNo issues in the Issues panel in Chrome Devtools🟩 passed🟥 failed↓ −100 %
LighthouseReduce unused JavaScript🟥 Potential savings of 225 KiB🟨 Potential savings of 256 KiB↓ −100 %
LighthouseRemove duplicate modules in JavaScript bundles🟥 Potential savings of 93 KiB🟨 Potential savings of 80 KiB↓ −100 %
JS packagesVulnerabilities for npm prod dependencies.🟥 12 vulnerabilities (3 high, 2 moderate, 7 low)🟥 22 vulnerabilities (13 high, 3 moderate, 6 low)↑ +83.3 %
LighthouseLargest Contentful Paint🟥 11.6 s🟥 4.5 s↓ −61.2 %
LighthouseSpeed Index🟥 7.3 s🟥 6.1 s↓ −16.3 %
LighthouseFirst Contentful Paint🟥 3.1 s🟨 2.9 s↓ −5.9 %
JS packagesOutdated npm prod dependencies.🟨 20 outdated package versions (6 major, 10 minor, 4 patch)🟨 22 outdated package versions (7 major, 11 minor, 4 patch)↑ +10 %
LighthouseTotal Blocking Time🟥 1,630 ms🟥 1,890 ms↑ +16.2 %
JS packagesOutdated npm dev dependencies.🟨 62 outdated package versions (29 major, 25 minor, 8 patch)🟨 62 outdated package versions (30 major, 26 minor, 6 patch) +0 %
Code coverageLine coverage🟩 92.7 %🟩 92.6 %↓ −0.1 %
Code coverageBranch coverage🟨 89.2 %🟨 89.1 %↓ −0.1 %
LighthouseAvoids enormous network payloads🟩 Total size was 2,091 KiB🟩 Total size was 2,135 KiB↑ +2.1 %
LighthouseServer Backend Latencies🟩 310 ms🟩 1,990 ms↑ +537.3 %
LighthouseUses efficient cache policy on static assets🟨 31 resources found🟨 31 resources found↑ +0.1 %
LighthouseReduce unused CSS🟥 Potential savings of 111 KiB🟥 Potential savings of 110 KiB↓ −91.7 %
LighthouseJavaScript execution time🟥 3.0 s🟥 3.4 s↑ +13 %
LighthouseMinimizes main-thread work🟥 10.3 s🟥 10.1 s↓ −1.3 %
LighthouseMax Potential First Input Delay🟥 990 ms🟥 1,090 ms↑ +9.9 %
LighthouseInitial server response time was short🟩 Root document took 510 ms🟩 Root document took 600 ms↑ +17.4 %
JS packagesVulnerabilities for npm dev dependencies.🟥 48 vulnerabilities (3 critical, 9 high, 32 moderate, 4 low)🟥 81 vulnerabilities (3 critical, 65 high, 10 moderate, 3 low)↑ +68.8 %
LighthouseNetwork Round Trip Times🟩 30 ms🟩 10 ms↓ −71.6 %
LighthouseTime to Interactive🟥 13.5 s🟥 13.5 s↑ +0.1 %
LighthouseMetrics🟩 100%🟩 100%↑ +0.1 %
LighthouseAvoids an excessive DOM size🟥 2,366 elements🟥 2,360 elements↓ −0.3 %
AxeElements must only use supported ARIA attributes🟩 101 elements🟩 96 elements↓ −5 %
AxeARIA attributes must be used as specified for the element's role🟩 101 elements🟩 96 elements↓ −5 %
AxeElements must only use permitted ARIA attributes🟩 101 elements🟩 96 elements↓ −5 %
AxeARIA attributes must conform to valid names🟩 101 elements🟩 96 elements↓ −5 %
LighthouseCumulative Layout Shift🟩 0🟩 0.001↑ +∞ %

649 other audits are unchanged.

Comment threadpackage.json Outdated
Comment threadpackage.json Outdated
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@BioPhoton