Skip to content

Commit 162a03d

Browse files
committed
chore: Upgrade gatsby to v5
1 parent cb6f423 commit 162a03d

File tree

10 files changed

+2343
-5564
lines changed

10 files changed

+2343
-5564
lines changed

package-lock.json

Lines changed: 2303 additions & 5519 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -27,34 +27,34 @@
2727
"@fontsource/source-code-pro": "^4.5.0",
2828
"@fontsource/source-sans-pro": "^4.5.0",
2929
"date-fns": "^2.23.0",
30-
"gatsby": "^4.25.9",
31-
"gatsby-plugin-google-gtag": "^4.0.0",
32-
"gatsby-plugin-manifest": "^4.0.0",
33-
"gatsby-remark-prismjs": "^6.0.0",
34-
"gatsby-source-filesystem": "^4.0.0",
35-
"gatsby-transformer-remark": "^5.0.0",
30+
"gatsby": "^5.15.0",
31+
"gatsby-plugin-google-gtag": "^5.15.0",
32+
"gatsby-plugin-manifest": "^5.15.0",
33+
"gatsby-remark-prismjs": "^7.15.0",
34+
"gatsby-source-filesystem": "^5.15.0",
35+
"gatsby-transformer-remark": "^6.15.0",
3636
"normalize.css": "^8.0.1",
3737
"prismjs": "^1.24.1",
38-
"react": "^17.0.2",
39-
"react-dom": "^17.0.2",
38+
"react": "^18.0.0",
39+
"react-dom": "^18.0.0",
4040
"react-helmet": "^6.1.0",
41-
"styled-breakpoints": "^10.0.1"
41+
"styled-breakpoints": "^14.1.5"
4242
},
4343
"devDependencies": {
4444
"@types/inquirer": "^7.3.3",
4545
"@types/react-helmet": "^6.1.2",
4646
"@types/styled-components": "^5.1.12",
4747
"babel-plugin-styled-components": "^2.0.0",
48-
"gatsby-cli": "^3.15.0",
49-
"gatsby-plugin-styled-components": "^5.0.0",
50-
"gatsby-plugin-typescript": "^4.0.0",
48+
"gatsby-cli": "^5.15.0",
49+
"gatsby-plugin-styled-components": "^6.15.0",
50+
"gatsby-plugin-typescript": "^5.15.0",
5151
"gh-pages": "^3.2.3",
5252
"husky": "^7.0.1",
5353
"inquirer": "^8.1.2",
5454
"lint-staged": "^11.1.2",
5555
"prettier": "^2.3.2",
5656
"shorted-theme": "^0.1.1",
57-
"styled-components": "^5.3.0",
57+
"styled-components": "^6.1.19",
5858
"ts-node": "^10.2.1",
5959
"typescript": "^4.3.5",
6060
"untoken": "^0.0.2",

src/components/Header.styles.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import { up } from 'styled-breakpoints'
21
import styled from 'styled-components'
32

43
import { $theme } from '../styles/theme'
54

65
import { Link } from './Link'
6+
import { theme } from '../theme'
77

88
export const Container = styled.header`
99
display: grid;
@@ -12,7 +12,7 @@ export const Container = styled.header`
1212
align-items: center;
1313
margin: 1rem 0 2rem 0;
1414
15-
${up('tablet')} {
15+
${theme.breakpoints.up('lg')} {
1616
margin: 2rem 0;
1717
}
1818
`
@@ -23,7 +23,7 @@ export const Brand = styled.div`
2323
display: grid;
2424
justify-content: center;
2525
26-
${up('tablet')} {
26+
${theme.breakpoints.up('lg')} {
2727
grid-column: 1 / 1;
2828
}
2929
`
@@ -54,7 +54,7 @@ export const Nav = styled.nav`
5454
display: grid;
5555
justify-content: center;
5656
57-
${up('tablet')} {
57+
${theme.breakpoints.up('lg')} {
5858
grid-row: 1;
5959
grid-column: 2;
6060
justify-content: end;
@@ -69,7 +69,7 @@ export const NavMenu = styled.ul`
6969
column-gap: 2em;
7070
grid-template-columns: repeat(3, auto);
7171
72-
${up('tablet')} {
72+
${theme.breakpoints.up('lg')} {
7373
grid-template-columns: repeat(4, auto);
7474
}
7575
`
@@ -78,7 +78,7 @@ export const NavMenuItem = styled.li`
7878
&:first-child {
7979
display: none;
8080
81-
${up('tablet')} {
81+
${theme.breakpoints.up('lg')} {
8282
display: block;
8383
}
8484
}

src/components/Link.styles.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,15 @@ export const linkStyles = css<LinkProps>`
4343
${(props) => props.variant === 'block' && linkBlockStyles}
4444
`
4545

46-
export const ExternalLink = styled.a`
46+
export const ExternalLink = styled.a<LinkProps>`
4747
${linkStyles};
4848
`
4949

5050
ExternalLink.defaultProps = {
5151
variant: 'inline'
5252
}
5353

54-
export const InternalLink = styled(GatsbyLink)`
54+
export const InternalLink = styled(GatsbyLink)<LinkProps>`
5555
${linkStyles};
5656
`
5757

src/components/SEO.tsx

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,14 @@ type SEOProps = {
2525
}
2626

2727
export const SEO: React.FC<SEOProps> = ({
28-
description,
29-
lang,
30-
meta,
31-
image,
28+
description = '',
29+
lang = 'en',
30+
meta = [],
31+
image = {
32+
src: '/images/icon.png',
33+
height: 1040,
34+
width: 1040
35+
},
3236
title,
3337
pathname,
3438
breadcrumbs = [],
@@ -175,14 +179,3 @@ export const SEO: React.FC<SEOProps> = ({
175179
/>
176180
)
177181
}
178-
179-
SEO.defaultProps = {
180-
lang: `en`,
181-
meta: [],
182-
description: ``,
183-
image: {
184-
src: '/images/icon.png',
185-
height: 1040,
186-
width: 1040
187-
}
188-
}

src/components/Typography.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
import { up } from 'styled-breakpoints'
21
import styled from 'styled-components'
3-
42
import { $theme } from '../styles/theme'
53

64
import { linkInlineStyles } from './Link.styles'
5+
import { theme } from '../theme'
76

87
export const Heading1 = styled.h1`
98
font-weight: ${$theme.fontWeight.black};
@@ -27,7 +26,7 @@ export const PageTitle = styled.h1`
2726
line-height: 1em;
2827
margin: 0.2em 0 2rem 0;
2928
30-
${up('tablet')} {
29+
${theme.breakpoints.up('lg')} {
3130
font-size: ${$theme.fontSize.l1}rem;
3231
line-height: 1.5em;
3332
}

src/layouts/MainLayout.styles.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { up } from 'styled-breakpoints'
21
import styled from 'styled-components'
2+
import { theme } from '../theme'
33

44
export const Container = styled.div`
55
display: grid;
@@ -8,7 +8,7 @@ export const Container = styled.div`
88
margin: auto;
99
padding: 0 1rem;
1010
11-
${up('tablet')} {
11+
${theme.breakpoints.up('lg')} {
1212
padding: 0 2rem;
1313
}
1414
`

src/layouts/MainLayout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { theme } from '../styles/theme'
88

99
import * as S from './MainLayout.styles'
1010

11-
export const MainLayout: React.FC = ({ children }) => {
11+
export const MainLayout: React.FC<React.PropsWithChildren> = ({ children }) => {
1212
return (
1313
<ThemeProvider theme={theme}>
1414
<S.Container>

src/layouts/PostLayout.styles.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import styled, { css } from 'styled-components'
2-
import { up } from 'styled-breakpoints'
32

43
import { PageTitle, TextBlock } from '../components/Typography'
54
import { Link } from '../components/Link'
65
import { $theme } from '../styles/theme'
6+
import { theme } from '../theme'
77

88
export const Container = styled.div``
99

@@ -15,12 +15,12 @@ export const PostCategory = styled.div`
1515
font-size: ${$theme.fontSize.l3}rem;
1616
font-weight: ${$theme.fontWeight.light};
1717
18-
${up('tablet')} {
18+
${theme.breakpoints.up('lg')} {
1919
font-size: ${$theme.fontSize.l2}rem;
2020
margin: 2rem 0;
2121
}
2222
23-
${up('desktop')} {
23+
${theme.breakpoints.up('xl')} {
2424
margin: 3rem 0;
2525
}
2626
`

src/theme/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import { createStyledBreakpointsTheme } from 'styled-breakpoints'
2+
3+
export const theme = createStyledBreakpointsTheme()

0 commit comments

Comments
 (0)