Skip to content

Conversation

zzstoatzz
Copy link
Owner

Fixes #29

Summary

This PR addresses the issue where mdxify would create PRs that only add newlines to docs.json, even when the actual content hasn't changed.

Changes

  • Modified the function to compare actual data structures instead of string representations
  • Only writes to the file when the data has actually changed
  • Preserves existing file's trailing newline convention
  • Shows a friendly '✨ No changes needed' message when content is already up to date

Test Plan

Tested locally by running mdxify multiple times on the same codebase - the second run correctly reports 'No changes needed' instead of writing an identical file with potentially different formatting.

- Compare actual data structures instead of string representations
- Preserve existing file's trailing newline convention
- Show friendly '✨ No changes needed' message when content is already up to date
- Fixes #29: avoids creating PRs that only add newlines
@zzstoatzz zzstoatzz merged commit f7f4602 into main Sep 26, 2025
8 checks passed
@zzstoatzz zzstoatzz deleted the fix-issue-29 branch September 26, 2025 15:33
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.

don't add extra random newline to docs.json

1 participant