@dr.pogodin/react-utils 1.43.7 → 1.43.9

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/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.43.7",
2
+ "version": "1.43.9",
3
3
  "bin": {
4
4
  "react-utils-build": "bin/build.js",
5
5
  "react-utils-setup": "bin/setup.js"
@@ -10,8 +10,8 @@
10
10
  "dependencies": {
11
11
  "@babel/runtime": "^7.27.1",
12
12
  "@dr.pogodin/babel-plugin-react-css-modules": "^6.13.5",
13
- "@dr.pogodin/csurf": "^1.14.2",
14
- "@dr.pogodin/js-utils": "^0.0.17",
13
+ "@dr.pogodin/csurf": "^1.15.0",
14
+ "@dr.pogodin/js-utils": "^0.0.18",
15
15
  "@dr.pogodin/react-global-state": "^0.18.1",
16
16
  "@dr.pogodin/react-helmet": "^3.0.2",
17
17
  "@dr.pogodin/react-themes": "^1.8.0",
@@ -46,11 +46,11 @@
46
46
  },
47
47
  "description": "Collection of generic ReactJS components and utils",
48
48
  "devDependencies": {
49
- "@babel/cli": "^7.27.1",
49
+ "@babel/cli": "^7.27.2",
50
50
  "@babel/core": "^7.27.1",
51
51
  "@babel/node": "^7.27.1",
52
52
  "@babel/plugin-transform-runtime": "^7.27.1",
53
- "@babel/preset-env": "^7.27.1",
53
+ "@babel/preset-env": "^7.27.2",
54
54
  "@babel/preset-react": "^7.27.1",
55
55
  "@babel/preset-typescript": "^7.27.1",
56
56
  "@babel/register": "^7.27.1",
@@ -73,7 +73,7 @@
73
73
  "@types/morgan": "^1.9.9",
74
74
  "@types/node-forge": "^1.3.11",
75
75
  "@types/pretty": "^2.0.3",
76
- "@types/react": "^19.1.2",
76
+ "@types/react": "^19.1.3",
77
77
  "@types/react-dom": "^19.1.3",
78
78
  "@types/request-ip": "^0.0.41",
79
79
  "@types/serialize-javascript": "^5.0.4",
@@ -109,11 +109,11 @@
109
109
  "stylelint": "^16.19.1",
110
110
  "stylelint-config-standard-scss": "^14.0.0",
111
111
  "supertest": "^7.1.0",
112
- "tsc-alias": "1.8.13",
112
+ "tsc-alias": "1.8.16",
113
113
  "tstyche": "^3.5.0",
114
114
  "typed-scss-modules": "^8.1.1",
115
115
  "typescript": "^5.8.3",
116
- "webpack": "^5.99.7",
116
+ "webpack": "^5.99.8",
117
117
  "webpack-dev-middleware": "^7.4.2",
118
118
  "webpack-hot-middleware": "^2.26.1",
119
119
  "webpack-merge": "^6.0.1",
package/src/index.ts CHANGED
@@ -5,6 +5,14 @@ import { webpack } from 'utils';
5
5
  import type * as ClientM from './client';
6
6
  import type * as ServerFactoryM from './server';
7
7
 
8
+ // It is a safeguard against multiple instances / versions of the library
9
+ // being loaded into environment by mistake (e.g. because of different
10
+ // packages pinning down different exact versions of the lib, thus preventing
11
+ // a proper dedupe and using a single common library version).
12
+ if (global.REACT_UTILS_LIBRARY_LOADED) {
13
+ throw Error('React utils library is already loaded');
14
+ } else global.REACT_UTILS_LIBRARY_LOADED = true;
15
+
8
16
  const server = webpack.requireWeak<typeof ServerFactoryM>('./server', __dirname);
9
17
 
10
18
  const client = server
package/types.d.ts CHANGED
@@ -1,11 +1,11 @@
1
1
  /* eslint-disable import/no-extraneous-dependencies */
2
2
 
3
3
  // TODO: Double-check that let does not work?
4
- // eslint-disable-next-line no-var
4
+ /* eslint-disable no-var */
5
5
  declare var IS_REACT_ACT_ENVIRONMENT: boolean | undefined;
6
-
7
- // eslint-disable-next-line no-var
6
+ declare var REACT_UTILS_LIBRARY_LOADED: boolean | undefined;
8
7
  declare var REACT_UTILS_FORCE_CLIENT_SIDE: boolean | undefined;
8
+ /* eslint-enable no-var */
9
9
 
10
10
  declare module '@babel/register/experimental-worker' {
11
11
  const register: {