From f69036f5a361f7747c527c57df69448b261cfe64 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Mon, 25 Jul 2016 19:33:40 +0300 Subject: [PATCH] feature(bower) smalltalk v2.1.1 --- bower.json | 4 ++-- modules/promise-polyfill/.bower.json | 5 ++--- modules/smalltalk/.bower.json | 16 ++++++++------- modules/smalltalk/ChangeLog | 9 +++++++++ modules/smalltalk/bower.json | 3 ++- .../smalltalk/dist/smalltalk.native.min.js | 2 +- .../dist/smalltalk.native.poly.min.js | 2 +- modules/smalltalk/lib/smalltalk.js | 4 ++-- modules/smalltalk/lib/smalltalk.native.js | 6 +++--- modules/smalltalk/package.json | 20 +++++++++++++------ 10 files changed, 45 insertions(+), 26 deletions(-) diff --git a/bower.json b/bower.json index c716ab4e..7830e8b5 100644 --- a/bower.json +++ b/bower.json @@ -39,7 +39,7 @@ "olark": "^1.0.0", "philip": "^1.3.3", "jquery": "3.1.0", - "smalltalk": "2.1.0", - "promise-polyfill": "6.0.0" + "promise-polyfill": "6.0.0", + "smalltalk": "2.1.1" } } diff --git a/modules/promise-polyfill/.bower.json b/modules/promise-polyfill/.bower.json index a47cdaba..fc79d923 100644 --- a/modules/promise-polyfill/.bower.json +++ b/modules/promise-polyfill/.bower.json @@ -32,7 +32,6 @@ "commit": "33dbcad07b762540f0f743f917be9bc829108bae" }, "_source": "https://github.com/taylorhakes/promise-polyfill.git", - "_target": "^6.0.0", - "_originalSource": "promise-polyfill", - "_direct": true + "_target": "6.0.0", + "_originalSource": "promise-polyfill" } \ No newline at end of file diff --git a/modules/smalltalk/.bower.json b/modules/smalltalk/.bower.json index c06e58f2..f55bc074 100644 --- a/modules/smalltalk/.bower.json +++ b/modules/smalltalk/.bower.json @@ -20,17 +20,19 @@ "ignore": [ "**/.*", "screen", - "example" + "example", + "test" ], "dependencies": {}, - "version": "2.1.0", - "_release": "2.1.0", + "version": "2.1.1", + "_release": "2.1.1", "_resolution": { "type": "version", - "tag": "v2.1.0", - "commit": "c94a49648f0ffff6f24e5770581b0528cc130664" + "tag": "v2.1.1", + "commit": "d5fbf701270e46919e63d287be0834c6b718ae51" }, "_source": "https://github.com/coderaiser/smalltalk.git", - "_target": "2.1.0", - "_originalSource": "smalltalk" + "_target": "^2.1.1", + "_originalSource": "smalltalk", + "_direct": true } \ No newline at end of file diff --git a/modules/smalltalk/ChangeLog b/modules/smalltalk/ChangeLog index bd43495c..d05fb979 100644 --- a/modules/smalltalk/ChangeLog +++ b/modules/smalltalk/ChangeLog @@ -1,3 +1,12 @@ +2016.07.25, v2.1.1 + +fix: +- (smalltalk.native) confirm options: noCancel -> cancel + +feature: +- (package) promise-polyfill v6.0.0 + + 2016.07.20, v2.1.0 fix: diff --git a/modules/smalltalk/bower.json b/modules/smalltalk/bower.json index 385c23db..23dc1c14 100644 --- a/modules/smalltalk/bower.json +++ b/modules/smalltalk/bower.json @@ -20,7 +20,8 @@ "ignore": [ "**/.*", "screen", - "example" + "example", + "test" ], "dependencies": {} } diff --git a/modules/smalltalk/dist/smalltalk.native.min.js b/modules/smalltalk/dist/smalltalk.native.min.js index 61082ba2..811847f6 100644 --- a/modules/smalltalk/dist/smalltalk.native.min.js +++ b/modules/smalltalk/dist/smalltalk.native.min.js @@ -1 +1 @@ -!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n;n="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,n.smalltalk=e()}}(function(){return function e(n,r,t){function o(i,u){if(!r[i]){if(!n[i]){var l="function"==typeof require&&require;if(!u&&l)return l(i,!0);if(f)return f(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var c=r[i]={exports:{}};n[i][0].call(c.exports,function(e){var r=n[i][1][e];return o(r?r:e)},c,c.exports,e,n,r,t)}return r[i].exports}for(var f="function"==typeof require&&require,i=0;ie;e++)r(t,t._deferreds[e]);t._deferreds=null}function c(t,e,n){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof e?e:null,this.promise=n}function s(t,e){var n=!1;try{t(function(t){n||(n=!0,i(e,t))},function(t){n||(n=!0,f(e,t))})}catch(o){if(n)return;n=!0,f(e,o)}}var l=setTimeout,a="function"==typeof setImmediate&&setImmediate||function(t){l(t,0)},d=function(t){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",t)};o.prototype["catch"]=function(t){return this.then(null,t)},o.prototype.then=function(t,n){var o=new this.constructor(e);return r(this,new c(t,n,o)),o},o.all=function(t){var e=Array.prototype.slice.call(t);return new o(function(t,n){function o(i,f){try{if(f&&("object"==typeof f||"function"==typeof f)){var u=f.then;if("function"==typeof u)return void u.call(f,function(t){o(i,t)},n)}e[i]=f,0===--r&&t(e)}catch(c){n(c)}}if(0===e.length)return t([]);for(var r=e.length,i=0;io;o++)t[o].then(e,n)})},o._setImmediateFn=function(t){a=t},o._setUnhandledRejectionFn=function(t){d=t},"undefined"!=typeof module&&module.exports?module.exports=o:t.Promise||(t.Promise=o)}(this);!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n;n="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,n.smalltalk=e()}}(function(){return function e(n,r,t){function o(i,u){if(!r[i]){if(!n[i]){var l="function"==typeof require&&require;if(!u&&l)return l(i,!0);if(f)return f(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var c=r[i]={exports:{}};n[i][0].call(c.exports,function(e){var r=n[i][1][e];return o(r?r:e)},c,c.exports,e,n,r,t)}return r[i].exports}for(var f="function"==typeof require&&require,i=0;ie;e++)r(t,t._deferreds[e]);t._deferreds=null}function c(t,e,n){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof e?e:null,this.promise=n}function s(t,e){var n=!1;try{t(function(t){n||(n=!0,i(e,t))},function(t){n||(n=!0,f(e,t))})}catch(o){if(n)return;n=!0,f(e,o)}}var l=setTimeout,a="function"==typeof setImmediate&&setImmediate||function(t){l(t,0)},d=function(t){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",t)};o.prototype["catch"]=function(t){return this.then(null,t)},o.prototype.then=function(t,n){var o=new this.constructor(e);return r(this,new c(t,n,o)),o},o.all=function(t){var e=Array.prototype.slice.call(t);return new o(function(t,n){function o(i,f){try{if(f&&("object"==typeof f||"function"==typeof f)){var u=f.then;if("function"==typeof u)return void u.call(f,function(t){o(i,t)},n)}e[i]=f,0===--r&&t(e)}catch(c){n(c)}}if(0===e.length)return t([]);for(var r=e.length,i=0;io;o++)t[o].then(e,n)})},o._setImmediateFn=function(t){a=t},o._setUnhandledRejectionFn=function(t){d=t},"undefined"!=typeof module&&module.exports?module.exports=o:t.Promise||(t.Promise=o)}(this);!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n;n="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,n.smalltalk=e()}}(function(){return function e(n,r,t){function o(i,u){if(!r[i]){if(!n[i]){var l="function"==typeof require&&require;if(!u&&l)return l(i,!0);if(f)return f(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var c=r[i]={exports:{}};n[i][0].call(c.exports,function(e){var r=n[i][1][e];return o(r?r:e)},c,c.exports,e,n,r,t)}return r[i].exports}for(var f="function"==typeof require&&require,i=0;i + addListenerAll('click', dialog, closeButtons, event => closeDialog(event.target, dialog, ok, cancel) ); @@ -224,7 +224,7 @@ function find(element, names) { return elements; } -function addListeterAll(event, parent, elements, fn) { +function addListenerAll(event, parent, elements, fn) { find(parent, elements).forEach(el => el.addEventListener(event, fn) ); diff --git a/modules/smalltalk/lib/smalltalk.native.js b/modules/smalltalk/lib/smalltalk.native.js index 97d6cfc5..582dd535 100644 --- a/modules/smalltalk/lib/smalltalk.native.js +++ b/modules/smalltalk/lib/smalltalk.native.js @@ -26,13 +26,13 @@ exports.prompt = (title, message, value, options) => { exports.confirm = (title, message, options) => { const o = options, - noCancel = o && !o.noCancel, + noCancel = o && !o.cancel, promise = new Promise(function(resolve, reject) { const is = confirm(message); - if (is) + if (is || noCancel) resolve(); - else if (!noCancel) + else reject(); }); diff --git a/modules/smalltalk/package.json b/modules/smalltalk/package.json index 9087f4df..b4d65ad0 100644 --- a/modules/smalltalk/package.json +++ b/modules/smalltalk/package.json @@ -1,6 +1,6 @@ { "name": "smalltalk", - "version": "2.1.0", + "version": "2.1.1", "description": "Promise-based Alert, Confirm and Prompt replacement", "homepage": "http://github.com/coderaiser/smalltalk", "repository": { @@ -17,7 +17,11 @@ ] }, "scripts": { - "watch": "watch 'npm run 6to5' dist", + "watch": "nodemon --watch lib --watch test --exec", + "watch:test": "npm run watch -- npm test", + "watch:coverage": "redrun watch -- redrun coverage", + "coverage": "nyc npm test", + "report": "nyc report --reporter=text-lcov | coveralls", "compile:js": "babel -d legacy lib", "compile:css": "postcss --use autoprefixer css/*.css -d dist", "minify:css": "minify dist/smalltalk.css > dist/smalltalk.min.css", @@ -41,9 +45,9 @@ "minify": "minify", "wisdom": "npm run build", "lint:css": "stylelint css/*.css", - "lint:js": "jshint lib && jscs lib && eslint lib", + "lint:js": "jshint lib test && jscs lib test && eslint lib test", "lint": "redrun lint:*", - "test": "redrun lint:*" + "test": "tape 'test/**/*.js'" }, "keywords": [ "modal", @@ -61,17 +65,21 @@ "babel-cli": "^6.1.1", "babel-preset-es2015": "^6.0.15", "browserify": "^13.0.1", + "coveralls": "^2.11.11", "eslint": "^3.0.1", "jscs": "^3.0.3", "jshint": "^2.8.0", "minify": "^2.0.0", + "nodemon": "^1.9.2", + "nyc": "^7.0.0", "postcss-cli": "^2.5.2", - "promise-polyfill": "^5.1.0", + "promise-polyfill": "^6.0.0", "redrun": "^5.0.1", "rimraf": "^2.5.3", + "sinon": "^1.17.4", "stylelint": "^7.0.2", "stylelint-config-standard": "^11.0.0", "systemjs": "^0.19.31", - "watch": "^0.19.1" + "tape": "^4.6.0" } }