Skip to content

Commit

Permalink
Bump axios from 1.2.3 to 1.3.0 in /dashboard (#5937)
Browse files Browse the repository at this point in the history
Bumps [axios](https://github.com/axios/axios) from 1.2.3 to 1.3.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/axios/axios/releases">axios's
releases</a>.</em></p>
<blockquote>
<h2>Release v1.3.0</h2>
<h2>Release notes:</h2>
<h3>Bug Fixes</h3>
<ul>
<li><strong>headers:</strong> fixed &amp; optimized clear method; (<a
href="https://github-redirect.dependabot.com/axios/axios/issues/5507">#5507</a>)
(<a
href="https://github.com/axios/axios/commit/9915635c69d0ab70daca5738488421f67ca60959">9915635</a>)</li>
<li><strong>http:</strong> add zlib headers if missing (<a
href="https://github-redirect.dependabot.com/axios/axios/issues/5497">#5497</a>)
(<a
href="https://github.com/axios/axios/commit/65e8d1e28ce829f47a837e45129730e541950d3c">65e8d1e</a>)</li>
</ul>
<h3>Features</h3>
<ul>
<li><strong>fomdata:</strong> added support for spec-compliant FormData
&amp; Blob types; (<a
href="https://github-redirect.dependabot.com/axios/axios/issues/5316">#5316</a>)
(<a
href="https://github.com/axios/axios/commit/6ac574e00a06731288347acea1e8246091196953">6ac574e</a>)</li>
</ul>
<h3>Contributors to this release</h3>
<ul>
<li><!-- raw HTML omitted --> <a
href="https://github.com/DigitalBrainJS" title="+352/-67
([#5514](axios/axios#5514)
[#5512](axios/axios#5512)
[#5510](axios/axios#5510)
[#5509](axios/axios#5509)
[#5508](axios/axios#5508)
[#5316](axios/axios#5316)
[#5507](axios/axios#5507) )">Dmitriy
Mozgovoy</a></li>
<li><!-- raw HTML omitted --> <a
href="https://github.com/ItsNotGoodName" title="+43/-2
([#5497](axios/axios#5497)
)">ItsNotGoodName</a></li>
</ul>
<h2>Release v1.2.6</h2>
<h2>Release notes:</h2>
<h3>Bug Fixes</h3>
<ul>
<li><strong>headers:</strong> added missed Authorization accessor; (<a
href="https://github-redirect.dependabot.com/axios/axios/issues/5502">#5502</a>)
(<a
href="https://github.com/axios/axios/commit/342c0ba9a16ea50f5ed7d2366c5c1a2c877e3f26">342c0ba</a>)</li>
<li><strong>types:</strong> fixed <code>CommonRequestHeadersList</code>
&amp; <code>CommonResponseHeadersList</code> types to be private in
commonJS; (<a
href="https://github-redirect.dependabot.com/axios/axios/issues/5503">#5503</a>)
(<a
href="https://github.com/axios/axios/commit/5a3d0a3234d77361a1bc7cedee2da1e11df08e2c">5a3d0a3</a>)</li>
</ul>
<h3>Contributors to this release</h3>
<ul>
<li><img
src="https://avatars.githubusercontent.com/u/12586868?v=4&amp;s=16"
alt="avatar" /> <a href="https://github.com/DigitalBrainJS"
title="+24/-9 ([#5503](axios/axios#5503)
[#5502](axios/axios#5502) )">Dmitriy
Mozgovoy</a></li>
</ul>
<h2>Release v1.2.5</h2>
<h2>Release notes:</h2>
<h3>Bug Fixes</h3>
<ul>
<li><strong>types:</strong> fixed AxiosHeaders to handle spread syntax
by making all methods non-enumerable; (<a
href="https://github-redirect.dependabot.com/axios/axios/issues/5499">#5499</a>)
(<a
href="https://github.com/axios/axios/commit/580f1e8033a61baa38149d59fd16019de3932c22">580f1e8</a>)</li>
</ul>
<h3>Contributors to this release</h3>
<ul>
<li><img
src="https://avatars.githubusercontent.com/u/12586868?v=4&amp;s=16"
alt="avatar" /> <a href="https://github.com/DigitalBrainJS"
title="+82/-54 ([#5499](axios/axios#5499)
)">Dmitriy Mozgovoy</a></li>
<li><img
src="https://avatars.githubusercontent.com/u/20516159?v=4&amp;s=16"
alt="avatar" /> <a href="https://github.com/EFord36" title="+1/-1
([#5462](axios/axios#5462) )">Elliot
Ford</a></li>
</ul>
<h2>Release v1.2.4</h2>
<h2>Release notes:</h2>
<h3>Bug Fixes</h3>
<ul>
<li><strong>types:</strong> renamed <code>RawAxiosRequestConfig</code>
back to <code>AxiosRequestConfig</code>; (<a
href="https://github-redirect.dependabot.com/axios/axios/issues/5486">#5486</a>)
(<a
href="https://github.com/axios/axios/commit/2a71f49bc6c68495fa419003a3107ed8bd703ad0">2a71f49</a>)</li>
<li><strong>types:</strong> fix <code>AxiosRequestConfig</code> generic;
(<a
href="https://github-redirect.dependabot.com/axios/axios/issues/5478">#5478</a>)
(<a
href="https://github.com/axios/axios/commit/186ea062da8b7d578ae78b1a5c220986b9bce81b">9bce81b</a>)</li>
</ul>
<h3>Contributors to this release</h3>
<ul>
<li><img
src="https://avatars.githubusercontent.com/u/12586868?v=4&amp;s=16"
alt="avatar" /> <a href="https://github.com/DigitalBrainJS"
title="+242/-108 ([#5486](axios/axios#5486)
[#5482](axios/axios#5482) )">Dmitriy
Mozgovoy</a></li>
<li><img
src="https://avatars.githubusercontent.com/u/9430821?v=4&amp;s=16"
alt="avatar" /> <a href="https://github.com/hilleer" title="+1/-1
([#5478](axios/axios#5478) )">Daniel
Hillmann</a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/axios/axios/blob/v1.x/CHANGELOG.md">axios's
changelog</a>.</em></p>
<blockquote>
<h1><a
href="https://github.com/axios/axios/compare/v1.2.6...v1.3.0">1.3.0</a>
(2023-01-31)</h1>
<h3>Bug Fixes</h3>
<ul>
<li><strong>headers:</strong> fixed &amp; optimized clear method; (<a
href="https://github-redirect.dependabot.com/axios/axios/issues/5507">#5507</a>)
(<a
href="https://github.com/axios/axios/commit/9915635c69d0ab70daca5738488421f67ca60959">9915635</a>)</li>
<li><strong>http:</strong> add zlib headers if missing (<a
href="https://github-redirect.dependabot.com/axios/axios/issues/5497">#5497</a>)
(<a
href="https://github.com/axios/axios/commit/65e8d1e28ce829f47a837e45129730e541950d3c">65e8d1e</a>)</li>
</ul>
<h3>Features</h3>
<ul>
<li><strong>fomdata:</strong> added support for spec-compliant FormData
&amp; Blob types; (<a
href="https://github-redirect.dependabot.com/axios/axios/issues/5316">#5316</a>)
(<a
href="https://github.com/axios/axios/commit/6ac574e00a06731288347acea1e8246091196953">6ac574e</a>)</li>
</ul>
<h3>Contributors to this release</h3>
<ul>
<li><!-- raw HTML omitted --> <a
href="https://github.com/DigitalBrainJS" title="+352/-67
([#5514](axios/axios#5514)
[#5512](axios/axios#5512)
[#5510](axios/axios#5510)
[#5509](axios/axios#5509)
[#5508](axios/axios#5508)
[#5316](axios/axios#5316)
[#5507](axios/axios#5507) )">Dmitriy
Mozgovoy</a></li>
<li><!-- raw HTML omitted --> <a
href="https://github.com/ItsNotGoodName" title="+43/-2
([#5497](axios/axios#5497)
)">ItsNotGoodName</a></li>
</ul>
<h2><a
href="https://github.com/axios/axios/compare/v1.2.5...v1.2.6">1.2.6</a>
(2023-01-28)</h2>
<h3>Bug Fixes</h3>
<ul>
<li><strong>headers:</strong> added missed Authorization accessor; (<a
href="https://github-redirect.dependabot.com/axios/axios/issues/5502">#5502</a>)
(<a
href="https://github.com/axios/axios/commit/342c0ba9a16ea50f5ed7d2366c5c1a2c877e3f26">342c0ba</a>)</li>
<li><strong>types:</strong> fixed <code>CommonRequestHeadersList</code>
&amp; <code>CommonResponseHeadersList</code> types to be private in
commonJS; (<a
href="https://github-redirect.dependabot.com/axios/axios/issues/5503">#5503</a>)
(<a
href="https://github.com/axios/axios/commit/5a3d0a3234d77361a1bc7cedee2da1e11df08e2c">5a3d0a3</a>)</li>
</ul>
<h3>Contributors to this release</h3>
<ul>
<li><img
src="https://avatars.githubusercontent.com/u/12586868?v=4&amp;s=16"
alt="avatar" /> <a href="https://github.com/DigitalBrainJS"
title="+24/-9 ([#5503](axios/axios#5503)
[#5502](axios/axios#5502) )">Dmitriy
Mozgovoy</a></li>
</ul>
<h2><a
href="https://github.com/axios/axios/compare/v1.2.4...v1.2.5">1.2.5</a>
(2023-01-26)</h2>
<h3>Bug Fixes</h3>
<ul>
<li><strong>types:</strong> fixed AxiosHeaders to handle spread syntax
by making all methods non-enumerable; (<a
href="https://github-redirect.dependabot.com/axios/axios/issues/5499">#5499</a>)
(<a
href="https://github.com/axios/axios/commit/580f1e8033a61baa38149d59fd16019de3932c22">580f1e8</a>)</li>
</ul>
<h3>Contributors to this release</h3>
<ul>
<li><img
src="https://avatars.githubusercontent.com/u/12586868?v=4&amp;s=16"
alt="avatar" /> <a href="https://github.com/DigitalBrainJS"
title="+82/-54 ([#5499](axios/axios#5499)
)">Dmitriy Mozgovoy</a></li>
<li><img
src="https://avatars.githubusercontent.com/u/20516159?v=4&amp;s=16"
alt="avatar" /> <a href="https://github.com/EFord36" title="+1/-1
([#5462](axios/axios#5462) )">Elliot
Ford</a></li>
</ul>
<h2><a
href="https://github.com/axios/axios/compare/v1.2.3...v1.2.4">1.2.4</a>
(2023-01-22)</h2>
<h3>Bug Fixes</h3>
<ul>
<li><strong>types:</strong> renamed <code>RawAxiosRequestConfig</code>
back to <code>AxiosRequestConfig</code>; (<a
href="https://github-redirect.dependabot.com/axios/axios/issues/5486">#5486</a>)
(<a
href="https://github.com/axios/axios/commit/2a71f49bc6c68495fa419003a3107ed8bd703ad0">2a71f49</a>)</li>
<li><strong>types:</strong> fix <code>AxiosRequestConfig</code> generic;
(<a
href="https://github-redirect.dependabot.com/axios/axios/issues/5478">#5478</a>)
(<a
href="https://github.com/axios/axios/commit/186ea062da8b7d578ae78b1a5c220986b9bce81b">9bce81b</a>)</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/axios/axios/commit/7fbfbbeff69904cd64e8ac62da8969a1e633ee23"><code>7fbfbbe</code></a>
chore(release): v1.3.0 (<a
href="https://github-redirect.dependabot.com/axios/axios/issues/5513">#5513</a>)</li>
<li><a
href="https://github.com/axios/axios/commit/926347315405e43842373b646c8a23d3700ab53f"><code>9263473</code></a>
chore(ci): fixed contributors avatar rendering for CHANGELOG.md; (<a
href="https://github-redirect.dependabot.com/axios/axios/issues/5514">#5514</a>)</li>
<li><a
href="https://github.com/axios/axios/commit/995737726024c6741cf4a09508d004c4f1323ffb"><code>9957377</code></a>
chore(ci): change release-it git config; (<a
href="https://github-redirect.dependabot.com/axios/axios/issues/5512">#5512</a>)</li>
<li><a
href="https://github.com/axios/axios/commit/46a650cf338953e69a22d3623a1810578b9b072e"><code>46a650c</code></a>
chore(ci): prepare package-lock.json for commit on build stage; (<a
href="https://github-redirect.dependabot.com/axios/axios/issues/5510">#5510</a>)</li>
<li><a
href="https://github.com/axios/axios/commit/4bf50524e20cfd5436f71cda9a79f23452f0eb3e"><code>4bf5052</code></a>
chore(ci): add git diff echo; (<a
href="https://github-redirect.dependabot.com/axios/axios/issues/5509">#5509</a>)</li>
<li><a
href="https://github.com/axios/axios/commit/91d6009c43fd1e8ca76cfaeaab66ce228593d8f6"><code>91d6009</code></a>
chore(ci): add git status echo; (<a
href="https://github-redirect.dependabot.com/axios/axios/issues/5508">#5508</a>)</li>
<li><a
href="https://github.com/axios/axios/commit/6ac574e00a06731288347acea1e8246091196953"><code>6ac574e</code></a>
feat(fomdata): added support for spec-compliant FormData &amp; Blob
types; (<a
href="https://github-redirect.dependabot.com/axios/axios/issues/5316">#5316</a>)</li>
<li><a
href="https://github.com/axios/axios/commit/65e8d1e28ce829f47a837e45129730e541950d3c"><code>65e8d1e</code></a>
fix(http): add zlib headers if missing (<a
href="https://github-redirect.dependabot.com/axios/axios/issues/5497">#5497</a>)</li>
<li><a
href="https://github.com/axios/axios/commit/9915635c69d0ab70daca5738488421f67ca60959"><code>9915635</code></a>
fix(headers): fixed &amp; optimized clear method; (<a
href="https://github-redirect.dependabot.com/axios/axios/issues/5507">#5507</a>)</li>
<li><a
href="https://github.com/axios/axios/commit/5bde91cac787d92ae56c6cb293941244cc4c617d"><code>5bde91c</code></a>
chore(release): v1.2.6 (<a
href="https://github-redirect.dependabot.com/axios/axios/issues/5505">#5505</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/axios/axios/compare/v1.2.3...v1.3.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=axios&package-manager=npm_and_yarn&previous-version=1.2.3&new-version=1.3.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Antonio Gamez Diaz <agamez@vmware.com>
  • Loading branch information
dependabot[bot] and antgamdia committed Feb 1, 2023
1 parent 7dab6dd commit d1766ee
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 16 deletions.
2 changes: 1 addition & 1 deletion dashboard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"@tanstack/react-table": "^8.7.8",
"@types/react": "^17.0.39",
"ajv": "^8.12.0",
"axios": "^1.2.3",
"axios": "^1.3.0",
"connected-react-router": "^6.9.3",
"fast-json-patch": "^3.1.1",
"google-protobuf": "^3.21.2",
Expand Down
3 changes: 1 addition & 2 deletions dashboard/src/shared/AxiosInstance.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright 2018-2022 the Kubeapps contributors.
// SPDX-License-Identifier: Apache-2.0

import { AxiosRequestHeaders } from "axios";
import MockAdapter from "axios-mock-adapter";
import { IAuthState } from "reducers/auth";
import configureMockStore from "redux-mock-store";
Expand Down Expand Up @@ -68,7 +67,7 @@ describe("createAxiosInterceptorWithAuth", () => {

await axios.get(testPath);
const request = axiosMock.history.get[0];
expect((request?.headers as AxiosRequestHeaders)?.Authorization).toBe(`Bearer ${authToken}`);
expect(request?.headers?.Authorization).toBe(`Bearer ${authToken}`);
});

const testCases = [
Expand Down
12 changes: 3 additions & 9 deletions dashboard/src/shared/AxiosInstance.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
// Copyright 2018-2022 the Kubeapps contributors.
// SPDX-License-Identifier: Apache-2.0

import Axios, {
AxiosError,
AxiosInstance,
AxiosRequestConfig,
AxiosRequestHeaders,
AxiosResponse,
} from "axios";
import Axios, { AxiosError, AxiosInstance, AxiosResponse } from "axios";
import { Action, Store } from "redux";
import { ThunkDispatch } from "redux-thunk";
import actions from "../actions";
Expand All @@ -24,10 +18,10 @@ import {
} from "./types";

export function addAuthHeaders(axiosInstance: AxiosInstance) {
axiosInstance.interceptors.request.use((config: AxiosRequestConfig) => {
axiosInstance.interceptors.request.use(config => {
const authToken = Auth.getAuthToken();
if (authToken && config?.headers) {
(config.headers as AxiosRequestHeaders).Authorization = `Bearer ${authToken}`;
config.headers.Authorization = `Bearer ${authToken}`;
}
return config;
});
Expand Down
8 changes: 4 additions & 4 deletions dashboard/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3379,10 +3379,10 @@ axios-mock-adapter@^1.21.2:
fast-deep-equal "^3.1.3"
is-buffer "^2.0.5"

axios@^1.2.3:
version "1.2.3"
resolved "https://registry.yarnpkg.com/axios/-/axios-1.2.3.tgz#31a3d824c0ebf754a004b585e5f04a5f87e6c4ff"
integrity sha512-pdDkMYJeuXLZ6Xj/Q5J3Phpe+jbGdsSzlQaFVkMQzRUL05+6+tetX8TV3p4HrU4kzuO9bt+io/yGQxuyxA/xcw==
axios@^1.3.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/axios/-/axios-1.3.0.tgz#4cb0d72213989dec08d4b10129e42063bcb3dc78"
integrity sha512-oCye5nHhTypzkdLIvF9SaHfr8UAquqCn1KY3j8vsrjeol8yohAdGxIpRPbF1bOLsx33HOAatdfMX1yzsj2cHwg==
dependencies:
follow-redirects "^1.15.0"
form-data "^4.0.0"
Expand Down

0 comments on commit d1766ee

Please sign in to comment.