Skip to content

Releases: Flagsmith/flagsmith-js-client

3.18.2 - Adds Datadog RUM

20 Mar 09:23
225effe
Compare
Choose a tag to compare

This release adds an integration to Datadog RUM, it focuses on the new experimental feature_flags feature, you can read more about it here https://docs.datadoghq.com/real_user_monitoring/guide/setup-feature-flag-data-collection/?tab=npm.

This will track remote config and feature enabled states as feature flags in the following format

flagsmith_value_<FEATURE_NAME> // remote config
flagsmith_enabled_<FEATURE_NAME> // enabled state

Additionally, the integration will also store Flagsmith traits against the Datadog user in the following format:

flagsmith_trait_<FEATURE_NAME> // remote config

You can find an example of this integration here.

3.18.1 - Realtime features

20 Mar 08:57
42ae0fd
Compare
Choose a tag to compare

This release adds a stable implementation of realtime features and is used on app.flagsmith.com.

Flagsmith projects that are opted into realtime are able to enable realtime within flagsmith.init as {realtime: true}, this will instruct the SDK to connect to our realtime SSE endpoint to receive feature updates from the environment and segment overrides.

3.16.0 - Always send an Error object to onError

30 Jan 10:16
Compare
Choose a tag to compare

Closes #93. This aims to make the type of onError more predictable by always sending it as an Error object. Thank you to @gfrancischini for the sensible suggestion!

3.15.1 - Fix Promise return from setTrait(s)

19 Dec 15:27
Compare
Choose a tag to compare

Prior to this release, setTrait(s) calls were not returning a promise, they will now resolve when the API returns a new set of flags.

3.15.0 - Unify and improve setTrait / setTraits calls

19 Dec 15:21
Compare
Choose a tag to compare
  • Calls to setTrait/setTraits now only hit 1 endpoint, previously they hit 2.
  • The behaviour of setTrait now matches setTraits, prior to this you could not delete a trait via flagsmith.setTrait("trait",null). Also, this prevents an issue where segment flags were sometimes not returned in response to setting a trait.

3.14.1 - React fix: initialise flagsmith with serverState if provided

14 Nov 12:10
Compare
Choose a tag to compare

Prior to this release, there were cases where flags provided by serverState are cleared, potentially effecting the isomorphic client (e.g. Next.js applications). This is because <ReactProvider/> initialises Flagsmith internally after server state is set.

This change makes sure that Flagsmith is initialises with the server state so that the state is preserved.

3.14.0 - Reduce bundle size

09 Nov 09:51
Compare
Choose a tag to compare

This release reduces the bundle size (31kb -> 21kb Pre GZIP) of the core SDK, it does so by patching one of our only dependencies (@callstack/async-storage) to export just the functions we need and remove the dependency of lodash.

image

3.13.1 - fix IFlagsmithFeature type

09 Nov 09:30
Compare
Choose a tag to compare

3.13.0 - Fix race condition with useFlags

27 Oct 12:51
9511561
Compare
Choose a tag to compare

Prior to this release, there were cases where useFlags was not updating flags when the Flagsmith cache was received. This was down to event listeners not being initialised prior to the cache being accessed.

3.12.0 - fix fallback usage on null flags

27 Oct 09:10
Compare
Choose a tag to compare

A few releases ago we added the ability to automatically parse JSON in flagsmith.getValue. Since null is parseable by JSON.parse, the fallback was not being used in a lot of cases. Now, the client will ignore null flag values and use the fallback.

  const json = flagsmith.getValue<{foo: string|null, bar: string|null}>("json_value", {
      json: true,
      fallback: {foo:null,bar:null}
  });
  // if the value is null, json before this release would be null