Skip to content

fix(html): exclude custom bundler from worker configuration - #1204

Open
OKAN-SOFTWARE wants to merge 3 commits into
nodejs:mainfrom
OKAN-SOFTWARE:fix/1201-bundler-worker-config
Open

OKAN-SOFTWARE wants to merge 3 commits into
nodejs:mainfrom
OKAN-SOFTWARE:fix/1201-bundler-worker-config

Conversation

@OKAN-SOFTWARE

Copy link
Copy Markdown
Contributor

Description

Fix DataCloneError when 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

  • Add workerConfigOmit support to generator metadata.
  • Exclude the HTML bundler from worker-thread configuration.
  • Preserve the original configuration and existing custom-bundler API.
  • Add a regression test demonstrating the failure before the fix and successful worker cloning afterward.
  • Add patch changesets for @doc-kit/core and @doc-kit/generator-react.

Validation

  • Regression test: failed before the fix, passed afterward.
  • Full test suite: 774 passed, 0 failed (Node.js 24.22.2).
  • Formatting passed.
  • Lint: 0 errors, 1 existing unrelated warning.
  • Git diff validation passed.
  • Browser E2E tests not run locally.

Related Issues

Fixes #1201

Check List

  • Read the contribution guidelines and followed the commit conventions.
  • Ran the full unit test suite successfully.
  • Checked formatting and linting.
  • Added regression test coverage.

@OKAN-SOFTWARE
OKAN-SOFTWARE requested a review from a team as a code owner October 30, 2026 13:08
@vercel

vercel Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
api-docs-tooling Ready Ready Preview Oct 30, 2026 7:53pm UTC

Request Review

@codecov

codecov Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.78%. Comparing base (b8d7b77) to head (4b122c7).

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.
📢 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.

@github-actions

github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

api-links Generator

Performance estimate (single CI run)

  • Generation time: 7.4% faster (1.08 s → 1.00 s)
  • Peak memory: 3.7% lower (295.14 MB → 284.25 MB)

json Generator

Performance estimate (single CI run)

  • Generation time: 3.0% faster (9.94 s → 9.64 s)
  • Peak memory: 1.0% lower (982.46 MB → 972.36 MB)

legacy-html Generator

Performance estimate (single CI run)

  • Generation time: 1.3% faster (16.62 s → 16.40 s)
  • Peak memory: 3.3% lower (1.53 GB → 1.48 GB)

legacy-json Generator

Performance estimate (single CI run)

  • Generation time: 3.6% slower (9.18 s → 9.51 s)
  • Peak memory: 4.0% lower (959.50 MB → 921.56 MB)

llms-txt Generator

Performance estimate (single CI run)

  • Generation time: 32.7% faster (9.09 s → 6.12 s)
  • Peak memory: 7.7% higher (903.61 MB → 972.86 MB)

orama-db Generator

Performance estimate (single CI run)

  • Generation time: 6.0% slower (5.46 s → 5.79 s)
  • Peak memory: 11.3% higher (1.02 GB → 1.14 GB)

web Generator

Performance estimate (single CI run)

  • Generation time: 63.6% slower (15.42 s → 25.23 s)
  • Peak memory: 3.3% lower (1.55 GB → 1.50 GB)

Comment thread packages/react/src/html/index.mjs Resolved

@ovflowd ovflowd left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

SGTM but left a review comment

@ovflowd

ovflowd commented Oct 30, 2026

Copy link
Copy Markdown
Member

Apologies @OKAN-SOFTWARE, can you rebase?

@OKAN-SOFTWARE

Copy link
Copy Markdown
Contributor Author

Apologies @OKAN-SOFTWARE, can you rebase?

Rebased onto the latest main and pushed the updated branch. The merge conflict is resolved.
Validation completed on Node.js 24:
Tests: 781 passed, 0 failed
Formatting: passed (463 files)
Lint: 0 errors, 1 unrelated warning

Thanks for the feedback and review! Stay Safe

This branch was successfully deployed

1 active deployment
Preview – api-docs-tooling — 4b122c7f Deployed Oct 30, 2026 by vercel[bot]
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.

html: a custom bundler fails with DataCloneError unless threads is 1

3 participants