Skip to content

Conversation

BioPhoton
Copy link
Collaborator

@BioPhoton BioPhoton commented Sep 5, 2025

Precondition:

This PR includes:

  • allows us to execute the repositories code of:
    • cli project'
    • nx-plugin projects executors (not the target inference)
  • removes pluginBin option as it would only help product development and is not working with dependent bundles
  • more intuitive naming

Note

After this is merged is should be possible to use it locally like this:

_nx.json.defaultTargets

"code-pushup": {
      "dependsOn": ["cli:build", "nx-plugin:build"],
      "executor": "@copde-pushup/nx-plugin:cli",
      "options": {
        "bin": "./packages/cli/dist",
        "env": {
          "NODE_OPTIONS": "--import tsx",
          "TSX_TSCONFIG_PATH": "tsconfig.base.json"
        }
    }
}

or

nx.json.plugins

{
      "plugin": "@code-pushup/nx-plugin",
      "options": {
        "cliBin": "./packages/cli/dist",
        "env": {
          "NODE_OPTIONS": "--import tsx",
          "TSX_TSCONFIG_PATH": "tsconfig.base.json"
        }
    }
}

Then run: nx code-pushup

You will see a log that prints the executed command as copy past version for you to re-ensure the setup.
NODE_OPTIONS="--import tsx" TSX_TSCONFIG_PATH="tsconfig.base.json" npx @code-pushup/cli --verbose --no-progress --config="code-pushup.config.ts" --upload.project="cli-workspace"

The only thing that is left but blocked by Nx, is using the local target inference code with external dependencies.

Another precondition of:

@github-actions github-actions bot added 📖 Project documentation improvements or additions to the project documentation 🔬 testing writing tests 🧩 nx-plugin labels Sep 5, 2025
Copy link

nx-cloud bot commented Sep 5, 2025

View your CI Pipeline Execution ↗ for commit 24b5d03

Command Status Duration Result
nx code-pushup --nx-bail -- compare ✅ Succeeded 1m 5s View ↗
nx code-pushup --nx-bail -- ✅ Succeeded 1m 14s View ↗
nx code-pushup --nx-bail -- print-config --outp... ✅ Succeeded 4m 17s View ↗

☁️ Nx Cloud last updated this comment at 2025-09-09 00:38:59 UTC

Copy link

nx-cloud bot commented Sep 5, 2025

View your CI Pipeline Execution ↗ for commit 695acbc


☁️ Nx Cloud last updated this comment at 2025-09-05 17:32:01 UTC

Copy link

pkg-pr-new bot commented Sep 5, 2025

Open in StackBlitz

@code-pushup/ci

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

@code-pushup/cli

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

@code-pushup/create-cli

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

@code-pushup/core

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

@code-pushup/models

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

@code-pushup/nx-plugin

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

@code-pushup/coverage-plugin

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

@code-pushup/eslint-plugin

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

@code-pushup/js-packages-plugin

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

@code-pushup/jsdocs-plugin

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

@code-pushup/lighthouse-plugin

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

@code-pushup/typescript-plugin

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

@code-pushup/utils

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

@code-pushup/models-transformers

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

commit: 24b5d03

Copy link

github-actions bot commented Sep 5, 2025

Code PushUp

🤨 Code PushUp report has both improvements and regressions – compared current commit 5e7bc63 with previous commit 3b5db5b.

🕵️ See full comparison in Code PushUp portal 🔍

🏷️ Categories

🏷️ Category ⭐ Previous score ⭐ Current score 🔄 Score change
Performance 🔴 35 🔴 36 ↑ +0.4
Code coverage 🟡 90 🟡 90
Security 🟡 64 🟡 64
Updates 🟡 85 🟡 85
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 🔴 24 🔴 24
👍 1 group improved, 👍 2 audits improved, 👎 2 audits regressed, 16 audits changed without impacting score

🗃️ Groups

🔌 Plugin 🗃️ Group ⭐ Previous score ⭐ Current score 🔄 Score change
Lighthouse Performance 🔴 35 🔴 36 ↑ +0.4

20 other groups are unchanged.

🛡️ Audits

🔌 Plugin 🛡️ Audit 📏 Previous value 📏 Current value 🔄 Value change
Lighthouse First Contentful Paint 🟨 3.0 s 🟥 3.2 s ↑ +6.3 %
Lighthouse Total Blocking Time 🟥 2,840 ms 🟥 1,960 ms ↓ −31.1 %
Lighthouse Speed Index 🟥 6.3 s 🟥 6.7 s ↑ +6.2 %
Lighthouse Max Potential First Input Delay 🟥 1,080 ms 🟥 770 ms ↓ −28.1 %
Lighthouse Avoids enormous network payloads 🟨 Total size was 2,676 KiB 🟨 Total size was 2,684 KiB ↑ +0.3 %
Lighthouse Minimizes main-thread work 🟥 11.2 s 🟥 9.6 s ↓ −14.7 %
Lighthouse Uses efficient cache policy on static assets 🟨 30 resources found 🟨 31 resources found ↑ +0.2 %
Lighthouse JavaScript execution time 🟥 5.2 s 🟥 4.3 s ↓ −18.1 %
Lighthouse Server Backend Latencies 🟩 970 ms 🟩 1,350 ms ↑ +39.4 %
Lighthouse Reduce unused CSS 🟥 Potential savings of 113 KiB 🟥 Potential savings of 113 KiB ↓ −47.5 %
Lighthouse Time to Interactive 🟥 16.8 s 🟥 16.5 s ↓ −1.4 %
Lighthouse Metrics 🟩 100% 🟩 100% ↓ −1.4 %
Lighthouse Largest Contentful Paint 🟥 10.9 s 🟥 10.7 s ↓ −2 %
Lighthouse Reduce unused JavaScript 🟥 Potential savings of 602 KiB 🟥 Potential savings of 605 KiB ↓ −11 %
Lighthouse Initial server response time was short 🟩 Root document took 590 ms 🟩 Root document took 520 ms ↓ −10.9 %
Lighthouse Network Round Trip Times 🟩 10 ms 🟩 50 ms ↑ +369.8 %
Lighthouse Remove duplicate modules in JavaScript bundles 🟥 Potential savings of 97 KiB 🟥 Potential savings of 100 KiB ↑ +6.7 %
Lighthouse Avoids an excessive DOM size 🟥 2,288 elements 🟥 2,303 elements ↑ +0.7 %
JS Packages Outdated NPM dev dependencies. 🟨 50 outdated package versions (21 major, 23 minor, 6 patch) 🟨 56 outdated package versions (21 major, 29 minor, 6 patch) ↑ +12 %
JS Packages Outdated NPM prod dependencies. 🟨 14 outdated package versions (3 major, 6 minor, 5 patch) 🟨 16 outdated package versions (3 major, 8 minor, 5 patch) ↑ +14.3 %

590 other audits are unchanged.

@BioPhoton BioPhoton marked this pull request as ready for review September 5, 2025 17:29
@BioPhoton BioPhoton requested a review from matejchalk September 5, 2025 17:38
@BioPhoton BioPhoton changed the title feat(nx-plugin): allow unreleased code feat(nx-plugin): adjust bin path handling Sep 6, 2025
Comment on lines 40 to 41
"zod": "^4.0.5",
"chalk": "5.3.0"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We already have ansis for terminal colors, please use it instead of introudcing a new dependency.

Suggested change
"zod": "^4.0.5",
"chalk": "5.3.0"
"zod": "^4.0.5"

@github-actions github-actions bot removed the 📖 Project documentation improvements or additions to the project documentation label Sep 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔬 testing writing tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants