ConfigCat SDK for JavaScript frontend applications. ConfigCat is a hosted feature flag service: https://configcat.com. Manage feature toggles across frontend, backend, mobile, desktop apps. Alternative to LaunchDarkly. Management app + feature flag SDKs.
MIT License
Bot releases are visible (Hide)
Improvements:
Bug fixes:
Published by adams85 7 months ago
Improvements:
UserComparator
members consistent. (https://github.com/configcat/common-js/pull/102)Bug fixes:
Breaking changes:
UserComparator
members: Is(Not)OneOf
-> TextIs(Not)OneOf
, SensitiveIs(Not)OneOf
-> SensitiveTextIs(Not)OneOf
, (Not)ContainsAnyOf
-> Text(Not)ContainsAnyOf
. (Low impact expected.)Published by adams85 9 months ago
New features/improvements:
watchChanges
to createFlagOverridesFromMap
which controls whether the client should detect changes to the flag override map after client initialization. (https://github.com/configcat/common-js/pull/101)Bug fixes:
configcat-common
to avoid issues in case the "pubternal" API of configcat-common
changes. (https://github.com/configcat/js-sdk/pull/93)Published by adams85 9 months ago
Improvements:
LocalStorageCache
only if it's available. Otherwise, use the default (in-memory) cache implementation.LocalStorageCache.get
/set
methods so the outer exception handlers can catch and log them.Published by laliconfigcat 10 months ago
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.
Published by laliconfigcat 10 months ago
Fixed a cache issue with non Latin 1 characters in the config.json.
Published by adams85 11 months ago
New features and improvements:
Bug fixes:
IConfigCatClient.waitForReady
. Also, make observable if the initial cache sync-up fails.Breaking changes (listed in the order of expected impact):
matchedEvaluationRule
property to matchedTargetingRule
and the matchedEvaluationPercentageRule
property to matchedPercentageOption
in IEvaluationDetails
.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).ClientReadyState
enum (it was renamed to ClientCacheState
).IConfig
and related interfaces/enums).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. (https://github.com/configcat/common-js/pull/94)Published by adams85 about 1 year ago
Improvements:
Published by adams85 about 1 year ago
New features and improvements:
IConfigCatClient.snapshot()
, which captures the client's state (including the latest config fetched), then, using the returned object, they can execute synchronous evaluation operations.clientReady
hook, by means of which consumers can get information about the initialization state of the client.Bug fixes:
getValueAsync
/getValueDetailsAsync
calls.Comparator.Contains/NotContains
.Published by z4kn4fein over 1 year ago
configcat-common
dependency to v8.0.2
.Published by adams85 over 1 year ago
Bug fixes:
getAllValues
when one or more settings evaluate with error.Published by adams85 over 1 year ago
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:
IConfigCatLogger
) to make it easier to write custom implementations/adapters to logger frameworks.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.Bug fixes:
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.)... 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):
createClient
, createClientWithAutoPoll
, createClientWithManualPoll
and createClientWithLazyLoad
factory functions. Alternative: getClient
.getValue
, getValueDetails
, etc.) from IConfigCatClient
. Alternative: get*Async(...).then(result => ...)
forceRefresh
method from IConfigCatClient
. Alternative: forceRefreshAsync(...).then(result => ...)
IAutoPollOptions.configChanged
callback. Alternative: options.setupHooks = hooks => hooks.on("configChanged", ...)
.newConfig
argument from ProjectConfig
to IConfig
in the configChanged
hook.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.ICache
interface. Alternative: IConfigCatCache
.getVariationIdAsync
and getAllVariationIdsAsync
methods from IConfigCatClient
/ConfigCatClient
. Alternative: getValueDetailsAsync
and getAllValueDetailsAsync
.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
).IOverrideDataSource
interface and the FlagOverrides
and MapOverrideDataSource
classes from the public API.ProjectConfig
, RolloutRule
and RolloutPercentageItem
classes from the public API.MatchedEvaluationRule
to ITargetingRule
and MatchedEvaluationPercentageRule
to IPercentageOption
in IEvaluationDetails
.Published by adams85 over 1 year ago
Fix client setup in getClient
to use the correct cache implementation. (Potentially, this will reduce the number of necessary config JSON downloads, so it's highly recommended to upgrade to this version in case you've started to use the new getClient
API).
Published by z4kn4fein almost 2 years ago
flagOverrides
was set, the { [name: string]: Setting }
map transformation of the remote settings didn't work properly.Published by z4kn4fein over 2 years ago
If-None-Match
and If-Modified-Since
headers.Published by laliconfigcat over 2 years ago
Adding polyfill for Object.fromEntries to support older browsers.
Adding tests for multiple browsers with different versions.
Published by laliconfigcat over 2 years ago
Passing the real SDK version to common-js instead of using common-js version.
Published by z4kn4fein over 2 years ago
Published by sigewuzhere over 2 years ago
Updating configcat-common
to latest.