feat(cli): handle nub package manager commands - #8786
Conversation
|
There was a problem hiding this comment.
Pull request overview
This PR updates Qwik CLI package-manager command building to support the nub package manager, which differs from other managers in how it runs scripts and executes binaries.
Changes:
- Update
pmRunCmd()to return"<pm> run"fornub(andnpm), aligning with managers that don’t support an implicit script shortcut. - Update
runInPkg()to usenubxwhen the detected package manager isnub, aligning withnub’s binary executor behavior.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| packages/qwik/src/cli/utils/utils.ts | Routes nub through the "<pm> run" form (like npm) when constructing the “run scripts” command prefix. |
| packages/qwik/src/cli/utils/install-deps.ts | Maps nub to nubx for in-package command execution (with an identified script-running edge case to address). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| export function runInPkg(pkgManager: string, args: string[], cwd: string) { | ||
| const cmd = pkgManager === 'npm' ? 'npx' : pkgManager; | ||
| const cmd = pkgManager === 'npm' ? 'npx' : pkgManager === 'nub' ? 'nubx' : pkgManager; | ||
| return runCommand(cmd, args, cwd); |
built with Refined Cloudflare Pages Action⚡ Cloudflare Pages Deployment
|
|
Thanks for the LGTM. The red checks (Release, All requirements are met) look like unrelated fork-CI — a cancelled macOS/webkit E2E job upstream of the release gate, not this diff. Let me know if anything's needed to get it over the line. |

The Qwik CLI already detects nub —
getPackageManager()passes through thewhich-pm-runsname — but two command builders assume every non-npm manager accepts a bare<pm> <script>. That doesn't hold for nub: it has no implicit script shortcut, sonub devis not valid; scripts run vianub run dev. Its executor isnubx, not a barenub <bin>.This routes nub through the
run-prefixed form inpmRunCmd()(alongside npm) and maps it tonubxinrunInPkg(). Install is unaffected —installDepsalready spawns<pm> install.