Releases: deepstreamIO/deepstream.io-client-js
v2.0.0
[2.0.0] - 2016-11-18
Features
-
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`) } })
Enhancements
- Added heartbeats over WebSocket connection
- Presence has been added to query and subscribe to who is online with the cluster
- E2E tests refactored
Breaking Changes
- 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
v2.0.0 Release Candidate 1
Enhancements
- Added heartbeats over WebSocket connection
- Presence has been added to query and subscribe to who is online with the cluster
- E2E tests refactored
Breaking Changes
- 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
- Supports deepstream.io v2.0.0+ only
Improved record performance and Improved E2E test suite
Smart Listening
Smart listening, giving you much more granular control over your micro-service infrastructure.
Changelog can be found here
v1.0.2
[1.0.2] - 2016-07-28
Bug Fixes
- 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
Enhancements
Features
- Terminate unauthenticated connections after a timeout #226
v1.0.1
v1.0.0
[1.0.0] - 2016-07-10
Features
Merge Conflict Resolution #4
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 )
} )
Enhancements
Connection Redirects
deepstream protocol now has a connection establishment handshake that allows the client to be redirected to another deepstream before requesting/publishing data
Record deletes #111
Users can now delete content within records by setting it to undefined
record.set( path, undefined )
Reduced client size #75
Client size bundle has been reduced by not including mocks for the tcp connection
Discard/Delete only on ready #94
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()
Exposed Constants
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;
Breaking Changes
Login callback
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
}
} )
EngineIO Default Path
We now use deepstream
instead of engine.io
as the default engineio path
Bug Fixes
v1.0.0-beta.1
The 1.0.0-beta.1 release, introducing merge conflicts and connection redirects.
All changed will go into the 1.0 release notes.
0.5.0
Features
ds.record.has( 'recordName', ( error, hasRecord ) => { })
allows to check if a record exists without creating itds.record.snapshot('recordName', (error, snapshot) => {})
allows for one of requests of record data
Updates
- now using jasmine rather than jasmine-node
version 0.4.3
Added support for webpack