Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TECH] Upgrade Axios to latest #3917

Merged
merged 6 commits into from
Nov 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"@mui/material": "5.11.12",
"@node-steam/vdf": "2.2.0",
"@shockpkg/icon-encoder": "2.1.3",
"axios": "0.26.1",
"axios": "1.7.7",
"classnames": "2.3.1",
"compare-versions": "6.1.0",
"crc": "4.3.2",
Expand Down
29 changes: 18 additions & 11 deletions pnpm-lock.yaml

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

4 changes: 0 additions & 4 deletions src/backend/online_monitor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@ import axios from 'axios'
import EventEmitter from 'node:events'
import { sendFrontendMessage } from './main_window'

//**********FORCE TO USE http adapter (node.js version):*****
axios.defaults.adapter = require('axios/lib/adapters/http.js')
//**********FORCE TO USE http adapter (node.js version):*****

let status: ConnectivityStatus
let abortController: AbortController
let retryTimer: NodeJS.Timeout
Expand Down
8 changes: 4 additions & 4 deletions src/backend/storeManagers/gog/library.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { sendFrontendMessage } from '../../main_window'
import axios, { AxiosError, AxiosRequestHeaders, AxiosResponse } from 'axios'
import axios, { AxiosError, AxiosResponse } from 'axios'
import { GOGUser } from './user'
import {
GameInfo,
Expand Down Expand Up @@ -854,7 +854,7 @@ export async function getBuilds(
url.searchParams.set('password', password)
}

const headers: AxiosRequestHeaders = {}
const headers: Record<string, string> = {}
if (access_token) {
headers.Authorization = `Bearer ${access_token}`
}
Expand Down Expand Up @@ -1206,7 +1206,7 @@ export async function getGamesdbData(
logError(
[
`Was not able to get GamesDB data for ${game_id}`,
error.response?.data.error_description
error.response?.data
],
LogPrefix.ExtraGameInfo
)
Expand Down Expand Up @@ -1250,7 +1250,7 @@ export async function getProductApi(
url.searchParams.set('expand', expand.join(','))
}

const headers: AxiosRequestHeaders = {}
const headers: Record<string, string> = {}
if (accessToken) {
headers.Authorization = `Bearer ${accessToken}`
}
Expand Down
2 changes: 1 addition & 1 deletion src/backend/wiki_game_info/protondb/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export async function getInfoFromProtonDB(
logError(
[
`Was not able to get ProtonDB data for ${steamID}`,
error.response?.data.error_description
error.response?.data
],
LogPrefix.ExtraGameInfo
)
Expand Down
2 changes: 1 addition & 1 deletion src/backend/wiki_game_info/steamdeck/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export async function getSteamDeckComp(
logError(
[
`Was not able to get Stem Deck data for ${steamID}`,
error.response?.data.error_description
error.response?.data
],
LogPrefix.ExtraGameInfo
)
Expand Down
Loading