Skip to content

[site] Upgrade docusaurus and other depencies - #863

Merged
the-other-tim-brown merged 3 commits into
apache:mainfrom
the-other-tim-brown:website-dependabot-fixes
Jul 31, 2026
Merged

[site] Upgrade docusaurus and other depencies#863
the-other-tim-brown merged 3 commits into
apache:mainfrom
the-other-tim-brown:website-dependabot-fixes

Conversation

@the-other-tim-brown

Copy link
Copy Markdown
Contributor

What is the purpose of the pull request

Resolves over 100 issues reported by Dependabot due to our dependencies

Brief change log

Dependency upgrade — package.json + package-lock.json

  • @docusaurus/core, @docusaurus/preset-classic, @docusaurus/module-type-aliases: 3.0.0 → 3.10.2
  • clsx ^1.2.1 → ^2.0.0, prism-react-renderer ^1.3.5 → ^2.3.0
  • engines.node: >=16.14 → >=20.0 (matches CI's Node 20)
  • New overrides: serialize-javascript ^7.0.5, uuid ^11.1.1, brace-expansion ^5.0.8 — all three required; without them the lockfile carries 24 advisories
  • Lockfile regenerated → npm audit reports 0 vulnerabilities (was 121 open Dependabot alerts)

Required API migrations for 3.10

  • docusaurus.config.js: prism-react-renderer/themes/* → const {themes: prismThemes} = require('prism-react-renderer'); top-level onBrokenMarkdownLinks → markdown.hooks.onBrokenMarkdownLinks
  • 7 files under src/theme/BlogPostItem/: useBlogPost import moved from @docusaurus/theme-common/internal → @docusaurus/plugin-content-blog/client. No logic touched — the customizations (50%-width cards, no sidebar, date-only info) are unchanged

Webflow root pages — moved out of static/

  • static/index.html → homepage/index.html and static/404.html → homepage/404.html (git renames)
  • docusaurus.config.js: new inline postBuild plugin (xtable-webflow-root-pages) copies homepage/ into the build root after Docusaurus writes its output

Two reasons, both verified: in static/, index.html collides with webpack's own asset in dev (Conflict: Multiple assets emit different content… → Reload prevented, hot reload dead); and on 3.10 the generated 404.html overwrites the static one, which would have silently dropped the Webflow 404 that's live today. This replaced the last session's NODE_ENV-conditional staticDirectories, which fixed only the first problem.

README.md

The "Changes to the website homepage" section now describes website/homepage/ as the home of the hand-written Webflow root pages, how they reach the build, why they aren't in static/, and that previewing the homepage needs npm run build && npm run serve rather than npm start.

Net: 10 files modified (+58/−17 excluding the lockfile), 2 file renames, plus the regenerated lockfile. docs/ and blog/ are untouched — the files I edited during hot-reload probing were restored.

Verify this pull request

Ran site locally to ensure pages still render as they did before

@the-other-tim-brown
the-other-tim-brown merged commit edc787d into apache:main Jul 31, 2026
4 checks passed
@the-other-tim-brown
the-other-tim-brown deleted the website-dependabot-fixes branch July 31, 2026 17:56
rangareddy added a commit to rangareddy/incubator-xtable that referenced this pull request Aug 1, 2026
Resolves the conflict in the home page, which main moved from
website/static/index.html to website/homepage/index.html (apache#863) and
stripped of external CDN references (apache#764).

Dropped this branch's Material Icons stylesheet link: apache#764 replaced the
`keyboard_arrow_down` text glyphs with inline SVGs, so the FAQ arrows
render without an external font, and re-adding the fonts.googleapis.com
link would reintroduce the CSP violation that apache#764 fixed.

The ASF footer links, the vertical footer-link styling and the dynamic
copyright year all apply on top of main's version unchanged.
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.

2 participants