@statsig/client-core 3.2.0-beta.1 → 3.2.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@statsig/client-core",
3
- "version": "3.2.0-beta.1",
3
+ "version": "3.2.0",
4
4
  "dependencies": {},
5
5
  "type": "commonjs",
6
6
  "main": "./src/index.js",
@@ -165,8 +165,8 @@ class EventLogger {
165
165
  return false;
166
166
  }
167
167
  try {
168
- const isInBackground = !(0, VisibilityObserving_1._isCurrentlyVisible)();
169
- const shouldUseBeacon = isInBackground &&
168
+ const isClosing = (0, VisibilityObserving_1._isUnloading)();
169
+ const shouldUseBeacon = isClosing &&
170
170
  this._network.isBeaconSupported() &&
171
171
  ((_b = (_a = this._options) === null || _a === void 0 ? void 0 : _a.networkConfig) === null || _b === void 0 ? void 0 : _b.networkOverrideFunc) == null;
172
172
  const response = shouldUseBeacon
@@ -132,7 +132,7 @@ class NetworkCore {
132
132
  }
133
133
  _getPopulatedURL(args) {
134
134
  return __awaiter(this, void 0, void 0, function* () {
135
- const params = Object.assign({ [NetworkConfig_1.NetworkParam.SdkKey]: args.sdkKey, [NetworkConfig_1.NetworkParam.SdkType]: SDKType_1.SDKType._get(args.sdkKey), [NetworkConfig_1.NetworkParam.SdkVersion]: StatsigMetadata_1.SDK_VERSION, [NetworkConfig_1.NetworkParam.Time]: String(Date.now()), [NetworkConfig_1.NetworkParam.SessionID]: yield SessionID_1.SessionID.get(args.sdkKey) }, args.params);
135
+ const params = Object.assign({ [NetworkConfig_1.NetworkParam.SdkKey]: args.sdkKey, [NetworkConfig_1.NetworkParam.SdkType]: SDKType_1.SDKType._get(args.sdkKey), [NetworkConfig_1.NetworkParam.SdkVersion]: StatsigMetadata_1.SDK_VERSION, [NetworkConfig_1.NetworkParam.Time]: String(Date.now()), [NetworkConfig_1.NetworkParam.SessionID]: SessionID_1.SessionID.get(args.sdkKey) }, args.params);
136
136
  const query = Object.keys(params)
137
137
  .map((key) => {
138
138
  return `${encodeURIComponent(key)}=${encodeURIComponent(params[key])}`;
@@ -1,4 +1,4 @@
1
- export declare const SDK_VERSION = "3.2.0-beta.1";
1
+ export declare const SDK_VERSION = "3.2.0";
2
2
  export type StatsigMetadata = {
3
3
  readonly [key: string]: string | undefined;
4
4
  readonly appVersion?: string;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.StatsigMetadataProvider = exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = '3.2.0-beta.1';
4
+ exports.SDK_VERSION = '3.2.0';
5
5
  let metadata = {
6
6
  sdkVersion: exports.SDK_VERSION,
7
7
  sdkType: 'js-mono', // js-mono is overwritten by Precomp and OnDevice clients