Releases: launchdarkly/node-client-sdk
2.1.0
[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
[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
, andeventsUrl
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
[2.0.3] - 2022-03-14
Fixed:
- The
original
dependency (and therefore its transitive dependencyurl-parse
) had accidentally been included twice, once as a dependency ofjs-eventsource
and then again directly in the SDK'spackage.json
. This has been removed so there is no longer any reference to the vulnerableurl-parse
that was meant to be removed in 2.0.2. (Thanks, AlexHladin!)
2.0.2
[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
[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 noerror
event listeners, it is logged. Previously, the error would be thrown as an unhandled exception.
2.0.0
[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 fullLDLogger
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 ofLDEvaluationReason | 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 flexiblebasicLogger
. - Removed the type
NonNullableLDEvaluationReason
, which was a side effect ofLDEvaluationDetail.reason
being incorrectly defined before. - Removed all types, properties, and functions that were deprecated as of the last 1.x release.
1.5.2
[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
[1.5.1] - 2021-04-01
Fixed:
- The property
LDOptions.inlineUsersInEvents
was not included in the TypeScript definitions.
1.5.0
[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 theidentify
method; by passingautoAliasingOptOut: 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
[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 isnull
ifLDOptions.evaluationReasons
is false.