Skip to content

Commit 47a401b

Browse files
committed
update npm & typescript
1 parent ddd2684 commit 47a401b

9 files changed

+2156
-25364
lines changed

interface/package-lock.json

+2,074-23,693
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

interface/package.json

+15-15
Original file line numberDiff line numberDiff line change
@@ -6,29 +6,29 @@
66
"@material-ui/core": "^4.11.3",
77
"@material-ui/icons": "^4.11.2",
88
"@types/lodash": "^4.14.168",
9-
"@types/node": "^12.20.4",
9+
"@types/node": "^14.14.37",
1010
"@types/react": "^17.0.3",
11-
"@types/react-dom": "^17.0.1",
11+
"@types/react-dom": "^17.0.3",
1212
"@types/react-material-ui-form-validator": "^2.1.0",
13-
"@types/react-router": "^5.1.12",
14-
"@types/react-router-dom": "^5.1.6",
15-
"compression-webpack-plugin": "^4.0.0",
13+
"@types/react-router": "^5.1.13",
14+
"@types/react-router-dom": "^5.1.7",
15+
"compression-webpack-plugin": "^7.1.2",
1616
"express": "^4.17.1",
1717
"jwt-decode": "^3.1.2",
1818
"lodash": "^4.17.21",
19-
"mime-types": "^2.1.29",
19+
"mime-types": "^2.1.30",
2020
"notistack": "^1.0.5",
21-
"parse-ms": "^2.1.0",
22-
"react": "^17.0.1",
23-
"react-dom": "^17.0.1",
24-
"react-dropzone": "^11.3.1",
21+
"parse-ms": "^3.0.0",
22+
"react": "^17.0.2",
23+
"react-dom": "^17.0.2",
24+
"react-dropzone": "^11.3.2",
2525
"react-form-validator-core": "^1.1.1",
2626
"react-material-ui-form-validator": "^2.1.4",
2727
"react-router": "^5.2.0",
2828
"react-router-dom": "^5.2.0",
29-
"react-scripts": "4.0.1",
29+
"react-scripts": "4.0.3",
3030
"sockette": "^2.0.6",
31-
"typescript": "4.0.5",
31+
"typescript": "4.2.4",
3232
"zlib": "^1.0.5"
3333
},
3434
"scripts": {
@@ -54,9 +54,9 @@
5454
]
5555
},
5656
"devDependencies": {
57-
"concurrently": "^6.0.0",
58-
"http-proxy-middleware": "^0.19.1",
59-
"nodemon": "^2.0.4",
57+
"concurrently": "^6.0.1",
58+
"http-proxy-middleware": "^1.1.1",
59+
"nodemon": "^2.0.7",
6060
"npm-run-all": "^4.1.5",
6161
"react-app-rewired": "^2.1.8"
6262
}

interface/src/authentication/AuthenticatedRoute.tsx

+2-4
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,8 @@ import { withSnackbar, WithSnackbarProps } from 'notistack';
55
import * as Authentication from './Authentication';
66
import { withAuthenticationContext, AuthenticationContextProps, AuthenticatedContext, AuthenticatedContextValue } from './AuthenticationContext';
77

8-
type ChildComponent = React.ComponentType<RouteComponentProps<any>> | React.ComponentType<any>;
9-
108
interface AuthenticatedRouteProps extends RouteProps, WithSnackbarProps, AuthenticationContextProps {
11-
component: ChildComponent;
9+
component: React.ComponentType<RouteComponentProps<any>> | React.ComponentType<any>;
1210
}
1311

1412
type RenderComponent = (props: RouteComponentProps<any>) => React.ReactNode;
@@ -27,7 +25,7 @@ export class AuthenticatedRoute extends React.Component<AuthenticatedRouteProps>
2725
);
2826
}
2927
Authentication.storeLoginRedirect(location);
30-
enqueueSnackbar("Please sign in to continue.", { variant: 'info' });
28+
enqueueSnackbar("Please sign in to continue", { variant: 'info' });
3129
return (
3230
<Redirect to='/' />
3331
);

interface/src/authentication/AuthenticationWrapper.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ class AuthenticationWrapper extends React.Component<AuthenticationWrapperProps,
101101
me: undefined
102102
}
103103
});
104-
this.props.enqueueSnackbar("You have signed out.", { variant: 'success', });
104+
this.props.enqueueSnackbar("You have signed out", { variant: 'success', });
105105
history.push('/');
106106
}
107107

interface/src/authentication/UnauthenticatedRoute.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ class UnauthenticatedRoute extends Route<UnauthenticatedRouteProps> {
1919
if (authenticationContext.me) {
2020
return (<Redirect to={Authentication.fetchLoginRedirect(features)} />);
2121
}
22-
return (<Component {...props} />);
22+
if (Component) {
23+
return (<Component {...props} />);
24+
}
2325
}
2426
return (
2527
<Route {...rest} render={renderComponent} />

interface/src/setupProxy.js

+2-5
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
1-
const createProxyMiddleware = require('http-proxy-middleware');
1+
const { createProxyMiddleware } = require('http-proxy-middleware');
22

33
module.exports = function (app) {
44
app.use(
55
'/rest/*',
66
createProxyMiddleware({
77
target: 'http://localhost:3080',
88
secure: false,
9-
changeOrigin: true,
10-
// pathRewrite: {
11-
// '^/api/settings': '/api/app/settings'
12-
// },
9+
changeOrigin: true
1310
})
1411
);
1512
};

interface/tsconfig.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"resolveJsonModule": true,
1818
"isolatedModules": true,
1919
"noEmit": true,
20-
"jsx": "react",
20+
"jsx": "react-jsx",
2121
"noFallthroughCasesInSwitch": true
2222
},
2323
"include": [

0 commit comments

Comments
 (0)