Socket
Socket
Sign inDemoInstall

@feathersjs/transport-commons

Package Overview
Dependencies
Maintainers
3
Versions
117
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@feathersjs/transport-commons - npm Package Compare versions

Comparing version 5.0.23 to 5.0.24

6

CHANGELOG.md

@@ -6,2 +6,8 @@ # Change Log

## [5.0.24](https://github.com/feathersjs/feathers/compare/v5.0.23...v5.0.24) (2024-03-13)
### Bug Fixes
- **socketio:** Handle ackTimeout of socket.io ([#3437](https://github.com/feathersjs/feathers/issues/3437)) ([2642072](https://github.com/feathersjs/feathers/commit/26420721f3eb16f716a9e68ab3ed9f415bab7a9c))
## [5.0.23](https://github.com/feathersjs/feathers/compare/v5.0.22...v5.0.23) (2024-02-25)

@@ -8,0 +14,0 @@

15

lib/client.js

@@ -55,2 +55,3 @@ "use strict";

return new Promise((resolve, reject) => {
var _a, _b;
const route = args.pop();

@@ -64,5 +65,13 @@ let path = this.path;

args.unshift(method, path);
args.push(function (error, data) {
return error ? reject((0, errors_1.convert)(error)) : resolve(data);
});
const socketTimeout = ((_a = this.connection.flags) === null || _a === void 0 ? void 0 : _a.timeout) || ((_b = this.connection._opts) === null || _b === void 0 ? void 0 : _b.ackTimeout);
if (socketTimeout !== undefined) {
args.push(function (timeoutError, error, data) {
return timeoutError || error ? reject((0, errors_1.convert)(timeoutError || error)) : resolve(data);
});
}
else {
args.push(function (error, data) {
return error ? reject((0, errors_1.convert)(error)) : resolve(data);
});
}
debug(`Sending socket.${this.method}`, args);

@@ -69,0 +78,0 @@ this.connection[this.method](...args);

16

package.json
{
"name": "@feathersjs/transport-commons",
"description": "Shared functionality for websocket providers",
"version": "5.0.23",
"version": "5.0.24",
"homepage": "https://feathersjs.com",

@@ -57,5 +57,5 @@ "main": "lib/",

"dependencies": {
"@feathersjs/commons": "^5.0.23",
"@feathersjs/errors": "^5.0.23",
"@feathersjs/feathers": "^5.0.23",
"@feathersjs/commons": "^5.0.24",
"@feathersjs/errors": "^5.0.24",
"@feathersjs/feathers": "^5.0.24",
"encodeurl": "^1.0.2",

@@ -66,11 +66,11 @@ "lodash": "^4.17.21"

"@types/encodeurl": "^1.0.2",
"@types/lodash": "^4.14.202",
"@types/lodash": "^4.17.0",
"@types/mocha": "^10.0.6",
"@types/node": "^20.11.20",
"@types/node": "^20.11.26",
"mocha": "^10.3.0",
"shx": "^0.3.4",
"ts-node": "^10.9.2",
"typescript": "^5.3.3"
"typescript": "^5.4.2"
},
"gitHead": "745bc6a5af6f6b4a14cccc2915ad7670d7fcd558"
"gitHead": "09519fb1c454ea718747a09797bc6dfd3b6a79a3"
}

@@ -89,6 +89,14 @@ /* eslint-disable @typescript-eslint/ban-ts-comment */

args.unshift(method, path)
args.push(function (error: any, data: any) {
return error ? reject(convert(error)) : resolve(data)
})
const socketTimeout = this.connection.flags?.timeout || this.connection._opts?.ackTimeout
if (socketTimeout !== undefined) {
args.push(function (timeoutError: any, error: any, data: any) {
return timeoutError || error ? reject(convert(timeoutError || error)) : resolve(data)
})
} else {
args.push(function (error: any, data: any) {
return error ? reject(convert(error)) : resolve(data)
})
}
debug(`Sending socket.${this.method}`, args)

@@ -95,0 +103,0 @@

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc