Skip to content

Commit

Permalink
chore(release): v1.7.5 (axios#6574)
Browse files Browse the repository at this point in the history
Co-authored-by: DigitalBrainJS <[email protected]>
  • Loading branch information
github-actions[bot] and DigitalBrainJS authored Aug 23, 2024
1 parent 6700a8a commit 59cd6b0
Show file tree
Hide file tree
Showing 17 changed files with 110 additions and 66 deletions.
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# Changelog

## [1.7.5](https://github.com/axios/axios/compare/v1.7.4...v1.7.5) (2024-08-23)


### Bug Fixes

* **adapter:** fix undefined reference to hasBrowserEnv ([#6572](https://github.com/axios/axios/issues/6572)) ([7004707](https://github.com/axios/axios/commit/7004707c4180b416341863bd86913fe4fc2f1df1))
* **core:** add the missed implementation of AxiosError#status property; ([#6573](https://github.com/axios/axios/issues/6573)) ([6700a8a](https://github.com/axios/axios/commit/6700a8adac06942205f6a7a21421ecb36c4e0852))
* **core:** fix `ReferenceError: navigator is not defined` for custom environments; ([#6567](https://github.com/axios/axios/issues/6567)) ([fed1a4b](https://github.com/axios/axios/commit/fed1a4b2d78ed4a588c84e09d32749ed01dc2794))
* **fetch:** fix credentials handling in Cloudflare workers ([#6533](https://github.com/axios/axios/issues/6533)) ([550d885](https://github.com/axios/axios/commit/550d885eb90fd156add7b93bbdc54d30d2f9a98d))

### 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 "+187/-83 (#6573 #6567 #6566 #6564 #6563 #6557 #6556 #6555 #6554 #6552 )")
- <img src="https://avatars.githubusercontent.com/u/2495809?v&#x3D;4&amp;s&#x3D;18" alt="avatar" width="18"/> [Antonin Bas](https://github.com/antoninbas "+6/-6 (#6572 )")
- <img src="https://avatars.githubusercontent.com/u/5406212?v&#x3D;4&amp;s&#x3D;18" alt="avatar" width="18"/> [Hans Otto Wirtz](https://github.com/hansottowirtz "+4/-1 (#6533 )")

## [1.7.4](https://github.com/axios/axios/compare/v1.7.3...v1.7.4) (2024-08-13)


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.4",
"version": "1.7.5",
"homepage": "https://axios-http.com",
"authors": [
"Matt Zabriskie"
Expand Down
51 changes: 29 additions & 22 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.

27 changes: 17 additions & 10 deletions dist/browser/axios.cjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Axios v1.7.4 Copyright (c) 2024 Matt Zabriskie and contributors
// Axios v1.7.5 Copyright (c) 2024 Matt Zabriskie and contributors
'use strict';

function bind(fn, thisArg) {
Expand Down Expand Up @@ -789,7 +789,10 @@ function AxiosError(message, code, config, request, response) {
code && (this.code = code);
config && (this.config = config);
request && (this.request = request);
response && (this.response = response);
if (response) {
this.response = response;
this.status = response.status ? response.status : null;
}
}

utils$1.inherits(AxiosError, Error, {
Expand All @@ -809,7 +812,7 @@ utils$1.inherits(AxiosError, Error, {
// Axios
config: utils$1.toJSONObject(this.config),
code: this.code,
status: this.response && this.response.status ? this.response.status : null
status: this.status
};
}
});
Expand Down Expand Up @@ -1277,6 +1280,8 @@ var platform$1 = {

const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';

const _navigator = typeof navigator === 'object' && navigator || undefined;

/**
* Determine if we're running in a standard browser environment
*
Expand All @@ -1294,10 +1299,8 @@ const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'unde
*
* @returns {boolean}
*/
const hasStandardBrowserEnv = (
(product) => {
return hasBrowserEnv && ['ReactNative', 'NativeScript', 'NS'].indexOf(product) < 0
})(typeof navigator !== 'undefined' && navigator.product);
const hasStandardBrowserEnv = hasBrowserEnv &&
(!_navigator || ['ReactNative', 'NativeScript', 'NS'].indexOf(_navigator.product) < 0);

/**
* Determine if we're running in a standard browser webWorker environment
Expand All @@ -1324,6 +1327,7 @@ var utils = /*#__PURE__*/Object.freeze({
hasBrowserEnv: hasBrowserEnv,
hasStandardBrowserWebWorkerEnv: hasStandardBrowserWebWorkerEnv,
hasStandardBrowserEnv: hasStandardBrowserEnv,
navigator: _navigator,
origin: origin
});

Expand Down Expand Up @@ -2153,7 +2157,7 @@ var isURLSameOrigin = platform.hasStandardBrowserEnv ?
// Standard browser envs have full support of the APIs needed to test
// whether the request URL is of the same origin as current location.
(function standardBrowserEnv() {
const msie = /(msie|trident)/i.test(navigator.userAgent);
const msie = platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent);
const urlParsingNode = document.createElement('a');
let originURL;

Expand Down Expand Up @@ -2890,14 +2894,17 @@ var fetchAdapter = isFetchSupported && (async (config) => {
withCredentials = withCredentials ? 'include' : 'omit';
}

// Cloudflare Workers throws when credentials are defined
// see https://github.com/cloudflare/workerd/issues/902
const isCredentialsSupported = "credentials" in Request.prototype;
request = new Request(url, {
...fetchOptions,
signal: composedSignal,
method: method.toUpperCase(),
headers: headers.normalize().toJSON(),
body: data,
duplex: "half",
credentials: withCredentials
credentials: isCredentialsSupported ? withCredentials : undefined
});

let response = await fetch(request);
Expand Down Expand Up @@ -3108,7 +3115,7 @@ function dispatchRequest(config) {
});
}

const VERSION = "1.7.4";
const VERSION = "1.7.5";

const validators$1 = {};

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

Large diffs are not rendered by default.

27 changes: 17 additions & 10 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 59cd6b0

Please sign in to comment.