Skip to content

Commit

Permalink
refactor: update deps and remove dotenv in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Keith-CY committed Apr 3, 2020
1 parent 9a859ab commit f88237f
Show file tree
Hide file tree
Showing 7 changed files with 1,615 additions and 1,121 deletions.
33 changes: 16 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,25 +26,24 @@
},
"devDependencies": {
"@cryptape/sdk-ts-config": "0.0.1",
"@types/node": "12.12.6",
"@typescript-eslint/eslint-plugin": "2.6.1",
"@typescript-eslint/parser": "2.6.1",
"@types/node": "13.11.0",
"@typescript-eslint/eslint-plugin": "2.26.0",
"@typescript-eslint/parser": "2.26.0",
"commitizen": "4.0.3",
"cz-conventional-changelog": "3.0.2",
"dotenv": "8.2.0",
"eslint": "6.6.0",
"eslint-config-airbnb-base": "14.0.0",
"eslint-config-prettier": "6.7.0",
"eslint-plugin-import": "2.18.2",
"eslint-plugin-jest": "23.0.3",
"eslint-plugin-prettier": "3.1.1",
"husky": "3.0.9",
"jest": "24.9.0",
"cz-conventional-changelog": "3.1.0",
"eslint": "6.8.0",
"eslint-config-airbnb-base": "14.1.0",
"eslint-config-prettier": "6.10.1",
"eslint-plugin-import": "2.20.2",
"eslint-plugin-jest": "23.8.2",
"eslint-plugin-prettier": "3.1.2",
"husky": "4.2.3",
"jest": "25.2.7",
"lerna": "3.20.2",
"lint-staged": "9.4.2",
"prettier": "1.18.2",
"typedoc": "0.15.2",
"typescript": "3.7.2"
"lint-staged": "10.1.1",
"prettier": "2.0.2",
"typedoc": "0.17.3",
"typescript": "3.8.3"
},
"config": {
"commitizen": {
Expand Down
1 change: 0 additions & 1 deletion packages/ckb-sdk-rpc/.env.example

This file was deleted.

10 changes: 2 additions & 8 deletions packages/ckb-sdk-rpc/__tests__/ckb-rpc-helpers.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
const path = require('path')
const http = require('http')
const https = require('https')

const env = path.join(__dirname, '../.env')

const config = require('dotenv').config({
path: env,
}).parsed

const NODE_URL = 'http://localhost:8114'
const CKBRPC = require('../lib').default

const rpc = new CKBRPC(config.RPC_URL)
const rpc = new CKBRPC(NODE_URL)
describe('ckb-rpc settings and helpers', () => {
it('set node url', () => {
const node = {
Expand Down
13 changes: 7 additions & 6 deletions packages/ckb-sdk-rpc/__tests__/ckb-rpc.test.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
const path = require('path')
const http = require('http')

const httpAgent = new http.Agent({ keepAlive: true })

const NODE_URL = 'http://localhost:8114'

const env = path.join(__dirname, '../.env')
const config = require('dotenv').config({
path: env,
}).parsed
const CKBRPC = require('../lib').default

const rpc = new CKBRPC(config.RPC_URL)
const rpc = new CKBRPC(NODE_URL)
rpc.setNode({ httpAgent })

describe('ckb-rpc success', () => {
it('get blockchain info', async () => {
Expand Down
5 changes: 2 additions & 3 deletions packages/ckb-sdk-rpc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,10 @@
},
"dependencies": {
"@nervosnetwork/ckb-sdk-utils": "0.30.0",
"axios": "0.19.0"
"axios": "0.19.2"
},
"devDependencies": {
"@nervosnetwork/ckb-types": "0.30.0",
"dotenv": "8.1.0"
"@nervosnetwork/ckb-types": "0.30.0"
},
"gitHead": "493655c726e4e4918dfe4ac7ef5d1fec1a539117"
}
6 changes: 3 additions & 3 deletions packages/ckb-sdk-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@
"@nervosnetwork/ckb-types": "0.30.0",
"blake2b-wasm": "2.1.0",
"elliptic": "6.5.2",
"jsbi": "3.1.1"
"jsbi": "3.1.2"
},
"devDependencies": {
"@types/bitcoinjs-lib": "4.0.1",
"@types/elliptic": "6.4.8",
"@types/bitcoinjs-lib": "5.0.0",
"@types/elliptic": "6.4.12",
"@types/utf8": "2.1.6"
},
"gitHead": "493655c726e4e4918dfe4ac7ef5d1fec1a539117"
Expand Down
Loading

0 comments on commit f88237f

Please sign in to comment.