Skip to content

fix(cli): preserve package.json trailing newline when updating package versions - #5150

Closed
andershagbard wants to merge 1 commit into
triggerdotdev:mainfrom
andershagbard:fix/preserve-package-json-eol
Closed

andershagbard wants to merge 1 commit into
triggerdotdev:mainfrom
andershagbard:fix/preserve-package-json-eol

Conversation

@andershagbard

@andershagbard andershagbard commented Nov 23, 2026 •

Copy link
Copy Markdown

When trigger deploy/dev offers to update @trigger.dev/* package versions, it rewrote package.json without a trailing newline, even if the original had one.

This detects whether the existing file ends with a newline and preserves that when writing the updated file, the backup, and on rollback. Adds a changeset.

🤖 Generated with Claude Code

…r.dev package versions

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KRVb4Psj6khNmTGUipa9MC
@github-actions

Copy link
Copy Markdown
Contributor

Hi @andershagbard, thanks for your interest in contributing!

This project requires that pull request authors are vouched, and you are not in the list of vouched users.

This PR will be closed automatically. See https://github.com/triggerdotdev/trigger.dev/blob/main/CONTRIBUTING.md for more details.

@github-actions github-actions Bot closed this Nov 23, 2026

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

@coderabbitai

coderabbitai Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Caution

Review failed

The pull request is closed.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

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