Skip to content

Releases: statsig-io/node-js-server-sdk

Introduction of Experiment+

30 Jun 21:39
9370ce9
Compare
Choose a tag to compare

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

23 Jun 19:26
d16f453
Compare
Choose a tag to compare

With v4.0.1 we are introducing a few breaking changes on our APIs, along with other optimizations and bug fixes.

  1. Making user and user.userID required for checkGate, getConfig and getExperiment. We realized that having user 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.

  2. Renamed clientVersion to appVersion on StatsigUser to be consistent with the naming on Statsig console and client SDKs.

  3. Removed isReady(). Statsig is ready to be used whenever initialize() has finished.

v3.2.0 - Experiments and new initialization options

15 Jun 22:52
3e9b1e5
Compare
Choose a tag to compare

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:

    1. 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.

    2. 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.

    3. 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.