-
Notifications
You must be signed in to change notification settings - Fork 21
chore: attempt to improve hdyration #516
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
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Codecov Report❌ Patch coverage is 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. 🚀 New features to boost your workflow:
|
There was a problem hiding this 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
ignoreparameter 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
cssproperty alongsideresultsandchunks, but there's no@returnsJSDoc 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.
|
cc @nodejs/web-infra requesting fast-track 🙇 |
avivkeller
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only nitpicks
This PR improves a few things on bundle-sizes, json generation parity, ignored files fixes, etc.