This repository was archived by the owner on May 30, 2024. It is now read-only.
5.9.2
[5.9.2] - 2019-10-23
Changed:
- Event listeners for
updateevents were receiving an entire flag configuration object as an argument. This was not useful for applications (since the SDK does not provide any way to use such an object directly), and was unsafe since the object was shared with internal code and was mutable. The argument forupdateevents is now an object with only one property,key(the flag key). - The CI build will now fail if
npm auditdetects any vulnerabilities in the runtime dependencies (not includingdevDependencies). - The CI build now performs code linting.
Fixed:
- There were significant performance bottlenecks due to the use of
setTimeoutto defer callbacks. These have been replaced withsetImmediatefor callbacks into application code, or with direct undeferred callbacks in internal code paths where it is safe to do so. (Thanks, mdgbayly!) - When initializing the client, if it gets an HTTP error or network error that is considered retryable (as opposed to for instance a 401 error, which will not be retried), it should not reject the
waitForInitializationpromise and should not emit anerrorevent. (#155) - Fixed some rule matching behavior for consistency with the other SDKs: string operators such as
startsWithshould only be able to match if both values are strings; numeric operators such aslessThanshould only be able to match if both values are numbers; strings should only be usable as date/time values if they match RFC3339 format; and invalid regexes should simply cause a non-match, rather than an error. - Previously, an
updateevent would only be triggered for a flag if that flag's configuration were changed directly; it did not take into account indirect changes that could affect a flag's value, such as a change to one of its prerequisite flags or to a user segment that it references. This has been fixed so that any change potentially affecting a flag's value will produce anupdateevent for that flag. - The TypeScript declaration for
LDFeatureStore.upsert()was wrong. (Thanks, JakeGinnivan!) - Removed an unused dependency on the deprecated package
hoek. (#158) - Updated the dependency on
semver. (Thanks, mmcgahan!) - Fixed various dependency versions that were flagged as vulnerable by
npm audit.