Skip to content

feat(create-astro): add nub package manager support - #17487

Open
colinhacks wants to merge 3 commits into
withastro:mainfrom
colinhacks:nub-package-manager
Open

feat(create-astro): add nub package manager support#17487
colinhacks wants to merge 3 commits into
withastro:mainfrom
colinhacks:nub-package-manager

Conversation

@colinhacks

Copy link
Copy Markdown
Contributor

Changes

create-astro already detects nub as the active package manager (from npm_config_user_agent) and drives it correctly for install and astro add via the generic passthrough and nub dlx. Two printed run commands were still wrong for nub:

  • next-steps.ts — the commandMap had no nub entry, so nub users fell back to npm run dev. Added nub: 'nub run dev'.
  • template.ts (processTemplateReadme) — the non-npm path replaced npm run with the bare package-manager name, turning npm run dev into nub dev. nub has no implicit script shortcut, so that is invalid. It now maps npm run <script> to nub run <script>, keeping the explicit run.

pnpm/yarn/bun output is unchanged. Changeset included.

Testing

Verified the code path a nub user hits: detection yields packageManager === 'nub', commandMap.nub returns nub run dev, and processTemplateReadme rewrites npm run dev to nub run dev while leaving bare npm (e.g. npm install -> nub install) and the pnpm/yarn/bun branches untouched.

Docs

No docs change needed — this only corrects the package-manager commands create-astro prints for an already-detected manager.

Copilot AI review requested due to automatic review settings July 22, 2026 22:08

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@changeset-bot

changeset-bot Bot commented Jul 22, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: c8dc949

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
create-astro Patch

Not sure what this means? Click here to learn what changesets are.

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

@github-actions github-actions Bot added the pkg: create-astro Related to the `create-astro` package (scope) label Jul 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pkg: create-astro Related to the `create-astro` package (scope)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants