Skip to content

Commit 62cdd77

Browse files
chore(client): migrate to React 17 (freeCodeCamp#58355)
Co-authored-by: Sem Bauke <[email protected]>
1 parent 535ca82 commit 62cdd77

File tree

29 files changed

+521
-501
lines changed

29 files changed

+521
-501
lines changed

client/package.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,11 @@
4949
"@fortawesome/free-solid-svg-icons": "6.7.1",
5050
"@fortawesome/react-fontawesome": "0.2.2",
5151
"@freecodecamp/loop-protect": "3.0.0",
52-
"@freecodecamp/react-calendar-heatmap": "1.1.0",
5352
"@freecodecamp/ui": "3.1.1",
53+
"@gatsbyjs/reach-router": "1.3.9",
5454
"@growthbook/growthbook-react": "0.20.0",
5555
"@headlessui/react": "1.7.19",
5656
"@loadable/component": "5.16.3",
57-
"@reach/router": "1.3.4",
5857
"@redux-devtools/extension": "3.3.0",
5958
"@redux-saga/core": "^1.2.2",
6059
"@stripe/react-stripe-js": "1.16.5",
@@ -84,7 +83,7 @@
8483
"lodash": "4.17.21",
8584
"lodash-es": "4.17.21",
8685
"micromark": "4.0.0",
87-
"monaco-editor": "0.28.1",
86+
"monaco-editor": "0.33.0",
8887
"nanoid": "3.3.7",
8988
"normalize-url": "4.5.1",
9089
"path-browserify": "1.0.1",
@@ -94,16 +93,17 @@
9493
"prop-types": "15.8.1",
9594
"qrcode.react": "^3.1.0",
9695
"query-string": "7.1.3",
97-
"react": "16.14.0",
98-
"react-dom": "16.14.0",
96+
"react": "17.0.2",
97+
"react-calendar-heatmap": "1.9.0",
98+
"react-dom": "17.0.2",
9999
"react-final-form": "6.5.9",
100100
"react-gtm-module": "2.0.11",
101101
"react-helmet": "6.1.0",
102102
"react-hotkeys": "2.0.0",
103103
"react-i18next": "12.3.1",
104104
"react-instantsearch": "7.13.6",
105105
"react-instantsearch-core": "7.13.6",
106-
"react-monaco-editor": "0.40.0",
106+
"react-monaco-editor": "0.48.0",
107107
"react-redux": "7.2.9",
108108
"react-reflex": "4.1.0",
109109
"react-responsive": "9.0.2",
@@ -134,15 +134,15 @@
134134
"@testing-library/react": "12.1.5",
135135
"@total-typescript/ts-reset": "^0.5.0",
136136
"@types/canvas-confetti": "^1.6.0",
137+
"@types/gatsbyjs__reach-router": "1.3.0",
137138
"@types/jest": "29.5.12",
138139
"@types/js-yaml": "4.0.5",
139140
"@types/loadable__component": "5.13.8",
140141
"@types/lodash-es": "^4.17.6",
141142
"@types/node-fetch": "2",
142143
"@types/prismjs": "^1.26.0",
143-
"@types/reach__router": "1.3.15",
144-
"@types/react": "16.14.56",
145-
"@types/react-dom": "16.9.24",
144+
"@types/react": "17.0.83",
145+
"@types/react-dom": "17.0.19",
146146
"@types/react-gtm-module": "2.0.3",
147147
"@types/react-helmet": "6.1.11",
148148
"@types/react-redux": "7.1.33",
@@ -164,9 +164,9 @@
164164
"jest-json-schema-extended": "1.0.1",
165165
"joi": "17.12.2",
166166
"js-yaml": "4.1.0",
167-
"monaco-editor-webpack-plugin": "4.2.0",
167+
"monaco-editor-webpack-plugin": "7.0.1",
168168
"node-fetch": "2.7.0",
169-
"react-test-renderer": "16.14.0",
169+
"react-test-renderer": "17.0.2",
170170
"redux-saga-test-plan": "4.0.6",
171171
"serve": "13.0.4",
172172
"ts-node": "10.9.2",

client/src/client-only-routes/show-unsubscribed.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { RouteComponentProps } from '@reach/router';
1+
import type { RouteComponentProps } from '@gatsbyjs/reach-router';
22
import React from 'react';
33
import Helmet from 'react-helmet';
44
import { useTranslation } from 'react-i18next';

client/src/components/Donation/donation-modal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { WindowLocation } from '@reach/router';
1+
import { WindowLocation } from '@gatsbyjs/reach-router';
22
import React, { useEffect, useState } from 'react';
33
import { connect } from 'react-redux';
44
import { goToAnchor } from 'react-scrollable-anchor';

client/src/components/FourOhFour/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { RouteComponentProps } from '@reach/router';
1+
import { RouteComponentProps } from '@gatsbyjs/reach-router';
22
import React from 'react';
33
import Helmet from 'react-helmet';
44
import { useTranslation } from 'react-i18next';

client/src/components/create-redirect.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { navigate } from 'gatsby';
2-
import type { RouteComponentProps } from '@reach/router';
2+
import type { RouteComponentProps } from '@gatsbyjs/reach-router';
33

44
const createRedirect =
55
(to = '/'): ((_props: RouteComponentProps) => JSX.Element | null) =>

client/src/components/profile/components/heat-map.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
22
// @ts-ignore
3-
import CalendarHeatMap from '@freecodecamp/react-calendar-heatmap';
3+
import CalendarHeatMap from 'react-calendar-heatmap';
44
// TODO: Check if we can import { addDays, addMonths ... } from 'date-fns'
55
// without bundling all of the package then we can remove the disable-next-line
66
// comments.
@@ -19,7 +19,7 @@ import { useTranslation } from 'react-i18next';
1919
import ReactTooltip from 'react-tooltip';
2020
import { Row, Spacer } from '@freecodecamp/ui';
2121

22-
import '@freecodecamp/react-calendar-heatmap/dist/styles.css';
22+
import 'react-calendar-heatmap/dist/styles.css';
2323
import './heatmap.css';
2424

2525
// eslint-disable-next-line @typescript-eslint/ban-ts-comment

client/src/components/search/with-instant-search.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { Location } from '@reach/router';
2-
import type { WindowLocation } from '@reach/router';
1+
import { Location } from '@gatsbyjs/reach-router';
2+
import type { WindowLocation } from '@gatsbyjs/reach-router';
33
import type { SearchOptions } from 'instantsearch.js';
44
import algoliasearch, { type SearchClient } from 'algoliasearch/lite';
55
import React, { useEffect, useRef } from 'react';

client/src/pages/404.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Router } from '@reach/router';
1+
import { Router } from '@gatsbyjs/reach-router';
22
import { withPrefix } from 'gatsby';
33
import React from 'react';
44

client/src/pages/certification.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Router } from '@reach/router';
1+
import { Router } from '@gatsbyjs/reach-router';
22
import { withPrefix } from 'gatsby';
33
import React from 'react';
44

client/src/pages/challenges.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import {
22
createHistory,
33
createMemorySource,
44
LocationProvider
5-
} from '@reach/router';
5+
} from '@gatsbyjs/reach-router';
66
import { render } from '@testing-library/react';
77
import { navigate, withPrefix } from 'gatsby';
88
import React from 'react';

0 commit comments

Comments
 (0)