-
Notifications
You must be signed in to change notification settings - Fork 0
feat: critical bug fixes and UX improvements #20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR addresses critical bugs in header detection and output directory creation, while adding improved status messages and a --quiet flag for better UX and scripting support.
Key Changes
- Fixed header inclusion in content change detection and dry-run previews to prevent incorrect "no change" detection when headers differ
- Added automatic parent directory creation for output paths
- Enhanced status messages with file counts and clearer explanations, plus new
--quietflag for script-friendly output
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| src/core.ts | Fixed content comparison and preview to use finalText (with header) instead of text (without header) |
| src/fs-safety.ts | Added automatic recursive directory creation in atomicWrite before writing output files |
| src/cli.ts | Updated status messages with file counts and clarity improvements; added --quiet flag with -q alias |
| test/core.test.ts | Added header: false to content change test for isolation; added test for nested directory creation |
| test/cli.test.ts | Updated assertion to match new "Skipped" message format |
| test/cli-module.test.ts | Updated message assertions and added 3 comprehensive tests for --quiet flag behavior |
| test/timing-and-backup.test.ts | Updated assertion to match new "Skipped" message format |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
🎉 This PR is included in version 1.1.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Summary
This PR addresses several critical issues and adds quality-of-life improvements to merge-jsonc.
Changes
Bug Fixes
1. Header Detection in Content Change Detection (fix: correct header detection)
2. Missing Output Directory Creation (feat: create parent directories)
Features
3. Improved Status Messages (feat: improve status messages and add --quiet flag)
Enhanced Messages:
no_inputs: Now explains missing files and suggests--skip-missingup_to_date: Shows count of input files and clarifies timestamp-based skipno_content_change: Clearer explanation that merged content matches existing outputwrote: Includes count of merged fileswrote_with_backup: Shows file count alongside backup pathNew
--quietFlag (-qalias):Test Coverage: Updated all existing message tests and added 3 new tests for
--quietbehavior.Testing
All tests pass (85 tests):
Code coverage maintained at ~88%.
Breaking Changes
None. All changes are backwards compatible:
Migration Guide
No migration needed. Users can optionally:
--quietin scripts for cleaner output