Skip to content

Conversation

@ovflowd
Copy link
Member

@ovflowd ovflowd commented Dec 11, 2025

This PR improves a few things on bundle-sizes, json generation parity, ignored files fixes, etc.

@vercel
Copy link

vercel bot commented Dec 11, 2025

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

Project Deployment Preview Updated (UTC)
api-docs-tooling Ready Ready Preview Dec 12, 2025 4:21pm

@codecov
Copy link

codecov bot commented Dec 11, 2025

Codecov Report

❌ Patch coverage is 23.52941% with 39 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.58%. Comparing base (0e07e21) to head (245b4a3).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/generators/legacy-json-all/index.mjs 5.00% 19 Missing ⚠️
src/generators/web/utils/processing.mjs 18.18% 9 Missing ⚠️
src/generators/legacy-json/utils/buildSection.mjs 0.00% 8 Missing ⚠️
bin/commands/generate.mjs 0.00% 1 Missing ⚠️
src/generators/legacy-html/index.mjs 66.66% 1 Missing ⚠️
src/generators/web/utils/generate.mjs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #516      +/-   ##
==========================================
- Coverage   80.76%   80.58%   -0.18%     
==========================================
  Files         119      119              
  Lines       11877    11906      +29     
  Branches      841      841              
==========================================
+ Hits         9593     9595       +2     
- Misses       2281     2308      +27     
  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.

@ovflowd ovflowd marked this pull request as ready for review December 11, 2025 16:35
@ovflowd ovflowd requested a review from a team as a code owner December 11, 2025 16:35
Copilot AI review requested due to automatic review settings December 11, 2025 16:35
Copy link
Contributor

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 attempts to improve hydration by consolidating CSS handling and adding support for ignoring files during generation. The changes include updating Preact to v11 beta, refactoring CSS processing to combine server and client CSS, and implementing file ignore patterns across multiple generators.

Key changes:

  • Consolidated CSS handling: Server and client CSS are now combined and minified together using lightningcss
  • Added ignore parameter support to filter out files from AST generation processes
  • Updated Preact from v10.28.0 to v11.0.0-beta.0

Reviewed changes

Copilot reviewed 7 out of 10 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
src/generators/web/utils/processing.mjs Updated CSS handling to combine and minify server/client CSS; changed return types to include CSS property
src/generators/web/utils/generate.mjs Minor formatting cleanup (multi-line to single-line return statement)
src/generators/types.d.ts Added optional ignore field to GeneratorOptions for filtering input files
src/generators/legacy-json/utils/buildSection.mjs Refactored metadata ordering logic and fixed name assignment for module types
src/generators/legacy-json-all/index.mjs Added sorting by index order and filtering to skip index.json entries
src/generators/ast/index.mjs Added ignore pattern support for filtering markdown files; contains typo in comment
src/generators/ast-js/index.mjs Added ignore pattern support for filtering JavaScript files
package.json Updated Preact dependency to v11.0.0-beta.0
npm-shrinkwrap.json Updated lockfile to reflect Preact version change and peer dependency adjustments
bin/commands/generate.mjs Passed ignore option to generator runner
Files not reviewed (1)
  • npm-shrinkwrap.json: Language not supported
Comments suppressed due to low confidence (1)

src/generators/web/utils/processing.mjs:88

  • The return value of this function has changed to include a css property alongside results and chunks, but there's no @returns JSDoc tag documenting what this function returns. Consider adding documentation for the return value to improve code maintainability.
/**
 * Processes a single JSX AST (Abstract Syntax Tree) entry to generate a complete
 * HTML page, including server-side rendered content, client-side JavaScript, and CSS.
 *
 * @param {Array<import('../../jsx-ast/utils/buildContent.mjs').JSXContent>} entries - The JSX AST entry to process.
 * @param {string} template - The HTML template string that serves as the base for the output page.
 * @param {ReturnType<import('./generate.mjs')>} astBuilders - The AST generators
 * @param {ReturnType<import('node:module').createRequire>} requireFn - A Node.js `require` function.
 * @param {Object} options - Processing options
 * @param {Object} options.version - Version info
 */

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ovflowd ovflowd added the fast track This PR can land before the typical review time, with a :+1: from collaborators label Dec 11, 2025
@ovflowd
Copy link
Member Author

ovflowd commented Dec 11, 2025

cc @nodejs/web-infra requesting fast-track 🙇

Copy link
Member

@avivkeller avivkeller left a comment

Choose a reason for hiding this comment

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

Only nitpicks

@ovflowd ovflowd merged commit b2181a2 into main Dec 12, 2025
18 checks passed
@ovflowd ovflowd deleted the feat/hydration-improvements branch December 12, 2025 16:22
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.

3 participants