launchdarkly-node-client-sdk 2.0.4 → 2.1.0
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.
- package/.circleci/config.yml +4 -13
- package/.eslintrc.yaml +1 -1
- package/.ldrelease/config.yml +1 -1
- package/CHANGELOG.md +7 -0
- package/babel.config.js +12 -0
- package/contract-tests/sdkClientEntity.js +5 -2
- package/package.json +26 -22
- package/.babelrc +0 -16
package/.circleci/config.yml
CHANGED
|
@@ -16,23 +16,14 @@ workflows:
|
|
|
16
16
|
docker-image: cimg/node:current
|
|
17
17
|
run-lint: true
|
|
18
18
|
- build-test-linux:
|
|
19
|
-
name: Node
|
|
20
|
-
docker-image: cimg/node:
|
|
19
|
+
name: Node 18.10
|
|
20
|
+
docker-image: cimg/node:18.10
|
|
21
21
|
- build-test-linux:
|
|
22
22
|
name: Node 16.14
|
|
23
|
-
docker-image: cimg/node:16.
|
|
24
|
-
- build-test-linux:
|
|
25
|
-
name: Node 15.14
|
|
26
|
-
docker-image: cimg/node:15.14
|
|
23
|
+
docker-image: cimg/node:16.17
|
|
27
24
|
- build-test-linux:
|
|
28
25
|
name: Node 14.19
|
|
29
|
-
docker-image: cimg/node:14.
|
|
30
|
-
- build-test-linux:
|
|
31
|
-
name: Node 13.14
|
|
32
|
-
docker-image: cimg/node:13.14
|
|
33
|
-
- build-test-linux:
|
|
34
|
-
name: Node 12.22
|
|
35
|
-
docker-image: cimg/node:12.22
|
|
26
|
+
docker-image: cimg/node:14.20
|
|
36
27
|
- build-test-windows:
|
|
37
28
|
name: Windows
|
|
38
29
|
|
package/.eslintrc.yaml
CHANGED
package/.ldrelease/config.yml
CHANGED
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
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.4] - 2022-04-27
|
|
6
|
+
### Changed:
|
|
7
|
+
- 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.
|
|
8
|
+
|
|
9
|
+
### Fixed:
|
|
10
|
+
- 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.
|
|
11
|
+
|
|
5
12
|
## [2.0.3] - 2022-03-14
|
|
6
13
|
### Fixed:
|
|
7
14
|
- 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](https://github.com/launchdarkly/node-client-sdk/releases/tag/2.0.2). (Thanks, [AlexHladin](https://github.com/launchdarkly/node-client-sdk/pull/26)!)
|
package/babel.config.js
ADDED
|
@@ -77,10 +77,13 @@ async function newSdkClientEntity(options) {
|
|
|
77
77
|
options.configuration.startWaitTimeMs !== null && options.configuration.startWaitTimeMs !== undefined
|
|
78
78
|
? options.configuration.startWaitTimeMs
|
|
79
79
|
: 5000;
|
|
80
|
+
const sdkConfig = makeSdkConfig(options.configuration, options.tag);
|
|
81
|
+
const initialUser = (options.configuration.clientSide && options.configuration.clientSide.initialUser)
|
|
82
|
+
|| makeDefaultInitialUser();
|
|
80
83
|
const client = ld.initialize(
|
|
81
84
|
options.configuration.credential || 'unknown-env-id',
|
|
82
|
-
|
|
83
|
-
|
|
85
|
+
initialUser,
|
|
86
|
+
sdkConfig
|
|
84
87
|
);
|
|
85
88
|
let failed = false;
|
|
86
89
|
try {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "launchdarkly-node-client-sdk",
|
|
3
|
-
"version": "2.0
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"description": "LaunchDarkly Client-Side SDK for Node.js",
|
|
5
5
|
"author": "LaunchDarkly <team@launchdarkly.com>",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -24,27 +24,23 @@
|
|
|
24
24
|
"node": ">= 12.0.0"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@babel/core": "^7.
|
|
28
|
-
"@babel/preset-env": "^7.
|
|
27
|
+
"@babel/core": "^7.19.3",
|
|
28
|
+
"@babel/preset-env": "^7.19.3",
|
|
29
29
|
"@types/node": "^12.12.6",
|
|
30
|
-
"babel-
|
|
31
|
-
"babel-jest": "^
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"eslint": "^
|
|
35
|
-
"eslint-config-
|
|
36
|
-
"eslint-
|
|
37
|
-
"eslint-
|
|
38
|
-
"eslint-plugin-
|
|
39
|
-
"
|
|
40
|
-
"jest": "^
|
|
41
|
-
"jest-junit": "^13.0.0",
|
|
30
|
+
"@babel/eslint-parser": "7.19.1",
|
|
31
|
+
"babel-jest": "^29.1.0",
|
|
32
|
+
"cross-env": "^7.0.3",
|
|
33
|
+
"eslint": "^8.24.0",
|
|
34
|
+
"eslint-config-prettier": "^8.5.0",
|
|
35
|
+
"eslint-config-xo": "^0.42.0",
|
|
36
|
+
"eslint-formatter-pretty": "^4.1.0",
|
|
37
|
+
"eslint-plugin-babel": "^5.3.1",
|
|
38
|
+
"eslint-plugin-prettier": "^4.2.1",
|
|
39
|
+
"jest": "^29.1.1",
|
|
40
|
+
"jest-junit": "^14.0.1",
|
|
42
41
|
"launchdarkly-js-test-helpers": "1.2.1",
|
|
43
|
-
"prettier": "
|
|
44
|
-
"
|
|
45
|
-
"semver": "^5.5.0",
|
|
46
|
-
"semver-compare": "^1.0.0",
|
|
47
|
-
"typescript": "^3.8.3"
|
|
42
|
+
"prettier": "2.7.1",
|
|
43
|
+
"typescript": "^4.8.4"
|
|
48
44
|
},
|
|
49
45
|
"jest": {
|
|
50
46
|
"rootDir": "src",
|
|
@@ -52,7 +48,15 @@
|
|
|
52
48
|
"testMatch": [
|
|
53
49
|
"<rootDir>/**/*-test.js"
|
|
54
50
|
],
|
|
55
|
-
"testResultsProcessor": "jest-junit"
|
|
51
|
+
"testResultsProcessor": "jest-junit",
|
|
52
|
+
"transform": {
|
|
53
|
+
"^.+\\.js$": [
|
|
54
|
+
"babel-jest",
|
|
55
|
+
{
|
|
56
|
+
"rootMode": "upward"
|
|
57
|
+
}
|
|
58
|
+
]
|
|
59
|
+
}
|
|
56
60
|
},
|
|
57
61
|
"jest-junit": {
|
|
58
62
|
"outputDirectory": "./reports/junit",
|
|
@@ -60,7 +64,7 @@
|
|
|
60
64
|
},
|
|
61
65
|
"dependencies": {
|
|
62
66
|
"launchdarkly-eventsource": "1.4.3",
|
|
63
|
-
"launchdarkly-js-sdk-common": "4.
|
|
67
|
+
"launchdarkly-js-sdk-common": "4.2.0",
|
|
64
68
|
"node-localstorage": "^1.3.1"
|
|
65
69
|
},
|
|
66
70
|
"repository": {
|