326 Commits

Author SHA1 Message Date
Andrew E. Rhyne
803fb05785 release 2.4.1 2.4.1 2016-12-13 23:22:03 -08:00
Lazarev Alexandr
94d78b5b80 Fixed a typo (#356) 2016-12-13 23:21:11 -08:00
Andrew E. Rhyne
b82d4e6c79 release 2.4.0 2.4.0 2016-12-13 22:51:43 -08:00
Matt Campbell
41002f1c7c Update bower.json (#342)
Error thrown if using `bower.json` to require files.
`.npmignore` contains `dist`.
2016-12-12 15:13:53 -08:00
Nathan Rajlich
e58d54b46f Node: configurable util.inspect() options (#327)
* `formatArgs()` gets passed the args Array directly

Rather than working on `arguments`. The Node.js version
was for some reason turning the arguments into an Array
again so it was happening twice! This should make things
faster overall.

* whitespace

* rename `Readme.md` to `README.md`

* refactor the `debug()` constructor a bit

Now, debug instances are hot-enabelable. That is, you can
toggle the `debug.enabled` boolean on instances to enable
or disable an instance. There is still no global version of
this functionality.

Now all instances get a `useColors` and `colors` property,
even disabled ones, in case they get enabled later on. Boot-up
time impact should be negligible.

* node: allow configurable `util.inspect()` options

Via env variables by default. So to get more object depth,
you pass the `DEBUG_DEPTH=10` env var.

For the `showHidden` option, you set `DEBUG_SHOW_HIDDEN=on`.

See the Node.js docs for the complete list of `util.inspect()` options:
https://nodejs.org/api/util.html#util_util_inspect_object_options

* README: document inspect env variables
2016-12-12 15:13:35 -08:00
Nathan Rajlich
00f3046c30 Node: %O (big O) pretty-prints the object (#322)
* %O (big O) pretty-prints the object

For example:

```js
var debug = require('./')('foo')

var o = {
  foo: 'bar',
  b: new Buffer(10),
  c: Math.PI
}

debug('%O', o)
```

Previously:

```
  foo { foo: 'bar', b: <Buffer 01 00 00 00 01 00 00 00 c0 82>, c: 3.141592653589793 } +0ms
```

Now:

```
  foo { foo: 'bar',
  foo   b: <Buffer 01 00 00 00 01 00 00 00 c0 82>,
  foo   c: 3.141592653589793 } +0ms
```

This is a breaking change for anybody relying on the old `%O` behavior.
Though I don't think `%O` was working previously because the formatters
regexp wasn't checking for uppercase formatters (now fixed in this patch).

* use %O by default if no formatting string is given

* Readme: add Formatters section

Fixes #302.

* Readme: finish custom formatters example
2016-12-12 11:13:19 -08:00
Alfonso de la Osa
bd9faa1289 allow colours in workers (#335) 2016-12-11 23:23:39 -08:00
Laurent
501521fcc6 Use same color for same namespace. (#338)
* Use same color for same namespace.

CF #258

* Remove unused var.
2016-12-06 09:54:01 -08:00
Nathan Rajlich
e2a1955330 Revert "handle regex special characters"
This reverts commit 8dd8345d1498b8c6a3c6d7f7f4ebc600cfd2195b.

We shouldn't have changed the original behavior, which
too many people are relying on at this point.

It's also technically a breaking change, which we shouldn't
have landed on a minor/patch version change. So in the interest
of not breaking people's logs in production, reverting this.

We can discuss in a new issue if we want to restore this patch
for a `v3` release, but at the moment I'm personally leaningo
towards *no*, for historical reasons (i.e. this is reminding
me of Node.js trying to remove `sys` if anybody reading this
remembers those days).

See the discussion in #250 for more backlog.
2016-11-21 19:19:24 -08:00
Nathan Rajlich
3ad8df7561 Release 2.3.3 2.3.3 2016-11-19 11:59:10 -08:00
Nathan Rajlich
8e09edf8f6 browser: whitespace 2016-11-14 16:31:44 -08:00
Andrew E. Rhyne
3491ad6e3a Merge pull request #195 from jalleyne/master
Catch JSON stringily errors.
2016-11-14 09:34:32 -08:00
Andrew E. Rhyne
2caf4ef35a Merge pull request #331 from levithomason/patch-1
fix(browser): do not override ls debug if found
2016-11-14 09:18:32 -08:00
Levi Thomason
20c37fdc16 fix(browser): do not override ls debug if found 2016-11-13 10:26:59 -08:00
Nathan Rajlich
a746d52cf2 don't create an empty object when no process
This is also more readable in my opinion.
2016-11-10 09:59:27 -08:00
Nathan Rajlich
1c6f45840d Release 2.3.2 2.3.2 2016-11-09 22:29:51 -08:00
Nathan Rajlich
56fd3366c2 be super-safe in index.js as well 2016-11-09 22:27:37 -08:00
Tom Newby
0b6ca275e6 fix(browser): should check whether process exists
Closes #325.
2016-11-09 22:26:13 -08:00
Andrew E. Rhyne
6b45c3a155 Release 2.3.1 2.3.1 2016-11-09 16:13:31 -08:00
Andrew E. Rhyne
acd3f5f2f9 Merge pull request #324 from paulcbetts/electron-compat
Electron compatibility
2016-11-09 16:07:04 -08:00
Paul Betts
6d2cd136be Save a stat 2016-11-09 15:53:17 -08:00
Paul Betts
dc86779d52 If we're in Electron, try to fallback to process.env.DEBUG if we've got it 2016-11-09 15:01:46 -08:00
Paul Betts
2ba1323100 Wire it up 2016-11-09 15:01:14 -08:00
Paul Betts
d26711169f Add a switch to flip between electron and node 2016-11-09 15:01:07 -08:00
Andrew E. Rhyne
2f9dc3614f Merge pull request #321 from fengmk2/remove-lockfile
Library should not contains lockfile
2016-11-07 20:47:33 -08:00
fengmk2
310ae229de Library should not contains lockfile
see https://t.co/ce8TntXr7N
2016-11-08 08:36:07 +08:00
Nathan Rajlich
475e7b31f3 some random optimizations
Hopefully…
2016-11-07 10:46:22 -08:00
Nathan Rajlich
54b1a5a6a6 Merge pull request #252 from gimre/patch-1
Corrected PowerShell environment variable example
2016-11-07 10:31:18 -08:00
Andrew E. Rhyne
8e5a6b3c3d 2.3.0 2.3.0 2016-11-07 09:39:45 -08:00
Andrew E. Rhyne
d887d9326f updated contributors 2016-10-27 17:48:04 -07:00
Andrew E. Rhyne
820f351906 Merge pull request #215 from gorangajic/add-ms-as-last-param
move ms to the last place
2016-10-27 17:43:53 -07:00
Andrew E. Rhyne
d188464921 Merge pull request #317 from visionmedia/feature/yarnIntegration
Added yarn integration to Makefile
2016-10-27 17:28:35 -07:00
Andrew E. Rhyne
341e584dd4 added Yarn integration to Makefile 2016-10-27 10:29:12 -07:00
Andrew E. Rhyne
b39265f55e renamed History.md to CHANGELOG.md 2016-10-27 09:47:49 -07:00
Andrew E. Rhyne
5b1e1dac0f added yarn lockfile for yarn support 2016-10-27 09:47:12 -07:00
Andrew E. Rhyne
061b4a51f1 Merge pull request #274 from sdaitzman/patch-1
updates license date
2016-10-27 09:29:58 -07:00
Sam D
2b78d425cc hyphenates license years 2016-10-27 07:54:20 -04:00
Goran Gajic
dafc16e7b3 move ms to the last place 2016-10-27 13:44:53 +02:00
Andrew E. Rhyne
b02b753205 Merge pull request #315 from DevSide/patch-3
Bump ms 0.7.2
2016-10-26 21:06:54 -07:00
DevSide
e8fe71b473 Bump ms 0.7.2 2016-10-25 14:46:30 +02:00
Nathan Rajlich
0682a14c16 Merge pull request #250 from zacronos/master
handle regex special characters
2016-10-22 12:18:33 -07:00
Nathan Rajlich
a4e36a821b Readme: fix USE_COLORS to DEBUG_COLORS
Also remove trailing whitespace
2016-10-22 12:15:52 -07:00
Nathan Rajlich
4e61d2ac43 Merge pull request #269 from mlucool/patch-1
Make the format string goodies clearer in README
2016-10-22 12:12:49 -07:00
Nathan Rajlich
b13983680f Merge pull request #282 from vkarpov15/patch-1
Prevent crash when used with react-native
2016-10-22 10:08:39 -07:00
Nathan Rajlich
a4ce0ba665 Merge pull request #232 from mattlyons0/master
Extend documentation on DEBUG_FD and DEBUG_COLORS
2016-10-22 10:07:08 -07:00
Nathan Rajlich
3c0f3da3b6 Merge pull request #279 from oncletom/patch-1
Add %O formatter to reflect Chrome's console.log capability
2016-10-22 10:02:50 -07:00
Valeri Karpov
d39abeda93 fix(browser): remove variable thats undefined in react-native
https://github.com/facebook/react-native/pull/1632
2016-05-26 07:38:16 -07:00
Thomas Parisot
7748e508f1 Add %O formatter to reflect Chrome's console.log capability
refs #278
2016-05-10 20:55:19 +01:00
Sam D
dec66b8a30 updates license date 2016-04-30 19:16:51 -04:00
Nathan Rajlich
39ecd87bcc Merge pull request #271 from exoticknight/patch-1
fix PowerShell set in readme.me
2016-03-11 09:15:13 -08:00