fix(router-cli): pass process.argv.slice(2) to yargs for proper argument parsing#6941
fix(router-cli): pass process.argv.slice(2) to yargs for proper argument parsing#6941ThePott wants to merge 3 commits intoTanStack:mainfrom
Conversation
🦋 Changeset detectedLatest commit: 348c469 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe CLI now initializes yargs with Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
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 |
Bundle Size Benchmarks
Trend sparkline is historical gzip bytes ending with this PR measurement; lower is better. |
|
Hit this exact issue in CI yesterday. Our We pinned to The yargs(process.argv.slice(2))
.scriptName('tsr')
.usage('$0 <cmd> [args]')
+ .demandCommand(1)
+ .strictCommands()
.command('generate', ...)
.command('watch', ...)
.help().argv |
| watch(process.cwd()) | ||
| }, | ||
| ) | ||
| .help().argv |
There was a problem hiding this comment.
| .demandCommand(1) | |
| .strictCommands() | |
| .help().argv |
There was a problem hiding this comment.
Thank you for the kind guidance! I'll update yargs chain and commit.
Problem
tsr generateandtsr watchcommands exit silently without executingCause
yargs()without argumentsyargs()orparse()yargs, the parsed result is{ _: [] }Fix
process.argv.slice(2)to yargsSummary by CodeRabbit
Bug Fixes
New Features