Skip to content

Releases: configcat/common-js

v9.3.1

06 Sep 14:45
d377986
Compare
Choose a tag to compare

Improvements:

  • Make the timing of polling iterations more accurate in Auto Polling mode. (#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). (#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.3.0

21 Mar 11:00
547bc42
Compare
Choose a tag to compare

Improvements:

  • Make naming of UserComparator members consistent. (#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.2.0

15 Jan 15:34
68e2306
Compare
Choose a tag to compare

New features/improvements:

  • Move the createFlagOverridesFromMap function to the configcat-common package to reduce redundancy.
  • Add an optional parameter named watchChanges to createFlagOverridesFromMap which controls whether the client should detect changes to the flag override map after client initialization. (#101)

Notable internal breaking changes:

  • Remove IOverrideDataSource, FlagOverrides (type is still re-exported) and MapOverrideDataSource from package re-exports.

v9.1.0

08 Jan 15:08
1ec2efe
Compare
Choose a tag to compare

Improvements:

  • Don't swallow but log exceptions when config JSON deserialization fails so users can get a clue about what went wrong with the deserialization.
  • Improve the message of log event 1103.
  • Minor code quality improvements.

Bug fixes:

  • Fix getKeyAndValueAsync so it doesn't return an unsupported setting value coming from an invalid flag override.

Breaking changes:

  • Correct the generic parameter constraint of IEvaluationDetails and `SettingKey. (Very low impact expected.)
  • Correct minor errors in the config model type definition. (Very low impact expected.)

Notable internal breaking changes:

  • Move config model enums (SettingType, UserComparator, PrerequisiteFlagComparator, SegmentComparator) into the ConfigJson module.

v9.0.0

24 Nov 13:26
988dbc3
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. (#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. (#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. (#94)

Notable internal breaking changes:

  • Move the User class into a separate module.
  • Change the signature of IRolloutEvaluator.evaluate.

v8.2.0

10 Oct 09:32
b916b83
Compare
Choose a tag to compare

New features and improvements:

  • Add a new property named cacheState to IConfigCatClientSnapshot, which can be used to get information about the "up-to-dateness" of the state captured by the snapshot.
  • Improve initial config cache sync-up: if the client is set up to use a cache strategy whose get operation is synchronous, the sync-up on client construction will also happen synchronously. (As a consequence, in such cases the cacheState property of a snapshot created right after the client instantiation will already reflect the actual cache state.)

Bug fixes:

  • Prevent user application from hanging on exit in Auto Poll mode until maxInitWaitTimeSeconds has passed.
  • Fix typo in the JSDoc documentation.

v8.1.1

04 Aug 15:53
f5f0d5d
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 13:33
e2cec20
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.

v8.0.2

07 Jul 10:47
24a36ab
Compare
Choose a tag to compare

Bug fixes:

  • In browser environments, the configChanged hook was emitted even when the downloaded config JSON wasn't changed.

v8.0.1

23 Jun 15:51
406d749
Compare
Choose a tag to compare

Bug fixes:

  • Fix return value of getAllValues when one or more settings evaluate with error.

Notable internal breaking changes:

  • Change the return type of IRolloutEvaluator.evaluate to IEvaluateResult.