Skip to content

Conversation

@jongear
Copy link
Owner

@jongear jongear commented Dec 31, 2025

Updated GitHub Actions workflow to use Node.js 20.x (latest LTS) instead of the outdated Node.js 10.x. Removed manual npm 5.8.0 installation as Node.js 20.x includes npm 10.x by default.

🤖 Generated with Claude Code

jongear and others added 13 commits December 31, 2025 10:35
Updated GitHub Actions workflow to use Node.js 20.x (latest LTS) instead of the outdated Node.js 10.x. Removed manual npm 5.8.0 installation as Node.js 20.x includes npm 10.x by default.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Major upgrades:
- Upgrade Gatsby from v2.4.2 to v5.13.0
- Upgrade React from v16.7.0 to v18.2.0
- Upgrade Node.js from v10.x to v20.x in CI workflow
- Migrate from gatsby-mdx to gatsby-plugin-mdx v5
- Replace gatsby-plugin-google-analytics with gatsby-plugin-google-gtag
- Update prism-react-renderer from v0.1.5 to v2.3.1
- Update react-live from v2.0.1 to v4.1.6
- Update ESLint from v5.12.0 to v8.56.0

Breaking changes addressed:
- Update MDX rendering to use children prop with __contentFilePath
- Fix code syntax highlighting for MDX v5 compatibility
- Update Code component for prism-react-renderer v2 API
- Fix SSR issues by moving logo.svg to static folder
- Convert HTML-style attributes to JSX syntax in MDX files
- Update ESLint parser from babel-eslint to @babel/eslint-parser
- Remove deprecated GraphQL fields (timeToRead, code.body)

Bug fixes:
- Fix code block detection in wrap-root-element.js
- Fix MDX syntax errors in blog posts
- Update GraphQL queries for Gatsby 5 compatibility

Security:
- Reduce npm audit vulnerabilities from 165 to 34 (80% reduction)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Updates:
- Replace deprecated birthtime field with birthTime in GraphQL queries
- Update sort syntax from {fields: [frontmatter___date], order: DESC} to {frontmatter: {date: DESC}}
- Update group syntax from field: frontmatter___categories to field: {frontmatter: {categories: SELECT}}

Files modified:
- src/templates/post.js
- src/components/SEO.js
- gatsby-node.js
- src/pages/blog.js
- src/templates/category.js
- src/pages/categories.js

All GraphQL queries now use Gatsby 5 syntax with no deprecation warnings.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Regenerated lock file after Gatsby 5 migration to ensure npm ci works correctly.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
The timeToRead field was removed during the Gatsby 5 migration because
gatsby-plugin-mdx v5 doesn't provide it by default (unlike the old gatsby-mdx).

Implementation:
- Added custom reading time calculation in gatsby-node.js onCreateNode
- Calculates based on word count with 200 words per minute reading speed
- Creates fields.timeToRead as a custom GraphQL field
- Updated GraphQL queries in blog.js and category.js to include timeToRead
- Updated Article component usage to pass timeToRead prop

The "X Min Read" indicator is now restored on all blog post listings.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@jongear jongear changed the title Upgrade CI to Node.js 20.x and modern npm Upgrade CI to Node.js 22.x and modern npm Dec 31, 2025
@jongear jongear merged commit 39d15ae into master Dec 31, 2025
5 checks passed
@jongear jongear deleted the feat/node20 branch December 31, 2025 20:08
@jongear jongear mentioned this pull request Jan 1, 2026
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