340 Commits

Author SHA1 Message Date
Andrew E. Rhyne
7e741fcc2f release 2.4.5 2.4.5 2016-12-17 23:13:40 -08:00
jochenberger
17d0e0bb49 check for navigator (#376)
Fix: navigator undefined in Rhino
2016-12-17 23:02:18 -08:00
Hristo Iliev
50ffa9d85e Enable use of custom log function (#379)
* Enable use of custom log function

* Add test for custom log function
2016-12-17 22:56:14 -08:00
Andrew E. Rhyne
1c625d4578 bit of cleanup + linting fixes 2016-12-17 22:53:56 -08:00
Sean Lavine
932b24a685 rm non-maintainted dist/ dir (#375) 2016-12-17 22:43:35 -08:00
Yami
cea345a1cb docs: Simplified language in the opening paragraph. Closes #340 (#373)
* docs: Simplified language in the opening paragraph. Closes #340

* fix: Adjust wording as per @thebigredgeek
2016-12-16 11:16:15 -08:00
Andrew E. Rhyne
f1ca2ab80b release 2.4.4 2.4.4 2016-12-14 17:26:37 -08:00
Paul Betts
69480c3bd1 Work around debug being loaded in preload scripts (#368) 2016-12-14 15:58:20 -08:00
Andrew E. Rhyne
e1ee4d546a release 2.4.3 2.4.3 2016-12-14 13:49:31 -08:00
Erik Karlsson
e4b8bb9a23 Fix #363 (#364) 2016-12-14 13:27:54 -08:00
Andrew E. Rhyne
4c3e80dfaa release 2.4.2 2.4.2 2016-12-14 11:40:00 -08:00
Nathan Rajlich
5783966298 fix browser colors (#367)
Fixes #366.
2016-12-14 11:38:14 -08:00
Andrew E. Rhyne
a5bbe13b75 travis ci integration 2016-12-14 11:27:21 -08:00
Andrew E. Rhyne
f77ca5d56c added linting and testing boilerplate with sanity check 2016-12-14 00:20:05 -08:00
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