summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* squashTrott-patch-3Rich Trott2018-01-311-1/+0
|
* doc: streamline README introRich Trott2018-01-311-4/+3
| | | Shorten text that is duplicated from website and supply link.
* url: simplify loop in parserTobias Nießen2018-01-311-1/+1
| | | | | | | | PR-URL: https://github.com/nodejs/node/pull/18468 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
* url: expose the WHATWG URL API globallyMichaël Zasso2018-01-3110-45/+77
| | | | | | | | | | | | | | | | Install URL and URLSearchParams on the global object, like they can be found in browser environments. PR-URL: https://github.com/nodejs/node/pull/18281 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: James M Snell <jasnell@gmail.com>
* src: fix vector subscript out of rangeAnatoli Papirovski2018-01-311-1/+1
| | | | | | | | | PR-URL: https://github.com/nodejs/node/pull/18460 Fixes: https://github.com/nodejs/node/issues/18459 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Nikolai Vavilov <vvnicholas@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Khaidi Chu <i@2333.moe>
* test: fix flaky test-process-fatal-execption-tickRich Trott2018-01-301-2/+1
| | | | | | | | | Use common.busyLoop() which happens to make the test robust. PR-URL: https://github.com/nodejs/node/pull/18461 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
* vm: add modulesGus Caplan2018-01-3016-35/+1281
| | | | | | | | | | Adds vm.Module, which wraps around ModuleWrap to provide an interface for developers to work with modules in a more reflective manner. Co-authored-by: Timothy Gu <timothygu99@gmail.com> PR-URL: https://github.com/nodejs/node/pull/17560 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
* src: factor out some common vm functionsTimothy Gu2018-01-302-225/+233
| | | | | | PR-URL: https://github.com/nodejs/node/pull/17560 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
* src: flatten ContextifyContextGus Caplan2018-01-303-435/+516
| | | | | | | | | Flattens ContextifyContext allows the context interface to be used in other parts of the code base. PR-URL: https://github.com/nodejs/node/pull/17560 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
* deps: V8: resolve remaining whitespace diffMyles Borins2018-01-308-50/+55
| | | | | | | | | | | | | Some whitespace was lost when #17489 landed. While I restored the one file causing the V8-CI to fail, I missed the remaining changes from Myles. This changes restores all whitespace differences with upstream. PR-URL: https://github.com/nodejs/node/pull/18366 Refs: https://github.com/nodejs/node/pull/18360 Reviewed-By: Myles Borins <myles.borins@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
* doc: reorder section on updating PR branchAli Ijaz Sheikh2018-01-301-8/+8
| | | | | | | | | | | | | | It makes more sense to provide instructions on how to update the PR branch before instructions on pushing the commit. PR-URL: https://github.com/nodejs/node/pull/18355 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Jon Moss <me@jonathanmoss.me>
* doc: add pending-deprecation to deprecations listСковорода Никита Андреевич2018-01-311-1/+8
| | | | | | | | | | | | | | | This adds a mention of `--pending-deprecation` flag effect in the Deprecated APIs document, and explicitly labels deprecations that support it. Refs: https://github.com/nodejs/node/issues/18417 PR-URL: https://github.com/nodejs/node/pull/18433 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
* doc: add pending-deprecation to COLLABORATOR_GUIDEСковорода Никита Андреевич2018-01-311-1/+5
| | | | | | | | | | | | | This is described as being a doc-only deprecation subset. Refs: https://github.com/nodejs/node/issues/18417 PR-URL: https://github.com/nodejs/node/pull/18433 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
* doc: fix manpage warningsRoman Reiss2018-01-301-2/+2
| | | | | | | | | Fixes: https://github.com/nodejs/node/issues/18434 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
* doc: warn about GCM authenticityTobias Nießen2018-01-301-0/+9
| | | | | | | PR-URL: https://github.com/nodejs/node/pull/18376 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
* stream: avoid writeAfterEnd() while ending陈刚2018-01-302-1/+25
| | | | | | | | | | | Calling `writable.end()` will probably synchronously call `writable.write()`, in such a situation the `state.ended` is false and `writable.write()` doesn't trigger `writeAfterEnd()`. PR-URL: https://github.com/nodejs/node/pull/18170 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
* stream: simplify `src._readableState` to `state`陈刚2018-01-301-2/+2
| | | | | | | | PR-URL: https://github.com/nodejs/node/pull/18264 Reviewed-By: Weijia Wang <starkwang@126.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
* test: adds tests for vm invalid argumentsGilles De Mey2018-01-301-1/+54
| | | | | | | | PR-URL: https://github.com/nodejs/node/pull/18282 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Weijia Wang <starkwang@126.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
* tools: fix icu readme lint errorAnatoli Papirovski2018-01-291-1/+1
| | | | | | PR-URL: https://github.com/nodejs/node/pull/18445 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
* doc: Update tools/icu/README.mdSteven R. Loomis2018-01-291-27/+34
| | | | | | | | | | | | | - remove TODOs: the one about defaults has been addressed, and the one about testing is a work item that doesn't belong in a doc. - add some background information Fixes: https://github.com/nodejs/node/issues/7843 PR-URL: https://github.com/nodejs/node/pull/16939 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
* doc: add vdeturckheim as collaboratorvdeturckheim2018-01-291-0/+2
| | | | | | | | | PR-URL: https://github.com/nodejs/node/pull/18432 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
* process: JS fast path for bindingsAnatoli Papirovski2018-01-294-78/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, both process.binding and internalBinding have to call into C++ regardless of whether the module has been cached or not. This creates significant overhead to all binding calls and unfortunately the rest of the codebase doesn't really optimize the amount of times that bindings are required (as an example: 12 files require the async_wrap binding). Changing all the usage of this function throughout the codebase would introduce a lot of churn (and is kind of a hassle) so instead this PR introduces a JS fast path for both functions for cases where the binding has already been cached. While micro benchmarks are not super meaningful here (it's not like we call binding that often...), this does speed up the cached call by 400%. In addition, move moduleLoadList creation and management entirely into JS-land as it requires less code and is more efficient. PR-URL: https://github.com/nodejs/node/pull/18365 Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
* domain: further abstract usage in C++Anatoli Papirovski2018-01-2910-90/+72
| | | | | | | | | | | | | | | | Move the majority of C++ domain-related code into JS land by introducing a top level domain callback which handles entering & exiting the domain. Move the rest of the domain necessities into their own file that creates an internal binding, to avoid exposing domain-related code on the process object. Modify an existing test slightly to better test domain-related code. PR-URL: https://github.com/nodejs/node/pull/18291 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
* src: remove outdated domain referenceAnatoli Papirovski2018-01-291-1/+0
| | | | | | | PR-URL: https://github.com/nodejs/node/pull/18291 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
* src: remove unnecessary async hooks checkAnatoli Papirovski2018-01-291-5/+0
| | | | | | | PR-URL: https://github.com/nodejs/node/pull/18291 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
* src: remove unnecessary block scopeAnatoli Papirovski2018-01-291-10/+6
| | | | | | | PR-URL: https://github.com/nodejs/node/pull/18291 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
* stream: add type and range check for highWaterMarkTobias Nießen2018-01-296-31/+70
| | | | | | | | | | | | The (h|readableH|writableH)ighWaterMark options should only permit positive numbers and zero. PR-URL: https://github.com/nodejs/node/pull/18098 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
* cluster: add cwd to cluster.settingscjihrig2018-01-293-0/+25
| | | | | | | | | | This commit allows cluster workers to be created with configurable working directories. Fixes: https://github.com/nodejs/node/issues/16388 PR-URL: https://github.com/nodejs/node/pull/18399 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
* stream: do not emit readable if the stream endedMathias Buus2018-01-292-1/+42
| | | | | | | | | | Fixes a regression introduced by the once-per-microtick 'readable' event emission. See: https://github.com/nodejs/node/pull/17979 PR-URL: https://github.com/nodejs/node/pull/18372 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
* lib,src: port isIPv4() to jsBen Noordhuis2018-01-294-44/+26
| | | | | | | | | | | | | | | | | | | | Removes a few lines of C++ code while making `isIPv4()` about 3x faster. `isIPv6()` and `isIP()` for the IPv6 case stay about the same. I removed the homegrown `isIPv4()` in lib/dns.js that utilized a lookup table. It is in fact a little faster than the new `isIPv4()` function but: 1. The difference is only measurable at around 10M iterations, and 2. The function is a "probably IPv4" heuristic, not a proper validator. PR-URL: https://github.com/nodejs/node/pull/18398 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Jan Krems <jan.krems@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com>
* src: DRY ip address parsing code in cares_wrap.ccBen Noordhuis2018-01-291-36/+18
| | | | | | | | | | PR-URL: https://github.com/nodejs/node/pull/18398 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Jan Krems <jan.krems@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com>
* benchmark: implement duration in http test doubleJoyee Cheung2018-01-293-7/+35
| | | | | | PR-URL: https://github.com/nodejs/node/pull/18380 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
* module: validate request in require.resolve.pathsJoyee Cheung2018-01-292-0/+11
| | | | | | | PR-URL: https://github.com/nodejs/node/pull/18359 Fixes: https://github.com/nodejs/node/issues/18352 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
* module: validate request in require.resolveJoyee Cheung2018-01-292-1/+17
| | | | | | | PR-URL: https://github.com/nodejs/node/pull/18359 Fixes: https://github.com/nodejs/node/issues/18352 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
* module: use internal/errors.js in module.requireJoyee Cheung2018-01-293-24/+24
| | | | | | PR-URL: https://github.com/nodejs/node/pull/18359 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
* errors: only init colors when util is not loadedJoyee Cheung2018-01-291-2/+4
| | | | | | PR-URL: https://github.com/nodejs/node/pull/18359 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
* errors: improve the description of ERR_INVALID_ARG_VALUEJoyee Cheung2018-01-292-13/+35
| | | | | | | | | | - Allow user to customize why the argument is invalid - Display the argument with util.inspect so null bytes can be displayed properly. PR-URL: https://github.com/nodejs/node/pull/18358 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Jon Moss <me@jonathanmoss.me>
* benchmark: make compare.R easier to understandAndreas Madsen2018-01-291-12/+49
| | | | | | | PR-URL: https://github.com/nodejs/node/pull/18373 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
* test: fix flaky test-fs-writeJoyee Cheung2018-01-291-4/+4
| | | | | | | | PR-URL: https://github.com/nodejs/node/pull/18374 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
* timers: attach listOnTimeout function to TimerWrapMatteo Collina2018-01-291-4/+4
| | | | | | | | | | | | | | | | | Make the listOnTimeout function inline by attaching it to the TimeWrap prototype. It improves insertion and cancellation time of unpooled timers by 18% and 28% respectively. PR-URL: https://github.com/nodejs/node/pull/18388 Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> 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: Weijia Wang <starkwang@126.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
* doc: unify type linkificationVse Mozhet Byt2018-01-282-34/+39
| | | | | | | | PR-URL: https://github.com/nodejs/node/pull/18407 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
* src: remove unused variablecjihrig2018-01-271-2/+0
| | | | | | | | | PR-URL: https://github.com/nodejs/node/pull/18385 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
* http: there is no `corked` property of `stream`Fedor Indutny2018-01-271-3/+8
| | | | | | | | | Do not check/use unexistent property, use `OutgoingMessage` instead. PR-URL: https://github.com/nodejs/node/pull/18325 Reviewed-By: Mithun Sasidharan <mithunsasidharan89@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
* doc: fix typo in REPL docsAdam Engebretson2018-01-271-1/+1
| | | | | | | PR-URL: https://github.com/nodejs/node/pull/18404 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
* timers: add internal [@@ refresh()] functiontimers-internal-refreshJeremiah Senkpiel2018-01-265-13/+90
| | | | | | | | | | | | | Hidden via a symbol because I'm unsure exactly what the API should look like in the end. Removes the need to use _unrefActive for efficiently refreshing timeouts. It still uses it under the hood but that could be replaced with insert() directly if it were in the same file. PR-URL: https://github.com/nodejs/node/pull/18065 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
* timers: reposition getTimers definition internallyJeremiah Senkpiel2018-01-261-7/+8
| | | | | | | Just cleanup so the file makes more future sense. PR-URL: https://github.com/nodejs/node/pull/18065 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
* process: clean up signal handler setupAnatoli Papirovski2018-01-261-10/+9
| | | | | | | PR-URL: https://github.com/nodejs/node/pull/18330 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Jon Moss <me@jonathanmoss.me>
* process: remove dead codeAnatoli Papirovski2018-01-261-8/+1
| | | | | | | PR-URL: https://github.com/nodejs/node/pull/18330 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Jon Moss <me@jonathanmoss.me>
* build: fix rm commands in tarball ruleBen Noordhuis2018-01-261-10/+29
| | | | | | | | | | | | | The `$(RM) {foo,bar,baz}` rules don't seem to work with GNU make 4.1. Write them out in full and get rid of a few overlong lines in the process. PR-URL: https://github.com/nodejs/node/pull/18332 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Jon Moss <me@jonathanmoss.me>
* http: switch on string valuesSeth Brenith2018-01-262-23/+46
| | | | | | | | | | | | | Long ago, V8 was much faster switching on string lengths than values. That is no longer the case, so we can simplify a couple of methods. PR-URL: https://github.com/nodejs/node/pull/18351 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Kyle Farnung <kfarnung@microsoft.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Jon Moss <me@jonathanmoss.me>