Socket
Socket
Sign inDemoInstall

@feathersjs/transport-commons

Package Overview
Dependencies
Maintainers
4
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 4.0.1 to 4.0.2

7

CHANGELOG.md
# Change Log
## [v4.0.1](https://github.com/feathersjs/transport-commons/tree/v4.0.1) (2018-05-30)
[Full Changelog](https://github.com/feathersjs/transport-commons/compare/v4.0.0...v4.0.1)
**Merged pull requests:**
- Update Codeclimate settings [\#74](https://github.com/feathersjs/transport-commons/pull/74) ([daffl](https://github.com/daffl))
## [v4.0.0](https://github.com/feathersjs/transport-commons/tree/v4.0.0) (2018-02-09)

@@ -4,0 +11,0 @@ [Full Changelog](https://github.com/feathersjs/transport-commons/compare/v3.2.0...v4.0.0)

6

lib/routing.js

@@ -16,3 +16,7 @@ const Router = require('radix-router');

lookup (path) {
return this[ROUTER].lookup(stripSlashes(path));
if (!path) {
return null;
}
return this[ROUTER].lookup(stripSlashes('' + path));
}

@@ -19,0 +23,0 @@ });

25

lib/socket/utils.js

@@ -68,2 +68,6 @@ const errors = require('@feathersjs/errors');

const handleError = error => {
debug(`Error in ${trace}`, error);
callback(normalizeError(error));
};
// A wrapper function that runs the method and returns a promise

@@ -97,14 +101,13 @@ const _run = () => {

// Run and map to the callback that is being called for Socket calls
_run().then(hook => {
const result = hook.dispatch || hook.result;
try {
// Run and map to the callback that is being called for Socket calls
_run().then(hook => {
const result = hook.dispatch || hook.result;
debug(`Returned successfully ${trace}`, result);
callback(null, result);
}).catch(hook => {
const error = hook.type === 'error' ? hook.error : hook;
debug(`Error in ${trace}`, error);
callback(normalizeError(error));
});
debug(`Returned successfully ${trace}`, result);
callback(null, result);
}).catch(hook => handleError(hook.type === 'error' ? hook.error : hook));
} catch (error) {
handleError(error);
}
};
{
"name": "@feathersjs/transport-commons",
"description": "Shared functionality for websocket providers",
"version": "4.0.1",
"version": "4.0.2",
"homepage": "https://github.com/feathersjs/transport-commons",

@@ -6,0 +6,0 @@ "main": "lib/",

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