@nxtedition/deepstream.io-client-js 25.6.4 → 25.6.5

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.6.4",
3
+ "version": "25.6.5",
4
4
  "description": "the javascript client for deepstream.io",
5
5
  "homepage": "http://deepstream.io",
6
6
  "type": "module",
@@ -5,8 +5,8 @@ import * as C from '../constants/constants.js'
5
5
  import FixedQueue from '../utils/fixed-queue.js'
6
6
  import Emitter from 'component-emitter2'
7
7
  import pkg from '../../package.json' with { type: 'json' }
8
+ import NodeWebSocket from 'ws'
8
9
 
9
- let NodeWebSocket = null
10
10
  const BrowserWebSocket = globalThis.WebSocket || globalThis.MozWebSocket
11
11
 
12
12
  export default function Connection(client, url, options) {
@@ -91,16 +91,6 @@ Connection.prototype.close = function () {
91
91
 
92
92
  Connection.prototype._createEndpoint = function () {
93
93
  if (utils.isNode) {
94
- // This is a hack to avoid top-level await
95
- // const HASHER = await xxhash()
96
- if (!NodeWebSocket) {
97
- import('ws').then(({ default: WebSocket }) => {
98
- NodeWebSocket = WebSocket
99
- this._createEndpoint()
100
- })
101
- return
102
- }
103
-
104
94
  this._endpoint = new NodeWebSocket(this._url, {
105
95
  generateMask() {},
106
96
  })