Skip to content

fix: Append newline with .json formatter for useExtracted#2148

Merged
amannn merged 1 commit intocanaryfrom
cursor/investigate-useextracted-translation-handling-claude-4.5-opus-high-thinking-8826
Dec 2, 2025
Merged

fix: Append newline with .json formatter for useExtracted#2148
amannn merged 1 commit intocanaryfrom
cursor/investigate-useextracted-translation-handling-claude-4.5-opus-high-thinking-8826

Conversation

@amannn
Copy link
Owner

@amannn amannn commented Dec 2, 2025

Add a trailing newline to JSON output from the extractor to conform to file formatting best practices and fix #2141.


Open in Cursor Open in Web


Note

Appends a trailing newline to serialized JSON message catalogs and updates tests to reflect the new formatting.

  • Extractor:
    • Update JSONFormatter.serialize to return JSON.stringify(..., 2) + '\n' so JSON catalogs end with a newline.
  • Tests:
    • Refresh snapshots and expectations in packages/next-intl/src/extractor/ExtractionCompiler.test.tsx to include the trailing newline in .json outputs and fs.writeFile calls.

Written by Cursor Bugbot for commit c6f1801. This will update automatically on new commits. Configure here.

@cursor
Copy link

cursor bot commented Dec 2, 2025

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

@vercel
Copy link

vercel bot commented Dec 2, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
next-intl-docs Ready Ready Preview Comment Dec 2, 2025 2:36pm
next-intl-example-app-router Ready Ready Preview Comment Dec 2, 2025 2:36pm
next-intl-example-app-router-without-i18n-routing Ready Ready Preview Comment Dec 2, 2025 2:36pm

@amannn amannn changed the title Investigate useExtracted translation handling fix: Append newline to .json formatter for useExtracted Dec 2, 2025
@amannn amannn marked this pull request as ready for review December 2, 2025 14:35
@amannn amannn changed the title fix: Append newline to .json formatter for useExtracted fix: Append newline with .json formatter for useExtracted Dec 2, 2025
@amannn amannn merged commit 873c3af into canary Dec 2, 2025
10 of 12 checks passed
@amannn amannn deleted the cursor/investigate-useextracted-translation-handling-claude-4.5-opus-high-thinking-8826 branch January 30, 2026 10:29
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