Michael Dawson
0be029ec97
doc: make spelling of behavior consistent
...
In the api docs there were some instances of behaviour
and many more with behavior. I was asked as part of a review
on a different PR which one to use and went with behavior
to be consistent with the majority.
Our style guide states that American English spelling is preferred.
PR-URL: https://github.com/nodejs/node/pull/13245
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Kunal Pathak <kunal.pathak@microsoft.com >
2017-05-28 07:03:41 -07:00
Anna Henningsen
220186c4a8
stream: support Uint8Array input to methods
...
PR-URL: https://github.com/nodejs/node/pull/11608
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2017-05-28 07:03:40 -07:00
Michael Dawson
45139e59f3
n-api: add napi_get_version
...
Add napi_get_version function so that addons can
query the level of N-API supported.
PR-URL: https://github.com/nodejs/node/pull/13207
Fixes: https://github.com/nodejs/abi-stable-node/issues/231
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Jason Ginchereau <jasongin@microsoft.com >
2017-05-28 07:03:39 -07:00
Timur Shemsedinov
a7f5c9cb7d
http: destroy sockets after keepAliveTimeout
...
Implement server.keepAliveTimeout in addition to server.timeout to
prevent temporary socket/memory leaking in keep-alive mode.
PR-URL: https://github.com/nodejs/node/pull/2534
Author: Timur Shemsedinov <timur.shemsedinov@gmail.com >
Author: Alexey Orlenko <eaglexrlnk@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
2017-05-28 07:03:38 -07:00
Vse Mozhet Byt
c0a7c8e0d2
doc: fix code example in inspector.md
...
PR-URL: https://github.com/nodejs/node/pull/13182
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2017-05-28 07:03:36 -07:00
Alexey Orlenko
cd2824cc93
doc: make the style of notes consistent
...
Make the style of "Note:" paragraphs consistent and document the
guidelines in `doc/STYLE_GUIDE.md`.
PR-URL: https://github.com/nodejs/node/pull/13133
Fixes: https://github.com/nodejs/node/issues/13131
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
2017-05-28 07:03:35 -07:00
Ebrahim Byagowi
d99b7bc8c9
fs: fix realpath{Sync} on resolving pipes/sockets
...
PR-URL: https://github.com/nodejs/node/pull/13028
Reviewed-By: Refael Ackermann <refack@gmail.com >
2017-05-28 07:03:34 -07:00
Alexey Orlenko
efae43f0ee
zlib: fix node crashing on invalid options
...
This commit fixes the Node process crashing when constructors of classes
of the zlib module are given invalid options.
* Throw an Error when the zlib library rejects the value of windowBits,
instead of crashing with an assertion.
* Treat windowBits and memLevel options consistently with other ones and
don't crash when non-numeric values are given.
* Fix bugs in the validation logic:
- Don't conflate 0 and undefined when checking if a field of an
options object exists.
- Treat NaN and Infinity values the same way as values of invalid
types instead of allowing to actually set zlib options to NaN or
Infinity.
PR-URL: https://github.com/nodejs/node/pull/13098
Fixes: https://github.com/nodejs/node/issues/13082
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
2017-05-28 07:00:44 -07:00
Sam Roberts
287b11dc8c
src: allow --tls-cipher-list in NODE_OPTIONS
...
PR-URL: https://github.com/nodejs/node/pull/13172
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
2017-05-28 07:00:43 -07:00
Sam Roberts
39785c7780
inspector: document bad usage for --inspect-port
...
Document --inspect-port, and fix the reporting for when it is misused.
The option requires an argument, but when the argument was omitted, the
error message incorrectly reported --inspect-port as being bad, as if
was not supported at all:
% node --inspect-port
node: bad option: --inspect-port
% node --none-such
node: bad option: --none-such
It is now correctly reported as requiring an argument:
% ./node --inspect-port
./node: --inspect-port requires an argument
PR-URL: https://github.com/nodejs/node/pull/12581
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-05-28 07:00:41 -07:00
Calvin Metcalf
07c7f198db
stream: add final method
...
Adds the ability to for write streams to have an _final method which acts
similarly to the _flush method that transform streams have but is called before
the finish event is emitted and if asynchronous delays the stream from
finishing. The `final` option may also be passed in order to set it.
PR-URL: https://github.com/nodejs/node/pull/12828
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
2017-05-28 07:00:40 -07:00
Matteo Collina
b6e1d22fa6
stream: add destroy and _destroy methods.
...
Adds destroy() and _destroy() methods to Readable, Writable, Duplex
and Transform. It also standardizes the behavior and the implementation
of destroy(), which has been inconsistent in userland and core.
This PR also updates all the subsystems of core to use the new
destroy().
PR-URL: https://github.com/nodejs/node/pull/12925
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Calvin Metcalf <calvin.metcalf@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2017-05-28 07:00:40 -07:00
Michael Dawson
f2e3a670af
dgram: convert to using internal/errors
...
Covert lib/dgram.js over to using lib/internal/errors.js
for generating Errors. See
[using-internal-errors.md](https://github.com/nodejs/node/blob/master/doc/guides/using-internal-errors.md )
for more details.
I have not addressed the cases that use errnoException() and
exceptionWithHostPort() helper methods as changing these would require
fixing the tests across all of the different files that use them. In
addition, these helpers already add a `code` to the Error and we'll
have to discuss how that interacts with the `code` used by
lib/internal/errors.js. I believe we should convert all users
of errnoException and exceptionWithHostPort in a PR dedicated to
that conversion.
PR-URL: https://github.com/nodejs/node/pull/12926
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben.bridgewater@fintura.de >
2017-05-28 07:00:40 -07:00
Vse Mozhet Byt
db90b505e8
doc: don't use useless constructors in stream.md
...
PR-URL: https://github.com/nodejs/node/pull/13145
Refs: http://eslint.org/docs/rules/no-useless-constructor
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-05-28 07:00:39 -07:00
Vse Mozhet Byt
2c45e6fd68
doc: update code example for Windows in stream.md
...
PR-URL: https://github.com/nodejs/node/pull/13138
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-05-28 07:00:38 -07:00
Alexey Orlenko
3c91145f31
doc: improve formatting of STYLE_GUIDE.md
...
* Wrap text at 80 characters.
* Use periods consistently.
PR-URL: https://github.com/nodejs/node/pull/13135
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Michael Dawson <mhdawson@ibm.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
2017-05-28 07:00:38 -07:00
Alexey Orlenko
1d587ef982
doc: fix incorrect keyboard shortcut
...
This commit fixes an incorrect keyboard shortcut in
`doc/STYLE_GUIDE.md`: entering em-dashes is done via Alt+Shift+"-" on
macOS, not via Ctrl+Alt+"-". Besides that, Option is more canonical name
of Alt on Macs.
PR-URL: https://github.com/nodejs/node/pull/13134
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Michael Dawson <mhdawson@ibm.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
2017-05-28 07:00:38 -07:00
Michael Dawson
336d33b646
doc: fix title/function name mismatch
...
Fix mismatch in title for napi_get_value_string_utf16
Fixes: https://github.com/nodejs/abi-stable-node/issues/243
PR-URL: https://github.com/nodejs/node/pull/13123
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2017-05-28 07:00:37 -07:00
Anna Henningsen
9f01b34bf9
doc: link to common docs in test writing guide
...
PR-URL: https://github.com/nodejs/node/pull/13118
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
Reviewed-By: Michael Dawson <mhdawson@ibm.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2017-05-28 07:00:36 -07:00
Ebrahim Byagowi
f146fe4ed4
cmd: support dash as stdin alias
...
PR-URL: https://github.com/nodejs/node/pull/13012
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
2017-05-28 07:00:36 -07:00
Eugene Ostroukhov
c7182b9d9c
inspector: JavaScript bindings for the inspector
...
PR-URL: https://github.com/nodejs/node/pull/12263
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
Reviewed-By: Timothy Gu <timothygu99@gmail.com >
Reviewed-By: Josh Gavant <josh.gavant@outlook.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
2017-05-28 07:00:31 -07:00
Chris Young
1aa68f9a8d
doc: list macOS as supporting filename argument
...
also added regression tests
PR-URL: https://github.com/nodejs/node/pull/13111
Fixes: https://github.com/nodejs/node/issues/13108
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com >
2017-05-23 11:39:13 -07:00
Artur Vieira
ef71824740
doc: edit Error.captureStackTrace html comment
...
Edit to the comment in the stack trace capture, highlighting the use of
the constructorOpt argument in errors.md
Fixes: https://github.com/nodejs/node/issues/12289
PR-URL: https://github.com/nodejs/node/pull/12962
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: Ruben Bridgewater <ruben.bridgewater@fintura.de >
2017-05-21 21:36:07 +02:00
Daijiro Wachi
bfade5aacd
doc: remove unused/duplicated reference links
...
PR-URL: https://github.com/nodejs/node/pull/13066
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2017-05-21 00:10:47 +02:00
Myles Borins
8250bfd1e5
fs: Revert throw on invalid callbacks
...
This reverts 4cb5f3daa3
Based on community feedback I think we should consider reverting this
change. We should explore how this could be solved via linting rules.
Refs: https://github.com/nodejs/node/pull/12562
PR-URL: https://github.com/nodejs/node/pull/12976
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
Reviewed-By: Evan Lucas <evanlucas@me.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2017-05-20 10:21:34 -04:00
Michael Dawson
4a7b7e8097
doc: add reference to node_api.h in docs
...
Realized that we don't actually point people to the file to
include in order to access N-API functions. Add that.
PR-URL: https://github.com/nodejs/node/pull/13084
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2017-05-19 17:21:16 -04:00
Rick Bullotta
847688018c
doc: don't suggest setEncoding for binary streams
...
Removed an incorrect reference to the use of setEncoding(null) as the
proper way to handling binary streams or to disable encoding, and
explained that the default encoding is "no encoding", and that this is
the correct approach for dealing with binary data via Buffers.
PR-URL: https://github.com/nodejs/node/pull/11363
Fixes: https://github.com/nodejs/node/issues/11352
Refs: https://github.com/nodejs/node/issues/11316
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
2017-05-19 13:02:17 +01:00
Faiz Halde
eff9252181
doc: update doc of publicEncrypt method
...
As per https://github.com/nodejs/node/issues/12946
the crypto doc for publicEncrypt doesn't tell
you whether the encryption happens in place or not.
Fixes: https://github.com/nodejs/node/issues/12946
PR-URL: https://github.com/nodejs/node/pull/12947
Reviewed-By: Brian White <mscdex@mscdex.net >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
2017-05-19 12:45:32 +02:00
Michael Dawson
ab34f9dec2
doc: update doc to remove usage of "you"
...
As per style guide avoid the use of you, your etc.
Rational as per: http://www2.ivcc.edu/rambo/tip_formal_writing_voice.htm
PR-URL: https://github.com/nodejs/node/pull/13067
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-05-18 21:25:48 -04:00
Anna Henningsen
28ddac2ec2
buffer: fix indexOf for empty searches
...
Make searches for empty subsequences do exactly what
`String.prototype.indexOf()` does.
Fixes: https://github.com/nodejs/node/issues/13023
PR-URL: https://github.com/nodejs/node/pull/13024
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
2017-05-18 23:16:40 +02:00
Frank Lanitz
5de722ab6d
doc: fix links from ToC to subsection for 4.8.x
...
PR-URL: https://github.com/nodejs/node/pull/13039
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.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: Gibson Fahnestock <gibfahn@gmail.com >
2017-05-18 17:14:17 +01:00
Sam Roberts
d6cd466a25
src: whitelist new options for NODE_OPTIONS
...
Add --inspect-*, --napi-modules, --trace-event-categories
Remove --prof-process, like -p and -e, it causes node to do something
other than run node js scripts.
PR-URL: https://github.com/nodejs/node/pull/13002
Reviewed-By: Refael Ackermann <refack@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 >
2017-05-17 12:40:17 -07:00
Michael Dawson
1b28022de0
doc: clarify operation of napi_cancel_async_work
...
PR-URL: https://github.com/nodejs/node/pull/12974
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Jason Ginchereau <jasongin@microsoft.com >
2017-05-15 20:08:22 -04:00
Fedor Indutny
e600fbe576
tls: accept lookup option for tls.connect()
...
`net.connect()` and consequently `http.Agent` support custom DNS
`lookup` option. However, as we move to `https.Agent` - this option no
longer works because it is not proxied by `tls.connect`.
Fix this inconsistency by passing it down to `net.connect`.
PR-URL: https://github.com/nodejs/node/pull/12839
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
2017-05-15 17:25:44 -04:00
Gabriel Schulhof
276720921b
addons: remove semicolons from after module definition
...
Having semicolons there runs counter to our documentation and illicits
warnings in pedantic mode. This removes semicolons from after uses of
NODE_MODULE and NODE_MODULE_CONTEXT_AWARE_BUILTIN.
PR-URL: https://github.com/nodejs/node/pull/12919
Reviewed-By: Anna Henningsen <anna@addaleax.net >
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: Alexey Orlenko <eaglexrlnk@gmail.com >
2017-05-15 20:33:06 +02:00
Beth Griggs
abfd4bf9df
doc: clarify node.js addons are c++
...
PR-URL: https://github.com/nodejs/node/pull/12898
Fixes: https://github.com/nodejs/node/issues/7129
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
Reviewed-By: Timothy Gu <timothygu99@gmail.com >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
2017-05-11 11:09:06 -07:00
Flarna
13487c437c
doc: add docs for server.address() for pipe case
...
Add documentation for net.server.address() for the case it is listening
on a pipe or unix domain socket instead an IP socket.
PR-URL: https://github.com/nodejs/node/pull/12907
Fixes: https://github.com/nodejs/node/issues/12895
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
2017-05-10 12:02:44 -07:00
Refael Ackermann
e1cabf6fbd
doc, test: add note to response.getHeaders
...
* also correct language for the same note for querystring.parse
* add assertions for said note
PR-URL: https://github.com/nodejs/node/pull/12887
Fixes: https://github.com/nodejs/node/issues/12885
Refs: https://github.com/nodejs/node/pull/12883
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Timothy Gu <timothygu99@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
2017-05-10 11:07:15 -04:00
Michael Dawson
147048a0d3
doc: fix broken links in n-api doc
...
- fix 2 broken links
- fix capitalization in description of
napi_create_array-with-length
PR-URL: https://github.com/nodejs/node/pull/12889
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
Reviewed-By: MichaëZasso <targos@protonmail.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
Reviewed-By: Hitesh Kanwathirtha <digitalinfinity@gmail.com >
2017-05-09 16:35:59 -04:00
Jason Ginchereau
2e3fef7628
n-api: Handle fatal exception in async callback
...
- Create a handle scope before invoking the async completion
callback, because it is basically always needed, easy for user
code to forget, and this makes it more consistent with ordinary
N-API function callbacks.
- Check for an unhandled JS exception after invoking an async
completion callback, and report it via `node::FatalException()`.
- Add a corresponding test case for an exception in async callback.
Previously, any unhandled JS exception thrown from a
`napi_async_complete_callback` would be silently ignored. Among other
things this meant assertions in some test cases could be undetected.
PR-URL: https://github.com/nodejs/node/pull/12838
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-05-09 15:17:36 -04:00
Sakthipriyan Vairamani (thefourtheye)
4cb5f3daa3
fs: throw on invalid callbacks for async functions
...
If an asynchronous function is passed no callback function, there is no
way to return the result. This patch throws an error if the callback
passed is not valid or none passed at all.
PR-URL: https://github.com/nodejs/node/pull/12562
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2017-05-10 00:04:01 +05:30
Glenn Schlereth
e429f9a42a
doc: fix typo in streams.md
...
Slight grammar change to the readable event:`error`
PR-URL: https://github.com/nodejs/node/pull/12924
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
2017-05-09 21:15:57 +03:00
Anna Henningsen
faf6654ff7
dns: support promisified lookup(Service)
...
PR-URL: https://github.com/nodejs/node/pull/12442
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Myles Borins <myles.borins@gmail.com >
Reviewed-By: Evan Lucas <evanlucas@me.com >
Reviewed-By: William Kapke <william.kapke@gmail.com >
Reviewed-By: Timothy Gu <timothygu99@gmail.com >
Reviewed-By: Teddy Katz <teddy.katz@gmail.com >
2017-05-09 15:01:46 +02:00
Anna Henningsen
fe5ca3ff27
child_process: support promisified exec(File)
...
Author: Benjamin Gruenbaum <inglor@gmail.com >
Author: Anna Henningsen <anna@addaleax.net >
PR-URL: https://github.com/nodejs/node/pull/12442
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Myles Borins <myles.borins@gmail.com >
Reviewed-By: Evan Lucas <evanlucas@me.com >
Reviewed-By: William Kapke <william.kapke@gmail.com >
Reviewed-By: Timothy Gu <timothygu99@gmail.com >
Reviewed-By: Teddy Katz <teddy.katz@gmail.com >
2017-05-09 15:01:45 +02:00
Anna Henningsen
fbcb4f50b8
fs: support util.promisify for fs.read/fs.write
...
PR-URL: https://github.com/nodejs/node/pull/12442
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Myles Borins <myles.borins@gmail.com >
Reviewed-By: Evan Lucas <evanlucas@me.com >
Reviewed-By: William Kapke <william.kapke@gmail.com >
Reviewed-By: Timothy Gu <timothygu99@gmail.com >
Reviewed-By: Teddy Katz <teddy.katz@gmail.com >
2017-05-09 15:01:45 +02:00
Anna Henningsen
e7c51454b0
timers: add promisify support
...
Add support for `util.promisify(setTimeout)` and
`util.promisify(setImmediate)` as a proof-of-concept implementation.
`clearTimeout()` and `clearImmediate()` do not work on those Promises.
Includes documentation and tests.
PR-URL: https://github.com/nodejs/node/pull/12442
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Myles Borins <myles.borins@gmail.com >
Reviewed-By: Evan Lucas <evanlucas@me.com >
Reviewed-By: William Kapke <william.kapke@gmail.com >
Reviewed-By: Timothy Gu <timothygu99@gmail.com >
Reviewed-By: Teddy Katz <teddy.katz@gmail.com >
2017-05-09 15:01:44 +02:00
Anna Henningsen
99da8e8e02
util: add util.promisify()
...
Add `util.promisify(function)` for creating promisified functions.
Includes documentation and tests.
Fixes: https://github.com/nodejs/CTC/issues/12
PR-URL: https://github.com/nodejs/node/pull/12442
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Myles Borins <myles.borins@gmail.com >
Reviewed-By: Evan Lucas <evanlucas@me.com >
Reviewed-By: William Kapke <william.kapke@gmail.com >
Reviewed-By: Timothy Gu <timothygu99@gmail.com >
Reviewed-By: Teddy Katz <teddy.katz@gmail.com >
2017-05-09 15:01:41 +02:00
Sam Roberts
ea1b8a5cbc
doc: sort bottom-of-file markdown links
...
PR-URL: https://github.com/nodejs/node/pull/12726
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
2017-05-08 09:30:55 -07:00
Steven Lehn
cbd6fde9a3
doc: improve path.posix.normalize docs
...
Add section to path docs that explains that path.posix.normalize
does not replace Windows slashes with POSIX slashes because POSIX
does not recognize / as a valid path separator.
Fixes: https://github.com/nodejs/node/issues/12298
PR-URL: https://github.com/nodejs/node/pull/12700
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: David Cai <davidcai1993@yahoo.com >
2017-05-07 23:54:54 +02:00
Aditya Anand
2614d247fb
doc: update readFileSync in fs.md
...
* Updated fs.md stating fs.readFileAsync is platform specific
* Fix formatting of `note`s
PR-URL: https://github.com/nodejs/node/pull/12800
Refs: https://github.com/nodejs/node/issues/10962
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2017-05-05 13:10:03 -04:00