@nxtedition/deepstream.io-client-js 25.1.3 → 26.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nxtedition/deepstream.io-client-js",
3
- "version": "25.1.3",
3
+ "version": "26.0.1",
4
4
  "description": "the javascript client for deepstream.io",
5
5
  "homepage": "http://deepstream.io",
6
6
  "type": "module",
@@ -161,7 +161,7 @@ Connection.prototype._sendAuthParams = function () {
161
161
  this._setState(C.CONNECTION_STATE.AUTHENTICATING)
162
162
  const authMessage = messageBuilder.getMsg(C.TOPIC.AUTH, C.ACTIONS.REQUEST, [
163
163
  this._authParams,
164
- '25.1.0', // TODO (fix): How to read from package.json?
164
+ '26.0.0', // TODO (fix): How to read from package.json?
165
165
  utils.isNode
166
166
  ? `Node/${process.version}`
167
167
  : globalThis.navigator && globalThis.navigator.userAgent,
@@ -397,7 +397,7 @@ class Record {
397
397
  this._version = nextVersion
398
398
  }
399
399
 
400
- _onUpdate([, version, data]) {
400
+ _onUpdate([, version, data, hasProvider]) {
401
401
  const prevData = this._data
402
402
  const prevVersion = this._version
403
403
  const prevState = this._state
@@ -434,13 +434,13 @@ class Record {
434
434
  this._state = this._version.charAt(0) === 'I' ? C.RECORD_STATE.STALE : C.RECORD_STATE.SERVER
435
435
  }
436
436
 
437
- // if (hasProvider != null ) {
438
- // this._state = convertTyped(hasProvider, this._handler._client)
439
- // ? C.RECORD_STATE.PROVIDER
440
- // : this._version.charAt(0) === 'I'
441
- // ? C.RECORD_STATE.STALE
442
- // : C.RECORD_STATE.SERVER
443
- // }
437
+ if (hasProvider != null) {
438
+ this._state = convertTyped(hasProvider, this._handler._client)
439
+ ? C.RECORD_STATE.PROVIDER
440
+ : this._version.charAt(0) === 'I'
441
+ ? C.RECORD_STATE.STALE
442
+ : C.RECORD_STATE.SERVER
443
+ }
444
444
 
445
445
  if (this._state !== prevState || this._data !== prevData || this._version !== prevVersion) {
446
446
  this._emitUpdate()