Skip to content

feat: implement --show-diff for rust, php, and js languages#100

Merged
justinvreeland merged 1 commit into
chainguard-dev:mainfrom
justinvreeland:show-diff-all-languages
Jun 5, 2026
Merged

feat: implement --show-diff for rust, php, and js languages#100
justinvreeland merged 1 commit into
chainguard-dev:mainfrom
justinvreeland:show-diff-all-languages

Conversation

@justinvreeland
Copy link
Copy Markdown
Member

Summary

The --show-diff flag was only implemented for Go. Rust, PHP, and JS all copied the flag into their internal config types but never read it — --show-diff was silently ignored.

This adds the same before/after snapshot + cmp.Diff pattern to all three:

  • Rust: diffs Cargo.lock before and after DoUpdate
  • JS: diffs package.json before and after ApplyOverrides
  • PHP: diffs all manifest files (from the detected build tool) before and after buildTool.Update

Follows the existing Go implementation in pkg/languages/golang/updater.go.

🤖 Generated with Claude Code

@justinvreeland justinvreeland marked this pull request as ready for review June 5, 2026 16:30
@justinvreeland justinvreeland merged commit a46e11d into chainguard-dev:main Jun 5, 2026
8 checks passed
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.

2 participants