Skip to content

refactor: shared command descriptions and --cwd default - #592

Merged
danielroe merged 5 commits into
nuxt:mainfrom
BobbieGoede:fix/command-description-and-default
Dec 11, 2024
Merged

danielroe merged 5 commits into
nuxt:mainfrom
BobbieGoede:fix/command-description-and-default

Conversation

@BobbieGoede

@BobbieGoede BobbieGoede commented Dec 8, 2024 •

Copy link
Copy Markdown
Member

🔗 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

Is this a refactor and/or docs change 🤷

I found the ROOTDIR and cwd default value or fallback value a bit confusing, these changes should be functionally the same but instead handles the fallback to the shared argument configuration. Please make sure to check I'm not misunderstanding the fallback logic 😬

I'm slowly working on syncing the descriptions between the command usage -h output and those described on docs/api/commands pages, more PRs to come.

@BobbieGoede BobbieGoede self-assigned this Dec 8, 2024
@codecov-commenter

codecov-commenter commented Dec 8, 2024 •

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 1.13636% with 87 lines in your changes missing coverage. Please review.

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

Files with missing lines Patch % Lines
src/commands/_shared.ts 4.76% 20 Missing ⚠️
src/commands/module/add.ts 0.00% 5 Missing ⚠️
src/commands/add.ts 0.00% 4 Missing ⚠️
src/commands/analyze.ts 0.00% 4 Missing ⚠️
src/commands/build-module.ts 0.00% 4 Missing ⚠️
src/commands/build.ts 0.00% 4 Missing ⚠️
src/commands/dev-child.ts 0.00% 4 Missing ⚠️
src/commands/dev.ts 0.00% 4 Missing ⚠️
src/commands/prepare.ts 0.00% 4 Missing ⚠️
src/commands/preview.ts 0.00% 4 Missing ⚠️
... and 9 more
Additional details and impacted files
@@          Coverage Diff           @@
##             main    #592   +/-   ##
======================================
  Coverage        ?   1.31%           
======================================
  Files           ?      44           
  Lines           ?    2882           
  Branches        ?      44           
======================================
  Hits            ?      38           
  Misses          ?    2803           
  Partials        ?      41           

☔ 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.

@BobbieGoede

Copy link
Copy Markdown
Member Author

I split up sharedArgs into cwdArgs and logLevelArgs, as not all commands actually used the --log-level, this removes some noise from the docs as well in nuxt/nuxt#30199

Comment thread src/commands/_shared.ts Outdated
@danielroe
danielroe merged commit 0245c91 into nuxt:main Dec 11, 2024
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.

4 participants