2
0
mirror of https://github.com/tenrok/axios.git synced 2026-06-14 18:42:33 +03:00

chore: release v1.1.0

This commit is contained in:
Jay
2022-10-06 21:17:46 +02:00
parent 52d64ac3b7
commit 9c3dce366b
14 changed files with 48 additions and 31 deletions
+18 -7
View File
@@ -1,6 +1,8 @@
// Axios v1.0.0 Copyright (c) 2022 Matt Zabriskie and contributors
// Axios v1.1.0 Copyright (c) 2022 Matt Zabriskie and contributors
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
const FormData$1 = require('form-data');
const url = require('url');
const proxyFromEnv = require('proxy-from-env');
@@ -158,7 +160,7 @@ const isPlainObject = (val) => {
}
const prototype = getPrototypeOf(val);
return prototype === null || prototype === Object.prototype;
return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val);
};
/**
@@ -1313,7 +1315,7 @@ function buildFullPath(baseURL, requestedURL) {
return requestedURL;
}
const VERSION = "1.0.0";
const VERSION = "1.1.0";
/**
* A `CanceledError` is an object that is thrown when an operation is canceled.
@@ -2251,9 +2253,14 @@ function httpAdapter(config) {
auth && headers.delete('authorization');
const path = parsed.pathname.concat(parsed.searchParams);
let path;
try {
buildURL(path, config.params, config.paramsSerializer).replace(/^\?/, '');
path = buildURL(
parsed.pathname + parsed.search,
config.params,
config.paramsSerializer
).replace(/^\?/, '');
} catch (err) {
const customErr = new Error(err.message);
customErr.config = config;
@@ -2265,7 +2272,7 @@ function httpAdapter(config) {
headers.set('Accept-Encoding', 'gzip, deflate, br', false);
const options = {
path: buildURL(path, config.params, config.paramsSerializer).replace(/^\?/, ''),
path,
method: method,
headers: headers.toJSON(),
agents: { http: config.httpAgent, https: config.httpsAgent },
@@ -3746,5 +3753,9 @@ axios.formToJSON = thing => {
return formDataToJSON(utils.isHTMLForm(thing) ? new FormData(thing) : thing);
};
module.exports = axios;
exports.Axios = Axios;
exports.AxiosError = AxiosError;
exports.AxiosHeaders = AxiosHeaders;
exports.CanceledError = CanceledError;
exports["default"] = axios;
//# sourceMappingURL=axios.cjs.map
+1 -1
View File
File diff suppressed because one or more lines are too long