Skip to content

Releases: Flagsmith/flagsmith-js-client

8.0.0

18 Dec 11:17
fcf1625

Choose a tag to compare

What's Changed

Breaking changes

This release reintroduces the changes originally added in Version 6.0.0. This changes the key used by the flagsmith client for internal storage to allow support for multiple environments. See #252 for further details.

New Contributors

Full Changelog: 7.0.2...8.0.0

Version 7.0.2

05 Nov 09:04
4f4372a

Choose a tag to compare

What's Changed

  • fix: Incorrect argument type, interface extension by @khvn26 in #261
  • fix: Interface extensions are not correct by @khvn26 in #266

Full Changelog: 7.0.1...7.0.2

Version 7.0.1

17 Oct 13:45
a755ff4

Choose a tag to compare

Allows flagsmith.setContext({...}) prior to init.

7.0.0

10 Oct 13:02
e2cfafd

Choose a tag to compare

This is a temporary release that reverts the changes in 6.0.0.

What's Changed

Full Changelog: 6.0.0...7.0.0

Version 6.0.0 - Adjust cache keys to be unique per environment

09 Oct 12:38
8951a32

Choose a tag to compare

Closes #201. The local storage keys for the SDK cache are now unique for each environment. This is being released as a breaking change because, upon upgrading to this version, the cache will be missed the first time due to the previous key ('BULLET_TRAIN_DB') being ignored

Thank you very much for the great PR @oluizcarvalho 🚀

Version 5.0.0 - Support context, transient identities and traits

02 Oct 14:33
3d0e8b8

Choose a tag to compare

Transient traits

This release supports the concept of transient traits, setting this will mean the trait is not stored within Flagsmith and evaluated just in that request.

You can define a trait as transient like so:

setTraits({bar:{value:123, transient: true}})
setTraits({foo:"1", bar:{value:123, transient: true}})
flagsmith.init({
  traits: {foo:"1", bar:{value:123, transient: true}}
})

Contexts and transient identities

This release also deprecates the above calls in favour of setting context. Context allows you to set information as a single object which we may extend in future more easily. We suggest migrating to this soon.

You can set a partial context and it will merge with the one provided during SDK init.

Currently, the full context object looks like this:

flagsmith.setContext({
  {
    environment: {apiKey: "<your environment API key>"},
    identifier: "unique-user-id",
    traits:     {foo:"1", bar:{value:123, transient: true}},
    transient:  false
  }
})

Version 4.1.4

24 Sep 08:50
8d91a1c

Choose a tag to compare

Version 4.1.3

17 Sep 16:35
2f4bbbb

Choose a tag to compare

Closes #250 - thank you @blackjid 🚀

Version 4.1.2

11 Sep 17:02
f2c2964

Choose a tag to compare

Closes #238

Fixes a race condition whereby flag state returns as {} if flagsmith.init resolves after flagsmith.identify

Version 4.1.1

10 Sep 10:33
a030d57

Choose a tag to compare

Solves #242. When calling flagsmith.init with traits they will now be merged with any cached traits.