Anna Henningsen
917ace283f
n-api: add napi_get_node_version
...
Add `napi_get_node_version`, to help with feature-detecting
Node.js as an environment.
PR-URL: https://github.com/nodejs/node/pull/14696
Reviewed-By: Kyle Farnung <kfarnung@microsoft.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2017-08-12 22:00:34 +02:00
Gibson Fahnestock
0eab77c86f
test: allow inspector to reopen with same port
...
Test checks that if you open the inspector with '0' (pick a random free
port), close it, then reopen it, you get a different port. However this
isn't necessarily true.
PR-URL: https://github.com/nodejs/node/pull/14320
Fixes: https://github.com/nodejs/node/issues/14316
Refs: https://github.com/nodejs/node/issues/14316#issuecomment-315680755
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2017-08-12 22:00:30 +02:00
XadillaX
9bbbf12827
test: remove redundant using in cctest
...
PR-URL: https://github.com/nodejs/node/pull/14739
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Timothy Gu <timothygu99@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com >
2017-08-12 22:00:27 +02:00
Daniel Bevenius
7eb9f6f6e4
test: make totalLen snake case
...
For consistency, use snake case (total_len) for the local totalLen
variable.
PR-URL: https://github.com/nodejs/node/pull/14765
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
2017-08-12 21:59:13 +02:00
Eugene Ostroukhov
029567a460
inspector: support extra contexts
...
This enables inspector support for contexts created using the vm module.
PR-URL: https://github.com/nodejs/node/pull/14465
Reviewed-By: Jan Krems <jan.krems@gmail.com >
Reviewed-By: Timothy Gu <timothygu99@gmail.com >
Reviewed-By: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org >
2017-08-12 21:59:04 +02:00
Rich Trott
977e22857a
test: make test-tls-connect checks more strict
...
Check the error code on expected errors so that the introduction of
different errors in refactoring is caught.
While at it, re-order modules alphabetically per test-writing guide.
PR-URL: https://github.com/nodejs/node/pull/14695
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2017-08-12 21:57:52 +02:00
Timothy Gu
c5ee34e39b
encoding: rudimentary TextDecoder support w/o ICU
...
Also split up the tests.
Backport-PR-URL: https://github.com/nodejs/node/pull/14786
Backport-Reviewed-By: Anna Henningsen <anna@addaleax.net >
PR-URL: https://github.com/nodejs/node/pull/14489
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
2017-08-12 14:49:56 +02:00
Anna Henningsen
a781bb4508
Revert "test: disable MultipleEnvironmentsPerIsolate"
...
This reverts commit 95ab966a74 .
Ref: https://github.com/nodejs/node/issues/14206
Ref: https://github.com/nodejs/node/pull/14246
PR-URL: https://github.com/nodejs/node/pull/14749
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
2017-08-10 22:15:11 +02:00
Anna Henningsen
8ff2a5c338
Revert "test: add DISABLED_ prefix to commented out test"
...
This reverts commit 75bf8a9db9 .
Ref: https://github.com/nodejs/node/issues/14206
Ref: https://github.com/nodejs/node/pull/14317
PR-URL: https://github.com/nodejs/node/pull/14749
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
2017-08-10 22:15:10 +02:00
Anna Henningsen
0bc3124c80
test: properly order freeing resources in cctest
...
The `IsolateData` instance is created before the `Environment` instance,
so free in reverse order.
Fixes: https://github.com/nodejs/node/issues/14206
PR-URL: https://github.com/nodejs/node/pull/14749
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
2017-08-10 22:15:09 +02:00
Rich Trott
3f1bb0a551
test: split out load-sensitive readline tests
...
Two test cases in `test-readline-interface` are sensitive to resource
constraints (probably due to `\r` and `\n` not arriving within the
appropriate delay to be treated as a single line ending). Move those
tests to `sequential`.
PR-URL: https://github.com/nodejs/node/pull/14681
Fixes: https://github.com/https://github.com/nodejs/node/issues/14674
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
2017-08-10 21:23:26 +02:00
Rich Trott
5d99d7dff2
test: add block scoping to test-readline-interface
...
Use block-scoping in test-readline-interface to avoid side effects and
make tests more modular. (Some contain race conditions and will need to
be moved to the sequential directory if they can't be refactored to
avoid the race condition.)
Backport-PR-URL: https://github.com/nodejs/node/pull/14748
Backport-Reviewed-By: Anna Henningsen <anna@addaleax.net >
PR-URL: https://github.com/nodejs/node/pull/14615
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-08-10 21:13:47 +02:00
Prakash Palaniappan
58742729da
test: set module loading error for aix
...
In test/parallel/test-module-loading-error.js, an attempt is made to
load a text file as a native executable. This results in an error
message in a platform specific manner.
AIX was not included in the list of platforms. This fix introduces
the AIX error messages.
PR-URL: https://github.com/nodejs/node/pull/14511
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
2017-08-10 18:22:29 +02:00
Nick Stanish
06ba2dae30
test: fix conversion of microseconds in test
...
PR-URL: https://github.com/nodejs/node/pull/14706
Fixes: https://github.com/nodejs/node/issues/8728
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Timothy Gu <timothygu99@gmail.com >
2017-08-10 18:21:01 +02:00
Rich Trott
30837b3b90
test: improve check in test-os
...
The check for `os.networkInterfaces()` in `test-os.js` may be too
strict. It's apparently possible for a machine to be configured with
multiple IPv4 loopback interfaces. Increase specificity of filter to
check on only the object we expect.
PR-URL: https://github.com/nodejs/node/pull/14655
Fixes: https://github.com/nodejs/node/issues/14654
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-08-10 18:20:55 +02:00
Miguel Angel Asencio Hurtado
55aba6aee7
test: replace indexOf with includes
...
Refs: https://github.com/nodejs/node/issues/12586
PR-URL: https://github.com/nodejs/node/pull/14630
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com >
Reviewed-By: Timothy Gu <timothygu99@gmail.com >
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com >
2017-08-10 18:20:49 +02:00
Azard
935d34bd6b
test: fix test-readline-interface
...
Previous unit test delay is too short for parallel test on raspberry pi,
it will fail sometimes. This PR use common.platformTimeout and widen
the time gap.
PR-URL: https://github.com/nodejs/node/pull/14677
Ref: https://github.com/nodejs/node/issues/14674
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2017-08-10 18:20:39 +02:00
Guy Margalit
ef8ac7b5ac
stream: support readable/writableHWM for Duplex
...
This commits adds support for readableHighWaterMark and
writableHighWaterMark in Duplex stream, so that they can be set without
accessing the internal state.
Fixes: https://github.com/nodejs/node/issues/14555
PR-URL: https://github.com/nodejs/node/pull/14636
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2017-08-10 18:20:33 +02:00
James M Snell
2ee3320f2c
test: improve multiple timers tests
...
PR-URL: https://github.com/nodejs/node/pull/14616
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Refael Ackermann <refack@gmail.com >
2017-08-10 18:20:22 +02:00
Jason Ginchereau
5e2cce59ef
n-api: optimize number API performance
...
- Add separate APIs for creating different kinds of numbers,
because creating a V8 number value from an integer is faster
than creating one from a double.
- When getting number values, avoid getting the current context
because the context will not actually be used and is expensive
to obtain.
- When creating values, don't use v8::TryCatch (NAPI_PREAMBLE),
because these functions have no possibility of executing JS code.
Refs: https://github.com/nodejs/node/issues/14379
PR-URL: https://github.com/nodejs/node/pull/14573
Reviewed-By: Timothy Gu <timothygu99@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2017-08-10 18:20:18 +02:00
Jérémy Lal
71f2e76353
test: use ciphers supported by shared OpenSSL
...
On Debian with OpenSSL 1.1 CLI, the ciphers used in those tests were
unknown.
PR-URL: https://github.com/nodejs/node/pull/14566
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-08-10 18:20:14 +02:00
Aditya Anand
f73f659186
test: mitigate RegEx exceeding 80 chars
...
Format commit wrapping lines containing RegEx and exceeding 80
chars.
PR-URL: https://github.com/nodejs/node/pull/14607
Fixes: https://github.com/nodejs/node/issues/14586
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
2017-08-10 18:20:09 +02:00
Jan Krems
d89f9f82b0
inspector: allow require in Runtime.evaluate
...
Some parts were written by Timothy Gu <timothygu99@gmail.com >.
PR-URL: https://github.com/nodejs/node/pull/8837
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Aleksei Koziatinskii <ak239spb@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Timothy Gu <timothygu99@gmail.com >
2017-08-10 18:19:45 +02:00
Bartosz Sosnowski
96147c980c
test: read proper inspector message size
...
Fix a bug when messages bigger than 64kb where incorrectly parsed by
the inspector-helper.
PR-URL: https://github.com/nodejs/node/pull/14596
Fixes: https://github.com/nodejs/node/issues/14507
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-08-10 18:18:46 +02:00
Greg Alexander
7203924fea
util: implement %o and %O as formatting specifiers
...
Implementing the %o and %O formatting specifiers for util.format.
Based on discussion in issue, this specifier should just call
util.inspect to format the value.
PR-URL: https://github.com/nodejs/node/pull/14558
Fixes: https://github.com/nodejs/node/issues/14545
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Roman Reiss <me@silverwind.io >
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Evan Lucas <evanlucas@me.com >
Reviewed-By: Timothy Gu <timothygu99@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com >
2017-08-10 18:18:39 +02:00
Anna Henningsen
1f16c43e80
child_process: fix handle passing w large payloads
...
Fix situations in which the handle passed along with a message
that has a large payload and can’t be read entirely by a single
`recvmsg()` call isn’t associated with the message to which it
belongs.
PR-URL: https://github.com/nodejs/node/pull/14588
Fixes: https://github.com/nodejs/node/issues/13778
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com >
2017-08-09 20:07:42 +02:00
Timothy Gu
8c5cd1439e
src: avoid dereference without existence check
...
Currently the URL API is only used from the JS binding, which always
initializes `base` regardless of `has_base`. Therefore, there is no
actual security risk right now, but would be had we made other C++ parts
of Node.js use this API.
An earlier version of this patch was created by Bradley Farias
<bradley.meck@gmail.com >.
PR-URL: https://github.com/nodejs/node/pull/14591
Refs: https://github.com/nodejs/node/pull/14369#discussion_r128767221
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2017-08-07 15:17:34 +02:00
Rich Trott
3c46ef4717
test: explain sloppy mode for test-global
...
Add a comment explaining why test-global runs in sloppy mode rather than
strict mode. While in the file, make some minor changes to the module
ordering and spacing to conform with our test writing guide. Also
reordered arguments in `assert.strictEqual()` to match documentation.
PR-URL: https://github.com/nodejs/node/pull/14604
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
2017-08-07 15:17:33 +02:00
Timothy Gu
28b9c7a477
test: fix test-readline-position w/o ICU
...
PR-URL: https://github.com/nodejs/node/pull/14489
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
2017-08-07 15:17:31 +02:00
Michaël Zasso
636ba8caef
test: support odd value for kStringMaxLength
...
V8 6.2 will support a larger maximum string length on 64-bit platforms.
Update the test to take into account its odd value ((1 << 30) - 1 - 24).
Refs: https://github.com/v8/v8/commit/e8c9649e2570c7e278e70a6584738a3c3f828b2b
PR-URL: https://github.com/nodejs/node/pull/14476
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com >
2017-08-07 15:17:30 +02:00
Anna Henningsen
255b9bfa8a
console,test: make message test more accurate
...
Make a message test more accurate in what it’s testing for.
This requires not swallowing stack overflow RangeErrors in
`console.log` and similar methods, which I would consider a
bugfix in itself.
PR-URL: https://github.com/nodejs/node/pull/14580
Fixes: https://github.com/nodejs/node-v8/issues/5
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
2017-08-07 15:17:27 +02:00
Rich Trott
9f319d5dfb
tools: replace assert-throw-arguments custom lint
...
The functionality of ESLint custom rule assert-throws-arguments can be
replaced with no-restricted-syntax entries.
PR-URL: https://github.com/nodejs/node/pull/14547
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Timothy Gu <timothygu99@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-08-07 15:17:26 +02:00
Rich Trott
5094f2c299
test: refactor test-domain-abort-on-uncaught
...
* use common.mustCall() instead of exit handler
* use execSync instead of exec so test is reliable under load
* move from sequential to parallel
PR-URL: https://github.com/nodejs/node/pull/14541
Fixes: https://github.com/nodejs/node/issues/11826
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-08-07 15:17:25 +02:00
James M Snell
9c1199e88f
console: add console.count() and console.clear()
...
Both are simple utility functions defined by the WHATWG
console spec (https://console.spec.whatwg.org/ ).
PR-URL: https://github.com/nodejs/node/pull/12678
Ref: https://github.com/nodejs/node/issues/12675
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com >
Reviewed-By: Timothy Gu <timothygu99@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2017-08-07 15:17:24 +02:00
Anna Henningsen
8a3bc874fa
src: fix process.abort() interaction with V8
...
Since V8 5.9 V8 installs a default signal handler for some signals
when creating a default platform instance that prints a stack trace.
However, Node already does the same thing, so it would seem like the
two different stack traces would be printed; also, the V8 handler
would lead to a `SIGSEGV` under some circumstances, rather than
letting the abort continue normally.
Resolve this by disabling V8’s signal handler by default.
Backport-PR-URL: https://github.com/nodejs/node/pull/14574
Backport-Reviewed-By: Anna Henningsen <anna@addaleax.net >
Backport-Reviewed-By: Refael Ackermann <refack@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/13985
Fixes: https://github.com/nodejs/node/issues/13865
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-08-02 12:22:25 +02:00
James M Snell
9a3fc10dd4
util: implement WHATWG Encoding Standard API
...
Provide an (initially experimental) implementation of the WHATWG Encoding
Standard API (`TextDecoder` and `TextEncoder`). The is the same API
implemented on the browser side.
By default, with small-icu, only the UTF-8, UTF-16le and UTF-16be decoders
are supported. With full-icu enabled, every encoding other than iso-8859-16
is supported.
This provides a basic test, but does not include the full web platform
tests. Note: many of the web platform tests for this would fail by default
because we ship with small-icu by default.
A process warning will be emitted on first use to indicate that the
API is still experimental. No runtime flag is required to use the
feature.
Backport-PR-URL: https://github.com/nodejs/node/pull/14585
Backport-Reviewed-By: Anna Henningsen <anna@addaleax.net >
Refs: https://encoding.spec.whatwg.org/
PR-URL: https://github.com/nodejs/node/pull/13644
Reviewed-By: Timothy Gu <timothygu99@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2017-08-02 11:52:23 +02:00
Anna Henningsen
e529914e70
zlib: fix interaction of flushing and needDrain
...
Backport-PR-URL: https://github.com/nodejs/node/pull/14571
Backport-Reviewed-By: James M Snell <jasnell@gmail.com >
Fixes: https://github.com/nodejs/node/issues/14523
PR-URL: https://github.com/nodejs/node/pull/14527
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2017-08-02 11:50:59 +02:00
James M Snell
b1fef05446
test: improvements to various http tests
...
* Add common/countdown utility
* Numerous improvements to http tests
Backport-PR-URL: https://github.com/nodejs/node/pull/14583
Backport-Reviewed-By: Anna Henningsen <anna@addaleax.net >
PR-URL: https://github.com/nodejs/node/pull/14315
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2017-08-02 00:57:43 +02:00
Rich Trott
ce9e3cfe10
test: refactor test/sequential/test-fs-watch.js
...
* add block scoping
* rename block-scoped identifiers (e.g., filenameTwo -> filename)
* use common.mustCall() instead of exit handler
* use common.mustNotCall() as appropriate
* order modules per test writing guide
Backport-PR-URL: https://github.com/nodejs/node/pull/14575
Backport-Reviewed-By: Anna Henningsen <anna@addaleax.net >
PR-URL: https://github.com/nodejs/node/pull/14534
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2017-08-02 00:24:54 +02:00
Anna Henningsen
0982810208
dns: add channel.cancel()
...
This can be used to implement custom timeouts.
Fixes: https://github.com/nodejs/node/issues/7231
PR-URL: https://github.com/nodejs/node/pull/14518
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2017-08-01 20:26:49 +02:00
Anna Henningsen
69e41dc5da
dns: enable usage of independent cares resolvers
...
Ref: https://github.com/nodejs/node/issues/7231
PR-URL: https://github.com/nodejs/node/pull/14518
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2017-08-01 20:26:48 +02:00
Anna Henningsen
106a23bd27
src,dns: refactor cares_wrap to avoid global state
...
PR-URL: https://github.com/nodejs/node/pull/14518
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2017-08-01 20:26:47 +02:00
Rich Trott
9f50db2450
test: refactor test-vm-new-script-new-context
...
* block scope test cases
* clean up global leaks in individual test cases
* enable global variable leak checking
* remove console.error() statements
PR-URL: https://github.com/nodejs/node/pull/14536
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-08-01 20:26:30 +02:00
Ezequiel Garcia
f40b9062fc
test: add check on an addon that does not register
...
This commit calls require on a shared library that is not declared
as a node module, and therefore does not register properly.
PR-URL: https://github.com/nodejs/node/pull/13954
Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
2017-08-01 18:46:16 +02:00
Timothy Gu
32259421ca
url: update sort() behavior with no params
...
PR-URL: https://github.com/nodejs/node/pull/14185
Refs: https://github.com/whatwg/url/pull/336
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-08-01 18:45:48 +02:00
Azard
37e55bf559
readline: remove max limit of crlfDelay
...
PR-URL: https://github.com/nodejs/node/pull/13497
Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Refael Ackermann <refack@gmail.com >
2017-08-01 18:45:34 +02:00
Rich Trott
fa8c5f4372
tools: remove legacy indentation linting
...
All linting now uses the current ESLint 4.3.0 indentation linting.
Remove legacy indentation rules.
PR-URL: https://github.com/nodejs/node/pull/14515
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Claudio Rodriguez <cjrodr@yahoo.com >
Reviewed-By: Evan Lucas <evanlucas@me.com >
Reviewed-By: Timothy Gu <timothygu99@gmail.com >
2017-08-01 18:45:15 +02:00
Timothy Gu
b41ae9847e
path: fix win32 volume-relative paths
...
`path.resolve()` and `path.join()` are left alone in this commit due to
the lack of clear semantics.
PR-URL: https://github.com/nodejs/node/pull/14440
Fixes: https://github.com/nodejs/node/issues/14405
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2017-08-01 18:45:11 +02:00
Matt Woicik
ddd97fe15c
test: fix error when foo in path to git clone
...
I fixed an error that occured in the test case of the file
test/parallel/test-assert-fail.js when foo was in the path to
the git clone. This occured due to a regex that looked only for the
word foo, and so it was updated to not look for foo/, but only
foo. This way it won't go off from foo being in the path to the
git clone
PR-URL: https://github.com/nodejs/node/pull/14506
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
2017-08-01 18:44:50 +02:00
Brendan Ashworth
58446912a6
net: fix bytesWritten during writev
...
When a writev is caused on a socket (sometimes through corking and
uncorking), previously net would call Buffer.byteLength on the array of
buffers and chunks. This throws a TypeError, because Buffer.byteLength
throws when passed a non-string.
In dbfe8c4e , behavior changed to throw when passed a non-string. This is
correct behavior. Previously, it would cast the argument to a string, so
before this commit, bytesWritten would give an erroneous value. This
commit corrects the behavior equally both before and after dbfe8c4e .
This commit fixes this bug by iterating over each chunk in the pending
stack and calculating the length individually. Also adds a regression
test. This additionally changes an `instanceof Buffer` check to `typeof
!== 'string'`, which should be equivalent.
PR-URL: https://github.com/nodejs/node/pull/14236
Reviewed-By: Brian White <mscdex@mscdex.net >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Refs: https://github.com/nodejs/node/pull/2960
2017-08-01 18:44:41 +02:00