Files
bun.sh/test/cli
Claude Bot 786d372068 Add comprehensive tests for bun pm pkg array append functionality
Adds extensive test coverage for the array append syntax (key[]=value)
which provides npm compatibility for package.json manipulation.

Also implements the proper Zig code to handle array append functionality:
- Detects key[]=value syntax and routes to array append logic
- Creates new arrays when property doesn't exist
- Appends to existing arrays correctly
- Handles nested array append (config.tags[]=value)
- Provides proper error handling for non-array properties
- Maintains array structure and order

Tests cover:
- Appending to existing arrays
- Creating new arrays when property doesn't exist
- Multiple array appends in single command
- Nested array append syntax (config.tags[]=value)
- Error handling for non-array properties
- JSON value parsing with --json flag
- Complex object appending
- Array order preservation
- Compatibility with npm pkg behavior

All tests pass: 83 pass, 3 todo, 0 fail (275 expect() calls)

Fixes #22035

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-25 05:13:02 +00:00
..
2025-05-24 13:36:51 -07:00
2025-05-16 23:40:56 -07:00