- Update
dist/
files correctly
- Clients are now able to perform and upsert operation
CU
(create and update) viaRecordHandler.setData
. This allows writing to records while not subscribed to them locally
- Heartbeat timeout now emits the reconnect event
- Calling login() with a callback (but no auth data) now behaves as you would expect.
- Fix issue where client did not emit
MAX_RECONNECTION_ATTEMPTS_REACHED
event by @rbarroetavena.
- Tightened up typescript callback interfaces by @EnigmaCurry
- Using main file as
dist/deepstream.js
oversrc/client.js
- Write acks now called with a failure message if connection is down by [@Erik Karlsson](@Erik Karlsson)
- Write acks now called with null if value hasn't changed by [@Erik Karlsson](@Erik Karlsson)
- Linting / Babel support
- Improved a few typescript bindings by @EnigmaCurry
- Changed heartbeat missed message to include time
- Setting anonymous record with same name no longer discards and resubscribes the record
- Invalid remote wins merge conflicts
- Prevent records from being set with scalar values by @datasage
- Prevent bad login message from constantly attempting to reconnect by @datasage
- RecordHandler invalid destroy state emitted an error instead of using client._$onError
- heartbeat missed should close connection #324
- optimized json-path patch #329
- TypeScript typings #283 and #338
- Added support for non-NaNish base 16 numbers in jsonpath #328
- There is now a single ack timeout registry for the client, shared between all handlers. This means that ack timeouts are cleared when the connection is lost and don't occur when the connection is not open #342
- Fixed the generated dist release files
- Record write acknowledgement. Records are now able to be set with an optional callback which will be called with any errors from storing the record in cache/storage #290
- Additional tests around presence and records #284 and #285
- Allow passing of node socket options into constructor #289
- Fix bug in JSON path when updating nested null values #281
- Adding check for undefined entries in single notifier #291
- Added support for the deepstream
presence
API, enabling querying and subscribing to who is online within a cluster. For example:ds.presence.getAll((users) => { users.forEach((username) => { console.log(`${username} is online`) }) }) ds.presence.subscribe((username, loggedIn) => { if (loggedIn) { console.log(`${username} has logged in`) } else { console.log(`${username} has logged out`) } })
- Added heartbeats over WebSocket connection
- Presence has been added to query and subscribe to who is online with the cluster
- E2E tests refactored
- Supports deepstream.io v2.0.0+ only
- Changed format of RPC request ACK messages to be more consistent with the rest of the specs #408
- We now depend only on browser/node.js WebSockets, removing support for TCP and engine.io
- Support for webRTC has been removed
- Connection errors now occur on the CONNECTION topic
- Message denied clears down associated ACK timeout messages
- Optimize and refactor records by @ronag
- Porting over remaining e2e tests
- Adding specs as part of the client project and build
add a third argument for the listen callback (client.record.listen
and client.event.listen
) which contains
an object which two functions (accept
and reject
). One of these functions needs to be called otherwise you
will get a deprecated message. #203 #212
This enhancements fixes some issues like #74 #155 #170
Records supports now a boolean flag (record.hasProvider
) which indicates whether a listener has accepted providing data. You can also subscribe to event which is triggered when the flag changes:
record.on('hasProviderChanged', hasProvider => {
/* do something */
})
API checks are now in place that throw an error if you provide the incorrect argument amount or types #207 by @ronag
Gherkin tests are now used for E2E testing, allowing e2e tests to be run against any language rather than just node, and allows writing more scenarios much easier
- allow do create and discard the same record in a synchronous loop #167
- record snapshots are not waiting for
isReady
#140 - record subscriptions are not waiting for
isReady
in combination withtriggerNow
#138 - broken unsubscribe due to wrong internal argument delegation #190
- Terminate unauthenticated connections after a timeout #226
- Fixed issue where deleted record was not getting removed
Users can now set a global and per record merge strategy. This allows the application to respond to VERSION_EXISTS
and use a REMOTE_WINS
, LOCAL_WINS
or a custom merge strategy
Global:
const client = deepstream( 'localhost:6020', {
mergeStrategy: deepstream.MERGE_STRATEGIES.REMOTE_WINS
});
Local:
const record = client.record.getRecord( 'user/1' )
record.setMergeStrategy( ( record, remoteValue, remoteVersion, callback ) => {
callback( null, remoteValue )
} )
deepstream protocol now has a connection establishment handshake that allows the client to be redirected to another deepstream before requesting/publishing data
Users can now delete content within records by setting it to undefined
record.set( path, undefined )
Client size bundle has been reduced by not including mocks for the tcp connection
Record discards and deletes now get called after when ready, which makes the API cleaner
Before:
record = client.record.getRecord( 'user1' )
record.set( 'name', 'bob' )
record.onReady( () => {
record.discard()
})
Now:
record = client.record.getRecord( 'user1' )
record
.set( 'name', 'bob' )
.discard()
You can now access constants on deepstream
// on the constructor
const C = deepstream.CONSTANTS;
// and instance
const client = deepstream( 'localhost:6020' )
CONST C = client.CONSTANTS;
The login callback now only takes two arguments instead of three. This is to make it easier for the user to send their own custom data from an authentication hander or when using the http authentication handler
client.login( {}, ( success, data ) => {
if( success ) {
// data is meta data associated with user session
// or null
} else {
// data is error message or custom error object
// with reason why or null
}
} )
We now use deepstream
instead of engine.io
as the default engineio path
-
Login after logout doesn't overide auth parameters #88
-
Deepstream not updating object properties #96 ( @drsirmrpresidentfathercharles )