Skip to content

feat(cli): handle nub package manager commands - #8786

Open
colinhacks wants to merge 1 commit into
QwikDev:v1from
colinhacks:feat/detect-nub
Open

feat(cli): handle nub package manager commands#8786
colinhacks wants to merge 1 commit into
QwikDev:v1from
colinhacks:feat/detect-nub

Conversation

@colinhacks

Copy link
Copy Markdown

The Qwik CLI already detects nub — getPackageManager() passes through the which-pm-runs name — 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, so nub dev is not valid; scripts run via nub run dev. Its executor is nubx, not a bare nub <bin>.

This routes nub through the run-prefixed form in pmRunCmd() (alongside npm) and maps it to nubx in runInPkg(). Install is unaffected — installDeps already spawns <pm> install.

@colinhacks
colinhacks requested a review from a team as a code owner July 1, 2026 01:53
Copilot AI review requested due to automatic review settings July 1, 2026 01:53
@changeset-bot

changeset-bot Bot commented Jul 1, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 67c8ebf

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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" for nub (and npm), aligning with managers that don’t support an implicit script shortcut.
  • Update runInPkg() to use nubx when the detected package manager is nub, aligning with nub’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.

Comment on lines 12 to 14
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);
wmertens
wmertens previously approved these changes Jul 2, 2026

@wmertens wmertens left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@wmertens
wmertens enabled auto-merge July 2, 2026 09:46
@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor
built with Refined Cloudflare Pages Action

⚡ Cloudflare Pages Deployment

Name Status Preview Last Commit
qwik-docs ✅ Ready (View Log) Visit Preview 67c8ebf

@colinhacks

Copy link
Copy Markdown
Author

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.

@wmertens
wmertens changed the base branch from main to v1 July 16, 2026 14:26
@wmertens
wmertens dismissed their stale review July 16, 2026 14:26

The base branch was changed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants