From 5780bae041868db26c9ff3a51a1c418e7d6d3a88 Mon Sep 17 00:00:00 2001 From: Alejandro Lembke Barrientos Date: Wed, 10 Aug 2022 21:42:46 +0000 Subject: [PATCH 1/3] PR-536602: updating packages and fixing vendors.css error. --- package-lock.json | 18 ++++++++--------- package.json | 4 ++-- src/frontend/components/OtherComponent.tsx | 2 +- src/server/getHashManifest.ts | 13 ------------ src/server/server.tsx | 8 ++++---- src/server/utilsServer.ts | 23 ++++++++++++++++++++++ webpack.config.dev.ts | 2 +- webpack.config.ts | 2 +- 8 files changed, 41 insertions(+), 31 deletions(-) delete mode 100644 src/server/getHashManifest.ts create mode 100644 src/server/utilsServer.ts diff --git a/package-lock.json b/package-lock.json index c18dd07..b992cf3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@aleleba/create-react-ssr", - "version": "3.0.51", + "version": "3.1.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@aleleba/create-react-ssr", - "version": "3.0.51", + "version": "3.1.2", "license": "MIT", "dependencies": { "@babel/register": "^7.18.9", @@ -49,7 +49,7 @@ "@testing-library/react": "^13.3.0", "@testing-library/user-event": "^14.4.3", "@types/jest": "^28.1.6", - "@types/node": "^18.6.5", + "@types/node": "^18.7.0", "@types/react": "^18.0.17", "@types/react-dom": "^18.0.6", "@types/webpack": "^5.28.0", @@ -3516,9 +3516,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "18.6.5", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.6.5.tgz", - "integrity": "sha512-Xjt5ZGUa5WusGZJ4WJPbOT8QOqp6nDynVFRKcUt32bOgvXEoc6o085WNkYTMO7ifAj2isEfQQ2cseE+wT6jsRw==" + "version": "18.7.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.7.0.tgz", + "integrity": "sha512-MbHwEQaMKgcSQE3vFHUvxiN0+k3VpwCbnYCUigQWoKZzdIk2u7ecoCk5Vzb4lwBbKhLd2rCOUUDT35TaONs7Jw==" }, "node_modules/@types/parse5": { "version": "6.0.3", @@ -18081,9 +18081,9 @@ "dev": true }, "@types/node": { - "version": "18.6.5", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.6.5.tgz", - "integrity": "sha512-Xjt5ZGUa5WusGZJ4WJPbOT8QOqp6nDynVFRKcUt32bOgvXEoc6o085WNkYTMO7ifAj2isEfQQ2cseE+wT6jsRw==" + "version": "18.7.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.7.0.tgz", + "integrity": "sha512-MbHwEQaMKgcSQE3vFHUvxiN0+k3VpwCbnYCUigQWoKZzdIk2u7ecoCk5Vzb4lwBbKhLd2rCOUUDT35TaONs7Jw==" }, "@types/parse5": { "version": "6.0.3", diff --git a/package.json b/package.json index fa02338..b290e59 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@aleleba/create-react-ssr", - "version": "3.1.0", + "version": "3.1.1", "description": "Starter Kit of server side render of react", "bin": "./bin/cli.js", "main": "src/server/index", @@ -68,7 +68,7 @@ "@testing-library/react": "^13.3.0", "@testing-library/user-event": "^14.4.3", "@types/jest": "^28.1.6", - "@types/node": "^18.6.5", + "@types/node": "^18.7.0", "@types/react": "^18.0.17", "@types/react-dom": "^18.0.6", "@types/webpack": "^5.28.0", diff --git a/src/frontend/components/OtherComponent.tsx b/src/frontend/components/OtherComponent.tsx index 97f8576..7b539b9 100644 --- a/src/frontend/components/OtherComponent.tsx +++ b/src/frontend/components/OtherComponent.tsx @@ -8,7 +8,7 @@ const OtherComponent = () => (
logo

- Edit src/frontend/OtherComponent.jsx and save to reload. + Edit src/frontend/OtherComponent.jsx and save to reload.

Initial Component
diff --git a/src/server/getHashManifest.ts b/src/server/getHashManifest.ts deleted file mode 100644 index 6c92ac3..0000000 --- a/src/server/getHashManifest.ts +++ /dev/null @@ -1,13 +0,0 @@ -import fs from 'fs'; - -const getHashManifest = () => { - try { - const baseUrl = __dirname.replace(/\/server(.*)/,''); - const fullURL = `${baseUrl}/assets/manifest-hash.json` ; - return JSON.parse(fs.readFileSync(fullURL).toString()); - }catch(err){ - console.error(err); - } -}; - -export default getHashManifest; diff --git a/src/server/server.tsx b/src/server/server.tsx index 2f02af6..b372ab8 100644 --- a/src/server/server.tsx +++ b/src/server/server.tsx @@ -20,7 +20,7 @@ import { Provider } from 'react-redux'; import setStore from '../frontend/setStore'; import initialState from '../frontend/reducers/initialState'; //Get Hashes -import getHashManifest from './getHashManifest'; +import { getHashManifest, haveVendorsCss } from './utilsServer'; //App import App from '../frontend/components/App'; @@ -67,8 +67,8 @@ if(env === 'development'){ } const setResponse = (html, preloadedState, manifest) => { - const mainStyles = manifest ? manifest['frontend.css'] : 'assets/main/app.css'; - const vendorStyles = manifest ? manifest['vendors.css'] : '/assets/vendors/app.css'; + const mainStyles = manifest ? manifest['frontend.css'] : 'assets/main.css'; + const vendorStyles = manifest ? manifest['vendors.css'] : 'assets/vendors.css'; const mainBuild = manifest ? manifest['frontend.js'] : 'assets/app.js'; const vendorBuild = manifest ? manifest['vendors.js'] : 'assets/vendor.js'; const manifestJson = manifest ? `` : ''; @@ -84,7 +84,7 @@ const setResponse = (html, preloadedState, manifest) => { ${manifestJson} - + ${haveVendorsCss() ? `` : ''} App diff --git a/src/server/utilsServer.ts b/src/server/utilsServer.ts new file mode 100644 index 0000000..ccc695e --- /dev/null +++ b/src/server/utilsServer.ts @@ -0,0 +1,23 @@ +import fs from 'fs'; + +export const getHashManifest = () => { + try { + const baseUrl = __dirname.replace(/\/server(.*)/,''); + const fullURL = `${baseUrl}/assets/manifest-hash.json` ; + return JSON.parse(fs.readFileSync(fullURL).toString()); + }catch(err){ + console.error(err); + } +}; + +export const haveVendorsCss = () => { + try { + const baseUrl = __dirname.replace(/\/server(.*)/,''); + const fullURL = `${baseUrl}/assets/vendors.css` ; + fs.readFileSync(fullURL).toString(); + return true + }catch(err){ + // console.error(err); + return false + } +}; diff --git a/webpack.config.dev.ts b/webpack.config.dev.ts index 2ebfc2f..6570039 100644 --- a/webpack.config.dev.ts +++ b/webpack.config.dev.ts @@ -69,7 +69,7 @@ const config: Configuration = { new webpack.HotModuleReplacementPlugin(), new ReactRefreshWebpackPlugin(), new MiniCssExtractPlugin({ - filename: 'assets/[name]/app.css', + filename: 'assets/[name].css', }), new ESLintPlugin(), new webpack.DefinePlugin({ diff --git a/webpack.config.ts b/webpack.config.ts index c217477..c8ba900 100644 --- a/webpack.config.ts +++ b/webpack.config.ts @@ -76,7 +76,7 @@ const frontendConfig = { filename: '[path][base].gz', }), new MiniCssExtractPlugin({ - filename: 'assets/[name]/app-[fullhash].css', + filename: 'assets/[name]-[fullhash].css', }), new WebpackManifestPlugin({ fileName: 'assets/manifest-hash.json', From 27e53ed20b9a19d8284220a05b4274cb6b75f470 Mon Sep 17 00:00:00 2001 From: Alejandro Lembke Barrientos Date: Tue, 16 Aug 2022 20:48:02 +0000 Subject: [PATCH 2/3] PR-536602: making more changing to fix css. --- src/server/server.tsx | 8 +++++--- src/server/utilsServer.ts | 15 ++++++++++----- webpack.config.ts | 2 +- 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/src/server/server.tsx b/src/server/server.tsx index b372ab8..ff4fb88 100644 --- a/src/server/server.tsx +++ b/src/server/server.tsx @@ -30,9 +30,9 @@ const routesUrls = routes.map( route => route.path); const app = express(); +// @ts-ignore:next-line +const compiler = webpack(webpackConfig); if(env === 'development'){ - // @ts-ignore:next-line - const compiler = webpack(webpackConfig); const serverConfig = { serverSideRender: true, publicPath: webpackConfig.output?.publicPath, @@ -72,6 +72,8 @@ const setResponse = (html, preloadedState, manifest) => { const mainBuild = manifest ? manifest['frontend.js'] : 'assets/app.js'; const vendorBuild = manifest ? manifest['vendors.js'] : 'assets/vendor.js'; const manifestJson = manifest ? `` : ''; + const memoryFs = compiler.outputFileSystem + const haveVendor = haveVendorsCss(manifest, memoryFs) return(` @@ -84,7 +86,7 @@ const setResponse = (html, preloadedState, manifest) => { ${manifestJson} - ${haveVendorsCss() ? `` : ''} + ${haveVendor ? `` : ''} App diff --git a/src/server/utilsServer.ts b/src/server/utilsServer.ts index ccc695e..64e45d8 100644 --- a/src/server/utilsServer.ts +++ b/src/server/utilsServer.ts @@ -1,20 +1,25 @@ import fs from 'fs'; +import config from '../../config'; + +const { env } = config export const getHashManifest = () => { try { const baseUrl = __dirname.replace(/\/server(.*)/,''); - const fullURL = `${baseUrl}/assets/manifest-hash.json` ; - return JSON.parse(fs.readFileSync(fullURL).toString()); + const fullURL = `${baseUrl}/assets/manifest-hash.json`; + const readFileData = JSON.parse(fs.readFileSync(fullURL).toString()); + return readFileData }catch(err){ console.error(err); } }; -export const haveVendorsCss = () => { +export const haveVendorsCss = (manifest, memoryFs) => { try { const baseUrl = __dirname.replace(/\/server(.*)/,''); - const fullURL = `${baseUrl}/assets/vendors.css` ; - fs.readFileSync(fullURL).toString(); + const fullURL = `${baseUrl}${manifest ? manifest['vendors.css'] : '/build/assets/vendors.css'}`; + env === 'production' && fs.readFileSync(fullURL).toString(); + env === 'development' && memoryFs.readFileSync(fullURL).toString(); return true }catch(err){ // console.error(err); diff --git a/webpack.config.ts b/webpack.config.ts index c8ba900..aed3e6e 100644 --- a/webpack.config.ts +++ b/webpack.config.ts @@ -198,7 +198,7 @@ const serverConfig = { filename: '[path][base].gz', }), new MiniCssExtractPlugin({ - filename: 'assets/[name]/app-[fullhash].css', + filename: 'assets/[name]-[fullhash].css', }), new WebpackManifestPlugin({ fileName: 'assets/manifest-hash.json', From f43d474b14f2053d0d362d335c9e4ac78cd1d46b Mon Sep 17 00:00:00 2001 From: Alejandro Lembke Barrientos Date: Tue, 16 Aug 2022 21:41:30 +0000 Subject: [PATCH 3/3] PR-536602: updating packages. --- package-lock.json | 276 ++++++++++++++++++++++------------------------ package.json | 16 +-- 2 files changed, 137 insertions(+), 155 deletions(-) diff --git a/package-lock.json b/package-lock.json index b992cf3..722336e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@aleleba/create-react-ssr", - "version": "3.1.2", + "version": "3.2.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@aleleba/create-react-ssr", - "version": "3.1.2", + "version": "3.2.0", "license": "MIT", "dependencies": { "@babel/register": "^7.18.9", @@ -48,15 +48,15 @@ "@testing-library/jest-dom": "^5.16.5", "@testing-library/react": "^13.3.0", "@testing-library/user-event": "^14.4.3", - "@types/jest": "^28.1.6", - "@types/node": "^18.7.0", + "@types/jest": "^28.1.7", + "@types/node": "^18.7.6", "@types/react": "^18.0.17", "@types/react-dom": "^18.0.6", "@types/webpack": "^5.28.0", "@types/webpack-hot-middleware": "^2.25.6", "@types/webpack-node-externals": "^2.5.3", - "@typescript-eslint/eslint-plugin": "^5.33.0", - "@typescript-eslint/parser": "^5.33.0", + "@typescript-eslint/eslint-plugin": "^5.33.1", + "@typescript-eslint/parser": "^5.33.1", "babel-jest": "^28.1.3", "babel-loader": "^8.2.5", "clean-webpack-plugin": "^4.0.0", @@ -64,7 +64,7 @@ "copy-webpack-plugin": "^11.0.0", "css-loader": "^6.7.1", "css-minimizer-webpack-plugin": "^4.0.0", - "eslint": "^8.21.0", + "eslint": "^8.22.0", "eslint-plugin-react": "^7.30.1", "eslint-webpack-plugin": "^3.2.0", "file-loader": "^6.2.0", @@ -78,14 +78,14 @@ "sass": "^1.54.4", "sass-loader": "^13.0.2", "style-loader": "^3.3.1", - "terser-webpack-plugin": "^5.3.3", + "terser-webpack-plugin": "^5.3.5", "ts-loader": "^9.3.1", "typescript": "^4.7.4", "url-loader": "^4.1.1", "webpack-cli": "^4.10.0", "webpack-dev-middleware": "^5.3.3", "webpack-dev-server": "^4.10.0", - "webpack-hot-middleware": "^2.25.1", + "webpack-hot-middleware": "^2.25.2", "webpack-node-externals": "^3.0.0", "workbox-webpack-plugin": "^6.5.4", "workbox-window": "^6.5.4" @@ -2811,9 +2811,9 @@ "integrity": "sha512-GryiOJmNcWbovBxTfZSF71V/mXbgcV3MewDe3kIMCLyIh5e7SKAeUZs+rMnJ8jkMolZ/4/VsdBmMrw3l+VdZ3w==" }, "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.13", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.13.tgz", - "integrity": "sha512-o1xbKhp9qnIAoHJSWd6KlCZfqslL4valSF81H8ImioOAxluWYWOpWkpyktY2vnt4tbrX9XYaxovq6cgowaJp2w==", + "version": "0.3.15", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.15.tgz", + "integrity": "sha512-oWZNOULl+UbhsgB51uuZzglikfIKSUBO/M9W2OfEjn7cmqoAiCgmv9lyACTUacZwBz0ITnJ2NqjU8Tx0DHL88g==", "dependencies": { "@jridgewell/resolve-uri": "^3.0.3", "@jridgewell/sourcemap-codec": "^1.4.10" @@ -3445,12 +3445,12 @@ } }, "node_modules/@types/jest": { - "version": "28.1.6", - "resolved": "https://registry.npmjs.org/@types/jest/-/jest-28.1.6.tgz", - "integrity": "sha512-0RbGAFMfcBJKOmqRazM8L98uokwuwD5F8rHrv/ZMbrZBwVOWZUyPG6VFNscjYr/vjM3Vu4fRrCPbOs42AfemaQ==", + "version": "28.1.7", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-28.1.7.tgz", + "integrity": "sha512-acDN4VHD40V24tgu0iC44jchXavRNVFXQ/E6Z5XNsswgoSO/4NgsXoEYmPUGookKldlZQyIpmrEXsHI9cA3ZTA==", "dev": true, "dependencies": { - "jest-matcher-utils": "^28.0.0", + "expect": "^28.0.0", "pretty-format": "^28.0.0" } }, @@ -3516,9 +3516,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "18.7.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.7.0.tgz", - "integrity": "sha512-MbHwEQaMKgcSQE3vFHUvxiN0+k3VpwCbnYCUigQWoKZzdIk2u7ecoCk5Vzb4lwBbKhLd2rCOUUDT35TaONs7Jw==" + "version": "18.7.6", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.7.6.tgz", + "integrity": "sha512-EdxgKRXgYsNITy5mjjXjVE/CS8YENSdhiagGrLqjG0pvA2owgJ6i4l7wy/PFZGC0B1/H20lWKN7ONVDNYDZm7A==" }, "node_modules/@types/parse5": { "version": "6.0.3", @@ -3705,14 +3705,14 @@ "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "5.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.33.0.tgz", - "integrity": "sha512-jHvZNSW2WZ31OPJ3enhLrEKvAZNyAFWZ6rx9tUwaessTc4sx9KmgMNhVcqVAl1ETnT5rU5fpXTLmY9YvC1DCNg==", + "version": "5.33.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.33.1.tgz", + "integrity": "sha512-S1iZIxrTvKkU3+m63YUOxYPKaP+yWDQrdhxTglVDVEVBf+aCSw85+BmJnyUaQQsk5TXFG/LpBu9fa+LrAQ91fQ==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.33.0", - "@typescript-eslint/type-utils": "5.33.0", - "@typescript-eslint/utils": "5.33.0", + "@typescript-eslint/scope-manager": "5.33.1", + "@typescript-eslint/type-utils": "5.33.1", + "@typescript-eslint/utils": "5.33.1", "debug": "^4.3.4", "functional-red-black-tree": "^1.0.1", "ignore": "^5.2.0", @@ -3753,14 +3753,14 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "5.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.33.0.tgz", - "integrity": "sha512-cgM5cJrWmrDV2KpvlcSkelTBASAs1mgqq+IUGKJvFxWrapHpaRy5EXPQz9YaKF3nZ8KY18ILTiVpUtbIac86/w==", + "version": "5.33.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.33.1.tgz", + "integrity": "sha512-IgLLtW7FOzoDlmaMoXdxG8HOCByTBXrB1V2ZQYSEV1ggMmJfAkMWTwUjjzagS6OkfpySyhKFkBw7A9jYmcHpZA==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.33.0", - "@typescript-eslint/types": "5.33.0", - "@typescript-eslint/typescript-estree": "5.33.0", + "@typescript-eslint/scope-manager": "5.33.1", + "@typescript-eslint/types": "5.33.1", + "@typescript-eslint/typescript-estree": "5.33.1", "debug": "^4.3.4" }, "engines": { @@ -3780,13 +3780,13 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "5.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.33.0.tgz", - "integrity": "sha512-/Jta8yMNpXYpRDl8EwF/M8It2A9sFJTubDo0ATZefGXmOqlaBffEw0ZbkbQ7TNDK6q55NPHFshGBPAZvZkE8Pw==", + "version": "5.33.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.33.1.tgz", + "integrity": "sha512-8ibcZSqy4c5m69QpzJn8XQq9NnqAToC8OdH/W6IXPXv83vRyEDPYLdjAlUx8h/rbusq6MkW4YdQzURGOqsn3CA==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.33.0", - "@typescript-eslint/visitor-keys": "5.33.0" + "@typescript-eslint/types": "5.33.1", + "@typescript-eslint/visitor-keys": "5.33.1" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -3797,12 +3797,12 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "5.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.33.0.tgz", - "integrity": "sha512-2zB8uEn7hEH2pBeyk3NpzX1p3lF9dKrEbnXq1F7YkpZ6hlyqb2yZujqgRGqXgRBTHWIUG3NGx/WeZk224UKlIA==", + "version": "5.33.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.33.1.tgz", + "integrity": "sha512-X3pGsJsD8OiqhNa5fim41YtlnyiWMF/eKsEZGsHID2HcDqeSC5yr/uLOeph8rNF2/utwuI0IQoAK3fpoxcLl2g==", "dev": true, "dependencies": { - "@typescript-eslint/utils": "5.33.0", + "@typescript-eslint/utils": "5.33.1", "debug": "^4.3.4", "tsutils": "^3.21.0" }, @@ -3823,9 +3823,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "5.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.33.0.tgz", - "integrity": "sha512-nIMt96JngB4MYFYXpZ/3ZNU4GWPNdBbcB5w2rDOCpXOVUkhtNlG2mmm8uXhubhidRZdwMaMBap7Uk8SZMU/ppw==", + "version": "5.33.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.33.1.tgz", + "integrity": "sha512-7K6MoQPQh6WVEkMrMW5QOA5FO+BOwzHSNd0j3+BlBwd6vtzfZceJ8xJ7Um2XDi/O3umS8/qDX6jdy2i7CijkwQ==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -3836,13 +3836,13 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "5.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.33.0.tgz", - "integrity": "sha512-tqq3MRLlggkJKJUrzM6wltk8NckKyyorCSGMq4eVkyL5sDYzJJcMgZATqmF8fLdsWrW7OjjIZ1m9v81vKcaqwQ==", + "version": "5.33.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.33.1.tgz", + "integrity": "sha512-JOAzJ4pJ+tHzA2pgsWQi4804XisPHOtbvwUyqsuuq8+y5B5GMZs7lI1xDWs6V2d7gE/Ez5bTGojSK12+IIPtXA==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.33.0", - "@typescript-eslint/visitor-keys": "5.33.0", + "@typescript-eslint/types": "5.33.1", + "@typescript-eslint/visitor-keys": "5.33.1", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -3878,15 +3878,15 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "5.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.33.0.tgz", - "integrity": "sha512-JxOAnXt9oZjXLIiXb5ZIcZXiwVHCkqZgof0O8KPgz7C7y0HS42gi75PdPlqh1Tf109M0fyUw45Ao6JLo7S5AHw==", + "version": "5.33.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.33.1.tgz", + "integrity": "sha512-uphZjkMaZ4fE8CR4dU7BquOV6u0doeQAr8n6cQenl/poMaIyJtBu8eys5uk6u5HiDH01Mj5lzbJ5SfeDz7oqMQ==", "dev": true, "dependencies": { "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.33.0", - "@typescript-eslint/types": "5.33.0", - "@typescript-eslint/typescript-estree": "5.33.0", + "@typescript-eslint/scope-manager": "5.33.1", + "@typescript-eslint/types": "5.33.1", + "@typescript-eslint/typescript-estree": "5.33.1", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0" }, @@ -3902,12 +3902,12 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "5.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.33.0.tgz", - "integrity": "sha512-/XsqCzD4t+Y9p5wd9HZiptuGKBlaZO5showwqODii5C0nZawxWLF+Q6k5wYHBrQv96h6GYKyqqMHCSTqta8Kiw==", + "version": "5.33.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.33.1.tgz", + "integrity": "sha512-nwIxOK8Z2MPWltLKMLOEZwmfBZReqUdbEoHQXeCpa+sRVARe5twpJGHCB4dk9903Yaf0nMAlGbQfaAH92F60eg==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.33.0", + "@typescript-eslint/types": "5.33.1", "eslint-visitor-keys": "^3.3.0" }, "engines": { @@ -6596,9 +6596,9 @@ } }, "node_modules/eslint": { - "version": "8.21.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.21.0.tgz", - "integrity": "sha512-/XJ1+Qurf1T9G2M5IHrsjp+xrGT73RZf23xA1z5wB1ZzzEAWSZKvRwhWxTFp1rvkvCfwcvAUNAP31bhKTTGfDA==", + "version": "8.22.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.22.0.tgz", + "integrity": "sha512-ci4t0sz6vSRKdmkOGmprBo6fmI4PrphDFMy5JEq/fNS0gQkJM3rLmrqcp8ipMcdobH3KtUP40KniAE9W19S4wA==", "dev": true, "dependencies": { "@eslint/eslintrc": "^1.3.0", @@ -12638,16 +12638,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/querystring": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.1.tgz", - "integrity": "sha512-wkvS7mL/JMugcup3/rMitHmd9ecIGd2lhFhK9N3UUQ450h66d1r3Y9nvXzQAW1Lq+wyx61k/1pfKS5KuKiyEbg==", - "deprecated": "The querystring API is considered Legacy. new code should use the URLSearchParams API instead.", - "dev": true, - "engines": { - "node": ">=0.4.x" - } - }, "node_modules/queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", @@ -14039,15 +14029,15 @@ } }, "node_modules/terser-webpack-plugin": { - "version": "5.3.3", - "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.3.tgz", - "integrity": "sha512-Fx60G5HNYknNTNQnzQ1VePRuu89ZVYWfjRAeT5rITuCY/1b08s49e5kSQwHDirKZWuoKOBRFS98EUUoZ9kLEwQ==", + "version": "5.3.5", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.5.tgz", + "integrity": "sha512-AOEDLDxD2zylUGf/wxHxklEkOe2/r+seuyOWujejFrIxHf11brA1/dWQNIgXa1c6/Wkxgu7zvv0JhOWfc2ELEA==", "dependencies": { - "@jridgewell/trace-mapping": "^0.3.7", + "@jridgewell/trace-mapping": "^0.3.14", "jest-worker": "^27.4.5", "schema-utils": "^3.1.1", "serialize-javascript": "^6.0.0", - "terser": "^5.7.2" + "terser": "^5.14.1" }, "engines": { "node": ">= 10.13.0" @@ -14920,14 +14910,13 @@ } }, "node_modules/webpack-hot-middleware": { - "version": "2.25.1", - "resolved": "https://registry.npmjs.org/webpack-hot-middleware/-/webpack-hot-middleware-2.25.1.tgz", - "integrity": "sha512-Koh0KyU/RPYwel/khxbsDz9ibDivmUbrRuKSSQvW42KSDdO4w23WI3SkHpSUKHE76LrFnnM/L7JCrpBwu8AXYw==", + "version": "2.25.2", + "resolved": "https://registry.npmjs.org/webpack-hot-middleware/-/webpack-hot-middleware-2.25.2.tgz", + "integrity": "sha512-CVgm3NAQyfdIonRvXisRwPTUYuSbyZ6BY7782tMeUzWOO7RmVI2NaBYuCp41qyD4gYCkJyTneAJdK69A13B0+A==", "dev": true, "dependencies": { "ansi-html-community": "0.0.8", "html-entities": "^2.1.0", - "querystring": "^0.2.0", "strip-ansi": "^6.0.0" } }, @@ -17513,9 +17502,9 @@ "integrity": "sha512-GryiOJmNcWbovBxTfZSF71V/mXbgcV3MewDe3kIMCLyIh5e7SKAeUZs+rMnJ8jkMolZ/4/VsdBmMrw3l+VdZ3w==" }, "@jridgewell/trace-mapping": { - "version": "0.3.13", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.13.tgz", - "integrity": "sha512-o1xbKhp9qnIAoHJSWd6KlCZfqslL4valSF81H8ImioOAxluWYWOpWkpyktY2vnt4tbrX9XYaxovq6cgowaJp2w==", + "version": "0.3.15", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.15.tgz", + "integrity": "sha512-oWZNOULl+UbhsgB51uuZzglikfIKSUBO/M9W2OfEjn7cmqoAiCgmv9lyACTUacZwBz0ITnJ2NqjU8Tx0DHL88g==", "requires": { "@jridgewell/resolve-uri": "^3.0.3", "@jridgewell/sourcemap-codec": "^1.4.10" @@ -18017,12 +18006,12 @@ } }, "@types/jest": { - "version": "28.1.6", - "resolved": "https://registry.npmjs.org/@types/jest/-/jest-28.1.6.tgz", - "integrity": "sha512-0RbGAFMfcBJKOmqRazM8L98uokwuwD5F8rHrv/ZMbrZBwVOWZUyPG6VFNscjYr/vjM3Vu4fRrCPbOs42AfemaQ==", + "version": "28.1.7", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-28.1.7.tgz", + "integrity": "sha512-acDN4VHD40V24tgu0iC44jchXavRNVFXQ/E6Z5XNsswgoSO/4NgsXoEYmPUGookKldlZQyIpmrEXsHI9cA3ZTA==", "dev": true, "requires": { - "jest-matcher-utils": "^28.0.0", + "expect": "^28.0.0", "pretty-format": "^28.0.0" }, "dependencies": { @@ -18081,9 +18070,9 @@ "dev": true }, "@types/node": { - "version": "18.7.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.7.0.tgz", - "integrity": "sha512-MbHwEQaMKgcSQE3vFHUvxiN0+k3VpwCbnYCUigQWoKZzdIk2u7ecoCk5Vzb4lwBbKhLd2rCOUUDT35TaONs7Jw==" + "version": "18.7.6", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.7.6.tgz", + "integrity": "sha512-EdxgKRXgYsNITy5mjjXjVE/CS8YENSdhiagGrLqjG0pvA2owgJ6i4l7wy/PFZGC0B1/H20lWKN7ONVDNYDZm7A==" }, "@types/parse5": { "version": "6.0.3", @@ -18270,14 +18259,14 @@ "dev": true }, "@typescript-eslint/eslint-plugin": { - "version": "5.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.33.0.tgz", - "integrity": "sha512-jHvZNSW2WZ31OPJ3enhLrEKvAZNyAFWZ6rx9tUwaessTc4sx9KmgMNhVcqVAl1ETnT5rU5fpXTLmY9YvC1DCNg==", + "version": "5.33.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.33.1.tgz", + "integrity": "sha512-S1iZIxrTvKkU3+m63YUOxYPKaP+yWDQrdhxTglVDVEVBf+aCSw85+BmJnyUaQQsk5TXFG/LpBu9fa+LrAQ91fQ==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "5.33.0", - "@typescript-eslint/type-utils": "5.33.0", - "@typescript-eslint/utils": "5.33.0", + "@typescript-eslint/scope-manager": "5.33.1", + "@typescript-eslint/type-utils": "5.33.1", + "@typescript-eslint/utils": "5.33.1", "debug": "^4.3.4", "functional-red-black-tree": "^1.0.1", "ignore": "^5.2.0", @@ -18298,52 +18287,52 @@ } }, "@typescript-eslint/parser": { - "version": "5.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.33.0.tgz", - "integrity": "sha512-cgM5cJrWmrDV2KpvlcSkelTBASAs1mgqq+IUGKJvFxWrapHpaRy5EXPQz9YaKF3nZ8KY18ILTiVpUtbIac86/w==", + "version": "5.33.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.33.1.tgz", + "integrity": "sha512-IgLLtW7FOzoDlmaMoXdxG8HOCByTBXrB1V2ZQYSEV1ggMmJfAkMWTwUjjzagS6OkfpySyhKFkBw7A9jYmcHpZA==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "5.33.0", - "@typescript-eslint/types": "5.33.0", - "@typescript-eslint/typescript-estree": "5.33.0", + "@typescript-eslint/scope-manager": "5.33.1", + "@typescript-eslint/types": "5.33.1", + "@typescript-eslint/typescript-estree": "5.33.1", "debug": "^4.3.4" } }, "@typescript-eslint/scope-manager": { - "version": "5.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.33.0.tgz", - "integrity": "sha512-/Jta8yMNpXYpRDl8EwF/M8It2A9sFJTubDo0ATZefGXmOqlaBffEw0ZbkbQ7TNDK6q55NPHFshGBPAZvZkE8Pw==", + "version": "5.33.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.33.1.tgz", + "integrity": "sha512-8ibcZSqy4c5m69QpzJn8XQq9NnqAToC8OdH/W6IXPXv83vRyEDPYLdjAlUx8h/rbusq6MkW4YdQzURGOqsn3CA==", "dev": true, "requires": { - "@typescript-eslint/types": "5.33.0", - "@typescript-eslint/visitor-keys": "5.33.0" + "@typescript-eslint/types": "5.33.1", + "@typescript-eslint/visitor-keys": "5.33.1" } }, "@typescript-eslint/type-utils": { - "version": "5.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.33.0.tgz", - "integrity": "sha512-2zB8uEn7hEH2pBeyk3NpzX1p3lF9dKrEbnXq1F7YkpZ6hlyqb2yZujqgRGqXgRBTHWIUG3NGx/WeZk224UKlIA==", + "version": "5.33.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.33.1.tgz", + "integrity": "sha512-X3pGsJsD8OiqhNa5fim41YtlnyiWMF/eKsEZGsHID2HcDqeSC5yr/uLOeph8rNF2/utwuI0IQoAK3fpoxcLl2g==", "dev": true, "requires": { - "@typescript-eslint/utils": "5.33.0", + "@typescript-eslint/utils": "5.33.1", "debug": "^4.3.4", "tsutils": "^3.21.0" } }, "@typescript-eslint/types": { - "version": "5.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.33.0.tgz", - "integrity": "sha512-nIMt96JngB4MYFYXpZ/3ZNU4GWPNdBbcB5w2rDOCpXOVUkhtNlG2mmm8uXhubhidRZdwMaMBap7Uk8SZMU/ppw==", + "version": "5.33.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.33.1.tgz", + "integrity": "sha512-7K6MoQPQh6WVEkMrMW5QOA5FO+BOwzHSNd0j3+BlBwd6vtzfZceJ8xJ7Um2XDi/O3umS8/qDX6jdy2i7CijkwQ==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "5.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.33.0.tgz", - "integrity": "sha512-tqq3MRLlggkJKJUrzM6wltk8NckKyyorCSGMq4eVkyL5sDYzJJcMgZATqmF8fLdsWrW7OjjIZ1m9v81vKcaqwQ==", + "version": "5.33.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.33.1.tgz", + "integrity": "sha512-JOAzJ4pJ+tHzA2pgsWQi4804XisPHOtbvwUyqsuuq8+y5B5GMZs7lI1xDWs6V2d7gE/Ez5bTGojSK12+IIPtXA==", "dev": true, "requires": { - "@typescript-eslint/types": "5.33.0", - "@typescript-eslint/visitor-keys": "5.33.0", + "@typescript-eslint/types": "5.33.1", + "@typescript-eslint/visitor-keys": "5.33.1", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -18363,26 +18352,26 @@ } }, "@typescript-eslint/utils": { - "version": "5.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.33.0.tgz", - "integrity": "sha512-JxOAnXt9oZjXLIiXb5ZIcZXiwVHCkqZgof0O8KPgz7C7y0HS42gi75PdPlqh1Tf109M0fyUw45Ao6JLo7S5AHw==", + "version": "5.33.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.33.1.tgz", + "integrity": "sha512-uphZjkMaZ4fE8CR4dU7BquOV6u0doeQAr8n6cQenl/poMaIyJtBu8eys5uk6u5HiDH01Mj5lzbJ5SfeDz7oqMQ==", "dev": true, "requires": { "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.33.0", - "@typescript-eslint/types": "5.33.0", - "@typescript-eslint/typescript-estree": "5.33.0", + "@typescript-eslint/scope-manager": "5.33.1", + "@typescript-eslint/types": "5.33.1", + "@typescript-eslint/typescript-estree": "5.33.1", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0" } }, "@typescript-eslint/visitor-keys": { - "version": "5.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.33.0.tgz", - "integrity": "sha512-/XsqCzD4t+Y9p5wd9HZiptuGKBlaZO5showwqODii5C0nZawxWLF+Q6k5wYHBrQv96h6GYKyqqMHCSTqta8Kiw==", + "version": "5.33.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.33.1.tgz", + "integrity": "sha512-nwIxOK8Z2MPWltLKMLOEZwmfBZReqUdbEoHQXeCpa+sRVARe5twpJGHCB4dk9903Yaf0nMAlGbQfaAH92F60eg==", "dev": true, "requires": { - "@typescript-eslint/types": "5.33.0", + "@typescript-eslint/types": "5.33.1", "eslint-visitor-keys": "^3.3.0" } }, @@ -20410,9 +20399,9 @@ } }, "eslint": { - "version": "8.21.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.21.0.tgz", - "integrity": "sha512-/XJ1+Qurf1T9G2M5IHrsjp+xrGT73RZf23xA1z5wB1ZzzEAWSZKvRwhWxTFp1rvkvCfwcvAUNAP31bhKTTGfDA==", + "version": "8.22.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.22.0.tgz", + "integrity": "sha512-ci4t0sz6vSRKdmkOGmprBo6fmI4PrphDFMy5JEq/fNS0gQkJM3rLmrqcp8ipMcdobH3KtUP40KniAE9W19S4wA==", "dev": true, "requires": { "@eslint/eslintrc": "^1.3.0", @@ -24842,12 +24831,6 @@ "side-channel": "^1.0.4" } }, - "querystring": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.1.tgz", - "integrity": "sha512-wkvS7mL/JMugcup3/rMitHmd9ecIGd2lhFhK9N3UUQ450h66d1r3Y9nvXzQAW1Lq+wyx61k/1pfKS5KuKiyEbg==", - "dev": true - }, "queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", @@ -25875,15 +25858,15 @@ } }, "terser-webpack-plugin": { - "version": "5.3.3", - "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.3.tgz", - "integrity": "sha512-Fx60G5HNYknNTNQnzQ1VePRuu89ZVYWfjRAeT5rITuCY/1b08s49e5kSQwHDirKZWuoKOBRFS98EUUoZ9kLEwQ==", + "version": "5.3.5", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.5.tgz", + "integrity": "sha512-AOEDLDxD2zylUGf/wxHxklEkOe2/r+seuyOWujejFrIxHf11brA1/dWQNIgXa1c6/Wkxgu7zvv0JhOWfc2ELEA==", "requires": { - "@jridgewell/trace-mapping": "^0.3.7", + "@jridgewell/trace-mapping": "^0.3.14", "jest-worker": "^27.4.5", "schema-utils": "^3.1.1", "serialize-javascript": "^6.0.0", - "terser": "^5.7.2" + "terser": "^5.14.1" } }, "test-exclude": { @@ -26466,14 +26449,13 @@ } }, "webpack-hot-middleware": { - "version": "2.25.1", - "resolved": "https://registry.npmjs.org/webpack-hot-middleware/-/webpack-hot-middleware-2.25.1.tgz", - "integrity": "sha512-Koh0KyU/RPYwel/khxbsDz9ibDivmUbrRuKSSQvW42KSDdO4w23WI3SkHpSUKHE76LrFnnM/L7JCrpBwu8AXYw==", + "version": "2.25.2", + "resolved": "https://registry.npmjs.org/webpack-hot-middleware/-/webpack-hot-middleware-2.25.2.tgz", + "integrity": "sha512-CVgm3NAQyfdIonRvXisRwPTUYuSbyZ6BY7782tMeUzWOO7RmVI2NaBYuCp41qyD4gYCkJyTneAJdK69A13B0+A==", "dev": true, "requires": { "ansi-html-community": "0.0.8", "html-entities": "^2.1.0", - "querystring": "^0.2.0", "strip-ansi": "^6.0.0" } }, diff --git a/package.json b/package.json index b290e59..5e45680 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@aleleba/create-react-ssr", - "version": "3.1.1", + "version": "3.2.0", "description": "Starter Kit of server side render of react", "bin": "./bin/cli.js", "main": "src/server/index", @@ -67,15 +67,15 @@ "@testing-library/jest-dom": "^5.16.5", "@testing-library/react": "^13.3.0", "@testing-library/user-event": "^14.4.3", - "@types/jest": "^28.1.6", - "@types/node": "^18.7.0", + "@types/jest": "^28.1.7", + "@types/node": "^18.7.6", "@types/react": "^18.0.17", "@types/react-dom": "^18.0.6", "@types/webpack": "^5.28.0", "@types/webpack-hot-middleware": "^2.25.6", "@types/webpack-node-externals": "^2.5.3", - "@typescript-eslint/eslint-plugin": "^5.33.0", - "@typescript-eslint/parser": "^5.33.0", + "@typescript-eslint/eslint-plugin": "^5.33.1", + "@typescript-eslint/parser": "^5.33.1", "babel-jest": "^28.1.3", "babel-loader": "^8.2.5", "clean-webpack-plugin": "^4.0.0", @@ -83,7 +83,7 @@ "copy-webpack-plugin": "^11.0.0", "css-loader": "^6.7.1", "css-minimizer-webpack-plugin": "^4.0.0", - "eslint": "^8.21.0", + "eslint": "^8.22.0", "eslint-plugin-react": "^7.30.1", "eslint-webpack-plugin": "^3.2.0", "file-loader": "^6.2.0", @@ -97,14 +97,14 @@ "sass": "^1.54.4", "sass-loader": "^13.0.2", "style-loader": "^3.3.1", - "terser-webpack-plugin": "^5.3.3", + "terser-webpack-plugin": "^5.3.5", "ts-loader": "^9.3.1", "typescript": "^4.7.4", "url-loader": "^4.1.1", "webpack-cli": "^4.10.0", "webpack-dev-middleware": "^5.3.3", "webpack-dev-server": "^4.10.0", - "webpack-hot-middleware": "^2.25.1", + "webpack-hot-middleware": "^2.25.2", "webpack-node-externals": "^3.0.0", "workbox-webpack-plugin": "^6.5.4", "workbox-window": "^6.5.4"