Commit Graph

20 Commits

Author SHA1 Message Date
Ben Davies
d9c6fe54b2 ProcessManager: subclass to extend ProcessManager, unit tests setup (#2739)
Before, an options object containing properties and values to be used
was how decorated instances of the class would be created. This meant
the constructor could assign anything you feel like to `this`. Rather
than that, the constructor now assigns a strict set of values, and
methods are redefined in subclasses.

Basic unit tests were added to test if they could be written for after
the final refactor to fix the other memory leak here.
2016-09-09 15:51:49 -05:00
Taylor Everding
1a1f64fe95 Remove .js extension from requires (#2725) 2016-08-30 00:04:40 -05:00
Ivo Julca
7ac62d3cdb Refactor Verifier to use the PM API 2016-03-23 02:44:29 -05:00
Guangcong Luo
7c6113def8 Refactor verifier.js for Promises 2016-03-13 19:30:30 -05:00
Guangcong Luo
c97cadcb19 Implement /processes 2016-02-19 06:53:57 -05:00
Guangcong Luo
b665660608 Refactor for more ES6 features
Now that nodejs/node#3072 is mostly fixed, we can finally start using
Node 4+ features.

This refactor:

- uses arrow functions where appropriate

  Note that arrow functions still aren't used in Mocha, where `this`
  is sometimes meaningful.

  This also removes the need for .bind() nearly everywhere, as well
  as the `self = this` trick.

- refactors Validator and Connection into ES6 classes

- no longer uses Array#forEach for iterating arrays

  We strongly prefer for (let i = 0; i < arr.length; i++) because of
  performance reasons. Most forEaches have been replaced with for..of,
  though, which is 5x slower than the long-form loop but 2x faster
  than forEach, which is good enough outside of most inner loops.

  The only exception is tournaments, which is due for a more invasive
  refactor soon anyway.
2016-02-10 17:40:21 -06:00
Konrad Borowski
81f602b8d8 Always use trailing comma for multiline objects 2016-01-01 00:20:07 +01:00
Juanma Serrano
c4ac8d6e2f Use strict mode and let and const instead of var
This commit also fixes some duplicated variable declarations.
2015-11-06 21:56:52 -05:00
Ivo Julca
4222ffb5df Dependant support: make sure that relative paths are resolved properly 2015-05-11 15:38:18 -05:00
Guangcong Luo
23c67c9140 Quit PS child processes when parent quits
Previously, child processes would stick around in certain cases.

Fixes #1507.
2015-02-05 01:16:47 -06:00
小太
6138ab9e0b Add REPL sockets 2014-12-14 23:11:13 +11:00
小太
5027be79fb Add jscs as a style checker, and add some extra jshint options 2014-09-29 18:38:01 +10:00
Guangcong Luo
12b673bb49 Fix style errors; update gulpfile
I used a hack to make the multiple declaration errors go away,
so all that remained in jsHint were actual errors, which I've
now mostly fixed.

All this linting ended up uncovering one actual bug: Uproar's
message not showing. It's a very minor bug in a move no one uses,
so I'm going to fold it into this commit.
2014-08-10 18:06:44 -04:00
小太
5c8fc7b982 Space after function for anonymous functions 2014-04-22 01:58:16 +10:00
Slayer95
75559362b4 Rename global config to Config 2014-04-17 01:12:28 -04:00
Tyler Stark
afb3dc0c09 First pass at code quality: adding semicolons. 2014-02-09 20:35:42 -06:00
Guangcong Luo
27be062395 Tons of documentation 2013-05-24 14:59:29 -07:00
Cathy J. Fitzpatrick
f28955d711 Fix crash in verifier.js
This prevents the verifier process from crashing if the signature
is not a valid hex string.
2013-02-08 00:04:27 -07:00
Guangcong Luo
a230425dcd Fixes to verifier 2012-07-29 14:23:05 -07:00
Guangcong Luo
111e3b89c2 Experimental asynchronous user verifier 2012-07-29 14:13:58 -07:00