Comparing version 4.3.2 to 4.3.3
{ | ||
"name": "debug", | ||
"version": "4.3.2", | ||
"version": "4.3.3", | ||
"repository": { | ||
"type": "git", | ||
"url": "git://github.com/visionmedia/debug.git" | ||
"url": "git://github.com/debug-js/debug.git" | ||
}, | ||
"description": "small debugging utility", | ||
"description": "Lightweight debugging utility for Node.js and the browser", | ||
"keywords": [ | ||
@@ -19,7 +19,7 @@ "debug", | ||
], | ||
"author": "TJ Holowaychuk <tj@vision-media.ca>", | ||
"author": "Josh Junon <josh.junon@protonmail.com>", | ||
"contributors": [ | ||
"TJ Holowaychuk <tj@vision-media.ca>", | ||
"Nathan Rajlich <nathan@tootallnate.net> (http://n8.io)", | ||
"Andrew Rhyne <rhyneandrew@gmail.com>", | ||
"Josh Junon <josh@junon.me>" | ||
"Andrew Rhyne <rhyneandrew@gmail.com>" | ||
], | ||
@@ -26,0 +26,0 @@ "license": "MIT", |
# debug | ||
[![Build Status](https://travis-ci.org/visionmedia/debug.svg?branch=master)](https://travis-ci.org/visionmedia/debug) [![Coverage Status](https://coveralls.io/repos/github/visionmedia/debug/badge.svg?branch=master)](https://coveralls.io/github/visionmedia/debug?branch=master) [![Slack](https://visionmedia-community-slackin.now.sh/badge.svg)](https://visionmedia-community-slackin.now.sh/) [![OpenCollective](https://opencollective.com/debug/backers/badge.svg)](#backers) | ||
[![Build Status](https://travis-ci.org/debug-js/debug.svg?branch=master)](https://travis-ci.org/debug-js/debug) [![Coverage Status](https://coveralls.io/repos/github/debug-js/debug/badge.svg?branch=master)](https://coveralls.io/github/debug-js/debug?branch=master) [![Slack](https://visionmedia-community-slackin.now.sh/badge.svg)](https://visionmedia-community-slackin.now.sh/) [![OpenCollective](https://opencollective.com/debug/backers/badge.svg)](#backers) | ||
[![OpenCollective](https://opencollective.com/debug/sponsors/badge.svg)](#sponsors) | ||
@@ -354,3 +354,24 @@ | ||
## Usage in child processes | ||
Due to the way `debug` detects if the output is a TTY or not, colors are not shown in child processes when `stderr` is piped. A solution is to pass the `DEBUG_COLORS=1` environment variable to the child process. | ||
For example: | ||
```javascript | ||
worker = fork(WORKER_WRAP_PATH, [workerPath], { | ||
stdio: [ | ||
/* stdin: */ 0, | ||
/* stdout: */ 'pipe', | ||
/* stderr: */ 'pipe', | ||
'ipc', | ||
], | ||
env: Object.assign({}, process.env, { | ||
DEBUG_COLORS: 1 // without this settings, colors won't be shown | ||
}), | ||
}); | ||
worker.stderr.pipe(process.stderr, { end: false }); | ||
``` | ||
## Authors | ||
@@ -361,2 +382,3 @@ | ||
- Andrew Rhyne | ||
- Josh Junon | ||
@@ -439,2 +461,3 @@ ## Backers | ||
Copyright (c) 2014-2017 TJ Holowaychuk <tj@vision-media.ca> | ||
Copyright (c) 2018-2021 Josh Junon | ||
@@ -441,0 +464,0 @@ Permission is hereby granted, free of charge, to any person obtaining |
@@ -37,3 +37,3 @@ | ||
* Selects a color for a debug namespace | ||
* @param {String} namespace The namespace string for the for the debug instance to be colored | ||
* @param {String} namespace The namespace string for the debug instance to be colored | ||
* @return {Number|String} An ANSI color code for the given namespace | ||
@@ -40,0 +40,0 @@ * @api private |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
42039
479
2