Skip to content

Commit df86a78

Browse files
Merge pull request #92 from taylorjdawson/fix/update-deps
Fix linter, update deps
2 parents 4a6e449 + 4ec027e commit df86a78

File tree

18 files changed

+2420
-1632
lines changed

18 files changed

+2420
-1632
lines changed

dist/web3data.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/api.md

Lines changed: 238 additions & 236 deletions
Large diffs are not rendered by default.

package-lock.json

Lines changed: 2067 additions & 1288 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 26 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -33,56 +33,59 @@
3333
"litecoin",
3434
"zcash"
3535
],
36-
"authors": ["@trevorjtclarke", "Taylor Dawson"],
36+
"authors": [
37+
"@trevorjtclarke",
38+
"Taylor Dawson"
39+
],
3740
"license": "Apache-2.0",
3841
"bugs": {
3942
"url": "https://github.com/web3data/web3data-js/issues"
4043
},
4144
"homepage": "https://github.com/web3data/web3data-js#readme",
4245
"devDependencies": {
43-
"@ava/babel": "^1.0.0",
46+
"@ava/babel": "^1.0.1",
4447
"@ava/babel-preset-stage-4": "^4.0.0",
4548
"@babel/cli": "^7.8.4",
46-
"@babel/core": "^7.8.4",
47-
"@babel/plugin-transform-runtime": "^7.8.3",
48-
"@babel/preset-env": "^7.8.4",
49-
"@babel/register": "^7.8.3",
50-
"@pollyjs/adapter-node-http": "^4.0.3",
51-
"@pollyjs/core": "^4.0.2",
52-
"@pollyjs/persister-fs": "^4.0.2",
53-
"ava": "^3.1.0",
49+
"@babel/core": "^7.9.0",
50+
"@babel/plugin-transform-runtime": "^7.9.0",
51+
"@babel/preset-env": "^7.9.5",
52+
"@babel/register": "^7.9.0",
53+
"@pollyjs/adapter-node-http": "^4.1.0",
54+
"@pollyjs/core": "^4.1.0",
55+
"@pollyjs/persister-fs": "^4.1.0",
56+
"ava": "^3.7.1",
5457
"capture-console": "^1.0.1",
55-
"cross-env": "^7.0.0",
58+
"cross-env": "^7.0.2",
5659
"docsify-cli": "^4.4.0",
5760
"dotenv": "^8.2.0",
5861
"doxdox": "^3.0.0",
5962
"doxdox-parser-dox": "github:taylorjdawson/doxdox-parser-dox",
60-
"doxdox-plugin-markdown": "github:taylorjdawson/doxdox-plugin-markdown",
61-
"eslint-plugin-jsdoc": "^21.0.0",
63+
"doxdox-plugin-markdown": "taylorjdawson/doxdox-plugin-markdown",
64+
"eslint-plugin-jsdoc": "^24.0.0",
6265
"get-port": "^5.1.1",
63-
"husky": "^4.2.1",
66+
"husky": "^4.2.5",
6467
"jsdoc-to-markdown": "^5.0.3",
6568
"lodash": "^4.17.15",
66-
"nyc": "^15.0.0",
69+
"nyc": "^15.0.1",
6770
"parcel": "^1.12.4",
68-
"prettier": "^1.19.1",
69-
"rimraf": "^3.0.1",
70-
"rollup": "^1.30.1",
71+
"prettier": "^2.0.5",
72+
"rimraf": "^3.0.2",
73+
"rollup": "^2.7.2",
7174
"rollup-plugin-commonjs": "^10.1.0",
72-
"rollup-plugin-filesize": "^6.2.1",
75+
"rollup-plugin-filesize": "^7.0.0",
7376
"rollup-plugin-json": "^4.0.0",
7477
"rollup-plugin-node-builtins": "^2.1.2",
7578
"rollup-plugin-node-globals": "^1.4.0",
7679
"rollup-plugin-node-resolve": "^5.2.0",
77-
"rollup-plugin-terser": "^5.2.0",
80+
"rollup-plugin-terser": "^5.3.0",
7881
"superstatic": "^6.0.4",
79-
"xo": "^0.25.3"
82+
"xo": "^0.29.1"
8083
},
8184
"dependencies": {
8285
"axios": "^0.19.2",
8386
"isomorphic-ws": "^4.0.1",
84-
"uuid": "^3.4.0",
85-
"ws": "^7.2.1"
87+
"uuid": "^7.0.3",
88+
"ws": "^7.2.3"
8689
},
8790
"publishConfig": {
8891
"access": "public"

src/bch.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ class Bch {
1717
}
1818

1919
/* See Web3Data class for details on rpc method */
20-
rpc(method, params) {
21-
return this.web3data.rpc(method, params)
20+
rpc(method, parameters) {
21+
return this.web3data.rpc(method, parameters)
2222
}
2323
}
2424

src/block.js

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -57,34 +57,36 @@ class Block {
5757
}
5858

5959
/**
60-
* Retrieves the latest block number
60+
* Retrieves the latest block number.
6161
*
62-
* @returns {String} block Number
62+
* @returns {string} Block Number.
6363
* @example
6464
*/
6565
getBlockNumber() {
66-
return this.web3data.block.getBlock('latest').then(block => {
66+
return this.web3data.block.getBlock('latest').then((block) => {
6767
throwIf(block | !block.number, 'Failed to retrieve block number.')
68-
return parseInt(block.number, 10)
68+
return Number.parseInt(block.number, 10)
6969
})
7070
}
7171

7272
/**
73-
* Retrieves the block transaction count for a specific block based on hash or number
73+
* Retrieves the block transaction count for a specific block based on hash or number.
7474
*
7575
* @param id - The number or hash of the block for which to retrieve block information.
7676
* @param [filterOptions] -
7777
* @returns
7878
* @example
7979
*/
8080
getBlockTransactionCount(id) {
81-
return this.web3data.block.getBlock(id).then(block => {
81+
return this.web3data.block.getBlock(id).then((block) => {
8282
throwIf(
8383
!block || (!block.predictions && !block.numTransactions),
8484
'Failed to retrieve block transaction count.'
8585
)
8686
// If 'predictions' field exists then it's a future block thus has no txns
87-
return block.predictions ? null : parseInt(block.numTransactions, 10)
87+
return block.predictions
88+
? null
89+
: Number.parseInt(block.numTransactions, 10)
8890
})
8991
}
9092

@@ -110,14 +112,14 @@ class Block {
110112
* Retrieves a single transaction for a block specified by its id (number or hash) and transaction index.
111113
*
112114
* @param id - The number or hash of the block for which to retrieve block information.
113-
* @param index - The number of the transaction block index
115+
* @param index - The number of the transaction block index.
114116
* @param [filterOptions] -
115117
* @returns
116118
* @example
117119
*/
118120
getTransactionFromBlock(id, index) {
119121
throwIf(is.undefined(id), NO_BLOCK_ID)
120-
return this.web3data.block.getTransactions(id).then(txns => {
122+
return this.web3data.block.getTransactions(id).then((txns) => {
121123
throwIf(!txns, 'Failed to retrieve transaction.')
122124

123125
// Check that 'index' is within valid range
@@ -128,7 +130,7 @@ class Block {
128130
/**
129131
* Retrieves the uncle specified by its id (number or hash).
130132
*
131-
* @param id - The number or hash of the uncle
133+
* @param id - The number or hash of the uncle.
132134
* @param index - The index of the uncle, in most cases this is 0-2.
133135
* @param [filterOptions] -
134136
* @returns
@@ -141,7 +143,7 @@ class Block {
141143
.getBlock(id, {
142144
validationMethod: 'full'
143145
})
144-
.then(block => {
146+
.then((block) => {
145147
throwIf(
146148
!block ||
147149
(!block.predictions && !block.numTransactions && !block.validation),
@@ -161,7 +163,7 @@ class Block {
161163
}
162164

163165
/**
164-
* Retrieves the block token transfers executed at a specific block
166+
* Retrieves the block token transfers executed at a specific block.
165167
*
166168
* @param id - The number or hash of the block for which to retrieve block information.
167169
* @param [filterOptions] -
@@ -179,7 +181,7 @@ class Block {
179181
}
180182

181183
/**
182-
* Retrieves the block logs executed at a specific block
184+
* Retrieves the block logs executed at a specific block.
183185
*
184186
* @param id - The number or hash of the block for which to retrieve block information.
185187
* @param [filterOptions] -
@@ -197,7 +199,7 @@ class Block {
197199
}
198200

199201
/**
200-
* Retrieves the block functions/internalMessages executed at a specific block
202+
* Retrieves the block functions/internalMessages executed at a specific block.
201203
*
202204
* @param id - The number or hash of the block for which to retrieve block information.
203205
* @param [filterOptions] -

src/bsv.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ class Bsv {
1717
}
1818

1919
/* See Web3Data class for details on rpc method */
20-
rpc(method, params) {
21-
return this.web3data.rpc(method, params)
20+
rpc(method, parameters) {
21+
return this.web3data.rpc(method, parameters)
2222
}
2323
}
2424

src/btc.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ class Btc {
1717
}
1818

1919
/* See Web3Data class for details on rpc method */
20-
rpc(method, params) {
21-
return this.web3data.rpc(method, params)
20+
rpc(method, parameters) {
21+
return this.web3data.rpc(method, parameters)
2222
}
2323
}
2424

src/contract.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ class Contract {
8585
* @example const code = await web3data.contract.getCode('0x06012c8cf97bead5deae237070f9587f8e7a266d')
8686
*/
8787
getCode(hash) {
88-
return this.getDetails(hash).then(details => details.bytecode || '0x')
88+
return this.getDetails(hash).then((details) => details.bytecode || '0x')
8989
}
9090
}
9191

src/eth.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ class Eth {
2323
}
2424

2525
/* See Web3Data class for details on rpc method */
26-
rpc(method, params) {
27-
return this.web3data.rpc(method, params)
26+
rpc(method, parameters) {
27+
return this.web3data.rpc(method, parameters)
2828
}
2929
}
3030

0 commit comments

Comments
 (0)