Skip to content

Releases: statsig-io/js-client-monorepo

3.8.1 - Support expo-device 7.*

02 Dec 20:10
e674819
Compare
Choose a tag to compare

Patch release to bump the peer dependency on expo-device

3.8.0 - Adds `data-on-statsig-init` support for html script tags

02 Dec 17:41
3d14f63
Compare
Choose a tag to compare

Fixes:

  • export auto capture types
  • allow expo-application v5 or v6 as peer deps

3.7.0 - Default Statsig Environment in On Device Evaluation

23 Nov 02:12
cd570a6
Compare
Choose a tag to compare

To avoid confusion in first time setups, the StatsigEnvironment in StatsigOnDeviceEvalClient will now fallback to the environment of the SDK Key provided. Previously it would default to "Any Environment", which caused issues when eventually actual environments were used.

StatsigOptions.environment still takes precedence, the fallback is only applied if no StatsigOptions.environment is set.

@statsig/client-core

  • c5449cf fix: support trailing slashes in custom api
  • 801d831 test: verify we do not retry 429s
  • 3b06baa chore: add exponential backoff on network retries
  • 7f4e090 fix: prevent calls to undefined event logger

@statsig/js-on-device-eval-client

  • 33fe271 feat: add support for default environment from dcs

@statsig/web-analytics

  • 3137456 chore: export auto capture types

@statsig/angular-bindings

  • 8716f96 chore: fix compiler options

3.6.0 - Add @statsig/angular-bindings

18 Nov 19:38
Compare
Choose a tag to compare

Adds a new package specifically for Angular environments - @statsig/angular-bindings

Sample usage for this package can be found at https://github.com/statsig-io/js-client-monorepo/tree/main/samples/angular

3.5.1 - Adds autocapture settings, array operatores, fixes react memo and layer exposures

16 Nov 03:50
3492b1c
Compare
Choose a tag to compare

Fixes:

  • fixes a bug in @statsig/react-bindings where memoization on react hooks was applied per options object, which would have a separate reference even with the same values
  • fixes a bug where layer exposures were not deduplicated
  • uses statsig cdn for on device evaluation sdk initialization

Features:

  • Adds support for array comparison operators to the on device evaluation sdks
  • Adds support for custom auto capture filtering via an option:
const client = new StatsigClient(
  'client-key',
  { userID: 'a-user' },
  {
    plugins: [
      new StatsigAutoCapturePlugin({
        eventFilterFunc: (event) =>
          event.eventName !== AutoCaptureEventName.PAGE_VIEW,
      }),
    ],
  },
);

3.5.0 - Support Fallback Urls

08 Nov 20:49
Compare
Choose a tag to compare

New Features

Fallback Urls

Adds the ability to specify an array of fallback urls to use if one should fail. This can be useful if you maintain you own servers running a Statsig SDK, but wish to fallback to Statsig's own servers if something goes wrong.

const myStatsigClient = new StatsigClient(YOUR_CLIENT_KEY, YOUR_USER_OBJECT, {
  networkConfig: {
    initializeUrl: 'https://my_custom_backed.org/v1/initialize', // <- Main Url
    initializeFallbackUrls: [
      'https://api.statsig.com/v1/initialize',
      'https://statsigapi.net/v1/initialize',
    ],
  },
});

Changelog

@statsig/client-core

@statsig/js-client @statsig/js-client-on-device-eval

  • ddbcb1f feat: add config version and rule passed to exposure metadata
  • 124511c feat: support fallback urls through StatsigOptions
  • 7fabc6d feat: use cloudflare dns resolver

3.4.0 - Support Larger SessionReplay Event Payloads

30 Oct 22:50
38d8475
Compare
Choose a tag to compare

Improvements

Type Mismatch Warning

Log warning when a typed getter is used with the incorrect type. eg myLayer.get('some_boolean_param', 'true'); // <- log warning because underlying value is a boolean, not a string

SessionReplay Event Slicing

It was reported that some SessionReplay events are not making it out because they are too large. Logic has been added to slice then events, upping the limit to 10mb in total

Changelog

@statsig/js-client @statsig/js-on-device-eval-client

  • 49a705b chore: log warning on typed getter mismatch

@statsig/session-replay

  • 9bff965 chore: break up large rrweb_events payloads

@statsig/react-bindings @statsig/react-native-bindings @statsig/expo-bindings

  • 3f26e80 chore: prevent dupe client warning in react

3.3.0 - Add statsig-js-client+session-replay.min.js

25 Oct 22:00
95b422e
Compare
Choose a tag to compare

New Feature

Adds a new minified js bundle for customer that want SessionReplay support without AutoCapture

New bundle is: https://cdn.jsdelivr.net/npm/@statsig/js-client@3/build/statsig-js-client+session-replay.min.js

<script src="https://cdn.jsdelivr.net/npm/@statsig/js-client@3/build/statsig-js-client+session-replay.min.js?apikey=[YOUR_CLIENT_KEY]"></script>

Fixes

2a8d199 Local Overrides and Parameter Stores

A bug was identified where local overrides were not being respected by Parameter Stores .

3eda9e1 StatsigClient.instance() with Multiple Clients

A customer reported that StatsigClient.instance() suddenly stopped working, this was due to somewhere else in their project, someone had added another StatsigClient.

The issue occurred as StatsigClient.instance() would return the last created instance, meaning all call sites suddenly started using the newer client instance. This was fixed by only supporting the first created instance in StatsigClient.instance(). If you need to use .instance() with two clients, you need to specify the SDK key during the call. eg StatsigClient.instance(client-KEY_FOR_FIRST) and StatsigClient.instance(client-KEY_FOR_SECOND)

Changelog

@statsig/js-client @statsig/js-on-device-eval-client

  • 47bc1b9 feat: add 'tag' as part of client emitted error
  • f46fb0e feat: add request args to emitted network errors
  • 3eda9e1 fix: return first StatsigClient from instance

@statsig/react-native-bindings @statsig/expo-bindings

  • 4014e97 feat: add expo/rn specific hooks for client init

@statsig/js-local-overrides

  • 2a8d199 fix: ensure local overrides work with param stores

@statsig/session-replay

  • 226804b feat: add js-client+session-replay bundle

3.2.0 - SessionReplay and AutoCapture setup improvements

11 Oct 21:47
3846943
Compare
Choose a tag to compare

Makes setting up Session Replay and Web Analytics easier by adding the plugins field to StatsigOptions

// ⭐️ New ⭐️
import { StatsigSessionReplayPlugin } from '@statsig/session-replay';
import { StatsigAutoCapturePlugin } from '@statsig/web-analytics';

const myStatsigClient = new StatsigClient(
    'client-key',
    { userID: 'a-user' },
    {
      plugins: [
        new StatsigSessionReplayPlugin({
          rrwebConfig: { blockClass: 'do-not-record' },
        }),
        new StatsigAutoCapturePlugin(),
      ],
    },
  );

Changelog

@statsig/client-core

  • refac: switch enums to objects c416298
  • chore: restrict sendBeacon usage to 'unload' only 43d4bc2

@statsig/js-client @statsig/js-on-device-eval-client

  • chore: ensure re-init works after shutdown 5f4cef2

@statsig/js-client @statsig/session-replay @statsig/web-analytics

  • feat: allow SessionReplay and AutoCapture via StatsigOptions 02c4819

@statsig/react-bindings

  • chore: useRef instead of useState for client factory hooks 239dfca

3.1.0 - Bootstrap and AutoCapture Page View Improvements

01 Oct 20:24
17fb70f
Compare
Choose a tag to compare

Changelog

@statsig/js-client

  • chore: re-attempt failed logs on focus 1807f74
  • feat: add initialization_failure event to StatsigClientEventEmitter 4122b59
  • chore: gcir bootstrap improvements cad335d
  • chore: prevent bg refresh on bootstrap 0a26fac

@statsig/js-client @statsig/js-on-device-eval-client

  • chore: prevent double init calls 6696ced

@statsig/web-analytics

  • chore: log page_view on SPA 612e304

@statsig/expo-bindings @statsig/react-native-bindings

  • fix: apply content-type headers in RN environments 616ff0f