mirror of
https://github.com/axios/axios.git
synced 2026-04-11 14:21:59 +08:00
chore(release): v1.5.0 (#5838)
Co-authored-by: DigitalBrainJS <DigitalBrainJS@users.noreply.github.com>
This commit is contained in:
parent
1601f4a27a
commit
6365751ba6
23
CHANGELOG.md
23
CHANGELOG.md
@ -1,5 +1,28 @@
|
||||
# Changelog
|
||||
|
||||
# [1.5.0](https://github.com/axios/axios/compare/v1.4.0...v1.5.0) (2023-08-26)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **adapter:** make adapter loading error more clear by using platform-specific adapters explicitly ([#5837](https://github.com/axios/axios/issues/5837)) ([9a414bb](https://github.com/axios/axios/commit/9a414bb6c81796a95c6c7fe668637825458e8b6d))
|
||||
* **dns:** fixed `cacheable-lookup` integration; ([#5836](https://github.com/axios/axios/issues/5836)) ([b3e327d](https://github.com/axios/axios/commit/b3e327dcc9277bdce34c7ef57beedf644b00d628))
|
||||
* **headers:** added support for setting header names that overlap with class methods; ([#5831](https://github.com/axios/axios/issues/5831)) ([d8b4ca0](https://github.com/axios/axios/commit/d8b4ca0ea5f2f05efa4edfe1e7684593f9f68273))
|
||||
* **headers:** fixed common Content-Type header merging; ([#5832](https://github.com/axios/axios/issues/5832)) ([8fda276](https://github.com/axios/axios/commit/8fda2766b1e6bcb72c3fabc146223083ef13ce17))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* export getAdapter function ([#5324](https://github.com/axios/axios/issues/5324)) ([ca73eb8](https://github.com/axios/axios/commit/ca73eb878df0ae2dace81fe3a7f1fb5986231bf1))
|
||||
* **export:** export adapters without `unsafe` prefix ([#5839](https://github.com/axios/axios/issues/5839)) ([1601f4a](https://github.com/axios/axios/commit/1601f4a27a81ab47fea228f1e244b2c4e3ce28bf))
|
||||
|
||||
### Contributors to this release
|
||||
|
||||
- <img src="https://avatars.githubusercontent.com/u/12586868?v=4&s=18" alt="avatar" width="18"/> [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS "+66/-29 (#5839 #5837 #5836 #5832 #5831 )")
|
||||
- <img src="https://avatars.githubusercontent.com/u/102841186?v=4&s=18" alt="avatar" width="18"/> [夜葬](https://github.com/geekact "+42/-0 (#5324 )")
|
||||
- <img src="https://avatars.githubusercontent.com/u/65978976?v=4&s=18" alt="avatar" width="18"/> [Jonathan Budiman](https://github.com/JBudiman00 "+30/-0 (#5788 )")
|
||||
- <img src="https://avatars.githubusercontent.com/u/5492927?v=4&s=18" alt="avatar" width="18"/> [Michael Di Prisco](https://github.com/Cadienvan "+3/-5 (#5791 )")
|
||||
|
||||
# [1.4.0](https://github.com/axios/axios/compare/v1.3.6...v1.4.0) (2023-04-27)
|
||||
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "axios",
|
||||
"main": "./dist/axios.js",
|
||||
"version": "1.4.0",
|
||||
"version": "1.5.0",
|
||||
"homepage": "https://axios-http.com",
|
||||
"authors": [
|
||||
"Matt Zabriskie"
|
||||
|
||||
44
dist/axios.js
vendored
44
dist/axios.js
vendored
@ -1,4 +1,4 @@
|
||||
// Axios v1.4.0 Copyright (c) 2023 Matt Zabriskie and contributors
|
||||
// Axios v1.5.0 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) :
|
||||
@ -625,8 +625,9 @@
|
||||
var descriptors = Object.getOwnPropertyDescriptors(obj);
|
||||
var reducedDescriptors = {};
|
||||
forEach(descriptors, function (descriptor, name) {
|
||||
if (reducer(descriptor, name, obj) !== false) {
|
||||
reducedDescriptors[name] = descriptor;
|
||||
var ret;
|
||||
if ((ret = reducer(descriptor, name, obj)) !== false) {
|
||||
reducedDescriptors[name] = ret || descriptor;
|
||||
}
|
||||
});
|
||||
Object.defineProperties(obj, reducedDescriptors);
|
||||
@ -1361,10 +1362,6 @@
|
||||
return null;
|
||||
}
|
||||
|
||||
var DEFAULT_CONTENT_TYPE = {
|
||||
'Content-Type': undefined
|
||||
};
|
||||
|
||||
/**
|
||||
* It takes a string, tries to parse it, and if it fails, it returns the stringified version
|
||||
* of the input
|
||||
@ -1390,7 +1387,7 @@
|
||||
}
|
||||
var defaults = {
|
||||
transitional: transitionalDefaults,
|
||||
adapter: ['xhr', 'http'],
|
||||
adapter: platform.isNode ? 'http' : 'xhr',
|
||||
transformRequest: [function transformRequest(data, headers) {
|
||||
var contentType = headers.getContentType() || '';
|
||||
var hasJSONContentType = contentType.indexOf('application/json') > -1;
|
||||
@ -1471,16 +1468,14 @@
|
||||
},
|
||||
headers: {
|
||||
common: {
|
||||
'Accept': 'application/json, text/plain, */*'
|
||||
'Accept': 'application/json, text/plain, */*',
|
||||
'Content-Type': undefined
|
||||
}
|
||||
}
|
||||
};
|
||||
utils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {
|
||||
utils.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], function (method) {
|
||||
defaults.headers[method] = {};
|
||||
});
|
||||
utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
|
||||
defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);
|
||||
});
|
||||
var defaults$1 = defaults;
|
||||
|
||||
// RawAxiosHeaders whose duplicates are ignored by node
|
||||
@ -1781,7 +1776,20 @@
|
||||
return AxiosHeaders;
|
||||
}(Symbol.iterator, Symbol.toStringTag);
|
||||
AxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);
|
||||
utils.freezeMethods(AxiosHeaders.prototype);
|
||||
|
||||
// reserved names hotfix
|
||||
utils.reduceDescriptors(AxiosHeaders.prototype, function (_ref3, key) {
|
||||
var value = _ref3.value;
|
||||
var mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`
|
||||
return {
|
||||
get: function get() {
|
||||
return value;
|
||||
},
|
||||
set: function set(headerValue) {
|
||||
this[mapped] = headerValue;
|
||||
}
|
||||
};
|
||||
});
|
||||
utils.freezeMethods(AxiosHeaders);
|
||||
var AxiosHeaders$1 = AxiosHeaders;
|
||||
|
||||
@ -2440,7 +2448,7 @@
|
||||
return config;
|
||||
}
|
||||
|
||||
var VERSION = "1.4.0";
|
||||
var VERSION = "1.5.0";
|
||||
|
||||
var validators$1 = {};
|
||||
|
||||
@ -2582,11 +2590,10 @@
|
||||
|
||||
// Set config.method
|
||||
config.method = (config.method || this.defaults.method || 'get').toLowerCase();
|
||||
var contextHeaders;
|
||||
|
||||
// Flatten headers
|
||||
contextHeaders = headers && utils.merge(headers.common, headers[config.method]);
|
||||
contextHeaders && utils.forEach(['delete', 'get', 'head', 'post', 'put', 'patch', 'common'], function (method) {
|
||||
var contextHeaders = headers && utils.merge(headers.common, headers[config.method]);
|
||||
headers && utils.forEach(['delete', 'get', 'head', 'post', 'put', 'patch', 'common'], function (method) {
|
||||
delete headers[method];
|
||||
});
|
||||
config.headers = AxiosHeaders$1.concat(contextHeaders, headers);
|
||||
@ -2973,6 +2980,7 @@
|
||||
axios.formToJSON = function (thing) {
|
||||
return formDataToJSON(utils.isHTMLForm(thing) ? new FormData(thing) : thing);
|
||||
};
|
||||
axios.getAdapter = adapters.getAdapter;
|
||||
axios.HttpStatusCode = HttpStatusCode$1;
|
||||
axios["default"] = axios;
|
||||
|
||||
|
||||
2
dist/axios.js.map
vendored
2
dist/axios.js.map
vendored
File diff suppressed because one or more lines are too long
2
dist/axios.min.js
vendored
2
dist/axios.min.js
vendored
File diff suppressed because one or more lines are too long
2
dist/axios.min.js.map
vendored
2
dist/axios.min.js.map
vendored
File diff suppressed because one or more lines are too long
44
dist/browser/axios.cjs
vendored
44
dist/browser/axios.cjs
vendored
@ -1,4 +1,4 @@
|
||||
// Axios v1.4.0 Copyright (c) 2023 Matt Zabriskie and contributors
|
||||
// Axios v1.5.0 Copyright (c) 2023 Matt Zabriskie and contributors
|
||||
'use strict';
|
||||
|
||||
function bind(fn, thisArg) {
|
||||
@ -545,8 +545,9 @@ const reduceDescriptors = (obj, reducer) => {
|
||||
const reducedDescriptors = {};
|
||||
|
||||
forEach(descriptors, (descriptor, name) => {
|
||||
if (reducer(descriptor, name, obj) !== false) {
|
||||
reducedDescriptors[name] = descriptor;
|
||||
let ret;
|
||||
if ((ret = reducer(descriptor, name, obj)) !== false) {
|
||||
reducedDescriptors[name] = ret || descriptor;
|
||||
}
|
||||
});
|
||||
|
||||
@ -1388,10 +1389,6 @@ function formDataToJSON(formData) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const DEFAULT_CONTENT_TYPE = {
|
||||
'Content-Type': undefined
|
||||
};
|
||||
|
||||
/**
|
||||
* It takes a string, tries to parse it, and if it fails, it returns the stringified version
|
||||
* of the input
|
||||
@ -1421,7 +1418,7 @@ const defaults = {
|
||||
|
||||
transitional: transitionalDefaults,
|
||||
|
||||
adapter: ['xhr', 'http'],
|
||||
adapter: platform.isNode ? 'http' : 'xhr',
|
||||
|
||||
transformRequest: [function transformRequest(data, headers) {
|
||||
const contentType = headers.getContentType() || '';
|
||||
@ -1530,19 +1527,16 @@ const defaults = {
|
||||
|
||||
headers: {
|
||||
common: {
|
||||
'Accept': 'application/json, text/plain, */*'
|
||||
'Accept': 'application/json, text/plain, */*',
|
||||
'Content-Type': undefined
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
utils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {
|
||||
utils.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {
|
||||
defaults.headers[method] = {};
|
||||
});
|
||||
|
||||
utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
|
||||
defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);
|
||||
});
|
||||
|
||||
var defaults$1 = defaults;
|
||||
|
||||
// RawAxiosHeaders whose duplicates are ignored by node
|
||||
@ -1876,7 +1870,17 @@ class AxiosHeaders {
|
||||
|
||||
AxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);
|
||||
|
||||
utils.freezeMethods(AxiosHeaders.prototype);
|
||||
// reserved names hotfix
|
||||
utils.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {
|
||||
let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`
|
||||
return {
|
||||
get: () => value,
|
||||
set(headerValue) {
|
||||
this[mapped] = headerValue;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
utils.freezeMethods(AxiosHeaders);
|
||||
|
||||
var AxiosHeaders$1 = AxiosHeaders;
|
||||
@ -2631,7 +2635,7 @@ function mergeConfig(config1, config2) {
|
||||
return config;
|
||||
}
|
||||
|
||||
const VERSION = "1.4.0";
|
||||
const VERSION = "1.5.0";
|
||||
|
||||
const validators$1 = {};
|
||||
|
||||
@ -2784,15 +2788,13 @@ class Axios {
|
||||
// Set config.method
|
||||
config.method = (config.method || this.defaults.method || 'get').toLowerCase();
|
||||
|
||||
let contextHeaders;
|
||||
|
||||
// Flatten headers
|
||||
contextHeaders = headers && utils.merge(
|
||||
let contextHeaders = headers && utils.merge(
|
||||
headers.common,
|
||||
headers[config.method]
|
||||
);
|
||||
|
||||
contextHeaders && utils.forEach(
|
||||
headers && utils.forEach(
|
||||
['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],
|
||||
(method) => {
|
||||
delete headers[method];
|
||||
@ -3202,6 +3204,8 @@ axios.AxiosHeaders = AxiosHeaders$1;
|
||||
|
||||
axios.formToJSON = thing => formDataToJSON(utils.isHTMLForm(thing) ? new FormData(thing) : thing);
|
||||
|
||||
axios.getAdapter = adapters.getAdapter;
|
||||
|
||||
axios.HttpStatusCode = HttpStatusCode$1;
|
||||
|
||||
axios.default = axios;
|
||||
|
||||
2
dist/browser/axios.cjs.map
vendored
2
dist/browser/axios.cjs.map
vendored
File diff suppressed because one or more lines are too long
47
dist/esm/axios.js
vendored
47
dist/esm/axios.js
vendored
@ -1,4 +1,4 @@
|
||||
// Axios v1.4.0 Copyright (c) 2023 Matt Zabriskie and contributors
|
||||
// Axios v1.5.0 Copyright (c) 2023 Matt Zabriskie and contributors
|
||||
function bind(fn, thisArg) {
|
||||
return function wrap() {
|
||||
return fn.apply(thisArg, arguments);
|
||||
@ -543,8 +543,9 @@ const reduceDescriptors = (obj, reducer) => {
|
||||
const reducedDescriptors = {};
|
||||
|
||||
forEach(descriptors, (descriptor, name) => {
|
||||
if (reducer(descriptor, name, obj) !== false) {
|
||||
reducedDescriptors[name] = descriptor;
|
||||
let ret;
|
||||
if ((ret = reducer(descriptor, name, obj)) !== false) {
|
||||
reducedDescriptors[name] = ret || descriptor;
|
||||
}
|
||||
});
|
||||
|
||||
@ -1386,10 +1387,6 @@ function formDataToJSON(formData) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const DEFAULT_CONTENT_TYPE = {
|
||||
'Content-Type': undefined
|
||||
};
|
||||
|
||||
/**
|
||||
* It takes a string, tries to parse it, and if it fails, it returns the stringified version
|
||||
* of the input
|
||||
@ -1419,7 +1416,7 @@ const defaults = {
|
||||
|
||||
transitional: transitionalDefaults,
|
||||
|
||||
adapter: ['xhr', 'http'],
|
||||
adapter: platform.isNode ? 'http' : 'xhr',
|
||||
|
||||
transformRequest: [function transformRequest(data, headers) {
|
||||
const contentType = headers.getContentType() || '';
|
||||
@ -1528,19 +1525,16 @@ const defaults = {
|
||||
|
||||
headers: {
|
||||
common: {
|
||||
'Accept': 'application/json, text/plain, */*'
|
||||
'Accept': 'application/json, text/plain, */*',
|
||||
'Content-Type': undefined
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
utils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {
|
||||
utils.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {
|
||||
defaults.headers[method] = {};
|
||||
});
|
||||
|
||||
utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
|
||||
defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);
|
||||
});
|
||||
|
||||
const defaults$1 = defaults;
|
||||
|
||||
// RawAxiosHeaders whose duplicates are ignored by node
|
||||
@ -1874,7 +1868,17 @@ class AxiosHeaders$1 {
|
||||
|
||||
AxiosHeaders$1.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);
|
||||
|
||||
utils.freezeMethods(AxiosHeaders$1.prototype);
|
||||
// reserved names hotfix
|
||||
utils.reduceDescriptors(AxiosHeaders$1.prototype, ({value}, key) => {
|
||||
let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`
|
||||
return {
|
||||
get: () => value,
|
||||
set(headerValue) {
|
||||
this[mapped] = headerValue;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
utils.freezeMethods(AxiosHeaders$1);
|
||||
|
||||
const AxiosHeaders$2 = AxiosHeaders$1;
|
||||
@ -2629,7 +2633,7 @@ function mergeConfig$1(config1, config2) {
|
||||
return config;
|
||||
}
|
||||
|
||||
const VERSION$1 = "1.4.0";
|
||||
const VERSION$1 = "1.5.0";
|
||||
|
||||
const validators$1 = {};
|
||||
|
||||
@ -2782,15 +2786,13 @@ class Axios$1 {
|
||||
// Set config.method
|
||||
config.method = (config.method || this.defaults.method || 'get').toLowerCase();
|
||||
|
||||
let contextHeaders;
|
||||
|
||||
// Flatten headers
|
||||
contextHeaders = headers && utils.merge(
|
||||
let contextHeaders = headers && utils.merge(
|
||||
headers.common,
|
||||
headers[config.method]
|
||||
);
|
||||
|
||||
contextHeaders && utils.forEach(
|
||||
headers && utils.forEach(
|
||||
['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],
|
||||
(method) => {
|
||||
delete headers[method];
|
||||
@ -3200,6 +3202,8 @@ axios.AxiosHeaders = AxiosHeaders$2;
|
||||
|
||||
axios.formToJSON = thing => formDataToJSON(utils.isHTMLForm(thing) ? new FormData(thing) : thing);
|
||||
|
||||
axios.getAdapter = adapters.getAdapter;
|
||||
|
||||
axios.HttpStatusCode = HttpStatusCode$2;
|
||||
|
||||
axios.default = axios;
|
||||
@ -3225,8 +3229,9 @@ const {
|
||||
AxiosHeaders,
|
||||
HttpStatusCode,
|
||||
formToJSON,
|
||||
getAdapter,
|
||||
mergeConfig
|
||||
} = axios$1;
|
||||
|
||||
export { Axios, AxiosError, AxiosHeaders, Cancel, CancelToken, CanceledError, HttpStatusCode, VERSION, all, axios$1 as default, formToJSON, isAxiosError, isCancel, mergeConfig, spread, toFormData };
|
||||
export { Axios, AxiosError, AxiosHeaders, Cancel, CancelToken, CanceledError, HttpStatusCode, VERSION, all, axios$1 as default, formToJSON, getAdapter, isAxiosError, isCancel, mergeConfig, spread, toFormData };
|
||||
//# sourceMappingURL=axios.js.map
|
||||
|
||||
2
dist/esm/axios.js.map
vendored
2
dist/esm/axios.js.map
vendored
File diff suppressed because one or more lines are too long
2
dist/esm/axios.min.js
vendored
2
dist/esm/axios.min.js
vendored
File diff suppressed because one or more lines are too long
2
dist/esm/axios.min.js.map
vendored
2
dist/esm/axios.min.js.map
vendored
File diff suppressed because one or more lines are too long
48
dist/node/axios.cjs
vendored
48
dist/node/axios.cjs
vendored
@ -1,4 +1,4 @@
|
||||
// Axios v1.4.0 Copyright (c) 2023 Matt Zabriskie and contributors
|
||||
// Axios v1.5.0 Copyright (c) 2023 Matt Zabriskie and contributors
|
||||
'use strict';
|
||||
|
||||
const FormData$1 = require('form-data');
|
||||
@ -568,8 +568,9 @@ const reduceDescriptors = (obj, reducer) => {
|
||||
const reducedDescriptors = {};
|
||||
|
||||
forEach(descriptors, (descriptor, name) => {
|
||||
if (reducer(descriptor, name, obj) !== false) {
|
||||
reducedDescriptors[name] = descriptor;
|
||||
let ret;
|
||||
if ((ret = reducer(descriptor, name, obj)) !== false) {
|
||||
reducedDescriptors[name] = ret || descriptor;
|
||||
}
|
||||
});
|
||||
|
||||
@ -1353,10 +1354,6 @@ function formDataToJSON(formData) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const DEFAULT_CONTENT_TYPE = {
|
||||
'Content-Type': undefined
|
||||
};
|
||||
|
||||
/**
|
||||
* It takes a string, tries to parse it, and if it fails, it returns the stringified version
|
||||
* of the input
|
||||
@ -1386,7 +1383,7 @@ const defaults = {
|
||||
|
||||
transitional: transitionalDefaults,
|
||||
|
||||
adapter: ['xhr', 'http'],
|
||||
adapter: 'http' ,
|
||||
|
||||
transformRequest: [function transformRequest(data, headers) {
|
||||
const contentType = headers.getContentType() || '';
|
||||
@ -1495,19 +1492,16 @@ const defaults = {
|
||||
|
||||
headers: {
|
||||
common: {
|
||||
'Accept': 'application/json, text/plain, */*'
|
||||
'Accept': 'application/json, text/plain, */*',
|
||||
'Content-Type': undefined
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
utils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {
|
||||
utils.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {
|
||||
defaults.headers[method] = {};
|
||||
});
|
||||
|
||||
utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
|
||||
defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);
|
||||
});
|
||||
|
||||
const defaults$1 = defaults;
|
||||
|
||||
// RawAxiosHeaders whose duplicates are ignored by node
|
||||
@ -1841,7 +1835,17 @@ class AxiosHeaders {
|
||||
|
||||
AxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);
|
||||
|
||||
utils.freezeMethods(AxiosHeaders.prototype);
|
||||
// reserved names hotfix
|
||||
utils.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {
|
||||
let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`
|
||||
return {
|
||||
get: () => value,
|
||||
set(headerValue) {
|
||||
this[mapped] = headerValue;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
utils.freezeMethods(AxiosHeaders);
|
||||
|
||||
const AxiosHeaders$1 = AxiosHeaders;
|
||||
@ -1961,7 +1965,7 @@ function buildFullPath(baseURL, requestedURL) {
|
||||
return requestedURL;
|
||||
}
|
||||
|
||||
const VERSION = "1.4.0";
|
||||
const VERSION = "1.5.0";
|
||||
|
||||
function parseProtocol(url) {
|
||||
const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
|
||||
@ -2810,11 +2814,13 @@ const httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
|
||||
auth,
|
||||
protocol,
|
||||
family,
|
||||
lookup,
|
||||
beforeRedirect: dispatchBeforeRedirect,
|
||||
beforeRedirects: {}
|
||||
};
|
||||
|
||||
// cacheable-lookup integration hotfix
|
||||
!utils.isUndefined(lookup) && (options.lookup = lookup);
|
||||
|
||||
if (config.socketPath) {
|
||||
options.socketPath = config.socketPath;
|
||||
} else {
|
||||
@ -3811,15 +3817,13 @@ class Axios {
|
||||
// Set config.method
|
||||
config.method = (config.method || this.defaults.method || 'get').toLowerCase();
|
||||
|
||||
let contextHeaders;
|
||||
|
||||
// Flatten headers
|
||||
contextHeaders = headers && utils.merge(
|
||||
let contextHeaders = headers && utils.merge(
|
||||
headers.common,
|
||||
headers[config.method]
|
||||
);
|
||||
|
||||
contextHeaders && utils.forEach(
|
||||
headers && utils.forEach(
|
||||
['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],
|
||||
(method) => {
|
||||
delete headers[method];
|
||||
@ -4229,6 +4233,8 @@ axios.AxiosHeaders = AxiosHeaders$1;
|
||||
|
||||
axios.formToJSON = thing => formDataToJSON(utils.isHTMLForm(thing) ? new FormData(thing) : thing);
|
||||
|
||||
axios.getAdapter = adapters.getAdapter;
|
||||
|
||||
axios.HttpStatusCode = HttpStatusCode$1;
|
||||
|
||||
axios.default = axios;
|
||||
|
||||
2
dist/node/axios.cjs.map
vendored
2
dist/node/axios.cjs.map
vendored
File diff suppressed because one or more lines are too long
2
lib/env/data.js
vendored
2
lib/env/data.js
vendored
@ -1 +1 @@
|
||||
export const VERSION = "1.4.0";
|
||||
export const VERSION = "1.5.0";
|
||||
4
package-lock.json
generated
4
package-lock.json
generated
@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "axios",
|
||||
"version": "1.4.0",
|
||||
"version": "1.5.0",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "axios",
|
||||
"version": "1.4.0",
|
||||
"version": "1.5.0",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"follow-redirects": "^1.15.0",
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "axios",
|
||||
"version": "1.4.0",
|
||||
"version": "1.5.0",
|
||||
"description": "Promise based HTTP client for the browser and node.js",
|
||||
"main": "index.js",
|
||||
"exports": {
|
||||
@ -214,4 +214,4 @@
|
||||
"@commitlint/config-conventional"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user