Releases: Flagsmith/flagsmith-js-client
9.0.0
8.0.3
What's Changed
- chore: typecheck on build by @kyle-ssg in #267
- fix: Unhandled exception when getting value from local storage by @tiagoapolo in #279
- chore: Deprecate flagsmith-es by @kyle-ssg in #281
Full Changelog: 8.0.2...8.0.3
8.0.2
What's Changed
- fix: Un-deprecate
setTrait
,setTraits
andidentify
by @tiagoapolo in #276
New Contributors
- @tiagoapolo made their first contribution in #276
Full Changelog: 8.0.1...8.0.2
8.0.1
8.0.0
What's Changed
- fix: Handle uncaught fetch exception by @frankieyan in #256
- Release 8.0.0 by @matthewelwell in #274
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
- @frankieyan made their first contribution in #256
Full Changelog: 7.0.2...8.0.0
Version 7.0.2
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
Allows flagsmith.setContext({...})
prior to init.
7.0.0
This is a temporary release that reverts the changes in 6.0.0.
What's Changed
- Bump rollup from 2.78.0 to 2.79.2 by @dependabot in #255
- Revert "feat: support multiple environment caching" by @rolodato in #258
Full Changelog: 6.0.0...7.0.0
Version 6.0.0 - Adjust cache keys to be unique per environment
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
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
}
})