Skip to content

Commit 6d1cbc3

Browse files
committed
build: update dependencies, resolve console errors
1 parent ce58df1 commit 6d1cbc3

33 files changed

+745
-760
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
"dependencies": {
7373
"@material-ui/core": "4.11.0",
7474
"@material-ui/icons": "4.9.1",
75-
"@sentry/browser": "5.27.3",
75+
"@sentry/browser": "5.27.4",
7676
"@sentry/electron": "2.0.3",
7777
"about-window": "1.13.4",
7878
"archiver": "5.0.2",

public/app/listeners/deleteAppInstanceResource.js

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ const deleteAppInstanceResource = (mainWindow, db) => (event, payload = {}) => {
1111

1212
mainWindow.webContents.send(DELETE_APP_INSTANCE_RESOURCE_CHANNEL, payload);
1313
} catch (e) {
14+
// eslint-disable-next-line no-console
1415
console.error(e);
1516
mainWindow.webContents.send(DELETE_APP_INSTANCE_RESOURCE_CHANNEL, null);
1617
}

public/app/listeners/deleteFile.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const logger = require('../logger');
33
const { DELETE_FILE_CHANNEL } = require('../config/channels');
44
const { ERROR_GENERAL } = require('../config/errors');
55

6-
const deleteFile = mainWindow => (event, payload = {}) => {
6+
const deleteFile = (mainWindow) => (event, payload = {}) => {
77
try {
88
const {
99
data: { uri },
@@ -19,6 +19,7 @@ const deleteFile = mainWindow => (event, payload = {}) => {
1919

2020
mainWindow.webContents.send(DELETE_FILE_CHANNEL, payload);
2121
} catch (e) {
22+
// eslint-disable-next-line no-console
2223
console.error(e);
2324
mainWindow.webContents.send(DELETE_FILE_CHANNEL, ERROR_GENERAL);
2425
}

public/app/listeners/getAppInstance.js

+5-4
Original file line numberDiff line numberDiff line change
@@ -17,23 +17,24 @@ const getAppInstance = (mainWindow, db) => (event, payload = {}) => {
1717
.get('phases')
1818
.find({ id: subSpaceId })
1919
.get('items')
20-
.filter(item => item.appInstance)
21-
.map(item => item.appInstance)
20+
.filter((item) => item.appInstance)
21+
.map((item) => item.appInstance)
2222
.find({ id })
2323
.value();
2424
} else {
2525
appInstance = db
2626
.get('spaces')
2727
.find({ id: spaceId })
2828
.get('items')
29-
.filter(item => item.appInstance)
30-
.map(item => item.appInstance)
29+
.filter((item) => item.appInstance)
30+
.map((item) => item.appInstance)
3131
.find({ id })
3232
.value();
3333
}
3434

3535
mainWindow.webContents.send(GET_APP_INSTANCE_CHANNEL, appInstance);
3636
} catch (e) {
37+
// eslint-disable-next-line no-console
3738
console.error(e);
3839
mainWindow.webContents.send(GET_APP_INSTANCE_CHANNEL, null);
3940
}

public/app/listeners/getAppInstanceResources.js

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ const getAppInstanceResources = (mainWindow, db) => (event, data = {}) => {
3232
}
3333
);
3434
} catch (e) {
35+
// eslint-disable-next-line no-console
3536
console.error(e);
3637
// error is sent back to channel specific for this app instance
3738
mainWindow.webContents.send(

public/app/listeners/patchAppInstanceResource.js

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ const patchAppInstanceResource = (mainWindow, db) => (event, payload = {}) => {
1919
db.write();
2020
mainWindow.webContents.send(PATCH_APP_INSTANCE_RESOURCE_CHANNEL, resource);
2121
} catch (e) {
22+
// eslint-disable-next-line no-console
2223
console.error(e);
2324
mainWindow.webContents.send(PATCH_APP_INSTANCE_RESOURCE_CHANNEL, null);
2425
}

public/app/listeners/postAppInstanceResource.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,15 @@ const postAppInstanceResource = (mainWindow, db) => (event, payload = {}) => {
3232
};
3333

3434
// write the resource to the database
35-
db.get(APP_INSTANCE_RESOURCES_COLLECTION)
36-
.push(resourceToWrite)
37-
.write();
35+
db.get(APP_INSTANCE_RESOURCES_COLLECTION).push(resourceToWrite).write();
3836

3937
// send back the resource
4038
mainWindow.webContents.send(
4139
POST_APP_INSTANCE_RESOURCE_CHANNEL,
4240
resourceToWrite
4341
);
4442
} catch (e) {
43+
// eslint-disable-next-line no-console
4544
console.error(e);
4645
mainWindow.webContents.send(POST_APP_INSTANCE_RESOURCE_CHANNEL, null);
4746
}

scripts/setup.js

+2
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ const env = JSON.stringify({
1616
GOOGLE_API_KEY,
1717
GOOGLE_ANALYTICS_ID,
1818
LOGGING_LEVEL,
19+
HELLO: 'er',
20+
REACT_APP_HELLO_D: 'wef',
1921
});
2022

2123
fs.writeFileSync(path.join(DEFAULT_PATH, NAME), env, { encoding: 'utf8' });

src/Home.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React, { Component } from 'react';
22
import { connect } from 'react-redux';
33
import PropTypes from 'prop-types';
44
import { withTranslation } from 'react-i18next';
5-
import { List } from 'immutable';
5+
import { List, Set } from 'immutable';
66
import { withRouter } from 'react-router';
77
import classNames from 'classnames';
88
import { withStyles } from '@material-ui/core/styles';
@@ -27,7 +27,7 @@ import Main from './components/common/Main';
2727
import { HOME_PATH } from './config/paths';
2828
import WelcomeContent from './components/common/WelcomeContent';
2929

30-
const styles = theme => ({
30+
const styles = (theme) => ({
3131
...Styles(theme),
3232
wrapper: {
3333
marginTop: theme.spacing(2),
@@ -66,7 +66,7 @@ class Home extends Component {
6666
history: PropTypes.shape({
6767
replace: PropTypes.func.isRequired,
6868
}).isRequired,
69-
spaces: PropTypes.instanceOf(List).isRequired,
69+
spaces: PropTypes.instanceOf(Set).isRequired,
7070
activity: PropTypes.bool,
7171
favoriteSpaces: PropTypes.instanceOf(List).isRequired,
7272
recentSpaces: PropTypes.instanceOf(List).isRequired,
@@ -123,14 +123,14 @@ class Home extends Component {
123123
}
124124
}
125125

126-
filterSpaces = spaces => {
126+
filterSpaces = (spaces) => {
127127
const { searchQuery, spaces: originalSpaces } = this.props;
128128
// get space content by id
129129
let filteredSpaces = spaces
130-
.map(id => originalSpaces.find(({ id: spaceId }) => id === spaceId))
130+
.map((id) => originalSpaces.find(({ id: spaceId }) => id === spaceId))
131131
// remove undefined space
132132
// this case can happen if originalSpaces is updated before spaces
133-
.filter(space => space);
133+
.filter((space) => space);
134134

135135
filteredSpaces = searchSpacesByQuery(filteredSpaces, searchQuery);
136136
return filteredSpaces;

src/actions/appInstance.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ const getAppInstance = async (
2020

2121
// only consider items that have app instances
2222
const appInstances = items
23-
.filter(item => item.appInstance)
24-
.map(item => item.appInstance);
23+
.filter((item) => item.appInstance)
24+
.map((item) => item.appInstance);
2525

2626
// find the app instance with this id
2727
const appInstance = _.find(appInstances, ['id', id]);
@@ -51,6 +51,7 @@ const getAppInstance = async (
5151
);
5252
}
5353
} catch (err) {
54+
// eslint-disable-next-line no-console
5455
console.error(err);
5556
}
5657
};
@@ -78,6 +79,7 @@ const patchAppInstance = async (
7879
}
7980
);
8081
} catch (err) {
82+
// eslint-disable-next-line no-console
8183
console.error(err);
8284
}
8385
};

src/actions/appInstanceResource.js

+4
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ const getAppInstanceResources = async (
3939
}
4040
);
4141
} catch (err) {
42+
// eslint-disable-next-line no-console
4243
console.error(err);
4344
}
4445
};
@@ -70,6 +71,7 @@ const postAppInstanceResource = async (
7071
}
7172
);
7273
} catch (err) {
74+
// eslint-disable-next-line no-console
7375
console.error(err);
7476
}
7577
};
@@ -98,6 +100,7 @@ const patchAppInstanceResource = async (
98100
}
99101
);
100102
} catch (err) {
103+
// eslint-disable-next-line no-console
101104
console.error(err);
102105
}
103106
};
@@ -127,6 +130,7 @@ const deleteAppInstanceResource = async (
127130
}
128131
);
129132
} catch (err) {
133+
// eslint-disable-next-line no-console
130134
console.error(err);
131135
}
132136
};

src/actions/authentication.js

+5-3
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const flagSigningIn = createFlag(FLAG_SIGNING_IN);
2828
const flagSigningOut = createFlag(FLAG_SIGNING_OUT);
2929
const flagGettingAuthenticated = createFlag(FLAG_GETTING_AUTHENTICATED);
3030

31-
const signIn = async ({ username, lang, anonymous }) => async dispatch => {
31+
const signIn = async ({ username, lang, anonymous }) => async (dispatch) => {
3232
try {
3333
dispatch(flagSigningIn(true));
3434
window.ipcRenderer.send(SIGN_IN_CHANNEL, { username, lang, anonymous });
@@ -50,7 +50,7 @@ const signIn = async ({ username, lang, anonymous }) => async dispatch => {
5050
}
5151
};
5252

53-
const signOut = user => dispatch => {
53+
const signOut = (user) => (dispatch) => {
5454
try {
5555
dispatch(flagSigningOut(true));
5656
window.ipcRenderer.send(SIGN_OUT_CHANNEL);
@@ -78,13 +78,14 @@ const signOut = user => dispatch => {
7878
dispatch(flagSigningOut(false));
7979
});
8080
} catch (e) {
81+
// eslint-disable-next-line no-console
8182
console.error(e);
8283
toastr.error(i18n.t(ERROR_MESSAGE_HEADER), i18n.t(ERROR_SIGNING_OUT));
8384
dispatch(flagSigningOut(false));
8485
}
8586
};
8687

87-
const isAuthenticated = async () => dispatch => {
88+
const isAuthenticated = async () => (dispatch) => {
8889
try {
8990
dispatch(flagGettingAuthenticated(true));
9091
window.ipcRenderer.send(IS_AUTHENTICATED_CHANNEL);
@@ -106,6 +107,7 @@ const isAuthenticated = async () => dispatch => {
106107
}
107108
);
108109
} catch (e) {
110+
// eslint-disable-next-line no-console
109111
console.error(e);
110112
toastr.error(
111113
i18n.t(ERROR_MESSAGE_HEADER),

src/actions/developer.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import {
1818
const flagGettingDatabase = createFlag(FLAG_GETTING_DATABASE);
1919
const flagSettingDatabase = createFlag(FLAG_SETTING_DATABASE);
2020

21-
const getDatabase = async () => dispatch => {
21+
const getDatabase = async () => (dispatch) => {
2222
try {
2323
dispatch(flagGettingDatabase(true));
2424
window.ipcRenderer.send(GET_DATABASE_CHANNEL);
@@ -37,12 +37,13 @@ const getDatabase = async () => dispatch => {
3737
dispatch(flagGettingDatabase(false));
3838
});
3939
} catch (err) {
40+
// eslint-disable-next-line no-console
4041
console.error(err);
4142
toastr.error(i18n.t(ERROR_MESSAGE_HEADER), i18n.t(ERROR_GETTING_DATABASE));
4243
}
4344
};
4445

45-
const setDatabase = async database => dispatch => {
46+
const setDatabase = async (database) => (dispatch) => {
4647
try {
4748
dispatch(flagSettingDatabase(true));
4849
window.ipcRenderer.send(SET_DATABASE_CHANNEL, database);
@@ -61,6 +62,7 @@ const setDatabase = async database => dispatch => {
6162
dispatch(flagSettingDatabase(false));
6263
});
6364
} catch (err) {
65+
// eslint-disable-next-line no-console
6466
console.error(err);
6567
toastr.error(i18n.t(ERROR_MESSAGE_HEADER), i18n.t(ERROR_SETTING_DATABASE));
6668
}

src/actions/file.js

+1
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ export const deleteFile = async (payload = {}, callback) => {
7272
}
7373
});
7474
} catch (err) {
75+
// eslint-disable-next-line no-console
7576
console.error(err);
7677
}
7778
};

0 commit comments

Comments
 (0)