Skip to content

Commit e0ae024

Browse files
Upgrade dependencies
1 parent 2498f6a commit e0ae024

4 files changed

Lines changed: 307 additions & 304 deletions

File tree

package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,19 +49,19 @@
4949
},
5050
"author": "Ipregistry <support@ipregistry.co>",
5151
"devDependencies": {
52-
"@types/chai": "^4.2.21",
52+
"@types/chai": "^4.2.22",
5353
"@types/lru-cache": "^5.1.1",
54-
"@types/mocha": "~8.2.3",
54+
"@types/mocha": "^9.0.0",
5555
"chai": "^4.3.4",
56-
"mocha": "~8.4.0",
57-
"ts-node": "9.1.0",
56+
"mocha": "^9.1.3",
57+
"ts-node": "^10.4.0",
5858
"tslint": "^6.1.3",
59-
"typescript": "^4.3.5",
60-
"webpack": "^5.46.0",
61-
"webpack-cli": "^4.7.2"
59+
"typescript": "^4.4.4",
60+
"webpack": "^5.60.0",
61+
"webpack-cli": "^4.9.1"
6262
},
6363
"dependencies": {
64-
"axios": "^0.21.1",
64+
"axios": "^0.24.0",
6565
"lru-cache": "^6.0.0"
6666
},
6767
"files": [

src/errors.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,6 @@ export enum ErrorCode {
7171
INVALID_FILTER_SYNTAX = 'INVALID_FILTER_SYNTAX',
7272
INVALID_IP_ADDRESS = 'INVALID_IP_ADDRESS',
7373
MISSING_API_KEY = 'MISSING_API_KEY',
74-
/** @deprecated */
75-
PRIVATE_IP_ADDRESS = 'PRIVATE_IP_ADDRESS',
7674
RESERVED_IP_ADDRESS = 'RESERVED_IP_ADDRESS',
7775
TOO_MANY_IPS = 'TOO_MANY_IPS',
7876
TOO_MANY_REQUESTS = 'TOO_MANY_REQUESTS',

src/request.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,12 @@
1414
* limitations under the License.
1515
*/
1616

17+
import axios, {AxiosResponse} from 'axios';
1718
import {ApiError, ClientError} from './errors';
18-
import {IpInfo, RequesterIpInfo} from './model';
1919
import {IpregistryConfig} from './index';
20+
import {IpInfo, RequesterIpInfo} from './model';
2021
import {IpregistryOption} from './options';
2122

22-
import axios, {AxiosResponse} from 'axios';
23-
2423

2524
export interface ApiResponse<T> {
2625

@@ -102,7 +101,7 @@ export class DefaultRequestHandler implements IpregistryRequestHandler {
102101
data: response.data as IpInfo,
103102
throttling: this.getThrottlingData(response)
104103
};
105-
} catch (error) {
104+
} catch (error: any) {
106105
if (error.isAxiosError && error.response) {
107106
const data = error.response.data;
108107
throw new ApiError(data.code, data.message, data.resolution);
@@ -129,7 +128,7 @@ export class DefaultRequestHandler implements IpregistryRequestHandler {
129128
data: response.data.results,
130129
throttling: this.getThrottlingData(response)
131130
};
132-
} catch (error) {
131+
} catch (error: any) {
133132
if (error.isAxiosError && error.response) {
134133
const data = error.response.data;
135134
throw new ApiError(data.code, data.message, data.resolution);
@@ -155,7 +154,7 @@ export class DefaultRequestHandler implements IpregistryRequestHandler {
155154
data: response.data as RequesterIpInfo,
156155
throttling: this.getThrottlingData(response)
157156
};
158-
} catch (error) {
157+
} catch (error: any) {
159158
if (error.isAxiosError && error.response) {
160159
const data = error.response.data;
161160
throw new ApiError(data.code, data.message, data.resolution);

0 commit comments

Comments
 (0)