launchdarkly-node-client-sdk 2.0.0 → 2.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/package.json +4 -5
package/CHANGELOG.md CHANGED
@@ -2,6 +2,40 @@
2
2
 
3
3
  All notable changes to the LaunchDarkly Client-Side SDK for Node.js will be documented in this file.
4
4
 
5
+ ## [2.0.2] - 2022-03-10
6
+ ### Fixed:
7
+ - Removed a transitive dependency on the package `url-parse`, which was flagged in [CVE-2022-0686](https://nvd.nist.gov/vuln/detail/CVE-2022-0686).
8
+
9
+ ## [2.0.1] - 2022-02-17
10
+ ### Fixed:
11
+ - 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.
12
+
13
+ ## [2.0.0] - 2022-01-26
14
+ This major version release is for updating Node.js compatibility, simplifying the SDK's dependencies, and removing deprecated names.
15
+
16
+ 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](https://docs.launchdarkly.com/sdk/client-side/node-js/migration-1-to-2).
17
+
18
+ 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](https://launchdarkly.com/policies/end-of-life-policy/) regarding platform version support.
19
+
20
+ Simplifying dependencies reduces the size of the SDK bundle, as well as reducing potential compatibility problems and vulnerabilities.
21
+
22
+ ### Added:
23
+ - Added `basicLogger`, allowing customization of the SDK's default logging behavior without having to use Winston or provide a full `LDLogger` implementation.
24
+
25
+ ### Changed:
26
+ - The minimum Node.js version is now 12.0.
27
+ - Updated dependencies to newer versions and/or more actively maintained packages.
28
+ - 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.
29
+
30
+ ### Fixed:
31
+ - 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.
32
+
33
+ ### Removed:
34
+ - Removed the dependency on [Winston](https://www.npmjs.com/package/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.
35
+ - Removed `createConsoleLogger`, which is replaced by the more flexible `basicLogger`.
36
+ - Removed the type `NonNullableLDEvaluationReason`, which was a side effect of `LDEvaluationDetail.reason` being incorrectly defined before.
37
+ - Removed all types, properties, and functions that were deprecated as of the last 1.x release.
38
+
5
39
  ## [1.5.2] - 2021-06-10
6
40
  ### Fixed:
7
41
  - Events for the [LaunchDarkly debugger](https://docs.launchdarkly.com/home/flags/debugger) are now properly pre-processed to omit private user attributes, as well as enforce only expected top level attributes are sent.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "launchdarkly-node-client-sdk",
3
- "version": "2.0.0",
3
+ "version": "2.0.3",
4
4
  "description": "LaunchDarkly Client-Side SDK for Node.js",
5
5
  "author": "LaunchDarkly <team@launchdarkly.com>",
6
6
  "license": "Apache-2.0",
@@ -45,10 +45,9 @@
45
45
  "typescript": "^3.8.3"
46
46
  },
47
47
  "dependencies": {
48
- "launchdarkly-eventsource": "1.4.2",
49
- "launchdarkly-js-sdk-common": "4.0.2",
50
- "node-localstorage": "^1.3.1",
51
- "original": "^1.0.0"
48
+ "launchdarkly-eventsource": "1.4.3",
49
+ "launchdarkly-js-sdk-common": "4.0.3",
50
+ "node-localstorage": "^1.3.1"
52
51
  },
53
52
  "repository": {
54
53
  "type": "git",