diff options
Diffstat (limited to 'packages/connect')
-rw-r--r-- | packages/connect/CHANGELOG.json | 12 | ||||
-rw-r--r-- | packages/connect/CHANGELOG.md | 4 | ||||
-rw-r--r-- | packages/connect/package.json | 16 | ||||
-rw-r--r-- | packages/connect/src/http_client.ts | 2 | ||||
-rw-r--r-- | packages/connect/src/utils/type_converters.ts | 6 | ||||
-rw-r--r-- | packages/connect/src/ws_orderbook_channel.ts | 6 | ||||
-rw-r--r-- | packages/connect/test/ws_orderbook_channel_test.ts | 2 |
7 files changed, 31 insertions, 17 deletions
diff --git a/packages/connect/CHANGELOG.json b/packages/connect/CHANGELOG.json index 7b747f167..8ed147e76 100644 --- a/packages/connect/CHANGELOG.json +++ b/packages/connect/CHANGELOG.json @@ -1,10 +1,20 @@ [ { + "timestamp": 1532043000, "version": "1.0.0", "changes": [ { "note": - "Remove WebSocketOrderbookChannel from the public interface and replace with orderbookChannelFactory" + "Remove `WebSocketOrderbookChannel` from the public interface and replace with `orderbookChannelFactory`" + } + ] + }, + { + "timestamp": 1531919263, + "version": "0.6.17", + "changes": [ + { + "note": "Dependencies updated" } ] }, diff --git a/packages/connect/CHANGELOG.md b/packages/connect/CHANGELOG.md index 5ae4cfbe3..acef109e0 100644 --- a/packages/connect/CHANGELOG.md +++ b/packages/connect/CHANGELOG.md @@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only. CHANGELOG +## v0.6.17 - _July 18, 2018_ + + * Dependencies updated + ## v0.6.16 - _July 9, 2018_ * Dependencies updated diff --git a/packages/connect/package.json b/packages/connect/package.json index 343df4031..dfa15c3d8 100644 --- a/packages/connect/package.json +++ b/packages/connect/package.json @@ -1,6 +1,6 @@ { "name": "@0xproject/connect", - "version": "0.6.16", + "version": "1.0.0", "engines": { "node": ">=6.12" }, @@ -51,19 +51,19 @@ }, "homepage": "https://github.com/0xProject/0x-monorepo/packages/connect/README.md", "dependencies": { - "@0xproject/assert": "^0.2.13", - "@0xproject/json-schemas": "0.8.2", + "@0xproject/assert": "^0.2.14", + "@0xproject/json-schemas": "^0.8.3", "@0xproject/types": "^0.8.2", - "@0xproject/typescript-typings": "^0.4.2", - "@0xproject/utils": "^0.7.2", + "@0xproject/typescript-typings": "^1.0.0", + "@0xproject/utils": "^1.0.0", "lodash": "^4.17.4", "query-string": "^5.0.1", "sinon": "^4.0.0", "websocket": "^1.0.25" }, "devDependencies": { - "@0xproject/monorepo-scripts": "^0.2.2", - "@0xproject/tslint-config": "^0.4.21", + "@0xproject/monorepo-scripts": "^1.0.0", + "@0xproject/tslint-config": "^1.0.0", "@types/fetch-mock": "^5.12.2", "@types/lodash": "4.14.104", "@types/mocha": "^2.2.42", @@ -81,7 +81,7 @@ "npm-run-all": "^4.1.2", "nyc": "^11.0.1", "shx": "^0.2.2", - "tslint": "5.8.0", + "tslint": "5.11.0", "typedoc": "~0.8.0", "typescript": "2.7.1" }, diff --git a/packages/connect/src/http_client.ts b/packages/connect/src/http_client.ts index f3800d581..03cc590e4 100644 --- a/packages/connect/src/http_client.ts +++ b/packages/connect/src/http_client.ts @@ -38,7 +38,7 @@ const OPTS_TO_QUERY_FIELD_MAP = { * that implement the standard relayer API v0 */ export class HttpClient implements Client { - private _apiEndpointUrl: string; + private readonly _apiEndpointUrl: string; /** * Format parameters to be appended to http requests into query string form */ diff --git a/packages/connect/src/utils/type_converters.ts b/packages/connect/src/utils/type_converters.ts index c1808ce8a..210d452b9 100644 --- a/packages/connect/src/utils/type_converters.ts +++ b/packages/connect/src/utils/type_converters.ts @@ -6,12 +6,12 @@ export const typeConverters = { const bids = _.get(orderbook, 'bids', []); const asks = _.get(orderbook, 'asks', []); return { - bids: bids.map((order: any) => this.convertOrderStringFieldsToBigNumber(order)), - asks: asks.map((order: any) => this.convertOrderStringFieldsToBigNumber(order)), + bids: bids.map((order: any) => typeConverters.convertOrderStringFieldsToBigNumber(order)), + asks: asks.map((order: any) => typeConverters.convertOrderStringFieldsToBigNumber(order)), }; }, convertOrderStringFieldsToBigNumber(order: any): any { - return this.convertStringsFieldsToBigNumbers(order, [ + return typeConverters.convertStringsFieldsToBigNumbers(order, [ 'makerTokenAmount', 'takerTokenAmount', 'makerFee', diff --git a/packages/connect/src/ws_orderbook_channel.ts b/packages/connect/src/ws_orderbook_channel.ts index e1c55cce3..fa9f5e37f 100644 --- a/packages/connect/src/ws_orderbook_channel.ts +++ b/packages/connect/src/ws_orderbook_channel.ts @@ -15,9 +15,9 @@ import { orderbookChannelMessageParser } from './utils/orderbook_channel_message * that implements the standard relayer API v0 */ export class WebSocketOrderbookChannel implements OrderbookChannel { - private _client: WebSocket.w3cwebsocket; - private _handler: OrderbookChannelHandler; - private _subscriptionOptsList: OrderbookChannelSubscriptionOpts[] = []; + private readonly _client: WebSocket.w3cwebsocket; + private readonly _handler: OrderbookChannelHandler; + private readonly _subscriptionOptsList: OrderbookChannelSubscriptionOpts[] = []; /** * Instantiates a new WebSocketOrderbookChannel instance * @param client A WebSocket client diff --git a/packages/connect/test/ws_orderbook_channel_test.ts b/packages/connect/test/ws_orderbook_channel_test.ts index fed4f2217..5a63cbdcc 100644 --- a/packages/connect/test/ws_orderbook_channel_test.ts +++ b/packages/connect/test/ws_orderbook_channel_test.ts @@ -29,7 +29,7 @@ describe('WebSocketOrderbookChannel', () => { const websocketUrl = 'ws://localhost:8080'; const openClient = new WebSocket.w3cwebsocket(websocketUrl); Sinon.stub(openClient, 'readyState').get(() => WebSocket.w3cwebsocket.OPEN); - Sinon.stub(openClient, 'send').callsFake(_.noop); + Sinon.stub(openClient, 'send').callsFake(_.noop.bind(_)); const openOrderbookChannel = new WebSocketOrderbookChannel(openClient, emptyOrderbookChannelHandler); const subscriptionOpts = { baseTokenAddress: '0x323b5d4c32345ced77393b3530b1eed0f346429d', |