From 0ed3aa39b41f146861559c8df05b4d3f806ac384 Mon Sep 17 00:00:00 2001 From: tim Date: Fri, 16 Jun 2017 11:42:23 +0200 Subject: [PATCH 01/15] fulfills.txid ==> fulfills.transaction_id --- src/transaction/makeTransferTransaction.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/transaction/makeTransferTransaction.js b/src/transaction/makeTransferTransaction.js index d28dae8..5fbf228 100644 --- a/src/transaction/makeTransferTransaction.js +++ b/src/transaction/makeTransferTransaction.js @@ -32,7 +32,7 @@ export default function makeTransferTransaction( const fulfilledOutput = unspentTransaction.outputs[outputIndex] const transactionLink = { 'output': outputIndex, - 'txid': unspentTransaction.id, + 'transaction_id': unspentTransaction.id, } return makeInputTemplate(fulfilledOutput.public_keys, transactionLink) From 27d8dabd7a5d94c0dabfadaa1da082691a498f86 Mon Sep 17 00:00:00 2001 From: tim Date: Fri, 16 Jun 2017 11:43:09 +0200 Subject: [PATCH 02/15] Stringify output.amount --- src/transaction/makeOutput.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/transaction/makeOutput.js b/src/transaction/makeOutput.js index d8eb1f3..820f3c3 100644 --- a/src/transaction/makeOutput.js +++ b/src/transaction/makeOutput.js @@ -3,10 +3,13 @@ * Create an Output from a Condition. * Note: Assumes the given Condition was generated from a single public key (e.g. a Ed25519 Condition) * @param {object} condition Condition (e.g. a Ed25519 Condition from `makeEd25519Condition()`) - * @param {number} amount Amount of the output + * @param {string} amount Amount of the output * @returns {object} An Output usable in a Transaction */ -export default function makeOutput(condition, amount = 1) { +export default function makeOutput(condition, amount = '1') { + if (typeof amount !== 'string') { + throw new TypeError('`amount` must be of type string') + } return { 'amount': amount, condition, From a14dbbaebdd33883de5640fa5090886a8d799304 Mon Sep 17 00:00:00 2001 From: tim Date: Fri, 16 Jun 2017 14:12:02 +0200 Subject: [PATCH 03/15] Add tests for makeOutput --- test/transaction/test_transaction.js | 55 ++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 test/transaction/test_transaction.js diff --git a/test/transaction/test_transaction.js b/test/transaction/test_transaction.js new file mode 100644 index 0000000..f23d110 --- /dev/null +++ b/test/transaction/test_transaction.js @@ -0,0 +1,55 @@ +import test from 'ava' +import { Transaction } from '../../src' + + +test('Create valid output with default amount', t => { + const condition = { + details: { + public_key: 'abc' + } + } + const expected = { + amount: '1', + condition, + public_keys: ['abc'] + } + const res = Transaction.makeOutput(condition) + return t.deepEqual(res, expected) +}) + + +test('Create valid output with custom amount', t => { + const condition = { + details: { + public_key: 'abc' + } + } + const customAmount = '1337' + const expected = { + amount: customAmount, + condition, + public_keys: ['abc'] + } + const res = Transaction.makeOutput(condition, customAmount) + return t.deepEqual(res, expected) +}) + +test('Pass condition not based on public_keys to makeOutput', t => { + const condition = { + details: { + idea: 'just pretend this is e.g. a hashlock' + } + } + const expected = { + amount: '1', + condition, + public_keys: [] + } + const res = Transaction.makeOutput(condition) + return t.deepEqual(res, expected) +}) + + +test('makeOutput throws TypeError with incorrect amount type', t => { + t.throws(() => Transaction.makeOutput({}, 1337), TypeError) +}) From b8241589dff79198edbf4662c12577df5b16076e Mon Sep 17 00:00:00 2001 From: tim Date: Mon, 19 Jun 2017 13:27:39 +0200 Subject: [PATCH 04/15] fulfills.txid => fulfills.transaction_id + tests --- src/transaction/makeCreateTransaction.js | 2 + src/transaction/makeTransferTransaction.js | 49 +++++++++++----- test/transaction/test_transaction.js | 68 +++++++++++++++++++++- 3 files changed, 102 insertions(+), 17 deletions(-) diff --git a/src/transaction/makeCreateTransaction.js b/src/transaction/makeCreateTransaction.js index 8b259de..cc2d6d8 100644 --- a/src/transaction/makeCreateTransaction.js +++ b/src/transaction/makeCreateTransaction.js @@ -21,6 +21,8 @@ import makeTransaction from './makeTransaction' * @returns {object} Unsigned transaction -- make sure to call signTransaction() on it before * sending it off! */ +// TODO: `outputs` should throw or include output in array if no array was +// passed export default function makeCreateTransaction(asset, metadata, outputs, ...issuers) { const assetDefinition = { 'data': asset || null, diff --git a/src/transaction/makeTransferTransaction.js b/src/transaction/makeTransferTransaction.js index 5fbf228..b1a217f 100644 --- a/src/transaction/makeTransferTransaction.js +++ b/src/transaction/makeTransferTransaction.js @@ -2,6 +2,32 @@ import makeInputTemplate from './makeInputTemplate' import makeTransaction from './makeTransaction' +// TODO: Can we remove `export` here somehow, but still be able to import the +// function for tests? +export function _makeTransferTransaction( + unspentTransaction, + metadata, + outputs, + ...fulfilledOutputs + ) { + const inputs = fulfilledOutputs.map((outputIndex) => { + const fulfilledOutput = unspentTransaction.outputs[outputIndex] + const transactionLink = { + 'output': outputIndex, + 'transaction_id': unspentTransaction.id, + } + + return makeInputTemplate(fulfilledOutput.public_keys, transactionLink) + }) + + const assetLink = { + 'id': unspentTransaction.operation === 'CREATE' ? unspentTransaction.id + : unspentTransaction.asset.id + } + + return ['TRANSFER', assetLink, metadata, outputs, inputs] +} + /** * @public * Generate a `TRANSFER` transaction holding the `asset`, `metadata`, and `outputs`, that fulfills @@ -22,26 +48,17 @@ import makeTransaction from './makeTransaction' * @returns {object} Unsigned transaction -- make sure to call signTransaction() on it before * sending it off! */ + +// TODO: +// - Make `metadata` optional argument +// - Rename `fulfilledOutputs`, e.g. inputs +// TODO: `outputs` should throw or include output in array if no array was +// passed export default function makeTransferTransaction( unspentTransaction, metadata, outputs, ...fulfilledOutputs ) { - const inputs = fulfilledOutputs.map((outputIndex) => { - const fulfilledOutput = unspentTransaction.outputs[outputIndex] - const transactionLink = { - 'output': outputIndex, - 'transaction_id': unspentTransaction.id, - } - - return makeInputTemplate(fulfilledOutput.public_keys, transactionLink) - }) - - const assetLink = { - 'id': unspentTransaction.operation === 'CREATE' ? unspentTransaction.id - : unspentTransaction.asset.id - } - - return makeTransaction('TRANSFER', assetLink, metadata, outputs, inputs) + return makeTransaction(..._makeTransferTransaction(...arguments)) } diff --git a/test/transaction/test_transaction.js b/test/transaction/test_transaction.js index f23d110..0999005 100644 --- a/test/transaction/test_transaction.js +++ b/test/transaction/test_transaction.js @@ -1,5 +1,27 @@ import test from 'ava' -import { Transaction } from '../../src' +import { Transaction, Ed25519Keypair } from '../../src' +import { _makeTransferTransaction } from '../../src/transaction/makeTransferTransaction' +import makeInputTemplate from '../../src/transaction/makeInputTemplate' + + +// TODO: Find out if ava has something like conftest, if so put this there. +const alice = new Ed25519Keypair() +const aliceCondition = Transaction.makeEd25519Condition(alice.publicKey) +const aliceOutput = Transaction.makeOutput(aliceCondition) +const assetMessage = { assetMessage: 'assetMessage' } +const metaDataMessage = { metaDataMessage: 'metaDataMessage' } +const createTx = Transaction.makeCreateTransaction( + assetMessage, + metaDataMessage, + [aliceOutput], + alice.publicKey +) +const transferTx = Transaction.makeTransferTransaction( + createTx, + metaDataMessage, + [aliceOutput], + 0 +) test('Create valid output with default amount', t => { @@ -53,3 +75,47 @@ test('Pass condition not based on public_keys to makeOutput', t => { test('makeOutput throws TypeError with incorrect amount type', t => { t.throws(() => Transaction.makeOutput({}, 1337), TypeError) }) + + +test('Create TRANSFER transaction based on CREATE transaction', t => { + const testTx = _makeTransferTransaction( + createTx, + metaDataMessage, + [aliceOutput], + 0 + ) + const expected = [ + 'TRANSFER', + {id: createTx.id }, + metaDataMessage, + [aliceOutput], + [makeInputTemplate( + [alice.publicKey], + { output: 0, transaction_id: createTx.id } + )] + ] + + t.deepEqual(testTx, expected) +}) + + +test('Create TRANSFER transaction based on TRANSFER transaction', t => { + const testTx = _makeTransferTransaction( + transferTx, + metaDataMessage, + [aliceOutput], + 0 + ) + const expected = [ + 'TRANSFER', + { id: transferTx.asset.id }, + metaDataMessage, + [aliceOutput], + [makeInputTemplate( + [alice.publicKey], + { output: 0, transaction_id: transferTx.id } + )] + ] + + t.deepEqual(testTx, expected) +}) From ed18384b82e91661faf26b00f13b112d5b4c9d54 Mon Sep 17 00:00:00 2001 From: tim Date: Tue, 20 Jun 2017 10:59:25 +0200 Subject: [PATCH 05/15] Bump ascribe-eslint-config --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6d533b1..1f2bac7 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,7 @@ "babel-runtime": "^6.22.0", "cross-env": "^5.0.1", "eslint": "^3.14.1", - "eslint-config-ascribe": "^3.0.1", + "eslint-config-ascribe": "^3.0.4", "eslint-plugin-import": "^2.2.0", "husky": "^0.13.4", "release-it": "^2.7.3", From 9183205f042f55f5fa874d0afa1c048b49d8a81f Mon Sep 17 00:00:00 2001 From: tim Date: Tue, 20 Jun 2017 11:03:01 +0200 Subject: [PATCH 06/15] Use rest params in fn definition --- src/transaction/makeTransferTransaction.js | 9 ++------- test/transaction/test_transaction.js | 2 +- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/src/transaction/makeTransferTransaction.js b/src/transaction/makeTransferTransaction.js index b1a217f..5e5f62f 100644 --- a/src/transaction/makeTransferTransaction.js +++ b/src/transaction/makeTransferTransaction.js @@ -54,11 +54,6 @@ export function _makeTransferTransaction( // - Rename `fulfilledOutputs`, e.g. inputs // TODO: `outputs` should throw or include output in array if no array was // passed -export default function makeTransferTransaction( - unspentTransaction, - metadata, - outputs, - ...fulfilledOutputs - ) { - return makeTransaction(..._makeTransferTransaction(...arguments)) +export default function makeTransferTransaction(...args) { + return makeTransaction(..._makeTransferTransaction(...args)) } diff --git a/test/transaction/test_transaction.js b/test/transaction/test_transaction.js index 0999005..407c524 100644 --- a/test/transaction/test_transaction.js +++ b/test/transaction/test_transaction.js @@ -86,7 +86,7 @@ test('Create TRANSFER transaction based on CREATE transaction', t => { ) const expected = [ 'TRANSFER', - {id: createTx.id }, + { id: createTx.id }, metaDataMessage, [aliceOutput], [makeInputTemplate( From 3389726cb27d44acc543941ef8344432985ed7b5 Mon Sep 17 00:00:00 2001 From: tim Date: Mon, 19 Jun 2017 18:50:10 +0200 Subject: [PATCH 07/15] Test against BDB:master --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index ec208c6..1a817bc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,7 +18,7 @@ before_install: -e BIGCHAINDB_KEYPAIR_PRIVATE=5C5Cknco7YxBRP9AgB1cbUVTL4FAcooxErLygw1DeG2D -e BIGCHAINDB_DATABASE_BACKEND=mongodb -e BIGCHAINDB_DATABASE_HOST=172.17.0.1 - bigchaindb/bigchaindb:0.10.2 + bigchaindb/bigchaindb:master start script: yarn test From ac0a1240541a8b7ca4f75c9c8bdd8f8718483460 Mon Sep 17 00:00:00 2001 From: tim Date: Tue, 20 Jun 2017 13:34:14 +0200 Subject: [PATCH 08/15] Remove unnecessary returns --- test/transaction/test_transaction.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/transaction/test_transaction.js b/test/transaction/test_transaction.js index 407c524..bb7213f 100644 --- a/test/transaction/test_transaction.js +++ b/test/transaction/test_transaction.js @@ -36,7 +36,7 @@ test('Create valid output with default amount', t => { public_keys: ['abc'] } const res = Transaction.makeOutput(condition) - return t.deepEqual(res, expected) + t.deepEqual(res, expected) }) @@ -53,7 +53,7 @@ test('Create valid output with custom amount', t => { public_keys: ['abc'] } const res = Transaction.makeOutput(condition, customAmount) - return t.deepEqual(res, expected) + t.deepEqual(res, expected) }) test('Pass condition not based on public_keys to makeOutput', t => { @@ -68,7 +68,7 @@ test('Pass condition not based on public_keys to makeOutput', t => { public_keys: [] } const res = Transaction.makeOutput(condition) - return t.deepEqual(res, expected) + t.deepEqual(res, expected) }) From 42b400253b2332ca6d0b79c15951df02347c45f4 Mon Sep 17 00:00:00 2001 From: tim Date: Mon, 19 Jun 2017 14:44:51 +0200 Subject: [PATCH 09/15] Add sinon.js (mocks) to package.json --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index 1f2bac7..43ca2c6 100644 --- a/package.json +++ b/package.json @@ -47,6 +47,7 @@ "husky": "^0.13.4", "release-it": "^2.7.3", "rimraf": "^2.5.4", + "sinon": "^2.3.4", "webpack": "^2.2.1" }, "dependencies": { From ede11da4c70f3b871b05fa30219444abd39729fa Mon Sep 17 00:00:00 2001 From: tim Date: Tue, 20 Jun 2017 14:55:58 +0200 Subject: [PATCH 10/15] Correct mocking of export default --- src/transaction/makeCreateTransaction.js | 2 - src/transaction/makeTransferTransaction.js | 62 +++++++++------------- test/transaction/test_transaction.js | 21 ++++++-- 3 files changed, 42 insertions(+), 43 deletions(-) diff --git a/src/transaction/makeCreateTransaction.js b/src/transaction/makeCreateTransaction.js index cc2d6d8..8b259de 100644 --- a/src/transaction/makeCreateTransaction.js +++ b/src/transaction/makeCreateTransaction.js @@ -21,8 +21,6 @@ import makeTransaction from './makeTransaction' * @returns {object} Unsigned transaction -- make sure to call signTransaction() on it before * sending it off! */ -// TODO: `outputs` should throw or include output in array if no array was -// passed export default function makeCreateTransaction(asset, metadata, outputs, ...issuers) { const assetDefinition = { 'data': asset || null, diff --git a/src/transaction/makeTransferTransaction.js b/src/transaction/makeTransferTransaction.js index 5e5f62f..6e9207f 100644 --- a/src/transaction/makeTransferTransaction.js +++ b/src/transaction/makeTransferTransaction.js @@ -2,15 +2,35 @@ import makeInputTemplate from './makeInputTemplate' import makeTransaction from './makeTransaction' -// TODO: Can we remove `export` here somehow, but still be able to import the -// function for tests? -export function _makeTransferTransaction( +/** + * @public + * Generate a `TRANSFER` transaction holding the `asset`, `metadata`, and `outputs`, that fulfills + * the `fulfilledOutputs` of `unspentTransaction`. + * @param {object} unspentTransaction Previous Transaction you have control over (i.e. can fulfill + * its Output Condition) + * @param {object} metadata Metadata for the Transaction + * @param {object[]} outputs Array of Output objects to add to the Transaction. + * Think of these as the recipients of the asset after the transaction. + * For `TRANSFER` Transactions, this should usually just be a list of + * Outputs wrapping Ed25519 Conditions generated from the public keys of + * the recipients. + * @param {...number} OutputIndices Indices of the Outputs in `unspentTransaction` that this + * Transaction fulfills. + * Note that listed public keys listed must be used (and in + * the same order) to sign the Transaction + * (`signTransaction()`). + * @returns {object} Unsigned transaction -- make sure to call signTransaction() on it before + * sending it off! + */ +// TODO: +// - Make `metadata` optional argument +export default function makeTransferTransaction( unspentTransaction, metadata, outputs, - ...fulfilledOutputs + ...outputIndices ) { - const inputs = fulfilledOutputs.map((outputIndex) => { + const inputs = outputIndices.map((outputIndex) => { const fulfilledOutput = unspentTransaction.outputs[outputIndex] const transactionLink = { 'output': outputIndex, @@ -25,35 +45,5 @@ export function _makeTransferTransaction( : unspentTransaction.asset.id } - return ['TRANSFER', assetLink, metadata, outputs, inputs] -} - -/** - * @public - * Generate a `TRANSFER` transaction holding the `asset`, `metadata`, and `outputs`, that fulfills - * the `fulfilledOutputs` of `unspentTransaction`. - * @param {object} unspentTransaction Previous Transaction you have control over (i.e. can fulfill - * its Output Condition) - * @param {object} metadata Metadata for the Transaction - * @param {object[]} outputs Array of Output objects to add to the Transaction. - * Think of these as the recipients of the asset after the transaction. - * For `TRANSFER` Transactions, this should usually just be a list of - * Outputs wrapping Ed25519 Conditions generated from the public keys of - * the recipients. - * @param {...number} fulfilledOutputs Indices of the Outputs in `unspentTransaction` that this - * Transaction fulfills. - * Note that the public keys listed in the fulfilled Outputs - * must be used (and in the same order) to sign the Transaction - * (`signTransaction()`). - * @returns {object} Unsigned transaction -- make sure to call signTransaction() on it before - * sending it off! - */ - -// TODO: -// - Make `metadata` optional argument -// - Rename `fulfilledOutputs`, e.g. inputs -// TODO: `outputs` should throw or include output in array if no array was -// passed -export default function makeTransferTransaction(...args) { - return makeTransaction(..._makeTransferTransaction(...args)) + return makeTransaction('TRANSFER', assetLink, metadata, outputs, inputs) } diff --git a/test/transaction/test_transaction.js b/test/transaction/test_transaction.js index bb7213f..6ef3f6d 100644 --- a/test/transaction/test_transaction.js +++ b/test/transaction/test_transaction.js @@ -1,6 +1,8 @@ import test from 'ava' +import sinon from 'sinon' + import { Transaction, Ed25519Keypair } from '../../src' -import { _makeTransferTransaction } from '../../src/transaction/makeTransferTransaction' +import * as makeTransaction from '../../src/transaction/makeTransaction' // eslint-disable-line import makeInputTemplate from '../../src/transaction/makeInputTemplate' @@ -78,7 +80,9 @@ test('makeOutput throws TypeError with incorrect amount type', t => { test('Create TRANSFER transaction based on CREATE transaction', t => { - const testTx = _makeTransferTransaction( + sinon.spy(makeTransaction, 'default') + + Transaction.makeTransferTransaction( createTx, metaDataMessage, [aliceOutput], @@ -95,12 +99,18 @@ test('Create TRANSFER transaction based on CREATE transaction', t => { )] ] - t.deepEqual(testTx, expected) + // NOTE: `src/transaction/makeTransaction` is `export default`, hence we + // can only mock `makeTransaction.default` with a hack: + // See: https://stackoverflow.com/a/33676328/1263876 + t.truthy(makeTransaction.default.calledWith(...expected)) + makeTransaction.default.restore() }) test('Create TRANSFER transaction based on TRANSFER transaction', t => { - const testTx = _makeTransferTransaction( + sinon.spy(makeTransaction, 'default') + + Transaction.makeTransferTransaction( transferTx, metaDataMessage, [aliceOutput], @@ -117,5 +127,6 @@ test('Create TRANSFER transaction based on TRANSFER transaction', t => { )] ] - t.deepEqual(testTx, expected) + t.truthy(makeTransaction.default.calledWith(...expected)) + makeTransaction.default.restore() }) From 25860a43b193c0cddd561dfc921a574834328c73 Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Tue, 20 Jun 2017 16:37:58 +0200 Subject: [PATCH 11/15] add Code of Conduct * based on Contributor Covenant * add our protection for discrimination based on species --- CODE_OF_CONDUCT.md | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 CODE_OF_CONDUCT.md diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..49e8150 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,46 @@ +# Contributor Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, sexual identity and orientation, or species—no picking on Wrigley for being a buffalo! + +## Our Standards + +Examples of behavior that contributes to creating a positive environment include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at conduct@bigchaindb.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] + +[homepage]: http://contributor-covenant.org +[version]: http://contributor-covenant.org/version/1/4/ From b78e33466fc4242cb99bf400d972003402e5b392 Mon Sep 17 00:00:00 2001 From: tim Date: Wed, 21 Jun 2017 13:17:00 +0200 Subject: [PATCH 12/15] Add codecovfefe --- .eslintignore | 3 +- .gitignore | 3 + .travis.yml | 1 + package.json | 9 +- yarn.lock | 360 +++++++++++++++++++++++++++++++++++++++++++++----- 5 files changed, 339 insertions(+), 37 deletions(-) diff --git a/.eslintignore b/.eslintignore index db4c6d9..007ea8a 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,2 +1,3 @@ dist -node_modules \ No newline at end of file +node_modules +coverage diff --git a/.gitignore b/.gitignore index 55fafa3..71ebeb4 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,6 @@ node_modules dist package-lock.json +coverage +coverage.lcov +.nyc_output diff --git a/.travis.yml b/.travis.yml index 1a817bc..cde552a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,6 +20,7 @@ before_install: -e BIGCHAINDB_DATABASE_HOST=172.17.0.1 bigchaindb/bigchaindb:master start + - npm install -g codecov script: yarn test diff --git a/package.json b/package.json index 43ca2c6..82821a9 100644 --- a/package.json +++ b/package.json @@ -19,12 +19,13 @@ "build:cjs": "cross-env BABEL_ENV=cjs babel ./src -d dist/node", "build:dist": "cross-env NODE_ENV=production webpack -p", "clean": "rimraf dist/bundle dist/node", - "test": "npm run lint && ava", + "test": "npm run lint && nyc ava test/ && npm run report-coverage", "release": "./node_modules/release-it/bin/release.js --src.tagName='v%s' --github.release --npm.publish --non-interactive", "release-minor": "./node_modules/release-it/bin/release.js minor --src.tagName='v%s' --github.release --npm.publish --non-interactive", "release-major": "./node_modules/release-it/bin/release.js major --src.tagName='v%s' --github.release --npm.publish --non-interactive", "prepublishOnly": "npm update && npm run build", - "precommit": "npm run lint" + "precommit": "npm run lint", + "report-coverage": "nyc report --reporter=lcov > coverage.lcov && codecov" }, "devDependencies": { "ava": "^0.19.1", @@ -45,6 +46,7 @@ "eslint-config-ascribe": "^3.0.4", "eslint-plugin-import": "^2.2.0", "husky": "^0.13.4", + "nyc": "^11.0.2", "release-it": "^2.7.3", "rimraf": "^2.5.4", "sinon": "^2.3.4", @@ -66,7 +68,8 @@ "json-stable-stringify": "^1.0.1", "query-string": "^4.3.4", "sprintf-js": "^1.0.3", - "tweetnacl": "^1.0.0" + "tweetnacl": "^1.0.0", + "yarn": "^0.24.5" }, "keywords": [ "bigchaindb", diff --git a/yarn.lock b/yarn.lock index 3856e56..5c3c449 100644 --- a/yarn.lock +++ b/yarn.lock @@ -101,6 +101,10 @@ ansi-escapes@^1.1.0: version "1.4.0" resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-1.4.0.tgz#d3a8a83b319aa67793662b13e761c7911422306e" +ansi-escapes@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-2.0.0.tgz#5bae52be424878dd9783e8910e3fc2922e83c81b" + ansi-regex@^2.0.0: version "2.1.1" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" @@ -505,10 +509,10 @@ babel-helpers@^6.24.1: babel-template "^6.24.1" babel-loader@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/babel-loader/-/babel-loader-7.0.0.tgz#2e43a66bee1fff4470533d0402c8a4532fafbaf7" + version "7.1.0" + resolved "https://registry.yarnpkg.com/babel-loader/-/babel-loader-7.1.0.tgz#3fbf2581f085774bd9642dca9990e6d6c1491144" dependencies: - find-cache-dir "^0.1.1" + find-cache-dir "^1.0.0" loader-utils "^1.0.2" mkdirp "^0.5.1" @@ -877,7 +881,7 @@ babel-register@^6.24.1: mkdirp "^0.5.1" source-map-support "^0.4.2" -babel-runtime@^6.18.0, babel-runtime@^6.22.0, babel-runtime@^6.9.2: +babel-runtime@^6.0.0, babel-runtime@^6.18.0, babel-runtime@^6.22.0, babel-runtime@^6.9.2: version "6.23.0" resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.23.0.tgz#0a9489f144de70efb3ce4300accdb329e2fc543b" dependencies: @@ -953,6 +957,12 @@ bindings@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.2.1.tgz#14ad6113812d2d37d72e67b4cacb4bb726505f11" +bl@^1.0.0: + version "1.2.1" + resolved "https://registry.yarnpkg.com/bl/-/bl-1.2.1.tgz#cac328f7bee45730d404b692203fcb590e172d5e" + dependencies: + readable-stream "^2.0.5" + block-stream@*: version "0.0.9" resolved "https://registry.yarnpkg.com/block-stream/-/block-stream-0.0.9.tgz#13ebfe778a03205cfe03751481ebb4b3300c126a" @@ -964,8 +974,8 @@ bluebird@^3.0.0: resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.0.tgz#791420d7f551eea2897453a8a77653f96606d67c" bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.1.1, bn.js@^4.4.0: - version "4.11.6" - resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.6.tgz#53344adb14617a13f6e8dd2ce28905d1c0ba3215" + version "4.11.7" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.7.tgz#ddb048e50d9482790094c13eb3fcfc833ce7ab46" boom@2.x.x: version "2.10.1" @@ -1102,6 +1112,10 @@ builtin-status-codes@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz#85982878e21b98e1c66425e03d0174788f569ee8" +bytes@^2.4.0: + version "2.5.0" + resolved "https://registry.yarnpkg.com/bytes/-/bytes-2.5.0.tgz#4c9423ea2d252c270c41b2bdefeff9bb6b62c06a" + caching-transform@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/caching-transform/-/caching-transform-1.0.1.tgz#6dbdb2f20f8d8fbce79f3e94e9d1742dcdf5c0a1" @@ -1204,6 +1218,10 @@ chokidar@^1.4.2, chokidar@^1.4.3, chokidar@^1.6.1: optionalDependencies: fsevents "^1.0.0" +chownr@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.0.1.tgz#e2a75042a9551908bebd25b8523d5f9769d79181" + ci-info@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-1.0.0.tgz#dc5285f2b4e251821683681c381c3388f46ec534" @@ -1277,6 +1295,13 @@ clone@^2.1.0: version "2.1.1" resolved "https://registry.yarnpkg.com/clone/-/clone-2.1.1.tgz#d217d1e961118e3ac9a4b8bba3285553bf647cdb" +cmd-shim@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/cmd-shim/-/cmd-shim-2.0.2.tgz#6fcbda99483a8fd15d7d30a196ca69d688a2efdb" + dependencies: + graceful-fs "^4.1.2" + mkdirp "~0.5.0" + co-with-promise@^4.6.0: version "4.6.0" resolved "https://registry.yarnpkg.com/co-with-promise/-/co-with-promise-4.6.0.tgz#413e7db6f5893a60b942cf492c4bec93db415ab7" @@ -1313,7 +1338,7 @@ combined-stream@^1.0.5, combined-stream@~1.0.5: dependencies: delayed-stream "~1.0.0" -commander@^2.8.1: +commander@^2.8.1, commander@^2.9.0: version "2.9.0" resolved "https://registry.yarnpkg.com/commander/-/commander-2.9.0.tgz#9c99094176e12240cb22d6c5146098400fe0f7d4" dependencies: @@ -1504,6 +1529,10 @@ date-time@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/date-time/-/date-time-0.1.1.tgz#ed2f6d93d9790ce2fd66d5b5ff3edd5bbcbf3b07" +death@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/death/-/death-1.1.0.tgz#01aa9c401edd92750514470b8266390c66c67318" + debug@2, debug@^2.1.1, debug@^2.2.0: version "2.6.8" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.8.tgz#e731531ca2ede27d188222427da17821d68ff4fc" @@ -1573,7 +1602,7 @@ diff-match-patch@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/diff-match-patch/-/diff-match-patch-1.0.0.tgz#1cc3c83a490d67f95d91e39f6ad1f2e086b63048" -diff@^3.0.0, diff@^3.0.1: +diff@^3.0.0, diff@^3.0.1, diff@^3.1.0: version "3.2.0" resolved "https://registry.yarnpkg.com/diff/-/diff-3.2.0.tgz#c9ce393a4b7cbd0b058a725c93df299027868ff9" @@ -1613,6 +1642,15 @@ duplexer3@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.4.tgz#ee01dd1cac0ed3cbc7fdbea37dc0a8f1ce002ce2" +duplexify@^3.1.2, duplexify@^3.5.0: + version "3.5.0" + resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-3.5.0.tgz#1aa773002e1578457e9d9d4a50b0ccaaebcbd604" + dependencies: + end-of-stream "1.0.0" + inherits "^2.0.1" + readable-stream "^2.0.0" + stream-shift "^1.0.0" + ecc-jsbn@~0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz#0fc73a9ed5f0d53c38193398523ef7e543777505" @@ -1655,6 +1693,18 @@ encoding@^0.1.11: dependencies: iconv-lite "~0.4.13" +end-of-stream@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.0.0.tgz#d4596e702734a93e40e9af864319eabd99ff2f0e" + dependencies: + once "~1.3.0" + +end-of-stream@^1.0.0, end-of-stream@^1.1.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.0.tgz#7a90d833efda6cfa6eac0f4949dbb0fad3a63206" + dependencies: + once "^1.4.0" + enhanced-resolve@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-3.1.0.tgz#9f4b626f577245edcf4b2ad83d86e17f4f421dec" @@ -1761,9 +1811,9 @@ eslint-config-airbnb-base@^11.1.0: version "11.2.0" resolved "https://registry.yarnpkg.com/eslint-config-airbnb-base/-/eslint-config-airbnb-base-11.2.0.tgz#19a9dc4481a26f70904545ec040116876018f853" -eslint-config-ascribe@^3.0.1: - version "3.0.3" - resolved "https://registry.yarnpkg.com/eslint-config-ascribe/-/eslint-config-ascribe-3.0.3.tgz#d1f4c2eb5b15b467e8423e109449ca33f3a90825" +eslint-config-ascribe@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/eslint-config-ascribe/-/eslint-config-ascribe-3.0.4.tgz#d60a5ea879698ebe0d6ba252b4e12d6f43902198" dependencies: eslint-config-airbnb-base "^11.1.0" @@ -1870,20 +1920,16 @@ esquery@^1.0.0: estraverse "^4.0.0" esrecurse@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.1.0.tgz#4713b6536adf7f2ac4f327d559e7756bff648220" + version "4.2.0" + resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.2.0.tgz#fa9568d98d3823f9a41d91e902dcab9ea6e5b163" dependencies: - estraverse "~4.1.0" + estraverse "^4.1.0" object-assign "^4.0.1" -estraverse@^4.0.0, estraverse@^4.1.1, estraverse@^4.2.0: +estraverse@^4.0.0, estraverse@^4.1.0, estraverse@^4.1.1, estraverse@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13" -estraverse@~4.1.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.1.1.tgz#f6caca728933a850ef90661d0e17982ba47111a2" - esutils@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" @@ -1948,7 +1994,7 @@ extend@3, extend@~3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.1.tgz#a755ea7bc1adfcc5a31ce7e762dbaadc5e636444" -external-editor@^2.0.1: +external-editor@^2.0.1, external-editor@^2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-2.0.4.tgz#1ed9199da9cbfe2ef2f7a31b2fde8b0d12368972" dependencies: @@ -2024,6 +2070,14 @@ find-cache-dir@^0.1.1: mkdirp "^0.5.1" pkg-dir "^1.0.0" +find-cache-dir@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-1.0.0.tgz#9288e3e9e3cc3748717d39eade17cf71fc30ee6f" + dependencies: + commondir "^1.0.1" + make-dir "^1.0.0" + pkg-dir "^2.0.0" + find-parent-dir@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/find-parent-dir/-/find-parent-dir-0.3.0.tgz#33c44b429ab2b2f0646299c5f9f718f376ff8d54" @@ -2094,6 +2148,12 @@ form-data@~2.1.1: combined-stream "^1.0.5" mime-types "^2.1.12" +formatio@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/formatio/-/formatio-1.2.0.tgz#f3b2167d9068c4698a8d51f4f760a39a54d818eb" + dependencies: + samsam "1.x" + fs-readdir-recursive@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs-readdir-recursive/-/fs-readdir-recursive-1.0.0.tgz#8cd1745c8b4f8a29c8caec392476921ba195f560" @@ -2275,6 +2335,17 @@ graceful-fs@4.1.11, graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.4, version "1.0.1" resolved "https://registry.yarnpkg.com/graceful-readlink/-/graceful-readlink-1.0.1.tgz#4cafad76bc62f02fa039b2f94e9a3dd3a391a725" +gunzip-maybe@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/gunzip-maybe/-/gunzip-maybe-1.4.0.tgz#7d8316c8d0571e1d08a5a79e46fff0afe8172b19" + dependencies: + browserify-zlib "^0.1.4" + is-deflate "^1.0.0" + is-gzip "^1.0.0" + peek-stream "^1.1.0" + pumpify "^1.3.3" + through2 "^2.0.3" + har-schema@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-1.0.5.tgz#d263135f43307c02c602afc8fe95970c0151369e" @@ -2325,10 +2396,11 @@ hash-base@^2.0.0: inherits "^2.0.1" hash.js@^1.0.0, hash.js@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.0.3.tgz#1332ff00156c0a0ffdd8236013d07b77a0451573" + version "1.1.1" + resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.1.tgz#5cb2e796499224e69fd0b00ed01d2d4a16e7a323" dependencies: - inherits "^2.0.1" + inherits "^2.0.3" + minimalistic-assert "^1.0.0" hawk@~3.1.3: version "3.1.3" @@ -2463,7 +2535,7 @@ inherits@2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.1.tgz#b17d08d326b4423e568eff719f91b0b1cbdf69f1" -ini@~1.3.0: +ini@^1.3.4, ini@~1.3.0: version "1.3.4" resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.4.tgz#0537cb79daf59b59a1a517dff706c86ec039162e" @@ -2503,6 +2575,25 @@ inquirer@^0.12.0: strip-ansi "^3.0.0" through "^2.3.6" +inquirer@^3.0.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-3.1.1.tgz#87621c4fba4072f48a8dd71c9f9df6f100b2d534" + dependencies: + ansi-escapes "^2.0.0" + chalk "^1.0.0" + cli-cursor "^2.1.0" + cli-width "^2.0.0" + external-editor "^2.0.4" + figures "^2.0.0" + lodash "^4.3.0" + mute-stream "0.0.7" + run-async "^2.2.0" + rx-lite "^4.0.8" + rx-lite-aggregates "^4.0.8" + string-width "^2.0.0" + strip-ansi "^3.0.0" + through "^2.3.6" + interpret@^1.0.0: version "1.0.3" resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.0.3.tgz#cbc35c62eeee73f19ab7b10a801511401afc0f90" @@ -2541,12 +2632,16 @@ is-builtin-module@^1.0.0: dependencies: builtin-modules "^1.0.0" -is-ci@^1.0.7, is-ci@^1.0.9: +is-ci@^1.0.10, is-ci@^1.0.7, is-ci@^1.0.9: version "1.0.10" resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-1.0.10.tgz#f739336b2632365061a9d48270cd56ae3369318e" dependencies: ci-info "^1.0.0" +is-deflate@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-deflate/-/is-deflate-1.0.0.tgz#c862901c3c161fb09dac7cdc7e784f80e98f2f14" + is-dotfile@^1.0.0: version "1.0.3" resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.3.tgz#a6a2f32ffd2dfb04f5ca25ecd0f6b83cf798a1e1" @@ -2595,6 +2690,10 @@ is-glob@^2.0.0, is-glob@^2.0.1: dependencies: is-extglob "^1.0.0" +is-gzip@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-gzip/-/is-gzip-1.0.0.tgz#6ca8b07b99c77998025900e555ced8ed80879a83" + is-my-json-valid@^2.10.0: version "2.16.0" resolved "https://registry.yarnpkg.com/is-my-json-valid/-/is-my-json-valid-2.16.0.tgz#f079dd9bfdae65ee2038aae8acbc86ab109e3693" @@ -2700,6 +2799,10 @@ is-windows@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.1.tgz#310db70f742d259a16a369202b51af84233310d9" +isarray@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" + isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" @@ -3013,6 +3116,10 @@ lodash@4.17.4, lodash@^4.0.0, lodash@^4.14.0, lodash@^4.2.0, lodash@^4.3.0: version "4.17.4" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae" +lolex@^1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/lolex/-/lolex-1.6.0.tgz#3a9a0283452a47d7439e72731b9e07d7386e49f6" + longest@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097" @@ -3191,7 +3298,7 @@ mute-stream@0.0.5: version "0.0.5" resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.5.tgz#8fbfabb0a98a253d3184331f9e8deb7372fac6c0" -mute-stream@0.0.7: +mute-stream@0.0.7, mute-stream@~0.0.4: version "0.0.7" resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" @@ -3199,6 +3306,10 @@ nan@^2.0.9, nan@^2.3.0: version "2.6.2" resolved "https://registry.yarnpkg.com/nan/-/nan-2.6.2.tgz#e4ff34e6c95fdfb5aecc08de6596f43605a7db45" +native-promise-only@^0.8.1: + version "0.8.1" + resolved "https://registry.yarnpkg.com/native-promise-only/-/native-promise-only-0.8.1.tgz#20a318c30cb45f71fe7adfbf7b21c99c1472ef11" + natural-compare@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" @@ -3207,6 +3318,12 @@ netrc@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/netrc/-/netrc-0.1.4.tgz#6be94fcaca8d77ade0a9670dc460914c94472444" +node-emoji@^1.0.4: + version "1.5.1" + resolved "https://registry.yarnpkg.com/node-emoji/-/node-emoji-1.5.1.tgz#fd918e412769bf8c448051238233840b2aff16a1" + dependencies: + string.prototype.codepointat "^0.2.0" + node-fetch@1.5.1: version "1.5.1" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.5.1.tgz#edc64350cc0bca48a5f79e038c1f7c5ff0869fef" @@ -3214,7 +3331,14 @@ node-fetch@1.5.1: encoding "^0.1.11" is-stream "^1.0.1" -node-fetch@^1.0.1, node-fetch@~1.6.0: +node-fetch@^1.0.1: + version "1.7.1" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.7.1.tgz#899cb3d0a3c92f952c47f1b876f4c8aeabd400d5" + dependencies: + encoding "^0.1.11" + is-stream "^1.0.1" + +node-fetch@~1.6.0: version "1.6.3" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.6.3.tgz#dc234edd6489982d58e8f0db4f695029abcd8c04" dependencies: @@ -3322,6 +3446,10 @@ object-assign@^4.0.1, object-assign@^4.1.0: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" +object-path@^0.11.2: + version "0.11.4" + resolved "https://registry.yarnpkg.com/object-path/-/object-path-0.11.4.tgz#370ae752fbf37de3ea70a861c23bba8915691949" + object.omit@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa" @@ -3342,12 +3470,18 @@ oer-utils@^1.2.0: dependencies: core-js "^2.4.1" -once@^1.3.0, once@^1.3.3: +once@^1.3.0, once@^1.3.1, once@^1.3.3, once@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" dependencies: wrappy "1" +once@~1.3.0: + version "1.3.3" + resolved "https://registry.yarnpkg.com/once/-/once-1.3.3.tgz#b2e261557ce4c314ec8304f3fa82663e4297ca20" + dependencies: + wrappy "1" + onetime@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/onetime/-/onetime-1.1.0.tgz#a1f7838f8314c516f05ecefcbc4ccfe04b4ed789" @@ -3517,6 +3651,12 @@ path-key@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" +path-to-regexp@^1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-1.7.0.tgz#59fde0f435badacba103a84e9d3bc64e96b9937d" + dependencies: + isarray "0.0.1" + path-type@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441" @@ -3541,6 +3681,13 @@ pbkdf2@^3.0.3: safe-buffer "^5.0.1" sha.js "^2.4.8" +peek-stream@^1.1.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/peek-stream/-/peek-stream-1.1.2.tgz#97eb76365bcfd8c89e287f55c8b69d4c3e9bcc52" + dependencies: + duplexify "^3.5.0" + through2 "^2.0.3" + performance-now@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-0.2.0.tgz#33ef30c5c77d4ea21c5a53869d91b56d8f2555e5" @@ -3650,6 +3797,13 @@ progress@^1.1.8: version "1.1.8" resolved "https://registry.yarnpkg.com/progress/-/progress-1.1.8.tgz#e260c78f6161cdd9b0e56cc3e0a85de17c7a57be" +proper-lockfile@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/proper-lockfile/-/proper-lockfile-2.0.1.tgz#159fb06193d32003f4b3691dd2ec1a634aa80d1d" + dependencies: + graceful-fs "^4.1.2" + retry "^0.10.0" + prr@~0.0.0: version "0.0.0" resolved "https://registry.yarnpkg.com/prr/-/prr-0.0.0.tgz#1a84b85908325501411853d0081ee3fa86e2926a" @@ -3668,6 +3822,21 @@ public-encrypt@^4.0.0: parse-asn1 "^5.0.0" randombytes "^2.0.1" +pump@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/pump/-/pump-1.0.2.tgz#3b3ee6512f94f0e575538c17995f9f16990a5d51" + dependencies: + end-of-stream "^1.1.0" + once "^1.3.1" + +pumpify@^1.3.3: + version "1.3.5" + resolved "https://registry.yarnpkg.com/pumpify/-/pumpify-1.3.5.tgz#1b671c619940abcaeac0ad0e3a3c164be760993b" + dependencies: + duplexify "^3.1.2" + inherits "^2.0.1" + pump "^1.0.0" + punycode@1.3.2: version "1.3.2" resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d" @@ -3747,7 +3916,13 @@ read-pkg@^2.0.0: normalize-package-data "^2.3.2" path-type "^2.0.0" -readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.5, readable-stream@^2.0.6, readable-stream@^2.1.4, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.2.6: +read@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/read/-/read-1.0.7.tgz#b3da19bd052431a97671d44a42634adf710b40c4" + dependencies: + mute-stream "~0.0.4" + +readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.5, readable-stream@^2.0.6, readable-stream@^2.1.4, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.2.6: version "2.3.0" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.0.tgz#640f5dcda88c91a8dc60787145629170813a1ed2" dependencies: @@ -3884,6 +4059,10 @@ repeating@^2.0.0: dependencies: is-finite "^1.0.0" +request-capture-har@^1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/request-capture-har/-/request-capture-har-1.2.2.tgz#cd692cfb2cc744fd84a3358aac6ee51528cf720d" + request@^2.81.0: version "2.81.0" resolved "https://registry.yarnpkg.com/request/-/request-2.81.0.tgz#c6928946a0e06c5f8d6f8a9333469ffda46298a0" @@ -3966,13 +4145,17 @@ restore-cursor@^2.0.0: onetime "^2.0.0" signal-exit "^3.0.2" +retry@^0.10.0: + version "0.10.1" + resolved "https://registry.yarnpkg.com/retry/-/retry-0.10.1.tgz#e76388d217992c252750241d3d3956fed98d8ff4" + right-align@^0.1.1: version "0.1.3" resolved "https://registry.yarnpkg.com/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef" dependencies: align-text "^0.1.1" -rimraf@2, rimraf@^2.2.8, rimraf@^2.5.1, rimraf@^2.5.4, rimraf@^2.6.1: +rimraf@2, rimraf@^2.2.8, rimraf@^2.5.0, rimraf@^2.5.1, rimraf@^2.5.4, rimraf@^2.6.1: version "2.6.1" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.1.tgz#c2338ec643df7a1b7fe5c54fa86f57428a55f33d" dependencies: @@ -3997,6 +4180,16 @@ run-async@^2.2.0: dependencies: is-promise "^2.1.0" +rx-lite-aggregates@^4.0.8: + version "4.0.8" + resolved "https://registry.yarnpkg.com/rx-lite-aggregates/-/rx-lite-aggregates-4.0.8.tgz#753b87a89a11c95467c4ac1626c4efc4e05c67be" + dependencies: + rx-lite "*" + +rx-lite@*, rx-lite@^4.0.8: + version "4.0.8" + resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-4.0.8.tgz#0b1e11af8bc44836f04a6407e92da42467b79444" + rx-lite@^3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-3.1.2.tgz#19ce502ca572665f3b647b10939f97fd1615f102" @@ -4013,6 +4206,10 @@ safe-buffer@~5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.0.1.tgz#d263ca54696cd8a306b5ca6551e92de57918fbe7" +samsam@1.x, samsam@^1.1.3: + version "1.2.1" + resolved "https://registry.yarnpkg.com/samsam/-/samsam-1.2.1.tgz#edd39093a3184370cb859243b2bdf255e7d8ea67" + semver-diff@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/semver-diff/-/semver-diff-2.1.0.tgz#4bbb8437c8d37e4b0cf1a68fd726ec6d645d6d36" @@ -4059,7 +4256,7 @@ shebang-regex@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" -shelljs@0.7.7, shelljs@^0.7.5: +shelljs@0.7.7: version "0.7.7" resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.7.7.tgz#b2f5c77ef97148f4b4f6e22682e10bba8667cff1" dependencies: @@ -4067,10 +4264,31 @@ shelljs@0.7.7, shelljs@^0.7.5: interpret "^1.0.0" rechoir "^0.6.2" +shelljs@^0.7.5: + version "0.7.8" + resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.7.8.tgz#decbcf874b0d1e5fb72e14b164a9683048e9acb3" + dependencies: + glob "^7.0.0" + interpret "^1.0.0" + rechoir "^0.6.2" + signal-exit@^3.0.0, signal-exit@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" +sinon@^2.3.4: + version "2.3.5" + resolved "https://registry.yarnpkg.com/sinon/-/sinon-2.3.5.tgz#9a2fc0ff8d526da716f30953aa2c65d518917f6c" + dependencies: + diff "^3.1.0" + formatio "1.2.0" + lolex "^1.6.0" + native-promise-only "^0.8.1" + path-to-regexp "^1.7.0" + samsam "^1.1.3" + text-encoding "0.6.4" + type-detect "^4.0.0" + slash@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55" @@ -4174,6 +4392,10 @@ stream-http@^2.3.1: to-arraybuffer "^1.0.0" xtend "^4.0.0" +stream-shift@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.0.tgz#d5c752825e5367e786f78e18e445ea223a155952" + strict-uri-encode@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz#279b225df1d582b1f54e65addd4352e18faa0713" @@ -4193,6 +4415,10 @@ string-width@^2.0.0: is-fullwidth-code-point "^2.0.0" strip-ansi "^3.0.0" +string.prototype.codepointat@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/string.prototype.codepointat/-/string.prototype.codepointat-0.2.0.tgz#6b26e9bd3afcaa7be3b4269b526de1b82000ac78" + string_decoder@^0.10.25: version "0.10.31" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" @@ -4280,6 +4506,15 @@ tapable@^0.2.5, tapable@~0.2.5: version "0.2.6" resolved "https://registry.yarnpkg.com/tapable/-/tapable-0.2.6.tgz#206be8e188860b514425375e6f1ae89bfb01fd8d" +tar-fs@^1.15.1: + version "1.15.3" + resolved "https://registry.yarnpkg.com/tar-fs/-/tar-fs-1.15.3.tgz#eccf935e941493d8151028e636e51ce4c3ca7f20" + dependencies: + chownr "^1.0.1" + mkdirp "^0.5.1" + pump "^1.0.0" + tar-stream "^1.1.2" + tar-pack@^3.4.0: version "3.4.0" resolved "https://registry.yarnpkg.com/tar-pack/-/tar-pack-3.4.0.tgz#23be2d7f671a8339376cbdb0b8fe3fdebf317984" @@ -4293,6 +4528,15 @@ tar-pack@^3.4.0: tar "^2.2.1" uid-number "^0.0.6" +tar-stream@^1.1.2, tar-stream@^1.5.2: + version "1.5.4" + resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-1.5.4.tgz#36549cf04ed1aee9b2a30c0143252238daf94016" + dependencies: + bl "^1.0.0" + end-of-stream "^1.0.0" + readable-stream "^2.0.0" + xtend "^4.0.0" + tar@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/tar/-/tar-2.2.1.tgz#8e4d2a256c0e2185c6b18ad694aec968b83cb1d1" @@ -4307,11 +4551,15 @@ term-size@^0.1.0: dependencies: execa "^0.4.0" +text-encoding@0.6.4: + version "0.6.4" + resolved "https://registry.yarnpkg.com/text-encoding/-/text-encoding-0.6.4.tgz#e399a982257a276dae428bb92845cb71bdc26d19" + text-table@^0.2.0, text-table@~0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" -through2@^2.0.0: +through2@^2.0.0, through2@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.3.tgz#0004569b37c7c74ba39c43f3ced78d1ad94140be" dependencies: @@ -4397,6 +4645,10 @@ type-check@~0.3.2: dependencies: prelude-ls "~1.1.2" +type-detect@^4.0.0: + version "4.0.3" + resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.3.tgz#0e3f2670b44099b0b46c284d136a7ef49c74c2ea" + typedarray@^0.0.6: version "0.0.6" resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" @@ -4486,10 +4738,14 @@ util@0.10.3, util@^0.10.3: dependencies: inherits "2.0.1" -uuid@^3.0.0: +uuid@^3.0.0, uuid@^3.0.1: version "3.1.0" resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.1.0.tgz#3dd3d3e790abc24d7b0d3a034ffababe28ebbc04" +v8-compile-cache@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-1.1.0.tgz#1dc2a340fb8e5f800a32bcdbfb8c23cd747021b9" + v8flags@^2.0.10: version "2.1.1" resolved "https://registry.yarnpkg.com/v8flags/-/v8flags-2.1.1.tgz#aab1a1fa30d45f88dd321148875ac02c0b55e5b4" @@ -4697,3 +4953,41 @@ yargs@~3.10.0: cliui "^2.1.0" decamelize "^1.0.0" window-size "0.1.0" + +yarn@^0.24.5: + version "0.24.6" + resolved "https://registry.yarnpkg.com/yarn/-/yarn-0.24.6.tgz#4a128448000425f45df5cd6280b003a6201044fc" + dependencies: + babel-runtime "^6.0.0" + bytes "^2.4.0" + camelcase "^4.0.0" + chalk "^1.1.1" + cmd-shim "^2.0.1" + commander "^2.9.0" + death "^1.0.0" + debug "^2.2.0" + detect-indent "^5.0.0" + gunzip-maybe "^1.4.0" + ini "^1.3.4" + inquirer "^3.0.1" + invariant "^2.2.0" + is-builtin-module "^1.0.0" + is-ci "^1.0.10" + leven "^2.0.0" + loud-rejection "^1.2.0" + minimatch "^3.0.3" + mkdirp "^0.5.1" + node-emoji "^1.0.4" + object-path "^0.11.2" + proper-lockfile "^2.0.0" + read "^1.0.7" + request "^2.81.0" + request-capture-har "^1.2.2" + rimraf "^2.5.0" + semver "^5.1.0" + strip-bom "^3.0.0" + tar-fs "^1.15.1" + tar-stream "^1.5.2" + uuid "^3.0.1" + v8-compile-cache "^1.1.0" + validate-npm-package-license "^3.0.1" From 2fa28d7fd1ae1ea066ec3747ea1b290b66aa7706 Mon Sep 17 00:00:00 2001 From: tim Date: Wed, 21 Jun 2017 13:22:25 +0200 Subject: [PATCH 13/15] Add coverage badge --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 3e57c68..e945922 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,7 @@ > Official JavaScript driver for [BigchainDB](https://github.com/bigchaindb/bigchaindb) with some naive helpers to get you on your way making transactions in Node.js and the browser. [![npm](https://img.shields.io/npm/v/bigchaindb-driver.svg)](https://www.npmjs.com/package/bigchaindb-driver) +[![codecov](https://codecov.io/gh/bigchaindb/js-bigchaindb-driver/branch/master/graph/badge.svg)](https://codecov.io/gh/bigchaindb/js-bigchaindb-driver) [![js ascribe](https://img.shields.io/badge/js-ascribe-39BA91.svg)](https://github.com/ascribe/javascript) [![Build Status](https://travis-ci.org/bigchaindb/js-bigchaindb-driver.svg?branch=master)](https://travis-ci.org/bigchaindb/js-bigchaindb-driver) [![Greenkeeper badge](https://badges.greenkeeper.io/bigchaindb/js-bigchaindb-driver.svg)](https://greenkeeper.io/) From 0c6098fce75c2d6344f395b3b12c266066e85ee9 Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Tue, 20 Jun 2017 15:44:07 +0200 Subject: [PATCH 14/15] run precommit eslint on staged files only * closes #42 --- package.json | 6 +- yarn.lock | 191 ++++++++++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 188 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index 82821a9..017df51 100644 --- a/package.json +++ b/package.json @@ -24,9 +24,12 @@ "release-minor": "./node_modules/release-it/bin/release.js minor --src.tagName='v%s' --github.release --npm.publish --non-interactive", "release-major": "./node_modules/release-it/bin/release.js major --src.tagName='v%s' --github.release --npm.publish --non-interactive", "prepublishOnly": "npm update && npm run build", - "precommit": "npm run lint", + "precommit": "lint-staged", "report-coverage": "nyc report --reporter=lcov > coverage.lcov && codecov" }, + "lint-staged": { + "*.js": ["npm run lint"] + }, "devDependencies": { "ava": "^0.19.1", "babel-cli": "^6.22.2", @@ -46,6 +49,7 @@ "eslint-config-ascribe": "^3.0.4", "eslint-plugin-import": "^2.2.0", "husky": "^0.13.4", + "lint-staged": "^4.0.0", "nyc": "^11.0.2", "release-it": "^2.7.3", "rimraf": "^2.5.4", diff --git a/yarn.lock b/yarn.lock index 5c3c449..4b9bf86 100644 --- a/yarn.lock +++ b/yarn.lock @@ -97,7 +97,7 @@ ansi-align@^2.0.0: dependencies: string-width "^2.0.0" -ansi-escapes@^1.1.0: +ansi-escapes@^1.0.0, ansi-escapes@^1.1.0: version "1.4.0" resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-1.4.0.tgz#d3a8a83b319aa67793662b13e761c7911422306e" @@ -130,6 +130,10 @@ anymatch@^1.3.0: arrify "^1.0.0" micromatch "^2.1.5" +app-root-path@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/app-root-path/-/app-root-path-2.0.1.tgz#cd62dcf8e4fd5a417efc664d2e5b10653c651b46" + aproba@^1.0.3: version "1.1.2" resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.1.2.tgz#45c6629094de4e96f693ef7eab74ae079c240fc1" @@ -1248,7 +1252,7 @@ cli-boxes@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/cli-boxes/-/cli-boxes-1.0.0.tgz#4fa917c3e59c94a004cd61f8ee509da651687143" -cli-cursor@^1.0.1: +cli-cursor@^1.0.1, cli-cursor@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-1.0.2.tgz#64da3f7d56a54412e59794bd62dc35295e8f2987" dependencies: @@ -1260,10 +1264,21 @@ cli-cursor@^2.1.0: dependencies: restore-cursor "^2.0.0" +cli-spinners@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-0.1.2.tgz#bb764d88e185fb9e1e6a2a1f19772318f605e31c" + cli-spinners@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-1.0.0.tgz#ef987ed3d48391ac3dab9180b406a742180d6e6a" +cli-truncate@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/cli-truncate/-/cli-truncate-0.2.1.tgz#9f15cfbb0705005369216c626ac7d05ab90dd574" + dependencies: + slice-ansi "0.0.4" + string-width "^1.0.1" + cli-truncate@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/cli-truncate/-/cli-truncate-1.0.0.tgz#21eb91f47b3f6560f004db77a769b4668d9c5518" @@ -1416,6 +1431,19 @@ core-util-is@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" +cosmiconfig@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-1.1.0.tgz#0dea0f9804efdfb929fbb1b188e25553ea053d37" + dependencies: + graceful-fs "^4.1.2" + js-yaml "^3.4.3" + minimist "^1.2.0" + object-assign "^4.0.1" + os-homedir "^1.0.1" + parse-json "^2.2.0" + pinkie-promise "^2.0.0" + require-from-string "^1.1.0" + create-ecdh@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/create-ecdh/-/create-ecdh-4.0.0.tgz#888c723596cdf7612f6498233eebd7a35301737d" @@ -1470,7 +1498,7 @@ cross-spawn@^4.0.0: lru-cache "^4.0.1" which "^1.2.9" -cross-spawn@^5.1.0: +cross-spawn@^5.0.1, cross-spawn@^5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" dependencies: @@ -1521,6 +1549,10 @@ dashdash@^1.12.0: dependencies: assert-plus "^1.0.0" +date-fns@^1.27.2: + version "1.28.5" + resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-1.28.5.tgz#257cfc45d322df45ef5658665967ee841cd73faf" + date-now@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/date-now/-/date-now-0.1.4.tgz#eaf439fd4d4848ad74e5cc7dbef200672b9e345b" @@ -1664,6 +1696,10 @@ ed25519@0.0.4: bindings "^1.2.1" nan "^2.0.9" +elegant-spinner@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/elegant-spinner/-/elegant-spinner-1.0.1.tgz#db043521c95d7e303fd8f345bedc3349cfb0729e" + elliptic@^6.0.0: version "6.4.0" resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.4.0.tgz#cac9af8762c85836187003c8dfe193e5e2eae5df" @@ -1930,6 +1966,10 @@ estraverse@^4.0.0, estraverse@^4.1.0, estraverse@^4.1.1, estraverse@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13" +estraverse@~4.1.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.1.1.tgz#f6caca728933a850ef90661d0e17982ba47111a2" + esutils@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" @@ -1974,6 +2014,18 @@ execa@^0.5.0: signal-exit "^3.0.0" strip-eof "^1.0.0" +execa@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/execa/-/execa-0.7.0.tgz#944becd34cc41ee32a63a9faf27ad5a65fc59777" + dependencies: + cross-spawn "^5.0.1" + get-stream "^3.0.0" + is-stream "^1.1.0" + npm-run-path "^2.0.0" + p-finally "^1.0.0" + signal-exit "^3.0.0" + strip-eof "^1.0.0" + exit-hook@^1.0.0: version "1.1.1" resolved "https://registry.yarnpkg.com/exit-hook/-/exit-hook-1.1.1.tgz#f05ca233b48c05d54fff07765df8507e95c02ff8" @@ -2028,7 +2080,7 @@ fetch-ponyfill@^4.0.0: dependencies: node-fetch "~1.6.0" -figures@^1.3.5: +figures@^1.3.5, figures@^1.7.0: version "1.7.0" resolved "https://registry.yarnpkg.com/figures/-/figures-1.7.0.tgz#cbe1e3affcf1cd44b80cadfed28dc793a9701d2e" dependencies: @@ -2922,7 +2974,7 @@ js-utility-belt@^1.5.0: spark-md5 "^2.0.2" sprintf-js "^1.0.3" -js-yaml@^3.5.1, js-yaml@^3.8.2: +js-yaml@^3.4.3, js-yaml@^3.5.1, js-yaml@^3.8.2: version "3.8.4" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.8.4.tgz#520b4564f86573ba96662af85a8cafa7b4b5a6f6" dependencies: @@ -3029,6 +3081,67 @@ levn@^0.3.0, levn@~0.3.0: prelude-ls "~1.1.2" type-check "~0.3.2" +lint-staged@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-4.0.0.tgz#c15669f598614a6e68090303e175a799d48e0d85" + dependencies: + app-root-path "^2.0.0" + cosmiconfig "^1.1.0" + execa "^0.7.0" + listr "^0.12.0" + lodash.chunk "^4.2.0" + minimatch "^3.0.0" + npm-which "^3.0.1" + p-map "^1.1.1" + staged-git-files "0.0.4" + +listr-silent-renderer@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/listr-silent-renderer/-/listr-silent-renderer-1.1.1.tgz#924b5a3757153770bf1a8e3fbf74b8bbf3f9242e" + +listr-update-renderer@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/listr-update-renderer/-/listr-update-renderer-0.2.0.tgz#ca80e1779b4e70266807e8eed1ad6abe398550f9" + dependencies: + chalk "^1.1.3" + cli-truncate "^0.2.1" + elegant-spinner "^1.0.1" + figures "^1.7.0" + indent-string "^3.0.0" + log-symbols "^1.0.2" + log-update "^1.0.2" + strip-ansi "^3.0.1" + +listr-verbose-renderer@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/listr-verbose-renderer/-/listr-verbose-renderer-0.4.0.tgz#44dc01bb0c34a03c572154d4d08cde9b1dc5620f" + dependencies: + chalk "^1.1.3" + cli-cursor "^1.0.2" + date-fns "^1.27.2" + figures "^1.7.0" + +listr@^0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/listr/-/listr-0.12.0.tgz#6bce2c0f5603fa49580ea17cd6a00cc0e5fa451a" + dependencies: + chalk "^1.1.3" + cli-truncate "^0.2.1" + figures "^1.7.0" + indent-string "^2.1.0" + is-promise "^2.1.0" + is-stream "^1.1.0" + listr-silent-renderer "^1.1.1" + listr-update-renderer "^0.2.0" + listr-verbose-renderer "^0.4.0" + log-symbols "^1.0.2" + log-update "^1.0.2" + ora "^0.2.3" + p-map "^1.1.1" + rxjs "^5.0.0-beta.11" + stream-to-observable "^0.1.0" + strip-ansi "^3.0.1" + load-json-file@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0" @@ -3076,6 +3189,10 @@ locate-path@^2.0.0: p-locate "^2.0.0" path-exists "^3.0.0" +lodash.chunk@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/lodash.chunk/-/lodash.chunk-4.2.0.tgz#66e5ce1f76ed27b4303d8c6512e8d1216e8106bc" + lodash.clonedeep@^4.5.0: version "4.5.0" resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef" @@ -3116,6 +3233,19 @@ lodash@4.17.4, lodash@^4.0.0, lodash@^4.14.0, lodash@^4.2.0, lodash@^4.3.0: version "4.17.4" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae" +log-symbols@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-1.0.2.tgz#376ff7b58ea3086a0f09facc74617eca501e1a18" + dependencies: + chalk "^1.0.0" + +log-update@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/log-update/-/log-update-1.0.2.tgz#19929f64c4093d2d2e7075a1dad8af59c296b8d1" + dependencies: + ansi-escapes "^1.0.0" + cli-cursor "^1.0.2" + lolex@^1.6.0: version "1.6.0" resolved "https://registry.yarnpkg.com/lolex/-/lolex-1.6.0.tgz#3a9a0283452a47d7439e72731b9e07d7386e49f6" @@ -3413,6 +3543,12 @@ normalize-path@^2.0.1: dependencies: remove-trailing-separator "^1.0.1" +npm-path@^2.0.2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/npm-path/-/npm-path-2.0.3.tgz#15cff4e1c89a38da77f56f6055b24f975dfb2bbe" + dependencies: + which "^1.2.10" + npm-run-path@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-1.0.0.tgz#f5c32bf595fe81ae927daec52e82f8b000ac3c8f" @@ -3425,6 +3561,14 @@ npm-run-path@^2.0.0: dependencies: path-key "^2.0.0" +npm-which@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/npm-which/-/npm-which-3.0.1.tgz#9225f26ec3a285c209cae67c3b11a6b4ab7140aa" + dependencies: + commander "^2.9.0" + npm-path "^2.0.2" + which "^1.2.10" + npmlog@^4.0.2: version "4.1.0" resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.0.tgz#dc59bee85f64f00ed424efb2af0783df25d1c0b5" @@ -3509,11 +3653,20 @@ optionator@^0.8.2: type-check "~0.3.2" wordwrap "~1.0.0" +ora@^0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/ora/-/ora-0.2.3.tgz#37527d220adcd53c39b73571d754156d5db657a4" + dependencies: + chalk "^1.1.1" + cli-cursor "^1.0.2" + cli-spinners "^0.1.2" + object-assign "^4.0.1" + os-browserify@^0.2.0: version "0.2.1" resolved "https://registry.yarnpkg.com/os-browserify/-/os-browserify-0.2.1.tgz#63fc4ccee5d2d7763d26bbf8601078e6c2e0044f" -os-homedir@^1.0.0: +os-homedir@^1.0.0, os-homedir@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" @@ -3556,6 +3709,10 @@ p-locate@^2.0.0: dependencies: p-limit "^1.1.0" +p-map@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/p-map/-/p-map-1.1.1.tgz#05f5e4ae97a068371bc2a5cc86bfbdbc19c4ae7a" + package-hash@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/package-hash/-/package-hash-1.2.0.tgz#003e56cd57b736a6ed6114cc2b81542672770e44" @@ -4094,6 +4251,10 @@ require-directory@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" +require-from-string@^1.1.0: + version "1.2.1" + resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-1.2.1.tgz#529c9ccef27380adfec9a2f965b649bbee636418" + require-main-filename@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" @@ -4198,6 +4359,12 @@ rx@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/rx/-/rx-4.1.0.tgz#a5f13ff79ef3b740fe30aa803fb09f98805d4782" +rxjs@^5.0.0-beta.11: + version "5.4.1" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-5.4.1.tgz#b62f757f279445d265a18a58fb0a70dc90e91626" + dependencies: + symbol-observable "^1.0.1" + safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@~5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.0.tgz#fe4c8460397f9eaaaa58e73be46273408a45e223" @@ -4371,6 +4538,10 @@ stack-utils@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-1.0.1.tgz#d4f33ab54e8e38778b0ca5cfd3b3afb12db68620" +staged-git-files@0.0.4: + version "0.0.4" + resolved "https://registry.yarnpkg.com/staged-git-files/-/staged-git-files-0.0.4.tgz#d797e1b551ca7a639dec0237dc6eb4bb9be17d35" + stream-browserify@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/stream-browserify/-/stream-browserify-2.0.1.tgz#66266ee5f9bdb9940a4e4514cafb43bb71e5c9db" @@ -4396,6 +4567,10 @@ stream-shift@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.0.tgz#d5c752825e5367e786f78e18e445ea223a155952" +stream-to-observable@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/stream-to-observable/-/stream-to-observable-0.1.0.tgz#45bf1d9f2d7dc09bed81f1c307c430e68b84cffe" + strict-uri-encode@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz#279b225df1d582b1f54e65addd4352e18faa0713" @@ -4487,7 +4662,7 @@ symbol-observable@^0.2.2: version "0.2.4" resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-0.2.4.tgz#95a83db26186d6af7e7a18dbd9760a2f86d08f40" -symbol-observable@^1.0.4: +symbol-observable@^1.0.1, symbol-observable@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.0.4.tgz#29bf615d4aa7121bdd898b22d4b3f9bc4e2aa03d" @@ -4824,7 +4999,7 @@ which-module@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/which-module/-/which-module-1.0.0.tgz#bba63ca861948994ff307736089e3b96026c2a4f" -which@^1.2.8, which@^1.2.9: +which@^1.2.10, which@^1.2.8, which@^1.2.9: version "1.2.14" resolved "https://registry.yarnpkg.com/which/-/which-1.2.14.tgz#9a87c4378f03e827cecaf1acdf56c736c01c14e5" dependencies: From 4fe121f77c4c4aa232f9f8ea43c1b4b5c7049342 Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Wed, 21 Jun 2017 13:38:15 +0200 Subject: [PATCH 15/15] fix lint-staged eslint running on everything --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 017df51..afca354 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "report-coverage": "nyc report --reporter=lcov > coverage.lcov && codecov" }, "lint-staged": { - "*.js": ["npm run lint"] + "*.js": ["eslint"] }, "devDependencies": { "ava": "^0.19.1",