Commit Graph

17 Commits

Author SHA1 Message Date
Ben Davies
ae2c190c18 Typescript: fix a couple of REPL and crashlogger errors I missed (#3611) 2017-06-12 00:54:36 -05:00
Ben Davies
015dd8db65 REPL: add Config.repl, refactor, Typescript (#3609)
- `Config.repl` enables/disables using REPL sockets since it doesn't
make as much sense to configure whether or not it's enabled with the
REPL_ENABLED const
- exports.start takes a filename parametre rather than a prefix and a
suffix one to avoid having to mutate parametres
- dead REPL sockets are removed from the sockets list when the server
emits an error, and the server closes on error now before respawning
the server
- made the file ready for Typescript
2017-06-11 10:40:38 -05:00
Taylor Everding
1a1f64fe95 Remove .js extension from requires (#2725) 2016-08-30 00:04:40 -05:00
Ivo Julca
22779102cc Lint: Add miscellaneous extra rules
Among the newly added rules, there are quite a few intended to enforce
compliance of CONTRIBUTING.md-blessed idioms, as well as ensure
safe usage of classes and constant bindings.

We are also now enforcing usage of early return in commands.js,
which has 100% compliance as of fd2c45c.
2016-04-25 21:52:21 -05:00
Guangcong Luo
b5e6742757 Enable repl.js by default 2016-03-15 18:19:20 -04: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
Konrad Borowski
86dd9f819d Prefer ES6 octal literals to string form 2015-11-08 08:57:50 +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
小太
e0c9e86efb Fix repl not being able to unlinkSync files under mocha 2015-11-01 23:09:12 +11:00
Guangcong Luo
9ce77515d8 Merge pull request #2091 from kotarou3/repl
Fix race condition while deleting old repl sockets
2015-08-01 06:55:19 +00:00
Guangcong Luo
84897f7142 Disable REPL by default
The REPL feature has been responsible for tons of crashes, so I'm
disabling it until these crashes can be fixed.

I'm also disabling it until it actually gets documented in
`logs/repl/README.md`, because what's there right now is not
enough documentation to actually figure out how to use it.
2015-08-01 02:55:05 -04:00
小太
3c19900f7b Fix race condition while deleting old repl sockets 2015-07-31 21:23:04 +10:00
Ivo Julca
6f703272e7 Supress crash in REPL 2015-07-11 17:00:15 -05:00
Ivo Julca
62670ab110 Apply 4222ffb5 to repl.js 2015-06-15 00:54:01 -05:00
Freigeist
3cfe2a4b6a Fix wrong default path in repl.js 2014-12-15 12:07:33 +01:00
小太
6138ab9e0b Add REPL sockets 2014-12-14 23:11:13 +11:00