Releases: configcat/node-sdk
Releases · configcat/node-sdk
v11.3.1
Improvements:
- Make the timing of polling iterations more accurate in Auto Polling mode. (configcat/common-js#106)
Bug fixes:
- Check cache expiration in every poll iteration, not just the first one in Auto Polling mode to reduce network traffic when the SDK uses a shared cache (including LocalStorage cache used by instances of a browser app running in multiple browser tabs). (configcat/common-js#106)
- Synchronize in-memory cache with the external cache in every poll iteration, not just the first one in Auto Polling mode regardless of offline mode to keep in-memory cache up-to-date when the SDK uses a shared cache.
- Protect poll iterations with try-catch so a potential exception doesn't stop the polling loop in Auto Polling mode.
v11.3.0
Improvements:
- Make naming of
UserComparator
members consistent. (configcat/common-js#102) - Make line terminator character sequence configurable in log messages.
- Adjust the terminology used in JSDoc comments to the main documentation.
- Minor performance improvements.
Bug fixes:
- Align evaluation logging and evaluator error reporting in some edge cases where the config JSON contains errors.
- Correct grammar mistakes in error messages.
Breaking changes:
- Change the name of some
UserComparator
members:Is(Not)OneOf
->TextIs(Not)OneOf
,SensitiveIs(Not)OneOf
->SensitiveTextIs(Not)OneOf
,(Not)ContainsAnyOf
->Text(Not)ContainsAnyOf
. (Low impact expected.)
v11.2.0
New features/improvements:
- Add an optional parameter named
watchChanges
tocreateFlagOverridesFromMap
which controls whether the client should detect changes to the flag override map after client initialization. (configcat/common-js#101)
Bug fixes:
- Reference a fixed version of
configcat-common
to avoid issues in case the "pubternal" API ofconfigcat-common
changes. (#71)
v11.1.0
Improvements:
- Upgrade to configcat-common v9.1.0.
v11.0.0
New features and improvements:
- Add support for the new Config JSON v6 format: update the config model and implement new features in setting evaluation logic. (configcat/common-js#96)
- Overhaul setting evaluation-related logging and make it consistent across SDKs.
- Performance improvements to setting evaluation (building of evaluation log is expensive, so it is skipped when info level logging is turned off).
Bug fixes:
- Hook event handlers which close over the client instance should not prevent the client from being collected by the GC when user has no more references to the client instance. (configcat/common-js#97)
- Prevent potential issues with weak references when awaiting
IConfigCatClient.waitForReady
. Also, make observable if the initial cache sync-up fails.
Breaking changes (listed in the order of expected impact):
- Rename the
matchedEvaluationRule
property tomatchedTargetingRule
and thematchedEvaluationPercentageRule
property tomatchedPercentageOption
inIEvaluationDetails
. - Throw
Error
when the SDK key passed toConfigCatProvider
is in invalid format (unless the client is set up to use local-only flag override behavior). - Remove the deprecated
ClientReadyState
enum (it was renamed toClientCacheState
). - Change config model (
IConfig
and related interfaces/enums). - Slightly change the behavior of the
ClientReady
hook in Auto Poll mode to fire after the completion of the first fetch operation - regardless of success or failure - to make the behavior consistent with other SDKs. (configcat/common-js#94)
v10.1.1
v10.1.0
New features and improvements:
- Provide a way to synchronously evaluate of feature flags/settings: consumers can create a snapshot of the client by
IConfigCatClient.snapshot()
, which captures the client's state (including the latest config fetched), then, using the returned object, they can execute synchronous evaluation operations. - Add a state parameter to the
clientReady
hook, by means of which consumers can get information about the initialization state of the client. - Minor performance improvements.
Bug fixes:
- Fix error logging of
getValueAsync
/getValueDetailsAsync
calls. - Fix JSDoc documentation of
Comparator.Contains/NotContains
.
v10.0.1
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.maxInitWaitTimeSeconds
andILazyLoadingOptions.cacheTimeToLiveSeconds
settings are in the valid range. (Also, make infinite init wait possible in the case of Auto Polling.) - Fix
... is not a function
bug which can occur in Auto Polling mode, whenIAutoPollOptions.maxInitWaitTimeSeconds
is set to 0.
Breaking changes (listed in the order of expected impact):
- Remove the
createClient
,createClientWithAutoPoll
,createClientWithManualPoll
andcreateClientWithLazyLoad
factory functions. Alternative:getClient
. - Remove all callback-style evaluation methods (e.g.
getValue
,getValueDetails
, etc.) fromIConfigCatClient
. Alternative:get*Async(...).then(result => ...)
- Remove the callback-style
forceRefresh
method fromIConfigCatClient
. Alternative:forceRefreshAsync(...).then(result => ...)
- Remove the
IAutoPollOptions.configChanged
callback. Alternative:options.setupHooks = hooks => hooks.on("configChanged", ...)
. - Changes the type of the
newConfig
argument fromProjectConfig
toIConfig
in theconfigChanged
hook. - Remove the
debug
,info
,warn
anderror
methods fromIConfigCatLogger
and change the signature of thelog
method, which is now the single method that needs to be implemented for custom logging. - Remove the
ICache
interface. Alternative:IConfigCatCache
. - Remove the
getVariationIdAsync
andgetAllVariationIdsAsync
methods fromIConfigCatClient
/ConfigCatClient
. Alternative:getValueDetailsAsync
andgetAllValueDetailsAsync
. - Slightly change the behavior of flag overrides so default value is returned instead of an unsupported value.
- Slightly change the behavior of
getValuesAsync
andgetValuesDetailsAsync
to fail early with exception when these methods are called with invalid parameters:Error
whenkey
is empty.TypeError
whendefaultValue
is not of an allowed type (string
,boolean
,number
,null
andundefined
).
- Remove the
IOverrideDataSource
interface and theFlagOverrides
andMapOverrideDataSource
classes from the public API. - Remove the
ProjectConfig
,RolloutRule
andRolloutPercentageItem
classes from the public API. - Change the type of the
MatchedEvaluationRule
toITargetingRule
andMatchedEvaluationPercentageRule
toIPercentageOption
inIEvaluationDetails
. - Change the algorithm used to generate the config cache key and the format of the cache payload.