Skip to content

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

v4.15.2 - Patch a bug with exposure logging for customIDs

06 May 22:45
ce0960a
Compare
Choose a tag to compare

The node sdk was deduping exposures regardless of customIDs. This fixes that bug

v4.14.1 - Fix a bug where exposure logs deduped regardless of customIDs

06 May 22:44
9b12b4b
Compare
Choose a tag to compare

CustomID based experiments would not log proper exposures for every unique customID check. This patch fixes that bug.

v4.15.1 - Allow null userID if customID is present

25 Apr 20:21
Compare
Choose a tag to compare

NOTE: the typing has been loosened to allow nullable userID, but if a customID is not present, it will continue to throw at runtime

Also note - the SDK does not validate the ID type of the condition being evaluated. You must pass the proper ID type with the call to checkGate/getConfig/getExperiment/getLayer - we suggest passing whichever IDs are known at the time to every check (e.g. pass the userID and customIDs to every check, and let the SDK evaluate on the proper ID). Be sure to logEvent with both IDs so experiments on each ID type can join metrics with exposure data.

v4.15.0 - changes to exposure logging on Layers and etc

20 Apr 23:58
33cf19b
Compare
Choose a tag to compare

Previously exposures for Layers happen when you call getLayer(), but when you have multiple experiments running in parallel in the same Layer, this could be exposing more users than the actual number of users who were actually exposed to some of the experiments, so with this release we have moved the exposure logic to be happening when Layer.get() method is called, so that a user is only exposed to an experiment when the parameter for that experiment is fetched.

Also included some other bug fixes and improvements.

v4.14.0 - Vercel compatibility, event deduping, and more

30 Mar 01:05
Compare
Choose a tag to compare
  • Changes to package dependencies and logic so that the SDK is fully compatible with Vercel;
  • Started logging server session ID;
  • Added deduping logic for same exposures happening within 1 minute.

v4.13.0 - Adding support for SSR via generating initializeValues for the client SDK

25 Mar 20:29
a440fbc
Compare
Choose a tag to compare

Introduces a new method, getClientInitializeResponse which takes in a user, and returns the /initialize API response the client SDKs use to server gate/config/experiment checks. This enables SSR of react via a corresponding SDK update to the statsig-react sdk

NOTE that this API can return null if the SDK is unable to serve config responses when it is called. It is up to you to decide how to handle this will SSR - either fall back to the standard SDK with network request, or accept getting default values for that user session.
This should be unlikely and would indicate a larger issue with your server SDK integration

NOTE: This cannot evaluate the statsig "stableID" automatically, as the serverSDK has no stable ID for each user. You must set the stableID in the customIDs map of the user object to evaluate stableID based gates and experiments

v4.12.0 - Adding Support for Layers

22 Mar 23:22
Compare
Choose a tag to compare

Introduces getLayer API to Statsig, adding the ability to get values via a Layer configuration set on the Statsig Console. See docs.statsig.com/layers

v4.10.0 - ID list improvements

09 Mar 21:12
Compare
Choose a tag to compare

Added improvements to ID list logic so that it's more scalable when there are large ID lists.

v4.9.2 - adding support for new operator to check whether a field on user is null

11 Feb 21:09
2f4c942
Compare
Choose a tag to compare

Previous versions of the SDK already supports checking for a null field on the user object, but it treats undefined and null differently, which is not necessary. So in this version we changed === to be == for the eq and neq operators so that if a field is undefined, it will also pass the null check

v4.9.1 - Adds initTimeoutMs to StatsigOptions to short circuit long running initialize calls

20 Jan 21:09
04857fa
Compare
Choose a tag to compare

If you want to add an upper bound to the amount of time initialize takes to resolve, you can use initTimeoutMs in StatsigOptions to short circuit long running initialize calls. By default, there is no timeout on the initialize call