Skip to content

Commit

Permalink
BREAKING: Gatsby 5 (#1045)
Browse files Browse the repository at this point in the history
  • Loading branch information
LekoArts committed Nov 9, 2022
1 parent 142b400 commit 0287240
Show file tree
Hide file tree
Showing 80 changed files with 1,172 additions and 1,154 deletions.
6 changes: 6 additions & 0 deletions .changeset/early-cows-design.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@lekoarts/rehype-meta-as-attributes": major
"@lekoarts/themes-utils": major
---

Updating minimum required Node.js version to 18.
24 changes: 24 additions & 0 deletions .changeset/loud-teachers-collect.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
"@lekoarts/gatsby-theme-cara": major
"@lekoarts/gatsby-theme-emilia": major
"@lekoarts/gatsby-theme-emilia-core": major
"@lekoarts/gatsby-theme-emma": major
"@lekoarts/gatsby-theme-emma-core": major
"@lekoarts/gatsby-theme-graphql-playground": major
"@lekoarts/gatsby-theme-jodie": major
"@lekoarts/gatsby-theme-jodie-core": major
"@lekoarts/gatsby-theme-minimal-blog": major
"@lekoarts/gatsby-theme-minimal-blog-core": major
"@lekoarts/gatsby-theme-specimens": major
"@lekoarts/gatsby-theme-status-dashboard": major
"@lekoarts/gatsby-theme-styleguide": major
---

Update to [Gatsby 5](https://www.gatsbyjs.com/gatsby-5/). [Gatsby 5 Migration Guide](https://v5.gatsbyjs.com/docs/reference/release-notes/migrating-from-v4-to-v5/).

**Breaking Changes:**

- Minimal Node.js version 18.0.0
- Minimal required React version is 18

For all other breaking changes, refer to the [Gatsby 5 Migration Guide](https://v5.gatsbyjs.com/docs/reference/release-notes/migrating-from-v4-to-v5/).
2 changes: 1 addition & 1 deletion .github/workflows/e2e_testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
timeout-minutes: 10
runs-on: ubuntu-latest
container:
image: cypress/browsers:node16.14.2-slim-chrome103-ff102
image: cypress/browsers:node18.12.0-chrome106-ff106
options: --user 1001
strategy:
fail-fast: false
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v18.10.0
18
1 change: 1 addition & 0 deletions examples/cara/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
legacy-peer-deps=true
1 change: 1 addition & 0 deletions examples/cara/.nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
18
1 change: 1 addition & 0 deletions examples/cara/gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ module.exports = {
siteImage: `/banner.jpg`,
author: `@lekoarts_de`,
},
trailingSlash: `never`,
plugins: [
{
resolve: `@lekoarts/gatsby-theme-cara`,
Expand Down
4 changes: 2 additions & 2 deletions examples/cara/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
},
"dependencies": {
"@lekoarts/gatsby-theme-cara": "^4.0.0",
"gatsby": "^4.24.6",
"gatsby-plugin-manifest": "^4.24.0",
"gatsby": "^5.0.0",
"gatsby-plugin-manifest": "^5.0.0",
"gatsby-plugin-webpack-bundle-analyser-v2": "^1.1.30",
"react": "^18.2.0",
"react-dom": "^18.2.0"
Expand Down
1 change: 1 addition & 0 deletions examples/emilia/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
legacy-peer-deps=true
1 change: 1 addition & 0 deletions examples/emilia/.nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
18
1 change: 1 addition & 0 deletions examples/emilia/gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ module.exports = {
siteImage: `/banner.jpg`,
author: `@lekoarts_de`,
},
trailingSlash: `never`,
plugins: [
{
resolve: `@lekoarts/gatsby-theme-emilia`,
Expand Down
6 changes: 3 additions & 3 deletions examples/emilia/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
},
"dependencies": {
"@lekoarts/gatsby-theme-emilia": "^4.0.0",
"gatsby": "^4.24.6",
"gatsby-plugin-manifest": "^4.24.0",
"gatsby-plugin-sitemap": "^5.24.0",
"gatsby": "^5.0.0",
"gatsby-plugin-manifest": "^5.0.0",
"gatsby-plugin-sitemap": "^6.0.0",
"gatsby-plugin-webpack-bundle-analyser-v2": "^1.1.30",
"react": "^18.2.0",
"react-dom": "^18.2.0"
Expand Down
1 change: 1 addition & 0 deletions examples/emma/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
legacy-peer-deps=true
1 change: 1 addition & 0 deletions examples/emma/.nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
18
1 change: 1 addition & 0 deletions examples/emma/gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ module.exports = {
siteImage: `/banner.jpg`,
author: `@lekoarts_de`,
},
trailingSlash: `never`,
plugins: [
{
resolve: `@lekoarts/gatsby-theme-emma`,
Expand Down
6 changes: 3 additions & 3 deletions examples/emma/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
},
"dependencies": {
"@lekoarts/gatsby-theme-emma": "^4.0.0",
"gatsby": "^4.24.6",
"gatsby-plugin-manifest": "^4.24.0",
"gatsby-plugin-sitemap": "^5.24.0",
"gatsby": "^5.0.0",
"gatsby-plugin-manifest": "^5.0.0",
"gatsby-plugin-sitemap": "^6.0.0",
"gatsby-plugin-webpack-bundle-analyser-v2": "^1.1.30",
"react": "^18.2.0",
"react-dom": "^18.2.0"
Expand Down
1 change: 1 addition & 0 deletions examples/graphql-playground/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
legacy-peer-deps=true
1 change: 1 addition & 0 deletions examples/graphql-playground/.nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
18
1 change: 1 addition & 0 deletions examples/graphql-playground/gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const shouldAnalyseBundle = process.env.ANALYSE_BUNDLE
* @type {import('gatsby').GatsbyConfig}
*/
module.exports = {
trailingSlash: `never`,
plugins: [
{
resolve: `@lekoarts/gatsby-theme-graphql-playground`,
Expand Down
2 changes: 1 addition & 1 deletion examples/graphql-playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
},
"dependencies": {
"@lekoarts/gatsby-theme-graphql-playground": "^4.0.0",
"gatsby": "^4.24.6",
"gatsby": "^5.0.0",
"gatsby-plugin-webpack-bundle-analyser-v2": "^1.1.30",
"react": "^18.2.0",
"react-dom": "^18.2.0"
Expand Down
1 change: 1 addition & 0 deletions examples/jodie/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
legacy-peer-deps=true
1 change: 1 addition & 0 deletions examples/jodie/.nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
18
1 change: 1 addition & 0 deletions examples/jodie/gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ module.exports = {
siteImage: `/banner.jpg`,
author: `@lekoarts_de`,
},
trailingSlash: `never`,
plugins: [
{
resolve: `@lekoarts/gatsby-theme-jodie`,
Expand Down
6 changes: 3 additions & 3 deletions examples/jodie/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
},
"dependencies": {
"@lekoarts/gatsby-theme-jodie": "^4.0.0",
"gatsby": "^4.24.6",
"gatsby-plugin-manifest": "^4.24.0",
"gatsby-plugin-sitemap": "^5.24.0",
"gatsby": "^5.0.0",
"gatsby-plugin-manifest": "^5.0.0",
"gatsby-plugin-sitemap": "^6.0.0",
"gatsby-plugin-webpack-bundle-analyser-v2": "^1.1.30",
"react": "^18.2.0",
"react-dom": "^18.2.0"
Expand Down
1 change: 1 addition & 0 deletions examples/minimal-blog/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
legacy-peer-deps=true
1 change: 1 addition & 0 deletions examples/minimal-blog/.nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
18
23 changes: 11 additions & 12 deletions examples/minimal-blog/gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ module.exports = {
siteImage: `/banner.jpg`,
author: `@lekoarts_de`,
},
trailingSlash: `never`,
plugins: [
{
resolve: `@lekoarts/gatsby-theme-minimal-blog`,
Expand Down Expand Up @@ -108,18 +109,16 @@ module.exports = {
custom_elements: [{ "content:encoded": content }],
}
}),
query: `
{
allPost(sort: { fields: date, order: DESC }) {
nodes {
title
date(formatString: "MMMM D, YYYY")
excerpt
slug
}
}
}
`,
query: `{
allPost(sort: {date: DESC}) {
nodes {
title
date(formatString: "MMMM D, YYYY")
excerpt
slug
}
}
}`,
output: `rss.xml`,
title: `Minimal Blog - @lekoarts/gatsby-theme-minimal-blog`,
},
Expand Down
11 changes: 5 additions & 6 deletions examples/minimal-blog/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,13 @@
},
"dependencies": {
"@lekoarts/gatsby-theme-minimal-blog": "^5.0.0",
"gatsby": "^4.24.6",
"gatsby-plugin-feed": "^4.24.0",
"gatsby-plugin-manifest": "^4.24.0",
"gatsby-plugin-sitemap": "^5.24.0",
"gatsby": "^5.0.0",
"gatsby-plugin-feed": "^5.0.0",
"gatsby-plugin-manifest": "^5.0.0",
"gatsby-plugin-sitemap": "^6.0.0",
"gatsby-plugin-webpack-bundle-analyser-v2": "^1.1.30",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-helmet": "^6.1.0"
"react-dom": "^18.2.0"
},
"devDependencies": {
"cross-env": "^7.0.3"
Expand Down
1 change: 1 addition & 0 deletions examples/specimens/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
legacy-peer-deps=true
1 change: 1 addition & 0 deletions examples/specimens/.nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
18
1 change: 1 addition & 0 deletions examples/specimens/gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ module.exports = {
banner: `https://specimens.lekoarts.de/banner.jpg`,
siteUrl: `https://specimens.lekoarts.de`,
},
trailingSlash: `never`,
plugins: [
{
resolve: `@lekoarts/gatsby-theme-specimens`,
Expand Down
10 changes: 5 additions & 5 deletions examples/specimens/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@
"@mdx-js/react": "^2.1.5",
"@theme-ui/mdx": "^0.15.3",
"@theme-ui/presets": "^0.15.3",
"gatsby": "^4.24.6",
"gatsby-plugin-catch-links": "^4.24.0",
"gatsby-plugin-manifest": "^4.24.0",
"gatsby-plugin-mdx": "^4.3.0",
"gatsby": "^5.0.0",
"gatsby-plugin-catch-links": "^5.0.0",
"gatsby-plugin-manifest": "^5.0.0",
"gatsby-plugin-mdx": "^5.0.0",
"gatsby-plugin-theme-ui": "^0.15.3",
"gatsby-plugin-webpack-bundle-analyser-v2": "^1.1.30",
"gatsby-source-filesystem": "^4.24.0",
"gatsby-source-filesystem": "^5.0.0",
"prism-react-renderer": "^1.3.5",
"react": "^18.2.0",
"react-dom": "^18.2.0",
Expand Down
1 change: 1 addition & 0 deletions examples/status-dashboard/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
legacy-peer-deps=true
1 change: 1 addition & 0 deletions examples/status-dashboard/.nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
18
1 change: 1 addition & 0 deletions examples/status-dashboard/gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ module.exports = {
siteName: process.env.SITE_TITLE || `Status Dashboard - LekoArts`,
siteDescription: process.env.SITE_DESCRIPTION || `Showing the statuses of my Netlify deploys & CircleCI tests.`,
},
trailingSlash: `never`,
plugins: [
// See the theme's README for all available components
`@lekoarts/gatsby-theme-status-dashboard`,
Expand Down
6 changes: 3 additions & 3 deletions examples/status-dashboard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
"dependencies": {
"@emotion/react": "^11.10.5",
"@lekoarts/gatsby-theme-status-dashboard": "^4.0.0",
"gatsby": "^4.24.6",
"gatsby-plugin-emotion": "^7.24.0",
"gatsby-plugin-manifest": "^4.24.0",
"gatsby": "^5.0.0",
"gatsby-plugin-emotion": "^8.0.0",
"gatsby-plugin-manifest": "^5.0.0",
"gatsby-plugin-webpack-bundle-analyser-v2": "^1.1.30",
"react": "^18.2.0",
"react-dom": "^18.2.0"
Expand Down
1 change: 1 addition & 0 deletions examples/styleguide/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
legacy-peer-deps=true
1 change: 1 addition & 0 deletions examples/styleguide/.nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
18
1 change: 1 addition & 0 deletions examples/styleguide/gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ module.exports = {
siteImage: `/banner.jpg`,
author: `@lekoarts_de`,
},
trailingSlash: `never`,
plugins: [
`gatsby-plugin-theme-ui`,
{
Expand Down
2 changes: 1 addition & 1 deletion examples/styleguide/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"@emotion/react": "^11.10.5",
"@lekoarts/gatsby-theme-styleguide": "^4.0.0",
"@theme-ui/mdx": "^0.15.3",
"gatsby": "^4.24.6",
"gatsby": "^5.0.0",
"gatsby-plugin-theme-ui": "^0.15.3",
"gatsby-plugin-webpack-bundle-analyser-v2": "^1.1.30",
"react": "^18.2.0",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
"eslint-plugin-react": "^7.31.10",
"eslint-plugin-react-hooks": "^4.6.0",
"fs-extra": "^10.1.0",
"gatsby-cypress": "^2.24.0",
"gatsby-cypress": "^3.0.0",
"glob": "^8.0.3",
"happy-dom": "^6.0.4",
"husky": "^8.0.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/rehype-meta-as-attributes/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@
"directory": "packages/rehype-meta-as-attributes"
},
"engines": {
"node": ">=14.15.0"
"node": ">=18.0.0"
}
}
2 changes: 1 addition & 1 deletion packages/themes-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@
"directory": "packages/themes-utils"
},
"engines": {
"node": ">=14.15.0"
"node": ">=18.0.0"
}
}
4 changes: 2 additions & 2 deletions plop-templates/example/package.json.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
},
"dependencies": {
"@lekoarts/gatsby-theme-{{kebabCase name}}": "*",
"gatsby": "^4.0.0",
"gatsby-plugin-manifest": "^4.0.0",
"gatsby": "^5.0.0",
"gatsby-plugin-manifest": "^5.0.0",
"react": "^18.0.0",
"react-dom": "^18.0.0"
},
Expand Down
2 changes: 1 addition & 1 deletion plop-templates/theme-core-parent/package.json.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"clean": "gatsby clean"
},
"peerDependencies": {
"gatsby": "^4.0.0",
"gatsby": "^5.0.0",
"react": "^18.0.0",
"react-dom": "^18.0.0"
},
Expand Down
8 changes: 4 additions & 4 deletions plop-templates/theme-core/package.json.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
"clean": "gatsby clean"
},
"peerDependencies": {
"gatsby": "^4.0.0",
"gatsby": "^5.0.0",
"react": "^18.0.0",
"react-dom": "^18.0.0"
},
"dependencies": {
"gatsby-plugin-sharp": "^4.0.0",
"gatsby-source-filesystem": "^4.0.0",
"gatsby-transformer-sharp": "^4.0.0"
"gatsby-plugin-sharp": "^5.0.0",
"gatsby-source-filesystem": "^5.0.0",
"gatsby-transformer-sharp": "^5.0.0"
},
"keywords": [
"gatsby",
Expand Down
2 changes: 1 addition & 1 deletion plop-templates/theme/package.json.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"clean": "gatsby clean"
},
"peerDependencies": {
"gatsby": "^4.0.0",
"gatsby": "^5.0.0",
"react": "^18.0.0",
"react-dom": "^18.0.0"
},
Expand Down
Loading

0 comments on commit 0287240

Please sign in to comment.