whatsdiff/whatsdiff

See what's changed in your project's dependencies

Fund package maintenance!
SRWieZ

Installs: 12

Dependents: 0

Suggesters: 0

Security: 0

Stars: 4

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/whatsdiff/whatsdiff

v1.6.0 2025-03-31 16:52 UTC

README

GitHub release (with filter) Packagist PHP Version Packagist License (custom server) GitHub Workflow Status (with event)

What's diff is a CLI tool to help you inspect what has changed in your dependencies after a composer update or npm update.

Capture d’écran 2024-09-19 Γ  20.00.47.png

Outdated screenshot.. Coming soon!

Main features are:

  • Show what has been added, removed or updated in your dependencies
  • Show how many releases have been made since your last update
  • Support for composer.lock and package-lock.json (PHP & JS)
  • Show changelog and release notes of the dependencies
  • Compare between commits, branches, or tags
  • Interactive Terminal UI with keyboard navigation
  • Multiple output formats (text, JSON, markdown)

πŸš€ Installation

Via Composer global require command

composer global require whatsdiff/whatsdiff

By downloading binaries on the latest release, currently only these binaries are compiled on the CI:

  • macOS x86_64
  • macOS arm64
  • linux x86_64
  • linux arm64
  • windows x64

πŸ“š Usage

For complete documentation, visit whatsdiff.app/docs

Analyse Command

Show what changed after your last composer update or npm update:

whatsdiff
# or explicitly
whatsdiff analyse

Between Command

Compare dependencies between two commits, branches, or tags:

# Compare between two tags
whatsdiff between v1.0.0 v2.0.0

# Compare between commits
whatsdiff between abc123 def456

# Compare from a commit to HEAD
whatsdiff between abc123

Terminal UI Mode

Launch an interactive Terminal UI with keyboard navigation:

whatsdiff tui

Check Command

Check if a specific package has changed (useful for CI/CD):

# Check if a package was updated
whatsdiff check livewire/livewire --is-updated

# Check if a package was added
whatsdiff check new/package --is-added

# Use in scripts with exit codes
if whatsdiff check critical/package --is-updated --quiet; then
  echo "Critical package updated, running extra tests..."
fi

Changelog Command

View release notes for updated packages:

whatsdiff changelog guzzlehttp/guzzle 7.7.0...7.8.1 --type=composer --summary

Configuration

Manage cache and other settings:

# View all configuration
whatsdiff config

# Disable cache
whatsdiff config cache.enabled false

# Set cache time limits (in seconds)
whatsdiff config cache.min-time 600

Output Formats

All commands support multiple output formats:

# JSON output
whatsdiff --format=json

# Markdown output
whatsdiff --format=markdown

# Disable cache for a single run
whatsdiff --no-cache

πŸ”§ Contributing

This project follows PSR coding style. You can use composer pint to apply.

All tests are executed with pest. Use composer pest

It's recommended to execute composer qa before commiting (alias for executing Pint and Pest)

Testing

This project use Pest for testing.

composer test

Build from sources

This project use box, php-static-cli and php-micro. A build script has been created to build the project. (tested only on macOS x86_64)

composer build

Then you can build the binary that you can retrieve in build/bin/

πŸ‘₯ Credits

whatsdiff was created by Eser DENIZ.

πŸ“ License

whatsdiff PHP is licensed under the MIT License. See LICENSE for more information.