Skip to content

Commit

Permalink
chore(release): v1.7.0-beta.2
Browse files Browse the repository at this point in the history
  • Loading branch information
DigitalBrainJS committed May 19, 2024
1 parent 870e0a7 commit df94724
Show file tree
Hide file tree
Showing 17 changed files with 144 additions and 89 deletions.
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog

# [1.7.0-beta.2](https://github.com/axios/axios/compare/v1.7.0-beta.1...v1.7.0-beta.2) (2024-05-19)


### Bug Fixes

* **fetch:** capitalize HTTP method names; ([#6395](https://github.com/axios/axios/issues/6395)) ([ad3174a](https://github.com/axios/axios/commit/ad3174a3515c3c2573f4bcb94818d582826f3914))
* **fetch:** fix & optimize progress capturing for cases when the request data has a nullish value or zero data length ([#6400](https://github.com/axios/axios/issues/6400)) ([95a3e8e](https://github.com/axios/axios/commit/95a3e8e346cfd6a5548e171f2341df3235d0e26b))
* **fetch:** fix headers getting from a stream response; ([#6401](https://github.com/axios/axios/issues/6401)) ([870e0a7](https://github.com/axios/axios/commit/870e0a76f60d0094774a6a63fa606eec52a381af))

### 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 "+32/-10 (#6401 #6400 #6395 )")

# [1.7.0-beta.1](https://github.com/axios/axios/compare/v1.7.0-beta.0...v1.7.0-beta.1) (2024-05-07)


Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "axios",
"main": "./dist/axios.js",
"version": "1.7.0-beta.1",
"version": "1.7.0-beta.2",
"homepage": "https://axios-http.com",
"authors": [
"Matt Zabriskie"
Expand Down
95 changes: 55 additions & 40 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.

33 changes: 21 additions & 12 deletions dist/browser/axios.cjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Axios v1.7.0-beta.1 Copyright (c) 2024 Matt Zabriskie and contributors
// Axios v1.7.0-beta.2 Copyright (c) 2024 Matt Zabriskie and contributors
'use strict';

function bind(fn, thisArg) {
Expand Down Expand Up @@ -2722,6 +2722,10 @@ isFetchSupported && (((res) => {
})(new Response));

const getBodyLength = async (body) => {
if (body == null) {
return 0;
}

if(utils$1.isBlob(body)) {
return body.size;
}
Expand Down Expand Up @@ -2780,12 +2784,15 @@ var fetchAdapter = isFetchSupported && (async (config) => {
finished = true;
};

try {
if (onUploadProgress && supportsRequestStream && method !== 'get' && method !== 'head') {
let requestContentLength = await resolveBodyLength(headers, data);
let requestContentLength;

try {
if (
onUploadProgress && supportsRequestStream && method !== 'get' && method !== 'head' &&
(requestContentLength = await resolveBodyLength(headers, data)) !== 0
) {
let _request = new Request(url, {
method,
method: 'POST',
body: data,
duplex: "half"
});
Expand All @@ -2796,10 +2803,12 @@ var fetchAdapter = isFetchSupported && (async (config) => {
headers.setContentType(contentTypeHeader);
}

data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, fetchProgressDecorator(
requestContentLength,
progressEventReducer(onUploadProgress)
));
if (_request.body) {
data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, fetchProgressDecorator(
requestContentLength,
progressEventReducer(onUploadProgress)
));
}
}

if (!utils$1.isString(withCredentials)) {
Expand All @@ -2809,7 +2818,7 @@ var fetchAdapter = isFetchSupported && (async (config) => {
request = new Request(url, {
...fetchOptions,
signal: composedSignal,
method,
method: method.toUpperCase(),
headers: headers.normalize().toJSON(),
body: data,
duplex: "half",
Expand All @@ -2823,7 +2832,7 @@ var fetchAdapter = isFetchSupported && (async (config) => {
if (supportsResponseStream && (onDownloadProgress || isStreamResponse)) {
const options = {};

Object.getOwnPropertyNames(response).forEach(prop => {
['status', 'statusText', 'headers'].forEach(prop => {
options[prop] = response[prop];
});

Expand Down Expand Up @@ -3019,7 +3028,7 @@ function dispatchRequest(config) {
});
}

const VERSION = "1.7.0-beta.1";
const VERSION = "1.7.0-beta.2";

const validators$1 = {};

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

Large diffs are not rendered by default.

33 changes: 21 additions & 12 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.

Loading

0 comments on commit df94724

Please sign in to comment.