Skip to content

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

6.3.1 - Fix bundling with webpack and next.js

28 Jan 00:38
fb4af6c
Compare
Choose a tag to compare

Fixes

  • Fixes bundling with webpack and next.js

Included In This Release

  • 6d55b5a andre-statsig
    • Revert "Add zstd encoding support (#533)" (#543)

Full Changelog: 6.3.0...6.3.1

6.3.0 - Add More Advanced Evaluation Callbacks and zstd Compression Support

23 Jan 00:41
87b1f68
Compare
Choose a tag to compare

New Features

  • Adds support for zstd encoding for log event

Improvements

  • Adds a more advanced option evaluationCallbacks that allows a callback to be defined to gates, dynamic configs, experiments, layers, and layer parameter gets. These functions take in the eval result, the exposure log, and the user used for the evaluation

Included In This Release

  • 692dda6 andre-statsig
    • Add zstd encoding support (#533)
  • e59d945 sroyal-statsig
    • Add Support for More Advanced Eval Callbacks (#540)
  • 2d245c7 andre-statsig
    • Refactor async in tests (#536)

Full Changelog: 6.2.0...6.3.0

6.2.0 - Add Evaluation Callback and Custom ID Based Local Overrides

21 Jan 23:10
4a03459
Compare
Choose a tag to compare

New Features

  • Adds evaluation callback to statsig options which is a function that will be called whenever a gate/config/experiment/layer is checked

Improvements

  • For overrides with an id specified checks will now check against custom ids in addition to user ids

Included In This Release

  • e1194d1 sroyal-statsig
    • Support Eval Callbacks (#538)
  • a252d91 sroyal-statsig
    • Allow Overriding Custom IDs (#537)

Full Changelog: 6.1.0...6.2.0

6.1.0 - DataAdapter(DataStore) IDList Response format change

14 Jan 18:05
99f0d0d
Compare
Choose a tag to compare

Improvements

  • Make how IDLists being stored to DataAdapter consistent with other SDK and services
    • Support parse old and new formats

Fixes

  • Fix enforce targeting

Included In This Release

  • 7e92061 Xin Li
    • Supports 2 formats of datastore responses and change how we write to datastore (#534)
  • e08a959 kenny-statsig
    • Fix enforce targeting (#532)

Full Changelog: 6.0.1...6.1.0

6.0.1 - Fix DataAdapter format

19 Nov 18:29
3d7e2b8
Compare
Choose a tag to compare

Improvements

  • Append / to data adapter key path so it's statsig|/v/1download_config_specs|plain_text|sha256base64(sdkkey)

Included In This Release

  • ccfd105 Xin Li
    • Update adapter key path part to properly have / properly (#530)

Full Changelog: 6.0.0...6.0.1

6.0.0 - Breaking Change on Core API, DataAapter Keys, Environment tier, and getClientIntializeResponse

18 Nov 18:26
74a9406
Compare
Choose a tag to compare

This version introducing several breaking changes, please read when upgrade.
Detailed upgrade guide can be found here

Breaking Changes

Synchronou Core APIs

Summary: Make most of core APIs synchronous functions: checkGate, getFeatureGate, getConfig, getExperiment, getLayer and deprecated many apis.
Changes: We have deprecated a series of apis such as async checkGate() a while ago, now we are removing this series of apis. All core apis within SDKs are synchronous.
b. Deprecate *Sync functions such as checkGateSync, getConfigSync.. Which serve the same functionalities as the new Synchronous APIs
For migration:
1. if you are using _sync functions, you can just rename functions name to be without sync() for example checkGateSync → checkGate
2. If you are using async functions, compile (for ts) or runtime error will be encountered if you are using .then().error() to handle this promise.

GetClientIntializeResponse() Response Changes

What changed: Default hash algorithm for getClientInitializeResponse() changed from sha256 to djb2.
For migration:
1. If you are passing hashAlgorithm, this should have no impact on you.
2. If you are not, please make sure your client SDKs are up to date (so it handles djb2 responses properly)

DataAdapter Cache Key Changes

Summary: Change cache keys SDK used to read and write from your DataAdapter.
Changes
1. Change cache key for config_specs to be “statsig|v1/download_config_specs|plain_text //copmress encoding|{SHA256Hashed(secretkey)} //false”
2. Change cache key for get_id_lists to be “statsig|get_id_lists|plain_text // compress encoding|{SHA256Hashed(secretkey)}”
4. Change cache key for inidividual id list to be statsig|id_list::${String(idListName)}|plain_text//encoding|${SHA256Hashed(secretKey)}
Migration guide
1. ⚠️ If you are using one fo provided Edge DataAdapter, DO NOT upgrade yet
2. If you are ok with cache miss with the first request, then you don’t need to do anything, SDK will write to cache with new key.
3. If you don’t want cold cache, please write with the new key before upgrade

Default SDK environment tier if not being set

What changed: Before if no environment tier is set, we consider it to be null, which will fail rules which set environment tier. We now assign default value to it: 1. Use SDK Key Tier if being set 2. Use production otherwise
Migration guide
Consider setting environment tier if you are not already.
If you are not setting environment tier, SDK will fail rules which set environment tier to be non-production.

Deprecate WithExposureLoggingDisabled

Migration Guide
Use core API with option instead.
For example, Instead of calling Statsig.getConfigWithExposureLoggingDisabled() call Statsig.getConfig(user, config_name,{disableExposureLogging: true})

New Features

  • Log event compression except edge function

Improvements

  • Add pass field to dynamic configs

Included In This Release

  • cabe3f6 dependabot[bot]
    • Bump micromatch from 4.0.5 to 4.0.8 (#493)
  • 10ed575 sroyal-statsig
    • Add Passed Field to Dynamic Configs for GCIR (#522)
  • b84c37e Xin Li
    • refac: Change checkGate getExperiment getConfig and getLayer functions to be synchronous and remove {core_api}_async functions (#511)
  • e8edac7 Xin Li
    • DataAdapter key v2: Include path and sdk keys as part of DataAdapter key (#509)
  • 44d2983 sroyal-statsig
    • Add Support for Default Environment from Server (#521)
  • a942533 kenny-statsig
    • Re-enable log event compression except for Edge (#506)

Included In This Release

  • 74a8802 Xin Li
    • Update data adapter key (#527)
  • cc2d94d Xin Li
    • change data adapter key for idlists (#526)
  • cabe3f6 dependabot[bot]
    • Bump micromatch from 4.0.5 to 4.0.8 (#493)
  • 10ed575 sroyal-statsig
    • Add Passed Field to Dynamic Configs for GCIR (#522)
  • b84c37e Xin Li
    • refac: Change checkGate getExperiment getConfig and getLayer functions to be synchronous and remove {core_api}_async functions (#511)
  • e8edac7 Xin Li
    • DataAdapter key v2: Include path and sdk keys as part of DataAdapter key (#509)
  • 44d2983 sroyal-statsig
    • Add Support for Default Environment from Server (#521)
  • a942533 kenny-statsig
    • Re-enable log event compression except for Edge (#506)

Full Changelog: 5.30.0...6.0.0

5.30.0 - Add support for StatsigOptions.networkOverrideFunc

30 Oct 21:39
57ad32d
Compare
Choose a tag to compare

New Features

  • Allow developers to use their own networking APIs by specifying a StatsigOptions.networkOverrideFunc. This is a fetch like function call.

Included In This Release

  • 532cd78 Daniel
    • feat: add StatsigOptions.networkOverrideFunc (#517)
  • b1b4630 sroyal-statsig
    • Switch Version Metadata to String (#518)
  • 95046f9 sroyal-statsig
    • Include Pass/Fail for Configs and Version on Exposures (#516)

Full Changelog: 5.29.0...5.30.0

5.29.0 - add ID type to client initialize response and memoize last UA parse

19 Oct 02:54
478fab3
Compare
Choose a tag to compare

Improvements

Fixes

  • add IDType to getClientInitializeResponse payload

Included In This Release

  • 5f90be7 tore-statsig
    • Memoize parseUserAgent (#510)
  • 7230be8 sroyal-statsig
    • Add IDType to GCIR (#507)

Full Changelog: 5.28.0...5.29.0

5.28.0 - Initialize details & Enforce targeting for persisted assignments

07 Oct 22:56
7c9a175
Compare
Choose a tag to compare

New Features

  • Return an InitializeDetails object with success/error information

Improvements

  • Allow checking targeting gate before serving persisted assignment via the option enforceTargeting on PersistentAssignemntOptions

Included In This Release

  • d60885a kenny-statsig
    • Respect targeting in persistent evaluation (#503)
  • dbe3040 kenny-statsig
    • Initialization details (#500)

Full Changelog: 5.27.2...5.28.0

5.27.2 - Evaluation process optimization

24 Sep 20:09
4fbe816
Compare
Choose a tag to compare

Improvements

  • Optimized the evaluation process and enhanced the performance.

Included In This Release

  • 7458d71 Weihao Ding
    • optimize: eval rule logic (#501)

Full Changelog: 5.27.1...5.27.2