Skip to content

Commit

Permalink
Upgrade dependencies (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
dguo authored Mar 25, 2023
1 parent dc2de8f commit 02766e8
Show file tree
Hide file tree
Showing 6 changed files with 1,998 additions and 1,812 deletions.
541 changes: 541 additions & 0 deletions .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs

Large diffs are not rendered by default.

7 changes: 6 additions & 1 deletion .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
nodeLinker: "node-modules"
nodeLinker: node-modules

plugins:
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
spec: "@yarnpkg/plugin-interactive-tools"

yarnPath: .yarn/releases/yarn-3.5.0.cjs
34 changes: 17 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,32 +32,32 @@
"clean": "rimraf build",
"example": "node -r dotenv/config example.js",
"format": "prettier --write \"./**/*.{json,ts}\"",
"format:check": "prettier --list-different \"./**/*.{json,ts}\"",
"format:check": "prettier --check \"./**/*.{json,ts}\"",
"lint": "eslint \"./**/*.ts\"",
"prepublishOnly": "yarn run format && yarn run lint && yarn run test && yarn run build",
"start": "yarn install && yarn run build:watch",
"test": "jest",
"test:watch": "jest --watchAll"
},
"dependencies": {
"axios": "^0.21.1",
"retry-axios": "^2.4.0",
"uuid": "^8.3.2"
"axios": "^1.3.4",
"uuid": "^9.0.0"
},
"devDependencies": {
"@types/jest": "^26.0.23",
"@types/uuid": "^8.3.0",
"@typescript-eslint/eslint-plugin": "^4.26.1",
"@typescript-eslint/parser": "^4.26.1",
"dotenv": "^10.0.0",
"eslint": "^7.28.0",
"eslint-config-prettier": "^8.3.0",
"jest": "^27.0.4",
"nock": "^13.1.0",
"prettier": "^2.3.1",
"rimraf": "^3.0.2",
"ts-jest": "^27.0.3",
"typescript": "^4.3.2"
"@types/jest": "^29.5.0",
"@types/node": "^18.15.10",
"@types/uuid": "^9.0.1",
"@typescript-eslint/eslint-plugin": "^5.56.0",
"@typescript-eslint/parser": "^5.56.0",
"dotenv": "^16.0.3",
"eslint": "^8.36.0",
"eslint-config-prettier": "^8.8.0",
"jest": "^29.5.0",
"nock": "^13.3.0",
"prettier": "^2.8.7",
"rimraf": "^4.4.1",
"ts-jest": "^29.0.5",
"typescript": "^5.0.2"
},
"eslintConfig": {
"parser": "@typescript-eslint/parser",
Expand Down
10 changes: 0 additions & 10 deletions source/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import crypto from "crypto";

import axios, {AxiosInstance} from "axios";
import rax from "retry-axios";
import {v4 as uuidV4} from "uuid";

import {
Expand Down Expand Up @@ -31,10 +30,6 @@ export class Coinbase {
baseURL: "https://api.coinbase.com",
...options?.axiosConfig
});
this.#axiosInstance.defaults.raxConfig = {
instance: this.#axiosInstance
};
rax.attach(this.#axiosInstance);

this.#apiKey = options?.apiKey ?? null;
this.#apiSecret = options?.apiSecret ?? null;
Expand Down Expand Up @@ -145,11 +140,6 @@ export class Coinbase {
headers: {
...headers,
...options.axiosConfig?.headers
},
raxConfig: {
// Retrying is okay because we always send an idempotency token
httpMethodsToRetry: [method],
...options.axiosConfig?.raxConfig
}
});

Expand Down
3 changes: 1 addition & 2 deletions source/types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import {AxiosRequestConfig} from "axios";
import {RetryConfig} from "retry-axios";

interface AuthenticationOptions {
apiKey?: string;
Expand All @@ -21,7 +20,7 @@ export interface RequestHeaders {
}

export interface Options extends AuthenticationOptions {
axiosConfig?: AxiosRequestConfig & {raxConfig?: RetryConfig};
axiosConfig?: AxiosRequestConfig;
mockMode?: boolean;
}

Expand Down
Loading

0 comments on commit 02766e8

Please sign in to comment.