Releases: configcat/node-sdk
Releases · configcat/node-sdk
v10.0.0
Please note that this version comes with several breaking changes, so you may need to adjust your code when upgrading, especially if you're using deprecated APIs or a custom logger and/or cache implementation. You can find the detailed list of breaking changes below.
New features and improvements:
- Complete overhaul of SDK logging:
- Simplify the logger interface (
IConfigCatLogger) to make it easier to write custom implementations/adapters to logger frameworks. - Enable structured logging.
- Include event IDs in log messages to make identification of log events easier.
- Revise log messages and make them consistent across the ConfigCat SDKs.
- Simplify the logger interface (
- Revise caching of downloaded config data:
- Change the cache interface (
IConfigCatCache, formerlyICache) to get and set the cache payload as a plain string to make it easier to write custom implementations by removing the burden of data serialization from implementers. - Use a standardized config cache key generation algorithm and cache payload format to allow shared caches to be used by SDKs of different platforms.
- Change the cache interface (
- Revise JSDoc documentation.
- Improve the performance of the "IS (NOT) ONE OF (sensitive)" operators by hashing the value once (configcat/common-js#80).
Bug fixes:
- Fix checks which ensure that
IAutoPollOptions.pollIntervalSeconds,IAutoPollOptions.maxInitWaitTimeSecondsandILazyLoadingOptions.cacheTimeToLiveSecondssettings are in the valid range. (Also, make infinite init wait possible in the case of Auto Polling.) - Fix
... is not a functionbug which can occur in Auto Polling mode, whenIAutoPollOptions.maxInitWaitTimeSecondsis set to 0.
Breaking changes (listed in the order of expected impact):
- Remove the
createClient,createClientWithAutoPoll,createClientWithManualPollandcreateClientWithLazyLoadfactory functions. Alternative:getClient. - Remove all callback-style evaluation methods (e.g.
getValue,getValueDetails, etc.) fromIConfigCatClient. Alternative:get*Async(...).then(result => ...) - Remove the callback-style
forceRefreshmethod fromIConfigCatClient. Alternative:forceRefreshAsync(...).then(result => ...) - Remove the
IAutoPollOptions.configChangedcallback. Alternative:options.setupHooks = hooks => hooks.on("configChanged", ...). - Changes the type of the
newConfigargument fromProjectConfigtoIConfigin theconfigChangedhook. - Remove the
debug,info,warnanderrormethods fromIConfigCatLoggerand change the signature of thelogmethod, which is now the single method that needs to be implemented for custom logging. - Remove the
ICacheinterface. Alternative:IConfigCatCache. - Remove the
getVariationIdAsyncandgetAllVariationIdsAsyncmethods fromIConfigCatClient/ConfigCatClient. Alternative:getValueDetailsAsyncandgetAllValueDetailsAsync. - Slightly change the behavior of flag overrides so default value is returned instead of an unsupported value.
- Slightly change the behavior of
getValuesAsyncandgetValuesDetailsAsyncto fail early with exception when these methods are called with invalid parameters:Errorwhenkeyis empty.TypeErrorwhendefaultValueis not of an allowed type (string,boolean,number,nullandundefined).
- Remove the
IOverrideDataSourceinterface and theFlagOverridesandMapOverrideDataSourceclasses from the public API. - Remove the
ProjectConfig,RolloutRuleandRolloutPercentageItemclasses from the public API. - Change the type of the
MatchedEvaluationRuletoITargetingRuleandMatchedEvaluationPercentageRuletoIPercentageOptioninIEvaluationDetails. - Change the algorithm used to generate the config cache key and the format of the cache payload.
v9.1.1
v9.1.0
- Set engine to Node>=14 and engine-strict=true in the package.json
- Code style fixes
v9.0.0
v8.0.1
v8.0.0
v7.0.0
v6.10.0
Passing the real SDK version to common-js instead of using common-js version.
v6.9.0
v6.8.1
Extensive debug logging to trace down problems with the SDK.