Releases: statsig-io/node-js-server-sdk
Introduction of Experiment+
v4.1.0 made some final adjustments to how we evaluate conditions in order to support Experiment+. Read more about Experiment+.
New major release with breaking API changes
With v4.0.1 we are introducing a few breaking changes on our APIs, along with other optimizations and bug fixes.
-
Making
user
anduser.userID
required forcheckGate
,getConfig
andgetExperiment
. We realized that havinguser
as a nullable parameter was causing confusions for developers, so we've decided to make it required and provide guidance on what to do for different scenarios. -
Renamed
clientVersion
toappVersion
onStatsigUser
to be consistent with the naming on Statsig console and client SDKs. -
Removed
isReady()
. Statsig is ready to be used wheneverinitialize()
has finished.
v3.2.0 - Experiments and new initialization options
With version 3.0.0, we introduced SDK ruleset local evaluation so that your checkGate and getConfig calls no longer make a http request each time. Now with version 3.2.0, we are introducing a new API and a few customization options for initialize():
-
New API: getExperiment(user: object, experimentName: string).
- This new API returns a DynamicConfig object that you can use to retrieve parameters for your experiments (you can still use getConfig() if you prefer that).
-
3 new configuration options for StatsigOptions:
-
environment: an object type parameter which you can use to specify values for targeting purposes for ALL of your users in the current environment. E.g. use {"tier": "staging"} to specify environment tier and test in your staging environment if you have any "Environment Tier" conditions configured.
-
rulesUpdatedCallback(rulesJSON: string, time: number): a callback that is called every time there is an update to your company's rules. It has two parameters, representing the rules in a JSON string and the version/timestamp of the rules.
-
bootstrapValues: a string parameter that you can use to bootstrap Statsig's initialization. The value should be a rulesJSON value you get from the callback in 2). In the very rare case that your server cannot reach Statsig during initialization, this will ensure Statsig SDK still can evaluate your feature gates and Dynamic Configs.
-