Skip to content

Commit

Permalink
Backend: Upgrade dependencies. Client: Handle unsupported IE versions…
Browse files Browse the repository at this point in the history
… gracefully, upgrade dependencies.
  • Loading branch information
winwiz1 committed Jun 20, 2020
1 parent 010813f commit 27ec17d
Show file tree
Hide file tree
Showing 10 changed files with 612 additions and 607 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Used by Docker and Cloud Run

FROM node:12.17.0-slim as build
FROM node:12.18.1-slim as build
RUN apt-get update -y && apt-get upgrade -y

WORKDIR /crisp-react/server
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.web
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Used by Heroku

FROM node:12.17.0-slim as build
FROM node:12.18.1-slim as build
RUN apt-get update -y && apt-get upgrade -y

WORKDIR /crisp-react/server
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ Q: I have changed both SPA names in the SPA Configuration block and kept the res
A: Clear the browser's history and cache. Alternatively use an incognito tab. The client, the backend and the tests should work with the new names.

Q: Which versions of Internet Explorer are supported.<br/>
A: This project aims to work with browsers that are supported by vendors and can be made secure via security updates. Therefore IE11 is supported whereas IE10 and the earlier versions are not.
A: This project aims to work with browsers that are supported by vendors and can be made secure via security updates. Therefore IE11 is supported whereas IE10 and the earlier versions are not. The unsupported versions render a blank page with explanatory [message](https://github.com/winwiz1/crisp-react/blob/master/client/src/entrypoints/head-snippet.html#L8-L10) asking to upgrade.

Q: Can I use dynamic imports in addition to multiple SPAs for code splitting?<br/>
A: Yes, dynamic imports are fully supported. For example, if there is a Reporting bundle and one component is known to be used infrequently, then it's a good candidate to be separated from the bundle using a dynamic import:
Expand Down
22 changes: 11 additions & 11 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,17 @@
"loglevel": "^1.6.8",
"react": "16.13.1",
"react-dom": "16.13.1",
"react-helmet": "6.0.0",
"react-helmet": "6.1.0",
"react-router-dom": "^5.2.0",
"semantic-ui-react": "0.88.2",
"typestyle": "2.0.4"
},
"devDependencies": {
"@testing-library/jest-dom": "^5.9.0",
"@testing-library/react": "^10.0.4",
"@testing-library/jest-dom": "^5.10.1",
"@testing-library/react": "^10.3.0",
"@types/debug": "^4.1.5",
"@types/jest": "^25.2.3",
"@types/react": "^16.9.35",
"@types/jest": "^26.0.0",
"@types/react": "^16.9.38",
"@types/react-dom": "16.9.8",
"@types/react-helmet": "6.0.0",
"@types/react-router-dom": "^5.1.5",
Expand All @@ -63,27 +63,27 @@
"compression-webpack-plugin": "4.0.0",
"copyfiles": "^2.3.0",
"cross-env": "^7.0.2",
"css-loader": "3.5.3",
"fork-ts-checker-webpack-plugin": "4.1.6",
"html-webpack-harddisk-plugin": "1.0.1",
"css-loader": "3.6.0",
"fork-ts-checker-webpack-plugin": "5.0.2",
"html-webpack-harddisk-plugin": "1.0.2",
"html-webpack-plugin": "4.3.0",
"html-webpack-template": "6.2.0",
"jest": "^26.0.1",
"mkdirp": "^1.0.4",
"prettier": "^2.0.5",
"rimraf": "^3.0.2",
"style-loader": "1.2.1",
"ts-jest": "^26.0.0",
"ts-jest": "^26.1.0",
"ts-loader": "7.0.5",
"ts-node": "^8.10.2",
"tsconfig-paths": "^3.9.0",
"tsconfig-paths-webpack-plugin": "^3.2.0",
"tslib": "2.0.0",
"tslint": "6.1.2",
"tslint-react": "^5.0.0",
"typescript": "3.9.3",
"typescript": "3.9.5",
"webpack": "4.43.0",
"webpack-cli": "3.3.11",
"webpack-cli": "3.3.12",
"webpack-dev-server": "3.11.0",
"webpack-subresource-integrity": "^1.4.1"
}
Expand Down
25 changes: 19 additions & 6 deletions client/src/entrypoints/head-snippet.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@

<script nomodule src="https://cdn.jsdelivr.net/npm/promise-polyfill@8/dist/polyfill.min.js"></script>
<script nomodule src="https://cdn.jsdelivr.net/npm/[email protected]/dist/fetch.umd.min.js"></script>
<script nomodule src="https://cdn.jsdelivr.net/npm/[email protected]/dist/umd-polyfill.min.js"></script>
<script nomodule src="https://cdn.jsdelivr.net/npm/mdn-polyfills/String.prototype.includes.js"></script>
<script nomodule src="https://cdn.jsdelivr.net/npm/mdn-polyfills/Object.assign.js"></script>
<script nomodule>
(function () {
var snip_ua = window.navigator.userAgent;
var snip_ie = snip_ua ? snip_ua.indexOf("MSIE ") : 0;
if (snip_ie > 0) {
var snip_ver = parseInt(snip_ua.substring(snip_ie + 5, snip_ua.indexOf(".", snip_ie)), 10);
if (snip_ver > 0 && snip_ver < 11) {
alert("Versions of Internet Explorer that are no longer maintained by Microsoft \
(and therefore cannot be made secure by applying security updates) are not supported. \
Consider upgrading to IE11 or switching to Edge, Chrome or other modern browser.");
}
}
})();
</script>
<script nomodule src="https://cdn.jsdelivr.net/npm/promise-polyfill/dist/polyfill.min.js"></script>
<script nomodule src="https://cdn.jsdelivr.net/npm/whatwg-fetch/dist/fetch.umd.min.js"></script>
<script nomodule src="https://cdn.jsdelivr.net/npm/abortcontroller-polyfill/dist/umd-polyfill.min.js"></script>
<script nomodule src="https://cdn.jsdelivr.net/npm/mdn-polyfills/String.prototype.includes.js"></script>
<script nomodule src="https://cdn.jsdelivr.net/npm/mdn-polyfills/Object.assign.js"></script>
21 changes: 17 additions & 4 deletions client/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,9 @@ const getWebpackConfig = (env, argv) => {
"process.env.DEVELOPMENT": JSON.stringify(isProduction === false)
}),
new ForkTsCheckerWebpackPlugin({
tslint: false,
useTypescriptIncrementalApi: true,
checkSyntacticErrors: true,
typescript: true,
eslint: undefined,
logger: { infrastructure: "console", issues: "console" }
})
],
devServer: {
Expand Down Expand Up @@ -138,7 +138,20 @@ const getWebpackConfig = (env, argv) => {
chunks: [`${entryPoint}`, "vendor", "runtime"],
headHtmlSnippet,
links: [
"//cdn.jsdelivr.net/npm/[email protected]/dist/semantic.min.css",
{
rel: "dns-prefetch",
href: "//fonts.gstatic.com/"
},
{
rel: "dns-prefetch",
href: "//fonts.googleapis.com/"
},
{
rel: "stylesheet",
href: "//cdn.jsdelivr.net/npm/[email protected]/dist/semantic.min.css",
integrity: "sha384-JKIDqM48bt14NZpzl9v0AP36VK2C/X6RuSPfimxpoWdSANUXblZUX1cgdQw8cZUK",
crossorigin: "anonymous"
},
{
href: metaOwnUrl,
rel: "canonical"
Expand Down
Loading

0 comments on commit 27ec17d

Please sign in to comment.