Skip to content

Commit d00912b

Browse files
committed
Update deps, run prettier
and comment out crowdsorcerer since it isn't used and is causing a build error
1 parent 1422824 commit d00912b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+20159
-24118
lines changed

package-lock.json

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

package.json

Lines changed: 90 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -1,82 +1,99 @@
11
{
22
"name": "ohjelmoinnin-mooc",
3+
"engines": {
4+
"node": "16.x"
5+
},
36
"dependencies": {
4-
"@apollo/client": "^3.6.2",
5-
"@fortawesome/fontawesome-svg-core": "^1.2.25",
6-
"@fortawesome/free-brands-svg-icons": "^5.11.2",
7-
"@fortawesome/free-regular-svg-icons": "^5.11.2",
8-
"@fortawesome/free-solid-svg-icons": "^5.11.2",
9-
"@fortawesome/react-fontawesome": "^0.1.7",
10-
"@material-ui/core": "^4.5.1",
11-
"@material-ui/icons": "^4.5.1",
12-
"@rstacruz/gatsby-remark-component": "^1.2.0-pre.1",
13-
"apollo-boost": "^0.4.4",
14-
"axios": "^0.21.1",
15-
"babel-plugin-styled-components": "^1.10.0",
16-
"clsx": "^1.0.4",
17-
"code-states-visualizer": "^0.1.1",
18-
"color": "^3.1.1",
19-
"commonmark": "^0.29.0",
20-
"core-js": "^2.5.7",
21-
"crowdsorcerer": "^0.1.79",
22-
"fetch-ponyfill": "^6.0.2",
23-
"focus-visible": "^5.0.2",
24-
"gatsby": "^2.17.0",
25-
"gatsby-plugin-catch-links": "^2.1.15",
26-
"gatsby-plugin-i18next": "^1.1.9",
27-
"gatsby-plugin-manifest": "^2.2.23",
28-
"gatsby-plugin-material-ui": "^2.1.6",
7+
"@apollo/react-hooks": "^4.0.0",
8+
"@fortawesome/fontawesome-free": "^6.2.1",
9+
"@fortawesome/fontawesome-svg-core": "^6.2.1",
10+
"@fortawesome/free-brands-svg-icons": "^6.2.1",
11+
"@fortawesome/free-regular-svg-icons": "^6.2.1",
12+
"@fortawesome/free-solid-svg-icons": "^6.2.1",
13+
"@fortawesome/react-fontawesome": "^0.2.0",
14+
"@interactjs/offset": "^1.10.17",
15+
"@material-ui/core": "^4.12.4",
16+
"@material-ui/icons": "^4.11.3",
17+
"@material-ui/lab": "^4.0.0-alpha.61",
18+
"@monaco-editor/react": "^4.1.3",
19+
"@rstacruz/gatsby-remark-component": "^2.0.0",
20+
"apollo-boost": "^0.4.9",
21+
"axios": "^1.2.0",
22+
"babel-plugin-styled-components": "^1.12.0",
23+
"clsx": "^1.2.1",
24+
"code-states-visualizer": "^0.2.0",
25+
"color": "^4.2.3",
26+
"commonmark": "^0.30.0",
27+
"core-js": "^3.14.0",
28+
"fetch-ponyfill": "^7.1.0",
29+
"focus-visible": "^5.2.0",
30+
"gatsby": "^3.7.1",
31+
"gatsby-plugin-anchor-links": "^1.2.1",
32+
"gatsby-plugin-catch-links": "^3.7.1",
33+
"gatsby-plugin-i18next": "^1.1.10",
34+
"gatsby-plugin-manifest": "^3.7.1",
35+
"gatsby-plugin-material-ui": "^3.0.1",
2936
"gatsby-plugin-meta-redirect": "^1.1.1",
30-
"gatsby-plugin-react-helmet": "^3.1.13",
31-
"gatsby-plugin-sharp": "^2.2.32",
32-
"gatsby-plugin-sitemap": "^2.2.19",
33-
"gatsby-plugin-styled-components": "^3.1.11",
34-
"gatsby-remark-copy-linked-files": "^2.1.28",
35-
"gatsby-remark-emojis": "^0.3.3",
37+
"gatsby-plugin-react-helmet": "^4.7.1",
38+
"gatsby-plugin-sharp": "^3.7.1",
39+
"gatsby-plugin-sitemap": "^3.3.0",
40+
"gatsby-plugin-styled-components": "^4.7.1",
41+
"gatsby-remark-autolink-headers": "^4.4.1",
42+
"gatsby-remark-copy-linked-files": "^4.4.1",
43+
"gatsby-remark-emojis": "^0.4.3",
3644
"gatsby-remark-external-links": "0.0.4",
37-
"gatsby-remark-images": "^3.1.28",
38-
"gatsby-remark-prismjs": "^3.3.20",
39-
"gatsby-remark-smartypants": "^2.1.14",
40-
"gatsby-source-filesystem": "^2.1.33",
41-
"gatsby-transformer-remark": "^2.6.30",
42-
"graphql": "^14.5.8",
45+
"gatsby-remark-images": "^5.4.1",
46+
"gatsby-remark-prismjs": "^5.4.1",
47+
"gatsby-remark-smartypants": "^4.4.1",
48+
"gatsby-source-filesystem": "^3.7.1",
49+
"gatsby-transformer-remark": "^4.4.1",
50+
"graphql": "^15.5.0",
4351
"graphql-request": "^3.4.0",
44-
"i18next": "^17.3.0",
45-
"i18next-browser-languagedetector": "^4.0.0",
46-
"i18next-xhr-backend": "^3.2.0",
47-
"interactjs": "^1.6.2",
48-
"jquery": "^3.4.1",
49-
"jss": "^10.0.0",
50-
"moment": "^2.24.0",
52+
"i18next": "^20.3.1",
53+
"i18next-browser-languagedetector": "^6.1.1",
54+
"i18next-xhr-backend": "^3.2.2",
55+
"interactjs": "^1.10.17",
56+
"jquery": "^3.6.1",
57+
"js-base64": "^3.7.3",
58+
"jss": "^10.9.2",
59+
"jszip": "^3.6.0",
60+
"jszip-utils": "^0.1.0",
61+
"likert-react": "0.0.0-beta6",
62+
"luxon": "^1.27.0",
63+
"moment": "^2.29.1",
64+
"moocfi-python-editor": "^0.15.3",
5165
"moocfi-quizzes": "^0.9.10",
5266
"pdf-slideshow": "^0.1.4",
53-
"prismjs": "^1.17.1",
54-
"react": "^16.10.2",
55-
"react-content-loader": "^4.3.2",
56-
"react-dom": "^16.10.2",
57-
"react-helmet": "^5.2.1",
58-
"react-i18next": "^10.13.1",
59-
"react-jss": "^10.0.0",
67+
"postcss": "^8.3.2",
68+
"prismjs": "^1.23.0",
69+
"react": "^17.0.2",
70+
"react-content-loader": "^6.2.0",
71+
"react-dom": "^17.0.2",
72+
"react-helmet": "^6.1.0",
73+
"react-i18next": "^11.10.0",
74+
"react-jss": "^10.9.2",
6075
"react-motion": "^0.5.2",
61-
"react-redux": "^7.1.1",
62-
"react-scrollspy": "^3.4.0",
63-
"react-toastify": "^7.0.3",
64-
"react-use": "^13.21.0",
65-
"react-youtube": "^7.9.0",
66-
"recharts": "^1.8.4",
76+
"react-redux": "^7.2.4",
77+
"react-scrollspy": "^3.4.3",
78+
"react-toastify": "^7.0.4",
79+
"react-use": "^17.4.0",
80+
"react-youtube": "^7.13.1",
81+
"recharts": "^2.0.9",
82+
"reduce-reducers": "^1.0.4",
83+
"redux": "^4.2.0",
6784
"redux-action-analytics": "0.0.3",
68-
"redux-devtools-extension": "^2.13.8",
69-
"rehype-react": "^4.0.1",
85+
"redux-devtools-extension": "^2.13.9",
86+
"rehype-react": "^6.2.0",
7087
"store": "^2.0.12",
71-
"styled-components": "^4.4.0",
88+
"styled-components": "^5.3.6",
7289
"tmc-client-js": "0.0.9",
73-
"typeface-open-sans": "0.0.75",
74-
"typeface-open-sans-condensed": "0.0.72",
75-
"typeface-roboto-mono": "0.0.75",
76-
"typeface-roboto-slab": "0.0.72",
90+
"typeface-open-sans": "^1.1.13",
91+
"typeface-open-sans-condensed": "^1.1.13",
92+
"typeface-roboto-mono": "^1.1.13",
93+
"typeface-roboto-slab": "^1.1.13",
7794
"typesafe-actions": "^4.4.2",
78-
"typescript": "^3.6.4",
79-
"uuid": "^3.3.3",
95+
"typescript": "^4.9.3",
96+
"uuid": "^9.0.0",
8097
"visibilityjs": "^2.0.2"
8198
},
8299
"keywords": [
@@ -96,13 +113,13 @@
96113
"local-quizzes-package": "./use-local-quizzes.sh"
97114
},
98115
"devDependencies": {
99-
"@babel/plugin-proposal-optional-chaining": "^7.6.0",
100-
"@babel/preset-env": "^7.6.3",
101-
"babel-preset-gatsby": "^0.2.20",
102-
"husky": "^3.0.9",
103-
"import-all.macro": "^2.0.3",
104-
"npm-check": "^5.9.0",
105-
"prettier": "^1.17.1"
116+
"@babel/plugin-proposal-optional-chaining": "^7.14.5",
117+
"@babel/preset-env": "^7.14.5",
118+
"babel-preset-gatsby": "^1.7.1",
119+
"husky": "^4.3.8",
120+
"import-all.macro": "^3.1.0",
121+
"npm-check": "^5.9.2",
122+
"prettier": "^2.3.1"
106123
},
107124
"husky": {
108125
"hooks": {

src/components/ContentArea.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const ContentAreaContainer = styled.main`
77
background-color: #fcfcfc;
88
margin-bottom: 5rem;
99
min-height: 80vh;
10-
${props =>
10+
${(props) =>
1111
props.mobileMenuOpen &&
1212
`
1313
display: none;

src/components/EndOfSubSection.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,15 @@ class EndOfSubSection extends React.Component {
4343
render() {
4444
return (
4545
<PagesContext.Consumer>
46-
{value => {
46+
{(value) => {
4747
const currentPath = value.current.path
4848
let sectionPath = currentPath
4949
const sectionSeparator = nthIndex(currentPath, "/", 2)
5050
if (sectionSeparator !== -1) {
5151
sectionPath = currentPath.substr(0, sectionSeparator)
5252
}
5353
const sectionPages = value.all
54-
.filter(o => o.path.startsWith(`${sectionPath}/`))
54+
.filter((o) => o.path.startsWith(`${sectionPath}/`))
5555
.sort((a, b) => {
5656
a = a.path.toLowerCase()
5757
b = b.path.toLowerCase()

src/components/Loading.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const LoadingWrapper = styled.div`
1010
align-items: center;
1111
flex-direction: column;
1212
width: 100%;
13-
${props =>
13+
${(props) =>
1414
props.heightHint &&
1515
`
1616
height: ${props.heightHint};

src/components/LoginControls.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const StyledButton = styled(MaterialButton)`
2323
class LoginControls extends React.Component {
2424
static contextType = LoginStateContext
2525

26-
doSignOut = e => {
26+
doSignOut = (e) => {
2727
e.preventDefault()
2828
signOut()
2929
}
@@ -33,8 +33,9 @@ class LoginControls extends React.Component {
3333
return
3434
}
3535
const details = await getCachedUserDetails()
36-
let name = `${details?.user_field?.first_name || ""} ${details?.user_field
37-
?.last_name || ""}`.trim()
36+
let name = `${details?.user_field?.first_name || ""} ${
37+
details?.user_field?.last_name || ""
38+
}`.trim()
3839
if (name === "") {
3940
name = details.email
4041
}

src/components/PointsBalloon/CustomTooltip.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const StyledTooltip = styled.div`
1919
}
2020
`
2121

22-
const CustomTooltip = props => {
22+
const CustomTooltip = (props) => {
2323
if (!props.active) {
2424
return null
2525
}

src/components/Sidebar.js

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const SidebarContainer = styled.div`
3131
flex-direction: column;
3232
background-color: white;
3333
34-
${props =>
34+
${(props) =>
3535
!props.mobileMenuOpen &&
3636
`
3737
display: none;
@@ -111,7 +111,7 @@ const MobileWrapper = styled.div`
111111
}
112112
`
113113

114-
const MobileWrapperOrFragment = props => {
114+
const MobileWrapperOrFragment = (props) => {
115115
if (props.mobileMenuOpen) {
116116
return <MobileWrapper {...props} />
117117
}
@@ -121,12 +121,13 @@ const MobileWrapperOrFragment = props => {
121121
class Sidebar extends React.Component {
122122
render() {
123123
let edges =
124-
this.props.data?.allMarkdownRemark?.edges.map(o => o.node?.frontmatter) ||
125-
[]
124+
this.props.data?.allMarkdownRemark?.edges.map(
125+
(o) => o.node?.frontmatter,
126+
) || []
126127
if (process.env.NODE_ENV === "production") {
127-
edges = edges.filter(o => !o.hidden)
128+
edges = edges.filter((o) => !o.hidden)
128129
}
129-
edges = edges.filter(o => !o.information_page)
130+
edges = edges.filter((o) => !o.information_page)
130131
edges.sort((a, b) =>
131132
a.title.localeCompare(b.title, undefined, {
132133
numeric: true,
@@ -136,7 +137,7 @@ class Sidebar extends React.Component {
136137
let content = content2.concat(edges)
137138
content = content.concat(futurePages)
138139

139-
let middlepoint = content.findIndex(o => o.title === "Part 7")
140+
let middlepoint = content.findIndex((o) => o.title === "Part 7")
140141
content.splice(middlepoint + 1, 0, {
141142
separator: true,
142143
title: "Java Programming II",
@@ -198,10 +199,10 @@ const query = graphql`
198199
}
199200
`
200201

201-
const SidebarWithData = props => (
202+
const SidebarWithData = (props) => (
202203
<StaticQuery
203204
query={query}
204-
render={data => <Sidebar data={data} {...props} />}
205+
render={(data) => <Sidebar data={data} {...props} />}
205206
/>
206207
)
207208

src/components/TreeView/TreeViewItem.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,13 @@ const NavigationLink = styled(GatsbyLink)`
3838
border-left: 0.5em solid white;
3939
width: 100%;
4040
background-color: white;
41-
${props =>
42-
props.active === "t" &&
43-
`
41+
${(props) =>
42+
props.active === "t" &&
43+
`
4444
border-color: #f75b4b !important;
4545
background-color: #edeaea;
4646
`}
47-
:hover {
47+
:hover {
4848
text-decoration: none;
4949
color: black;
5050
background-color: #f5ebeb;
@@ -111,7 +111,7 @@ class TreeViewItem extends React.Component {
111111
}
112112

113113
onClick = () => {
114-
this.setState(prev => ({
114+
this.setState((prev) => ({
115115
childrenVisible: !prev.childrenVisible,
116116
}))
117117
}
@@ -185,7 +185,7 @@ class TreeViewItem extends React.Component {
185185
innerRef={this.childrenListRef}
186186
style={{ "--open-ratio": `${openRatio}` }}
187187
>
188-
{this.props.item.children.map(i => (
188+
{this.props.item.children.map((i) => (
189189
<TreeViewItem key={i.title} item={i} />
190190
))}
191191
</ChildrenList>

src/components/TreeView/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class TreeView extends React.Component {
1313
render() {
1414
return (
1515
<StyledUl>
16-
{this.props.data.map(top => (
16+
{this.props.data.map((top) => (
1717
<TreeViewItem key={top.title} item={top} spy />
1818
))}
1919
</StyledUl>

0 commit comments

Comments
 (0)