Skip to content

Commit

Permalink
feat(axios): upgrade axios
Browse files Browse the repository at this point in the history
EME-5329

BREAKING CHANGE: axios first major version upgrade

Co-authored-by: Gabor Nemeth <gabor.nemeth@emarsys.com>
  • Loading branch information
sonicoder86 and Gabor Nemeth committed Oct 21, 2022
1 parent 80d66f5 commit 2081c1f
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 10 deletions.
16 changes: 8 additions & 8 deletions package.json
Expand Up @@ -4,7 +4,7 @@
"scripts": {
"test": "mocha --require ts-node/register --extension ts ./src --recursive",
"test:watch": "mocha --require ts-node/register --extension ts ./src --recursive --watch",
"lint": "eslint ./src/**/*.{ts,js}",
"lint": "eslint ./src/**/*.ts",
"build": "rm -rf dist && tsc --project ./tsconfig.json",
"release": "CI=true semantic-release"
},
Expand All @@ -29,8 +29,8 @@
"node": ">=14.0.0"
},
"dependencies": {
"@emartech/json-logger": "6.0.0",
"axios": "0.27.2",
"@emartech/json-logger": "7.2.3",
"axios": "1.1.3",
"escher-auth": "3.2.4"
},
"devDependencies": {
Expand All @@ -40,15 +40,15 @@
"@types/node": "18.7.23",
"@types/sinon": "10.0.13",
"@types/sinon-chai": "3.2.8",
"@typescript-eslint/parser": "5.35.1",
"@typescript-eslint/parser": "5.40.1",
"chai": "4.3.6",
"chai-subset": "1.6.0",
"eslint": "7.21.0",
"eslint": "8.25.0",
"eslint-config-emarsys": "5.1.0",
"eslint-plugin-no-only-tests": "2.4.0",
"eslint-plugin-security": "1.4.0",
"eslint-plugin-no-only-tests": "3.0.0",
"eslint-plugin-security": "1.5.0",
"mocha": "10.0.0",
"semantic-release": "17.4.7",
"semantic-release": "19.0.5",
"sinon": "14.0.0",
"sinon-chai": "3.7.0",
"ts-node": "10.9.1",
Expand Down
11 changes: 9 additions & 2 deletions src/wrapper.ts
@@ -1,6 +1,13 @@
import { EscherRequestError } from './requestError';
import { RequestOptions } from './requestOption';
import { AxiosError, AxiosRequestConfig, AxiosResponse, AxiosResponseHeaders, CancelTokenSource } from 'axios';
import {
AxiosError,
AxiosRequestConfig,
AxiosResponse,
AxiosResponseHeaders,
CancelTokenSource,
RawAxiosResponseHeaders
} from 'axios';
import { Agent as HttpAgent } from 'http';
import { Agent as HttpsAgent } from 'https';
import axios from 'axios';
Expand All @@ -20,7 +27,7 @@ export interface TransformedResponse<T = any> {
body: T,
statusCode: number;
statusMessage: string;
headers: AxiosResponseHeaders
headers: RawAxiosResponseHeaders | AxiosResponseHeaders
}

export class RequestWrapper {
Expand Down

0 comments on commit 2081c1f

Please sign in to comment.