Skip to content

fix: do not prompt for modules if an empty list is provided #888

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

cjpearson
Copy link

πŸ”— Linked issue

Resolves #887

❓ 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

When --modules is not used, ctx.args.modules will be undefined and when --modules '' or --modules is used, it will be an empty string. With this change, we will only prompt in the undefined case, allowing users to explicitly skip the prompt if they want.

@cjpearson cjpearson requested a review from danielroe as a code owner May 24, 2025 10:20
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

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

Files with missing lines Patch % Lines
packages/nuxi/src/commands/init.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #888   +/-   ##
=======================================
  Coverage        ?   12.99%           
=======================================
  Files           ?       69           
  Lines           ?     3587           
  Branches        ?      100           
=======================================
  Hits            ?      466           
  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.

Copy link

pkg-pr-new bot commented May 24, 2025

Open in StackBlitz

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

commit: 81fb136

@danielroe
Copy link
Member

danielroe commented May 24, 2025

maybe we could support and document '--no-modules' (which should work implicitly)

@cjpearson
Copy link
Author

That could definitely work too. I think it's more direct, but I wasn't sure how to handle if it's combined with --modules. If --no-modules is passed should it only skip the prompt or also skip the provided modules?

@danielroe
Copy link
Member

both i think. citty handles --no prefix for all args i think ...

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.

Modules prompt triggers when empty module list is passed
3 participants