Skip to content

hotfix(rolldown): fix breaking change #395

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 7, 2025
Merged

hotfix(rolldown): fix breaking change #395

merged 2 commits into from
Aug 7, 2025

Conversation

avivkeller
Copy link
Member

@nodejs/web-infra Requesting fast-track.

The recent rolldown upgrade performed by Dependabot contained a breaking change. This PR updates our codebase to work with the new rolldown version.

@Copilot Copilot AI review requested due to automatic review settings August 7, 2025 15:02
@avivkeller avivkeller requested a review from a team as a code owner August 7, 2025 15:02
Copy link

vercel bot commented Aug 7, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
api-docs-tooling ✅ Ready (Inspect) Visit Preview Aug 7, 2025 3:08pm

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes a breaking change introduced by a recent rolldown upgrade by refactoring the server-side rendering code generation approach. Instead of generating unique variable names and capturing results, the code now directly returns values from the generated functions.

  • Removed the dynamic SSR variable generation mechanism
  • Updated buildServerProgram to use direct return statements instead of variable assignment
  • Simplified executeServerCode to work with the new return-based approach

Reviewed Changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/generators/web/utils/processing.mjs Removed SSR variable generation and updated function calls to match new API
src/generators/web/utils/generate.mjs Modified buildServerProgram to return values directly instead of assigning to variables

Copy link

codecov bot commented Aug 7, 2025

Codecov Report

❌ Patch coverage is 0% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 74.30%. Comparing base (a386315) to head (d26d4b3).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/generators/web/utils/generate.mjs 0.00% 2 Missing ⚠️
src/generators/web/utils/processing.mjs 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #395      +/-   ##
==========================================
+ Coverage   74.27%   74.30%   +0.03%     
==========================================
  Files         118      118              
  Lines       11041    11031      -10     
  Branches      695      695              
==========================================
- Hits         8201     8197       -4     
+ Misses       2837     2831       -6     
  Partials        3        3              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@avivkeller avivkeller added the fast track This PR can land before the typical review time, with a :+1: from collaborators label Aug 7, 2025
@MattIPv4
Copy link
Member

MattIPv4 commented Aug 7, 2025

Why did no CI catch this? Can we make sure we have whatever we need in CI so we can trust dependency upgrades?

@avivkeller
Copy link
Member Author

Why did no CI catch this? Can we make sure we have whatever we need in CI so we can trust dependency upgrades?

My assumption is that the script did fail (on Vercel), but was deployed despite the failure. We can prevent this from happening again by either:

  1. Ensuring that Vercel fails on these kinds of errors
  2. Running these checks as a GitHub Action (along with Vercel), which will fail and report here, rather than silently on Vercel

@MattIPv4
Copy link
Member

MattIPv4 commented Aug 7, 2025

👍 Can you make sure an issue is cut for that, I'd vote for doing both.

Copy link
Member

@MattIPv4 MattIPv4 left a comment

Choose a reason for hiding this comment

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

I do not claim to know what's happening in this logic, but the diff seems logical

@avivkeller avivkeller merged commit 2546d50 into main Aug 7, 2025
18 checks passed
@avivkeller avivkeller deleted the hotfix branch August 7, 2025 15:25
@avivkeller
Copy link
Member Author

I do not claim to know what's happening in this logic, but the diff seems logical

For the record, in the rolldown update, tree-shaking was updated to shake unused variables, but no longer shake unused returns, so our logic (which previously accounted for shaked returns via variables) needed to be flipped

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fast track This PR can land before the typical review time, with a :+1: from collaborators
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants