Skip to content

docs(chore): Updates to docusaurus on BBB 4.0 (nodejs 24, docusaurus 3.10) - #26059

Merged
antobinary merged 3 commits into
bigbluebutton:v4.0.x-developfrom
antobinary:docs-400-docusaurus-audit
Oct 15, 2026
Merged

antobinary merged 3 commits into
bigbluebutton:v4.0.x-developfrom
antobinary:docs-400-docusaurus-audit

Conversation

@antobinary

@antobinary antobinary commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

Backport of the docs toolchain from develop:

@mermaid-js/layout-elk from #25983 is kept.

npm audit in docs/: 67 advisories (19 critical) before, 33 after (none critical or moderate). The rest is braces, which has no fixed release yet, and katex, which needs mermaid 12.

Built and checked with Node 24: the site builds, search works, and the architecture diagram renders with the ELK layout.

@antobinary antobinary added this to the Release 4.0 milestone Oct 15, 2026
@github-actions

Copy link
Copy Markdown

This pull request has conflicts ☹
Please resolve those so we can review the pull request.
Thanks.

@coderabbitai

coderabbitai Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: bcf46925-c546-4c8b-b398-7d1779a32bc8
📥 Commits

Reviewing files that changed from the base of the PR and between a7382c7 and 2e25baa.

⛔ Files ignored due to path filters: 1
  • docs/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing: 4
  • docs/.nvmrc
  • docs/README.md
  • docs/docusaurus.config.js
  • docs/package.json

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.

Walkthrough

The documentation setup now requires Node.js 24 and updates its Docusaurus dependencies and package overrides. The cookie-consent script is configured as a head tag. Another head script wraps window.Worker and converts eligible non-string first arguments to strings.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Other

Merge Risk: ⚪ Minimal · up to 2e25b

The documentation tooling changes align with the Node version used by deployment, and no concrete issue affecting local development or the site was established. The change is ready to merge with normal checks.

Pre-merge checks: Passed 5
Passed Passed checks: 5 passed
Check name Status Explanation
Title check Passed The title clearly identifies the documentation toolchain update, including Node.js 24 and Docusaurus 3.10. It matches the main changes.
Description check Passed The description directly explains the Docusaurus upgrade, Node.js 24 update, Worker compatibility fix, dependency overrides, and validation results.
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

The baycloud cookie-consent script (cl.js) monkey-patches window.Worker
and calls .includes() / .replace() on the URL argument assuming it is
always a string. @easyops-cn/docusaurus-search-local 0.52 instantiates
its worker with `new Worker(new URL("./worker.js", import.meta.url))`,
passing a URL object — which makes baycloud throw "TypeError: t.includes
is not a function" and leaves the search dropdown spinning forever.

Move the baycloud tag from scripts[] into headTags[] so we control
ordering, then add an inline Proxy on window.Worker right after it that
coerces non-string URL args via .toString() before delegating to
baycloud's wrapper. The consent script still loads sitewide as before;
only the URL/string incompatibility is neutralized, so search works
without downgrading the plugin.

Fixes bigbluebutton#25009.

(cherry picked from commit ef4b229)
v4.0.x-develop's docs/ still declared Docusaurus ^3.3.2 with
docusaurus-search-local 0.40.1 and no overrides; npm audit reported 67
advisories (19 critical) against its lockfile. Take develop's
docs/package.json, package-lock.json and .nvmrc as they are today, which
carries these develop commits:

- 473ea74 docs: bump docusaurus to 3.10.1
- 5b52345 docs: pin serialize-javascript to ^7.0.5 to clear
  high-severity advisories
- 19d4592 docs: build with Node.js 24 (bigbluebutton#25982) - .nvmrc, engines
  node >=24 and the README note
- 218663a docs: update Docusaurus to 3.10.2
- 45bf274 resolve npm audit warnings in docs (mermaid override)

The files are copied rather than cherry-picked because the lockfile has
diverged here (dependabot bumps); develop's lockfile is consistent with
its package.json. @mermaid-js/layout-elk ^0.1.9 from bigbluebutton#25983 (not on
develop) is kept and resolved on top of develop's lockfile, which adds
only layout-elk 0.1.9 and elkjs 0.9.3. search-local 0.52 needs the Worker fix from the
previous commit.

develop's lockfile itself has new advisories since 2026-10-06 (48 left,
17 critical); the next commit deals with those.
npm audit on develop's docs lockfile (previous commit) reports 48
advisories, 17 critical, from five packages that Docusaurus 3.10.2
and its plugins pin to vulnerable majors. npm audit fix only offers a
downgrade to Docusaurus 3.7.0. Override three of them:

- tinypool ^2.1.2 (was 1.1.1; @docusaurus/core asks ^1.0.2):
  GHSA-5gmw-xhrv-c9v3 and GHSA-85c8-ppgw-ccpr, critical. 2.x has the
  same ESM-only exports as 1.x, and Node 24 meets its engines.
- postcss-selector-parser ^7.1.6 (was 6.1.4 for the cssnano presets,
  which ask ^6.0.16): GHSA-rj75-hqrm-r3gf, moderate. The other
  dependents already used 7.1.6.
- sockjs > uuid ^11.1.1 (was 8.3.2): GHSA-w5hq-g745-h8pq, moderate.
  sockjs is only loaded by the docusaurus start dev server and only
  calls v4; uuid 11 still has a require() entry.

Result: 33 advisories, none critical or moderate. Left: braces 3.0.3
(GHSA-vfj7-8cjw-p6xm, high; no fixed release exists, counted again in
31 packages up the micromatch/globby/@docusaurus/utils chain) and katex
0.16.47 (GHSA-238p-pmpm-9mq7, low; mermaid 11 asks ^0.16.47, the fix
needs mermaid 12).

Checked in a node:24 container (Node 24.21.0, npm 11.19.0): npm ci and
docusaurus build pass with and without the overrides, and the two
build/ trees are byte-identical when built from the same path. search
returns results on the served build, and docusaurus start --poll
serves pages and upgrades its live-reload websocket.
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.

1 participant