Skip to content

Releases: statsig-io/js-client

v4.32.0 - Adds FetchMode

31 Mar 19:05
95b6d19
Compare
Choose a tag to compare

Adds StatsigOptions.fetchMode. Setting this option will change the behavior of UpdateUser calls.

The supported FetchModes are as follows:

network-only - This is the default behavior. The SDK will always fetch the latest feature gate and experiment values from the Statsig servers when Statsig.updateUser is called.

cache-or-network - When set to this mode, the SDK will first check if a cached value exists for the user and was cached during this session (After Statsig.initialize). If no valid cache value is found, a network request will be made to fetch the latest values.

v4.31.0 - Improves synchronous initialization path, adds disableLocalOverrides

23 Mar 22:54
6271435
Compare
Choose a tag to compare

Improves the synchronous initialization path (when initializeValues are provided) by removing or moving calls to local storage.

Also introduces disableLocalOverrides as a StatsigOption, which disables local storage loading local overrides for additional performance improvements.

v4.30.2 - patch bootstrap validator to catch more mismatched initalizations

20 Mar 22:56
7eb17fc
Compare
Choose a tag to compare

When initializing, if the evaluated keys do not match between the user object passed in and the evaluated_keys from the initialize values, we change the evaluation reason to InvalidBootstrap as an indicator that something could be off here.

This was not triggered in a few scenarios, but has been patched.

v4.30.1 - patch initCompletionCallback on subsequent setInitializeValues

03 Mar 21:02
dd38c56
Compare
Choose a tag to compare

Only calls initCompletionCallback on the first setInitializeValues

v4.30.0 - Improve initialize metadata apis

27 Feb 23:09
1a0332f
Compare
Choose a tag to compare

Trigger the initCompletionCallback from setInitializeValues - used when synchronously intiializing the SDK. Also prefers performance.now() when available in the browser to Date.now() for measuring the time returned in initCompletionCallback

Adds the Statsig.initializeCalled() as a convenience method so you can check if you have previously called initialize. Note that waiting for the initialize promise to resolve is still the proper way to wait for initialization

Internal updates:

send event log failure telemetry to a different endpoint for better redundancy.
update eval reason when cached values are up to date
dont rotate session id on update user

v4.29.0 - adds ignoreWindowUndefined option

17 Feb 20:57
1aab3f3
Compare
Choose a tag to compare

The statsig-js client SDK typically checks to see if window is defined before logging events, or initializing from the network. This prevents network requests from triggering on the server while using the SDK and server side rendering, for example.

However - there are use cases (like using the client SDK in a ServiceWorker) which require bypassing this check. We introduced a new option to bypass that check

Other internal updates include a warning when checking configs and getting a mismatched default value, and dropping the stableID from the cache key.

v4.28.1 - internal update for react native sdk

02 Dec 00:00
f64014a
Compare
Choose a tag to compare

patch async storage issue for react native sdk

v4.28.0 - Adds manual exposure apis

23 Nov 20:26
Compare
Choose a tag to compare
  • Adds ability to check gates/experiments without triggering an exposure event.
  • Adds ability to manually trigger exposure event
  • Add layer overrides

v4.25.0 - Adds initialize diagnostics

10 Nov 19:44
f8594a9
Compare
Choose a tag to compare

Adds sdk diagnostics to measure initialization time. This will eventually be exposed in the statsig console, but for now is for internal monitoring.

As always, if you'd prefer not to send this diagnostic information from your SDK integration, you can disable it with disableDiagnosticsLogging in StatsigOptions

v4.24.1 - Additional flushing during startup

27 Oct 17:36
Compare
Choose a tag to compare

Adds quick flush to catch events that are logged by users that immediately leave a page