Socket
Socket
Sign inDemoInstall

superagent

Package Overview
Dependencies
33
Maintainers
10
Versions
169
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 4.1.0-beta.1 to 4.1.0

5

History.md

@@ -1,7 +0,8 @@

# 4.1.0-beta (2018-12-02)
# 4.1.0 (2018-12-26)
* `.connect()` IP/DNS override option (Kornel)
* `.trustLocalhost()` option for allowing broken HTTPS on `localhost`
* `.abort()` used with promises rejects the promise.
# 4.0.0 (2018-11-17)
# 4.0.0 (2018-11-17)

@@ -8,0 +9,0 @@ ## Breaking changes

@@ -239,2 +239,10 @@ 'use strict';

self.on('error', innerReject);
self.on('abort', () => {
const err = new Error('Aborted');
err.code = "ABORTED";
err.status = this.status;
err.method = this.method;
err.url = this.url;
innerReject(err);
});
self.end((err, res) => {

@@ -241,0 +249,0 @@ if (err) innerReject(err);

2

package.json
{
"name": "superagent",
"version": "4.1.0-beta.1",
"version": "4.1.0",
"description": "elegant & feature rich browser / node HTTP with a fluent API",

@@ -5,0 +5,0 @@ "scripts": {

@@ -277,2 +277,4 @@ (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.superagent = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){

RequestBase.prototype.then = function then(resolve, reject) {
var _this = this;
if (!this._fullfilledPromise) {

@@ -285,2 +287,10 @@ var self = this;

self.on('error', innerReject);
self.on('abort', function () {
var err = new Error('Aborted');
err.code = "ABORTED";
err.status = _this.status;
err.method = _this.method;
err.url = _this.url;
innerReject(err);
});
self.end(function (err, res) {

@@ -287,0 +297,0 @@ if (err) innerReject(err);else innerResolve(res);

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc