Skip to content

Releases: configcat/js-sdk

v9.6.0

26 May 16:07
53bcc68
Compare
Choose a tag to compare

Improvements:

  • Include the SDK Key in log message of error 1100 ("Your SDK Key seems to be wrong...") (configcat/common-js#112)
  • Mask SDK Key (keep only the last 6 characters visible) when writing it to the log.
  • If available, use monitonic clock (performance.now) instead of system clock (new Date()) for scheduling poll iterations in Auto Polling mode for improved precision and resistance to system clock adjustments (time sync, user initiated clock adjustments, etc.)
  • Correct the internal cache refresh behavior in offline mode: if the client uses an external cache, a synchronization should happen in every case where a fetch operation would happen in online mode. (For example, in Auto Polling mode, the background polling loop should sync with the external cache even when it doesn't initiate config fetch operations.)
  • Eliminate race condition between concurrent cache synchronizations.
  • Emit configChanged once per config refresh operation, eliminate race conditions around cache write, and improve performance in high concurrency situations by deduplicating config refresh instead of config fetch operation only.
  • Correct the intellisense docs for some config caching/refreshing-related APIs.

Bug fixes:

  • Fix a bug that causes an error when user-provided logger, config cache, etc. implementation contains a circular reference. (configcat/common-js#111, configcat/common-js#112)
  • Fix a minor bug in setting type mismatch check. (Type mismatch should also be reported for allowed flag override values.)
  • Fix a minor bug in formatting errors. (Some JS runtimes doesn't include the error message in the stack trace.)
  • Fix a minor bug in FetchError. (Name property should be set to the class name.)

Breaking changes:

  • Change forceRefreshAsync to report failure and log a warning in offline mode only when the client is not configured to use an external cache. (Very low impact expected.) (configcat/common-js#112)
  • Make the clientReady event consistent with other SDKs in Auto Polling mode. When the client is offline, clientReady is emitted as soon as the initial sync with the external cache completes. (Low impact expected.)
  • Make changes to also emit the configChanged event when the local cache is updated as a result of synchronization with the external cache. (Low impact expected.)

v9.5.1

06 Sep 15:59
135f691
Compare
Choose a tag to compare

Improvements:

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.

v9.5.0

21 Mar 12:23
b899eee
Compare
Choose a tag to compare

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.)

v9.4.0

16 Jan 16:50
fa8ded4
Compare
Choose a tag to compare

New features/improvements:

  • Add an optional parameter named watchChanges to createFlagOverridesFromMap 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 of configcat-common changes. (#93)

v9.3.0

09 Jan 11:21
6f98582
Compare
Choose a tag to compare

Improvements:

  • Upgrade to configcat-common v9.1.0.
  • Upon client initialization test for the availability of the local storage and use LocalStorageCache only if it's available. Otherwise, use the default (in-memory) cache implementation.
  • Don't swallow exceptions which are thrown in the LocalStorageCache.get/set methods so the outer exception handlers can catch and log them.

v9.2.0

27 Dec 10:50
662179e
Compare
Choose a tag to compare

Sending the eTag as a query parameter to handle the rare cases when the browser is not sending the If-None-Match header automatically. This change can significantly reduce the network traffic in some cases while still not sending a CORS preflight request.

v9.1.0

20 Dec 16:34
f63c32d
Compare
Choose a tag to compare

Fixed a cache issue with non Latin 1 characters in the config.json.

v9.0.0

24 Nov 15:18
630d1d5
Compare
Choose a tag to compare

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 to matchedTargetingRule and the matchedEvaluationPercentageRule property to matchedPercentageOption in IEvaluationDetails.
  • Throw Error when the SDK key passed to ConfigCatClient.get 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 to ClientCacheState).
  • 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)

v8.1.1

04 Aug 17:07
a4e4583
Compare
Choose a tag to compare

Improvements:

  • For better compatibility, restrict the TypeScript language features used to those which are available in v4.0 by downgrading the TypeScript compiler version.

v8.1.0

26 Jul 15:06
4a16a39
Compare
Choose a tag to compare

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.