Skip to content

feat(core): preserve package.json formatting on upgrade#56

Merged
donfear merged 1 commit into
mainfrom
fix/json-format
May 31, 2026
Merged

feat(core): preserve package.json formatting on upgrade#56
donfear merged 1 commit into
mainfrom
fix/json-format

Conversation

@donfear

@donfear donfear commented May 31, 2026

Copy link
Copy Markdown
Owner
  • Detect and preserve original indentation (tabs, 2-space, 4-space) and trailing newline style when writing package.json
  • Skip write entirely when serialized result matches raw content
  • Add scanDirs configuration option to include directories from the default skip list (lib, es, esm, cjs)
  • Warn about silently skipped package.json-bearing directories and suggest scanDirs override
  • Add comprehensive tests for format preservation, detectJsonFormat utility, and scanDirs behavior

- Detect and preserve original indentation (tabs, 2-space, 4-space) and trailing newline style when writing package.json
- Skip write entirely when serialized result matches raw content
- Add scanDirs configuration option to include directories from the default skip list (lib, es, esm, cjs)
- Warn about silently skipped package.json-bearing directories and suggest scanDirs override
- Add comprehensive tests for format preservation, detectJsonFormat utility, and scanDirs behavior
@donfear donfear merged commit c7230bb into main May 31, 2026
19 checks passed
@donfear donfear deleted the fix/json-format branch May 31, 2026 16:18
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.

1 participant