Skip to content

Commit

Permalink
Moved axios from 0.27.2 to 1.6.0.
Browse files Browse the repository at this point in the history
Signed-off-by: Eric Le Ponner <[email protected]>
  • Loading branch information
ericleponner committed Oct 30, 2023
1 parent a98df5f commit f5c836c
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 42 deletions.
60 changes: 23 additions & 37 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"@metamask/detect-provider": "^2.0.0",
"@metamask/providers": "^13.1.0",
"@oruga-ui/oruga-next": "^0.7.0",
"axios": "^0.27.2",
"axios": "^1.6.0",
"base32-decode": "^1.0.0",
"base32-encode": "^1.2.0",
"bulma": "^0.9.4",
Expand Down
6 changes: 3 additions & 3 deletions src/utils/AxiosMonitor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*
*/

import axios, {Axios, AxiosRequestConfig, AxiosResponse} from "axios";
import axios, {Axios, AxiosResponse, InternalAxiosRequestConfig} from "axios";
import {ref} from "vue";

export class AxiosMonitor {
Expand Down Expand Up @@ -58,7 +58,7 @@ export class AxiosMonitor {
if (this.targetAxios !== null) {

this.requestInterceptor = this.targetAxios.interceptors.request.use(
(value: AxiosRequestConfig) => this.requestIntercepted(value))
(value: InternalAxiosRequestConfig) => this.requestIntercepted(value))

this.responseInterceptor = this.targetAxios.interceptors.response.use(
(response: AxiosResponse) => this.requestFullfilled(response),
Expand Down Expand Up @@ -142,7 +142,7 @@ export class AxiosMonitor {
// Private
//

private requestIntercepted(value: AxiosRequestConfig): Promise<AxiosRequestConfig>|AxiosRequestConfig {
private requestIntercepted(value: InternalAxiosRequestConfig): Promise<InternalAxiosRequestConfig>|InternalAxiosRequestConfig {
this.activeRequestCount += 1
this.stateDidChange()
return value
Expand Down
2 changes: 1 addition & 1 deletion src/utils/table/TableController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ export abstract class TableController<R, K> {
console.log("reason=" + reason)
if (axios.isAxiosError(reason)) {
const axiosError = reason as AxiosError
console.log("url=" + axiosError.config.url)
console.log("url=" + axiosError.config?.url)
}
}

Expand Down

0 comments on commit f5c836c

Please sign in to comment.