2
0
mirror of https://github.com/tenrok/axios.git synced 2026-06-17 19:21:29 +03:00

chore(release): v1.3.3 (#5546)

Co-authored-by: DigitalBrainJS <DigitalBrainJS@users.noreply.github.com>
This commit is contained in:
github-actions[bot]
2023-02-13 20:46:08 +02:00
committed by GitHub
parent a43bca033d
commit d9ebf8fb3a
17 changed files with 63 additions and 35 deletions
+14
View File
@@ -1,5 +1,19 @@
# Changelog # Changelog
## [1.3.3](https://github.com/axios/axios/compare/v1.3.2...v1.3.3) (2023-02-13)
### Bug Fixes
* **formdata:** added a check to make sure the FormData class is available in the browser's global scope; ([#5545](https://github.com/axios/axios/issues/5545)) ([a6dfa72](https://github.com/axios/axios/commit/a6dfa72010db5ad52db8bd13c0f98e537e8fd05d))
* **formdata:** fixed setting NaN as Content-Length for form payload in some cases; ([#5535](https://github.com/axios/axios/issues/5535)) ([c19f7bf](https://github.com/axios/axios/commit/c19f7bf770f90ae8307f4ea3104f227056912da1))
* **headers:** fixed the filtering logic of the clear method; ([#5542](https://github.com/axios/axios/issues/5542)) ([ea87ebf](https://github.com/axios/axios/commit/ea87ebfe6d1699af072b9e7cd40faf8f14b0ab93))
### 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 "+11/-7 (#5545 #5535 #5542 )")
- <img src="https://avatars.githubusercontent.com/u/19842213?v&#x3D;4&amp;s&#x3D;18" alt="avatar" width="18"/> [陈若枫](https://github.com/ruofee "+2/-2 (#5467 )")
## [1.3.2](https://github.com/axios/axios/compare/v1.3.1...v1.3.2) (2023-02-03) ## [1.3.2](https://github.com/axios/axios/compare/v1.3.1...v1.3.2) (2023-02-03)
+1 -1
View File
@@ -1,7 +1,7 @@
{ {
"name": "axios", "name": "axios",
"main": "./dist/axios.js", "main": "./dist/axios.js",
"version": "1.3.2", "version": "1.3.3",
"homepage": "https://axios-http.com", "homepage": "https://axios-http.com",
"authors": [ "authors": [
"Matt Zabriskie" "Matt Zabriskie"
+8 -5
View File
@@ -1,4 +1,4 @@
// Axios v1.3.2 Copyright (c) 2023 Matt Zabriskie and contributors // Axios v1.3.3 Copyright (c) 2023 Matt Zabriskie and contributors
(function (global, factory) { (function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) : typeof define === 'function' && define.amd ? define(factory) :
@@ -1209,7 +1209,7 @@
var URLSearchParams$1 = typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams; var URLSearchParams$1 = typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams;
var FormData$1 = FormData; var FormData$1 = typeof FormData !== 'undefined' ? FormData : null;
/** /**
* Determine if we're running in a standard browser environment * Determine if we're running in a standard browser environment
@@ -1538,10 +1538,13 @@
function isValidHeaderName(str) { function isValidHeaderName(str) {
return /^[-_a-zA-Z]+$/.test(str.trim()); return /^[-_a-zA-Z]+$/.test(str.trim());
} }
function matchHeaderValue(context, value, header, filter) { function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
if (utils.isFunction(filter)) { if (utils.isFunction(filter)) {
return filter.call(this, value, header); return filter.call(this, value, header);
} }
if (isHeaderNameFilter) {
value = header;
}
if (!utils.isString(value)) return; if (!utils.isString(value)) return;
if (utils.isString(filter)) { if (utils.isString(filter)) {
return value.indexOf(filter) !== -1; return value.indexOf(filter) !== -1;
@@ -1663,7 +1666,7 @@
var deleted = false; var deleted = false;
while (i--) { while (i--) {
var key = keys[i]; var key = keys[i];
if (!matcher || matchHeaderValue(this, this[key], key, matcher)) { if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
delete this[key]; delete this[key];
deleted = true; deleted = true;
} }
@@ -2423,7 +2426,7 @@
return config; return config;
} }
var VERSION = "1.3.2"; var VERSION = "1.3.3";
var validators$1 = {}; var validators$1 = {};
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+9 -5
View File
@@ -1,4 +1,4 @@
// Axios v1.3.2 Copyright (c) 2023 Matt Zabriskie and contributors // Axios v1.3.3 Copyright (c) 2023 Matt Zabriskie and contributors
'use strict'; 'use strict';
function bind(fn, thisArg) { function bind(fn, thisArg) {
@@ -1212,7 +1212,7 @@ var transitionalDefaults = {
var URLSearchParams$1 = typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams; var URLSearchParams$1 = typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams;
var FormData$1 = FormData; var FormData$1 = typeof FormData !== 'undefined' ? FormData : null;
/** /**
* Determine if we're running in a standard browser environment * Determine if we're running in a standard browser environment
@@ -1614,11 +1614,15 @@ function isValidHeaderName(str) {
return /^[-_a-zA-Z]+$/.test(str.trim()); return /^[-_a-zA-Z]+$/.test(str.trim());
} }
function matchHeaderValue(context, value, header, filter) { function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
if (utils.isFunction(filter)) { if (utils.isFunction(filter)) {
return filter.call(this, value, header); return filter.call(this, value, header);
} }
if (isHeaderNameFilter) {
value = header;
}
if (!utils.isString(value)) return; if (!utils.isString(value)) return;
if (utils.isString(filter)) { if (utils.isString(filter)) {
@@ -1762,7 +1766,7 @@ class AxiosHeaders {
while (i--) { while (i--) {
const key = keys[i]; const key = keys[i];
if(!matcher || matchHeaderValue(this, this[key], key, matcher)) { if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
delete this[key]; delete this[key];
deleted = true; deleted = true;
} }
@@ -2612,7 +2616,7 @@ function mergeConfig(config1, config2) {
return config; return config;
} }
const VERSION = "1.3.2"; const VERSION = "1.3.3";
const validators$1 = {}; const validators$1 = {};
+1 -1
View File
File diff suppressed because one or more lines are too long
+9 -5
View File
@@ -1,4 +1,4 @@
// Axios v1.3.2 Copyright (c) 2023 Matt Zabriskie and contributors // Axios v1.3.3 Copyright (c) 2023 Matt Zabriskie and contributors
function bind(fn, thisArg) { function bind(fn, thisArg) {
return function wrap() { return function wrap() {
return fn.apply(thisArg, arguments); return fn.apply(thisArg, arguments);
@@ -1210,7 +1210,7 @@ const transitionalDefaults = {
const URLSearchParams$1 = typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams; const URLSearchParams$1 = typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams;
const FormData$1 = FormData; const FormData$1 = typeof FormData !== 'undefined' ? FormData : null;
/** /**
* Determine if we're running in a standard browser environment * Determine if we're running in a standard browser environment
@@ -1612,11 +1612,15 @@ function isValidHeaderName(str) {
return /^[-_a-zA-Z]+$/.test(str.trim()); return /^[-_a-zA-Z]+$/.test(str.trim());
} }
function matchHeaderValue(context, value, header, filter) { function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
if (utils.isFunction(filter)) { if (utils.isFunction(filter)) {
return filter.call(this, value, header); return filter.call(this, value, header);
} }
if (isHeaderNameFilter) {
value = header;
}
if (!utils.isString(value)) return; if (!utils.isString(value)) return;
if (utils.isString(filter)) { if (utils.isString(filter)) {
@@ -1760,7 +1764,7 @@ class AxiosHeaders$1 {
while (i--) { while (i--) {
const key = keys[i]; const key = keys[i];
if(!matcher || matchHeaderValue(this, this[key], key, matcher)) { if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
delete this[key]; delete this[key];
deleted = true; deleted = true;
} }
@@ -2610,7 +2614,7 @@ function mergeConfig$1(config1, config2) {
return config; return config;
} }
const VERSION$1 = "1.3.2"; const VERSION$1 = "1.3.3";
const validators$1 = {}; const validators$1 = {};
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+9 -5
View File
@@ -1,4 +1,4 @@
// Axios v1.3.2 Copyright (c) 2023 Matt Zabriskie and contributors // Axios v1.3.3 Copyright (c) 2023 Matt Zabriskie and contributors
'use strict'; 'use strict';
const FormData$1 = require('form-data'); const FormData$1 = require('form-data');
@@ -1581,11 +1581,15 @@ function isValidHeaderName(str) {
return /^[-_a-zA-Z]+$/.test(str.trim()); return /^[-_a-zA-Z]+$/.test(str.trim());
} }
function matchHeaderValue(context, value, header, filter) { function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
if (utils.isFunction(filter)) { if (utils.isFunction(filter)) {
return filter.call(this, value, header); return filter.call(this, value, header);
} }
if (isHeaderNameFilter) {
value = header;
}
if (!utils.isString(value)) return; if (!utils.isString(value)) return;
if (utils.isString(filter)) { if (utils.isString(filter)) {
@@ -1729,7 +1733,7 @@ class AxiosHeaders {
while (i--) { while (i--) {
const key = keys[i]; const key = keys[i];
if(!matcher || matchHeaderValue(this, this[key], key, matcher)) { if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
delete this[key]; delete this[key];
deleted = true; deleted = true;
} }
@@ -1948,7 +1952,7 @@ function buildFullPath(baseURL, requestedURL) {
return requestedURL; return requestedURL;
} }
const VERSION = "1.3.2"; const VERSION = "1.3.3";
function parseProtocol(url) { function parseProtocol(url) {
const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url); const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
@@ -2658,7 +2662,7 @@ const httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
if (!headers.hasContentLength()) { if (!headers.hasContentLength()) {
try { try {
const knownLength = await util__default["default"].promisify(data.getLength).call(data); const knownLength = await util__default["default"].promisify(data.getLength).call(data);
headers.setContentLength(knownLength); Number.isFinite(knownLength) && knownLength >= 0 && headers.setContentLength(knownLength);
/*eslint no-empty:0*/ /*eslint no-empty:0*/
} catch (e) { } catch (e) {
} }
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1 +1 @@
export const VERSION = "1.3.2"; export const VERSION = "1.3.3";
+2 -2
View File
@@ -1,12 +1,12 @@
{ {
"name": "axios", "name": "axios",
"version": "1.3.2", "version": "1.3.3",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "axios", "name": "axios",
"version": "1.3.2", "version": "1.3.3",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"follow-redirects": "^1.15.0", "follow-redirects": "^1.15.0",
+2 -3
View File
@@ -1,6 +1,6 @@
{ {
"name": "axios", "name": "axios",
"version": "1.3.2", "version": "1.3.3",
"description": "Promise based HTTP client for the browser and node.js", "description": "Promise based HTTP client for the browser and node.js",
"main": "index.js", "main": "index.js",
"exports": { "exports": {
@@ -157,8 +157,7 @@
"Rikki Gibson (https://github.com/RikkiGibson)", "Rikki Gibson (https://github.com/RikkiGibson)",
"Remco Haszing (https://github.com/remcohaszing)", "Remco Haszing (https://github.com/remcohaszing)",
"Yasu Flores (https://github.com/yasuf)", "Yasu Flores (https://github.com/yasuf)",
"Ben Carp (https://github.com/carpben)", "Ben Carp (https://github.com/carpben)"
"Daniel Lopretto (https://github.com/timemachine3030)"
], ],
"sideEffects": false, "sideEffects": false,
"release-it": { "release-it": {