Skip to content

v0.1.0

Choose a tag to compare

@nemanjatesic nemanjatesic released this 17 Feb 17:24
· 10 commits to main since this release

v0.1.0 — CLI Support

What's New

CLI for comparing JSON objects and files — deep-obj-diff now ships with a command-line interface. Compare JSON files or inline strings directly from your terminal.

# Compare two JSON files
deep-obj-diff old.json new.json

# Compare inline JSON
deep-obj-diff '{"a":1,"b":2}' '{"a":1,"b":3,"c":4}'

# Use any output format
deep-obj-diff old.json new.json --format patch

CLI Features

  • Dual input modes — pass file paths or inline JSON strings
  • All output formats — list (default), flat, nested, patch, json
  • Rich options — --include-unchanged, --max-depth, --no-array-order, --filter, --json
  • Colorized output — respects NO_COLOR and FORCE_COLOR environment variables
  • CI-friendly — exits with code 1 when differences are found, 0 when identical

Other Changes

  • Fixed npm test script for Windows compatibility
  • Restructured CLI into modular src/cli/ folder (types, colors, input, printers, command)
  • Added 19 CLI integration tests (105 total, all passing)
  • Updated README with full CLI documentation

Install

npm install -g deep-obj-diff