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/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]; diff --git a/package.json b/package.json index a62ffa8..9092431 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": [ @@ -37,14 +37,15 @@ "devDependencies": { "deferred": "^0.7.5", "plain-promise": "^0.1.1", - "tad": "^0.2.4", + "tad": "^0.2.7", "xlint": "^0.2.2", "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" }