Skip to content

Releases: statsig-io/js-client-monorepo

3.0.0 - Split out StatsigClient and StatsigOnDeviceClient

06 Sep 15:57
982201b
Compare
Choose a tag to compare

Warning

Contains the following breaking changes

  • Makes ReactNative storage default to @react-native-async-storage/async-storage
  • Moves support for StatsigOnDeviceEvalClient to its own packages

Overview

Creates a hard divide between Statsig with precomputed remote evaluations (the standard StatsigClient) and Statsig with on-device evaluations (StatsigOnDeviceEvalClient). Now we offer specific packages for the combination of client type and environment/framework.

These changes make it easier to offer out-of-the-box solutions for initializing the Statsig client as we can now have a hard dependency on @statsig/js-client and @statsig/js-on-device-eval-client.

Note: StatsigOnDeviceEvalClient no longer works in @statsig/react-bindings as support has been moved into the new @statsig/react-bindings-on-device-eval

Storage Providers

We recently switched to using MMKV as the default storage solution. Based on developer feedback, we have decided to make this an opt-in change rather than the default. This release switches back to the AsyncStorage approach. If you would like to use MMKV, you can now override the StorageProvider (See https://docs.statsig.com/client/javascript-sdk/react-native#synchronous-storage-with-mmkv).

Changelog

Adds new packages specifically for StatsigOnDeviceEvalClient in React, RN and Expo.

  • @statsig/react-bindings-on-device-eval 8c1353c
  • @statsig/react-native-bindings-on-device-eval 8c1353c
  • @statsig/expo-bindings-on-device-eval a447a42

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

  • chore: expose StorageProvider on clients c389725

@statsig/web-analytics

  • feat: autocapture network strength 10f63c2

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

  • feat: add env specific clients for Expo and RN f9f62ba
    • This change means you no longer need to be in the React tree to use a StatsigClient in Expo and RN

2.1.0 - Init through StatsigProvider

29 Aug 21:19
3b7ba67
Compare
Choose a tag to compare
  • Move MMKV dependency to "peerDependencies", allowing 2.0 and 3.0 versions.
  • Add ability to initialize a StatsigClient automatically through StatsigProvider

Changelog

repo

  • chore: update min fast-loops version 1048b98

@statsig/client-core

  • chore: update diagnostics 4c0b077

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

  • feat: add option to disable bg network request 6dc0b5c

@statsig/js-local-overrides

  • feat: methods for removing single overrides c7be2c7

@statsig/react-bindings

  • feat: init client through StatsigProvider 887a535

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

  • chore: chore: allow 2.x and 3.x mmkv version e1ddb2c

2.0.0 - Synchronous Storage for React Native

23 Aug 18:00
f47fd0d
Compare
Choose a tag to compare

Warning

Contains the following breaking changes

  • Makes ReactNative storage synchronous
  • Removes warmCachingFromAsyncStorage and the cacheWarming prop from StatsigProviderRN / StatsigProviderExpo
  • Removes StatsigClient.getAsyncContext

Add new hooks useClientAsyncInit and useClientBootstrapInit, making it easier to get setup using Statsig in react environments.

In ReactNative environments, we have swapped out @react-native-async-storage/async-storage for react-native-mmkv. This now means that we can treat all local storage as synchronous across the SDK, as well as remove the need to warm the caching before calling Statsig in ReactNative.

Example Change:

const client = new StatsigClient(YOU_CLIENT_KEY, user);
// const warming = warmCachingFromAsyncStorage(client); <-  No Longer Required

function App(): JSX.Element {
  return (
    <StatsigProviderRN client={client} /* cacheWarming={warming} <- also removed */>
      <Content />
    </StatsigProviderRN>
  );
}

@statsig/js-client

  • chore: deprecate getAsyncContext 48db8af
  • feat(internal): add statsig::diagnostics tracking to initialization e0604dd
  • chore: only retry on specific http status codes a5ca264

@statsig/web-analytics

  • feat: auto capture support disabling events f042c13

@statsig/react-bindings

  • feat: add react hooks for client initialization af8f6be

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

  • feat: changing storageProvider type to sync, use mmkv for storage in RN 815bfdb

1.7.0 - Support React Strict Mode

12 Aug 23:34
29c8b07
Compare
Choose a tag to compare

To better support 'strict-mode' in the newer versions of Next.js (enabled by default in Next.js 13.4), logic has been added to restart the scheduled event logger flush on remount of the StatsigProvider.

Changelog

@statsig/react-bindings

  • chore: add better error message noop client usage 61b4e08
  • chore: rm auto shutdown in StatsigProvider 9e6a3ef

@statsig/js-client

  • feat: expose adapter and overrideadapter 5437af2

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

  • feat: expose adapter and overrideadapter 5437af2
  • chore: use full storage key in deduper 3b1fa19

1.6.0 - Session Replay Force Record. statsig-react-bindings prevent unmount

29 Jul 21:43
366d767
Compare
Choose a tag to compare

@statsig/react-bindings

  • Prevent unmounting when StatsigClient is 'loading'
  • Add StatsigProvider.loadingComponent. Now only shows loading state if StatsigProvider.loadingComponent is set.

@statsig/session-replay

  • Add ability to force recording to start via runStatsigSessionReplay(client, { forceRecording: true })

v1.5.0 - add getAllOverrides/removeAllOverrides

15 Jul 22:52
0e72016
Compare
Choose a tag to compare

Changelog

@statsig/web-analytics

  • 5901129 feat: allow overriding of api endpoint & capture dataset

@statsig/js-client

  • 35cc6fd fix: ensure environment is set on prefetch

@statsig/js-local-overrides

  • 480a894 feat: add getAllOverrides/removeAllOverrides

@statsig/react-bindings

  • fe477b4 chore: memoize StatsigProvider context value

1.4.0 - expo-device@6 support. hostname & pathname in events

21 Jun 22:11
Compare
Choose a tag to compare

@statsig/expo-bindings

  • 2ae82fb chore: support expo-device 6.x

@statsig/web-analytics

  • c74d9a2 feat: request from customer to break down url into hostname & pathname

1.3.1 - Re-enables Deltas Support. Fix background flushing in React Native

18 Jun 00:26
Compare
Choose a tag to compare

@statsig/js-client

  • f27c664 fix: use checksumV2 in deltas resolution

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

  • 2cf82f4 fix: ensure bg flush is scheduled on mobile

1.3.0 - Fix Experiment.groupName

17 Jun 19:25
Compare
Choose a tag to compare

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

  • 810a528 feat: add StatsigOptions.initialSessionID
  • f58bb2e fix: ensure groupName is returned for Experiments

@statsig/web-analytics

  • 17820bc feat: include content for anchor tags

1.2.0 - Removes GZIP compression for /rgstr calls

07 Jun 20:12
fb13de2
Compare
Choose a tag to compare
  • /rgstr compression is leading to performance issues. Removing completely until they are resolved.