Skip to content

Commit b78d3ce

Browse files
authored
Merge pull request #391 from manosim/update-dependencies
Update dependencies & apply new prettier rules
2 parents b6ebfaf + ac7f0ec commit b78d3ce

37 files changed

+984
-1058
lines changed

package.json

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -83,21 +83,21 @@
8383
}
8484
},
8585
"dependencies": {
86-
"@primer/octicons-react": "^9.4.0",
86+
"@primer/octicons-react": "^9.6.0",
8787
"auto-launch": "=5.0.5",
8888
"axios": "=0.19.2",
89-
"date-fns": "^2.9.0",
90-
"electron-updater": "^4.2.0",
89+
"date-fns": "^2.11.1",
90+
"electron-updater": "^4.2.5",
9191
"final-form": "^4.18.7",
9292
"lodash": "^4.17.15",
93-
"menubar": "^8.0.0",
93+
"menubar": "^8.0.1",
9494
"nprogress": "=0.2.0",
95-
"react": "=16.12.0",
96-
"react-dom": "=16.12.0",
95+
"react": "=16.13.1",
96+
"react-dom": "=16.13.1",
9797
"react-emojione": "=5.0.1",
9898
"react-final-form": "^6.3.5",
99-
"react-is": "^16.12.0",
100-
"react-redux": "=7.1.3",
99+
"react-is": "^16.13.1",
100+
"react-redux": "=7.2.0",
101101
"react-router-dom": "^5.1.2",
102102
"react-transition-group": "^4.3.0",
103103
"react-typist": "^2.0.5",
@@ -107,29 +107,29 @@
107107
"redux-storage-engine-localstorage": "=1.1.4",
108108
"redux-thunk": "=2.3.0",
109109
"styled-components": "^5.0.1",
110-
"ts-loader": "^6.2.1",
111-
"typescript": "^3.7.5"
110+
"ts-loader": "^6.2.2",
111+
"typescript": "^3.8.3"
112112
},
113113
"devDependencies": {
114-
"@testing-library/react": "^9.4.0",
115-
"@types/jest": "^25.1.2",
114+
"@testing-library/react": "^10.0.1",
115+
"@types/jest": "^25.1.4",
116116
"@types/lodash": "^4.14.149",
117-
"@types/node": "^12.12.21",
118-
"@types/react": "^16.9.19",
117+
"@types/node": "^13.9.5",
118+
"@types/react": "^16.9.26",
119119
"@types/react-redux": "^7.1.7",
120-
"@types/react-transition-group": "^4.2.3",
121-
"@types/styled-components": "^4.4.2",
122-
"electron": "^8.0.0",
123-
"electron-builder": "^22.3.2",
124-
"jest": "^25.1.0",
125-
"nock": "^11.8.2",
126-
"prettier": "=1.19.1",
127-
"react-test-renderer": "=16.12.0",
120+
"@types/react-transition-group": "^4.2.4",
121+
"@types/styled-components": "^5.0.1",
122+
"electron": "^8.2.0",
123+
"electron-builder": "^22.4.1",
124+
"jest": "^25.2.3",
125+
"nock": "^12.0.3",
126+
"prettier": "=2.0.2",
127+
"react-test-renderer": "=16.13.1",
128128
"redux-logger": "=3.0.6",
129129
"redux-mock-store": "=1.5.4",
130-
"ts-jest": "^25.2.0",
131-
"webpack": "^4.41.5",
132-
"webpack-cli": "^3.3.10",
130+
"ts-jest": "^25.2.1",
131+
"webpack": "^4.42.1",
132+
"webpack-cli": "^3.3.11",
133133
"webpack-merge": "^4.2.2"
134134
}
135135
}

src/js/__mocks__/electron.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
window.Notification = function(title) {
1+
window.Notification = function (title) {
22
this.title = title;
33

44
return {
@@ -16,10 +16,10 @@ window.Audio = class Audio {
1616

1717
window.localStorage = {
1818
store: {},
19-
getItem: function(key) {
19+
getItem: function (key) {
2020
return this.store[key];
2121
},
22-
setItem: function(key, item) {
22+
setItem: function (key, item) {
2323
this.store[key] = item;
2424
},
2525
removeItem: jest.fn(),

src/js/__mocks__/redux-logger.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export function createLogger() {
2-
return () => next => action => {
2+
return () => (next) => (action) => {
33
return next(action);
44
};
55
}

src/js/__mocks__/redux-storage.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
export function createMiddleware() {
22
return () => {
3-
return next => action => {
3+
return (next) => (action) => {
44
return next(action);
55
};
66
};
@@ -13,7 +13,7 @@ export function createLoader() {
1313
},
1414
};
1515

16-
return () => new Promise(resolve => resolve(state));
16+
return () => new Promise((resolve) => resolve(state));
1717
}
1818

1919
export function reducer(clb) {

src/js/actions/index.test.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,9 @@ describe('actions/index.js', () => {
3030
const authOptions = Constants.DEFAULT_AUTH_OPTIONS;
3131
const code = 'THISISACODE';
3232

33-
nock('https://github.com/')
34-
.post('/login/oauth/access_token')
35-
.reply(200, {
36-
access_token: 'THISISATOKEN',
37-
});
33+
nock('https://github.com/').post('/login/oauth/access_token').reply(200, {
34+
access_token: 'THISISATOKEN',
35+
});
3836

3937
const expectedActions = [
4038
{ type: actions.LOGIN.REQUEST },

src/js/actions/index.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export function loginUser(authOptions, code) {
2525
const { hostname } = authOptions;
2626
const isEnterprise = hostname !== Constants.DEFAULT_AUTH_OPTIONS.hostname;
2727

28-
return dispatch => {
28+
return (dispatch) => {
2929
const url = `https://${hostname}/login/oauth/access_token`;
3030
const method = 'POST';
3131
const data = {
@@ -37,15 +37,15 @@ export function loginUser(authOptions, code) {
3737
dispatch({ type: LOGIN.REQUEST });
3838

3939
return apiRequest(url, method, data)
40-
.then(function(response) {
40+
.then(function (response) {
4141
dispatch({
4242
type: LOGIN.SUCCESS,
4343
payload: response.data,
4444
isEnterprise,
4545
hostname,
4646
});
4747
})
48-
.catch(function(error) {
48+
.catch(function (error) {
4949
dispatch({ type: LOGIN.FAILURE, payload: error.response.data });
5050
});
5151
};
@@ -77,7 +77,7 @@ export function fetchNotifications() {
7777

7878
function getEnterpriseNotifications() {
7979
const enterpriseAccounts = getState().auth.enterpriseAccounts;
80-
return enterpriseAccounts.map(account => {
80+
return enterpriseAccounts.map((account) => {
8181
const hostname = account.hostname;
8282
const token = account.token;
8383
const url = `https://${hostname}/api/v3/${endpointSuffix}`;
@@ -92,7 +92,7 @@ export function fetchNotifications() {
9292
.then(
9393
axios.spread((gitHubNotifications, ...entAccNotifications) => {
9494
const notifications = entAccNotifications.map(
95-
accountNotifications => {
95+
(accountNotifications) => {
9696
const { hostname } = parse(accountNotifications.config.url);
9797

9898
return {
@@ -118,7 +118,7 @@ export function fetchNotifications() {
118118
});
119119
})
120120
)
121-
.catch(error =>
121+
.catch((error) =>
122122
dispatch({ type: NOTIFICATIONS.FAILURE, payload: error.response.data })
123123
);
124124
};
@@ -141,13 +141,13 @@ export function markNotification(id, hostname) {
141141
dispatch({ type: MARK_NOTIFICATION.REQUEST });
142142

143143
return apiRequestAuth(url, method, token, {})
144-
.then(function(response) {
144+
.then(function (response) {
145145
dispatch({
146146
type: MARK_NOTIFICATION.SUCCESS,
147147
meta: { id, hostname },
148148
});
149149
})
150-
.catch(function(error) {
150+
.catch(function (error) {
151151
dispatch({
152152
type: MARK_NOTIFICATION.FAILURE,
153153
payload: error.response.data,
@@ -177,14 +177,14 @@ export function markRepoNotifications(repoSlug, hostname) {
177177
dispatch({ type: MARK_REPO_NOTIFICATION.REQUEST });
178178

179179
return apiRequestAuth(url, method, token, {})
180-
.then(function(response) {
180+
.then(function (response) {
181181
dispatch({
182182
type: MARK_REPO_NOTIFICATION.SUCCESS,
183183
payload: response.data,
184184
meta: { hostname, repoSlug },
185185
});
186186
})
187-
.catch(function(error) {
187+
.catch(function (error) {
188188
dispatch({
189189
type: MARK_REPO_NOTIFICATION.FAILURE,
190190
payload: error.response.data,

src/js/app.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export const PrivateRoute = ({ component: Component, ...rest }) => {
3333
return (
3434
<Route
3535
{...rest}
36-
render={props =>
36+
render={(props) =>
3737
isAuthenticated ? (
3838
<Component {...props} />
3939
) : (
@@ -96,7 +96,7 @@ const GlobalStyle = createGlobalStyle`
9696
top: 0;
9797
left: ${SIDEBAR_WIDTH};
9898
z-index: 1031;
99-
background: ${props => props.theme.primary};
99+
background: ${(props) => props.theme.primary};
100100
101101
width: 100%;
102102
height: 2px;

src/js/components/__snapshots__/sidebar.test.tsx.snap

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ exports[`components/Sidebar.tsx should render itself & its children (logged in)
6767
"verticalAlign": "text-bottom",
6868
}
6969
}
70-
viewBox="0 0 14 16"
71-
width={10.5}
70+
viewBox="0 0 15 16"
71+
width={11.25}
7272
>
7373
<path
7474
d="M14 12v1H0v-1l.73-.58c.77-.77.81-2.55 1.19-4.42C2.69 3.23 6 2 6 2c0-.55.45-1 1-1s1 .45 1 1c0 0 3.39 1.23 4.16 5 .38 1.88.42 3.66 1.19 4.42l.66.58H14zm-7 4c1.11 0 2-.89 2-2H5c0 1.11.89 2 2 2z"
@@ -233,8 +233,8 @@ exports[`components/Sidebar.tsx should render itself & its children (logged out)
233233
"verticalAlign": "text-bottom",
234234
}
235235
}
236-
viewBox="0 0 14 16"
237-
width={10.5}
236+
viewBox="0 0 15 16"
237+
width={11.25}
238238
>
239239
<path
240240
d="M14 12v1H0v-1l.73-.58c.77-.77.81-2.55 1.19-4.42C2.69 3.23 6 2 6 2c0-.55.45-1 1-1s1 .45 1 1c0 0 3.39 1.23 4.16 5 .38 1.88.42 3.66 1.19 4.42l.66.58H14zm-7 4c1.11 0 2-.89 2-2H5c0 1.11.89 2 2 2z"

src/js/components/account-notifications.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const Account = styled.div`
1111
justify-content: flex-end;
1212
align-items: center;
1313
padding: 0.5rem 1rem;
14-
background-color: ${props => props.theme.primaryDark};
14+
background-color: ${(props) => props.theme.primaryDark};
1515
color: white;
1616
font-size: 0.9rem;
1717
@@ -30,7 +30,7 @@ export const AccountNotifications = (props: IProps) => {
3030
const { hostname, showAccountHostname, notifications } = props;
3131

3232
const groupedNotifications = _(notifications)
33-
.groupBy(obj => obj.repository.full_name)
33+
.groupBy((obj) => obj.repository.full_name)
3434
.sortBy((_, key) => key)
3535
.value();
3636

@@ -47,7 +47,7 @@ export const AccountNotifications = (props: IProps) => {
4747
</Account>
4848
)}
4949

50-
{Object.values(groupedNotifications).map(repoNotifications => {
50+
{Object.values(groupedNotifications).map((repoNotifications) => {
5151
const repoSlug = repoNotifications[0].repository.full_name;
5252

5353
return (

src/js/components/all-read.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import { AllRead } from './all-read';
66

77
jest.mock('react-typist');
88

9-
describe('components/all-read.tsx', function() {
10-
it('should render itself & its children', function() {
9+
describe('components/all-read.tsx', function () {
10+
it('should render itself & its children', function () {
1111
spyOn(Constants, 'ALLREAD_EMOJIS');
1212
spyOn(Constants, 'ALLREAD_MESSAGES');
1313

0 commit comments

Comments
 (0)