mirror of
https://github.com/tenrok/axios.git
synced 2026-06-20 20:00:40 +03:00
chore(release): v1.3.4 (#5565)
Co-authored-by: Dmitriy Mozgovoy <robotshara@gmail.com>
This commit is contained in:
committed by
GitHub
parent
cbe2de60d3
commit
2e70cecda4
Vendored
+5
-3
@@ -1,4 +1,4 @@
|
||||
// Axios v1.3.3 Copyright (c) 2023 Matt Zabriskie and contributors
|
||||
// Axios v1.3.4 Copyright (c) 2023 Matt Zabriskie and contributors
|
||||
(function (global, factory) {
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
||||
typeof define === 'function' && define.amd ? define(factory) :
|
||||
@@ -1211,6 +1211,8 @@
|
||||
|
||||
var FormData$1 = typeof FormData !== 'undefined' ? FormData : null;
|
||||
|
||||
var Blob$1 = typeof Blob !== 'undefined' ? Blob : null;
|
||||
|
||||
/**
|
||||
* Determine if we're running in a standard browser environment
|
||||
*
|
||||
@@ -1255,7 +1257,7 @@
|
||||
classes: {
|
||||
URLSearchParams: URLSearchParams$1,
|
||||
FormData: FormData$1,
|
||||
Blob: Blob
|
||||
Blob: Blob$1
|
||||
},
|
||||
isStandardBrowserEnv: isStandardBrowserEnv,
|
||||
isStandardBrowserWebWorkerEnv: isStandardBrowserWebWorkerEnv,
|
||||
@@ -2426,7 +2428,7 @@
|
||||
return config;
|
||||
}
|
||||
|
||||
var VERSION = "1.3.3";
|
||||
var VERSION = "1.3.4";
|
||||
|
||||
var validators$1 = {};
|
||||
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+5
-3
@@ -1,4 +1,4 @@
|
||||
// Axios v1.3.3 Copyright (c) 2023 Matt Zabriskie and contributors
|
||||
// Axios v1.3.4 Copyright (c) 2023 Matt Zabriskie and contributors
|
||||
'use strict';
|
||||
|
||||
function bind(fn, thisArg) {
|
||||
@@ -1214,6 +1214,8 @@ var URLSearchParams$1 = typeof URLSearchParams !== 'undefined' ? URLSearchParams
|
||||
|
||||
var FormData$1 = typeof FormData !== 'undefined' ? FormData : null;
|
||||
|
||||
var Blob$1 = typeof Blob !== 'undefined' ? Blob : null;
|
||||
|
||||
/**
|
||||
* Determine if we're running in a standard browser environment
|
||||
*
|
||||
@@ -1268,7 +1270,7 @@ var platform = {
|
||||
classes: {
|
||||
URLSearchParams: URLSearchParams$1,
|
||||
FormData: FormData$1,
|
||||
Blob
|
||||
Blob: Blob$1
|
||||
},
|
||||
isStandardBrowserEnv,
|
||||
isStandardBrowserWebWorkerEnv,
|
||||
@@ -2616,7 +2618,7 @@ function mergeConfig(config1, config2) {
|
||||
return config;
|
||||
}
|
||||
|
||||
const VERSION = "1.3.3";
|
||||
const VERSION = "1.3.4";
|
||||
|
||||
const validators$1 = {};
|
||||
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+5
-3
@@ -1,4 +1,4 @@
|
||||
// Axios v1.3.3 Copyright (c) 2023 Matt Zabriskie and contributors
|
||||
// Axios v1.3.4 Copyright (c) 2023 Matt Zabriskie and contributors
|
||||
function bind(fn, thisArg) {
|
||||
return function wrap() {
|
||||
return fn.apply(thisArg, arguments);
|
||||
@@ -1212,6 +1212,8 @@ const URLSearchParams$1 = typeof URLSearchParams !== 'undefined' ? URLSearchPara
|
||||
|
||||
const FormData$1 = typeof FormData !== 'undefined' ? FormData : null;
|
||||
|
||||
const Blob$1 = typeof Blob !== 'undefined' ? Blob : null;
|
||||
|
||||
/**
|
||||
* Determine if we're running in a standard browser environment
|
||||
*
|
||||
@@ -1266,7 +1268,7 @@ const platform = {
|
||||
classes: {
|
||||
URLSearchParams: URLSearchParams$1,
|
||||
FormData: FormData$1,
|
||||
Blob
|
||||
Blob: Blob$1
|
||||
},
|
||||
isStandardBrowserEnv,
|
||||
isStandardBrowserWebWorkerEnv,
|
||||
@@ -2614,7 +2616,7 @@ function mergeConfig$1(config1, config2) {
|
||||
return config;
|
||||
}
|
||||
|
||||
const VERSION$1 = "1.3.3";
|
||||
const VERSION$1 = "1.3.4";
|
||||
|
||||
const validators$1 = {};
|
||||
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+36
-28
@@ -1,4 +1,4 @@
|
||||
// Axios v1.3.3 Copyright (c) 2023 Matt Zabriskie and contributors
|
||||
// Axios v1.3.4 Copyright (c) 2023 Matt Zabriskie and contributors
|
||||
'use strict';
|
||||
|
||||
const FormData$1 = require('form-data');
|
||||
@@ -1952,7 +1952,7 @@ function buildFullPath(baseURL, requestedURL) {
|
||||
return requestedURL;
|
||||
}
|
||||
|
||||
const VERSION = "1.3.3";
|
||||
const VERSION = "1.3.4";
|
||||
|
||||
function parseProtocol(url) {
|
||||
const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
|
||||
@@ -2514,15 +2514,39 @@ function setProxy(options, configProxy, location) {
|
||||
|
||||
const isHttpAdapterSupported = typeof process !== 'undefined' && utils.kindOf(process) === 'process';
|
||||
|
||||
// temporary hotfix
|
||||
|
||||
const wrapAsync = (asyncExecutor) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
let onDone;
|
||||
let isDone;
|
||||
|
||||
const done = (value, isRejected) => {
|
||||
if (isDone) return;
|
||||
isDone = true;
|
||||
onDone && onDone(value, isRejected);
|
||||
};
|
||||
|
||||
const _resolve = (value) => {
|
||||
done(value);
|
||||
resolve(value);
|
||||
};
|
||||
|
||||
const _reject = (reason) => {
|
||||
done(reason, true);
|
||||
reject(reason);
|
||||
};
|
||||
|
||||
asyncExecutor(_resolve, _reject, (onDoneHandler) => (onDone = onDoneHandler)).catch(_reject);
|
||||
})
|
||||
};
|
||||
|
||||
/*eslint consistent-return:0*/
|
||||
const httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
|
||||
/*eslint no-async-promise-executor:0*/
|
||||
return new Promise(async function dispatchHttpRequest(resolvePromise, rejectPromise) {
|
||||
let data = config.data;
|
||||
const responseType = config.responseType;
|
||||
const responseEncoding = config.responseEncoding;
|
||||
return wrapAsync(async function dispatchHttpRequest(resolve, reject, onDone) {
|
||||
let {data} = config;
|
||||
const {responseType, responseEncoding} = config;
|
||||
const method = config.method.toUpperCase();
|
||||
let isFinished;
|
||||
let isDone;
|
||||
let rejected = false;
|
||||
let req;
|
||||
@@ -2530,10 +2554,7 @@ const httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
|
||||
// temporary internal emitter until the AxiosRequest class will be implemented
|
||||
const emitter = new EventEmitter__default["default"]();
|
||||
|
||||
function onFinished() {
|
||||
if (isFinished) return;
|
||||
isFinished = true;
|
||||
|
||||
const onFinished = () => {
|
||||
if (config.cancelToken) {
|
||||
config.cancelToken.unsubscribe(abort);
|
||||
}
|
||||
@@ -2543,28 +2564,15 @@ const httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
|
||||
}
|
||||
|
||||
emitter.removeAllListeners();
|
||||
}
|
||||
|
||||
function done(value, isRejected) {
|
||||
if (isDone) return;
|
||||
};
|
||||
|
||||
onDone((value, isRejected) => {
|
||||
isDone = true;
|
||||
|
||||
if (isRejected) {
|
||||
rejected = true;
|
||||
onFinished();
|
||||
}
|
||||
|
||||
isRejected ? rejectPromise(value) : resolvePromise(value);
|
||||
}
|
||||
|
||||
const resolve = function resolve(value) {
|
||||
done(value);
|
||||
};
|
||||
|
||||
const reject = function reject(value) {
|
||||
done(value, true);
|
||||
};
|
||||
});
|
||||
|
||||
function abort(reason) {
|
||||
emitter.emit('abort', !reason || reason.type ? new CanceledError(null, config, req) : reason);
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user