@statsig/react-bindings 2.1.1-beta.4 → 2.1.1-beta.5

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,15 +1,15 @@
1
1
  {
2
2
  "name": "@statsig/react-bindings",
3
- "version": "2.1.1-beta.4",
3
+ "version": "2.1.1-beta.5",
4
4
  "dependencies": {
5
- "@statsig/client-core": "2.1.1-beta.4"
5
+ "@statsig/client-core": "2.1.1-beta.5"
6
6
  },
7
7
  "peerDependencies": {
8
8
  "react": "^16.6.3 || ^17.0.0 || ^18.0.0"
9
9
  },
10
10
  "optionalDependencies": {
11
- "@statsig/js-client": "2.1.1-beta.4",
12
- "@statsig/js-on-device-eval-client": "2.1.1-beta.4"
11
+ "@statsig/js-client": "2.1.1-beta.5",
12
+ "@statsig/js-on-device-eval-client": "2.1.1-beta.5"
13
13
  },
14
14
  "type": "commonjs",
15
15
  "main": "./src/index.js",
@@ -3,19 +3,20 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.requireOptionalOnDeviceClientDependency = exports.requireOptionalClientDependency = void 0;
4
4
  const client_core_1 = require("@statsig/client-core");
5
5
  const NoopEvaluationsClient_1 = require("./NoopEvaluationsClient");
6
+ function _optionalRequire(modName) {
7
+ // eslint-disable-next-line @typescript-eslint/no-var-requires
8
+ return require(modName);
9
+ }
6
10
  let jsClientMod = null;
7
11
  try {
8
- // eslint-disable-next-line @typescript-eslint/no-var-requires
9
- jsClientMod = require('@statsig' + '/js-client');
12
+ jsClientMod = _optionalRequire('@statsig' + '/js-client');
10
13
  }
11
14
  catch (error) {
12
15
  // noop
13
16
  }
14
17
  let jsOnDeviceEvalClientMod = null;
15
18
  try {
16
- jsOnDeviceEvalClientMod =
17
- // eslint-disable-next-line @typescript-eslint/no-var-requires
18
- require('@statsig' + '/js-on-device-eval-client');
19
+ jsOnDeviceEvalClientMod = _optionalRequire('@statsig' + '/js-on-device-eval-client');
19
20
  }
20
21
  catch (error) {
21
22
  // noop