Skip to content

Auto-parse pasted PM commands in pm add#28

Merged
fdarian merged 4 commits intomainfrom
ff-60-pm-add-npm-install-d-something-should-automatically-parse
Feb 26, 2026
Merged

Auto-parse pasted PM commands in pm add#28
fdarian merged 4 commits intomainfrom
ff-60-pm-add-npm-install-d-something-should-automatically-parse

Conversation

@fdarian
Copy link
Copy Markdown
Owner

@fdarian fdarian commented Feb 26, 2026

Summary

  • Add ability to auto-parse pasted package manager commands (npm/pnpm/bun) in pm add
  • Users can now paste commands like npm install -D something or pnpm add foo bar directly
  • Command parsing intelligently extracts packages and dev flags, merging with CLI flags
  • Add comprehensive test suite with 16 test cases covering edge cases and error scenarios

Test plan

  • Unit tests pass for passthrough cases (single/multiple packages)
  • Unit tests pass for npm command parsing (install, i, with -D and --save-dev)
  • Unit tests pass for pnpm command parsing (add, install, with -D)
  • Unit tests pass for bun command parsing
  • Unit tests pass for shell-split multi-arg scenarios
  • Unit tests pass for dev flag merging logic
  • Unit tests pass for error scenarios (no packages specified)
  • Manual test: pm add npm install -D typescript should add typescript as dev
  • Manual test: pm add pnpm add foo bar should add both packages
  • Manual test: Error thrown when no packages in command

@fdarian fdarian force-pushed the ff-60-pm-add-npm-install-d-something-should-automatically-parse branch from 8a83549 to acebd44 Compare February 26, 2026 02:25
@fdarian fdarian merged commit f54731d into main Feb 26, 2026
1 check passed
@fdarian fdarian deleted the ff-60-pm-add-npm-install-d-something-should-automatically-parse branch February 26, 2026 02:26
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.

1 participant