Releases: statsig-io/node-js-server-sdk
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
5.27.1 - disable log event compression
Fixes
- reports that log event compression fails when running the sdk in an edge worker. disabling for now
Included In This Release
- b5394f9 tore-statsig
- chore: disable log event compression (#498)
Full Changelog: 5.27.0...5.27.1
5.27.0 - Support array operators, enable event log compression
New Features
- Add support for array operators
Improvements
- Include
group_name
in the client initialize response
Fixes
- Fix output log levels
- Fix awaiting on data adapter
save
Included In This Release
- 7853afe kenny-statsig
- Fix saving config specs to adapter (#496)
- ef15876 Daniel
- chore: re-enable log event compression (#495)
- 73ab2a2 kenny-statsig
- Fix output logger log levels (#494)
- b95a4de Daniel
- fix: include group_name in gcir (#491)
- 3d5b6a6 sroyal-statsig
- Support Array Contains All Operators (#492)
- 0886e5b sroyal-statsig
- Support Array Operators (#490)
Full Changelog: 5.26.0...5.27.0
5.26.0 - Persistent assignment
New Features
- Storage interface for persistent assignment
Included In This Release
Full Changelog: 5.25.1...5.26.0
5.25.1 - fix: support timeout in flush() and remove private attributes from gcir
Fixes
- make flush(timeout) respect the timeout applied
#49 - remove private attributes from the user returned in
getClientInitializeResponse
Included In This Release
Full Changelog: 5.25.0...5.25.1