mirror of
https://github.com/tenrok/axios.git
synced 2026-05-15 11:59:42 +03:00
chore(release): v1.3.1 (#5522)
Co-authored-by: DigitalBrainJS <DigitalBrainJS@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
96d336f527
commit
54d3facb3b
@@ -1,5 +1,17 @@
|
||||
# Changelog
|
||||
|
||||
## [1.3.1](https://github.com/axios/axios/compare/v1.3.0...v1.3.1) (2023-02-01)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **formdata:** add hotfix to use the asynchronous API to compute the content-length header value; ([#5521](https://github.com/axios/axios/issues/5521)) ([96d336f](https://github.com/axios/axios/commit/96d336f527619f21da012fe1f117eeb53e5a2120))
|
||||
* **serializer:** fixed serialization of array-like objects; ([#5518](https://github.com/axios/axios/issues/5518)) ([08104c0](https://github.com/axios/axios/commit/08104c028c0f9353897b1b6691d74c440fd0c32d))
|
||||
|
||||
### 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 "+27/-8 (#5521 #5518 )")
|
||||
|
||||
# [1.3.0](https://github.com/axios/axios/compare/v1.2.6...v1.3.0) (2023-01-31)
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "axios",
|
||||
"main": "./dist/axios.js",
|
||||
"version": "1.3.0",
|
||||
"version": "1.3.1",
|
||||
"homepage": "https://axios-http.com",
|
||||
"authors": [
|
||||
"Matt Zabriskie"
|
||||
|
||||
Vendored
+4
-4
@@ -1,4 +1,4 @@
|
||||
// Axios v1.3.0 Copyright (c) 2023 Matt Zabriskie and contributors
|
||||
// Axios v1.3.1 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) :
|
||||
@@ -987,7 +987,7 @@
|
||||
key = metaTokens ? key : key.slice(0, -2);
|
||||
// eslint-disable-next-line no-param-reassign
|
||||
value = JSON.stringify(value);
|
||||
} else if (utils.isArray(value) && isFlatArray(value) || utils.isFileList(value) || utils.endsWith(key, '[]') && (arr = utils.toArray(value))) {
|
||||
} else if (utils.isArray(value) && isFlatArray(value) || (utils.isFileList(value) || utils.endsWith(key, '[]')) && (arr = utils.toArray(value))) {
|
||||
// eslint-disable-next-line no-param-reassign
|
||||
key = removeBrackets(key);
|
||||
arr.forEach(function each(el, index) {
|
||||
@@ -1629,7 +1629,7 @@
|
||||
header = normalizeHeader(header);
|
||||
if (header) {
|
||||
var key = utils.findKey(this, header);
|
||||
return !!(key && (!matcher || matchHeaderValue(this, this[key], key, matcher)));
|
||||
return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -2423,7 +2423,7 @@
|
||||
return config;
|
||||
}
|
||||
|
||||
var VERSION = "1.3.0";
|
||||
var VERSION = "1.3.1";
|
||||
|
||||
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
+4
-4
@@ -1,4 +1,4 @@
|
||||
// Axios v1.3.0 Copyright (c) 2023 Matt Zabriskie and contributors
|
||||
// Axios v1.3.1 Copyright (c) 2023 Matt Zabriskie and contributors
|
||||
'use strict';
|
||||
|
||||
function bind(fn, thisArg) {
|
||||
@@ -960,7 +960,7 @@ function toFormData(obj, formData, options) {
|
||||
value = JSON.stringify(value);
|
||||
} else if (
|
||||
(utils.isArray(value) && isFlatArray(value)) ||
|
||||
(utils.isFileList(value) || utils.endsWith(key, '[]') && (arr = utils.toArray(value))
|
||||
((utils.isFileList(value) || utils.endsWith(key, '[]')) && (arr = utils.toArray(value))
|
||||
)) {
|
||||
// eslint-disable-next-line no-param-reassign
|
||||
key = removeBrackets(key);
|
||||
@@ -1722,7 +1722,7 @@ class AxiosHeaders {
|
||||
if (header) {
|
||||
const key = utils.findKey(this, header);
|
||||
|
||||
return !!(key && (!matcher || matchHeaderValue(this, this[key], key, matcher)));
|
||||
return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));
|
||||
}
|
||||
|
||||
return false;
|
||||
@@ -2612,7 +2612,7 @@ function mergeConfig(config1, config2) {
|
||||
return config;
|
||||
}
|
||||
|
||||
const VERSION = "1.3.0";
|
||||
const VERSION = "1.3.1";
|
||||
|
||||
const validators$1 = {};
|
||||
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+4
-4
@@ -1,4 +1,4 @@
|
||||
// Axios v1.3.0 Copyright (c) 2023 Matt Zabriskie and contributors
|
||||
// Axios v1.3.1 Copyright (c) 2023 Matt Zabriskie and contributors
|
||||
function bind(fn, thisArg) {
|
||||
return function wrap() {
|
||||
return fn.apply(thisArg, arguments);
|
||||
@@ -958,7 +958,7 @@ function toFormData$1(obj, formData, options) {
|
||||
value = JSON.stringify(value);
|
||||
} else if (
|
||||
(utils.isArray(value) && isFlatArray(value)) ||
|
||||
(utils.isFileList(value) || utils.endsWith(key, '[]') && (arr = utils.toArray(value))
|
||||
((utils.isFileList(value) || utils.endsWith(key, '[]')) && (arr = utils.toArray(value))
|
||||
)) {
|
||||
// eslint-disable-next-line no-param-reassign
|
||||
key = removeBrackets(key);
|
||||
@@ -1720,7 +1720,7 @@ class AxiosHeaders$1 {
|
||||
if (header) {
|
||||
const key = utils.findKey(this, header);
|
||||
|
||||
return !!(key && (!matcher || matchHeaderValue(this, this[key], key, matcher)));
|
||||
return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));
|
||||
}
|
||||
|
||||
return false;
|
||||
@@ -2610,7 +2610,7 @@ function mergeConfig$1(config1, config2) {
|
||||
return config;
|
||||
}
|
||||
|
||||
const VERSION$1 = "1.3.0";
|
||||
const VERSION$1 = "1.3.1";
|
||||
|
||||
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
+17
-9
@@ -1,4 +1,4 @@
|
||||
// Axios v1.3.0 Copyright (c) 2023 Matt Zabriskie and contributors
|
||||
// Axios v1.3.1 Copyright (c) 2023 Matt Zabriskie and contributors
|
||||
'use strict';
|
||||
|
||||
const FormData$1 = require('form-data');
|
||||
@@ -6,6 +6,7 @@ const url = require('url');
|
||||
const proxyFromEnv = require('proxy-from-env');
|
||||
const http = require('http');
|
||||
const https = require('https');
|
||||
const util = require('util');
|
||||
const followRedirects = require('follow-redirects');
|
||||
const zlib = require('zlib');
|
||||
const stream = require('stream');
|
||||
@@ -17,6 +18,7 @@ const FormData__default = /*#__PURE__*/_interopDefaultLegacy(FormData$1);
|
||||
const url__default = /*#__PURE__*/_interopDefaultLegacy(url);
|
||||
const http__default = /*#__PURE__*/_interopDefaultLegacy(http);
|
||||
const https__default = /*#__PURE__*/_interopDefaultLegacy(https);
|
||||
const util__default = /*#__PURE__*/_interopDefaultLegacy(util);
|
||||
const followRedirects__default = /*#__PURE__*/_interopDefaultLegacy(followRedirects);
|
||||
const zlib__default = /*#__PURE__*/_interopDefaultLegacy(zlib);
|
||||
const stream__default = /*#__PURE__*/_interopDefaultLegacy(stream);
|
||||
@@ -978,7 +980,7 @@ function toFormData(obj, formData, options) {
|
||||
value = JSON.stringify(value);
|
||||
} else if (
|
||||
(utils.isArray(value) && isFlatArray(value)) ||
|
||||
(utils.isFileList(value) || utils.endsWith(key, '[]') && (arr = utils.toArray(value))
|
||||
((utils.isFileList(value) || utils.endsWith(key, '[]')) && (arr = utils.toArray(value))
|
||||
)) {
|
||||
// eslint-disable-next-line no-param-reassign
|
||||
key = removeBrackets(key);
|
||||
@@ -1687,7 +1689,7 @@ class AxiosHeaders {
|
||||
if (header) {
|
||||
const key = utils.findKey(this, header);
|
||||
|
||||
return !!(key && (!matcher || matchHeaderValue(this, this[key], key, matcher)));
|
||||
return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));
|
||||
}
|
||||
|
||||
return false;
|
||||
@@ -1946,7 +1948,7 @@ function buildFullPath(baseURL, requestedURL) {
|
||||
return requestedURL;
|
||||
}
|
||||
|
||||
const VERSION = "1.3.0";
|
||||
const VERSION = "1.3.1";
|
||||
|
||||
function parseProtocol(url) {
|
||||
const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
|
||||
@@ -2510,7 +2512,8 @@ const isHttpAdapterSupported = typeof process !== 'undefined' && utils.kindOf(pr
|
||||
|
||||
/*eslint consistent-return:0*/
|
||||
const httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
|
||||
return new Promise(function dispatchHttpRequest(resolvePromise, rejectPromise) {
|
||||
/*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;
|
||||
@@ -2601,7 +2604,7 @@ const httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
|
||||
convertedData = convertedData.toString(responseEncoding);
|
||||
|
||||
if (!responseEncoding || responseEncoding === 'utf8') {
|
||||
data = utils.stripBOM(convertedData);
|
||||
convertedData = utils.stripBOM(convertedData);
|
||||
}
|
||||
} else if (responseType === 'stream') {
|
||||
convertedData = stream__default["default"].Readable.from(convertedData);
|
||||
@@ -2651,9 +2654,14 @@ const httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
|
||||
// support for https://www.npmjs.com/package/form-data api
|
||||
} else if (utils.isFormData(data) && utils.isFunction(data.getHeaders)) {
|
||||
headers.set(data.getHeaders());
|
||||
if (utils.isFunction(data.getLengthSync)) { // check if the undocumented API exists
|
||||
const knownLength = data.getLengthSync();
|
||||
!utils.isUndefined(knownLength) && headers.setContentLength(knownLength, false);
|
||||
|
||||
if (!headers.hasContentLength()) {
|
||||
try {
|
||||
const knownLength = await util__default["default"].promisify(data.getLength).call(data);
|
||||
headers.setContentLength(knownLength);
|
||||
/*eslint no-empty:0*/
|
||||
} catch (e) {
|
||||
}
|
||||
}
|
||||
} else if (utils.isBlob(data)) {
|
||||
data.size && headers.setContentType(data.type || 'application/octet-stream');
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
@@ -1 +1 @@
|
||||
export const VERSION = "1.3.0";
|
||||
export const VERSION = "1.3.1";
|
||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "axios",
|
||||
"version": "1.3.0",
|
||||
"version": "1.3.1",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "axios",
|
||||
"version": "1.3.0",
|
||||
"version": "1.3.1",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"follow-redirects": "^1.15.0",
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "axios",
|
||||
"version": "1.3.0",
|
||||
"version": "1.3.1",
|
||||
"description": "Promise based HTTP client for the browser and node.js",
|
||||
"main": "index.js",
|
||||
"exports": {
|
||||
@@ -204,4 +204,4 @@
|
||||
"@commitlint/config-conventional"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user