Repository navigation
docs(chore): Updates to docusaurus on BBB 4.0 (nodejs 24, docusaurus 3.10) - #26059
antobinary merged 3 commits into
Conversation
|
This pull request has conflicts ☹ |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
WalkthroughThe 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 Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Other Merge Risk: ⚪ Minimal · up to
|
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.
afd47af to
2e25baa
Compare
Backport of the docs toolchain from
develop:.nvmrc), npm audit fixesdevelop)@mermaid-js/layout-elkfrom #25983 is kept.npm auditindocs/: 67 advisories (19 critical) before, 33 after (none critical or moderate). The rest isbraces, which has no fixed release yet, andkatex, which needs mermaid 12.Built and checked with Node 24: the site builds, search works, and the architecture diagram renders with the ELK layout.