Skip to content

@remotion/studio-server: Remove duplicated codemod formatting logic#6999

Merged
JonnyBurger merged 1 commit intomainfrom
cursor/trivial-issue-resolution-8e3d
Apr 5, 2026
Merged

@remotion/studio-server: Remove duplicated codemod formatting logic#6999
JonnyBurger merged 1 commit intomainfrom
cursor/trivial-issue-resolution-8e3d

Conversation

@cursor
Copy link
Copy Markdown

@cursor cursor bot commented Apr 5, 2026

Summary

  • Addresses Remove duplicate code in codemods #6993 by removing duplicated Prettier-formatting code from packages/studio-server/src/codemods/duplicate-jsx-node.ts
  • Reuses the shared formatFileContent() helper already used by delete-jsx-node.ts
  • Keeps behavior unchanged while reducing maintenance overhead in codemods

Why

Issue #6993 points out duplicated boilerplate between codemods. This PR makes a focused cleanup of one concrete duplication hotspot in duplicate-jsx-node.ts.

Testing

  • Attempted targeted tests for duplicate/delete codemods:
    • bun test packages/studio-server/src/test/delete-jsx-node.test.ts packages/studio-server/src/test/duplicate-jsx-node.test.ts
  • In this automation environment, bun/bunx binaries were not available on PATH, so tests could not be executed here.

Tradeoffs

  • This is intentionally narrow in scope (formatting path only) to keep risk low for a trivial-issue PR. Additional deduplication opportunities in node-replacement logic can be handled in follow-up PRs.
Open in Web View Automation 

Co-authored-by: Jonny Burger <hi@jonny.io>
@vercel
Copy link
Copy Markdown
Contributor

vercel bot commented Apr 5, 2026

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

Project Deployment Actions Updated (UTC)
bugs Ready Ready Preview, Comment Apr 5, 2026 7:06am
remotion Ready Ready Preview, Comment Apr 5, 2026 7:06am

Request Review

@pullfrog
Copy link
Copy Markdown
Contributor

pullfrog bot commented Apr 5, 2026

Reviewed PR #6999. The removed inline Prettier formatting logic in duplicate-jsx-node.ts is a verbatim copy of the shared formatFileContent() helper — the replacement call is correct and follows the same pattern already used by delete-jsx-node.ts and update-sequence-props.ts. No issues found; approved.

Task list (4/4 completed)
  • Read the diff and understand the changes
  • Read the changed file and the shared helper to verify correctness
  • Check for impact on other files (imports, tests, etc.)
  • Submit review

Pullfrog  | View workflow run | Triggered by Pullfrog | Using Big Pickle (free) | 𝕏

@JonnyBurger JonnyBurger merged commit 3163cee into main Apr 5, 2026
18 checks passed
@JonnyBurger JonnyBurger deleted the cursor/trivial-issue-resolution-8e3d branch April 5, 2026 08:50
Copy link
Copy Markdown
Contributor

@pullfrog pullfrog bot left a comment

Choose a reason for hiding this comment

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

Reviewed — no issues found.

Pullfrog  | View workflow run | Using Big Pickle (free) | 𝕏

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