From bfdc61526bd9e133ea08227ac131f5224fea34d0 Mon Sep 17 00:00:00 2001 From: Duane Sibilly Date: Thu, 1 Jun 2017 21:24:57 -0400 Subject: [PATCH 1/4] Fix promiseWIthCallback example in README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index dd3b570..62ec88a 100644 --- a/README.md +++ b/README.md @@ -343,7 +343,7 @@ const pReadFile = (path, options) => { promise } = presage.promiseWithCallback(); - fs.readFile(filename, options, callbackFunction); + fs.readFile(path, options, callbackFunction); return promise; }; From b39b22a46147e86f6fea840f02b991d0c11f9d20 Mon Sep 17 00:00:00 2001 From: Duane Sibilly Date: Thu, 1 Jun 2017 21:25:22 -0400 Subject: [PATCH 2/4] Revise map example with promiseWithCallback usage --- README.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 62ec88a..0f5f095 100644 --- a/README.md +++ b/README.md @@ -142,15 +142,15 @@ __Example__ import fs from 'fs'; import presage from 'presage'; -const pStats = file => new Promise((resolve, reject) => { - fs.stat(file, (error, stats) => { - if (error) { - reject(error); - } else { - resolve(stats); - } - }); -}); +const pState = file => { + const { + callbackFunction, + promise + } = presage.promiseWithCallback(); + + fs.stat(file, callbackFunction); + return promise; +} presage.map([ 'file1', From c710af715381ce9362a9309b5b34a0e44c7a6b43 Mon Sep 17 00:00:00 2001 From: Duane Sibilly Date: Thu, 1 Jun 2017 21:33:30 -0400 Subject: [PATCH 3/4] Increase coverage requirements --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 82efd1e..3e4f9d6 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,7 @@ "build": "BABEL_ENV=build babel js -d lib", "coverage": "babel-node ./node_modules/.bin/babel-istanbul cover _mocha --report lcovonly -- -R spec", "lint": "node_modules/.bin/eslint js", - "posttest": "[ -z \"$npm_config_coverage\" ] || babel-istanbul check-coverage --branches 80 --functions 100 --lines 95 --statements 95", + "posttest": "[ -z \"$npm_config_coverage\" ] || babel-istanbul check-coverage --branches 80 --functions 100 --lines 100 --statements 100", "prepare": "npm run build", "prepublishOnly": "npm run securityCheck && npm test --coverage", "pretest": "npm run lint", From 19bf2d4086823ecc891acd82bce3a7cb3f696686 Mon Sep 17 00:00:00 2001 From: Duane Sibilly Date: Thu, 1 Jun 2017 21:33:41 -0400 Subject: [PATCH 4/4] Release hotfix v0.1.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 3e4f9d6..5bf7f2e 100644 --- a/package.json +++ b/package.json @@ -65,5 +65,5 @@ "start": "node lib/index.js", "test": "babel-node ./node_modules/.bin/babel-istanbul test _mocha" }, - "version": "0.1.0" + "version": "0.1.2" }