flagsmith-js-client
flagsmith-js-client copied to clipboard
feat!: Support transient identities and traits
Closes #236.
Awesome, I can see the tests pass so we must be good on regression. I guess we do need additional tests around this:
- Matching tests setting transient traits in the same way we do normal
- Checking we can cache a mix of transient and non-transient traits
- Checking what happens when we call getFlags after identifying with transient traits (does it still send them over, I guess it should)
@kyle-ssg I've added:
- Fetch mocks, as discussed in Slack.
- Tests to ensure proper
getFlagsbehaviour. - A test to ensure that the client preserves transient traits correctly.
Rewrote the implementation keeping existing interfaces intact and adding support for the evaluationContext: EvaluationContext configuration entry.
As discussed offline, added transiency support to identify, setTrait and setTraits interfaces.