Skip to content

Preserve package.json formatting when bumping versions - #13

Merged
theoephraim merged 1 commit into
mainfrom
fix/preserve-package-json-formatting
Apr 18, 2026
Merged

theoephraim merged 1 commit into
mainfrom
fix/preserve-package-json-formatting

Conversation

@theoephraim

Copy link
Copy Markdown
Member

Summary

  • Replace JSON.stringify round-trip with targeted string replacements when bumping versions and updating dependency ranges in package.json files
  • Prevents reformatting issues like inline arrays being expanded to multi-line, indentation style changes, and other unnecessary churn (matching a known pain point from changesets)
  • Also applies the fix to workspace/catalog protocol resolution in the publish pipeline

Test plan

  • Added test: preserves tab indentation, inline arrays, and nested object formatting through a version bump
  • Added test: preserves 4-space indentation, inline arrays, and unrelated dependencies through a dependency range update
  • All 157 existing tests continue to pass

🐸 Generated with Claude Code

Replace JSON.stringify round-trip with targeted string replacements
so that custom formatting (inline arrays, indentation style, etc.)
is not disturbed during version bumps and dependency range updates.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

bumpy-frog

The changes in this PR will be included in the next version bump.

patch Patch releases

  • @varlock/bumpy 0.0.2 → 0.0.3

Changesets in this PR

Click here if you want to add another changeset to this PR


This comment is maintained by bumpy.

@theoephraim
theoephraim merged commit 37fca52 into main Apr 18, 2026
2 checks passed
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