refactor: normalise on rootDir in most usages#1398
Conversation
commit: |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (26)
🚧 Files skipped from review as they are similar to previous changes (22)
📝 WalkthroughWalkthroughThe CLI now exposes a unified optional Estimated code review effort: 4 (Complex) | ~45 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/nuxt-cli/src/utils/args.ts`:
- Around line 24-25: Update the argument-building logic around the rawArgs
construction to insert the normalized --cwd flag immediately before the --
separator when one is present, rather than always appending it. Preserve
existing behavior when no separator exists, and add a unit test covering nuxi
--cwd apps/web test -- --watch so the parser receives cwd correctly.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 67c68061-5ec3-4d63-8eab-8c01732f5c41
📒 Files selected for processing (26)
packages/nuxt-cli/src/commands/_shared.tspackages/nuxt-cli/src/commands/analyze.tspackages/nuxt-cli/src/commands/build.tspackages/nuxt-cli/src/commands/cleanup.tspackages/nuxt-cli/src/commands/dev-child.tspackages/nuxt-cli/src/commands/dev.tspackages/nuxt-cli/src/commands/devtools.tspackages/nuxt-cli/src/commands/generate.tspackages/nuxt-cli/src/commands/info.tspackages/nuxt-cli/src/commands/init.tspackages/nuxt-cli/src/commands/prepare.tspackages/nuxt-cli/src/commands/preview.tspackages/nuxt-cli/src/commands/test.tspackages/nuxt-cli/src/commands/typecheck.tspackages/nuxt-cli/src/commands/upgrade.tspackages/nuxt-cli/src/main.tspackages/nuxt-cli/src/run-command.tspackages/nuxt-cli/src/run.tspackages/nuxt-cli/src/utils/args.tspackages/nuxt-cli/src/utils/paths.tspackages/nuxt-cli/test/unit/commands/typecheck.spec.tspackages/nuxt-cli/test/unit/global-args.spec.tspackages/nuxt-cli/test/unit/help.spec.tspackages/nuxt-cli/test/unit/run.spec.tspackages/nuxt-cli/test/unit/utils/args.spec.tspackages/nuxt-cli/test/unit/utils/paths.spec.ts
74699ee to
e60fbf0
Compare
🔗 Linked issue
resolves #365
closes #450
📚 Description
this is backwards-compatible. it removes the deprecation of the positional rootDir argument, which is too firmly entrenched in nuxt examples and documentation to remove at this point.
and it hides
--cwdin most cases, while still supporting it, to avoid confusion between 'working directory' and 'root directory'. as a side effect, we also resolve #365 because we parse/handle cwd manually 🙌