@dr.pogodin/react-utils 1.17.4 → 1.17.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/development/client/index.js.map +1 -1
- package/build/development/client/init.js.map +1 -1
- package/build/development/index.js +7 -0
- package/build/development/index.js.map +1 -1
- package/build/development/server/index.js +6 -31
- package/build/development/server/index.js.map +1 -1
- package/build/development/server/renderer.js +105 -24
- package/build/development/server/renderer.js.map +1 -1
- package/build/development/server/server.js +4 -2
- package/build/development/server/server.js.map +1 -1
- package/build/development/server/utils/errors.js.map +1 -1
- package/build/development/shared/components/Button/index.js.map +1 -1
- package/build/development/shared/components/Checkbox/index.js.map +1 -1
- package/build/development/shared/components/CodeSplit/index.js.map +1 -1
- package/build/development/shared/components/Dropdown/index.js.map +1 -1
- package/build/development/shared/components/GenericLink/index.js.map +1 -1
- package/build/development/shared/components/Input/index.js.map +1 -1
- package/build/development/shared/components/MetaTags.js.map +1 -1
- package/build/development/shared/components/Modal/index.js.map +1 -1
- package/build/development/shared/components/PageLayout/index.js.map +1 -1
- package/build/development/shared/components/ScalableRect/index.js.map +1 -1
- package/build/development/shared/components/Throbber/index.js.map +1 -1
- package/build/development/shared/components/WithTooltip/Tooltip.js.map +1 -1
- package/build/development/shared/components/WithTooltip/index.js.map +1 -1
- package/build/development/shared/components/YouTubeVideo/index.js.map +1 -1
- package/build/development/shared/utils/Semaphore.js.map +1 -1
- package/build/development/shared/utils/config.js.map +1 -1
- package/build/development/shared/utils/index.js.map +1 -1
- package/build/development/shared/utils/jest/E2eSsrEnv.js +26 -7
- package/build/development/shared/utils/jest/E2eSsrEnv.js.map +1 -1
- package/build/development/shared/utils/jest/index.js.map +1 -1
- package/build/development/shared/utils/splitComponent.js.map +1 -1
- package/build/development/shared/utils/time.js.map +1 -1
- package/build/development/web.bundle.js +1 -1
- package/build/production/client/index.js.map +1 -1
- package/build/production/client/init.js.map +1 -1
- package/build/production/index.js +1 -1
- package/build/production/index.js.map +1 -1
- package/build/production/server/Cache.js.map +1 -1
- package/build/production/server/index.js +3 -3
- package/build/production/server/index.js.map +1 -1
- package/build/production/server/renderer.js +18 -8
- package/build/production/server/renderer.js.map +1 -1
- package/build/production/server/server.js +2 -2
- package/build/production/server/server.js.map +1 -1
- package/build/production/server/utils/errors.js.map +1 -1
- package/build/production/shared/components/Button/index.js.map +1 -1
- package/build/production/shared/components/Checkbox/index.js.map +1 -1
- package/build/production/shared/components/CodeSplit/index.js.map +1 -1
- package/build/production/shared/components/Dropdown/index.js.map +1 -1
- package/build/production/shared/components/GenericLink/index.js.map +1 -1
- package/build/production/shared/components/Input/index.js.map +1 -1
- package/build/production/shared/components/Link.js.map +1 -1
- package/build/production/shared/components/MetaTags.js.map +1 -1
- package/build/production/shared/components/Modal/index.js.map +1 -1
- package/build/production/shared/components/NavLink.js.map +1 -1
- package/build/production/shared/components/PageLayout/index.js.map +1 -1
- package/build/production/shared/components/ScalableRect/index.js.map +1 -1
- package/build/production/shared/components/Throbber/index.js.map +1 -1
- package/build/production/shared/components/WithTooltip/Tooltip.js.map +1 -1
- package/build/production/shared/components/WithTooltip/index.js.map +1 -1
- package/build/production/shared/components/YouTubeVideo/index.js.map +1 -1
- package/build/production/shared/utils/Barrier.js.map +1 -1
- package/build/production/shared/utils/Emitter.js.map +1 -1
- package/build/production/shared/utils/Semaphore.js.map +1 -1
- package/build/production/shared/utils/config.js.map +1 -1
- package/build/production/shared/utils/index.js.map +1 -1
- package/build/production/shared/utils/isomorphy.js.map +1 -1
- package/build/production/shared/utils/jest/E2eSsrEnv.js +9 -7
- package/build/production/shared/utils/jest/E2eSsrEnv.js.map +1 -1
- package/build/production/shared/utils/jest/index.js.map +1 -1
- package/build/production/shared/utils/splitComponent.js.map +1 -1
- package/build/production/shared/utils/time.js.map +1 -1
- package/build/production/shared/utils/webpack.js.map +1 -1
- package/build/production/web.bundle.js +1 -1
- package/build/production/web.bundle.js.map +1 -1
- package/config/webpack/app-base.js +8 -2
- package/config/webpack/app-development.js +0 -1
- package/config/webpack/app-production.js +0 -1
- package/package.json +21 -21
|
@@ -15,7 +15,7 @@ const {
|
|
|
15
15
|
const autoprefixer = require('autoprefixer');
|
|
16
16
|
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
|
17
17
|
const forge = require('node-forge');
|
|
18
|
-
const
|
|
18
|
+
const nodeFs = require('fs');
|
|
19
19
|
const path = require('path');
|
|
20
20
|
const SM = require('sitemap');
|
|
21
21
|
const { DefinePlugin, ProgressPlugin } = require('webpack');
|
|
@@ -65,6 +65,7 @@ const {
|
|
|
65
65
|
* [client-side initialization script](docs/client.md)
|
|
66
66
|
* provided by **@dr.pogodin/react-utils**. Note that `swDest`'s value cannot be
|
|
67
67
|
* overriden by config options provided via `workbox` object.
|
|
68
|
+
* @param {object} [ops.fs] Filesystem to use instead of the Node's FS.
|
|
68
69
|
* @param {boolean|object} [ops.keepBuildInfo] If `true` and a `.build-info`
|
|
69
70
|
* file from a previous build exists in the context directory, it will be
|
|
70
71
|
* loaded and used, rather than re-generated by the config factory. It allows
|
|
@@ -139,6 +140,8 @@ module.exports = function configFactory(ops) {
|
|
|
139
140
|
publicPath: '',
|
|
140
141
|
});
|
|
141
142
|
|
|
143
|
+
const fs = ops.fs || nodeFs;
|
|
144
|
+
|
|
142
145
|
/* TODO: This works in practice, but being async and not awaited it is a bad
|
|
143
146
|
* pattern. */
|
|
144
147
|
if (o.sitemap) {
|
|
@@ -199,9 +202,12 @@ module.exports = function configFactory(ops) {
|
|
|
199
202
|
// it to the factory function itself, so it can be easily accessed right after
|
|
200
203
|
// the factory call in testing scenarios.
|
|
201
204
|
if (!o.dontEmitBuildInfo) {
|
|
205
|
+
// Note: this is needed if "fs" option is provided, to ensure the factory
|
|
206
|
+
// does not crash if the folder is not created in that filesystem.
|
|
207
|
+
fs.mkdirSync(o.context, { recursive: true });
|
|
208
|
+
|
|
202
209
|
fs.writeFileSync(buildInfoUrl, JSON.stringify(buildInfo));
|
|
203
210
|
}
|
|
204
|
-
configFactory.buildInfo = buildInfo;
|
|
205
211
|
|
|
206
212
|
/* Entry points normalization. */
|
|
207
213
|
const entry = [
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.17.
|
|
2
|
+
"version": "1.17.7",
|
|
3
3
|
"bin": {
|
|
4
4
|
"react-utils-build": "bin/build.js",
|
|
5
5
|
"react-utils-setup": "bin/setup.js"
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"url": "https://github.com/birdofpreyru/react-utils/issues"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@babel/runtime": "^7.
|
|
11
|
+
"@babel/runtime": "^7.18.0",
|
|
12
12
|
"@dr.pogodin/babel-plugin-react-css-modules": "^6.8.0",
|
|
13
13
|
"@dr.pogodin/react-global-state": "^0.8.3",
|
|
14
14
|
"@dr.pogodin/react-themes": "^1.4.3",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"cross-env": "^7.0.3",
|
|
21
21
|
"dayjs": "^1.11.2",
|
|
22
22
|
"express": "^4.18.1",
|
|
23
|
-
"helmet": "^5.0
|
|
23
|
+
"helmet": "^5.1.0",
|
|
24
24
|
"http-status-codes": "^2.2.0",
|
|
25
25
|
"joi": "^17.6.0",
|
|
26
26
|
"lodash": "^4.17.21",
|
|
@@ -44,55 +44,55 @@
|
|
|
44
44
|
"description": "Collection of generic ReactJS components and utils",
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@babel/cli": "^7.17.10",
|
|
47
|
-
"@babel/core": "^7.
|
|
47
|
+
"@babel/core": "^7.18.0",
|
|
48
48
|
"@babel/eslint-parser": "^7.17.0",
|
|
49
49
|
"@babel/eslint-plugin": "^7.17.7",
|
|
50
50
|
"@babel/node": "^7.17.10",
|
|
51
|
-
"@babel/plugin-transform-runtime": "^7.
|
|
52
|
-
"@babel/preset-env": "^7.
|
|
53
|
-
"@babel/preset-react": "^7.
|
|
51
|
+
"@babel/plugin-transform-runtime": "^7.18.0",
|
|
52
|
+
"@babel/preset-env": "^7.18.0",
|
|
53
|
+
"@babel/preset-react": "^7.17.12",
|
|
54
54
|
"@babel/register": "^7.17.7",
|
|
55
55
|
"@dr.pogodin/babel-plugin-transform-assets": "^1.1.1",
|
|
56
56
|
"@dr.pogodin/babel-preset-svgr": "^1.4.0",
|
|
57
|
-
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.
|
|
57
|
+
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.7",
|
|
58
58
|
"autoprefixer": "^10.4.7",
|
|
59
59
|
"babel-jest": "^28.1.0",
|
|
60
60
|
"babel-loader": "^8.2.5",
|
|
61
61
|
"babel-plugin-module-resolver": "^4.1.0",
|
|
62
|
-
"core-js": "^3.22.
|
|
62
|
+
"core-js": "^3.22.6",
|
|
63
63
|
"css-loader": "^6.7.1",
|
|
64
|
-
"css-minimizer-webpack-plugin": "^
|
|
65
|
-
"eslint": "^8.
|
|
64
|
+
"css-minimizer-webpack-plugin": "^4.0.0",
|
|
65
|
+
"eslint": "^8.16.0",
|
|
66
66
|
"eslint-config-airbnb": "^19.0.4",
|
|
67
67
|
"eslint-import-resolver-babel-module": "^5.3.1",
|
|
68
68
|
"eslint-plugin-import": "^2.26.0",
|
|
69
|
-
"eslint-plugin-jest": "^26.
|
|
69
|
+
"eslint-plugin-jest": "^26.2.2",
|
|
70
70
|
"eslint-plugin-jsx-a11y": "^6.5.1",
|
|
71
|
-
"eslint-plugin-react": "^7.
|
|
71
|
+
"eslint-plugin-react": "^7.30.0",
|
|
72
72
|
"eslint-plugin-react-hooks": "^4.5.0",
|
|
73
73
|
"identity-obj-proxy": "^3.0.0",
|
|
74
74
|
"jest": "^28.1.0",
|
|
75
75
|
"jest-environment-jsdom": "^28.1.0",
|
|
76
|
-
"memfs": "^3.4.
|
|
76
|
+
"memfs": "^3.4.3",
|
|
77
77
|
"mini-css-extract-plugin": "^2.6.0",
|
|
78
78
|
"mockdate": "^3.0.5",
|
|
79
79
|
"nodelist-foreach-polyfill": "^1.2.0",
|
|
80
|
-
"postcss": "^8.4.
|
|
81
|
-
"postcss-loader": "^
|
|
80
|
+
"postcss": "^8.4.14",
|
|
81
|
+
"postcss-loader": "^7.0.0",
|
|
82
82
|
"postcss-scss": "^4.0.4",
|
|
83
83
|
"pretty": "^2.0.0",
|
|
84
84
|
"react-refresh": "^0.13.0",
|
|
85
85
|
"react-test-renderer": "^18.1.0",
|
|
86
86
|
"regenerator-runtime": "^0.13.9",
|
|
87
87
|
"resolve-url-loader": "^5.0.0",
|
|
88
|
-
"sass": "^1.
|
|
89
|
-
"sass-loader": "^
|
|
88
|
+
"sass": "^1.52.1",
|
|
89
|
+
"sass-loader": "^13.0.0",
|
|
90
90
|
"sitemap": "^7.1.1",
|
|
91
|
-
"stylelint": "^14.8.
|
|
91
|
+
"stylelint": "^14.8.4",
|
|
92
92
|
"stylelint-config-standard-scss": "^3.0.0",
|
|
93
93
|
"supertest": "^6.2.3",
|
|
94
94
|
"webpack": "^5.72.1",
|
|
95
|
-
"webpack-dev-middleware": "^5.3.
|
|
95
|
+
"webpack-dev-middleware": "^5.3.3",
|
|
96
96
|
"webpack-hot-middleware": "^2.25.1",
|
|
97
97
|
"webpack-merge": "^5.8.0",
|
|
98
98
|
"workbox-core": "^6.5.3",
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
"workbox-webpack-plugin": "^6.5.3"
|
|
101
101
|
},
|
|
102
102
|
"engines": {
|
|
103
|
-
"node": ">=14.
|
|
103
|
+
"node": ">=14.15.0",
|
|
104
104
|
"npm": ">=6.x"
|
|
105
105
|
},
|
|
106
106
|
"main": "./node-entry.js",
|