Skip to content

fix(release): keep trailing newline when updating package.json version - #52

Merged
a145789 merged 1 commit into
mainfrom
fix/package-json-trailing-newline
Oct 16, 2026
Merged

a145789 merged 1 commit into
mainfrom
fix/package-json-trailing-newline

Conversation

@haoziqaq

Copy link
Copy Markdown
Member

Summary

The Lint workflow fails on the v2.3.0 release commit (run): vp check reports a formatting issue in package.json.

updateVersion writes JSON.stringify(config, null, 2) back without a trailing newline, so every release commit strips the final newline from each package.json. This also affects every project that releases with vr release or rt release.

  • updateVersion now appends \n.
  • Restores the trailing newline in this repo's package.json.
  • The updateVersion test now asserts that the file ends with a newline.

Test plan

  • vp check: formatting, lint and type checks pass
  • vp test run: 135 passed

🤖 Generated with Claude Code

updateVersion wrote JSON.stringify output without a trailing newline, so every
release commit stripped it from package.json and failed `vp check` on main.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@a145789
a145789 force-pushed the fix/package-json-trailing-newline branch from a8d657c to 46222a1 Compare October 16, 2026 03:56
@a145789
a145789 merged commit 6958316 into main Oct 16, 2026
2 checks passed
@a145789
a145789 deleted the fix/package-json-trailing-newline branch October 16, 2026 04:00
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.

2 participants