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

23997 Commits

Author SHA1 Message Date
Daniel Bevenius
59c7df4a10 test: fix compiler warning in doc/api/addons.md
Currently there are compiler warnings is emitted:
../addon.cc:17:58:
warning: 'ToString' is deprecated:
Use maybe version [-Wdeprecated-declarations]
obj->Set(String::NewFromUtf8(isolate, "msg"),
                             args[0]->ToString(isolate));
                                                         ^
deps/v8/include/v8.h:2537:3:
note: 'ToString' has been explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version",
  ^

This commit updates examples to use the non-deprecated versions.

PR-URL: https://github.com/nodejs/node/pull/23323
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2018-10-11 05:18:11 +02:00
Rich Trott
09a8ff3fd6 doc: edit for minor fixes to prcoess.md
Remove use of personal pronoun _you_ from formal documentation for
`process`. Fix up grammar in nearby text.

PR-URL: https://github.com/nodejs/node/pull/23347
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
2018-10-10 20:11:27 -07:00
Rich Trott
623206c2d6 doc: remove personal pronoun from worker_threads
Per the Style Guide, remove the use of the personal pronoun _you_ from
the formal API documentation for `worker_threads`.

PR-URL: https://github.com/nodejs/node/pull/23347
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
2018-10-10 20:11:25 -07:00
Rich Trott
b32d067839 doc: remove personal pronoun from domain.md
Per the Style Guide, remove the use of the personal pronoun _you_ from
the formal API documentation for `domain`.

PR-URL: https://github.com/nodejs/node/pull/23347
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
2018-10-10 20:11:24 -07:00
Rich Trott
120442a00b doc: remove style instruction that is not followed
Remove style guide instruction to place punctuation inside parentehses
and quotation marks. Those are not universally correct and we do not
follow those rules in cases where they are not correct.

PR-URL: https://github.com/nodejs/node/pull/23346
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
2018-10-10 20:09:49 -07:00
Rich Trott
6330830800 test: add WPT console-tests-historical
Add WPT console-tests-historical to the test suite.

PR-URL: https://github.com/nodejs/node/pull/23340
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-10-10 15:07:52 -07:00
Rich Trott
8a0cc7afc3 test: separate WPT console test from other test
Remove one test from test-whatwg-console-is-a-namespace that is not part
of the WPT test. Put it in test-console-self-assign.

PR-URL: https://github.com/nodejs/node/pull/23340
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-10-10 15:07:50 -07:00
Rich Trott
39490798ba test: add WPT console-label-conversion test
Add console-label-conversion.any.js from WPT to the test suite.

PR-URL: https://github.com/nodejs/node/pull/23340
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-10-10 15:07:48 -07:00
Rich Trott
b3980c76e4 test: rename WPT console test
test-console-is-a-namespace.js is a WPT Console test. It is the only
WPT Console test file that we have that doesn't start with
`test-whatwg-`. Rename it to test-whatwg-console-is-a-namespace.js
so that WPT tests can be found relatively easily. Just as it is useful
to separate the WPT URL tests from our URL tests, it will likely be
useful to separate our Console tests from WPT Console tests if we add
more WPT Console tests (which I hope we do).

PR-URL: https://github.com/nodejs/node/pull/23340
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-10-10 15:07:46 -07:00
Michaël Zasso
cd8ee2d033
2018-10-10, Version 10.12.0 (Current)
Notable changes:

* assert
  * The diff output is now a tiny bit improved by sorting object
    properties when inspecting the values that are compared with each
    other. https://github.com/nodejs/node/pull/22788
* cli
  * The options parser now normalizes `_` to `-` in all multi-word
    command-line flags, e.g. `--no_warnings` has the same effect as
    `--no-warnings`. https://github.com/nodejs/node/pull/23020
  * Added bash completion for the `node` binary. To generate a bash
    completion script, run `node --completion-bash`. The output can be
    saved to a file which can be sourced to enable completion.
    https://github.com/nodejs/node/pull/20713
* crypto
  * Added support for PEM-level encryption.
    https://github.com/nodejs/node/pull/23151
  * Added an API asymmetric key pair generation. The new methods
    `crypto.generateKeyPair` and `crypto.generateKeyPairSync` can be
    used to generate public and private key pairs. The API supports
    RSA, DSA and EC and a variety of key encodings (both PEM and DER).
    https://github.com/nodejs/node/pull/22660
* fs
  * Added a `recursive` option to `fs.mkdir` and `fs.mkdirSync`. If
    this option is set to true, non-existing parent folders will be
    automatically created. https://github.com/nodejs/node/pull/21875
* http2
  * Added a `'ping'` event to `Http2Session` that is emitted whenever a
    non-ack `PING` is received.
    https://github.com/nodejs/node/pull/23009
  * Added support for the `ORIGIN` frame.
    https://github.com/nodejs/node/pull/22956
  * Updated nghttp2 to 1.34.0. This adds RFC 8441 extended connect
    protocol support to allow use of WebSockets over HTTP/2.
    https://github.com/nodejs/node/pull/23284
* module
  * Added `module.createRequireFromPath(filename)`. This new method can
    be used to create a custom require function that will resolve
    modules relative to the filename path.
    https://github.com/nodejs/node/pull/19360
* process
  * Added a `'multipleResolves'` process event that is emitted whenever
    a `Promise` is attempted to be resolved multiple times, e.g. if the
    `resolve` and `reject` functions are both called in a `Promise`
    executor. https://github.com/nodejs/node/pull/22218
* url
  * Added `url.fileURLToPath(url)` and `url.pathToFileURL(path)`. These
    methods can be used to correctly convert between file: URLs and
    absolute paths. https://github.com/nodejs/node/pull/22506
* util
  * Added the `sorted` option to `util.inspect()`. If set to `true`,
    all properties of an object and Set and Map entries will be sorted
    in the returned string. If set to a function, it is used as a
    compare function. https://github.com/nodejs/node/pull/22788
  * The `util.instpect.custom` symbol is now defined in the global
    symbol registry as `Symbol.for('nodejs.util.inspect.custom')`.
    https://github.com/nodejs/node/pull/20857
  * Added support for `BigInt` numbers in `util.format()`.
    https://github.com/nodejs/node/pull/22097
* V8 API
  * A number of V8 C++ APIs have been marked as deprecated since they
    have been removed in the upstream repository. Replacement APIs
    are added where necessary. https://github.com/nodejs/node/pull/23159
* Windows
  * The Windows msi installer now provides an option to automatically
    install the tools required to build native modules.
    https://github.com/nodejs/node/pull/22645
* Workers
  * Debugging support for Workers using the DevTools protocol has been
    implemented. https://github.com/nodejs/node/pull/21364
  * The public `inspector` module is now enabled in Workers.
    https://github.com/nodejs/node/pull/22769
* Added new collaborators:
  * digitalinfinity - Hitesh Kanwathirtha

PR-URL: https://github.com/nodejs/node/pull/23313
2018-10-10 23:18:55 +02:00
Steven
487020ee60 doc: add WebAssembly to globals
PR-URL: https://github.com/nodejs/node/pull/23339
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2018-10-10 14:02:35 -07:00
Refael Ackermann
484e4db46d build: restore js2c direct dependency on config.gypi
PR-URL: https://github.com/nodejs/node/pull/23355
Fixes: https://github.com/nodejs/node/issues/23352
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
2018-10-10 10:43:19 -04:00
cjihrig
20de5f3fa2
src: fix ToObject() usage in node_http_parser.cc
PR-URL: https://github.com/nodejs/node/pull/23314
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2018-10-10 10:32:05 -04:00
cjihrig
59d2bd9fb5
src: fix ToObject() usage in exceptions.cc
PR-URL: https://github.com/nodejs/node/pull/23314
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2018-10-10 10:31:50 -04:00
Masashi Hirano
a8530bc4e0 test: error when empty buffer is passed to filehandle.read()
Added tests to occur error when empty buffer is passed to
filehandle.read() to increase coverage.

PR-URL: https://github.com/nodejs/node/pull/23250
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-10-10 13:50:30 +02:00
John-David Dalton
b6dcf8c012 Revert "module: fix inconsistency between load and _findPath"
This reverts commit 1b92214
from PR #22382.

See the discussion at
https://github.com/nodejs/citgm/issues/604

PR-URL: https://github.com/nodejs/node/pull/23228
Refs: https://github.com/nodejs/node/pull/22382
Fixes: https://github.com/nodejs/node/issues/4778
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2018-10-10 11:07:38 +02:00
Bastian Krol
eb9748d222 async_hooks: add missing async_hooks destroys in AsyncReset
This adds missing async_hooks destroy calls for sockets (in
_http_agent.js) and HTTP parsers. We need to emit a destroy in
AsyncWrap#AsyncReset before assigning a new async_id when the instance
has already been in use and is being recycled, because in that case, we
have already emitted an init for the "old" async_id.

This also removes a duplicated init call for HTTP parser: Each time a
new parser was created, AsyncReset was being called via the C++ Parser
class constructor (super constructor AsyncWrap) and also via
Parser::Reinitialize.

PR-URL: https://github.com/nodejs/node/pull/23272
Fixes: https://github.com/nodejs/node/issues/19859
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-10-10 08:45:56 +02:00
Jackson Tian
45c70b0ce7 net: use connect() instead of connect.call()
Use socket.connect() directly.

PR-URL: https://github.com/nodejs/node/pull/23289
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Thomas Watson <w@tson.dk>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-10-10 08:38:53 +02:00
Michaël Zasso
d2de8291fb deps: patch V8 to 7.0.276.25
PR-URL: https://github.com/nodejs/node/pull/23290
Refs: https://github.com/v8/v8/compare/7.0.276.24...7.0.276.25
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-10-10 08:27:31 +02:00
Rich Trott
3e809e7de1 doc: simplify and clarify README language
Continued simplification and clarification of language in README.md.

PR-URL: https://github.com/nodejs/node/pull/23322
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
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: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
2018-10-09 22:31:12 -07:00
Rich Trott
a1edecca3b tools: make Travis commit linting more robust
Use $TRAVIS_COMMIT_RANGE in .travis.yml to avoid merge commits in some
situations.

Refs: https://github.com/nodejs/node/pull/23307#issuecomment-428435859

PR-URL: https://github.com/nodejs/node/pull/23397
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
2018-10-09 22:18:36 -07:00
Rich Trott
eddfa2c52e doc: simplify governance info in README intro
Remove unnecessary wordiness in the governance sentence. It appears very
early in the README so it should be short and clear. This also removes
an instance of passive voice.

PR-URL: https://github.com/nodejs/node/pull/23320
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-10-09 17:00:00 -07:00
Masashi Hirano
d71dd97263
util: support BigInt in util.format
`util.format` and `console.log` now support BigInt via the existing
format specifiers `%i` and `%d`.

PR-URL: https://github.com/nodejs/node/pull/22097
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-10-09 20:11:48 +02:00
Julien Gilli
186ce7e837 test: remove obsolete domain test
test-microtask-queue-run-domain.js tests that the behavior of another
test, test-microtask-queue-run.js, is still consistent when the core
domain module is loaded.

This was needed because before the changes in #16222 were merged, the
core domain module would replace the function that would call nextTick
callbacks with a different implementation.

This is no longer the case, and therefore that test is no longer needed.

PR-URL: https://github.com/nodejs/node/pull/23343
Reviewed-By: Vladimir de Turckheim <vlad2t@hotmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-10-09 09:38:32 -07:00
Julien Gilli
a3e604e9a3 test: remove obsolete domain test
test-microtask-queue-integration-domain.js tests that the behavior of
another test, test-microtask-queue-integration.js, is still
consistent when the core domain module is loaded.

This was needed because before the changes in #16222 were merged, the
core domain module would replace the function that would call nextTick
callbacks with a different implementation.

This is no longer the case, and therefore that test is no longer needed.

PR-URL: https://github.com/nodejs/node/pull/23342
Reviewed-By: Vladimir de Turckheim <vlad2t@hotmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-10-09 09:36:08 -07:00
cjihrig
c65a523597 deps: upgrade to libuv 1.23.2
PR-URL: https://github.com/nodejs/node/pull/23336
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Fixes: https://github.com/nodejs/node/issues/23043
Fixes: https://github.com/nodejs/node/issues/21773
Fixes: https://github.com/nodejs/node/issues/16601
Fixes: https://github.com/nodejs/node/issues/22999
Fixes: https://github.com/nodejs/node/issues/23219
Fixes: https://github.com/nodejs/node/issues/23066
Fixes: https://github.com/nodejs/node/issues/23067
Fixes: https://github.com/nodejs/node/issues/23089
2018-10-09 06:55:34 -07:00
Brandon Smith
13340d47fc benchmark,doc,lib,src,test,tools: fix typos
PR-URL: https://github.com/nodejs/node/pull/23302
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2018-10-09 16:53:12 +03:00
Rich Trott
4d58c08865 assert: remove internal errorCache property
The internal assert module exposed an errorCache property solely for
testing. It is no longer necessary. Remove it.

PR-URL: https://github.com/nodejs/node/pull/23304
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2018-10-09 06:39:46 -07:00
Rich Trott
1f94b85069 test: remove internal errorCache property
The internal `assert` modules `errorCache` property is exposed only for
testing. The one test that used it is rewritten here to not use it.

This has the following advantages:

* The test now makes sure that there is an empty cache in a more robust
  way. Instead of relying on the internal implementation of
  `errorCache`, it simply spawns a separate process.
* One less test using the `--expose-internals` flag.

PR-URL: https://github.com/nodejs/node/pull/23304
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2018-10-09 06:39:44 -07:00
Gabriel Schulhof
157d507d64 doc: add link to ABI guide
Provides a link from the N-API reference to the guide discussing ABI
stability in greater depth.

Re: https://github.com/nodejs/abi-stable-node/issues/332
PR-URL: https://github.com/nodejs/node/pull/23287/
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
2018-10-09 09:21:05 -04:00
cjihrig
f7bfbb8136
src: reduce variable scope in stream_base.cc
PR-URL: https://github.com/nodejs/node/pull/23297
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-10-09 08:33:38 -04:00
cjihrig
7ee8323725
src: reduce variable scope in node_worker.cc
PR-URL: https://github.com/nodejs/node/pull/23297
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-10-09 08:33:33 -04:00
cjihrig
2c7409f3b8
src: reduce variable scope in node_trace_writer.cc
PR-URL: https://github.com/nodejs/node/pull/23297
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-10-09 08:33:28 -04:00
cjihrig
e649ba9ad6
src: reduce variable scope in node_url.cc
PR-URL: https://github.com/nodejs/node/pull/23297
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-10-09 08:33:23 -04:00
cjihrig
78b4369f09
src: remove unneeded variables in node_crypto.cc
PR-URL: https://github.com/nodejs/node/pull/23297
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-10-09 08:33:15 -04:00
cjihrig
2c5195a81c
src: reduce variable scope in module_wrap.cc
PR-URL: https://github.com/nodejs/node/pull/23297
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-10-09 08:32:58 -04:00
cjihrig
8ea20b7f42
src: reduce variable scope in cares_wrap.cc
PR-URL: https://github.com/nodejs/node/pull/23297
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-10-09 08:32:48 -04:00
cjihrig
2ec57a7134
buffer: unconditionally use internalBinding
With the removal of test-buffer-bindingobj-no-zerofill.js,
internalBinding can be used unconditionally to assign
isAnyArrayBuffer().

PR-URL: https://github.com/nodejs/node/pull/23234
Refs: https://github.com/nodejs/node/issues/22160
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
2018-10-08 23:43:00 -04:00
cjihrig
2498c7b18b
icu: make process.binding('icu') internal
PR-URL: https://github.com/nodejs/node/pull/23234
Refs: https://github.com/nodejs/node/issues/22160
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
2018-10-08 23:42:52 -04:00
Weijia Wang
9930529805
test: remove test-buffer-bindingobj-no-zerofill.js
PR-URL: https://github.com/nodejs/node/pull/23234
Refs: https://github.com/nodejs/node/issues/22160
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-10-08 23:42:06 -04:00
Rich Trott
c9d9ddcbc9 doc: fix minor typo in streams.md
It appears that a `to` was left out in one sentence of the streams.md
doc. Add it.

PR-URL: https://github.com/nodejs/node/pull/23306
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-10-08 20:25:32 -07:00
Rich Trott
afb4914bf2 doc: standardize versions in stream module doc
Refer to Node.js versions without a prepended `v`. This was standardized
on previously to avoid confusion between Node.js 8 and the V8 JavaScript
engine. (`Node.js 8` is clear. `v8` or even `Node.js v8`, not so much.)

PR-URL: https://github.com/nodejs/node/pull/23306
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-10-08 20:25:30 -07:00
Gus Caplan
8bce9e8f19
streams: refactor ReadableStream asyncIterator creation and a few fixes
Closes: https://github.com/nodejs/node/issues/23041

- Rewrite `ReadableAsyncIterator` class into
`ReadableStreamAsyncIteratorPrototype` which contains no constructor and
inherits from `%AsyncIteratorPrototype%`.

- Rewrite `AsyncIteratorRecord` into dumb function.

PR-URL: https://github.com/nodejs/node/pull/23042
Fixes: https://github.com/nodejs/node/issues/23041
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-10-08 22:17:29 -05:00
Anna Henningsen
e688fe6b7e
zlib: simplify flushing mechanism
Previously, flushing on zlib streams was implemented through
stream 'drain' handlers. This has a number of downsides; in
particular, it is complex, and could lead to unpredictable
behaviour, since it meant that in a sequence like

```js
compressor.write('abc');
compressor.flush();
waitForMoreDataAsynchronously(() => {
  compressor.write('def');
});
```

it was not fully deterministic whether the flush happens after
the second chunk is written or the first one.

This commit replaces this mechanism by one that piggy-backs
along the stream’s write queue, using a “special” `Buffer`
instance that signals that a flush is currently due.

PR-URL: https://github.com/nodejs/node/pull/23186
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-10-08 20:06:45 -07:00
Rich Trott
c001ba6575 test: remove eslint-disable from fixtures
Fixture files are not linted. Remove `eslint-disable` comments from
fixture files.

PR-URL: https://github.com/nodejs/node/pull/23345
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
2018-10-08 20:01:07 -07:00
cjihrig
43a1bc30c1
src: fix ToObject() usage in node_crypto.cc
PR-URL: https://github.com/nodejs/node/pull/23298
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-10-08 17:42:21 -04:00
Ben Noordhuis
787cbe9abe test: read() on dir on AIX does not return EISDIR
An upcoming change in libuv will remove the artificial EISDIR error.
Update the test to reflect that.

Refs: https://github.com/libuv/libuv/pull/2025

PR-URL: https://github.com/nodejs/node/pull/23330
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-10-08 13:40:54 -07:00
siddhant
5e63cf29bf doc: add util.inspect() legacy signature
PR-URL: https://github.com/nodejs/node/pull/23216
Fixes: https://github.com/nodejs/node/issues/23205
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-10-08 23:19:09 +03:00
Rich Trott
67130f3ab5 doc: edit building-node text
Simplifying some BUILDING.md and related text since a lot of people will
be reading it soon for Code & Learn. I'd prefer to delete much of this
text, but that risks controversy. These simplifications should be (I
hope) uncontroversial.

PR-URL: https://github.com/nodejs/node/pull/23335
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
2018-10-08 12:35:29 -07:00
James M Snell
0ad8c7319d
http2: add RFC 8441 extended connect protocol support
PR-URL: https://github.com/nodejs/node/pull/23284
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-10-08 08:41:35 -07:00