@dr.pogodin/react-utils 1.34.0 → 1.35.0

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.
@@ -6,5 +6,5 @@ export { default as api } from 'axios';
6
6
  export * as PT from 'prop-types';
7
7
  export { type AsyncCollectionLoaderT, type AsyncDataEnvelopeT, type AsyncDataLoaderT, type ForceT, type UseAsyncDataOptionsT, type UseAsyncDataResT, type UseGlobalStateResT, type ValueOrInitializerT, getGlobalState, GlobalStateProvider, newAsyncDataEnvelope, useAsyncCollection, useAsyncData, useGlobalState, withGlobalStateType, } from '@dr.pogodin/react-global-state';
8
8
  export * from './shared/components';
9
- export { type Theme, config, Barrier, Emitter, isomorphy, getSsrContext, JU, Semaphore, splitComponent, themed, ThemeProvider, time, webpack, withRetries, } from './shared/utils';
9
+ export { type Theme, config, Barrier, Emitter, isomorphy, getSsrContext, Semaphore, splitComponent, themed, ThemeProvider, time, webpack, withRetries, } from './shared/utils';
10
10
  export { client, server };
@@ -3,7 +3,6 @@ import config from './config';
3
3
  import * as isomorphy from './isomorphy';
4
4
  import time from './time';
5
5
  import * as webpack from './webpack';
6
- import type * as JuT from './jest';
7
6
  export { Barrier, Emitter, Semaphore, withRetries, } from '@dr.pogodin/js-utils';
8
7
  export { getSsrContext } from './globalState';
9
8
  export { default as splitComponent } from './splitComponent';
@@ -12,5 +11,4 @@ type ThemedT = typeof themedImpl & {
12
11
  PRIORITY: typeof PRIORITY;
13
12
  };
14
13
  declare const themed: ThemedT;
15
- declare const JU: typeof JuT | null;
16
- export { type Theme, config, isomorphy, JU, themed, ThemeProvider, time, webpack, };
14
+ export { type Theme, config, isomorphy, themed, ThemeProvider, time, webpack, };
@@ -1,4 +1,3 @@
1
- /// <reference types="trusted-types" />
2
1
  import { type ReactNode, act } from 'react';
3
2
  /**
4
3
  * An alias for [act(..)](https://reactjs.org/docs/test-utils.html#act)
@@ -1,3 +1,4 @@
1
+ /// <reference types="trusted-types" />
1
2
  import { type ComponentType, type ReactNode } from 'react';
2
3
  import { type ChunkGroupsT } from './globalState';
3
4
  /**
package/jest.d.ts ADDED
@@ -0,0 +1 @@
1
+ export * from './build/types-code/shared/utils/jest/index';
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.34.0",
2
+ "version": "1.35.0",
3
3
  "bin": {
4
4
  "react-utils-build": "bin/build.js",
5
5
  "react-utils-setup": "bin/setup.js"
@@ -144,7 +144,8 @@
144
144
  ".": {
145
145
  "browser": {
146
146
  "development": "./build/development/web.bundle.js",
147
- "production": "./build/production/web.bundle.js"
147
+ "production": "./build/production/web.bundle.js",
148
+ "default": "./build/production/web.bundle.js"
148
149
  },
149
150
  "node": {
150
151
  "webpack": "./build/production/web.bundle.js",
@@ -153,6 +154,7 @@
153
154
  "react-native": "./node-entry.js"
154
155
  },
155
156
  "./config/*": "./config/*.js",
157
+ "./jest": "./build/production/shared/utils/jest/index.js",
156
158
  "./mixins": "./src/styles/mixins.scss",
157
159
  "./dev-styles": {
158
160
  "node": "./null.js",
package/src/index.ts CHANGED
@@ -38,7 +38,6 @@ export {
38
38
  Emitter,
39
39
  isomorphy,
40
40
  getSsrContext,
41
- JU,
42
41
  Semaphore,
43
42
  splitComponent,
44
43
  themed,
@@ -10,8 +10,6 @@ import * as isomorphy from './isomorphy';
10
10
  import time from './time';
11
11
  import * as webpack from './webpack';
12
12
 
13
- import type * as JuT from './jest';
14
-
15
13
  export {
16
14
  Barrier,
17
15
  Emitter,
@@ -32,25 +30,10 @@ const themed: ThemedT = themedImpl as ThemedT;
32
30
  themed.COMPOSE = COMPOSE;
33
31
  themed.PRIORITY = PRIORITY;
34
32
 
35
- // Note: it should be done this way, as in some environments
36
- // "process" might not exist, and process.env.NODE_CONFIG_ENV
37
- // not injected by Webpack.
38
- let NODE_CONFIG_ENV;
39
- try {
40
- NODE_CONFIG_ENV = process.env.NODE_CONFIG_ENV;
41
- } catch { /* noop */ }
42
-
43
- const env = NODE_CONFIG_ENV || process.env.NODE_ENV;
44
-
45
- const JU: typeof JuT | null = env !== 'production'
46
- ? webpack.requireWeak('./jest', __dirname) as typeof JuT | null
47
- : null;
48
-
49
33
  export {
50
34
  type Theme,
51
35
  config,
52
36
  isomorphy,
53
- JU,
54
37
  themed,
55
38
  ThemeProvider,
56
39
  time,