Skip to content

Releases: launchdarkly/node-client-sdk

2.1.0

06 Oct 16:07
Compare
Choose a tag to compare

[2.1.0] - 2022-10-06

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 development dependencies to recent versions.

  • Updated CI builds to current node LTS versions and dropped build support for node 12.

2.0.4

28 Apr 00:16
Compare
Choose a tag to compare

[2.0.4] - 2022-04-27

Changed:

  • CI builds now include a cross-platform test suite implemented in https://github.com/launchdarkly/sdk-test-harness. This covers many test cases that are also implemented in unit tests, but may be extended in the future to ensure consistent behavior across SDKs in other areas.

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.

2.0.3

14 Mar 18:32
Compare
Choose a tag to compare

[2.0.3] - 2022-03-14

Fixed:

  • The original dependency (and therefore its transitive dependency url-parse) had accidentally been included twice, once as a dependency of js-eventsource and then again directly in the SDK's package.json. This has been removed so there is no longer any reference to the vulnerable url-parse that was meant to be removed in 2.0.2. (Thanks, AlexHladin!)

2.0.2

11 Mar 01:43
Compare
Choose a tag to compare

[2.0.2] - 2022-03-10

Fixed:

  • Removed a transitive dependency on the package url-parse, which was flagged in CVE-2022-0686.

2.0.1

17 Feb 21:40
Compare
Choose a tag to compare

[2.0.1] - 2022-02-17

Fixed:

  • If the SDK receives invalid JSON data from a streaming connection (possibly as a result of the connection being cut off), it now uses its regular error-handling logic: the error is emitted as an error event or, if there are no error event listeners, it is logged. Previously, the error would be thrown as an unhandled exception.

2.0.0

26 Jan 21:33
Compare
Choose a tag to compare

[2.0.0] - 2022-01-26

This major version release is for updating Node.js compatibility, simplifying the SDK's dependencies, and removing deprecated names.

Except for the dependency changes described below which may require minor changes in your build, and a minor new logging feature, usage of the SDK has not changed in this release. For more details about changes that may be necessary, see the 1.x to 2.0 migration guide.

Dropping support for obsolete Node.js versions makes it easier to maintain the SDK and keep its dependencies up to date. See LaunchDarkly's End of Life Policy regarding platform version support.

Simplifying dependencies reduces the size of the SDK bundle, as well as reducing potential compatibility problems and vulnerabilities.

Added:

  • Added basicLogger, allowing customization of the SDK's default logging behavior without having to use Winston or provide a full LDLogger implementation.

Changed:

  • The minimum Node.js version is now 12.0.
  • Updated dependencies to newer versions and/or more actively maintained packages.
  • In TypeScript, the property LDEvaluationDetail.reason now has a type of LDEvaluationReason | undefined, which correctly reflects the fact that evaluation reasons may not always be available.

Fixed:

  • If the platform local storage mechanism throws an exception (for instance, if file permissions do not allow the data to be saved), the SDK now correctly catches the exception and logs a message about the failure. It will only log this message once during the lifetime of the SDK client.

Removed:

  • Removed the dependency on Winston. You can still tell the SDK to use a Winston logger instance that you have created, just as before, so this change should not affect any applications that are using Winston. But the SDK no longer uses Winston to create a default logger if the application does not specify a logger; instead, it uses the basicLogger implementation, which uses the same format as the previous default Winston configuration, so again there should be no visible difference.
  • Removed createConsoleLogger, which is replaced by the more flexible basicLogger.
  • Removed the type NonNullableLDEvaluationReason, which was a side effect of LDEvaluationDetail.reason being incorrectly defined before.
  • Removed all types, properties, and functions that were deprecated as of the last 1.x release.

1.5.2

10 Jun 20:14
Compare
Choose a tag to compare

[1.5.2] - 2021-06-10

Fixed:

  • Events for the LaunchDarkly debugger are now properly pre-processed to omit private user attributes, as well as enforce only expected top level attributes are sent.
  • Events for the LaunchDarkly debugger now include the index of the variation responsible for the evaluation result.
  • Updated transitive dependency on the package url-parse due to a vulnerability warning.

1.5.1

01 Apr 19:40
Compare
Choose a tag to compare

[1.5.1] - 2021-04-01

Fixed:

  • The property LDOptions.inlineUsersInEvents was not included in the TypeScript definitions.

1.5.0

27 Jan 19:12
Compare
Choose a tag to compare

[1.5.0] - 2021-01-27

Added:

  • Added the alias method. This method can be used to associate two user objects for analytics purposes. When invoked, this method will queue a new alias event to be sent to LaunchDarkly.
  • Added the autoAliasingOptOut configuration option. This can be used to control the new automatic aliasing behavior of the identify method; by passing autoAliasingOptOut: true, identify will not automatically generate alias events.

Changed:

  • The identify method will now automatically generate an alias event when switching from an anonymous to a known user. This event associates the two users for analytics purposes as they most likely represent a single person.

1.4.7

26 Jan 19:03
Compare
Choose a tag to compare

[1.4.7] - 2021-01-26

Changed:

  • In streaming mode, the SDK now automatically drops and restarts the stream connection if it has received no data from the server within a 5-minute interval. This ensures that if the connection fails in such a way that the SDK cannot detect the failure as an I/O error, it will not hang forever waiting for updates from the phantom connection. The LaunchDarkly streaming service sends a tiny "heartbeat" message at regular intervals less than this timeout, to ensure that the SDK will not drop the connection if it is still usable. This logic exists in most other LaunchDarkly SDKs but was not previously implemented in the Node client-side SDK.

Fixed:

  • In TypeScript, LDEvaluationDetail.reason is now correctly defined as being nullable. This value is null if LDOptions.evaluationReasons is false.