0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
Commit Graph

18940 Commits

Author SHA1 Message Date
Benjamin Coe
a1b6cfd362
build: run es-module tests in CI
Add es-module to CI_JS_SUITES/js_test_suites, so that tests run in CI.
Update test/README adding es-module section.

PR-URL: https://github.com/nodejs/node/pull/15276
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2017-09-27 21:46:24 -04:00
Bryan English
2043944a4c http: client keep-alive for UNIX domain sockets
Makes `Connection: keep-alive` behave correctly when making client
connections to UNIX domain sockets.

Prior to this, connections would never be re-used, but the keep-alive
would cause the connections to stick around until they time out. This
would lead to an eventual EMFILE error due to all the connections
staying open. This was due to http.Agent not properly supporting UNIX
domain sockets.

PR-URL: https://github.com/nodejs/node/pull/13214
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-09-27 18:31:17 -07:00
João Reis
510cab7a3d src,etw: fix event 9 on 64 bit Windows
The event manifest specifies the MethodID field as a 32 bit integer.
The 32 bit node executable publishes this correctly, but the 64 bit
executable published a 64 bit integer, making the event undecodable.

PR-URL: https://github.com/nodejs/node/pull/15563
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Hitesh Kanwathirtha <hiteshk@microsoft.com>
2017-09-28 01:57:00 +01:00
Antoine AMARA
51bc7fa598
doc: fix mistake in http2stream.respondWithFile.
http2stream.respondWithFile api has changed since 8.5.0 with the
addition of the onError option. In the first code example an
onError function is implemented but never used, fix this
mistake.

Add a description to have more informations when onError is triggered.

PR-URL: https://github.com/nodejs/node/pull/15501
Fixes: https://github.com/nodejs/node/issues/15390
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2017-09-27 20:40:18 -03:00
Bryan English
26174fcfe1 crypto: expose ECDH class
For consistency with the rest of the crypto classes, exposes the ECDH
class. Originally, only the createECDH function was exposed, and there
was no real reason to hide the class.

PR-URL: https://github.com/nodejs/node/pull/8188
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2017-09-27 13:42:30 -07:00
Bryan English
611a648c66 test: crypto createClass instanceof Class
The crypto classes are also exposed as createClass for each class. This
tests that each of them returns an instance of the class in question.

PR-URL: https://github.com/nodejs/node/pull/8188
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2017-09-27 13:41:17 -07:00
Ben Noordhuis
93985ef83c doc: retire bnoordhuis from the TSC
PR-URL: https://github.com/nodejs/node/pull/15626
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2017-09-27 11:05:17 -07:00
Matteo Collina
1fe9b535a7 test: fix http-writable-true-after-close flakyness
Ref: https://github.com/nodejs/node/pull/15404
Fixes: https://github.com/nodejs/node/issues/15505
PR-URL: https://github.com/nodejs/node/pull/15520
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-09-27 14:07:11 +01:00
cjihrig
eee166f24d
src: remove unused variable in node_url.cc
PR-URL: https://github.com/nodejs/node/pull/15592
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
2017-09-27 08:12:12 -04:00
cjihrig
75ab1e0d9f
src: remove unused computation
PR-URL: https://github.com/nodejs/node/pull/15593
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-09-27 07:52:43 -04:00
Trevor Norris
2b9b46cd55
async_wrap: allow user to pass execution_async_id
Allow the user to pass in an execution_async_id instead of always
generating one. This way the JS API can be used to pre-allocate the
execution_async_id when the JS object is instantiated, before the native
resource is created.

Also allow the new execution_async_id to be passed via asyncReset().

PR-URL: https://github.com/nodejs/node/pull/14208
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2017-09-27 04:16:03 -06:00
Trevor Norris
e1eae3cf9f
async_wrap: add constructor for PromiseWrap
Another optional argument is about to be added to AsyncWrap. So instead
of piling them on, create a separate constructor specifically for
PromiseWrap since it's the only class that uses the "silent" argument.

PR-URL: https://github.com/nodejs/node/pull/14208
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2017-09-27 04:15:56 -06:00
Trevor Norris
d28d20ccb7
test: skip test when checking async_hooks
The test addons/async-hooks-promise depends on there being only one hook
available. So skip it if NODE_TEST_WITH_ASYNC_HOOKS is set.

PR-URL: https://github.com/nodejs/node/pull/14208
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2017-09-27 04:15:43 -06:00
Trevor Norris
44dc449eff
test: print resource stack on error
When running tests with NODE_TEST_WITH_ASYNC_HOOKS and the same asyncId
is detected twice print the stack traces of both init() calls. Also
print if the resource is the same instance.

PR-URL: https://github.com/nodejs/node/pull/14208
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2017-09-27 04:15:39 -06:00
Trevor Norris
4321206c5b
build: add test-with-async-hooks
The new test-with-async-hooks runs all normal tests (except async-hooks)
with the environment variable NODE_TEST_WITH_ASYNC_HOOKS set. These
extra checks do a minimum check to make sure async_hooks operates
normally under all other tests. e.g. if init() or destroy() is called
twice for the same id.

Also move test "async-hooks" from CI_JS_SUITES into its own
CI_ASYNC_HOOKS. Makes it cleaner to add, instead of supplying a massive
list of tests that may change in the future.

PR-URL: https://github.com/nodejs/node/pull/14208
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2017-09-27 04:14:47 -06:00
Trevor Norris
92d7e81b73
src: clear async id stack if bootstrap throws
If bootstrap throws and if ids are added to the async id stack and if
the exception wasn't handled by the fatal exception handler then the
AsyncCallbackScope destructor will cause the AsyncHooks::pop_ids() stack
check to fail. Causing the application to crash. So clear the async id
stack manually.

This is only possible if the user: 1) manually calls MakeCallback() or
2) uses async await in the top level. Which will cause _tickCallback()
to fire before bootstrap finishes executing.

The following example shows how the application can fail due to
exceeding the maximum call stack while using async await:

    async function fn() {
      fn();
      throw new Error();
    }
    (async function() { await fn(); })();

If this occurs during bootstrap then the application will pring the
following warning a number of times then exit with a status of 0:

    (node:*) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: *): Error

Here's the same recursive call done after enabling a new AsyncHook() the
following will print instead of the above warning and exit with a
non-zero code (currently it's 7 because of how node::FatalException
assigns error codes based on where the failure happened):

    script.js:25
    async function fn() {
                     ^
    RangeError: Maximum call stack size exceeded
        at <anonymous>
        at fn (script.js:25:18)
        at fn (script.js:26:3)
        ....

This has to do with how Promises lazily enable PromiseHook if an
AsyncHook() is enabled. Whether these need to be made uniform is outside
the scope of this commit

Fixes: https://github.com/nodejs/node/issues/15448
PR-URL: https://github.com/nodejs/node/pull/15553
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2017-09-27 02:07:43 -06:00
Daniel Bevenius
8a6f376e36 src: move node_trace_writer/buffer.h to agent.cc
The headers node_trace_writer.h and node_trace_buffer.h are not used in
agent.h but are more of an implementation detail of agent.cc.

This commit suggests moving the inclusion of these headers to agent.cc.

PR-URL: https://github.com/nodejs/node/pull/15598
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-09-27 07:25:52 +02:00
Rich Trott
1f21a5cdb7 doc: update table of contents for common/README.md
The `countdown` and `fixtures` modules are documented in the
`common/README.md` file but are omitted from the table of contents. Add
them.

PR-URL: https://github.com/nodejs/node/pull/15595
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-09-26 20:25:13 -07:00
Gibson Fahnestock
0919dff489
crypto: only try to set FIPS mode if different
Turning FIPS mode on (or off) when it's already on (or off) should be a
no-op, not an error.

PR-URL: https://github.com/nodejs/node/pull/12210
Fixes: https://github.com/nodejs/node/issues/11849
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-09-26 23:49:31 +01:00
Yang-Kichang
7d55b81999
url: change variable name to be more descriptive
PR-URL: https://github.com/nodejs/node/pull/15551
Reviewed-By: James M Snell <jasnell@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: Ruben Bridgewater <ruben@bridgewater.de>
2017-09-27 00:39:29 +02:00
Michaël Zasso
cfee1c9778 path: fix normalize paths ending with two dots
Fixes: https://github.com/nodejs/security/issues/147
PR-URL: https://github.com/nodejs-private/node-private/pull/94
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Doug Wilson <doug@somethingdoug.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2017-09-26 14:59:54 -07:00
James M Snell
05e4c1d6bc 2017-09-26, Node.js Version 8.6.0 (Current)
* **crypto**
  * Support for multiple ECDH curves. [#15206](https://github.com/nodejs/node/pull/15206)
* **dgram**
  * Added `setMulticastInterface()` API. [#7855](https://github.com/nodejs/node/pull/7855)
  * Custom lookup functions are now supported. [#14560](https://github.com/nodejs/node/pull/14560)
* **n-api**
  * The command-line flag is no longer required to use N-API. [#14902](https://github.com/nodejs/node/pull/14902)
* **tls**
  * Docs-only deprecation of `parseCertString()`. [#14245](https://github.com/nodejs/node/pull/14245)
* **New Contributors**
  * Welcome Sebastiaan Deckers (@sebdeckers) as a new Collaborator! [#15354](https://github.com/nodejs/node/pull/15354)
2017-09-26 14:55:39 -07:00
rebornix
8b902500cd doc: fix outdated code sample in n-api.md
code samples of napi_create_object and napi_property_descriptor were
not updated to latest API.

PR-URL: https://github.com/nodejs/node/pull/15581
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-09-26 08:59:27 -07:00
Tobias Nießen
f98687db4a
doc,test: minor improvements to O_DSYNC
PR-URL: https://github.com/nodejs/node/pull/15547
Refs: https://github.com/nodejs/node/pull/15451
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2017-09-26 16:19:15 +02:00
Andreas Madsen
3a69ef55e0
async_hooks: consistent internal naming
PR-URL: https://github.com/nodejs/node/pull/15569
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-09-26 15:50:10 +02:00
Bryan English
f9e5709ea0 doc: ctc -> tsc in onboarding extras
PR-URL: https://github.com/nodejs/node/pull/15621
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Khaidi Chu <i@2333.moe>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2017-09-26 10:46:29 +02:00
Bryan English
882e811c88 doc: ctc -> tsc in collab guide
PR-URL: https://github.com/nodejs/node/pull/15590
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2017-09-25 16:46:19 -07:00
Łukasz Szewczak
7e382c1540 docs: clarify usage cli options -e,-p on windows
PR-URL: https://github.com/nodejs/node/pull/15568
Fixes: https://github.com/nodejs/node/issues/15522
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-09-25 13:51:47 -07:00
Anatoli Papirovski
c705f1067c http2: fix compat stream read handling, add tests
Handle edge case where stream pause is called between resume being
called and actually evaluated. Other minor adjustments to avoid
various edge cases around stream events. Add new tests that cover
all changes.

Fixes: https://github.com/nodejs/node/issues/15491
PR-URL: https://github.com/nodejs/node/pull/15503
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-09-25 13:25:35 -07:00
Vse Mozhet Byt
ebc58d7a22 doc: remove invalid hash in link
Sections in the https://tools.ietf.org/html/rfc1122 are not linkable
anymore. Replace the possibly confusing hash with the explicit
section number in the text.

PR-URL: https://github.com/nodejs/node/pull/15542
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2017-09-25 23:08:14 +03:00
Daniel Bevenius
4f4d55d10e src: correct typo in trace_event header
PR-URL: https://github.com/nodejs/node/pull/15583
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-09-25 20:00:16 +02:00
Benjamin Coe
456d8e21ea
url: fix windows drive letter handling
Address issue with Windows drive letter handling that was
causing es-module test suite to fail.

PR-URL: https://github.com/nodejs/node/pull/15490
Ref: https://github.com/whatwg/url/pull/343
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2017-09-24 14:12:56 -03:00
Anatoli Papirovski
d8a226673b
test: expand http2 util test coverage for headers
Expand existing test cases to hit some additional branches of
toHeaderObject and mapToHeaders.

PR-URL: https://github.com/nodejs/node/pull/15493
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2017-09-24 14:10:44 -03:00
atvoicu
d9cc105102
test: update test-fs-fsync to run from temp
We copy the "a.js" file fixture to a temp directory and then we open
it with write access. This makes sure we are only writing to the
provided temp-dir and not in the fixture dir.

PR-URL: https://github.com/nodejs/node/pull/15537
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2017-09-24 13:41:21 -03:00
Mike Kaufman
6faede7eb4
test: fixing AliasedBuffer tests to enter Isolate
AliasedBuffer tests weren't creating an v8::Isolate::Scope, and this
had negative impact on the node-chakracore branch, where expectation
is an Isoalte has been Enter()'d before being used.

PR-URL: https://github.com/nodejs/node/pull/15536
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-09-24 13:35:58 -03:00
Thomas Corbière
3d7f7b2a0c
src: add --pending-deprecation to NODE_OPTIONS
PR-URL: https://github.com/nodejs/node/pull/15494
Fixes: https://github.com/nodejs/node/issues/15484
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2017-09-24 13:33:35 -03:00
Rich Trott
55d49eb3cc
errors: replace .split() with .replace()
Replace a somewhat idiosyncratic use of `split()` to remove a prefix
with `replace()`. (A case could be made for `slice()` as well but I
think this is more readable.)

PR-URL: https://github.com/nodejs/node/pull/15545
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2017-09-24 13:02:47 -03:00
Rich Trott
cef6e1c55f
errors: refactor invalidArgType()
`invalidArgType()` uses `includes()` in two places where `startsWith()`
and `endsWith()` are more appropriate (at least in my opinion). Switch
to those more specific functions.

PR-URL: https://github.com/nodejs/node/pull/15544
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2017-09-24 13:00:14 -03:00
Anatoli Papirovski
33760ccc18
http2: remove unused onTimeout, add timeout tests
Remove unused onTimeout on Http2Session and Http2Stream because
the correct _onTimeout is already declared and in use. Expand
timeout tests to handle edge cases and additional arguments.

PR-URL: https://github.com/nodejs/node/pull/15539
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2017-09-24 12:57:35 -03:00
Nikolai Vavilov
b2eb98721e
build: use generic names for linting tasks
"jslint" is the name of a tool that actually is not used, which can
cause confusion.

PR-URL: https://github.com/nodejs/node/pull/15272
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
2017-09-24 12:31:52 -03:00
Ben Noordhuis
3c777bb37f
deps: define BUILDING_NGHTTP2 during nghttp2 build
Define BUILDING_NGHTTP2 in order that NGHTTP2_EXTERN is properly defined
when building the nghttp2 static library.

Move NGHTTP2_STATICLIB out of node.gyp because it is a property of the
nghttp2 static library, not the node executable.

PR-URL: https://github.com/nodejs/node/pull/15487
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-09-24 12:17:03 -03:00
Sampson Gao
a406a32ee9 n-api: fix warning about size_t compare with int
PR-URL: https://github.com/nodejs/node/pull/15508
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2017-09-24 10:47:27 -04:00
Anna Henningsen
3f071fa28a
src: remove unused constant from node_perf.h
PR-URL: https://github.com/nodejs/node/pull/15548
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2017-09-24 11:36:58 -03:00
Ali Ijaz Sheikh
322fdc72c3
deps: v8: fix potential segfault in profiler
This change fixes a potential segfault in the sampling heap profiler.
This landed as part of a larger change upstream [1]. This is the minimal
backport that avoids the segfault.

[1]: https://git.io/vdTYL

PR-URL: https://github.com/nodejs/node/pull/15498
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-09-24 11:30:19 -03:00
James M Snell
193926ecab
tls,doc: fix unallocated deprecation code
Deprecation was landed using `DEP00XX` instead of a properly
allocated deprecation code.

PR-URL: https://github.com/nodejs/node/pull/15534
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2017-09-24 11:28:17 -03:00
Anna Henningsen
150b8f7fda
src: minor c++ refactors to module_wrap
- Move `module_map` to `Environment` instead of having it be global
  state
- `std::map` → `std::unordered_map`
- Remove one level of indirection for the map values
- Clean up empty vectors in `module_map`
- Call `Reset()` on all persistent handles in `resolve_cache_`
- Add a missing `HandleScope` to `ModuleWrap::~ModuleWrap()`

PR-URL: https://github.com/nodejs/node/pull/15515
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Bradley Farias <bradley.meck@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
2017-09-23 16:57:35 +02:00
Anna Henningsen
b605b15346
async_hooks: support promise resolve hook
Add a `promiseResolve()` hook.

PR-URL: https://github.com/nodejs/node/pull/15296
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-09-23 15:52:03 +02:00
Claudio Rodriguez
7a953929fe
test: improve readline test coverage for tty
Adds the following tests for tty readline:
- go to beginning and end of line
- wordLeft
- wordRight
- deleteWordLeft
- deleteWordRight

PR-URL: https://github.com/nodejs/node/pull/12064
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-09-22 21:48:44 -03:00
Jackson Tian
9d7574eef5
module: deprecate Module._debug
The _debug of Module is undocumented and it useless here.

PR-URL: https://github.com/nodejs/node/pull/13948
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2017-09-22 21:03:29 -03:00
Bryan English
6f1caadb85 tls: prefer path over port in connect
Makes tls.connect() behave as documented, preferring options.path over
options.port. This makes it consistent with net.connect(), so the
included test demonstrates that both behave in this way.

Also, for consistency, noting the precedence of options.path in net
doc.

PR-URL: https://github.com/nodejs/node/pull/14564
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2017-09-22 16:30:24 -07:00