Releases: statsig-io/js-client
v4.32.0 - Adds FetchMode
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
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
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
Only calls initCompletionCallback on the first setInitializeValues
v4.30.0 - Improve initialize metadata apis
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
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
patch async storage issue for react native sdk
v4.28.0 - Adds manual exposure apis
- 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
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
Adds quick flush to catch events that are logged by users that immediately leave a page