Releases: statsig-io/node-js-server-sdk
6.3.1 - Fix bundling with webpack and next.js
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
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
Full Changelog: 6.2.0...6.3.0
6.2.0 - Add Evaluation Callback and Custom ID Based Local Overrides
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
Full Changelog: 6.1.0...6.2.0
6.1.0 - DataAdapter(DataStore) IDList Response format change
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
Full Changelog: 6.0.1...6.1.0
6.0.1 - Fix DataAdapter format
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
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.
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
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
Full Changelog: 5.29.0...5.30.0
5.29.0 - add ID type to client initialize response and memoize last UA parse
Improvements
- memoize last ua parse (thanks @alfredxing)
Fixes
- add IDType to getClientInitializeResponse payload
Included In This Release
Full Changelog: 5.28.0...5.29.0
5.28.0 - Initialize details & Enforce targeting for persisted assignments
New Features
- Return an
InitializeDetails
object with success/error information
Improvements
- Allow checking targeting gate before serving persisted assignment via the option
enforceTargeting
onPersistentAssignemntOptions
Included In This Release
Full Changelog: 5.27.2...5.28.0
5.27.2 - Evaluation process optimization
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