diff --git a/package.json b/package.json index 995bf19..c9cd664 100755 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ "@types/node": "^14.14.22", "@types/sinon": "^9.0.10", "ava": "^3.15.0", - "axios": "^0.21.1", + "axios": ">=0.21.1", "codecov": "^3.8.1", "husky": "^4.3.8", "np": "^7.2.0", diff --git a/src/throttleAdapterEnhancer.ts b/src/throttleAdapterEnhancer.ts index a678dd7..48ca435 100644 --- a/src/throttleAdapterEnhancer.ts +++ b/src/throttleAdapterEnhancer.ts @@ -28,7 +28,7 @@ export default function throttleAdapterEnhancer(adapter: AxiosAdapter, options: const responsePromise = (async () => { try { - + // @ts-ignore const response = await adapter(config); cache.set(index, { diff --git a/src/utils/buildSortedURL.ts b/src/utils/buildSortedURL.ts index 5e5ae90..70acd6d 100644 --- a/src/utils/buildSortedURL.ts +++ b/src/utils/buildSortedURL.ts @@ -4,12 +4,11 @@ * @since 2017-10-12 */ -// @ts-ignore -import buildURL from 'axios/lib/helpers/buildURL'; +import axios from 'axios'; export default function buildSortedURL(...args: any[]) { - - const builtURL = buildURL(...args); + const [url, params, paramsSerializer] = args; + const builtURL = axios.getUri({ url, params, paramsSerializer }); const [urlPath, queryString] = builtURL.split('?');