Skip to content

Releases: launchdarkly/js-client-sdk

3.1.3

12 Apr 16:46
Compare
Choose a tag to compare

[3.1.3] - 2023-04-12

Fixed:

  • Fixed an issue that was preventing page view/click events from being sent. (Thanks, seanr-cardless!)

3.1.2

21 Mar 20:29
Compare
Choose a tag to compare

[3.1.2] - 2023-03-21

Changed:

  • Update LDContext to allow for key to be optional. This is used when making an anonymous context with a generated key.

3.1.1

15 Feb 21:20
Compare
Choose a tag to compare

[3.1.1] - 2023-02-15

Changed:

  • Upgrade to js-sdk-common version 5.0.2. This removes usage of optional chaining (?.) to allow for use with older transpilers.

3.1.0

18 Jan 23:49
Compare
Choose a tag to compare

[3.1.0] - 2023-01-18

Changed:

  • Changed event flushing on page close to be based on page visibility. This should increase compatibility with the bfcache.
  • Updated launchdarkly-js-sdk-common to version 5.0.1 for improved documentation generation.

3.0.0

07 Dec 17:03
Compare
Choose a tag to compare

[3.0.0] - 2022-12-07

The latest version of this SDK supports LaunchDarkly's new custom contexts feature. Contexts are an evolution of a previously-existing concept, "users." Contexts let you create targeting rules for feature flags based on a variety of different information, including attributes pertaining to users, organizations, devices, and more. You can even combine contexts to create "multi-contexts."

This feature is only available to members of LaunchDarkly's Early Access Program (EAP). If you're in the EAP, you can use contexts by updating your SDK to the latest version and, if applicable, updating your Relay Proxy. Outdated SDK versions do not support contexts, and will cause unpredictable flag evaluation behavior.

If you are not in the EAP, only use single contexts of kind "user", or continue to use the user type if available. If you try to create contexts, the context will be sent to LaunchDarkly, but any data not related to the user object will be ignored.

For detailed information about this version, please refer to the list below. For information on how to upgrade from the previous version, please read the migration guide.

Added:

  • The types LDContext, LDSingleKindContext, and LDMultiKindContext define the new "context" model.
  • All SDK methods that took an LDUser parameter now take an LDContext. LDUser is now a subset of LDContext, so existing code based on users will still work.

Changed (breaking changes from 3.x):

  • There is no longer such a thing as a secondary meta-attribute that affects percentage rollouts. If you set an attribute with that name in LDContext, it will simply be a custom attribute like any other.
  • Evaluations now treat the anonymous attribute as a simple boolean, with no distinction between a false state and an undefined state.
  • LDClient.getUser has been replaced with LDClient.getContext.
  • privateAttributeNames has been replaced with privateAttributes in LDOptions. Private attributes now allow using attribute references.

Changed (behavioral changes):

  • Analytics event data now uses a new JSON schema due to differences between the context model and the old user model.

Removed:

  • Removed all types, fields, and methods that were deprecated as of the most recent 3.x release.
  • Removed the secondary meta-attribute in LDUser.
  • The alias method no longer exists because alias events are not needed in the new context model.
  • The autoAliasingOptOut and inlineUsersInEvents options no longer exist because they are not relevant in the new context model.

Deprecated:

  • The LDUser object has been deprecated. Support for LDUser is maintained to simplify the upgrade process, but it is recommended to use LDContext in the shape of either LDSingleKindContext or LDMultiKindContext.

2.24.2

20 Oct 22:46
Compare
Choose a tag to compare

[2.24.2] - 2022-10-20

Changed:

  • Updated to js-sdk-common 3.8.2 which includes jitter and backoff for re-connection attempts for streaming connections.

2.24.0

18 Oct 16:51
Compare
Choose a tag to compare

[2.24.0] - 2022-10-18

Changed:

  • Upgrade to js-sdk-common 3.8.1 which added support for Inspectors that can be used for collecting information for monitoring, analytics, and debugging.

2.23.0

05 Oct 17:32
Compare
Choose a tag to compare

[2.23.0] - 2022-10-05

Changed:

  • Updated js-sdk-common version which removed event de-duplication functionality which was made redundant by support of summary events. This will improve the default event behavior when using experimentation.

  • Updated escape-string-regexp to version 4.

  • Updated development dependencies to recent versions.

Deprecated:

  • Deprecated the allowFrequentDuplicateEvents configuration option. Setting the option will no longer have any effect, and it will be removed in a future version.

2.22.1

27 Apr 16:09
Compare
Choose a tag to compare

[2.22.1] - 2022-04-27

This release is functionally identical to the 2.22.0 release. Due to an oversight the release process re-introduced the package-lock.json.

Removed:

  • The package-lock.json file is no longer in source control. As this is a library project, the lockfile never affected application code that used the SDK, but only affected the SDK's CI build. It is preferable for the CI build to refer only to package.json so that it resolves dependencies the same way an application using the SDK would, rather than using pinned dependencies that an application would not use.

2.22.0

26 Apr 19:28
Compare
Choose a tag to compare

[2.22.0] - 2022-04-26

Added:

  • LDOptions.application, for configuration of application metadata that may be used in LaunchDarkly analytics or other product features. This does not affect feature flag evaluations.

Fixed:

  • The baseUrl, streamUrl, and eventsUrl properties now work properly regardless of whether the URL string has a trailing slash. Previously, a trailing slash would cause request URL paths to have double slashes.

Removed:

  • The package-lock.json file is no longer in source control. As this is a library project, the lockfile never affected application code that used the SDK, but only affected the SDK's CI build. It is preferable for the CI build to refer only to package.json so that it resolves dependencies the same way an application using the SDK would, rather than using pinned dependencies that an application would not use.