Skip to content

Commit

Permalink
Upgrade axios to 0.21.1 as peerDependency
Browse files Browse the repository at this point in the history
And fix code for its new types
  • Loading branch information
Jan Kumer committed Jul 30, 2024
1 parent 6df35e7 commit d5cccee
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 70 deletions.
96 changes: 30 additions & 66 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 @@ -11,7 +11,7 @@
"@turf/helpers": "^6.1.4",
"@types/proj4": "^2.5.2",
"@types/xml2js": "^0.4.4",
"axios": "^0.18.1",
"axios": "^0.21.1",
"moment": "^2.24.0",
"polygon-clipping": "^0.14.3",
"proj4": "^2.9.0",
Expand Down
2 changes: 1 addition & 1 deletion src/utils/Cache.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { AxiosRequestConfig, AxiosResponse } from 'axios';
import { AxiosRequestConfig, AxiosResponse, ResponseType } from 'axios';

export type CacheTargets = CacheTarget[];
export enum CacheTarget {
Expand Down
9 changes: 7 additions & 2 deletions src/utils/cancelRequests.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
import axios, { CancelTokenSource, AxiosRequestConfig, CancelToken as CancelTokenAxios } from 'axios';
import axios, {
CancelTokenSource,
AxiosRequestConfig,
CancelToken as CancelTokenAxios,
ResponseType,
} from 'axios';
import { CacheConfig, removeCacheableRequestsInProgress } from './cacheHandlers';
import { getDefaultRequestsConfig } from './defaultReqsConfig';

Expand All @@ -8,7 +13,7 @@ export type RequestConfiguration = {
timeout?: number | null;
cancelToken?: CancelToken;
cache?: CacheConfig;
responseType?: string;
responseType?: ResponseType;
rewriteUrlFunc?: (url: string) => string;
};

Expand Down

0 comments on commit d5cccee

Please sign in to comment.