summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-01-17doc: suggest not to throw JS errors from C++Joyee Cheung
Also provide an example on how to use internal/errors to handle errors in C++. PR-URL: https://github.com/nodejs/node/pull/18149 Refs: https://github.com/nodejs/node/issues/18106 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: Weijia Wang <starkwang@126.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.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>
2018-01-17fs: migrate ASYNC_CALL to AsyncCallJoyee Cheung
This patch migrates all the `ASYNC_CALL` macro in `node_file.cc` to the template counterpart AsyncCall. Also goes with a different style of wrapping the arguments so it's clearer to see what arguments are passed to which `uv_fs_*` functions. PR-URL: https://github.com/nodejs/node/pull/18144 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-01-17build: remove bench-* targetsJoyee Cheung
PR-URL: https://github.com/nodejs/node/pull/18150 Fixes: https://github.com/nodejs/node/issues/17053 Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-01-17tls: migrate C++ errors to internal/errors.jsJoyee Cheung
* Throw ERR_TLS_SNI_FROM_SERVER when setting server names on a server-side socket instead of returning silently * Assert on wrap_->started and wrap_->ssl instead of throwing errors since these errors indicate that the user either uses private APIs, or monkey-patches internals, or hits a bug. PR-URL: https://github.com/nodejs/node/pull/18125 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-01-17tls: migrate argument type-checking errorsJoyee Cheung
* Throw ERR_INVALID_ARG_TYPE from public APIs * Assert argument types in bindings instead of throwing errors PR-URL: https://github.com/nodejs/node/pull/18125 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-01-16doc: napi: make header style consistentAli Ijaz Sheikh
Some of the API section headers had emphasis, while others did not. Use a consistent style (no emphasis) for all of them, as that matches our other API docs. PR-URL: https://github.com/nodejs/node/pull/18122 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Kyle Farnung <kfarnung@microsoft.com> Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2018-01-16doc: napi: fix unbalanced emphasisAli Ijaz Sheikh
Some of the section headers had unbalanced emphasis. PR-URL: https://github.com/nodejs/node/pull/18122 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Kyle Farnung <kfarnung@microsoft.com> Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2018-01-16src: fix code coverage cleanupMichael Dawson
In https://github.com/nodejs/node/pull/17987 which updated the location of the code coverage patches I missed a few changes needed to properly clean up for code coverage. Add these. PR-URL: https://github.com/nodejs/node/pull/18081 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-01-16util: change %o depth defaultRuben Bridgewater
Since the default for depth is changed to `Infinity` it is logical to change the %o default to the same as well. Using %o with `util.format` will now always print the whole object. PR-URL: https://github.com/nodejs/node/pull/17907 Refs: https://github.com/nodejs/node/issues/12693 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
2018-01-16util: change util.inspect depth defaultRuben Bridgewater
The current default is not ideal in most use cases. Therefore it is changed to showing unlimited depth in case util.inspect is called directly. The default is kept as before for console.log and similar. Using console.dir will now show a depth of up to five and console.assert / console.trace will show a unlimited depth. PR-URL: https://github.com/nodejs/node/pull/17907 Refs: https://github.com/nodejs/node/issues/12693 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
2018-01-16stream: add custom inspect to BufferListRuben Bridgewater
Currently inspecting the BufferList can result a maximum call stack size error. Adding a individual inspect function prevents this. PR-URL: https://github.com/nodejs/node/pull/17907 Refs: https://github.com/nodejs/node/issues/12693 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
2018-01-15module: refactor loaderGus Caplan
PR-URL: https://github.com/nodejs/node/pull/16874 Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: Bradley Farias <bradley.meck@gmail.com>
2018-01-15child_process: ignore undef/proto values of env现充
At present, undefined values of env option will be transferred as a "undefined" string value, and values in prototype will also be included, which are not usual behaviors. This commit prevents those to be transferred to the environment of the child process. PR-URL: https://github.com/nodejs/node/pull/15089 Fixes: https://github.com/nodejs/node/issues/15087 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michaël Zasso <targos@protonmail.com>
2018-01-14crypto: assign deprecation code for setAuthTag/GCMTobias Nießen
PR-URL: https://github.com/nodejs/node/pull/18017 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
2018-01-14async_hooks,test: only use IPv6 in http testAndreas Madsen
If IPv6 is not supported on a machine, the IPv6 handle will first be created, this will then fail and default to an IPv4 handle. This causes the graph to change, as there now is an extra handle. PR-URL: https://github.com/nodejs/node/pull/18143 Fixes: https://github.com/nodejs/node/issues/18003 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-01-14test: fix flaky interval testAnatoli Papirovski
PR-URL: https://github.com/nodejs/node/pull/18140 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2018-01-14src: remove declarations for missing functionsAnna Henningsen
PR-URL: https://github.com/nodejs/node/pull/18134 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
2018-01-14src: harden JSStream callbacksAnna Henningsen
Since these are executing JS code, and in particular parts of that code may be provided by userland, handle such exceptions in C++. Refs: https://github.com/nodejs/node/pull/17938#issuecomment-354683850 PR-URL: https://github.com/nodejs/node/pull/18028 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
2018-01-14tls: make deprecated tls.createSecurePair() use public APIAnna Henningsen
Make the deprecated `tls.createSecurePair()` method use other public APIs only (`TLSSocket` in particular). Since `tls.createSecurePair()` has been runtime-deprecated only since Node 8, it probably isn’t quite time to remove it yet, but this patch removes almost all of the code complexity that is retained by it. The API, as it is documented, is retained. However, it is very likely that some users have come to rely on parts of undocumented API of the `SecurePair` class, especially since some of the existing tests checked for those. Therefore, this should definitely be considered a breaking change. PR-URL: https://github.com/nodejs/node/pull/17882 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Minwoo Jung <minwoo@nodesource.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
2018-01-14src: use `DoTryWrite()` for not-all-Buffer writev()s tooAnna Henningsen
PR-URL: https://github.com/nodejs/node/pull/18019 Reviewed-By: James M Snell <jasnell@gmail.com>
2018-01-14src: remove `HasWriteQueue()`Anna Henningsen
Tests are passing without it, and this otherwise makes the code harder to reason about because the `async` flag on the write request object would not be set even though the callback would still be pending. PR-URL: https://github.com/nodejs/node/pull/18019 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-01-14process: use more direct sync I/O for stdioAnna Henningsen
This avoids routing writes through the full LibuvStreamWrap write machinery. In particular, it enables the next commit, because otherwise the callback passed to `_write()` would not be called synchronously for pipes on Windows (because the latter does not support `uv_try_write()`, even for blocking I/O). PR-URL: https://github.com/nodejs/node/pull/18019 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-01-13test: add common.crashOnUnhandledRejection to addons/callback-scopeSho Miyamoto
PR-URL: https://github.com/nodejs/node/pull/18076 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
2018-01-13deps: cherry-pick 0c35b72 from upstream V8Gus Caplan
Original commit message: [api,modules] Allow GetModuleNamespace on unevaluated modules. Bug: v8:7217 Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng Change-Id: I97b067254355eb91e12b92eba92631cbc3ce8000 Reviewed-on: https://chromium-review.googlesource.com/839280 Commit-Queue: Georg Neis <neis@chromium.org> Reviewed-by: Adam Klein <adamk@chromium.org> Cr-Commit-Position: refs/heads/master@{#50395} PR-URL: https://github.com/nodejs/node/pull/18038 Refs: https://github.com/v8/v8/commit/0c35b7252aaeedf4871a78935075808439726853 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
2018-01-13doc: add documentation for deprecation propertiesJon Moss
PR-URL: https://github.com/nodejs/node/pull/16539 Fixes: https://github.com/nodejs/node/issues/16394 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-01-12timers: setInterval interval includes cb durationzhangzifa
setInterval callback should be scheduled on the interval Fixes: https://github.com/nodejs/node/issues/7346 PR-URL: https://github.com/nodejs/node/pull/14815 Fixes: https://github.com/nodejs/node/issues/7346 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2018-01-12doc: prefer make test-only when verifying the buildJoyee Cheung
PR-URL: https://github.com/nodejs/node/pull/18061 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Khaidi Chu <i@2333.moe> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
2018-01-12doc: add Leko to collaboratorsLeko
PR-URL: https://github.com/nodejs/node/pull/18117 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2018-01-12async_hooks,http: set HTTPParser trigger to socketAndreas Madsen
This allows more easy tracking of where HTTP requests come from. Before this change the HTTPParser would have the HTTPServer as the triggerAsyncId. The HTTPParser will still have the executionAsyncId set to the HTTP Server so that information is still directly available. Indirectly, the TCP socket itself also has its triggerAsyncId set to the TCP Server. PR-URL: https://github.com/nodejs/node/pull/18003 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
2018-01-12doc: capitalize non-primitive typesVse Mozhet Byt
PR-URL: https://github.com/nodejs/node/pull/18111 Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-01-12doc: decapitalize primitive typesVse Mozhet Byt
PR-URL: https://github.com/nodejs/node/pull/18110 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-01-11n-api: expose n-api version in process.versionsMichael Dawson
Expose n-api version in process.versions so that it is available for use in javascript by external modules like node-pre-gyp. It was previously accessible through a functon available in the N-API. PR-URL: https://github.com/nodejs/node/pull/18067 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Minwoo Jung <minwoo@nodesource.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Tobias Nießn <tniessen@tnie.de> Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2018-01-11build,win: restore vcbuild TAG functionalityRod Vagg
--tag needs to be set after `getnodeversion` because TAG is defined in there when DISTTYPE is not "release", setting it before `getnodeversion` leads to --tag not being passed down in to `configure` and src/node_version.h setting it as `-pre` by default. This change restores the functionality that properly sets the TAG for nightlies, rc builds and other custom build types. Ref: https://github.com/nodejs/node/pull/17299 Ref: https://github.com/nodejs/abi-stable-node/issues/289 PR-URL: https://github.com/nodejs/node/pull/18031 Ref: https://github.com/nodejs/node/pull/17299 Ref: https://github.com/nodejs/abi-stable-node/issues/289 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: JoãReis <reis@janeasystems.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Kyle Farnung <kfarnung@microsoft.com>
2018-01-11http2: remember sent headersJames M Snell
Add sentHeaders, sentTrailers, and sentInfoHeaders properties on `Http2Stream`. PR-URL: https://github.com/nodejs/node/pull/18045 Fixes: https://github.com/nodejs/node/issues/16619 Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2018-01-11perf_hooks,http2: add performance.clear()James M Snell
Add missing clear() method to `perf_hooks.performance` to remove the entries from the master timeline to prevent that from being a memory leak. PR-URL: https://github.com/nodejs/node/pull/18046 Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2018-01-11doc: fix s/rstStream/close in exampleJames M Snell
PR-URL: https://github.com/nodejs/node/pull/18088 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
2018-01-11doc: update pushStream docs to use err firstJames M Snell
Refs: https://github.com/nodejs/node/pull/17406#issuecomment-356661798 PR-URL: https://github.com/nodejs/node/pull/18088 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
2018-01-11test: remove orphaned entries from statusKyle Farnung
PR-URL: https://github.com/nodejs/node/pull/18092 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
2018-01-11doc: be less tentative about undefined behaviorRich Trott
In the documentation for the buffer module, change instances of "the result is considered undefined behavior" to "the resulting behavior is undefined". It's less ambiguous in meaning and less awkward stylistically. PR-URL: https://github.com/nodejs/node/pull/18091 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Minwoo Jung <minwoo@nodesource.com> Reviewed-By: Khaidi Chu <i@2333.moe> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2018-01-11http2: fix kUpdateTimer timer refreshJeremiah Senkpiel
Fixes an oversight from 93eb68e6d23c66b85e8f79540500d5d9f0bbc396 Wasn't caught by a test. PR-URL: https://github.com/nodejs/node/pull/18062 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-01-11lib: fix spelling in commentsTobias Nießen
PR-URL: https://github.com/nodejs/node/pull/18018 Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Weijia Wang <starkwang@126.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
2018-01-11test: fix spelling in test case commentsTobias Nießen
PR-URL: https://github.com/nodejs/node/pull/18018 Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Weijia Wang <starkwang@126.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
2018-01-11stream: added experimental support for for-awaitMatteo Collina
Adds support for Symbol.asyncIterator into the Readable class. The stream is destroyed when the loop terminates with break or throw. Fixes: https://github.com/nodejs/node/issues/15709 PR-URL: https://github.com/nodejs/node/pull/17755 Fixes: https://github.com/nodejs/node/issues/15709 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
2018-01-11tools: use babel-eslint as ESLint parserMichaël Zasso
PR-URL: https://github.com/nodejs/node/pull/17820 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2018-01-11tools: add babel-eslintMichaël Zasso
Create tools/update-babel-eslint.sh script and execute it to do the first installation of the package. Update tools/license-builder.sh and execute it to add babel-eslint's license to our LICENSE file. PR-URL: https://github.com/nodejs/node/pull/17820 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2018-01-11tools: update ESLint to 4.15.0Michaël Zasso
PR-URL: https://github.com/nodejs/node/pull/17820 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2018-01-11tools: move eslint from tools to tools/node_modulesMichaël Zasso
This is required because we need to add the babel-eslint dependency and it has to be able to resolve "eslint". babel-eslint is required to support future ES features such as async iterators and import.meta. Refs: https://github.com/nodejs/node/pull/17755 PR-URL: https://github.com/nodejs/node/pull/17820 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2018-01-11build: fix Makefile wrt finding node executableYang Guo
Not all shells set PWD, so use CURDIR instead. `which node` may return the empty string, so guard against that too. Consider: if [ -x `which velociraptor` ] && [ -e `which velociprator` ];\ then echo "run"; else echo "keep calm"; fi; PR-URL: https://github.com/nodejs/node/pull/18040 Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2018-01-11path: fix path.normalize for relative pathsWeijia Wang
After slicing, the `lastSegmentLength` should be calculated again, instead of assigning value `j`. PR-URL: https://github.com/nodejs/node/pull/17974 Fixes: https://github.com/nodejs/node/issues/17928 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
2018-01-11fs: extract out validateUint32 and validateLen functionsJon Moss
PR-URL: https://github.com/nodejs/node/pull/17682 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>