From e368a283b18a978645ce85da5894e7cafed3a773 Mon Sep 17 00:00:00 2001 From: Panu Horsmalahti Date: Sun, 5 Apr 2015 19:45:52 +0300 Subject: [PATCH 01/15] Add .npmignore to exclude unnecessary development files from npm package --- .npmignore | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 .npmignore diff --git a/.npmignore b/.npmignore new file mode 100644 index 0000000..fd842b0 --- /dev/null +++ b/.npmignore @@ -0,0 +1,4 @@ +# Development files +/tests/ +/.travis.yml +/screenshots From 65b9a16feffefe4f3ade28da0e7e97d6bd89b994 Mon Sep 17 00:00:00 2001 From: mahdi pedramrazi Date: Tue, 25 Aug 2015 14:54:25 -0700 Subject: [PATCH 02/15] Fixing the path in main we are using require.resolve and it's failing because the path is incorrect. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c365064..bc8d2e5 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "engines": { "node": ">=0.1.90" }, - "main": "lib", + "main": "lib/index.js", "files": [ "examples", "lib", From 7e1e601ddc2e381724fa5ba28cd842712aa3eca4 Mon Sep 17 00:00:00 2001 From: Osman Mesut Ozcan Date: Tue, 31 Jan 2017 17:52:50 +0800 Subject: [PATCH 03/15] Update stringPrototypeBlacklist object stringPrototypeBlacklist is updated according to ES6 String.prototype.repeat() method. --- lib/extendStringPrototype.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/extendStringPrototype.js b/lib/extendStringPrototype.js index 67374a1..10c10f0 100644 --- a/lib/extendStringPrototype.js +++ b/lib/extendStringPrototype.js @@ -67,7 +67,7 @@ module['exports'] = function () { var stringPrototypeBlacklist = [ '__defineGetter__', '__defineSetter__', '__lookupGetter__', '__lookupSetter__', 'charAt', 'constructor', 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'toLocaleString', 'toString', 'valueOf', 'charCodeAt', - 'indexOf', 'lastIndexof', 'length', 'localeCompare', 'match', 'replace', 'search', 'slice', 'split', 'substring', + 'indexOf', 'lastIndexof', 'length', 'localeCompare', 'match','repeat' , 'replace', 'search', 'slice', 'split', 'substring', 'toLocaleLowerCase', 'toLocaleUpperCase', 'toLowerCase', 'toUpperCase', 'trim', 'trimLeft', 'trimRight' ]; @@ -110,4 +110,4 @@ module['exports'] = function () { } }; -}; \ No newline at end of file +}; From 511aa7f822012914e6e1e146b09a708bd30f23f6 Mon Sep 17 00:00:00 2001 From: Osman Mesut OZCAN Date: Tue, 31 Jan 2017 18:17:11 +0800 Subject: [PATCH 04/15] Update stringPrototypeBlacklist object stringPrototypeBlacklist is updated according to ES6 String.prototype.repeat() method --- lib/extendStringPrototype.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/extendStringPrototype.js b/lib/extendStringPrototype.js index 10c10f0..d6a3f63 100644 --- a/lib/extendStringPrototype.js +++ b/lib/extendStringPrototype.js @@ -67,7 +67,7 @@ module['exports'] = function () { var stringPrototypeBlacklist = [ '__defineGetter__', '__defineSetter__', '__lookupGetter__', '__lookupSetter__', 'charAt', 'constructor', 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'toLocaleString', 'toString', 'valueOf', 'charCodeAt', - 'indexOf', 'lastIndexof', 'length', 'localeCompare', 'match','repeat' , 'replace', 'search', 'slice', 'split', 'substring', + 'indexOf', 'lastIndexof', 'length', 'localeCompare', 'match', 'repeat', 'replace', 'search', 'slice', 'split', 'substring', 'toLocaleLowerCase', 'toLocaleUpperCase', 'toLowerCase', 'toUpperCase', 'trim', 'trimLeft', 'trimRight' ]; From 8d714a064203406060c67f8ba3c1ecad0e9913cb Mon Sep 17 00:00:00 2001 From: Meriem Khelifi Date: Wed, 8 Mar 2017 23:34:49 +0100 Subject: [PATCH 05/15] Adding badges npm, dependencies and devDependencies --- ReadMe.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ReadMe.md b/ReadMe.md index f09eb70..14a4731 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -1,4 +1,8 @@ -# colors.js [![Build Status](https://travis-ci.org/Marak/colors.js.svg?branch=master)](https://travis-ci.org/Marak/colors.js) +# colors.js +[![Build Status](https://travis-ci.org/Marak/colors.js.svg?branch=master)](https://travis-ci.org/Marak/colors.js) +[![version](https://img.shields.io/npm/v/colors.svg)](https://www.npmjs.org/package/colors) +[![dependencies](https://david-dm.org/Marak/colors.js.svg)](https://david-dm.org/Marak/colors.js) +[![devDependencies](https://david-dm.org/Marak/colors.js/dev-status.svg)](https://david-dm.org/Marak/colors.js#info=devDependencies) ## get color and style in your node.js console From 8c5af7ca1575c66f1b786460c38d900a6f149dd6 Mon Sep 17 00:00:00 2001 From: GlitchMasta47 Date: Sat, 11 Mar 2017 13:07:55 -0600 Subject: [PATCH 06/15] Update safe.js Whoa, string never ends! (even though it's a comment and it doesn't matter for that, but for the documentation's sake) --- safe.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/safe.js b/safe.js index a6a1f3a..b2574e7 100644 --- a/safe.js +++ b/safe.js @@ -1,9 +1,9 @@ // // Remark: Requiring this file will use the "safe" colors API which will not touch String.prototype // -// var colors = require('colors/safe); +// var colors = require('colors/safe'); // colors.red("foo") // // var colors = require('./lib/colors'); -module['exports'] = colors; \ No newline at end of file +module['exports'] = colors; From d0ae0e51641f4572d5e42c33861a4e0bd1d0cc8c Mon Sep 17 00:00:00 2001 From: Marak Date: Wed, 17 Jun 2015 14:49:52 +0200 Subject: [PATCH 07/15] [fix] In-proper scope reference. Closes #124 --- lib/extendStringPrototype.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/extendStringPrototype.js b/lib/extendStringPrototype.js index bbb9bcc..67374a1 100644 --- a/lib/extendStringPrototype.js +++ b/lib/extendStringPrototype.js @@ -86,7 +86,7 @@ module['exports'] = function () { addProperty(prop, function () { var ret = this; for (var t = 0; t < theme[prop].length; t++) { - ret = exports[theme[prop][t]](ret); + ret = colors[theme[prop][t]](ret); } return ret; }); From fbc26111cef778b63129f8a1ef4c84b3f7f29572 Mon Sep 17 00:00:00 2001 From: Marak Date: Wed, 17 Jun 2015 14:50:29 +0200 Subject: [PATCH 08/15] [dist] Bump to v1.1.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a896254..67e03ed 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "colors", "description": "get colors in your node.js console", - "version": "1.1.0", + "version": "1.1.1", "author": "Marak Squires", "homepage": "https://github.com/Marak/colors.js", "bugs": "https://github.com/Marak/colors.js/issues", From 8407be1d38212a75c84473353570a3227bff70af Mon Sep 17 00:00:00 2001 From: Marak Date: Wed, 17 Jun 2015 14:59:08 +0200 Subject: [PATCH 09/15] [fix] Really bad example in README. Examples should actually contain code that can run. Blame c11d23d96aee270bcfc8761c1f6c20579def88f3 --- ReadMe.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ReadMe.md b/ReadMe.md index f139bd5..0326aab 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -166,12 +166,13 @@ console.log(colors.warn("this is a warning")); You can also combine them: ```javascript +var colors = require('colors'); + colors.setTheme({ - link: ['underline', 'blue'] + custom: ['red', 'underline'] }); -// outputs underlined blue text -console.log(colors.info('Listening on ') + colors.link('http://0.0.0.0:' + port)); +console.log('test'.custom); ``` *Protip: There is a secret undocumented style in `colors`. If you find the style you can summon him.* From 85ec3019e68304e71c28b8fddf1cd3757386b79f Mon Sep 17 00:00:00 2001 From: Marak Date: Wed, 17 Jun 2015 15:01:51 +0200 Subject: [PATCH 10/15] [dist] Bump to v1.1.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 67e03ed..c365064 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "colors", "description": "get colors in your node.js console", - "version": "1.1.1", + "version": "1.1.2", "author": "Marak Squires", "homepage": "https://github.com/Marak/colors.js", "bugs": "https://github.com/Marak/colors.js/issues", From 2f20f2ea50876653003353e17622e1ee6f021292 Mon Sep 17 00:00:00 2001 From: Marak Date: Wed, 17 Jun 2015 15:42:07 +0200 Subject: [PATCH 11/15] Update ReadMe.md --- ReadMe.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ReadMe.md b/ReadMe.md index 0326aab..f09eb70 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -163,7 +163,7 @@ console.log(colors.warn("this is a warning")); ``` -You can also combine them: +### Combining Colors ```javascript var colors = require('colors'); From dc8eb09f6c3adfff6ea5194cae8a5809e0f43c80 Mon Sep 17 00:00:00 2001 From: fscherwi Date: Thu, 24 Sep 2015 20:38:28 +0200 Subject: [PATCH 12/15] test Node.js 0.12 and 4 --- .travis.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index ec43125..22a2e83 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,8 @@ language: node_js node_js: + - "4" + - "0.12" - "0.11" - "0.10" - "0.8" - - "0.6" \ No newline at end of file + - "0.6" From b75a729354fbbe2869eb117b85c1e776913943ed Mon Sep 17 00:00:00 2001 From: DABH Date: Mon, 12 Feb 2018 12:19:27 -0800 Subject: [PATCH 13/15] Test against modern Node versions and stop testing against very ancient Node 0.6 --- .travis.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 22a2e83..3c41c89 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,14 @@ language: node_js node_js: + - "latest" + - "stable" + - "9" + - "8" + - "7" + - "6" + - "5" - "4" - "0.12" - "0.11" - "0.10" - "0.8" - - "0.6" From a51ced332c9aa6ea881c92835a9668f79dc341d5 Mon Sep 17 00:00:00 2001 From: DABH Date: Mon, 12 Feb 2018 12:25:07 -0800 Subject: [PATCH 14/15] No nvm aliases --- .travis.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3c41c89..9c75946 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,5 @@ language: node_js node_js: - - "latest" - - "stable" - "9" - "8" - "7" From f612a2d84f4692388fff096b821db30f60f99be0 Mon Sep 17 00:00:00 2001 From: DABH Date: Tue, 13 Feb 2018 15:36:40 -0800 Subject: [PATCH 15/15] Bump version for next beta release --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index bc8d2e5..e26e29d 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "colors", "description": "get colors in your node.js console", - "version": "1.1.2", + "version": "1.2.0", "author": "Marak Squires", "homepage": "https://github.com/Marak/colors.js", "bugs": "https://github.com/Marak/colors.js/issues",