Rich Trott
6eb1c25263
tools: ignore URLs in line length linting
...
Where inclusion of a lengthy URL causes a line to exceed 80 characters
in our code base, do not report the line length as a linting error.
PR-URL: https://github.com/nodejs/node/pull/11890
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2017-04-18 20:02:27 -04:00
Gibson Fahnestock
0fff04f24f
lib: add comment to script eval _tickCallback
...
Add a comment to match lib/module.js, missed in #11958 .
PR-URL: https://github.com/nodejs/node/pull/12050
Ref: https://github.com/nodejs/node/pull/11958
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
2017-04-18 20:02:18 -04:00
Ben Noordhuis
1a7d6337fb
lib: fix event race condition with -e
...
Commit c5b07d4 ("lib: fix beforeExit not working with -e") runs the
to-be-evaluated code at a later time than before because it switches
from `process.nextTick()` to `setImmediate()`.
It affects `-e 'process.on("message", ...)'` because there is now a
larger time gap between startup and attaching the event listener,
increasing the chances of missing early messages. I'm reasonably
sure `process.nextTick()` was also susceptible to that, only less
pronounced.
Avoid the problem altogether by evaluating the code synchronously.
Harmonizes the logic with `Module.runMain()` from lib/module.js
which also calls `process._tickCallback()` afterwards.
PR-URL: https://github.com/nodejs/node/pull/11958
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com >
2017-04-18 20:02:18 -04:00
Shigeki Ohtsu
632aee186d
timers: fix not to close reused timer handle
...
The timer handle is reused when it is unrefed in order to avoid new
callback in beforeExit(#3407 ). If it is unrefed within a setInterval
callback, the reused timer handle is closed so that setInterval no
longer keep working. This fix does not close the handle in case of
setInterval.
PR-URL: https://github.com/nodejs/node/pull/11646
Reviewed-By: Julien Gilli <jgilli@nodejs.org >
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-04-18 20:02:16 -04:00
Rich Trott
53d7a89497
buffer: remove unneeded eslint-disable comment
...
lib/buffer.js uses a function declaration for `Buffer`. So it never
uses an instance of `Buffer` in the global scope. Therefore the
disabling of the `require-buffer` custom rule is not needed. Remove the
comment.
PR-URL: https://github.com/nodejs/node/pull/11906
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Roman Reiss <me@silverwind.io >
2017-04-18 20:02:13 -04:00
mr-spd
f8426d9177
lib: remove unused msg parameter in debug_agent
...
Removed the msg parameter in the Client function
of _debug_agent.js, because it is unused.
PR-URL: https://github.com/nodejs/node/pull/11833
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com >
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com >
Reviewed-By: Jackson Tian <shyvo1987@gmail.com >
2017-04-18 20:02:10 -04:00
jseagull
1158f44599
events,test: fix TypeError in EventEmitter warning
...
Allows Symbol to be converted to String so it can be included in the
error.
Conflicts:
lib/events.js
Fixes : #9003
Backport-PR-URL: https://github.com/nodejs/node/pull/12459
PR-URL: https://github.com/nodejs/node/pull/9021
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com >
2017-04-18 20:02:08 -04:00
Trevor Norris
858bbaa4aa
Partial revert "tls: keep track of stream that is closed"
...
This partually reverts commit 4cdb0e89d8 .
A nullptr check in TSLWrap::IsAlive() and the added test were left.
PR-URL: https://github.com/nodejs/node/pull/11947
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2017-04-18 20:02:08 -04:00
jBarz
1baee1829b
tls: keep track of stream that is closed
...
TLSWrap object keeps a pointer reference to the underlying
TCPWrap object. This TCPWrap object could be closed and deleted
by the event-loop which leaves us with a dangling pointer.
So the TLSWrap object needs to track the "close" event on the
TCPWrap object.
PR-URL: https://github.com/nodejs/node/pull/11776
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Brian White <mscdex@mscdex.net >
2017-04-18 20:02:07 -04:00
Richard Lau
500d17b071
module: fix loading from global folders on Windows
...
Code was calculating $PREFIX/lib/node relative to process.execPath, but
on Windows process.execPath is $PREFIX\node.exe whereas everywhere else
process.execPath is $PREFIX/bin/node (where $PREFIX is the root of the
installed Node.js).
PR-URL: https://github.com/nodejs/node/pull/9283
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
Reviewed-By: João Reis <reis@janeasystems.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
2017-04-18 20:02:05 -04:00
Daijiro Wachi
63449972d1
url: use hasIntl instead of try-catch
...
Like the other internal modules, we should use
`process.binding('config').hasIntl` instead of `try-catch`
to make sure `icu` is bonded or not.
PR-URL: https://github.com/nodejs/node/pull/11571
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Timothy Gu <timothygu99@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Jackson Tian <shyvo1987@gmail.com >
2017-04-18 20:02:00 -04:00
Rich Trott
5d74c9e749
buffer: refactor Buffer.prototype.inspect()
...
Replace toString().match().join() with toString().replace().trim(). This
enables the elimination of a length check becuase replace() will return
empty string if Buffer is empty whereas match() returns null.
PR-URL: https://github.com/nodejs/node/pull/11600
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2017-04-18 20:01:59 -04:00
Ben Noordhuis
06752d1fc0
net: remove misleading comment
...
The allowHalfOpen comment was added in commit 8a3befa ("net: Refactor
to use streams2") from 2012 but it wasn't true even then as far as I
can tell: Node.js simply always does a shutdown(2) first.
It is true that streams2 withholds the 'end' event when allowHalfOpen
is true but the comment is about a callback that hangs off the 'finish'
event that is emitted after calling `socket.end()`.
PR-URL: https://github.com/nodejs/node/pull/11573
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2017-04-18 20:01:56 -04:00
Gibson Fahnestock
12c0ce749f
assert, tools: enforce strict (not)equal in eslint
...
Extend no-restricted-properties to catch use of assert.equal() and
assert.notEqual() and require assert.strictEqual() or
assert.notStrictEqual() instead.
Also update the eslint-ignore in lib/assert.js to avoid
assert.equal/notEqual linter errors in their definitions.
Backport-PR-URL: https://github.com/nodejs/node/pull/11795
PR-URL: https://github.com/nodejs/node/pull/10698
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Teddy Katz <teddy.katz@gmail.com >
2017-04-18 20:01:52 -04:00
Brian White
f9287461dd
stream: avoid additional validation for Buffers
...
These changes result in ~50% improvement in the included benchmark.
PR-URL: https://github.com/nodejs/node/pull/10580
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-04-18 20:01:48 -04:00
Myles Borins
64fc5a4541
Revert "Revert "repl: disable Ctrl+C support..."
...
Full original message:
Revert "repl: disable Ctrl+C support on win32 for now"
The original fix was a stop gap until a libuv update landed.
As the libuv update has not yet landed on v6.x the revert should
not have landed. This commit reverts 1d400ea484 reapplying the
stopgap fix until we update libuv.
Fixes: https://github.com/nodejs/node/issues/12085
Refs: https://github.com/nodejs/node/pull/8645
PR-URL: https://github.com/nodejs/node/pull/12123
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2017-03-29 16:40:26 -04:00
Rich Trott
fb2f449acc
tools: update ESLint to current version
...
We have been stalled on ESLint 3.8.0 for some time. Current ESLint is
3.13.0. We have been unable to upgrade because of more aggressive
reporting on some rules, including indentation.
ESLint configuration options and bugfixes are now such that we can
reasonably upgrade.
PR-URL: https://github.com/nodejs/node/pull/10561
Reviewed-By: Teddy Katz <teddy.katz@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
2017-03-08 17:11:24 -08:00
Rich Trott
b4cf8c4036
benchmark,lib,test: adjust for linting
...
Formatting changes for upcoming linter update.
PR-URL: https://github.com/nodejs/node/pull/10561
Reviewed-By: Teddy Katz <teddy.katz@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
2017-03-08 17:11:24 -08:00
Brian White
c8d2ca7a78
fs: improve performance for sync stat() functions
...
PR-URL: https://github.com/nodejs/node/pull/11522
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2017-03-08 17:11:23 -08:00
Brian White
5bfa43d8f0
os: improve loadavg() performance
...
PR-URL: https://github.com/nodejs/node/pull/11516
Reviewed-By: Jackson Tian <shyvo1987@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
2017-03-08 17:11:23 -08:00
Brian White
b7088a9355
process: improve memoryUsage() performance
...
Creating an object in JS and using a typed array to transfer values
from C++ to JS is faster than creating an object and setting
properties in C++.
The included benchmark shows ~34% increase in performance with this
change.
PR-URL: https://github.com/nodejs/node/pull/11497
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2017-03-08 17:11:23 -08:00
Vse Mozhet Byt
e5d1e273d7
dgram: fix possibly deoptimizing use of arguments
...
This commit adds a guard against an out of bounds access of
arguments, and replaces another use of arguments with a named
function parameter.
Refs: https://github.com/nodejs/node/issues/10323
PR-URL: https://github.com/nodejs/node/pull/11242
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-03-08 17:11:23 -08:00
cjihrig
c7257e716f
dgram: remove this aliases
...
This commit removes self = this style assignments from dgram.
PR-URL: https://github.com/nodejs/node/pull/11243
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-03-08 17:11:22 -08:00
Luigi Pinca
b4dc7a778f
http: make request.abort() destroy the socket
...
`request.abort()` did not destroy the socket if it was called
before a socket was assigned to the request and the request
did not use an `Agent` or a Unix Domain Socket was used.
Fixes: https://github.com/nodejs/node/issues/10812
PR-URL: https://github.com/nodejs/node/pull/10818
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2017-03-08 17:11:21 -08:00
Brian White
db45bf850a
querystring: improve unescapeBuffer performance
...
PR-URL: https://github.com/nodejs/node/pull/10837
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-03-08 17:11:17 -08:00
Brian White
32cdbca2dc
querystring: improve stringify() performance
...
PR-URL: https://github.com/nodejs/node/pull/10852
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Claudio Rodriguez <cjrodr@yahoo.com >
2017-03-08 17:11:17 -08:00
Brian White
23f3f20963
querystring: improve parse() performance
...
PR-URL: https://github.com/nodejs/node/pull/10874
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-03-08 17:11:16 -08:00
Brian White
e397e6f94a
buffer: improve compare() performance
...
PR-URL: https://github.com/nodejs/node/pull/10927
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-03-08 17:11:16 -08:00
dcposch@dcpos.ch
2b52859535
buffer: fix comments in bidirectionalIndexOf
...
PR-URL: https://github.com/nodejs/node/pull/10162
Fixes: https://github.com/nodejs/node/issues/9801
Reviewed-By: Roman Reiss <me@silverwind.io >
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com >
Reviewed-By: Trevor Norris <trev.norris@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2017-03-08 17:11:16 -08:00
Sakthipriyan Vairamani
83a3aef873
tools: rename eslintrc to an undeprecated format
...
As per ESLint documentation,
http://eslint.org/docs/user-guide/configuring#configuration-file-formats
the file format .eslintrc is deprecated. This patch just renames the
files to .yaml and the structure is already in yaml format.
PR-URL: https://github.com/nodejs/node/pull/7699
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com >
Reviewed-By: Johan Bergström <bugs@bergstroem.nu >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2017-03-08 17:11:11 -08:00
Brian White
f7879d98f8
buffer: improve toJSON() performance
...
PR-URL: https://github.com/nodejs/node/pull/10895
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Michal Zasso <targos@protonmail.com >
Reviewed-By: Evan Lucas <evanlucas@me.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-03-08 17:11:08 -08:00
Timothy Gu
9e6fcbb34c
url: fix surrogate handling in encodeAuth()
...
Currently, the legacy URL stringifier miscalculates the offset of an
extra surrogate, causing the high surrogate to be included unescaped:
> url.format({ auth: '\uD83D\uDE00', hostname: 'a' })
'//%F0%9F%98%80�@a'
PR-URL: https://github.com/nodejs/node/pull/11387
Backport-of: https://github.com/nodejs/node/pull/11161
2017-03-08 17:11:08 -08:00
Adam Langley
44510197dd
crypto: freelist_max_len is gone in OpenSSL 1.1.0
...
The freelist_max_len member of SSL* (and the freelist itself) has been
removed in OpenSSL 1.1.0. Thus this change will be necessary at some
point but, for now, it makes it a little easier to build with 1.1.0
without breaking anything for previous versions of OpenSSL.
PR-URL: https://github.com/nodejs/node/pull/10859
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Shigeki Ohtsu <ohtsu@ohtsu.org >
2017-03-08 17:11:06 -08:00
Jackson Tian
bde1a7e09e
lib: remove unnecessary parameter for assertCrypto()
...
The `exports` parameter is unnecessary.
PR-URL: https://github.com/nodejs/node/pull/10834
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Brian White <mscdex@mscdex.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Sam Roberts <sam@strongloop.com >
2017-03-08 17:11:04 -08:00
Rich Trott
ccb6045f2d
crypto,tls: fix mutability of return values
...
If you alter the array returned by `tls.getCiphers()`,
`crypto.getCiphers()`, `crypto.getHashes()`, or `crypto.getCurves()`, it
will alter subsequent return values from those functions.
```js
'use strict';
const crypto = require('crypto');
var hashes = crypto.getHashes();
hashes.splice(0, hashes.length);
hashes.push('some-arbitrary-value');
console.log(crypto.getHashes()); // "['some-arbitrary-value']"
```
This is surprising. Change functions to return copy of array instead.
PR-URL: https://github.com/nodejs/node/pull/10795
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
2017-03-08 17:11:03 -08:00
Rich Trott
4a87aee532
test,util: remove lint workarounds
...
Remove assignments to `SIMD` that are only to pacify ESLint. Instead,
use either `global.SIMD` or provide an comment letting ESLint know in
cases where `SIMD` is guaranteed to be a defined global identifier.
PR-URL: https://github.com/nodejs/node/pull/10785
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Teddy Katz <teddy.katz@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
2017-03-08 17:11:03 -08:00
Rich Trott
73283060ad
test,repl: add coverage for repl .clear+useGlobal
...
Add a test to cover situation where REPL is initialized with `useGlobal`
set to `true` and `.clear` is called. This adds coverage for code in
repl.js that is not currently covered.
Includes minor refactor of rocket functions in repl.js for concision.
PR-URL: https://github.com/nodejs/node/pull/10777
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-03-08 17:11:02 -08:00
Joyee Cheung
53213004eb
util: improve readability of normalizeEncoding
...
* Improve readability of util.normalizeEncoding
and add some comments
* Add a benchmark for util.normalizeEncoding
PR-URL: https://github.com/nodejs/node/pull/10439
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Andreas Madsen <amwebdk@gmail.com >
2017-03-08 17:11:02 -08:00
Rich Trott
a2aa2f7de4
lib: refactor bootstrap_node.js regular expression
...
* use `+` instead of `*` where one-or-more is required
* switch from String.prototype.match() to RegExp.prototype.test()
PR-URL: https://github.com/nodejs/node/pull/10749
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
Reviewed-By: Jackson Tian <shyvo1987@gmail.com >
2017-03-08 17:11:01 -08:00
Jackson Tian
dc88b6572d
readline: refactor construct Interface
...
Remove the dependency on the arguments.length.
PR-URL: https://github.com/nodejs/node/pull/4740
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Trevor Norris <trev.norris@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2017-03-08 17:11:00 -08:00
Rich Trott
797d9ee924
lib: refactor crypto cipher/hash/curve getters
...
* refactor internal util.filterDuplicateStrings() to eliminate unused
code paths
* `.indexOf()` -> `.includes()` in test
* more concise arrow functions
PR-URL: https://github.com/nodejs/node/pull/10682
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Michal Zasso <targos@protonmail.com >
2017-03-08 17:10:58 -08:00
yorkie
412f380903
stream: move legacy to lib/internal dir
...
Improve readability of lib/stream.js by moving the legacy abstract
Stream into lib/internal/streams/legacy.js.
PR-URL: https://github.com/nodejs/node/pull/8197
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2017-03-08 17:10:53 -08:00
Umair Ishaq
f7c6ad2df9
readline: update 6 comparions to strict
...
PR-URL: https://github.com/nodejs/node/pull/11078
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2017-03-08 17:10:50 -08:00
Roee Kasher
28102edbc8
src: unconsume stream fix in internal http impl
...
When emitting a 'connection' event on a httpServer, the function
connectionListener is called. Then, a new parser is created, and
'consume' method is called on the socket's externalStream. However,
if this stream was already consumed and unconsumed, the process
crashes with a cpp assert from the 'Consume' method in stream_base.h.
This commit makes sure that no SIGABRT will be raised and the process
will stay alive (after emitting the socket).
PR-URL: https://github.com/nodejs/node/pull/11015
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-03-08 17:10:49 -08:00
asafdav2
b90a141cc7
timer: remove duplicated word in comment
...
PR-URL: https://github.com/nodejs/node/pull/11323
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Brian White <mscdex@mscdex.net >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com >
Reviewed-By: Timothy Gu <timothygu99@gmail.com >
2017-03-08 17:10:41 -08:00
John Barboza
d71ebb90ec
timer,domain: maintain order of timer callbacks
...
PR-URL: https://github.com/nodejs/node/pull/10522
Fixes: https://github.com/nodejs/node/issues/1271
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
2017-03-08 17:10:38 -08:00
Rich Trott
32b264c33b
assert: remove unneeded condition
...
PR-URL: https://github.com/nodejs/node/pull/11314
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
2017-03-08 17:10:38 -08:00
Jackson Tian
4179c7050f
child_process: move anonymous class to top level
...
Move the anonymous class out of setupChannel to clarify code.
PR-URL: https://github.com/nodejs/node/pull/11147
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2017-03-08 17:10:37 -08:00
Shinnosuke Watanabe
e54b433c8d
util: use ES2015+ Object.is to check negative zero
...
Use `Object.is` to check whether the value is negative zero or not.
Ref: https://github.com/nodejs/node/commit/b3e4fc6a48b97b52bd19de43c76b7082dcab4988
PR-URL: https://github.com/nodejs/node/pull/11332
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Evan Lucas <evanlucas@me.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2017-03-08 17:10:36 -08:00
James M Snell
a55af77fc5
vm: refactor vm module
...
Switch to the more efficient module.exports = {} pattern.
PR-URL: https://github.com/nodejs/node/pull/11392
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2017-03-08 17:10:34 -08:00