Repository navigation
fix(html): exclude custom bundler from worker configuration - #1204
OKAN-SOFTWARE wants to merge 3 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1204 +/- ##
==========================================
+ Coverage 93.77% 93.78% +0.01%
==========================================
Files 289 289
Lines 28813 28875 +62
Branches 2913 2916 +3
==========================================
+ Hits 27018 27081 +63
+ Misses 1773 1772 -1
Partials 22 22 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
| // The bundler runs on the main thread and contains non-cloneable functions. | ||
| workerConfigOmit: ['bundler'], |
There was a problem hiding this comment.
This is smart, but would it be smarter to just omit keys containing unclone-ables?
There was a problem hiding this comment.
Good point.
I considered automatic filtering, but my concern is that it could silently remove configuration values that workers actually need, particularly with nested objects.
I went with workerConfigOmit to make those exclusions explicit and predictable.
Each generator declares which options belong only on the main thread, while the remaining configuration stays intact.
Thanks
There was a problem hiding this comment.
it could silently remove configuration values that workers actually need
How? Workers can't need uncloneables, since they would fail to clone
There was a problem hiding this comment.
You're right — my wording was imprecise. Workers cannot receive uncloneable values through structured cloning.
My concern is that automatically dropping those values could hide configuration mistakes. A future option containing a function might require a different design, and silently removing it could produce unexpected behavior.
With workerConfigOmit, we explicitly exclude only bundler, which we've verified runs on the main thread. Unexpected uncloneable values still produce an error instead of being silently discarded.
I think that makes the behavior easier to maintain and debug.
ovflowd
left a comment
There was a problem hiding this comment.
SGTM but left a review comment
|
Apologies @OKAN-SOFTWARE, can you rebase? |
Signed-off-by: OKAN TIKTAS <346542017+OKAN-SOFTWARE@users.noreply.github.com>
1d9a266 to
4b122c7
Compare
Rebased onto the latest main and pushed the updated branch. The merge conflict is resolved. Thanks for the feedback and review! Stay Safe |
|
The latest CI results look good overall. Unit tests, E2E tests, linting, formatting, and documentation generation passed. The CodeQL TypeScript job failed during repository checkout ( I don't have permission to rerun the workflow. Could a maintainer please rerun the failed CodeQL job? Thank you! |
|
@OKAN-SOFTWARE We believe that this PR was made using an AI agent without proper attribution or human-review of it's output. For that reason, following our AI Policy, we've decided to close this pull request. |
Description
Fix
DataCloneErrorwhen the HTML generator uses a custom bundler with parallel worker threads.The bundler is needed on the main thread but contains functions that cannot be cloned into worker messages.
Changes
workerConfigOmitsupport to generator metadata.@doc-kit/coreand@doc-kit/generator-react.Validation
GitHub Actions
gitexit code 128). Analysis did not start; maintainer rerun needed.Related Issues
Fixes #1201
Check List