Skip to content

Upgrade to Gatsby 5, React 18, MDX 2, Tailwind 3 and Node 22 - #173

Open
todaywasawesome wants to merge 7 commits into
nav-drop-blogfrom
upgrade-deps
Open

todaywasawesome wants to merge 7 commits into
nav-drop-blogfrom
upgrade-deps

Conversation

@todaywasawesome

Copy link
Copy Markdown
Member

Task 11. Upgrades the site to current libraries and tooling.

Package Before After
gatsby + plugins 3.6 5.16
react / react-dom 17 18.3
gatsby-plugin-mdx 2 (MDX v1) 5.16 (MDX v2)
tailwindcss 2.2 3.4
sharp 0.28 0.32
Node (CI, deploy, Containerfile) 14 / 16 / 20 22
GitHub Actions v3 v4

Code changes

  • Config: gatsby-config.js is now gatsby-config.mjs (ESM), so it can import remark-gfm. MDX v2 needs remark-gfm for tables in blog posts.
  • GraphQL: queries use the Gatsby 5 sort syntax and filter on internal.contentFilePath instead of fileAbsolutePath.
  • MDX v2: pages render children, and about/get-involved import their .mdx directly. Principles and testimonials load MDX through require.context. Testimonial attributions use \- so they aren't turned into lists.
  • Tailwind 3: purge is now content. The aspect-ratio plugin is replaced by native aspect-* classes. Typography 0.5 runs in legacy mode, so prose links keep their colour.
  • React 18 hydration fix: principles-item nested a <p> inside a <p>, which React 18 reported as errors #418/#423.
  • Removed: unused axios (replaced by fetch), body-scroll-lock, gatsby-transformer-remark, and yarn.lock (CI and the Containerfile use npm ci). Also removed the --openssl-legacy-provider workaround from the Containerfile.

Not upgraded

  • react-share stays on 5: version 6 removed the Twitter share button.
  • eslint stays on 8: version 9 needs a flat config.
  • react-helmet stays: moving to Gatsby's Head API is a separate refactor.

Verification

  • npm ci, npm run lint and npm run build pass on node:22.
  • I compared computed layout against the base branch at 1440px and 390px on /, /community/, /training/, /events/, /about/, /get-involved/, /blog/ and two blog posts.
    • Matches base: the banner, 9 testimonials, 59 adopter logos, 6 founding members, the training CTA, and events expand and search.
    • No console or hydration errors on any of those pages.
  • Small differences:
    • Testimonials now appear in a fixed file order.
    • Bullets use native list markers, in the same colour and position.
    • Excerpt text on some /blog/ cards changed slightly, because MDX v2 builds excerpts differently.

Part of a stacked series. Merge bottom-up, starting with task 1 (#171). Plan: https://claude.ai/artifact/5cs7mhqQAzRLbeqUwaA5aM

🤖 Generated with Claude Code

todaywasawesome and others added 3 commits November 13, 2026 14:57
- gatsby 3 -> 5 and all gatsby-* plugins to matching majors; react 17 -> 18
- gatsby-plugin-mdx 2 -> 5 (MDX 2): blog posts use the children /
  __contentFilePath template pattern; about/get-involved import their
  MDX directly; principles and testimonials load MDX via require.context
- GraphQL: Gatsby 5 sort syntax, internal.contentFilePath instead of
  fileAbsolutePath, fields.slug instead of the removed slug field
- remark-gfm for the table in the GitOpsCon relocation post
  (gatsby-config is now .mjs to import it)
- tailwindcss 2 -> 3, @tailwindcss/typography 0.4 -> 0.5 (legacy target
  so prose link colors keep winning); native aspect-* utilities replace
  @tailwindcss/aspect-ratio
- fix nested <p> in principles that React 18 reports as a hydration error
- testimonials: escape the attribution dash so MDX 2 does not turn it
  into a list; author links now render as links instead of raw markdown
- drop unused deps: axios (use fetch), body-scroll-lock, @mdx-js/mdx,
  gatsby-transformer-remark, @tailwindcss/aspect-ratio
- Node 22 in CI and Containerfile, actions bumped to v4, drop
  --openssl-legacy-provider; remove the unmaintained yarn.lock and
  regenerate package-lock.json

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Dan Garfield <dan.garfield@octopus.com>
Signed-off-by: Dan Garfield <dan.garfield@octopus.com>

# Conflicts:
#	content/testimonials/testimonial-4.mdx
#	content/testimonials/testimonial-5.mdx
#	content/testimonials/testimonial-6.mdx
#	content/testimonials/testimonial-7.mdx
#	content/testimonials/testimonial-8.mdx
#	content/testimonials/testimonial-9.mdx
#	src/components/events.js
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Dan Garfield <dan.garfield@octopus.com>
Signed-off-by: Dan Garfield <dan.garfield@octopus.com>

# Conflicts:
#	src/components/testimonials.js
Signed-off-by: Dan Garfield <dan.garfield@octopus.com>

# Conflicts:
#	content/testimonials/testimonial-1.mdx
#	content/testimonials/testimonial-2.mdx
#	content/testimonials/testimonial-3.mdx
Signed-off-by: Dan Garfield <dan.garfield@octopus.com>

# Conflicts:
#	src/components/testimonials.js
Signed-off-by: Dan Garfield <dan.garfield@octopus.com>

# Conflicts:
#	src/components/testimonials.js

This branch has not been deployed

No deployments
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