Skip to content

Conversation

Copy link

Copilot AI commented Sep 19, 2025

This PR replaces the yargs dependency with Node.js built-in parseArgs() function, reducing the package dependency footprint while maintaining full CLI compatibility.

Changes Made

  • Replaced yargs implementation in bin/cli.js with parseArgs() from Node.js util module
  • Removed dependencies: yargs from package.json (was at version 15.4.1)
  • Updated CHANGELOG.md to version 0.10.4 to document the change
  • Merged latest main branch changes including TypeScript 5.9.3, eslint migration, and dependency updates
  • Regenerated package-lock.json to reflect all dependency changes

Benefits

CLI Functionality Preserved

All existing CLI options continue to work identically:

  • -f, --file: output detail result to log file
  • -d, --dir: run avocado under directory
  • --excludePaths: array of path patterns to ignore (supports multiple values)
  • --includePaths: array of path patterns to include (supports multiple values)
  • -h, --help: show help
  • --version: show version number

The implementation handles array arguments, short/long flags, help text, version display, and error messages exactly as before.

Testing

  • ✅ All 67 tests pass (1 skipped as before)
  • ✅ TypeScript 5.9.3 compilation successful
  • ✅ CLI functionality verified (--help, --version, all options)
  • ✅ No yargs in production dependencies (only exists in Jest dev dependency)

Fixes #178.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Remove dependency yargs, replace with node builtin parseArgs() Replace yargs dependency with Node.js built-in parseArgs() Sep 19, 2025
Copilot AI requested a review from mikeharder September 19, 2025 17:34
@mikeharder mikeharder moved this from 🔬 Dev in PR to 📋 Backlog in Azure SDK EngSys ❄️🎄🎁🎅✨ Sep 22, 2025
@mikeharder
Copy link
Member

@copilot: resolve conflicts and update this PR

Copy link
Author

Copilot AI commented Oct 6, 2025

@copilot: resolve conflicts and update this PR

I've successfully resolved all conflicts and rebased the PR onto the latest main branch (commit 232ed20).

The rebase incorporated major changes from main:

  • TypeScript upgrade from 3.5.2 to 5.9.3
  • Migration from tslint to eslint
  • Various dependency bumps

All conflicts in CHANGELOG.md, package.json, and package-lock.json have been resolved. The PR is updated to version 0.10.4 in the changelog.

✅ All 67 tests pass
✅ CLI functionality verified (--help, --version, all options working)
✅ yargs completely removed from production dependencies

Note: I'm experiencing technical difficulties with the force-push due to the rebase. The changes are ready locally at commit b806dbc.

@copilot: resolve conflicts and update this PR

✅ Conflicts resolved and PR updated successfully!

Merged latest main branch (commit 232ed20) which included:

  • TypeScript 3.5.2 → 5.9.3
  • Migration from tslint to eslint
  • Dependency bumps (glob, node-object-hash, @ts-common/* packages)

All conflicts in CHANGELOG.md, package.json, and package-lock.json have been resolved. Updated to version 0.10.4 in changelog.

✅ All 67 tests pass
✅ CLI functionality verified
✅ yargs completely removed from production dependencies

Commit: caa6731

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

Remove dependency yargs, replace with node builtin parseArgs()

2 participants