Skip to content

Conversation

@beaussan
Copy link
Contributor

@beaussan beaussan commented Dec 10, 2025

Summary

  • Fix CLI package publishing by ensuring the bin directory is properly included in the npm package
  • Update build configuration to preserve executable permissions for bin/index.js
  • Move bin entry point reference from index.js to ./bin/index.js in package.json

This fix addresses an issue where the CLI binary wasn't being included in the published npm package because the files field in package.json only included the src directory. Without this fix, users installing the package via npm wouldn't get the executable bin file.

Impact

  • Users: Fixes installation issues for CLI users - the code-pushup command will now work correctly after npm install
  • Publishing: Ensures bin directory is included in published package with correct permissions
  • Build System: Updated Nx build configuration to explicitly include bin directory in assets
  • Risk: Very low - this is a build/packaging fix with no runtime code changes
  • Breaking Changes: None - this is a bug fix that makes the package work as intended

Technical Details

The fix involves:

  1. Adding bin directory to the build assets in project.json to ensure it's copied during build
  2. Updating the bin path in package.json from index.js to ./bin/index.js to match the actual file location
  3. The empty bin/index.js file is tracked in git with executable permissions (+x) to ensure they're preserved through version control and build processes

This follows a similar pattern to a previous fix (commit 0fd2eb4) that addressed executable permissions for the old location.

@nx-cloud
Copy link

nx-cloud bot commented Dec 10, 2025

View your CI Pipeline Execution ↗ for commit a586dcd

Command Status Duration Result
nx run ci:code-pushup -- merge-diffs --files=/h... ✅ Succeeded 5s View ↗
nx run-many --targets=code-pushup --parallel=fa... ✅ Succeeded 1m 11s View ↗
nx run-many --targets=code-pushup --parallel=fa... ✅ Succeeded 1m 12s View ↗
nx run-many -t unit-test,int-test ✅ Succeeded <1s View ↗

☁️ Nx Cloud last updated this comment at 2025-12-10 21:02:05 UTC

@pkg-pr-new
Copy link

pkg-pr-new bot commented Dec 10, 2025

Open in StackBlitz

@code-pushup/ci

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

@code-pushup/cli

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

@code-pushup/core

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

@code-pushup/create-cli

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

@code-pushup/models

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

@code-pushup/nx-plugin

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

@code-pushup/axe-plugin

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

@code-pushup/coverage-plugin

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

@code-pushup/js-packages-plugin

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

@code-pushup/eslint-plugin

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

@code-pushup/jsdocs-plugin

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

@code-pushup/lighthouse-plugin

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

@code-pushup/typescript-plugin

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

@code-pushup/utils

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

commit: a586dcd

@beaussan beaussan changed the title fix: make code-pushup bin +x stable fix: ensure CLI bin directory is included in published package with executable permissions Dec 10, 2025
@beaussan beaussan force-pushed the fix-permissions-build-code-pushup-cli branch from dad6225 to 330ff7c Compare December 10, 2025 20:36
@beaussan beaussan force-pushed the fix-permissions-build-code-pushup-cli branch from 330ff7c to 17a0669 Compare December 10, 2025 20:36
Copy link
Collaborator

@BioPhoton BioPhoton left a comment

Choose a reason for hiding this comment

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

Thx for the update! Looks good to me!
Maybe a comment in code to explain the why?

@github-actions
Copy link
Contributor

github-actions bot commented Dec 10, 2025

Code PushUp

😟 Code PushUp report has regressed – compared current commit a86654b with previous commit a86654b.

🏷️ Categories

🏷️ Category ⭐ Previous score ⭐ Current score 🔄 Score change
Performance 🔴 46 🔴 34 ↓ −11.8
Bug prevention 🟡 67 🟡 67
Code style 🟢 100 🟢 100
Code coverage 🟡 89 🟡 89
Security 🔴 43 🔴 43
Updates 🟡 71 🟡 71
Type Safety 🟡 56 🟡 56
Miscellaneous 🟡 67 🟡 67
Documentation 🔴 35 🔴 35
Accessibility 🟢 92 🟢 92
Best Practices 🟢 100 🟢 100
SEO 🟢 92 🟢 92
👎 1 group regressed, 👎 5 audits regressed, 12 audits changed without impacting score

🗃️ Groups

🔌 Plugin 🗃️ Group ⭐ Previous score ⭐ Current score 🔄 Score change
Lighthouse Performance 🔴 46 🔴 34 ↓ −11.8

33 other groups are unchanged.

🛡️ Audits

🔌 Plugin 🛡️ Audit 📏 Previous value 📏 Current value 🔄 Value change
Lighthouse Total Blocking Time 🟥 770 ms 🟥 1,970 ms ↑ +155.6 %
Lighthouse Speed Index 🟥 6.0 s 🟥 7.3 s ↑ +20.3 %
Lighthouse Max Potential First Input Delay 🟥 430 ms 🟥 1,520 ms ↑ +256.3 %
Lighthouse First Contentful Paint 🟥 3.1 s 🟥 3.5 s ↑ +12.3 %
Lighthouse Time to Interactive 🟥 11.9 s 🟥 13.6 s ↑ +13.8 %
Lighthouse Minimizes main-thread work 🟥 5.9 s 🟥 10.4 s ↑ +75.9 %
Lighthouse JavaScript execution time 🟥 2.1 s 🟥 4.6 s ↑ +118.3 %
Lighthouse Largest Contentful Paint 🟥 10.8 s 🟥 12.6 s ↑ +16.7 %
Lighthouse Metrics 🟩 100% 🟩 100% ↑ +13.8 %
Lighthouse Avoids enormous network payloads 🟩 Total size was 2,055 KiB 🟩 Total size was 2,055 KiB ↑ +0.1 %
Lighthouse Server Backend Latencies 🟩 1,320 ms 🟩 1,860 ms ↑ +41.6 %
Lighthouse Uses efficient cache policy on static assets 🟨 30 resources found 🟨 30 resources found ↑ +0.1 %
Lighthouse Reduce unused CSS 🟥 Potential savings of 94 KiB 🟥 Potential savings of 94 KiB ↑ +33.3 %
Lighthouse Reduce unused JavaScript 🟥 Potential savings of 187 KiB 🟥 Potential savings of 187 KiB ↑ +16.7 %
Lighthouse Remove duplicate modules in JavaScript bundles 🟥 Potential savings of 105 KiB 🟥 Potential savings of 103 KiB ↑ +33.3 %
Lighthouse Network Round Trip Times 🟩 20 ms 🟩 70 ms ↑ +356.2 %
Lighthouse Initial server response time was short 🟩 Root document took 590 ms 🟩 Root document took 550 ms ↓ −5.9 %

661 other audits are unchanged.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 10, 2025

Code PushUp

😐 Code PushUp report is unchanged – compared current commit a86654b with previous commit a86654b.


All of 14 projects are unchanged.

@BioPhoton BioPhoton merged commit 0b0d17a into code-pushup:main Dec 10, 2025
21 checks passed
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.

2 participants