diff options
Diffstat (limited to 'node_modules/npmlog')
5 files changed, 92 insertions, 69 deletions
diff --git a/node_modules/npmlog/log.js b/node_modules/npmlog/log.js index e5b70f1f8..bf894fb7a 100644 --- a/node_modules/npmlog/log.js +++ b/node_modules/npmlog/log.js @@ -219,7 +219,9 @@ log.emitLog = function (m) { if (l < this.levels[this.level]) return if (l > 0 && !isFinite(l)) return - var disp = log.disp[m.level] || m.level + // If 'disp' is null or undefined, use the lvl as a default + // Allows: '', 0 as valid disp + var disp = log.disp[m.level] != null ? log.disp[m.level] : m.level this.clearProgress() m.message.split(/\r?\n/).forEach(function (line) { if (this.heading) { @@ -264,7 +266,8 @@ log.write = function (msg, style) { } log.addLevel = function (lvl, n, style, disp) { - if (!disp) disp = lvl + // If 'disp' is null or undefined, use the lvl as a default + if (disp == null) disp = lvl this.levels[lvl] = n this.style[lvl] = style if (!this[lvl]) { diff --git a/node_modules/npmlog/node_modules/gauge/node_modules/string-width/index.js b/node_modules/npmlog/node_modules/gauge/node_modules/string-width/index.js index aa2f839b6..b9bec6244 100644 --- a/node_modules/npmlog/node_modules/gauge/node_modules/string-width/index.js +++ b/node_modules/npmlog/node_modules/gauge/node_modules/string-width/index.js @@ -16,6 +16,11 @@ module.exports = function (str) { for (var i = 0; i < str.length; i++) { var code = codePointAt(str, i); + // ignore control characters + if (code <= 0x1f || (code >= 0x7f && code <= 0x9f)) { + continue; + } + // surrogates if (code >= 0x10000) { i++; diff --git a/node_modules/npmlog/node_modules/gauge/node_modules/string-width/package.json b/node_modules/npmlog/node_modules/gauge/node_modules/string-width/package.json index 662efc0b1..ee7bc6c9f 100644 --- a/node_modules/npmlog/node_modules/gauge/node_modules/string-width/package.json +++ b/node_modules/npmlog/node_modules/gauge/node_modules/string-width/package.json @@ -1,27 +1,39 @@ { "_args": [ [ - "string-width@^1.0.1", - "/Users/rebecca/code/npm-with-new-gauge/node_modules/npmlog/node_modules/gauge" + { + "raw": "string-width@^1.0.1", + "scope": null, + "escapedName": "string-width", + "name": "string-width", + "rawSpec": "^1.0.1", + "spec": ">=1.0.1 <2.0.0", + "type": "range" + }, + "/Users/zkat/Documents/code/npm/node_modules/npmlog/node_modules/gauge" ] ], "_from": "string-width@>=1.0.1 <2.0.0", - "_id": "string-width@1.0.1", + "_id": "string-width@1.0.2", "_inCache": true, - "_installable": true, "_location": "/npmlog/gauge/string-width", - "_nodeVersion": "0.12.5", + "_nodeVersion": "4.4.5", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/string-width-1.0.2.tgz_1471188233009_0.6573935742489994" + }, "_npmUser": { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" }, - "_npmVersion": "2.11.2", + "_npmVersion": "2.15.5", "_phantomChildren": {}, "_requested": { - "name": "string-width", "raw": "string-width@^1.0.1", - "rawSpec": "^1.0.1", "scope": null, + "escapedName": "string-width", + "name": "string-width", + "rawSpec": "^1.0.1", "spec": ">=1.0.1 <2.0.0", "type": "range" }, @@ -29,14 +41,14 @@ "/npmlog/gauge", "/npmlog/gauge/wide-align" ], - "_resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.1.tgz", - "_shasum": "c92129b6f1d7f52acf9af424a26e3864a05ceb0a", + "_resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "_shasum": "118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3", "_shrinkwrap": null, "_spec": "string-width@^1.0.1", - "_where": "/Users/rebecca/code/npm-with-new-gauge/node_modules/npmlog/node_modules/gauge", + "_where": "/Users/zkat/Documents/code/npm/node_modules/npmlog/node_modules/gauge", "author": { - "email": "sindresorhus@gmail.com", "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, "bugs": { @@ -49,12 +61,13 @@ }, "description": "Get the visual width of a string - the number of columns required to display it", "devDependencies": { - "ava": "0.0.4" + "ava": "*", + "xo": "*" }, "directories": {}, "dist": { - "shasum": "c92129b6f1d7f52acf9af424a26e3864a05ceb0a", - "tarball": "http://registry.npmjs.org/string-width/-/string-width-1.0.1.tgz" + "shasum": "118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3", + "tarball": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz" }, "engines": { "node": ">=0.10.0" @@ -62,8 +75,8 @@ "files": [ "index.js" ], - "gitHead": "f279cfd14835f0a3c8df69ba18e9a3960156e135", - "homepage": "https://github.com/sindresorhus/string-width", + "gitHead": "282cf3d53918a92cc3ee0778dcf938039bcbc47b", + "homepage": "https://github.com/sindresorhus/string-width#readme", "keywords": [ "string", "str", @@ -93,8 +106,8 @@ "license": "MIT", "maintainers": [ { - "email": "sindresorhus@gmail.com", - "name": "sindresorhus" + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" } ], "name": "string-width", @@ -105,7 +118,7 @@ "url": "git+https://github.com/sindresorhus/string-width.git" }, "scripts": { - "test": "node test.js" + "test": "xo && ava" }, - "version": "1.0.1" + "version": "1.0.2" } diff --git a/node_modules/npmlog/node_modules/gauge/node_modules/string-width/readme.md b/node_modules/npmlog/node_modules/gauge/node_modules/string-width/readme.md index a7737a986..1ab42c935 100644 --- a/node_modules/npmlog/node_modules/gauge/node_modules/string-width/readme.md +++ b/node_modules/npmlog/node_modules/gauge/node_modules/string-width/readme.md @@ -2,7 +2,7 @@ > Get the visual width of a string - the number of columns required to display it -Some Unicode characters are [fullwidth](https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms) and use double the normal width. +Some Unicode characters are [fullwidth](https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms) and use double the normal width. [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code) are stripped and doesn't affect the width. Useful to be able to measure the actual width of command-line output. @@ -17,7 +17,7 @@ $ npm install --save string-width ## Usage ```js -var stringWidth = require('string-width'); +const stringWidth = require('string-width'); stringWidth('古'); //=> 2 @@ -34,8 +34,9 @@ stringWidth('a'); - [string-width-cli](https://github.com/sindresorhus/string-width-cli) - CLI for this module - [string-length](https://github.com/sindresorhus/string-length) - Get the real length of a string +- [widest-line](https://github.com/sindresorhus/widest-line) - Get the visual width of the widest line in a string ## License -MIT © [Sindre Sorhus](http://sindresorhus.com) +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/npmlog/package.json b/node_modules/npmlog/package.json index 85211951f..3f314d791 100644 --- a/node_modules/npmlog/package.json +++ b/node_modules/npmlog/package.json @@ -2,57 +2,58 @@ "_args": [ [ { - "name": "npmlog", - "raw": "npmlog@latest", - "rawSpec": "latest", + "raw": "npmlog@4.0.0", "scope": null, - "spec": "latest", - "type": "tag" + "escapedName": "npmlog", + "name": "npmlog", + "rawSpec": "4.0.0", + "spec": "4.0.0", + "type": "version" }, - "/Users/rebecca/code/npm" + "/Users/zkat/Documents/code/npm" ] ], - "_from": "npmlog@latest", - "_id": "npmlog@3.1.2", + "_from": "npmlog@4.0.0", + "_id": "npmlog@4.0.0", "_inCache": true, - "_installable": true, "_location": "/npmlog", - "_nodeVersion": "4.4.0", + "_nodeVersion": "5.10.1", "_npmOperationalInternal": { "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/npmlog-3.1.2.tgz_1466073052641_0.36111341998912394" + "tmp": "tmp/npmlog-4.0.0.tgz_1468888150556_0.3835553650278598" }, "_npmUser": { - "email": "me@re-becca.org", - "name": "iarna" + "name": "zkat", + "email": "kat@sykosomatic.org" }, - "_npmVersion": "3.9.6", + "_npmVersion": "3.10.4", "_phantomChildren": { - "aproba": "1.0.3", - "has-unicode": "2.0.0", - "readable-stream": "2.1.3", + "aproba": "1.0.4", + "has-unicode": "2.0.1", + "readable-stream": "2.1.4", "strip-ansi": "3.0.1" }, "_requested": { - "name": "npmlog", - "raw": "npmlog@latest", - "rawSpec": "latest", + "raw": "npmlog@4.0.0", "scope": null, - "spec": "latest", - "type": "tag" + "escapedName": "npmlog", + "name": "npmlog", + "rawSpec": "4.0.0", + "spec": "4.0.0", + "type": "version" }, "_requiredBy": [ - "/", - "/npm-registry-client" + "#USER", + "/" ], - "_resolved": "https://registry.npmjs.org/npmlog/-/npmlog-3.1.2.tgz", - "_shasum": "2d46fa874337af9498a2f12bb43d8d0be4a36873", + "_resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.0.0.tgz", + "_shasum": "e094503961c70c1774eb76692080e8d578a9f88f", "_shrinkwrap": null, - "_spec": "npmlog@latest", - "_where": "/Users/rebecca/code/npm", + "_spec": "npmlog@4.0.0", + "_where": "/Users/zkat/Documents/code/npm", "author": { - "email": "i@izs.me", "name": "Isaac Z. Schlueter", + "email": "i@izs.me", "url": "http://blog.izs.me/" }, "bugs": { @@ -71,32 +72,32 @@ }, "directories": {}, "dist": { - "shasum": "2d46fa874337af9498a2f12bb43d8d0be4a36873", - "tarball": "https://registry.npmjs.org/npmlog/-/npmlog-3.1.2.tgz" + "shasum": "e094503961c70c1774eb76692080e8d578a9f88f", + "tarball": "https://registry.npmjs.org/npmlog/-/npmlog-4.0.0.tgz" }, "files": [ "log.js" ], - "gitHead": "444e237743fa1339cb91bea2d3f16f710be56984", + "gitHead": "3ca8823fdfa66f54c72adde3fd2c4e0237e6302b", "homepage": "https://github.com/npm/npmlog#readme", "license": "ISC", "main": "log.js", "maintainers": [ { - "email": "me@re-becca.org", - "name": "iarna" + "name": "iarna", + "email": "me@re-becca.org" }, { - "email": "i@izs.me", - "name": "isaacs" + "name": "isaacs", + "email": "i@izs.me" }, { - "email": "ogd@aoaioxxysz.net", - "name": "othiym23" + "name": "othiym23", + "email": "ogd@aoaioxxysz.net" }, { - "email": "kat@sykosomatic.org", - "name": "zkat" + "name": "zkat", + "email": "kat@sykosomatic.org" } ], "name": "npmlog", @@ -109,5 +110,5 @@ "scripts": { "test": "standard && tap test/*.js" }, - "version": "3.1.2" + "version": "4.0.0" } |