@configdirector/react-native-sdk 0.9.1 → 0.9.2

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.
@@ -869,6 +869,15 @@ const defaultUrlFactory = (input, base) => new URL(input, base === null || base
869
869
  //#region ../shared/src/constants.ts
870
870
  const CLIENT_BASE_URL = "https://client-sdk-api.configdirector.com";
871
871
  //#endregion
872
+ //#region ../shared/src/instance-id.ts
873
+ const generateInstanceId = () => {
874
+ if (typeof crypto !== "undefined" && typeof crypto.randomUUID === "function") return crypto.randomUUID();
875
+ return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (placeholder) => {
876
+ const random = Math.random() * 16 | 0;
877
+ return (placeholder === "x" ? random : random & 3 | 8).toString(16);
878
+ });
879
+ };
880
+ //#endregion
872
881
  //#region ../js-client-core/src/DefaultConfigDirectorClient.ts
873
882
  const MAX_EXPONENTIAL_DELAY = 9;
874
883
  var DefaultConfigDirectorClient = class {
@@ -889,7 +898,7 @@ var DefaultConfigDirectorClient = class {
889
898
  _defineProperty(this, "currentContext", void 0);
890
899
  _defineProperty(this, "connectionMode", void 0);
891
900
  _defineProperty(this, "instanceId", void 0);
892
- this.instanceId = crypto.randomUUID();
901
+ this.instanceId = generateInstanceId();
893
902
  this.logger = (_clientOptions$logger = clientOptions === null || clientOptions === void 0 ? void 0 : clientOptions.logger) !== null && _clientOptions$logger !== void 0 ? _clientOptions$logger : createDefaultLogger();
894
903
  this.timeout = (_clientOptions$connec = clientOptions === null || clientOptions === void 0 || (_clientOptions$connec2 = clientOptions.connection) === null || _clientOptions$connec2 === void 0 ? void 0 : _clientOptions$connec2.timeout) !== null && _clientOptions$connec !== void 0 ? _clientOptions$connec : 3e3;
895
904
  this.validateSdkKeyPresence(clientSdkKey);
@@ -1635,7 +1644,7 @@ const createClient = (clientSdkKey, clientOptions) => {
1635
1644
  const logger = (_clientOptions$logger = clientOptions === null || clientOptions === void 0 ? void 0 : clientOptions.logger) !== null && _clientOptions$logger !== void 0 ? _clientOptions$logger : createConsoleLogger("warn");
1636
1645
  return new DefaultConfigDirectorClient(new ReactNativeTelemetryClient(clientSdkKey, (clientOptions === null || clientOptions === void 0 || (_clientOptions$connec = clientOptions.connection) === null || _clientOptions$connec === void 0 ? void 0 : _clientOptions$connec.url) ? urlFactory(clientOptions.connection.url) : CLIENT_BASE_URL, logger, urlFactory), clientSdkKey, {
1637
1646
  sdkName: "react-native-sdk",
1638
- sdkVersion: "0.9.1"
1647
+ sdkVersion: "0.9.2"
1639
1648
  }, {
1640
1649
  ...clientOptions,
1641
1650
  logger
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@configdirector/react-native-sdk",
3
- "version": "0.9.1",
3
+ "version": "0.9.2",
4
4
  "description": "React Native client SDK for ConfigDirector. ConfigDirector is a remote configuration and feature flag service.",
5
5
  "license": "MIT",
6
6
  "author": "ConfigDirector",
@@ -59,6 +59,7 @@
59
59
  "@babel/core": "^7.29.0",
60
60
  "@eslint/js": "^10.0.1",
61
61
  "@react-native/babel-preset": "^0.85.0",
62
+ "@react-native/jest-preset": "^0.86.2",
62
63
  "@rollup/plugin-replace": "^6.0.3",
63
64
  "@testing-library/react-native": "^13.3.3",
64
65
  "@types/babel__core": "^7",
@@ -71,9 +72,9 @@
71
72
  "eslint": "^10.7.0",
72
73
  "jest": "^30.3.0",
73
74
  "prettier": "^3.8.2",
74
- "react": "19.1.0",
75
- "react-native": "0.81.5",
76
- "react-test-renderer": "19.1.0",
75
+ "react": "^19.2.8",
76
+ "react-native": "^0.86.2",
77
+ "react-test-renderer": "^19.2.8",
77
78
  "tsdown": "^0.21.7",
78
79
  "turbo": "^2.9.16",
79
80
  "typescript": "^5.9.3",