v6.0.0
What's Changed
BREAKING CHANGES
Flagsmith.environment
was removed. UsegetEnvironment
instead. This returns a Promise, and not a reference to the environment which could be uninitialised.onEnvironmentChange
handlers can now be invoked with anundefined
environment if an error occurred.- The
Flagsmith
client now returns an error if initialised with local evaluation enabled but without a server-side SDK key. Previously, it would log an error and continue.
New features
- Added a new
requestRetryDelayMilliseconds
which controls how long the SDK will wait before retrying any failed HTTP requests. Previously, this was hard-coded to always be 1 second. - Added a
getEnvironment
method which returns the SDK's current local environment state as a Promise.
Bug fixes
getIdentityFlags
now uses any provided default flag handler if it fails, instead of just returning an error.- Setting
environmentRefreshInterval
to0
now prevents any environment polling from happening. - Fixed a bug where if the SDK initially failed to fetch the environment document, then
getIdentityFlags
would always fail with an error even if the environment was later fetched successfully (#177).
Full Changelog: v5.1.1...v6.0.0