Skip to content

Commit 4da5d4a

Browse files
author
Michael Ng
authored
Merge branch 'master' into james/custom_condition_evaluators_OG
2 parents 0eeb31d + bd49de0 commit 4da5d4a

File tree

18 files changed

+102
-45
lines changed

18 files changed

+102
-45
lines changed

packages/datafile-manager/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
77
## [Unreleased]
88
Changes that have landed but are not yet released.
99

10+
## [0.4.0] - June 12, 2019
11+
12+
### Changed
13+
- Changed name of top-level exports in index.node.ts and index.browser.ts from `DatafileManager` to `HttpPollingDatafileManager`, to avoid name conflict with `DatafileManager` interface
14+
1015
## [0.3.0] - May 13, 2019
1116

1217
### New Features

packages/datafile-manager/__test__/httpPollingDatafileManager.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
import HTTPPollingDatafileManager from '../src/httpPollingDatafileManager'
17+
import HttpPollingDatafileManager from '../src/httpPollingDatafileManager'
1818
import { Headers, AbortableRequest, Response } from '../src/http'
1919
import { DatafileManagerConfig } from '../src/datafileManager';
2020
import { advanceTimersByTime, getTimerCount } from './testUtils'
@@ -34,7 +34,7 @@ import BackoffController from '../src/backoffController'
3434

3535
// Test implementation:
3636
// - Does not make any real requests: just resolves with queued responses (tests push onto queuedResponses)
37-
class TestDatafileManager extends HTTPPollingDatafileManager {
37+
class TestDatafileManager extends HttpPollingDatafileManager {
3838
queuedResponses: (Response | Error)[] = []
3939

4040
responsePromises: Promise<Response>[] = []

packages/datafile-manager/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@optimizely/js-sdk-datafile-manager",
3-
"version": "0.3.0",
3+
"version": "0.4.0",
44
"description": "Optimizely Full Stack Datafile Manager",
55
"license": "Apache-2.0",
66
"engines": {

packages/datafile-manager/src/httpPollingDatafileManager.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ function isSuccessStatusCode(statusCode: number): boolean {
3434
return statusCode >= 200 && statusCode < 400
3535
}
3636

37-
export default abstract class HTTPPollingDatafileManager implements DatafileManager {
37+
export default abstract class HttpPollingDatafileManager implements DatafileManager {
3838
// Make an HTTP get request to the given URL with the given headers
3939
// Return an AbortableRequest, which has a promise for a Response.
4040
// If we can't get a response, the promise is rejected.
@@ -208,7 +208,7 @@ export default abstract class HTTPPollingDatafileManager implements DatafileMana
208208
}
209209
}
210210

211-
private onRequestComplete(this: HTTPPollingDatafileManager): void {
211+
private onRequestComplete(this: HttpPollingDatafileManager): void {
212212
if (!this.isStarted) {
213213
return
214214
}

packages/datafile-manager/src/index.browser.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@
1515
*/
1616

1717
export * from './datafileManager'
18-
export { default as DatafileManager } from './browserDatafileManager'
18+
export { default as HttpPollingDatafileManager } from './browserDatafileManager'
1919
export { default as StaticDatafileManager } from './staticDatafileManager';

packages/datafile-manager/src/index.node.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@
1515
*/
1616

1717
export * from './datafileManager'
18-
export { default as DatafileManager } from './nodeDatafileManager'
18+
export { default as HttpPollingDatafileManager } from './nodeDatafileManager'
1919
export { default as StaticDatafileManager } from './staticDatafileManager';

packages/event-processor/CHANGELOG.MD

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
77
## [Unreleased]
88
Changes that have landed but are not yet released.
99

10+
## [0.2.1] - June 6, 2019
11+
12+
- Wrap the `callback` in `try/catch` when implementing a custom `eventDispatcher`. This ensures invoking the `callback` will always cleanup any pending retry tasks.
13+
1014
## [0.2.0] - March 27, 2019
1115

1216
- Add `PendingEventsDispatcher` to wrap another EventDispatcher with retry support for

packages/event-processor/package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/event-processor/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@optimizely/js-sdk-event-processor",
3-
"version": "0.2.0",
3+
"version": "0.2.1",
44
"description": "Optimizely Full Stack Event Processor",
55
"author": "jordangarcia <jordan@optimizely.com>",
66
"homepage": "https://github.com/optimizely/javascript-sdk/tree/master/packages/event-processor",

packages/optimizely-sdk/lib/core/project_config/project_config_manager.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ ProjectConfigManager.prototype.__initialize = function(config) {
125125
if (initialDatafile && this.__configObj) {
126126
datafileManagerConfig.datafile = initialDatafile;
127127
}
128-
this.datafileManager = new datafileManager.DatafileManager(datafileManagerConfig);
128+
this.datafileManager = new datafileManager.HttpPollingDatafileManager(datafileManagerConfig);
129129
this.datafileManager.start();
130130
this.__readyPromise = this.datafileManager.onReady().then(
131131
this.__onDatafileManagerReadyFulfill.bind(this),

0 commit comments

Comments
 (0)