@dr.pogodin/react-utils 1.11.2 → 1.12.3

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.
@@ -5,7 +5,13 @@
5
5
  * Base [Webpack](https://webpack.js.org/) configuration for apps.
6
6
  */
7
7
 
8
- const _ = require('lodash');
8
+ const {
9
+ clone,
10
+ defaults,
11
+ isFunction,
12
+ isObject,
13
+ } = require('lodash');
14
+
9
15
  const autoprefixer = require('autoprefixer');
10
16
  const MiniCssExtractPlugin = require('mini-css-extract-plugin');
11
17
  const forge = require('node-forge');
@@ -122,7 +128,7 @@ const {
122
128
  * - **`timestamp`** — The value set for `BUILD_TIMESTAMP`.
123
129
  */
124
130
  module.exports = function configFactory(ops) {
125
- const o = _.defaults(_.clone(ops), {
131
+ const o = defaults(clone(ops), {
126
132
  babelLoaderOptions: {},
127
133
  cssLocalIdent: '[hash:base64:6]',
128
134
  outputPath: 'build/web-public',
@@ -135,7 +141,7 @@ module.exports = function configFactory(ops) {
135
141
  const sitemapUrl = path.resolve(o.context, o.sitemap);
136
142
  /* eslint-disable global-require, import/no-dynamic-require */
137
143
  let source = require(sitemapUrl);
138
- if (_.isFunction(source)) source = source();
144
+ if (isFunction(source)) source = source();
139
145
  /* eslint-enable global-require, import/no-dynamic-require */
140
146
  const sm = new SM.SitemapStream();
141
147
  source.forEach((item) => sm.write(item));
@@ -192,7 +198,7 @@ module.exports = function configFactory(ops) {
192
198
 
193
199
  /* Adds InjectManifest plugin from WorkBox, if opted to. */
194
200
  if (o.workbox) {
195
- if (!_.isObject(o.workbox)) o.workbox = {};
201
+ if (!isObject(o.workbox)) o.workbox = {};
196
202
  plugins.push(new WorkboxPlugin.InjectManifest({
197
203
  swSrc: path.resolve(__dirname, '../workbox/default.js'),
198
204
  ...o.workbox,
@@ -3,7 +3,7 @@
3
3
  * @module webpack/app-development
4
4
  * @desc development Webpack configuration for applications.
5
5
  */
6
- const _ = require('lodash');
6
+ const { clone, defaults } = require('lodash');
7
7
  const MiniCssExtractPlugin = require('mini-css-extract-plugin');
8
8
 
9
9
  const ReactRefreshPlugin = require('@pmmmwh/react-refresh-webpack-plugin');
@@ -14,7 +14,7 @@ const { merge } = require('webpack-merge');
14
14
  const baseFactory = require('./app-base');
15
15
 
16
16
  module.exports = function configFactory(ops) {
17
- const o = _.defaults(_.clone(ops), {
17
+ const o = defaults(clone(ops), {
18
18
  cssLocalIdent: '[package]___[path][name]___[local]___[hash:base64:6]',
19
19
  });
20
20
 
package/package.json CHANGED
@@ -7,22 +7,21 @@
7
7
  "url": "https://github.com/birdofpreyru/react-utils/issues"
8
8
  },
9
9
  "dependencies": {
10
- "@babel/runtime": "^7.16.3",
11
- "@dr.pogodin/babel-plugin-react-css-modules": "^6.5.2",
12
- "@dr.pogodin/react-global-state": "^0.6.4",
10
+ "@babel/runtime": "^7.16.5",
11
+ "@dr.pogodin/babel-plugin-react-css-modules": "^6.5.4",
12
+ "@dr.pogodin/react-global-state": "^0.6.5",
13
13
  "@dr.pogodin/react-themes": "^1.3.3",
14
- "autoprefix": "^1.0.1",
15
14
  "axios": "^0.24.0",
16
15
  "commander": "^8.3.0",
17
16
  "compression": "^1.7.4",
18
17
  "config": "^3.3.6",
19
- "cookie-parser": "^1.4.5",
18
+ "cookie-parser": "^1.4.6",
20
19
  "cross-env": "^7.0.3",
21
20
  "dayjs": "^1.10.7",
22
21
  "express": "^4.17.1",
23
22
  "helmet": "^4.6.0",
24
23
  "http-status-codes": "^2.1.4",
25
- "joi": "^17.4.2",
24
+ "joi": "^17.5.0",
26
25
  "lodash": "^4.17.21",
27
26
  "morgan": "^1.10.0",
28
27
  "node-forge": "^0.10.0",
@@ -32,12 +31,12 @@
32
31
  "react": "^17.0.2",
33
32
  "react-dom": "^17.0.2",
34
33
  "react-helmet": "^6.1.0",
35
- "react-router-dom": "^6.0.2",
34
+ "react-router-dom": "^6.1.1",
36
35
  "request-ip": "^2.1.3",
37
36
  "rimraf": "^3.0.2",
38
37
  "serialize-javascript": "^6.0.0",
39
38
  "serve-favicon": "^2.5.0",
40
- "source-map-support": "^0.5.20",
39
+ "source-map-support": "^0.5.21",
41
40
  "url-parse": "^1.5.3",
42
41
  "uuid": "^8.3.2",
43
42
  "winston": "^3.3.3"
@@ -45,60 +44,60 @@
45
44
  "description": "Collection of generic ReactJS components and utils",
46
45
  "devDependencies": {
47
46
  "@babel/cli": "^7.16.0",
48
- "@babel/core": "^7.16.0",
49
- "@babel/eslint-parser": "^7.16.3",
50
- "@babel/eslint-plugin": "^7.14.5",
51
- "@babel/node": "^7.16.0",
47
+ "@babel/core": "^7.16.5",
48
+ "@babel/eslint-parser": "^7.16.5",
49
+ "@babel/eslint-plugin": "^7.16.5",
50
+ "@babel/node": "^7.16.5",
52
51
  "@babel/plugin-syntax-dynamic-import": "^7.8.3",
53
- "@babel/plugin-transform-runtime": "^7.16.0",
54
- "@babel/preset-env": "^7.16.0",
55
- "@babel/preset-react": "^7.16.0",
52
+ "@babel/plugin-transform-runtime": "^7.16.5",
53
+ "@babel/preset-env": "^7.16.5",
54
+ "@babel/preset-react": "^7.16.5",
56
55
  "@babel/types": "^7.16.0",
57
56
  "@dr.pogodin/babel-plugin-css-modules-transform": "^1.10.0",
58
57
  "@dr.pogodin/babel-plugin-transform-assets": "^1.1.1",
59
- "@dr.pogodin/babel-preset-svgr": "^1.3.1",
60
- "@pmmmwh/react-refresh-webpack-plugin": "^0.5.1",
58
+ "@dr.pogodin/babel-preset-svgr": "^1.4.0",
59
+ "@pmmmwh/react-refresh-webpack-plugin": "^0.5.3",
61
60
  "autoprefixer": "^10.4.0",
62
- "babel-jest": "^27.3.1",
61
+ "babel-jest": "^27.4.5",
63
62
  "babel-loader": "^8.2.3",
64
63
  "babel-plugin-module-resolver": "^4.1.0",
65
- "core-js": "^3.19.1",
64
+ "core-js": "^3.19.3",
66
65
  "css-loader": "^6.5.1",
67
- "css-minimizer-webpack-plugin": "^3.1.3",
68
- "eslint": "^8.2.0",
69
- "eslint-config-airbnb": "^19.0.0",
66
+ "css-minimizer-webpack-plugin": "^3.2.0",
67
+ "eslint": "^8.4.1",
68
+ "eslint-config-airbnb": "^19.0.2",
70
69
  "eslint-import-resolver-babel-module": "^5.3.1",
71
70
  "eslint-plugin-import": "^2.25.3",
72
- "eslint-plugin-jest": "^25.2.4",
71
+ "eslint-plugin-jest": "^25.3.0",
73
72
  "eslint-plugin-jsx-a11y": "^6.5.1",
74
- "eslint-plugin-react": "^7.27.0",
73
+ "eslint-plugin-react": "^7.27.1",
75
74
  "eslint-plugin-react-hooks": "^4.3.0",
76
75
  "identity-obj-proxy": "^3.0.0",
77
- "jest": "^27.3.1",
78
- "mini-css-extract-plugin": "^2.4.4",
76
+ "jest": "^27.4.5",
77
+ "mini-css-extract-plugin": "^2.4.5",
79
78
  "mockdate": "^3.0.5",
80
79
  "nodelist-foreach-polyfill": "^1.2.0",
81
80
  "postcss": "^8.3.11",
82
- "postcss-loader": "^6.2.0",
81
+ "postcss-loader": "^6.2.1",
83
82
  "postcss-scss": "^4.0.2",
84
83
  "pretty": "^2.0.0",
85
- "react-refresh": "^0.10.0",
84
+ "react-refresh": "^0.11.0",
86
85
  "react-test-renderer": "^17.0.2",
87
86
  "regenerator-runtime": "^0.13.9",
88
87
  "resolve-url-loader": "^4.0.0",
89
- "sass": "^1.43.4",
90
- "sass-loader": "^12.3.0",
88
+ "sass": "^1.45.0",
89
+ "sass-loader": "^12.4.0",
91
90
  "sitemap": "^7.0.0",
92
91
  "stylelint": "^14.1.0",
93
- "stylelint-config-standard-scss": "^2.0.1",
92
+ "stylelint-config-standard-scss": "^3.0.0",
94
93
  "supertest": "^6.1.6",
95
- "webpack": "^5.64.0",
96
- "webpack-dev-middleware": "^5.2.1",
94
+ "webpack": "^5.65.0",
95
+ "webpack-dev-middleware": "^5.2.2",
97
96
  "webpack-hot-middleware": "^2.25.1",
98
97
  "webpack-merge": "^5.8.0",
99
- "workbox-core": "^6.3.0",
100
- "workbox-precaching": "^6.3.0",
101
- "workbox-webpack-plugin": "^6.3.0"
98
+ "workbox-core": "^6.4.2",
99
+ "workbox-precaching": "^6.4.2",
100
+ "workbox-webpack-plugin": "^6.4.2"
102
101
  },
103
102
  "engines": {
104
103
  "node": ">=14.x",
@@ -132,5 +131,5 @@
132
131
  "lint:scss": "stylelint -- **/*.{css,scss}",
133
132
  "test": "npm run lint && npm run jest"
134
133
  },
135
- "version": "1.11.2"
134
+ "version": "1.12.3"
136
135
  }