Skip to content

v6.0.0

Compare
Choose a tag to compare
@rolodato rolodato released this 24 Mar 19:15
· 4 commits to main since this release
b156a2e

What's Changed

BREAKING CHANGES

  • Flagsmith.environment was removed. Use getEnvironment instead. This returns a Promise, and not a reference to the environment which could be uninitialised.
  • onEnvironmentChange handlers can now be invoked with an undefined 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 to 0 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