Skip to content

Conversation

@OrbisK
Copy link
Member

@OrbisK OrbisK commented Apr 4, 2025

πŸ”— Linked issue

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

This PR detects the pm used when running the nuxi init (create nuxt) and sets it as the default for the pm selection.

image

Tested all (!deno) pms locally.

@OrbisK OrbisK requested a review from danielroe as a code owner April 4, 2025 13:53
label: pm,
value: pm,
hint: currentPackageManager === pm ? 'current' : undefined,
} satisfies SelectPromptOptions['options'][number]))
Copy link
Member Author

Choose a reason for hiding this comment

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

as far as i know there is no exported type for this

@codecov-commenter
Copy link

codecov-commenter commented Apr 4, 2025

Codecov Report

Attention: Patch coverage is 5.26316% with 18 lines in your changes missing coverage. Please review.

Please upload report for BASE (main@41ea525). Learn more about missing BASE report.

Files with missing lines Patch % Lines
packages/nuxi/src/commands/init.ts 5.26% 18 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #838   +/-   ##
=======================================
  Coverage        ?   13.01%           
=======================================
  Files           ?       69           
  Lines           ?     3588           
  Branches        ?      100           
=======================================
  Hits            ?      467           
  Misses          ?     3090           
  Partials        ?       31           

β˜” View full report in Codecov by Sentry.
πŸ“’ Have feedback on the report? Share it here.

πŸš€ New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • πŸ“¦ JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Apr 4, 2025

Open in StackBlitz

npm i https://pkg.pr.new/create-nuxt@838
npm i https://pkg.pr.new/nuxi@838
npm i https://pkg.pr.new/@nuxt/cli@838

commit: b1719b9

Copy link
Member

@danielroe danielroe left a comment

Choose a reason for hiding this comment

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

I love it!

@danielroe danielroe changed the title feat(init): detect current pm and use as initial value feat(init): default to install with current package manager Apr 4, 2025
@danielroe danielroe merged commit 8d365f5 into nuxt:main Apr 4, 2025
8 of 11 checks passed
@github-actions github-actions bot mentioned this pull request Apr 4, 2025
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