Skip to content

Releases: configcat/node-sdk

v10.0.0

13 Jun 14:51
198fc77

Choose a tag to compare

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.
  • Revise caching of downloaded config data:
    • Change the cache interface (IConfigCatCache, formerly ICache) 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.
  • 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 and ILazyLoadingOptions.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, when IAutoPollOptions.maxInitWaitTimeSeconds is set to 0.

Breaking changes (listed in the order of expected impact):

  • Remove the createClient, createClientWithAutoPoll, createClientWithManualPoll and createClientWithLazyLoad factory functions. Alternative: getClient.
  • Remove all callback-style evaluation methods (e.g. getValue, getValueDetails, etc.) from IConfigCatClient. Alternative: get*Async(...).then(result => ...)
  • Remove the callback-style forceRefresh method from IConfigCatClient. Alternative: forceRefreshAsync(...).then(result => ...)
  • Remove the IAutoPollOptions.configChanged callback. Alternative: options.setupHooks = hooks => hooks.on("configChanged", ...).
  • Changes the type of the newConfig argument from ProjectConfig to IConfig in the configChanged hook.
  • Remove the debug, info, warn and error methods from IConfigCatLogger and change the signature of the log method, which is now the single method that needs to be implemented for custom logging.
  • Remove the ICache interface. Alternative: IConfigCatCache.
  • Remove the getVariationIdAsync and getAllVariationIdsAsync methods from IConfigCatClient/ConfigCatClient. Alternative: getValueDetailsAsync and getAllValueDetailsAsync.
  • Slightly change the behavior of flag overrides so default value is returned instead of an unsupported value.
  • Slightly change the behavior of getValuesAsync and getValuesDetailsAsync to fail early with exception when these methods are called with invalid parameters:
    • Error when key is empty.
    • TypeError when defaultValue is not of an allowed type (string, boolean, number, null and undefined).
  • Remove the IOverrideDataSource interface and the FlagOverrides and MapOverrideDataSource classes from the public API.
  • Remove the ProjectConfig, RolloutRule and RolloutPercentageItem classes from the public API.
  • Change the type of the MatchedEvaluationRule to ITargetingRule and MatchedEvaluationPercentageRule to IPercentageOption in IEvaluationDetails.
  • Change the algorithm used to generate the config cache key and the format of the cache payload.

v9.1.1

21 Mar 10:56
9dfc764

Choose a tag to compare

Fix package dependencies (move eslint-plugin-import from dependencies to devDependencies)

v9.1.0

28 Feb 11:17

Choose a tag to compare

  • Set engine to Node>=14 and engine-strict=true in the package.json
  • Code style fixes

v9.0.0

04 Jan 15:28
508381a

Choose a tag to compare

  • Update library to the new major version (v7.0) of configcat-common. You can find the detailed list of changes here.
  • Re-export all public API types from configcat-common.

v8.0.1

21 Nov 14:40

Choose a tag to compare

Fixed

  • When the flagOverrides was set, the { [name: string]: Setting } map transformation of the remote settings didn't work properly.

v8.0.0

01 Jul 14:41
dd737f6

Choose a tag to compare

  • Removed got and introduced a new way of HTTP handling with the built-in http/https modules

v7.0.0

02 Jun 09:29
7e684e4

Choose a tag to compare

  • Move SDK version to query parameter.

v6.10.0

31 May 15:12
1c44145

Choose a tag to compare

Passing the real SDK version to common-js instead of using common-js version.

v6.9.0

19 May 09:48
0980dca

Choose a tag to compare

  • Export factory function for flag overrides.

v6.8.1

26 Apr 08:11
b24d5b3

Choose a tag to compare

Extensive debug logging to trace down problems with the SDK.