364 Commits

Author SHA1 Message Date
Andrew E. Rhyne
dc043cfd6e Merge pull request #378 from yamikuronue/replace-babel-with-browserify 2016-12-20 19:08:25 -08:00
Accalia de Elementia
f512cf2367 Merge remote-tracking branch 'upstream/master' into replace-babel-with-browserify 2016-12-21 01:42:09 +00:00
Nathan Rajlich
f09833136e Merge pull request #388 from ForsakenHarmony/patch-1
Fix formatting bug
2016-12-20 13:20:13 -08:00
Nathan Rajlich
a16cf42885 Merge pull request #387 from kribblo/patch-1
Use typeof window.process !== 'undefined'
2016-12-20 13:19:46 -08:00
Ashley
78e31a8e73 Update browser.js 2016-12-20 22:11:32 +01:00
Kristoffer Lundén
408ae94373 Use typeof window.process !== 'undefined'
'process' in window returns true after window.process = null
2016-12-20 21:33:50 +01:00
Accalia de Elementia
f484cfedc4 fix merge errors 2016-12-20 13:28:20 +00:00
Accalia de Elementia
23af4833bf Merge remote-tracking branch 'upstream/master' into replace-babel-with-browserify
Conflicts:
	dist/debug.js
	test/.babelrc
	test/debug_spec.js
2016-12-20 13:22:38 +00:00
Yami
3e1a15d062 fix: merged again, because it didn't take. Guess I did it wrong? 2016-12-20 12:53:42 +00:00
Yami
67182fdb00 fix: Whoops, didn't merge the tests properly. Resolved. 2016-12-20 12:33:56 +00:00
Yami
2a01c6c775 Merged from upstream/master. I left the dist/debug in place because my hook now updates it automatically, but I removed the babelrc file since we don't need it anymore. 2016-12-20 12:27:29 +00:00
Erik Karlsson
6e934e9fb0 Fix for #381. Moved .babelrc into test folder, where it is used and which is not built with the module. (#383) 2016-12-19 16:22:13 -08:00
Yami
6a8d525642 chore: add coveralls 2016-12-19 12:25:16 +00:00
Yami
0d7c9ebcc9 fix: remove ES6 features since this also now runs on the browser 2016-12-19 12:12:35 +00:00
Yami
92e0e88570 feature: Combined backend and frontend tests 2016-12-19 12:06:38 +00:00
Yami
9011c5a17a chore: Add pre-commit hook via ghooks so it can be shared 2016-12-19 12:01:09 +00:00
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
Yami
46ccb741c0 Testing precommit hook by tweaking linting issues 2016-12-16 16:04:57 +00:00
Yami
6bc5986f87 test: Added an expectation to the client-side test, and the necessary wiring 2016-12-16 15:56:49 +00:00
Yami
bb1e132d70 chore: add phantomjs for travis 2016-12-16 15:41:01 +00:00
Yami
adf6ccfc88 fix: Add karma-mocha dependency, and remove browserify 2016-12-16 15:34:20 +00:00
Yami
88766af08a fix: update package.json so karma gets installed. 2016-12-16 15:30:29 +00:00
Yami
f42b962792 refactor: Moved source files to /src. Moved test files to client and server side tests. Added karma for front-end testing. 2016-12-16 15:19:40 +00:00
Yami
2a146b65ca fix: Adjust wording as per @thebigredgeek 2016-12-16 12:47:04 +00:00
Yami
c50b33f886 docs: Simplified language in the opening paragraph. Closes #340 2016-12-15 16:06:35 +00: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