v6.0.0
What's Changed
BREAKING CHANGES
Flagsmith.environmentwas removed. UsegetEnvironmentinstead. This returns a Promise, and not a reference to the environment which could be uninitialised.onEnvironmentChangehandlers can now be invoked with anundefinedenvironment if an error occurred.- The
Flagsmithclient 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
requestRetryDelayMillisecondswhich 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
getEnvironmentmethod which returns the SDK's current local environment state as a Promise.
Bug fixes
getIdentityFlagsnow uses any provided default flag handler if it fails, instead of just returning an error.- Setting
environmentRefreshIntervalto0now prevents any environment polling from happening. - Fixed a bug where if the SDK initially failed to fetch the environment document, then
getIdentityFlagswould always fail with an error even if the environment was later fetched successfully (#177).
Full Changelog: v5.1.1...v6.0.0