Skip to content

Commit ce58df1

Browse files
committed
build: update dep, change proptypes object to shape
1 parent 47239f3 commit ce58df1

15 files changed

+2923
-2679
lines changed

package.json

+22-22
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@
7272
"dependencies": {
7373
"@material-ui/core": "4.11.0",
7474
"@material-ui/icons": "4.9.1",
75-
"@sentry/browser": "5.24.2",
76-
"@sentry/electron": "2.0.1",
75+
"@sentry/browser": "5.27.3",
76+
"@sentry/electron": "2.0.3",
7777
"about-window": "1.13.4",
7878
"archiver": "5.0.2",
7979
"bson-objectid": "1.3.1",
@@ -85,41 +85,41 @@
8585
"download": "8.0.0",
8686
"electron-devtools-installer": "3.1.1",
8787
"electron-is-dev": "1.2.0",
88-
"electron-log": "4.2.4",
88+
"electron-log": "4.3.0",
8989
"electron-publisher-s3": "20.17.2",
9090
"electron-updater": "4.3.5",
9191
"enzyme": "3.11.0",
9292
"enzyme-adapter-react-16": "1.15.5",
9393
"extract-zip": "2.0.1",
9494
"fs-extra": "9.0.1",
9595
"history": "5.0.0",
96-
"i18next": "19.7.0",
96+
"i18next": "19.8.3",
9797
"immutable": "4.0.0-rc.12",
98-
"is-online": "8.4.0",
98+
"is-online": "9.0.0",
9999
"katex": "0.12.0",
100100
"lodash": "4.17.20",
101101
"lowdb": "1.0.0",
102102
"md5": "2.3.0",
103103
"mime-types": "2.1.27",
104104
"mkdirp": "1.0.4",
105-
"mocha": "8.1.3",
105+
"mocha": "8.2.1",
106106
"node-machine-id": "1.1.12",
107107
"prop-types": "15.7.2",
108108
"qs": "6.9.4",
109-
"re-resizable": "6.6.1",
110-
"react": "16.13.1",
109+
"re-resizable": "6.9.0",
110+
"react": "17.0.1",
111111
"react-countup": "4.3.3",
112112
"react-detect-offline": "2.4.0",
113-
"react-dev-utils": "10.2.1",
113+
"react-dev-utils": "11.0.0",
114114
"react-diff-viewer": "3.1.1",
115-
"react-dom": "16.13.1",
115+
"react-dom": "17.0.1",
116116
"react-i18next": "11.7.3",
117117
"react-immutable-proptypes": "2.2.0",
118118
"react-joyride": "2.2.1",
119119
"react-json-view": "1.19.1",
120120
"react-loading": "2.0.3",
121121
"react-quill": "1.3.5",
122-
"react-redux": "7.2.1",
122+
"react-redux": "7.2.2",
123123
"react-redux-toastr": "7.6.5",
124124
"react-router": "5.2.0",
125125
"react-router-dom": "5.2.0",
@@ -135,28 +135,28 @@
135135
"universal-analytics": "0.4.23"
136136
},
137137
"devDependencies": {
138-
"@babel/cli": "7.11.6",
139-
"@babel/core": "7.11.6",
140-
"@babel/plugin-transform-runtime": "7.11.5",
141-
"@babel/preset-env": "7.11.5",
142-
"@babel/register": "7.11.5",
138+
"@babel/cli": "7.12.1",
139+
"@babel/core": "7.12.3",
140+
"@babel/plugin-transform-runtime": "7.12.1",
141+
"@babel/preset-env": "7.12.1",
142+
"@babel/register": "7.12.1",
143143
"@commitlint/cli": "11.0.0",
144144
"@commitlint/config-conventional": "11.0.0",
145145
"codacy-coverage": "3.4.0",
146146
"concurrently": "5.3.0",
147147
"cross-env": "7.0.2",
148-
"electron": "10.1.3",
149-
"electron-builder": "22.8.1",
148+
"electron": "10.1.5",
149+
"electron-builder": "22.9.1",
150150
"env-cmd": "10.1.0",
151151
"enzyme-to-json": "3.6.1",
152-
"eslint-config-airbnb": "18.2.0",
153-
"eslint-config-prettier": "6.12.0",
152+
"eslint-config-airbnb": "18.2.1",
153+
"eslint-config-prettier": "6.15.0",
154154
"eslint-plugin-mocha": "8.0.0",
155155
"husky": "4.3.0",
156156
"npm-run-all": "4.1.5",
157157
"prettier": "2.1.2",
158-
"pretty-quick": "3.0.2",
159-
"react-scripts": "3.4.3",
158+
"pretty-quick": "3.1.0",
159+
"react-scripts": "4.0.0",
160160
"redux-mock-store": "1.5.4",
161161
"spectron": "12.0.0",
162162
"standard-version": "9.0.0",

src/App.test.js

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import React from 'react';
22
import { shallow } from 'enzyme';
33
import { App } from './App';
4+
import { DEFAULT_USER_MODE } from './config/constants';
45

56
window.ipcRenderer = { once: jest.fn(), send: jest.fn() };
67

@@ -18,7 +19,12 @@ describe('<App />', () => {
1819
dispatchGetGeolocationEnabled: jest.fn(),
1920
dispatchIsAuthenticated: jest.fn(),
2021
geolocationEnabled: false,
21-
classes: {},
22+
classes: {
23+
toastrIcon: '',
24+
fullScreen: '',
25+
},
26+
userMode: DEFAULT_USER_MODE,
27+
connexionStatus: true,
2228
};
2329

2430
// eslint-disable-next-line react/jsx-props-no-spreading

src/__snapshots__/App.test.js.snap

+3-17
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,9 @@ exports[`<App /> renders correctly 1`] = `
9595
},
9696
"primary": Object {
9797
"contrastText": "#fff",
98-
"dark": "#737373",
99-
"light": "#737373",
100-
"main": "#737373",
98+
"dark": "#5050d2",
99+
"light": "#5050d2",
100+
"main": "#5050d2",
101101
},
102102
"secondary": Object {
103103
"contrastText": "rgba(0, 0, 0, 0.87)",
@@ -316,7 +316,6 @@ exports[`<App /> renders correctly 1`] = `
316316
"$$typeof": Symbol(react.memo),
317317
"WrappedComponent": [Function],
318318
"compare": null,
319-
"displayName": "Connect(ComposedComponent)",
320319
"type": [Function],
321320
}
322321
}
@@ -329,7 +328,6 @@ exports[`<App /> renders correctly 1`] = `
329328
"$$typeof": Symbol(react.memo),
330329
"WrappedComponent": [Function],
331330
"compare": null,
332-
"displayName": "Connect(ComposedComponent)",
333331
"type": [Function],
334332
}
335333
}
@@ -342,7 +340,6 @@ exports[`<App /> renders correctly 1`] = `
342340
"$$typeof": Symbol(react.memo),
343341
"WrappedComponent": [Function],
344342
"compare": null,
345-
"displayName": "Connect(ComposedComponent)",
346343
"type": [Function],
347344
}
348345
}
@@ -355,7 +352,6 @@ exports[`<App /> renders correctly 1`] = `
355352
"$$typeof": Symbol(react.memo),
356353
"WrappedComponent": [Function],
357354
"compare": null,
358-
"displayName": "Connect(ComposedComponent)",
359355
"type": [Function],
360356
}
361357
}
@@ -368,7 +364,6 @@ exports[`<App /> renders correctly 1`] = `
368364
"$$typeof": Symbol(react.memo),
369365
"WrappedComponent": [Function],
370366
"compare": null,
371-
"displayName": "Connect(ComposedComponent)",
372367
"type": [Function],
373368
}
374369
}
@@ -381,7 +376,6 @@ exports[`<App /> renders correctly 1`] = `
381376
"$$typeof": Symbol(react.memo),
382377
"WrappedComponent": [Function],
383378
"compare": null,
384-
"displayName": "Connect(ComposedComponent)",
385379
"type": [Function],
386380
}
387381
}
@@ -399,7 +393,6 @@ exports[`<App /> renders correctly 1`] = `
399393
"$$typeof": Symbol(react.memo),
400394
"WrappedComponent": [Function],
401395
"compare": null,
402-
"displayName": "Connect(ComposedComponent)",
403396
"type": [Function],
404397
}
405398
}
@@ -412,7 +405,6 @@ exports[`<App /> renders correctly 1`] = `
412405
"$$typeof": Symbol(react.memo),
413406
"WrappedComponent": [Function],
414407
"compare": null,
415-
"displayName": "Connect(ComposedComponent)",
416408
"type": [Function],
417409
}
418410
}
@@ -425,7 +417,6 @@ exports[`<App /> renders correctly 1`] = `
425417
"$$typeof": Symbol(react.memo),
426418
"WrappedComponent": [Function],
427419
"compare": null,
428-
"displayName": "Connect(ComposedComponent)",
429420
"type": [Function],
430421
}
431422
}
@@ -438,7 +429,6 @@ exports[`<App /> renders correctly 1`] = `
438429
"$$typeof": Symbol(react.memo),
439430
"WrappedComponent": [Function],
440431
"compare": null,
441-
"displayName": "Connect(ComposedComponent)",
442432
"type": [Function],
443433
}
444434
}
@@ -451,7 +441,6 @@ exports[`<App /> renders correctly 1`] = `
451441
"$$typeof": Symbol(react.memo),
452442
"WrappedComponent": [Function],
453443
"compare": null,
454-
"displayName": "Connect(ComposedComponent)",
455444
"type": [Function],
456445
}
457446
}
@@ -464,7 +453,6 @@ exports[`<App /> renders correctly 1`] = `
464453
"$$typeof": Symbol(react.memo),
465454
"WrappedComponent": [Function],
466455
"compare": null,
467-
"displayName": "Connect(ComposedComponent)",
468456
"type": [Function],
469457
}
470458
}
@@ -477,7 +465,6 @@ exports[`<App /> renders correctly 1`] = `
477465
"$$typeof": Symbol(react.memo),
478466
"WrappedComponent": [Function],
479467
"compare": null,
480-
"displayName": "Connect(ComposedComponent)",
481468
"type": [Function],
482469
}
483470
}
@@ -490,7 +477,6 @@ exports[`<App /> renders correctly 1`] = `
490477
"$$typeof": Symbol(react.memo),
491478
"WrappedComponent": [Function],
492479
"compare": null,
493-
"displayName": "Connect(ComposedComponent)",
494480
"type": [Function],
495481
}
496482
}

src/components/Settings.test.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { USER_MODES } from '../config/constants';
99

1010
const createSettingsProps = () => {
1111
return {
12-
t: text => text,
12+
t: (text) => text,
1313
classes: {
1414
appBar: '',
1515
root: '',
@@ -22,6 +22,7 @@ const createSettingsProps = () => {
2222
content: '',
2323
contentShift: '',
2424
settings: '',
25+
divider: '',
2526
},
2627
theme: {
2728
direction: 'ltr',

src/components/__snapshots__/Settings.test.js.snap

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ exports[`<Settings /> renders correctly 1`] = `
2424
<WithStyles(ForwardRef(Divider))
2525
classes={
2626
Object {
27-
"root": undefined,
27+
"root": "",
2828
}
2929
}
3030
variant="middle"

src/components/common/MainMenu.test.js

+16-5
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,27 @@ import {
1515
DASHBOARD_PATH,
1616
SAVED_SPACES_PATH,
1717
} from '../../config/paths';
18+
import { DEFAULT_USER_MODE } from '../../config/constants';
1819

1920
const MENUITEM_OFFLINE_NUMBER = 2;
2021
const MENUITEM_OFFLINE_ONLINE_COUNT = 11;
2122

22-
const createMainMenuProps = (developerMode, path, authenticated = true) => {
23+
const createMainMenuProps = (
24+
developerMode,
25+
path,
26+
authenticated = true,
27+
userMode = DEFAULT_USER_MODE
28+
) => {
2329
return {
24-
t: text => text,
30+
t: (text) => text,
2531
developerMode,
2632
history: { replace: jest.fn() },
2733
match: { path },
2834
authenticated,
35+
userMode,
36+
location: {
37+
pathname: 'somepath',
38+
},
2939
};
3040
};
3141

@@ -93,8 +103,9 @@ describe('<MainMenu />', () => {
93103
);
94104
});
95105

96-
it(`renders ${MENUITEM_OFFLINE_ONLINE_COUNT +
97-
1} <MenuItem /> components`, () => {
106+
it(`renders ${
107+
MENUITEM_OFFLINE_ONLINE_COUNT + 1
108+
} <MenuItem /> components`, () => {
98109
expect(wrapper.find(MenuItem)).toHaveLength(
99110
MENUITEM_OFFLINE_ONLINE_COUNT + 1
100111
);
@@ -118,7 +129,7 @@ describe('<MainMenu />', () => {
118129
const selectedMenuItem = wrapper.find({ selected: true });
119130
expect(selectedMenuItem.length).toBeLessThanOrEqual(2);
120131
expect(
121-
selectedMenuItem.map(menuItem =>
132+
selectedMenuItem.map((menuItem) =>
122133
menuItem.find(ListItemText).prop('primary')
123134
)
124135
).toEqual(Array(selectedMenuItem.length).fill(text));

src/components/common/Tour.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export class Tour extends Component {
5151
dispatchResetTour: PropTypes.func.isRequired,
5252
dispatchInitializeTour: PropTypes.func.isRequired,
5353
tourKey: PropTypes.string.isRequired,
54-
currentTour: PropTypes.oneOf(tours).isRequired,
54+
currentTour: PropTypes.oneOf(Object.values(tours)).isRequired,
5555
run: PropTypes.bool.isRequired,
5656
continuous: PropTypes.bool.isRequired,
5757
stepIndex: PropTypes.number.isRequired,

src/components/common/__snapshots__/DeveloperSwitch.test.js.snap

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ exports[`<DeveloperSwitch /> <DeveloperSwitch /> renders renders correctly 1`] =
77
>
88
<WithStyles(ForwardRef(FormControlLabel))
99
control={
10-
<ForwardRef(WithStyles)
10+
<WithStyles(ForwardRef(Switch))
1111
checked={false}
1212
color="primary"
1313
onChange={[Function]}
@@ -26,7 +26,7 @@ exports[`<DeveloperSwitch /> <DeveloperSwitch /> renders renders correctly 2`] =
2626
>
2727
<WithStyles(ForwardRef(FormControlLabel))
2828
control={
29-
<ForwardRef(WithStyles)
29+
<WithStyles(ForwardRef(Switch))
3030
checked={true}
3131
color="primary"
3232
onChange={[Function]}

src/components/common/__snapshots__/GeolocationControl.test.js.snap

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ exports[`<GeolocationControl /> <GeolocationControl /> as switch renders correct
3737
>
3838
<WithStyles(ForwardRef(FormControlLabel))
3939
control={
40-
<ForwardRef(WithStyles)
40+
<WithStyles(ForwardRef(Switch))
4141
checked={false}
4242
color="primary"
4343
onChange={[Function]}
@@ -56,7 +56,7 @@ exports[`<GeolocationControl /> <GeolocationControl /> as switch renders correct
5656
>
5757
<WithStyles(ForwardRef(FormControlLabel))
5858
control={
59-
<ForwardRef(WithStyles)
59+
<WithStyles(ForwardRef(Switch))
6060
checked={true}
6161
color="primary"
6262
onChange={[Function]}

src/components/dashboard/Dashboard.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,10 @@ export class Dashboard extends Component {
8282
changeLanguage: PropTypes.func.isRequired,
8383
}).isRequired,
8484
database: PropTypes.shape({
85-
user: PropTypes.object,
86-
spaces: PropTypes.arrayOf(PropTypes.object),
87-
users: PropTypes.arrayOf(PropTypes.object),
88-
actions: PropTypes.arrayOf(PropTypes.object),
85+
user: PropTypes.shape({}),
86+
spaces: PropTypes.arrayOf(PropTypes.shape({})),
87+
users: PropTypes.arrayOf(PropTypes.shape({})),
88+
actions: PropTypes.arrayOf(PropTypes.shape({})),
8989
}),
9090
dispatchGetDatabase: PropTypes.func.isRequired,
9191
userMode: PropTypes.oneOf(Object.values(USER_MODES)).isRequired,

src/components/dashboard/Dashboard.test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const sampleDatabase = {
3434
};
3535

3636
const createDashboardProps = ({
37-
userId,
37+
userId = 'userId',
3838
userMode = DEFAULT_USER_MODE,
3939
users,
4040
actions,

0 commit comments

Comments
 (0)