superagent
Advanced tools
Comparing version 4.1.0-beta.1 to 4.1.0
@@ -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); |
{ | ||
"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); |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
484221
5050
1