From 13abeae468fea297d0dccc50bc55590809241083 Mon Sep 17 00:00:00 2001 From: Nathan Rajlich Date: Fri, 22 Sep 2017 15:32:23 +0200 Subject: [PATCH] Release 2.6.9 --- CHANGELOG.md | 5 +++++ component.json | 2 +- package.json | 2 +- src/inspector-log.js | 15 +++++++++++++++ 4 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 src/inspector-log.js diff --git a/CHANGELOG.md b/CHANGELOG.md index a1a270cd..eadaa189 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,9 @@ +2.6.9 / 2017-09-22 +================== + + * remove ReDoS regexp in %o formatter (#504) + 2.6.8 / 2017-05-18 ================== diff --git a/component.json b/component.json index 94cd36d8..9de26410 100644 --- a/component.json +++ b/component.json @@ -2,7 +2,7 @@ "name": "debug", "repo": "visionmedia/debug", "description": "small debugging utility", - "version": "2.6.8", + "version": "2.6.9", "keywords": [ "debug", "log", diff --git a/package.json b/package.json index df863517..dc787ba7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "debug", - "version": "2.6.8", + "version": "2.6.9", "repository": { "type": "git", "url": "git://github.com/visionmedia/debug.git" diff --git a/src/inspector-log.js b/src/inspector-log.js new file mode 100644 index 00000000..60ea6c04 --- /dev/null +++ b/src/inspector-log.js @@ -0,0 +1,15 @@ +module.exports = inspectorLog; + +// black hole +const nullStream = new (require('stream').Writable)(); +nullStream._write = () => {}; + +/** + * Outputs a `console.log()` to the Node.js Inspector console *only*. + */ +function inspectorLog() { + const stdout = console._stdout; + console._stdout = nullStream; + console.log.apply(console, arguments); + console._stdout = stdout; +}