New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@eccenca/superagent

Package Overview
Dependencies
Maintainers
3
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@eccenca/superagent - npm Package Compare versions

Comparing version 2.0.1-alpha.1 to 2.0.1-beta.1

33

es5/component.js

@@ -363,14 +363,4 @@ module.exports =

var _warning = __webpack_require__(12);
var _warning2 = _interopRequireDefault(_warning);
var _proxy = __webpack_require__(13);
var _proxy2 = _interopRequireDefault(_proxy);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var DEPRECATION_WARNING = '@eccenca/superagent: You used .message of to access Error details.\nYou should use the more detailed .title and .detail .';
function httpProblemHandler(callback, err, res) {

@@ -414,13 +404,2 @@ // Adapt new errors (problem+json) to the old format and inform the user about deprecation.

_lodash2.default.set(err, 'response.type', 'application/problem+json');
err = new _proxy2.default(err, {
get: function get(t, n) {
if (n === 'message') {
(0, _warning2.default)(!__DEBUG__, DEPRECATION_WARNING);
return t.title + '\n' + t.detail;
}
return t[n];
}
});
}

@@ -441,15 +420,3 @@

/***/ }),
/* 12 */
/***/ (function(module, exports) {
module.exports = require("warning");
/***/ }),
/* 13 */
/***/ (function(module, exports) {
module.exports = require("proxy-polyfill/src/proxy");
/***/ })
/******/ ]);

3

package.json
{
"name": "@eccenca/superagent",
"version": "2.0.1-alpha.1",
"version": "2.0.1-beta.1",
"description": "Extended version of superagent.js, pimped with RX, better Link header parsing and HTTP Problem support",

@@ -41,3 +41,2 @@ "main": "es5/component.js",

"methods": "^1.1.2",
"proxy-polyfill": "^0.2.0",
"rxjs": "^5.5.6",

@@ -44,0 +43,0 @@ "superagent": "^3.8.2",

import _ from 'lodash';
import warning from 'warning';
import Proxy from 'proxy-polyfill/src/proxy'
const DEPRECATION_WARNING = `@eccenca/superagent: You used .message of to access Error details.
You should use the more detailed .title and .detail .`;
function httpProblemHandler(callback, err, res) {

@@ -47,12 +42,2 @@ // Adapt new errors (problem+json) to the old format and inform the user about deprecation.

err = new Proxy(err, {
get(t, n) {
if (n === 'message') {
warning(!__DEBUG__, DEPRECATION_WARNING);
return `${t.title}\n${t.detail}`;
}
return t[n];
},
});
}

@@ -59,0 +44,0 @@

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