From 6fbef7f3505818a07116ceb7285bf3344e5bace4 Mon Sep 17 00:00:00 2001 From: Luigi Pinca Date: Wed, 25 Oct 2017 09:53:24 +0200 Subject: [PATCH 01/15] doc: fix typo in zlib.md PR-URL: https://github.com/nodejs/node/pull/16480 Reviewed-By: Gireesh Punathil Reviewed-By: Myles Borins --- doc/api/zlib.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/zlib.md b/doc/api/zlib.md index 85a3743a9a3b8c..9b7b30aa7deaf4 100644 --- a/doc/api/zlib.md +++ b/doc/api/zlib.md @@ -462,7 +462,7 @@ Creates and returns a new [DeflateRaw][] object with the given [options][]. is set to 8 for raw deflate streams. zlib does not have a working implementation of an 8-bit Window for raw deflate streams and would automatically set windowBit to 9 if initially set to 8. Newer versions of zlib will throw an exception. -This creates a potential DOS vector, and as such the behavior ahs been reverted +This creates a potential DOS vector, and as such the behavior has been reverted in Node.js 8, 6, and 4. Node.js version 9 and higher will throw when windowBits is set to 8. From 99fdc1d04f21996bef487ec81617939dfae0a760 Mon Sep 17 00:00:00 2001 From: Refael Ackermann Date: Fri, 20 Oct 2017 18:41:20 -0400 Subject: [PATCH 02/15] doc: add recommendations for first timers PR-URL: https://github.com/nodejs/node/pull/16350 Reviewed-By: Rich Trott Reviewed-By: Joyee Cheung Reviewed-By: Gireesh Punathil Reviewed-By: Gibson Fahnestock Reviewed-By: Anatoli Papirovski --- COLLABORATOR_GUIDE.md | 13 ++++++++----- doc/first_timer_badge.png | Bin 0 -> 1539 bytes 2 files changed, 8 insertions(+), 5 deletions(-) create mode 100644 doc/first_timer_badge.png diff --git a/COLLABORATOR_GUIDE.md b/COLLABORATOR_GUIDE.md index e96585f4fdbb75..b0db4aa92aa575 100644 --- a/COLLABORATOR_GUIDE.md +++ b/COLLABORATOR_GUIDE.md @@ -24,8 +24,9 @@ understand the project governance model as outlined in ## Issues and Pull Requests -Courtesy should always be shown to individuals submitting issues and -pull requests to the Node.js project. +Courtesy should **always** be shown to individuals submitting issues and pull +requests to the Node.js project. Be welcoming to first time contributors, +identified by the GitHub ![badge](./doc/first_timer_badge.png) badge. Collaborators should feel free to take full responsibility for managing issues and pull requests they feel qualified to handle, as @@ -68,6 +69,9 @@ wide-reaching impact), and focused changes that affect only documentation and/or the test suite, may be landed after a shorter delay if they have multiple approvals. +For first time contributors, ask the author if they have configured their git +username and email to their liking as per [this guide][git-username]. + For non-breaking changes, if there is no disagreement amongst Collaborators, a pull request may be landed given appropriate review. Where there is discussion amongst Collaborators, consensus should be @@ -362,10 +366,8 @@ The TSC should serve as the final arbiter where required. * If you do, please force-push removing the merge. * Reasons for not using the web interface button: * The merge method will add an unnecessary merge commit. - * The rebase & merge method adds metadata to the commit title. - * The rebase method changes the author. * The squash & merge method has been known to add metadata to the - commit title. + commit title (the PR #). * If more than one author has contributed to the PR, keep the most recent author when squashing. @@ -675,3 +677,4 @@ LTS working group and the Release team. [backporting guide]: doc/guides/backporting-to-release-lines.md [Stability Index]: doc/api/documentation.md#stability-index [Enhancement Proposal]: https://github.com/nodejs/node-eps +[git-username]: https://help.github.com/articles/setting-your-username-in-git/ \ No newline at end of file diff --git a/doc/first_timer_badge.png b/doc/first_timer_badge.png new file mode 100644 index 0000000000000000000000000000000000000000..d275a14851f286a1d03d679f0e66766ab745b214 GIT binary patch literal 1539 zcmb7DeQXnD7(XP@xv&TZ7sQwx2Y*1|dUw5R?|QDl){oI-9kp9RgE97c_jbE%?Un1z z-6(;o3jv8_v0%CyO++W3B_gK|iCORum^K3(B!WS+bOVPN&`L^KP<*?s$RC8nH+T2G z?{m-Zd4A8=PG56lP4(hx1VL&%>zsbLOYnWRYA*a{8h3pSx92riKx)U)Y3P=_FMd*#-E7VtLlq7pF)WgU|qi9s}i)UDBDg4h8xGz8k@s2#g? zatK3Z$&PKXcu8-}0ovttn^n-Vxw%!`+#%W|Y|U!4PUoS42+#ynk90=kyl%&)?eg$k z784jct)g|yW7-Fn-sN;plmi9L7EA(8HXBpyeFy&Iv$NLtypk^ zxTwl8O;)04*`g3qx->fmna+d|iFv&b3`gU$iGnF3bRkAiCX$Fm%5hC=$2C9rkH#al z?LV4ZmKMVNrxmry_PmKveTM?HK%Hl4OZzZ4xJ0 zMFy9E72veMP&mhiDO{99nvtv_fu^h#JCDMzz)E%k5%0&SjxV zlC5Ap(YPi=MNsiAL*KJl`mtEvp#niu)K*35taO2|UD1?yyAnekj_InS%QwhTN$HNS zD3@s_Y9~pvpETD0U0?-;sN_d#Ea1ujXX@(7B1f)omTj!xxs)%5J zmX8kx1704C7Kp-mQsLmdb8OoYICOo!rdC&Gcq*SwCQ> zrt`yTBb&?&j~ip-iBvkECj+T;zLd+Pa+zW1;#@+P6Imk=l#64=SpI6UGzCe4XVzxm zMr!`%mizy2A)$fuI)coxdz|&H`cJ>_y{x`P&U0N2zW>Fl0Z&Hr+!=A-y+3qVx^SA& z`p@?5pFBl26#o2XG4iF0-L&wP<+a?VRn?QR!sPD0ZEN>kOy6iZc_*-Y!o9TCd|{~m z?30)KYlt;x8eguuJG!VLTzmGy;fp&iEjqRT<6XJEU&-QvEww*>dQ5w*pBVghvNt~A6+zK==={;squU4e9rEowx3}8)?#eBro%2HK!3EcRH`)&#XvgRG zcFG^TRMmCt+z*9)S@)i*J(28*1D1ip{9oSSdpbWk^J21iYT3{Nql9hmd)4#LsH3#b zoVZYc_l~y|YI^S-8Q%Kq>cRfo^FMt0g{H+nH(hGj zK8QVaVt@a#m4AIdP?y@6n=?^5eg8SNZ~fm(wr;%j#5}}tW?}fi(a(3lA|M`Dv-4;} H@Xdb#MfPzR literal 0 HcmV?d00001 From 16eb7d3a5f5155338f964893c98473838351b9c6 Mon Sep 17 00:00:00 2001 From: Daijiro Wachi Date: Sun, 22 Oct 2017 17:51:14 +0200 Subject: [PATCH 03/15] doc: fix doc styles CONTRIBUTING.md + L857: Unused definition + L861: Unused definition + L863: Unused definition doc/api/assert.md + L719: Unused definition doc/api/async_hooks.md + L460: Missing code-language flag doc/api/child_process.md + L1362: Unused definition doc/api/dns.md + L674: Unused definition doc/api/esm.md + L178: Missing code-language flag doc/api/http.md + L1868: Unused definition + L1887: Unused definition + L1888: Unused definition + L1889: Unused definition + L1916: Unused definition + L1917: Unused definition doc/api/https.md + L260: Unused definition doc/api/os.md + L1226: Unused definition doc/api/process.md + L1888: Unused definition doc/api/stream.md + L2227: Definitions with the same identifier doc/guides/writing-and-running-benchmarks.md + L1: Missing newline character at end of file Refs: https://github.com/nodejs/node/pull/12756 PR-URL: https://github.com/nodejs/node/pull/16385 Reviewed-By: Anna Henningsen Reviewed-By: Anatoli Papirovski Reviewed-By: James M Snell Reviewed-By: Luigi Pinca Reviewed-By: Gireesh Punathil Reviewed-By: Gibson Fahnestock Reviewed-By: Colin Ihrig --- CONTRIBUTING.md | 3 --- doc/api/assert.md | 1 - doc/api/async_hooks.md | 2 +- doc/api/child_process.md | 1 - doc/api/dns.md | 1 - doc/api/esm.md | 2 +- doc/api/http.md | 6 ------ doc/api/https.md | 1 - doc/api/os.md | 1 - doc/api/process.md | 1 - doc/api/stream.md | 1 - doc/guides/writing-and-running-benchmarks.md | 2 +- 12 files changed, 3 insertions(+), 19 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 2f63dd29d79346..1c6de8d25498fe 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -854,11 +854,8 @@ By making a contribution to this project, I certify that: [Building guide]: ./BUILDING.md [CI (Continuous Integration) test run]: #ci-testing [Code of Conduct]: https://github.com/nodejs/TSC/blob/master/CODE_OF_CONDUCT.md -[guide for writing tests in Node.js]: ./doc/guides/writing-tests.md [https://ci.nodejs.org/]: https://ci.nodejs.org/ [IRC in the #node-dev channel]: https://webchat.freenode.net?channels=node-dev&uio=d4 [Node.js help repository]: https://github.com/nodejs/help/issues -[notes about the waiting time]: #waiting-until-the-pull-request-gets-landed [Onboarding guide]: ./doc/onboarding.md -[on GitHub]: https://github.com/nodejs/node [Technical Steering Committee (TSC) repository]: https://github.com/nodejs/TSC/issues diff --git a/doc/api/assert.md b/doc/api/assert.md index c3ad6c42492c97..ca110ecbfc44dc 100644 --- a/doc/api/assert.md +++ b/doc/api/assert.md @@ -628,7 +628,6 @@ assert(Object.is(str1 / 1, str2 / 1)); For more information, see [MDN's guide on equality comparisons and sameness][mdn-equality-guide]. -[`Error`]: errors.html#errors_class_error [`Error.captureStackTrace`]: errors.html#errors_error_capturestacktrace_targetobject_constructoropt [`Map`]: https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Map [`Object.is()`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is diff --git a/doc/api/async_hooks.md b/doc/api/async_hooks.md index 5f94d750c5814c..86f2ae7cc1ee70 100644 --- a/doc/api/async_hooks.md +++ b/doc/api/async_hooks.md @@ -457,7 +457,7 @@ new Promise((resolve) => resolve(true)).then((a) => {}); calls the following callbacks: -``` +```text init for PROMISE with id 5, trigger id: 1 promise resolve 5 # corresponds to resolve(true) init for PROMISE with id 6, trigger id: 5 # the Promise returned by then() diff --git a/doc/api/child_process.md b/doc/api/child_process.md index 37460c80fd6fd8..547a42aef56075 100755 --- a/doc/api/child_process.md +++ b/doc/api/child_process.md @@ -1372,7 +1372,6 @@ unavailable. [`Error`]: errors.html#errors_class_error [`EventEmitter`]: events.html#events_class_eventemitter [`JSON.stringify` spec]: https://tc39.github.io/ecma262/#sec-json.stringify -[`JSON.stringify()`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify [`subprocess.connected`]: #child_process_subprocess_connected [`subprocess.disconnect()`]: #child_process_subprocess_disconnect [`subprocess.kill()`]: #child_process_subprocess_kill_signal diff --git a/doc/api/dns.md b/doc/api/dns.md index d564aea424d4d6..56f2d0660ca5c7 100644 --- a/doc/api/dns.md +++ b/doc/api/dns.md @@ -671,4 +671,3 @@ uses. For instance, _they do not use the configuration from `/etc/hosts`_. [Implementation considerations section]: #dns_implementation_considerations [rfc5952]: https://tools.ietf.org/html/rfc5952#section-6 [supported `getaddrinfo` flags]: #dns_supported_getaddrinfo_flags -[the official libuv documentation]: http://docs.libuv.org/en/latest/threadpool.html diff --git a/doc/api/esm.md b/doc/api/esm.md index bc25c88b9a82e9..76592927dbd577 100644 --- a/doc/api/esm.md +++ b/doc/api/esm.md @@ -175,7 +175,7 @@ export function resolve(specifier, parentModuleURL/*, defaultResolve */) { With this loader, running: -``` +```console NODE_OPTIONS='--experimental-modules --loader ./custom-loader.mjs' node x.js ``` diff --git a/doc/api/http.md b/doc/api/http.md index 3219893761c467..c0797d5d7d632d 100644 --- a/doc/api/http.md +++ b/doc/api/http.md @@ -1937,7 +1937,6 @@ const req = http.request(options, (res) => { ``` [`'checkContinue'`]: #http_event_checkcontinue -[`'listening'`]: net.html#net_event_listening [`'request'`]: #http_event_request [`'response'`]: #http_event_response [`Agent`]: #http_class_http_agent @@ -1956,9 +1955,6 @@ const req = http.request(options, (res) => { [`http.request()`]: #http_http_request_options_callback [`message.headers`]: #http_message_headers [`net.Server.close()`]: net.html#net_server_close_callback -[`net.Server.listen()`]: net.html#net_server_listen_handle_backlog_callback -[`net.Server.listen(path)`]: net.html#net_server_listen_path_backlog_callback -[`net.Server.listen(port)`]: net.html#net_server_listen_port_host_backlog_callback [`net.Server`]: net.html#net_class_net_server [`net.Socket`]: net.html#net_class_net_socket [`net.createConnection()`]: net.html#net_net_createconnection_options_connectlistener @@ -1984,5 +1980,3 @@ const req = http.request(options, (res) => { [Readable Stream]: stream.html#stream_class_stream_readable [Writable Stream]: stream.html#stream_class_stream_writable [socket.unref()]: net.html#net_socket_unref -[unspecified IPv4 address]: https://en.wikipedia.org/wiki/0.0.0.0 -[unspecified IPv6 address]: https://en.wikipedia.org/wiki/IPv6_address#Unspecified_address diff --git a/doc/api/https.md b/doc/api/https.md index 3ff97bf446b667..8b7fc2f3d648d0 100644 --- a/doc/api/https.md +++ b/doc/api/https.md @@ -268,7 +268,6 @@ const req = https.request(options, (res) => { [`http.Server`]: http.html#http_class_http_server [`http.close()`]: http.html#http_server_close_callback [`http.get()`]: http.html#http_http_get_options_callback -[`http.listen()`]: http.html#http_server_listen_port_hostname_backlog_callback [`http.request()`]: http.html#http_http_request_options_callback [`https.Agent`]: #https_class_https_agent [`https.request()`]: #https_https_request_options_callback diff --git a/doc/api/os.md b/doc/api/os.md index be61837bae058f..2efdf0117e21f9 100644 --- a/doc/api/os.md +++ b/doc/api/os.md @@ -1186,5 +1186,4 @@ The following error codes are specific to the Windows operating system: [`process.arch`]: process.html#process_process_arch [`process.platform`]: process.html#process_process_platform -[OS Constants]: #os_os_constants [uname(3)]: https://linux.die.net/man/3/uname diff --git a/doc/api/process.md b/doc/api/process.md index 40a596523967c9..897143e2e32446 100644 --- a/doc/api/process.md +++ b/doc/api/process.md @@ -1838,7 +1838,6 @@ cases: [`Error`]: errors.html#errors_class_error [`EventEmitter`]: events.html#events_class_eventemitter [`JSON.stringify` spec]: https://tc39.github.io/ecma262/#sec-json.stringify -[`JSON.stringify()`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify [`console.error()`]: console.html#console_console_error_data_args [`console.log()`]: console.html#console_console_log_data_args [`end()`]: stream.html#stream_writable_end_chunk_encoding_callback diff --git a/doc/api/stream.md b/doc/api/stream.md index d2af5cd93370bf..96f67d75b36772 100644 --- a/doc/api/stream.md +++ b/doc/api/stream.md @@ -2224,7 +2224,6 @@ contain multi-byte characters. [http-incoming-message]: http.html#http_class_http_incomingmessage [zlib]: zlib.html [hwm-gotcha]: #stream_highwatermark_discrepency_after_calling_readable_setencoding -[Readable]: #stream_class_stream_readable [stream-_flush]: #stream_transform_flush_callback [stream-_read]: #stream_readable_read_size_1 [stream-_transform]: #stream_transform_transform_chunk_encoding_callback diff --git a/doc/guides/writing-and-running-benchmarks.md b/doc/guides/writing-and-running-benchmarks.md index 880340ba93a5c8..1350b90e02ac97 100644 --- a/doc/guides/writing-and-running-benchmarks.md +++ b/doc/guides/writing-and-running-benchmarks.md @@ -438,4 +438,4 @@ Supported options keys are: [t-test]: https://en.wikipedia.org/wiki/Student%27s_t-test#Equal_or_unequal_sample_sizes.2C_unequal_variances [git-for-windows]: http://git-scm.com/download/win [nghttp2.org]: http://nghttp2.org -[benchmark-ci]: https://github.com/nodejs/benchmarking/blob/master/docs/core_benchmarks.md \ No newline at end of file +[benchmark-ci]: https://github.com/nodejs/benchmarking/blob/master/docs/core_benchmarks.md From 7facaa50310a70c42c6db66e8d547b85432e915d Mon Sep 17 00:00:00 2001 From: Daijiro Wachi Date: Tue, 24 Oct 2017 18:14:41 +0200 Subject: [PATCH 04/15] doc: fix missing newline character PR-URL: https://github.com/nodejs/node/pull/16447 Reviewed-By: Luigi Pinca Reviewed-By: Richard Lau Reviewed-By: Colin Ihrig Reviewed-By: James M Snell Reviewed-By: Yuta Hiroto Reviewed-By: Anatoli Papirovski Reviewed-By: Gireesh Punathil --- COLLABORATOR_GUIDE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/COLLABORATOR_GUIDE.md b/COLLABORATOR_GUIDE.md index b0db4aa92aa575..acbd3fa9b5d8c0 100644 --- a/COLLABORATOR_GUIDE.md +++ b/COLLABORATOR_GUIDE.md @@ -677,4 +677,4 @@ LTS working group and the Release team. [backporting guide]: doc/guides/backporting-to-release-lines.md [Stability Index]: doc/api/documentation.md#stability-index [Enhancement Proposal]: https://github.com/nodejs/node-eps -[git-username]: https://help.github.com/articles/setting-your-username-in-git/ \ No newline at end of file +[git-username]: https://help.github.com/articles/setting-your-username-in-git/ From 9ffc32974e1b380a3b5f2fdc1f1889a256f178a0 Mon Sep 17 00:00:00 2001 From: Alec Perkins Date: Tue, 24 Oct 2017 18:02:16 -0400 Subject: [PATCH 05/15] doc: fix typo in changelog for 8.8.0 PR-URL: https://github.com/nodejs/node/pull/16462 Reviewed-By: Vse Mozhet Byt Reviewed-By: Anatoli Papirovski Reviewed-By: Colin Ihrig Reviewed-By: James M Snell Reviewed-By: Myles Borins Reviewed-By: Yuta Hiroto --- doc/changelogs/CHANGELOG_V8.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/changelogs/CHANGELOG_V8.md b/doc/changelogs/CHANGELOG_V8.md index 0bf85c23c72055..1599525ed3f77e 100644 --- a/doc/changelogs/CHANGELOG_V8.md +++ b/doc/changelogs/CHANGELOG_V8.md @@ -42,7 +42,7 @@ * **crypto**: - expose ECDH class [#8188](https://github.com/nodejs/node/pull/8188) * **http2**: - - http2 is now exposed by defualt without the need for a flag [#15685](https://github.com/nodejs/node/pull/15685) + - http2 is now exposed by default without the need for a flag [#15685](https://github.com/nodejs/node/pull/15685) - a new environment varible NODE\_NO\_HTTP2 has been added to allow userland http2 to be required [#15685](https://github.com/nodejs/node/pull/15685) - support has been added for generic `Duplex` streams [#16269](https://github.com/nodejs/node/pull/16269) * **module**: From 2b0bb57055168c3b5e875cd6505b7d27989a67d0 Mon Sep 17 00:00:00 2001 From: Jon Moss Date: Tue, 24 Oct 2017 22:15:41 -0400 Subject: [PATCH 06/15] doc: fix wrong URL MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/16470 Reviewed-By: Anatoli Papirovski Reviewed-By: Colin Ihrig Reviewed-By: Myles Borins Reviewed-By: James M Snell Reviewed-By: Gireesh Punathil Reviewed-By: Yuta Hiroto Reviewed-By: Franziska Hinkelmann Reviewed-By: Khaidi Chu Reviewed-By: Tobias Nießen --- doc/changelogs/CHANGELOG_V8.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/changelogs/CHANGELOG_V8.md b/doc/changelogs/CHANGELOG_V8.md index 1599525ed3f77e..afd6aa328827ed 100644 --- a/doc/changelogs/CHANGELOG_V8.md +++ b/doc/changelogs/CHANGELOG_V8.md @@ -576,7 +576,7 @@ * [[`94c6296d83`](https://github.com/nodejs/node/commit/94c6296d83)] - **tools**: use template literals (Sarah Meyer) [#15956](https://github.com/nodejs/node/pull/15956) * [[`eebb2d775a`](https://github.com/nodejs/node/commit/eebb2d775a)] - **(SEMVER-MINOR)** **tools, build**: refactor macOS installer (JP Wesselink) [#15179](https://github.com/nodejs/node/pull/15179) * [[`f68f572d7f`](https://github.com/nodejs/node/commit/f68f572d7f)] - **tty**: require readline at top of file (Bryan English) [#15647](https://github.com/nodejs/node/pull/15647) -* [[`d181147b2c`](https://genericithub.com/nodejs/node/commit/d181147b2c)] - **url**: const-ify APIs, and pass URL by ref (Sam Roberts) [#15615](https://github.com/nodejs/node/pull/15615) +* [[`d181147b2c`](https://github.com/nodejs/node/commit/d181147b2c)] - **url**: const-ify APIs, and pass URL by ref (Sam Roberts) [#15615](https://github.com/nodejs/node/pull/15615) * [[`1cc4245bfb`](https://github.com/nodejs/node/commit/1cc4245bfb)] - **url**: fix remaining calculation (Rimas Misevičius) [#15637](https://github.com/nodejs/node/pull/15637) * [[`34b4180d7d`](https://github.com/nodejs/node/commit/34b4180d7d)] - **url**: change variable name to be more descriptive (Yang-Kichang) [#15551](https://github.com/nodejs/node/pull/15551) * [[`58c68c2fcb`](https://github.com/nodejs/node/commit/58c68c2fcb)] - **util**: use faster -0 check (Brian White) [#15726](https://github.com/nodejs/node/pull/15726) From c8396b837057d66335f0a1a981d231d69585e3d8 Mon Sep 17 00:00:00 2001 From: Teppei Sato Date: Wed, 25 Oct 2017 08:30:45 +0900 Subject: [PATCH 07/15] doc: remove loader hooks from unsupported features PR-URL: https://github.com/nodejs/node/pull/16465 Reviewed-By: James M Snell Reviewed-By: Gireesh Punathil Reviewed-By: Yuta Hiroto Reviewed-By: Franziska Hinkelmann Reviewed-By: Colin Ihrig --- doc/api/esm.md | 1 - 1 file changed, 1 deletion(-) diff --git a/doc/api/esm.md b/doc/api/esm.md index 76592927dbd577..d8143da378f768 100644 --- a/doc/api/esm.md +++ b/doc/api/esm.md @@ -43,7 +43,6 @@ points into ESM graphs at run time. | `require('./foo.mjs')` | ES Modules have differing resolution and timing, use language standard `import()` | | `import()` | pending newer V8 release used in Node.js | | `import.meta` | pending V8 implementation | -| Loader Hooks | pending Node.js EP creation/consensus | ## Notable differences between `import` and `require` From db8c92fb42e6622f99502e1db15245cbfdb36daf Mon Sep 17 00:00:00 2001 From: Myles Borins Date: Wed, 25 Oct 2017 03:45:31 -0400 Subject: [PATCH 08/15] doc: fix spelling in v8.8.0 changelog I hear that varible has an a in it. PR-URL: https://github.com/nodejs/node/pull/16477 Reviewed-By: Luigi Pinca Reviewed-By: Gireesh Punathil --- doc/changelogs/CHANGELOG_V8.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/changelogs/CHANGELOG_V8.md b/doc/changelogs/CHANGELOG_V8.md index afd6aa328827ed..5c553ab1891744 100644 --- a/doc/changelogs/CHANGELOG_V8.md +++ b/doc/changelogs/CHANGELOG_V8.md @@ -43,7 +43,7 @@ - expose ECDH class [#8188](https://github.com/nodejs/node/pull/8188) * **http2**: - http2 is now exposed by default without the need for a flag [#15685](https://github.com/nodejs/node/pull/15685) - - a new environment varible NODE\_NO\_HTTP2 has been added to allow userland http2 to be required [#15685](https://github.com/nodejs/node/pull/15685) + - a new environment variable NODE\_NO\_HTTP2 has been added to allow userland http2 to be required [#15685](https://github.com/nodejs/node/pull/15685) - support has been added for generic `Duplex` streams [#16269](https://github.com/nodejs/node/pull/16269) * **module**: - resolve and instantiate loader pipeline hooks have been added to the ESM lifecycle [#15445](https://github.com/nodejs/node/pull/15445) From 2a53165aa032532c0290246fd81a416db02b7b8e Mon Sep 17 00:00:00 2001 From: cjihrig Date: Sun, 17 Sep 2017 23:18:59 -0400 Subject: [PATCH 09/15] test: add missing assertion This commit adds an assertion to an existing try...catch statement. Unfortunately, assert.throws() cannot be used because the operation succeeds on some platforms, throws EINVAL on some platforms, and throws ENOPROTOOPT on others. PR-URL: https://github.com/nodejs/node/pull/15519 Reviewed-By: Luigi Pinca Reviewed-By: Yuta Hiroto Reviewed-By: James M Snell --- test/parallel/test-dgram-multicast-set-interface.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test/parallel/test-dgram-multicast-set-interface.js b/test/parallel/test-dgram-multicast-set-interface.js index c065683f53c7fd..2900cb89738e82 100644 --- a/test/parallel/test-dgram-multicast-set-interface.js +++ b/test/parallel/test-dgram-multicast-set-interface.js @@ -33,11 +33,14 @@ const dgram = require('dgram'); socket.bind(0); socket.on('listening', common.mustCall(() => { // Try to set with an invalid interfaceAddress (wrong address class) + // + // This operation succeeds on some platforms, throws `EINVAL` on some + // platforms, and throws `ENOPROTOOPT` on others. This is unpleasant, but + // we should at least test for it. try { socket.setMulticastInterface('::'); - throw new Error('Not detected.'); } catch (e) { - console.error(`setMulticastInterface: wrong family error is: ${e}`); + assert(e.code === 'EINVAL' || e.code === 'ENOPROTOOPT'); } socket.close(); From ef0551f6c5d482eb743c8171fbb781d63fca9896 Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Fri, 20 Oct 2017 08:35:54 +0200 Subject: [PATCH 10/15] test: allow for different nsswitch.conf settings The motivation for this commit is that these two test fail on systems that have different Name Service Switch configuration settings. A concrete example of this is when using Red Hat Enterprise Linux (RHEL) 7. If Name Service Switch is available on the operating system then it might be configured differently (/etc/nsswitch.conf). If the system is configured with no dns the error code will be AI_AGAIN, but if there are more services after the dns entry, for example some linux distributions skip a myhostname service by default which would still produce the ENOTFOUND error. This commit suggests checking for either ENOTFOUND or EAI_AGAIN to accommodate systems like the ones described above. The references below indicate that others have run, or are running, into this aswell. Refs: https://github.com/nodejs/node/issues/12075 Refs: https://github.com/nodejs/help/issues/687 Refs: https://github.com/nodejs/node/issues/15825 PR-URL: https://github.com/nodejs/node/pull/16378 Reviewed-By: Anna Henningsen Reviewed-By: James M Snell Reviewed-By: Luigi Pinca Reviewed-By: Colin Ihrig Reviewed-By: Ben Noordhuis --- test/parallel/test-https-connect-address-family.js | 2 +- .../test-net-better-error-messages-port-hostname.js | 8 +++++++- test/parallel/test-net-connect-immediate-finish.js | 8 +++++++- test/parallel/test-tls-connect-address-family.js | 2 +- 4 files changed, 16 insertions(+), 4 deletions(-) diff --git a/test/parallel/test-https-connect-address-family.js b/test/parallel/test-https-connect-address-family.js index fa9baa528efa00..a345a70a57074b 100644 --- a/test/parallel/test-https-connect-address-family.js +++ b/test/parallel/test-https-connect-address-family.js @@ -33,7 +33,7 @@ function runTest() { dns.lookup('localhost', { family: 6, all: true }, (err, addresses) => { if (err) { - if (err.code === 'ENOTFOUND') + if (err.code === 'ENOTFOUND' || err.code === 'EAI_AGAIN') common.skip('localhost does not resolve to ::1'); throw err; diff --git a/test/parallel/test-net-better-error-messages-port-hostname.js b/test/parallel/test-net-better-error-messages-port-hostname.js index dac17141677dcb..818ea4bfff41f6 100644 --- a/test/parallel/test-net-better-error-messages-port-hostname.js +++ b/test/parallel/test-net-better-error-messages-port-hostname.js @@ -9,7 +9,13 @@ const c = net.createConnection(0, 'this.hostname.is.invalid'); c.on('connect', common.mustNotCall()); c.on('error', common.mustCall(function(e) { - assert.strictEqual(e.code, 'ENOTFOUND'); + // If Name Service Switch is available on the operating system then it + // might be configured differently (/etc/nsswitch.conf). + // If the system is configured with no dns the error code will be EAI_AGAIN, + // but if there are more services after the dns entry, for example some + // linux distributions ship a myhostname service by default which would + // still produce the ENOTFOUND error. + assert.ok(e.code === 'ENOTFOUND' || e.code === 'EAI_AGAIN'); assert.strictEqual(e.port, 0); assert.strictEqual(e.hostname, 'this.hostname.is.invalid'); })); diff --git a/test/parallel/test-net-connect-immediate-finish.js b/test/parallel/test-net-connect-immediate-finish.js index 1b65ce15ab8a1c..e2e5e1c6715b9a 100644 --- a/test/parallel/test-net-connect-immediate-finish.js +++ b/test/parallel/test-net-connect-immediate-finish.js @@ -32,7 +32,13 @@ const client = net.connect({ client.once('error', common.mustCall((err) => { assert(err); assert.strictEqual(err.code, err.errno); - assert.strictEqual(err.code, 'ENOTFOUND'); + // If Name Service Switch is available on the operating system then it + // might be configured differently (/etc/nsswitch.conf). + // If the system is configured with no dns the error code will be EAI_AGAIN, + // but if there are more services after the dns entry, for example some + // linux distributions ship a myhostname service by default which would + // still produce the ENOTFOUND error. + assert.ok(err.code === 'ENOTFOUND' || err.code === 'EAI_AGAIN'); assert.strictEqual(err.host, err.hostname); assert.strictEqual(err.host, 'this.hostname.is.invalid'); assert.strictEqual(err.syscall, 'getaddrinfo'); diff --git a/test/parallel/test-tls-connect-address-family.js b/test/parallel/test-tls-connect-address-family.js index 663e9399b610ce..b0623c6cf603ec 100644 --- a/test/parallel/test-tls-connect-address-family.js +++ b/test/parallel/test-tls-connect-address-family.js @@ -32,7 +32,7 @@ function runTest() { dns.lookup('localhost', { family: 6, all: true }, (err, addresses) => { if (err) { - if (err.code === 'ENOTFOUND') + if (err.code === 'ENOTFOUND' || err.code === 'EAI_AGAIN') common.skip('localhost does not resolve to ::1'); throw err; From 9f87d6ad4d71643f9b1bafcf4d6e4047ab4f61a9 Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Wed, 25 Oct 2017 12:36:24 +0200 Subject: [PATCH 11/15] test: call toLowerCase on the resolved module The commit updates test-require-resolve.js to call toLowerCase on the resolved module instead of the path. Currently this test will fail if the path to where node exists contains uppercase letters. For example: ``` $ out/Release/node test/parallel/test-require-resolve.js /root/rpmbuild/BUILD/node-v8.8.0/test/parallel module.js:515 throw err; ^ Error: Cannot find module '/root/rpmbuild/build/node-v8.8.0/test/fixtures/nested-index/one' at Function.Module._resolveFilename (module.js:513:15) at Function.resolve (internal/module.js:18:19) at Object. (/root/rpmbuild/BUILD/node-v8.8.0/test/parallel/test-require-resolve.js:37:11) at Module._compile (module.js:612:30) at Object.Module._extensions..js (module.js:623:10) at Module.load (module.js:531:32) at tryModuleLoad (module.js:494:12) at Function.Module._load (module.js:486:3) at Function.Module.runMain (module.js:653:10) at startup (bootstrap_node.js:187:16) ``` PR-URL: https://github.com/nodejs/node/pull/16486 Reviewed-By: Luigi Pinca > Reviewed-By: Ben Noordhuis > Reviewed-By: Colin Ihrig > Reviewed-By: Anna Henningsen > Reviewed-By: James M Snell > --- test/parallel/test-require-resolve.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/parallel/test-require-resolve.js b/test/parallel/test-require-resolve.js index 77f07b394fcc64..b897936696d20d 100644 --- a/test/parallel/test-require-resolve.js +++ b/test/parallel/test-require-resolve.js @@ -32,7 +32,7 @@ assert.strictEqual( require.resolve(fixtures.path('a')).toLowerCase()); assert.strictEqual( fixtures.path('nested-index', 'one', 'index.js').toLowerCase(), - require.resolve(fixtures.path('nested-index', 'one').toLowerCase())); + require.resolve(fixtures.path('nested-index', 'one')).toLowerCase()); assert.strictEqual('path', require.resolve('path')); console.log('ok'); From d66c9276a976b4177e56634a5707d43d0e56603e Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Mon, 18 Sep 2017 03:48:06 +0200 Subject: [PATCH 12/15] test: make test-v8-serdes work without stdin If `stdin` was closed or referred to a file, this didn't work, because it was accessed via file descriptor. Instead, use another generic native object. cherry-picked from https://github.com/ayojs/ayo/pull/63 Reviewed-By: Colin Ihrig Reviewed-By: James M Snell --- test/parallel/test-v8-serdes.js | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/test/parallel/test-v8-serdes.js b/test/parallel/test-v8-serdes.js index 981e196157812f..ad8666ee3ba877 100644 --- a/test/parallel/test-v8-serdes.js +++ b/test/parallel/test-v8-serdes.js @@ -20,6 +20,8 @@ const objects = [ circular ]; +const hostObject = new (process.binding('js_stream').JSStream)(); + const serializerTypeError = /^TypeError: Class constructor Serializer cannot be invoked without 'new'$/; const deserializerTypeError = @@ -63,8 +65,8 @@ const deserializerTypeError = { const ser = new v8.DefaultSerializer(); ser._writeHostObject = common.mustCall((object) => { - assert.strictEqual(object, process.stdin._handle); - const buf = Buffer.from('stdin'); + assert.strictEqual(object, hostObject); + const buf = Buffer.from('hostObjectTag'); ser.writeUint32(buf.length); ser.writeRawBytes(buf); @@ -74,23 +76,23 @@ const deserializerTypeError = }); ser.writeHeader(); - ser.writeValue({ val: process.stdin._handle }); + ser.writeValue({ val: hostObject }); const des = new v8.DefaultDeserializer(ser.releaseBuffer()); des._readHostObject = common.mustCall(() => { const length = des.readUint32(); const buf = des.readRawBytes(length); - assert.strictEqual(buf.toString(), 'stdin'); + assert.strictEqual(buf.toString(), 'hostObjectTag'); assert.deepStrictEqual(des.readUint64(), [1, 2]); assert.strictEqual(des.readDouble(), -0.25); - return process.stdin._handle; + return hostObject; }); des.readHeader(); - assert.strictEqual(des.readValue().val, process.stdin._handle); + assert.strictEqual(des.readValue().val, hostObject); } { @@ -101,12 +103,12 @@ const deserializerTypeError = ser.writeHeader(); assert.throws(() => { - ser.writeValue({ val: process.stdin._handle }); + ser.writeValue({ val: hostObject }); }, /foobar/); } { - assert.throws(() => v8.serialize(process.stdin._handle), + assert.throws(() => v8.serialize(hostObject), /^Error: Unknown host object type: \[object .*\]$/); } From bf02780fd159a65ab96ccf9d65f97da6d65908bc Mon Sep 17 00:00:00 2001 From: Anatoli Papirovski Date: Wed, 25 Oct 2017 09:26:20 -0400 Subject: [PATCH 13/15] net: fix timeout with null handle This commit handles the case where _onTimeout is called with a null handle. Refs: https://github.com/nodejs/node/pull/15791 Fixes: https://github.com/nodejs/node/issues/16484 PR-URL: https://github.com/nodejs/node/pull/16489 Reviewed-By: Anna Henningsen Reviewed-By: James M Snell Reviewed-By: Colin Ihrig Reviewed-By: Refael Ackermann --- lib/net.js | 16 +++++++++------- test/parallel/test-net-timeout-no-handle.js | 17 +++++++++++++++++ 2 files changed, 26 insertions(+), 7 deletions(-) create mode 100644 test/parallel/test-net-timeout-no-handle.js diff --git a/lib/net.js b/lib/net.js index bfafb915379fc3..ba67c3d2efaad9 100644 --- a/lib/net.js +++ b/lib/net.js @@ -396,13 +396,15 @@ Socket.prototype.setTimeout = function(msecs, callback) { Socket.prototype._onTimeout = function() { - // `.prevWriteQueueSize` !== `.updateWriteQueueSize()` means there is - // an active write in progress, so we suppress the timeout. - const prevWriteQueueSize = this._handle.writeQueueSize; - if (prevWriteQueueSize > 0 && - prevWriteQueueSize !== this._handle.updateWriteQueueSize()) { - this._unrefTimer(); - return; + if (this._handle) { + // `.prevWriteQueueSize` !== `.updateWriteQueueSize()` means there is + // an active write in progress, so we suppress the timeout. + const prevWriteQueueSize = this._handle.writeQueueSize; + if (prevWriteQueueSize > 0 && + prevWriteQueueSize !== this._handle.updateWriteQueueSize()) { + this._unrefTimer(); + return; + } } debug('_onTimeout'); this.emit('timeout'); diff --git a/test/parallel/test-net-timeout-no-handle.js b/test/parallel/test-net-timeout-no-handle.js new file mode 100644 index 00000000000000..539f661cae8414 --- /dev/null +++ b/test/parallel/test-net-timeout-no-handle.js @@ -0,0 +1,17 @@ +'use strict'; + +const common = require('../common'); +const net = require('net'); +const assert = require('assert'); + +const socket = new net.Socket(); +socket.setTimeout(common.platformTimeout(50)); + +socket.on('timeout', common.mustCall(() => { + assert.strictEqual(socket._handle, null); +})); + +socket.on('connect', common.mustNotCall()); + +// since the timeout is unrefed, the code will exit without this +setTimeout(() => {}, common.platformTimeout(200)); From dc6bbb44daec5584a0fbd37f0916baeff3202dba Mon Sep 17 00:00:00 2001 From: cjihrig Date: Wed, 25 Oct 2017 15:10:15 -0400 Subject: [PATCH 14/15] 2017-10-25, Version 8.8.1 (Current) Notable changes: * net: - Fix timeout with null handle issue. This is a regression in Node 8.8.0. https://github.com/nodejs/node/pull/16489 --- CHANGELOG.md | 3 ++- doc/changelogs/CHANGELOG_V8.md | 27 ++++++++++++++++++++++++++- src/node_version.h | 2 +- 3 files changed, 29 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 656e193ec50399..88fcfff7452bcd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,7 +27,8 @@ release. -8.8.0
+8.8.1
+8.8.0
8.7.0
8.6.0
8.5.0
diff --git a/doc/changelogs/CHANGELOG_V8.md b/doc/changelogs/CHANGELOG_V8.md index 5c553ab1891744..f59758d1515380 100644 --- a/doc/changelogs/CHANGELOG_V8.md +++ b/doc/changelogs/CHANGELOG_V8.md @@ -6,6 +6,7 @@ +8.8.1
8.8.0
8.7.0
8.6.0
@@ -34,6 +35,30 @@ * [io.js](CHANGELOG_IOJS.md) * [Archive](CHANGELOG_ARCHIVE.md) + + ## 2017-10-25, Version 8.8.1 (Current), @cjihrig + + ### Notable Changes + + * **net**: + - Fix timeout with null handle issue. This is a regression in Node 8.8.0 [#16489](https://github.com/nodejs/node/pull/16489) + + ### Commits + + * [[`db8c92fb42`](https://github.com/nodejs/node/commit/db8c92fb42)] - **doc**: fix spelling in v8.8.0 changelog (Myles Borins) [#16477](https://github.com/nodejs/node/pull/16477) + * [[`c8396b8370`](https://github.com/nodejs/node/commit/c8396b8370)] - **doc**: remove loader hooks from unsupported features (Teppei Sato) [#16465](https://github.com/nodejs/node/pull/16465) + * [[`2b0bb57055`](https://github.com/nodejs/node/commit/2b0bb57055)] - **doc**: fix wrong URL (Jon Moss) [#16470](https://github.com/nodejs/node/pull/16470) + * [[`9ffc32974e`](https://github.com/nodejs/node/commit/9ffc32974e)] - **doc**: fix typo in changelog for 8.8.0 (Alec Perkins) [#16462](https://github.com/nodejs/node/pull/16462) + * [[`7facaa5031`](https://github.com/nodejs/node/commit/7facaa5031)] - **doc**: fix missing newline character (Daijiro Wachi) [#16447](https://github.com/nodejs/node/pull/16447) + * [[`16eb7d3a5f`](https://github.com/nodejs/node/commit/16eb7d3a5f)] - **doc**: fix doc styles (Daijiro Wachi) [#16385](https://github.com/nodejs/node/pull/16385) + * [[`99fdc1d04f`](https://github.com/nodejs/node/commit/99fdc1d04f)] - **doc**: add recommendations for first timers (Refael Ackermann) [#16350](https://github.com/nodejs/node/pull/16350) + * [[`6fbef7f350`](https://github.com/nodejs/node/commit/6fbef7f350)] - **doc**: fix typo in zlib.md (Luigi Pinca) [#16480](https://github.com/nodejs/node/pull/16480) + * [[`655e017e40`](https://github.com/nodejs/node/commit/655e017e40)] - **net**: fix timeout with null handle (Anatoli Papirovski) [#16489](https://github.com/nodejs/node/pull/16489) + * [[`7fad10cc7e`](https://github.com/nodejs/node/commit/7fad10cc7e)] - **test**: make test-v8-serdes work without stdin (Anna Henningsen) + * [[`12dc06e3e1`](https://github.com/nodejs/node/commit/12dc06e3e1)] - **test**: call toLowerCase on the resolved module (Daniel Bevenius) [#16486](https://github.com/nodejs/node/pull/16486) + * [[`10894c3835`](https://github.com/nodejs/node/commit/10894c3835)] - **test**: allow for different nsswitch.conf settings (Daniel Bevenius) [#16378](https://github.com/nodejs/node/pull/16378) + * [[`2a53165aa0`](https://github.com/nodejs/node/commit/2a53165aa0)] - **test**: add missing assertion (cjihrig) [#15519](https://github.com/nodejs/node/pull/15519) + ## 2017-10-24, Version 8.8.0 (Current), @MylesBorins @@ -269,7 +294,7 @@ * [[`8e2064f093`](https://github.com/nodejs/node/commit/8e2064f093)] - **test**: fix ordering of strictEqual actual/expected (Chad Zezula) [#16008](https://github.com/nodejs/node/pull/16008) * [[`b054a4e138`](https://github.com/nodejs/node/commit/b054a4e138)] - **test**: use fixtures.path instead of fixturesDir (Matthew Meyer) [#15984](https://github.com/nodejs/node/pull/15984) * [[`68bfde9fb9`](https://github.com/nodejs/node/commit/68bfde9fb9)] - **test**: fix test-esm-addons (Rich Trott) [#16174](https://github.com/nodejs/node/pull/16174) -* [[`562d445999`](https://github.com/nodejs/node/commit/562d445999)] - **test**: use fixtures.readSync (szhang351) +* [[`562d445999`](https://github.com/nodejs/node/commit/562d445999)] - **test**: use fixtures.readSync (szhang351) * [[`1469eff8f6`](https://github.com/nodejs/node/commit/1469eff8f6)] - **test**: replaced fixturesDir with common.fixtures (Dolapo Toki) [#15836](https://github.com/nodejs/node/pull/15836) * [[`b463259efb`](https://github.com/nodejs/node/commit/b463259efb)] - **test**: use fixtures.fixturesDir (Gene Wu) [#15822](https://github.com/nodejs/node/pull/15822) * [[`1e0a55529f`](https://github.com/nodejs/node/commit/1e0a55529f)] - **test**: replaces fixturesDir with fixtures methods (Christian Murphy) [#15817](https://github.com/nodejs/node/pull/15817) diff --git a/src/node_version.h b/src/node_version.h index 5f3b9cd4e6fae9..4179e2c1414014 100644 --- a/src/node_version.h +++ b/src/node_version.h @@ -26,7 +26,7 @@ #define NODE_MINOR_VERSION 8 #define NODE_PATCH_VERSION 1 -#define NODE_VERSION_IS_RELEASE 0 +#define NODE_VERSION_IS_RELEASE 1 #ifndef NODE_STRINGIFY #define NODE_STRINGIFY(n) NODE_STRINGIFY_HELPER(n) From 4359a93cc9462362ec2ae73189c92521fa386906 Mon Sep 17 00:00:00 2001 From: cjihrig Date: Wed, 25 Oct 2017 17:25:48 -0400 Subject: [PATCH 15/15] Working on v8.8.2 PR-URL: https://github.com/nodejs/node/pull/16498 Reviewed-By: Evan Lucas Reviewed-By: Anna Henningsen Reviewed-By: Ali Ijaz Sheikh --- src/node_version.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/node_version.h b/src/node_version.h index 4179e2c1414014..ea9547137b79cd 100644 --- a/src/node_version.h +++ b/src/node_version.h @@ -24,9 +24,9 @@ #define NODE_MAJOR_VERSION 8 #define NODE_MINOR_VERSION 8 -#define NODE_PATCH_VERSION 1 +#define NODE_PATCH_VERSION 2 -#define NODE_VERSION_IS_RELEASE 1 +#define NODE_VERSION_IS_RELEASE 0 #ifndef NODE_STRINGIFY #define NODE_STRINGIFY(n) NODE_STRINGIFY_HELPER(n)