flagsmith-js-client icon indicating copy to clipboard operation
flagsmith-js-client copied to clipboard

feat!: Support transient identities and traits

Open khvn26 opened this issue 1 year ago • 4 comments

Closes #236.

khvn26 avatar Jul 19 '24 17:07 khvn26

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 avatar Jul 19 '24 18:07 kyle-ssg

@kyle-ssg I've added:

  • Fetch mocks, as discussed in Slack.
  • Tests to ensure proper getFlags behaviour.
  • A test to ensure that the client preserves transient traits correctly.

khvn26 avatar Jul 23 '24 17:07 khvn26

Rewrote the implementation keeping existing interfaces intact and adding support for the evaluationContext: EvaluationContext configuration entry.

khvn26 avatar Aug 06 '24 21:08 khvn26

As discussed offline, added transiency support to identify, setTrait and setTraits interfaces.

khvn26 avatar Aug 08 '24 18:08 khvn26