Upgrade commander to v14 and refresh CLI visuals#2859
Upgrade commander to v14 and refresh CLI visuals#2859Harjun751 merged 7 commits intoMarkBind:masterfrom
Conversation
Replace in favor of native `conflicts()` supported by commander
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2859 +/- ##
=======================================
Coverage 71.90% 71.90%
=======================================
Files 132 132
Lines 7362 7362
Branches 1638 1573 -65
=======================================
Hits 5294 5294
Misses 1967 1967
Partials 101 101 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Upgrades the commander dependency from v8 to v14 in the CLI package, leveraging new features like .conflicts(), .commandsGroup(), .optionsGroup(), .summary(), configureHelp styling, and command suggestion on typos. Also hides the -d dev flag from help output and adds documentation for markbind serve -d.
Changes:
- Upgraded commander to v14 and restructured CLI option definitions to use new APIs (grouped commands/options, conflict declarations, hidden options)
- Added chalk-based color styling to CLI help output
- Added developer guide documentation for
markbind serve -d
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| packages/cli/index.ts | Restructured CLI definitions using commander v14 APIs, added help styling with chalk |
| packages/cli/src/cmd/serve.ts | Removed runtime --force-reload/--one-page conflict check (now handled by commander) |
| packages/cli/package.json | Bumped commander to v14, sorted devDependencies |
| package-lock.json | Updated lockfile for commander v14 |
| docs/devGuide/development/workflow.md | Added info box documenting markbind serve -d |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
Harjun751
left a comment
There was a problem hiding this comment.
Code looks good to me. I ran this version in my terminal - it's quite a step up in visual clarity!
| .addOption( | ||
| program.createOption('-f, --force-reload', | ||
| 'force a full reload of all site files when a file is changed') | ||
| .conflicts('onePage')) |
There was a problem hiding this comment.
Nice that they added an in-built mechanism to handle this.
What is the purpose of this pull request?
Overview of changes:
serve -doption from being displayed in help usage as suggested by @yihao03 as it is not user facing but internal to developers, and added developer guide documentation for markbind serve -dAnything you'd like to highlight/discuss:
Quality of Life improvements
Added info box in DG
Testing instructions:
No regressions
Proposed commit message: (wrap lines at 72 characters)
Upgrade commander to v14 and refresh CLI visuals
Remove serve -d from user facing help
Update CLI colors
Checklist: ☑️
Reviewer checklist:
Indicate the SEMVER impact of the PR:
At the end of the review, please label the PR with the appropriate label:
r.Major,r.Minor,r.Patch.Breaking change release note preparation (if applicable):