From 90da62bad225c22e32d308dad82fbace7bdc38bc Mon Sep 17 00:00:00 2001 From: Eli Bishop Date: Mon, 7 May 2018 16:16:41 -0700 Subject: [PATCH 1/5] revert adding custom header to event xhr (can't do CORS on that endpoint) --- src/EventProcessor.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/EventProcessor.js b/src/EventProcessor.js index 149f27cc..ac4e07b1 100644 --- a/src/EventProcessor.js +++ b/src/EventProcessor.js @@ -13,7 +13,6 @@ function sendEvents(eventsUrl, events, sync) { if (hasCors) { /* supports cross-domain requests */ xhr.open('GET', src, !sync); - utils.addLDHeaders(xhr); if (!sync) { xhr.addEventListener('load', onDone); From fe10470b7c70be05ad0281ef2dfcf242642012cd Mon Sep 17 00:00:00 2001 From: Eli Bishop Date: Mon, 7 May 2018 16:21:18 -0700 Subject: [PATCH 2/5] rm unit test for custom header --- src/__tests__/EventProcessor-test.js | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/__tests__/EventProcessor-test.js b/src/__tests__/EventProcessor-test.js index 6ce6457f..456883aa 100644 --- a/src/__tests__/EventProcessor-test.js +++ b/src/__tests__/EventProcessor-test.js @@ -66,15 +66,4 @@ describe('EventProcessor', () => { expect(requests.length).toEqual(1); expect(requests[0].async).toEqual(false); }); - - it('should send custom user-agent header', () => { - const processor = EventProcessor('/fake-url', serializer); - const user = { key: 'foo' }; - const event = { kind: 'identify', key: user.key }; - processor.enqueue(event); - processor.flush(user, true); - - expect(requests.length).toEqual(1); - expect(requests[0].requestHeaders['X-LaunchDarkly-User-Agent']).toEqual(utils.getLDUserAgentString()); - }); }); From 5b5d66720f27aae3d29e2b7f18fe76febdf90777 Mon Sep 17 00:00:00 2001 From: Eli Bishop Date: Mon, 7 May 2018 16:24:52 -0700 Subject: [PATCH 3/5] linter fix --- src/__tests__/EventProcessor-test.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/__tests__/EventProcessor-test.js b/src/__tests__/EventProcessor-test.js index 456883aa..9440cbc7 100644 --- a/src/__tests__/EventProcessor-test.js +++ b/src/__tests__/EventProcessor-test.js @@ -2,7 +2,6 @@ import sinon from 'sinon'; import EventSerializer from '../EventSerializer'; import EventProcessor from '../EventProcessor'; -import * as utils from '../utils'; describe('EventProcessor', () => { let sandbox; From 7a3e2a41c532b1534e2c7712e151347a4fe5a056 Mon Sep 17 00:00:00 2001 From: Eli Bishop Date: Mon, 7 May 2018 16:50:20 -0700 Subject: [PATCH 4/5] prepare 1.7.2 release --- CHANGELOG.md | 6 ++++-- package.json | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8dbe7e61..47d27cda 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,10 +3,12 @@ All notable changes to the LaunchDarkly client-side JavaScript SDK will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org). -## [1.7.1] - 2018-05-07 +## [1.7.2] - 2018-05-07 ### Fixed - The client no longer creates an empty `XMLHttpRequest` at startup time (which could interfere with unit tests). -- The client now sends the SDK version to LaunchDarkly; previously it only sent the browser version. This will allow for better usage metrics in a future version of the LaunchDarkly UI. + +## [1.7.1] - 2018-05-07 +''This release was broken and should not be used.'' ## [1.7.0] - 2018-04-27 ### Changed diff --git a/package.json b/package.json index be3e2691..79f51576 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ldclient-js", - "version": "1.7.1", + "version": "1.7.2", "description": "LaunchDarkly SDK for JavaScript", "author": "LaunchDarkly ", "license": "Apache-2.0", From 833af264f80ea2e56ad929d4d464f87400db45ab Mon Sep 17 00:00:00 2001 From: Eli Bishop Date: Mon, 7 May 2018 16:51:11 -0700 Subject: [PATCH 5/5] typo --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 47d27cda..b77fd6c9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,7 @@ This project adheres to [Semantic Versioning](http://semver.org). - The client no longer creates an empty `XMLHttpRequest` at startup time (which could interfere with unit tests). ## [1.7.1] - 2018-05-07 -''This release was broken and should not be used.'' +_This release was broken and should not be used._ ## [1.7.0] - 2018-04-27 ### Changed