Skip to content

Comments

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

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

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

Conversation

@BioPhoton
Copy link
Collaborator

@BioPhoton BioPhoton commented Aug 27, 2025

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
Copy link

nx-cloud bot commented Aug 28, 2025

View your CI Pipeline Execution ↗ for commit b403f8e

Command Status Duration Result
nx run ci:code-pushup -- merge-diffs --files=/h... ❌ Failed 1s View ↗
nx run-many --targets=code-pushup --parallel=fa... ✅ Succeeded 2m 47s View ↗
nx run-many --targets=code-pushup --parallel=fa... ✅ Succeeded 21m 8s View ↗
nx run-many -t unit-test,int-test ✅ Succeeded 39s View ↗

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

@pkg-pr-new
Copy link

pkg-pr-new bot commented Aug 28, 2025

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

@github-actions github-actions bot 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
Copy link
Contributor

github-actions bot commented Dec 15, 2025

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 packages npm audit 🔴 39 🔴 0 ↓ −38.7
Lighthouse Performance 🔴 36 🔴 47 ↑ +10.4
Lighthouse Best Practices 🟢 100 🟢 97 ↓ −3.4
JS packages npm outdated dependencies 🟡 75 🟡 72 ↓ −3.3
Code coverage Code coverage metrics 🟢 93 🟢 93 ↓ −0.1

29 other groups are unchanged.

🛡️ Audits

🔌 Plugin 🛡️ Audit 📏 Previous value 📏 Current value 🔄 Value change
Lighthouse No issues in the Issues panel in Chrome Devtools 🟩 passed 🟥 failed ↓ −100 %
Lighthouse Reduce unused JavaScript 🟥 Potential savings of 225 KiB 🟨 Potential savings of 256 KiB ↓ −100 %
Lighthouse Remove duplicate modules in JavaScript bundles 🟥 Potential savings of 93 KiB 🟨 Potential savings of 80 KiB ↓ −100 %
JS packages Vulnerabilities for npm prod dependencies. 🟥 12 vulnerabilities (3 high, 2 moderate, 7 low) 🟥 22 vulnerabilities (13 high, 3 moderate, 6 low) ↑ +83.3 %
Lighthouse Largest Contentful Paint 🟥 11.6 s 🟥 4.5 s ↓ −61.2 %
Lighthouse Speed Index 🟥 7.3 s 🟥 6.1 s ↓ −16.3 %
Lighthouse First Contentful Paint 🟥 3.1 s 🟨 2.9 s ↓ −5.9 %
JS packages Outdated npm prod dependencies. 🟨 20 outdated package versions (6 major, 10 minor, 4 patch) 🟨 22 outdated package versions (7 major, 11 minor, 4 patch) ↑ +10 %
Lighthouse Total Blocking Time 🟥 1,630 ms 🟥 1,890 ms ↑ +16.2 %
JS packages Outdated 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 coverage Line coverage 🟩 92.7 % 🟩 92.6 % ↓ −0.1 %
Code coverage Branch coverage 🟨 89.2 % 🟨 89.1 % ↓ −0.1 %
Lighthouse Avoids enormous network payloads 🟩 Total size was 2,091 KiB 🟩 Total size was 2,135 KiB ↑ +2.1 %
Lighthouse Server Backend Latencies 🟩 310 ms 🟩 1,990 ms ↑ +537.3 %
Lighthouse Uses efficient cache policy on static assets 🟨 31 resources found 🟨 31 resources found ↑ +0.1 %
Lighthouse Reduce unused CSS 🟥 Potential savings of 111 KiB 🟥 Potential savings of 110 KiB ↓ −91.7 %
Lighthouse JavaScript execution time 🟥 3.0 s 🟥 3.4 s ↑ +13 %
Lighthouse Minimizes main-thread work 🟥 10.3 s 🟥 10.1 s ↓ −1.3 %
Lighthouse Max Potential First Input Delay 🟥 990 ms 🟥 1,090 ms ↑ +9.9 %
Lighthouse Initial server response time was short 🟩 Root document took 510 ms 🟩 Root document took 600 ms ↑ +17.4 %
JS packages Vulnerabilities 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 %
Lighthouse Network Round Trip Times 🟩 30 ms 🟩 10 ms ↓ −71.6 %
Lighthouse Time to Interactive 🟥 13.5 s 🟥 13.5 s ↑ +0.1 %
Lighthouse Metrics 🟩 100% 🟩 100% ↑ +0.1 %
Lighthouse Avoids an excessive DOM size 🟥 2,366 elements 🟥 2,360 elements ↓ −0.3 %
Axe Elements must only use supported ARIA attributes 🟩 101 elements 🟩 96 elements ↓ −5 %
Axe ARIA attributes must be used as specified for the element's role 🟩 101 elements 🟩 96 elements ↓ −5 %
Axe Elements must only use permitted ARIA attributes 🟩 101 elements 🟩 96 elements ↓ −5 %
Axe ARIA attributes must conform to valid names 🟩 101 elements 🟩 96 elements ↓ −5 %
Lighthouse Cumulative Layout Shift 🟩 0 🟩 0.001 ↑ +∞ %

649 other audits are unchanged.

Sign up for free to 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