Skip to content

Commit 1854450

Browse files
prepare 4.0.2 release (#60)
1 parent 7d7cbcf commit 1854450

File tree

11 files changed

+3
-40
lines changed

11 files changed

+3
-40
lines changed

.eslintrc.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ plugins:
1111
- babel
1212
- prettier
1313
globals:
14-
VERSION: true
1514
describe: true
1615
it: true
1716
expect: true

docs/typedoc.js

Lines changed: 0 additions & 11 deletions
This file was deleted.

jest.config.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,4 @@ module.exports = {
99
transform: {
1010
'^.+\\.js$': 'babel-jest',
1111
},
12-
globals: {
13-
VERSION: version,
14-
},
1512
};

package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@
4040
"launchdarkly-js-test-helpers": "1.1.0",
4141
"prettier": "1.11.1",
4242
"readline-sync": "^1.4.9",
43-
"semver": "^5.5.0",
44-
"semver-compare": "^1.0.0",
4543
"typescript": "~4.4.4"
4644
},
4745
"dependencies": {

src/__tests__/.eslintrc.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
---
22
globals:
3-
VERSION: true
43
sinon: true
54
expect: true
65
requestor: true

src/__tests__/LDClient-test.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import * as LDClient from '../index';
22
import * as messages from '../messages';
33
import * as utils from '../utils';
44

5-
import semverCompare from 'semver-compare';
65
import { eventSink, promisifySingle, sleepAsync, withCloseable, AsyncQueue } from 'launchdarkly-js-test-helpers';
76

87
import { respond, respondJson } from './mockHttp';
@@ -106,13 +105,6 @@ describe('LDClient', () => {
106105
});
107106
});
108107

109-
it('should contain package version', () => {
110-
const version = LDClient.version;
111-
// All client bundles above 1.0.7 should contain package version
112-
const result = semverCompare(version, '1.0.6');
113-
expect(result).toEqual(1);
114-
});
115-
116108
async function verifyCustomHeader(sendLDHeaders, shouldGetHeaders) {
117109
await withServers(async (baseConfig, pollServer) => {
118110
await withClient(user, { ...baseConfig, sendLDHeaders }, async client => {

src/__tests__/utils-test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,11 +120,11 @@ describe('utils', () => {
120120
});
121121

122122
describe('getLDUserAgentString', () => {
123-
it('uses platform user-agent and package version by default', () => {
123+
it('uses platform user-agent and unknown version by default', () => {
124124
const platform = stubPlatform.defaults();
125125
platform.version = undefined;
126126
const ua = getLDUserAgentString(platform);
127-
expect(ua).toEqual('stubClient/' + VERSION);
127+
expect(ua).toEqual('stubClient/?');
128128
});
129129

130130
it('uses platform user-agent and platform version if provided', () => {

src/index.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -760,13 +760,10 @@ function initialize(env, user, specifiedOptions, platform, extraOptionDefs) {
760760
};
761761
}
762762

763-
const version = VERSION;
764-
765763
module.exports = {
766764
initialize,
767765
commonBasicLogger,
768766
errors,
769767
messages,
770768
utils,
771-
version,
772769
};

src/utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ function chunkUserEventsForUrl(maxLength, events) {
146146
}
147147

148148
function getLDUserAgentString(platform) {
149-
const version = platform.version || VERSION;
149+
const version = platform.version || '?';
150150
return platform.userAgent + '/' + version;
151151
}
152152

test-types.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44

55
import * as ld from 'launchdarkly-js-sdk-common';
66

7-
var ver: string = ld.version;
8-
97
var userWithKeyOnly: ld.LDUser = { key: 'user' };
108
var anonUserWithNoKey: ld.LDUser = { anonymous: true };
119
var anonUserWithKey: ld.LDUser = { key: 'anon-user', anonymous: true };

0 commit comments

Comments
 (0)