From e72de4e9410d23e65cb3a8df73a6d138ee77e975 Mon Sep 17 00:00:00 2001 From: epayet Date: Thu, 9 Feb 2017 13:48:12 +0000 Subject: [PATCH 1/3] Use directly binaries on package.json and refactor lint command --- package.json | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index d04772d..5ac28e4 100644 --- a/package.json +++ b/package.json @@ -41,9 +41,10 @@ "xlint-jslint-medikoo": "^0.1.4" }, "scripts": { - "lint": "node node_modules/xlint/bin/xlint --linter=node_modules/xlint-jslint-medikoo/index.js --no-cache --no-stream", - "lint-console": "node node_modules/xlint/bin/xlint --linter=node_modules/xlint-jslint-medikoo/index.js --watch", - "test": "node node_modules/tad/bin/tad" + "lint": "npm run lint-medikoo -- --no-cache --no-stream", + "lint-console": "npm run lint-medikoo -- --watch", + "lint-medikoo": "xlint --linter=node_modules/xlint-jslint-medikoo/index.js", + "test": "tad" }, "license": "MIT" } From 65d160ee1b9eb3578c1d25ff92825d81abebe96d Mon Sep 17 00:00:00 2001 From: Mariusz Nowak Date: Fri, 17 Feb 2017 12:18:11 +0100 Subject: [PATCH 2/3] Improve error message --- ext/promise.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ext/promise.js b/ext/promise.js index 4c52133..089d305 100644 --- a/ext/promise.js +++ b/ext/promise.js @@ -26,10 +26,10 @@ require('../lib/registered-extensions').promise = function (mode, conf) { var onSuccess = function (result) { var count = waiting[id]; if (isFailed) { - throw new Error("Memoizee error: Promise handling resolved with both failure and success," + - " This can be result of unordered done & finally resolution.\n" + - "Instead of `promise: true` consider configuring memoization with `promise: 'done'` or " + - "`promise: `then`"); + throw new Error("Memoizee error: Promise resolved with both failure and success," + + " this can be result of unordered done & finally resolution.\n" + + "Instead of `promise: true` consider configuring memoization via `promise: 'then'` or " + + "`promise: 'done'"); } if (!count) return; // deleted from cache before resolved delete waiting[id]; From 81a100e2510ed5eba8157d078dd410239d4cd746 Mon Sep 17 00:00:00 2001 From: Mariusz Nowak Date: Fri, 17 Feb 2017 12:18:48 +0100 Subject: [PATCH 3/3] v0.4.2 --- CHANGES | 6 ++++++ package.json | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index 35d9898..573b24c 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,9 @@ +v0.4.2 -- 2017.02.17 +* Guard proper promise resolution in promise mode +* Improve documentation +* Improve npm scripts configuration +* Improve CI configuration + v0.4.1 -- 2016.07.13 * Fix promise mode to not use `then` and `finally` pair. Thanks @Kovensky * Add 'done' mode to 'promise' mode (so now callbacks can be registered through `done` but no diff --git a/package.json b/package.json index 5ac28e4..58f3d19 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "memoizee", - "version": "0.4.1", + "version": "0.4.2", "description": "Memoize/cache function results", "author": "Mariusz Nowak (http://www.medikoo.com/)", "keywords": [ @@ -36,7 +36,7 @@ }, "devDependencies": { "plain-promise": "^0.1.1", - "tad": "^0.2.4", + "tad": "^0.2.7", "xlint": "^0.2.2", "xlint-jslint-medikoo": "^0.1.4" },