Skip to content

Commit

Permalink
chore(release): v1.3.1 (#5522)
Browse files Browse the repository at this point in the history
Co-authored-by: DigitalBrainJS <DigitalBrainJS@users.noreply.github.com>
  • Loading branch information
github-actions[bot] and DigitalBrainJS committed Feb 1, 2023
1 parent 96d336f commit 54d3fac
Show file tree
Hide file tree
Showing 17 changed files with 55 additions and 35 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
@@ -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&#x3D;4&amp;s&#x3D;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)


Expand Down
2 changes: 1 addition & 1 deletion bower.json
@@ -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"
Expand Down
8 changes: 4 additions & 4 deletions dist/axios.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/axios.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/axios.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/axios.min.js.map

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions dist/browser/axios.cjs
@@ -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) {
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -2612,7 +2612,7 @@ function mergeConfig(config1, config2) {
return config;
}

const VERSION = "1.3.0";
const VERSION = "1.3.1";

const validators$1 = {};

Expand Down
2 changes: 1 addition & 1 deletion dist/browser/axios.cjs.map

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions dist/esm/axios.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/esm/axios.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/esm/axios.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/esm/axios.min.js.map

Large diffs are not rendered by default.

26 changes: 17 additions & 9 deletions dist/node/axios.cjs
@@ -1,11 +1,12 @@
// 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');
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');
Expand All @@ -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);
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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');
Expand Down
2 changes: 1 addition & 1 deletion dist/node/axios.cjs.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/env/data.js
@@ -1 +1 @@
export const VERSION = "1.3.0";
export const VERSION = "1.3.1";
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
@@ -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": {
Expand Down Expand Up @@ -204,4 +204,4 @@
"@commitlint/config-conventional"
]
}
}
}

0 comments on commit 54d3fac

Please sign in to comment.