Skip to content

Releases: Flagsmith/flagsmith-js-client

9.0.0

15 Jan 17:02
4afc3bf
Compare
Choose a tag to compare

This release removes flagsmith-es and makes the flagsmith npm package both umd and es module compatible. Closes #226

8.0.3

15 Jan 16:23
ffa499d
Compare
Choose a tag to compare

What's Changed

Full Changelog: 8.0.2...8.0.3

8.0.2

02 Jan 18:04
4b5d0f9
Compare
Choose a tag to compare

What's Changed

  • fix: Un-deprecate setTrait, setTraits and identify by @tiagoapolo in #276

New Contributors

Full Changelog: 8.0.1...8.0.2

8.0.1

18 Dec 14:14
8417a31
Compare
Choose a tag to compare

Fixes sourcemaps (#239)
Fixes ReactNode type (#268)
Fixes identifier being removed from context in getFlagsResponse (#262)

8.0.0

18 Dec 11:17
fcf1625
Compare
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
Compare
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
Compare
Choose a tag to compare

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

7.0.0

10 Oct 13:02
e2cfafd
Compare
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
Compare
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
Compare
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
  }
})