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

4642 Commits

Author SHA1 Message Date
Rich Trott
003e5b3404
doc: make caveat in stream.md more concise
PR-URL: https://github.com/nodejs/node/pull/19251
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-03-11 04:05:49 +01:00
Ruben Bridgewater
8b69d4aca9
doc: add warning to assert.doesNotThrow()
Using `assert.doesNotThrow()` has no benefit over adding a comment
next to some code that should not throw. Therefore it is from now
on discouraged to use it.

PR-URL: https://github.com/nodejs/node/pull/18699
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2018-03-11 02:47:26 +01:00
Ruben Bridgewater
4893f70d12
repl: remove magic mode
The magic mode is long deprecated and works the same as the sloppy
mode. Since the sloppy mode is the default, removing the magic mode
should be safe.

PR-URL: https://github.com/nodejs/node/pull/19187
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
2018-03-11 02:43:27 +01:00
Michaël Zasso
0eec0735d0
doc: update internal errors documentation
PR-URL: https://github.com/nodejs/node/pull/19203
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2018-03-10 12:15:12 +01:00
Rich Trott
cca12ee321 doc: remove confusing "cats" from style guide
PR-URL: https://github.com/nodejs/node/pull/19246
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-03-09 07:56:54 -08:00
Rich Trott
23432d3306 doc: remove superfluous adverb from style guide
PR-URL: https://github.com/nodejs/node/pull/19246
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-03-09 07:56:25 -08:00
Rich Trott
0f05173f49 doc: remove warning against readable/readable.read
Remove suggestion to avoid `readable` event and `readabe.read()` method.
No explanation was provided for this suggestion.

PR-URL: https://github.com/nodejs/node/pull/19193
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Chen Gang <gangc.cxy@foxmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
2018-03-08 22:40:19 -08:00
Rich Trott
64d523411f doc: update labels info in onboarding-extras.md
Remove information duplicated in onboarding.md. Organize label list for
clarity. Remove `deps` label which we don't actually have.

PR-URL: https://github.com/nodejs/node/pull/19160
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-03-07 21:05:12 -08:00
Myles Borins
282e65cfe3
2018-03-07, Version 9.8.0 (Current)
Notable Changes:

* crypto:
  - add cert.fingerprint256 as SHA256 fingerprint (Hannes Magnusson)
    https://github.com/nodejs/node/pull/17690
* http2:
  - Fixed issues with aborted connections in the HTTP/2 implementation
    (Anna Henningsen)
    https://github.com/nodejs/node/pull/18987
    https://github.com/nodejs/node/pull/19002
* loader:
  - --inspect-brk now works properly for esmodules (Gus Caplan)
    https://github.com/nodejs/node/pull/18949
* src:
  - make process.dlopen() load well-known symbol (Ben Noordhuis)
    https://github.com/nodejs/node/pull/18934
* trace_events:
  - add file pattern cli option (Andreas Madsen)
    https://github.com/nodejs/node/pull/18480
* Added new collaborators:
  - Chen Gang (MoonBall) https://github.com/MoonBall

PR-URL: https://github.com/nodejs/node/pull/19181
2018-03-07 17:54:36 -08:00
Ali Ijaz Sheikh
fbf7ff92d7 doc: add inspector usage example
Add a simple example showing how to use the inspector API to access
the CPU profiler.

PR-URL: https://github.com/nodejs/node/pull/19172
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Khaidi Chu <i@2333.moe>
2018-03-07 17:00:31 -08:00
Timothy Gu
5826fe4e79
process: doc-only deprecate non-string env value
PR-URL: https://github.com/nodejs/node/pull/18990
Refs: https://github.com/nodejs/node/pull/15089
Refs: https://github.com/nodejs/node/pull/18158
Reviewed-By: Matteo Collina <matteo.collina@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: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2018-03-07 10:38:58 -08:00
Joyee Cheung
6c25f2ea49
fs: improve errors thrown from fs.watch()
- Add an accessor property `initialized `to FSEventWrap to
  check the state of the handle from the JS land
- Introduce ERR_FS_WATCHER_ALREADY_STARTED so calling start()
  on a watcher that is already started will throw instead of
  doing nothing silently.
- Introduce ERR_FS_WATCHER_NOT_STARTED so calling close()
  on a watcher that is already closed will throw instead of
  doing nothing silently.
- Validate the filename passed to fs.watch()
- Assert that the handle in the watcher are instances of
  FSEvent instead of relying on the illegal invocation error
  from the VM.
- Add more assertions in FSEventWrap methods now that we check
  `initialized` and the filename in JS land before invoking
  the binding.
- Use uvException instead of errornoException to create
  the errors with the error numbers from libuv to make them
  consistent with other errors in fs.

TODO:

- Improve fs.watchFile() the same way this patch improves fs.watch()
- It seems possible to fire both rename and change event from libuv
  together now that we can check if the handle is closed via
  `initialized` in JS land.

PR-URL: https://github.com/nodejs/node/pull/19089
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-03-08 01:14:53 +08:00
Gabriel Schulhof
48b5c11b16 n-api: update documentation
Document which APIs work while an exception is pending. This is the
list of all APIs which do not start with `NAPI_PREAMBLE(env)`.

Fixes: https://github.com/nodejs/abi-stable-node/issues/257
PR-URL: https://github.com/nodejs/node/pull/19078
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2018-03-07 12:04:16 -05:00
Joyee Cheung
42e9b483c0
doc: improve onboarding instructions
- Suggest to use a TOTP app if the new collaborator cannot receive
  SMS messages from GitHub
- Suggest to install node-core-utils and set up credentials before
  the onboarding session.
- Ask about subsystem teams that they want to join
- Note about squashing commits
- Other small fixes

PR-URL: https://github.com/nodejs/node/pull/19108
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
2018-03-07 22:54:38 +08:00
Rich Trott
cb5f9a6d87 doc: make suggestion more direct in stream.md
PR-URL: https://github.com/nodejs/node/pull/19124
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-03-06 22:30:09 -08:00
Gibson Fahnestock
fc9ddd9cd9 2018-03-06 Version 8.10.0 'Carbon' (LTS)
Notable changes:

* deps:
  * update V8 to 6.2.414.46 (Michaël Zasso) [#16413](https://github.com/nodejs/node/pull/16413)
  * revert ABI breaking changes in V8 6.2 (Anna Henningsen) [#16413](https://github.com/nodejs/node/pull/16413)
  * upgrade libuv to 1.19.1 (cjihrig) [#18260](https://github.com/nodejs/node/pull/18260)
  * re land npm 5.6.0 (Myles Borins) [#18625](https://github.com/nodejs/node/pull/18625)
  * ICU 60 bump (Steven R. Loomis) [#16876](https://github.com/nodejs/node/pull/16876)
* crypto:
  * Support both OpenSSL 1.1.0 and 1.0.2 (David Benjamin) [#16130](https://github.com/nodejs/node/pull/16130)
  * warn on invalid authentication tag length (Tobias Nießen) [#17566](https://github.com/nodejs/node/pull/17566)
* async_hooks:
  * update defaultTriggerAsyncIdScope for perf (Anatoli Papirovski) [#18004](https://github.com/nodejs/node/pull/18004)
  * use typed array stack as fast path (Anna Henningsen) [#17780](https://github.com/nodejs/node/pull/17780)
  * use scope for defaultTriggerAsyncId (Andreas Madsen) [#17273](https://github.com/nodejs/node/pull/17273)
  * separate missing from default context (Andreas Madsen) [#17273](https://github.com/nodejs/node/pull/17273)
  * rename initTriggerId (Andreas Madsen) [#17273](https://github.com/nodejs/node/pull/17273)
  * deprecate undocumented API (Andreas Madsen) [#16972](https://github.com/nodejs/node/pull/16972)
  * add destroy event for gced AsyncResources (Sebastian Mayr) [#16998](https://github.com/nodejs/node/pull/16998)
  * add trace events to async_hooks (Andreas Madsen) [#15538](https://github.com/nodejs/node/pull/15538)
  * set HTTPParser trigger to socket (Andreas Madsen) [#18003](https://github.com/nodejs/node/pull/18003)
  * add provider types for net server (Andreas Madsen) [#17157](https://github.com/nodejs/node/pull/17157)
* n-api:
  * add helper for addons to get the event loop (Anna Henningsen) [#17109](https://github.com/nodejs/node/pull/17109)
* cli:
  * add --stack-trace-limit to NODE_OPTIONS (Anna Henningsen) [#16495](https://github.com/nodejs/node/pull/16495)
* console:
  * add support for console.debug (Benjamin Zaslavsky) [#17033](https://github.com/nodejs/node/pull/17033)
* module:
  * add builtinModules (Jon Moss) [#16386](https://github.com/nodejs/node/pull/16386)
  * replace default paths in require.resolve() (cjihrig) [#17113](https://github.com/nodejs/node/pull/17113)
* src:
  * add helper for addons to get the event loop (Anna Henningsen) [#17109](https://github.com/nodejs/node/pull/17109)
  * add process.ppid (cjihrig) [#16839](https://github.com/nodejs/node/pull/16839)
* http:
  * support generic `Duplex` streams (Anna Henningsen) [#16267](https://github.com/nodejs/node/pull/16267)
  * add rawPacket in err of `clientError` event (XadillaX) [#17672](https://github.com/nodejs/node/pull/17672)
  * better support for IPv6 addresses (Mattias Holmlund) [#14772](https://github.com/nodejs/node/pull/14772)
* net:
  * remove ADDRCONFIG DNS hint on Windows (Bartosz Sosnowski) [#17662](https://github.com/nodejs/node/pull/17662)
* process:
  * fix reading zero-length env vars on win32 (Anna Henningsen) [#18463](https://github.com/nodejs/node/pull/18463)
* tls:
  * unconsume stream on destroy (Anna Henningsen) [#17478](https://github.com/nodejs/node/pull/17478)
* process:
  * improve unhandled rejection message (Madara Uchiha) [#17158](https://github.com/nodejs/node/pull/17158)
* stream:
  * remove usage of *State.highWaterMark (Calvin Metcalf) [#12860](https://github.com/nodejs/node/pull/12860)
* trace_events:
  * add executionAsyncId to init events (Andreas Madsen) [#17196](https://github.com/nodejs/node/pull/17196)

PR-URL: https://github.com/nodejs/node/pull/18336
2018-03-07 01:00:43 +00:00
Myles Borins
4e15679c02
2018-03-06, Version 6.13.1 'Boron' (LTS)
Notable Changes:

* http, tls:
  - better support for IPv6 addresses (Mattias Holmlund)
    https://github.com/nodejs/node/pull/14772

PR-URL: https://github.com/nodejs/node/pull/19027
2018-03-06 12:03:41 -08:00
Timothy Gu
9256dbb611 perf_hooks: fix timing
Fixes: https://github.com/nodejs/node/issues/17892
Fixes: https://github.com/nodejs/node/issues/17893
Fixes: https://github.com/nodejs/node/issues/18992

PR-URL: https://github.com/nodejs/node/pull/18993
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
2018-03-06 07:50:01 -08:00
Matteo Collina
1a5ec837ca doc: fix max length on stream.md
See: https://github.com/nodejs/node/pull/18438

PR-URL: https://github.com/nodejs/node/pull/19169
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-03-06 14:52:19 +01:00
Mathias Buus
5e3f51648e stream: updated streams error handling
This improves error handling for streams in a few ways.

1. It ensures that no user defined methods (_read, _write, ...) are run
after .destroy has been called.
2. It introduces an explicit error to tell the user if they are write to
write, etc to the stream after it has been destroyed.
3. It makes streams always emit close as the last thing after they have
been destroyed
4. Changes the default _destroy to not gracefully end streams.

It also updates net, http2, zlib and fs to the new error handling.

PR-URL: https://github.com/nodejs/node/pull/18438
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2018-03-06 13:31:56 +01:00
Rich Trott
fe8d4a7ea7
doc: remove tentativeness in pull-requests.md
There are some uses of "in general" that are unnecessary. (We don't need
to be tentative about the fact that tests should pass, for example.)

PR-URL: https://github.com/nodejs/node/pull/19123
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-03-06 09:32:08 +01:00
Ruben Bridgewater
aa35074abb
doc: update cc list
PR-URL: https://github.com/nodejs/node/pull/19099
Reviewed-By: Shingo Inoue <leko.noor@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2018-03-06 09:27:46 +01:00
Rich Trott
13861da9c0
doc: add introduced_in metadata to _toc.md
Allow users to switch to the table of contents for older versions of
Node.js. This gets rid of the "Failed to add alternative version link"
warnings when building docs.

PR-URL: https://github.com/nodejs/node/pull/19113
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Matheus Marchini <matheus@sthima.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2018-03-06 09:18:37 +01:00
Michael Dawson
bd0a7a4e59 doc: new team for bundlers or delivery of Node.js
Add team that we can use to cc organizations or people
who do one of the following:

* bundle node into their product
* bundle node into their distributions
* provide an installer
* provide a version manager

PR-URL: https://github.com/nodejs/node/pull/19098
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2018-03-05 18:36:10 -05:00
punteek
1d2ab79f2c doc: add simple example to rename function
Added a simple example showing how to rename
a file.

Refs: https://github.com/nodejs/node/issues11135

PR-URL: https://github.com/nodejs/node/pull/18812
Reviewed-By: Matheus Marchini <matheus@sthima.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-03-05 16:52:05 -03:00
Anna Henningsen
ae3137049f
util: assign missed deprecation number
Refs: https://github.com/nodejs/node/pull/18415
PR-URL: https://github.com/nodejs/node/pull/19149
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-03-05 18:10:24 +00:00
Anna Henningsen
b20af8088a
util: introduce util.types.is[…] type checks
Provide public APIs for native typechecking that is actually useful.
The motivation for this is providing alternatives to userland
modules that would currently rely on `process.binding('util')`.

PR-URL: https://github.com/nodejs/node/pull/18415
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
2018-03-05 17:41:26 +00:00
Anna Henningsen
bd6e0be0df
doc: provide replacements for deprecated util methods
PR-URL: https://github.com/nodejs/node/pull/18415
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
2018-03-05 17:38:32 +00:00
Yuta Hiroto
35c7238bb7 doc: replace to Node.js
PR-URL: https://github.com/nodejs/node/pull/19056
Reviewed-By: Matheus Marchini <matheus@sthima.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Shingo Inoue <leko.noor@gmail.com>
2018-03-06 00:46:30 +09:00
Anna Henningsen
a8b5192fef
repl: make last error available as _error
This is pretty useful when trying to inspect the last
error caught by a REPL, and is made to be analogous to `_`,
which contains the last successful completion value.

PR-URL: https://github.com/nodejs/node/pull/18919
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Vladimir de Turckheim <vlad2t@hotmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com>
Reviewed-By: Shingo Inoue <leko.noor@gmail.com>
2018-03-04 22:01:57 +00:00
Zeke Sikelianos
1572a5b6cd
doc: add URL.format() example
PR-URL: https://github.com/nodejs/node/pull/18888
Fixes: https://github.com/nodejs/node/issues/18887
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2018-03-04 12:47:55 +01:00
Eric Bickle
449d1c8ea4
doc: fix n-api asynchronous threading docs
Documentation for N-API Custom Asynchronous Operations incorrectly
stated that async execution happens on the main event loop.
Added details to napi_create_async_work about which threads are
used to invoke the execute and complete callbacks.

Changed 'async' to 'asynchronous' in the documentation for Custom
Asynchronous Operations. Changed "executes in parallel" to "can
execute in parallel" for the documentation of napi_create_async_work
execute parameter.

PR-URL: https://github.com/nodejs/node/pull/19073
Fixes: https://github.com/nodejs/node/issues/19071
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-03-04 12:12:45 +01:00
Andreas Madsen
85212bb182
trace_events: add file pattern cli option
Allow the user to specify the filepath for the trace_events log file
using a template string.

PR-URL: https://github.com/nodejs/node/pull/18480
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-03-04 12:07:39 +01:00
Ruben Bridgewater
c111e133ae
doc: add deprecation notice
PR-URL: https://github.com/nodejs/node/pull/18395
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2018-03-02 19:47:19 +00:00
Ruben Bridgewater
e8bb1f35df
buffer: refactor all read/write functions
There are a lot of changes in this commit:

1) Remove the `noAssert` argument from all read and write functions.
2) Improve the performance of all read floating point functions
   significantly. This is done by switching to TypedArrays as the
   write floating point write functions.
3) No implicit type coercion for offset and byteLength anymore.
4) Adds a lot of tests.
5) Moves the read and write functions to the internal buffer file
   to split the files in smaller chunks.
6) Reworked a lot of existing tests.
7) Improve the performane of all all read write functions by using
   a faster input validation and by improving function logic.
8) Significantly improved the performance of all read int functions.
   This is done by using a implementation without a loop.
9) Improved error handling.
10) Rename test file to use the correct subsystem.

PR-URL: https://github.com/nodejs/node/pull/18395
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2018-03-02 19:29:46 +00:00
Richard Lau
9e9c516512 doc: update list of re-exported symbols
libuv and zlib symbols are also purposefully re-exported by Node.js for
use in Addons.

Refs: https://github.com/nodejs/node/issues/17444

PR-URL: https://github.com/nodejs/node/pull/19013
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Matheus Marchini <matheus@sthima.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-03-02 10:38:37 -05:00
George Sapkin
1d19fd393c doc: Readable unpipe on Writable error event
PR-URL: https://github.com/nodejs/node/pull/18080
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-03-02 15:57:51 +01:00
Rod Vagg
0a3dcf782e 2018-03-02, Version 9.7.1 (Current)
No additional commits. New version published due to a bad
node-v9.7.0.pkg file that was published to nodejs.org in the previous
release.

Ref: https://github.com/nodejs/node/issues/19074
PR-URL: https://github.com/nodejs/node/pull/19081
2018-03-02 13:50:23 +11:00
Ruben Bridgewater
177b7314cf
buffer: improve Buffer#fill performance
1) This improves the performance for Buffer#fill by using shortcuts.
2) It also ports throwing errors to JS. That way they contain the
proper error code.
3) Using negative `end` values will from now on result in an error
instead of just doing nothing.
4) Passing in `null` as encoding is from now on accepted as 'utf8'.

PR-URL: https://github.com/nodejs/node/pull/18790
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2018-03-02 02:09:24 +00:00
Vse Mozhet Byt
d3af120f7a doc: add RegExp Unicode Property Escapes to intl
PR-URL: https://github.com/nodejs/node/pull/19052
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-03-02 02:34:37 +02:00
Glen Keane
740c426b21 doc: add a deprecation message for removing lttng
PR-URL: https://github.com/nodejs/node/pull/18982
Refs: https://github.com/nodejs/node/issues/18971
Refs: https://github.com/nodejs/node/pull/18975
Refs: https://github.com/nodejs/node/pull/18945
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@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: Jackson Tian <shyvo1987@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-03-01 16:47:16 +00:00
Glen Keane
30fd3d25df src: Remove lttng support.
This cleans up and removes lttng support completely. Recent discussion
on a PR to deprecate lttng suggested that we remove it completely
pending feedback from the TSC.

This should be considered a non breaking change, as a recent PR reveals
that compiling with this system has been broken for nearly two years.

Refs: https://github.com/nodejs/node/issues/18971
Refs: https://github.com/nodejs/node/pull/18975
Refs: https://github.com/nodejs/node/pull/18945

PR-URL: https://github.com/nodejs/node/pull/18982
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@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: Jackson Tian <shyvo1987@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-03-01 16:44:43 +00:00
Rod Vagg
197fbbed55 2018-03-01, Version 9.7.0 (Current)
Notable Changes:

* **libuv**:
  - Updated to libuv 1.19.2 (Colin Ihrig) [#18918](https://github.com/nodejs/node/pull/18918)

* **src**:
  - Add initial support for Node.js-specific post-mortem metadata (Matheus Marchini) [#14901](https://github.com/nodejs/node/pull/14901)

* **timers**:
  - The return value of `setImmediate()` now has `ref()` and `unref()` methods (Anatoli Papirovski) [#18139](https://github.com/nodejs/node/pull/18139)

* **util**:
  - It is now possible to get the name for a numerical platform-specific error code as a string (Joyee Cheung) [#18186](https://github.com/nodejs/node/pull/18186)

PR-URL: https://github.com/nodejs/node/pull/19040
Prepared-By: Anna Henningsen <anna@addaleax.net>
2018-03-01 20:47:02 +11:00
Wilson
a27e6d7321 doc: make the background section concise and improve its formality
PR-URL: https://github.com/nodejs/node/pull/18928
Reviewed-By: Claudio Rodriguez <cjrodr@yahoo.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-02-27 11:17:15 -03:00
Ruben Bridgewater
e9f2cecf1a
Revert "fs: Revert throw on invalid callbacks"
This reverts commit 8250bfd1e5.

PR-URL: https://github.com/nodejs/node/pull/18668
Refs: https://github.com/nodejs/node/pull/12562
Refs: https://github.com/nodejs/node/pull/12976
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
2018-02-26 23:18:12 +00:00
James M Snell
9e509b622b perf_hooks: emit trace events for marks, measures, and timerify
Adds the `node.perf.usertiming` trace events category for recording
usertiming marks and measures (e.g. `perf_hooks.performance.mark()`)
in the trace events timeline.

Adds the `node.perf.function` trace events category for recording
`perf_hooks.performance.timerify()` durations in the trace events
timeline.

PR-URL: https://github.com/nodejs/node/pull/18789
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2018-02-26 13:55:33 -08:00
Leko
e6b823d84a doc: remove redundant the
PR-URL: https://github.com/nodejs/node/pull/19008
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
2018-02-26 10:13:02 -08:00
Vse Mozhet Byt
fcebb16478 doc: fix/add link to Android info
We have two notes in API docs about Android support:
the first has no links, the second links to the table of supported OSs
where Android is not mentioned which may be confusing.

This PR makes both notes link to dedicated Android part of BUILDING.md.

PR-URL: https://github.com/nodejs/node/pull/19004
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
2018-02-26 18:27:29 +02:00
Sho Miyamoto
646e67e1dc doc: remove Returns: {undefined}
Removed * Returns: {undefined} in doc/ to prevent confusing users

PR-URL: https://github.com/nodejs/node/pull/18951
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2018-02-26 16:46:55 +02:00
Rich Trott
1460b31bd3 doc: update 2fa information in onboarding.md
Because it is no longer possible to add someone to the nodejs GitHub
organization if they do not have two-factor authentication enabled,
update the text of the onboarding documentatino to reflect this.

PR-URL: https://github.com/nodejs/node/pull/18968
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Weijia Wang <starkwang@126.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Shingo Inoue <leko.noor@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Matheus Marchini <matheus@sthima.com>
2018-02-26 22:01:15 +09:00
flickz
65ca369c07 doc: add process.debugPort to doc/api/process.md
Fixes: https://github.com/nodejs/node/issues/18639

PR-URL: https://github.com/nodejs/node/pull/18716
Refs: https://github.com/nodejs/node/issues/18639
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matheus Marchini <matheus@sthima.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2018-02-26 08:51:54 -03:00
陈刚
8b518edf11 doc: readable.push(undefined) in non-object mode
`readable.push()` supports `undefined` in non-object mode, but it was
not previously documented.

PR-URL: https://github.com/nodejs/node/pull/18283
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2018-02-26 10:23:45 +01:00
estrada9166
a29089d7c8
doc: add new documentation lint rule
Add 80 characters limit to docs.
Change docs to fit 80 characters per row.

PR-URL: https://github.com/nodejs/node/pull/18726
Fixes: https://github.com/nodejs/node/issues/18703
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
2018-02-23 16:26:29 +00:00
Myles Borins
8476815f01
2018-02-22, Version 9.6.1 (Current)
Notable changes:

* events:
  - `events.usingDomains` being set to false by default was removed in
    9.6.0 which was a change in behavior compared to 9.5.0. This
    behavior change has been reverted and the `events` object now has
    `usingDomains` preset to `false`, which is the behavior in 9.x
    prior to 9.6.0 (Myles Borins)
    https://github.com/nodejs/node/pull/18944

PR-URL: https://github.com/nodejs/node/pull/18946
2018-02-22 23:04:01 -05:00
Rich Trott
9cb96ac828 doc: remove extraneous "for example" text
No need to announce obvious example code as being example code. Remove
unneeded "for example" text as one small way to try to keep the docs
more concise..

PR-URL: https://github.com/nodejs/node/pull/18890
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Matheus Marchini <matheus@sthima.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
2018-02-23 02:53:21 +02:00
Luigi Pinca
54cb3c5759 doc: update description of 'clientError' event
Default behavior is to send a '400 Bad Request' response if the socket
is writable.

PR-URL: https://github.com/nodejs/node/pull/18885
Refs: https://github.com/nodejs/node/pull/15324
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-02-23 02:49:17 +02:00
Justin Lee
0329643b0f doc: fix link in onboarding.md
Remove link to the outdated members team

PR-URL: https://github.com/nodejs/node/pull/18878
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Matheus Marchini <matheus@sthima.com>
2018-02-23 02:49:14 +02:00
Myles Borins
945eb1bb69
2018-02-22, Version 9.6.0 (Current)
Notable changes:

* async_hooks:
  - deprecate unsafe emit{Before,After} (Ali Ijaz Sheikh)
    https://github.com/nodejs/node/pull/18513
  - rename PromiseWrap.parentId to PromiseWrap.isChainedPromise
    (Ali Ijaz Sheikh) https://github.com/nodejs/node/pull/18633
* deps:
  - update node-inspect to 1.11.3 (Jan Krems)
    https://github.com/nodejs/node/pull/18354
  - ICU 60.2 bump (Steven R. Loomis)
    https://github.com/nodejs/node/pull/17687
  - Introduce ScriptOrModule and HostDefinedOptions to V8 (Jan Krems)
    https://github.com/nodejs/node/pull/16889
* http:
  - add options to http.createServer() for `IncomingMessage` and
    `ServerReponse` (Peter Marton)
    https://github.com/nodejs/node/pull/15752
* http2:
  - add http fallback options to .createServer (Peter Marton)
    https://github.com/nodejs/node/pull/15752
* https:
  - Adds the remaining options from tls.createSecureContext() to the
    string generated by Agent#getName(). This allows https.request()
    to accept the options and generate unique sockets appropriately.
    (Jeff Principe)
    https://github.com/nodejs/node/pull/16402
* inspector:
  - --inspect-brk for es modules (Guy Bedford)
    https://github.com/nodejs/node/pull/18194
* lib:
  - allow process kill by signal number (Sam Roberts)
    https://github.com/nodejs/node/pull/16944
* module:
  - enable dynamic import (Myles Borins)
    https://github.com/nodejs/node/pull/18387
  - dynamic import is now supported (Jan Krems)
    https://github.com/nodejs/node/pull/15713
* napi:
  - add methods to open/close callback scope (Michael Dawson)
    https://github.com/nodejs/node/pull/18089
* src:
  - allow --perf-(basic-)?prof in NODE_OPTIONS (Leko)
    https://github.com/nodejs/node/pull/17600
* vm:
  - add support for es modules (Gus Caplan)
    https://github.com/nodejs/node/pull/17560

PR-URL: https://github.com/nodejs/node/pull/18902
2018-02-22 12:02:49 -05:00
Ruben Bridgewater
d6fc7e3af4
doc: enable eslint prefer-template rule
PR-URL: https://github.com/nodejs/node/pull/18831
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Matheus Marchini <matheus@sthima.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-02-22 14:56:17 +00:00
Ruben Bridgewater
6e1c25c456
errors: update all internal errors
This updates all internal errors to the new error type. While doing
so it removes unused errors.

A few errors currently seem to have the wrong type. To identify them
later, comments were added next to the error type.

PR-URL: https://github.com/nodejs/node/pull/18857
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2018-02-22 13:36:19 +00:00
Sarat Addepalli
b1e52fe2ea
fs: support as and as+ flags in stringToFlags()
PR-URL: https://github.com/nodejs/node/pull/18801
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Matheus Marchini <matheus@sthima.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-02-22 12:12:51 +01:00
Hannes Magnusson
6aab9e1eed
crypto: add docs & tests for cert.pubkey & cert.fingerprint256
Include example on how to pin certificate and/or public key

PR-URL: https://github.com/nodejs/node/pull/17690
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-02-22 11:22:14 +01:00
Rich Trott
e53275d819 doc: fix minor grammar/typographical issues in onboarding.md
PR-URL: https://github.com/nodejs/node/pull/18847
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matheus Marchini <matheus@sthima.com>
2018-02-21 00:30:25 -08:00
Rich Trott
1b83a9df05 doc: update onboarding.md for faster exercise completion
Note that the CI run for the exercise can be minimal.

PR-URL: https://github.com/nodejs/node/pull/18846
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Matheus Marchini <matheus@sthima.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2018-02-21 00:28:10 -08:00
dustinnewman98
e83adf87f5 doc: improved documentation for fs.unlink()
Refs: https://github.com/nodejs/node/issues/11135

PR-URL: https://github.com/nodejs/node/pull/18843
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Matheus Marchini <matheus@sthima.com>
2018-02-20 10:06:29 -03:00
Justin Lee
2caa1f5458 doc: fix broken link in pull-requests.md
PR-URL: https://github.com/nodejs/node/pull/18873
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2018-02-20 02:18:03 +02:00
Vse Mozhet Byt
469036add4 doc: fix typo in http2.md
PR-URL: https://github.com/nodejs/node/pull/18872
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2018-02-20 00:01:50 +02:00
Matteo Collina
3d93f39190 http2: make response.end() return this
PR-URL: https://github.com/nodejs/node/pull/18780
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-02-19 08:59:47 +01:00
Matteo Collina
8118da7430 http: OutgoingMessage.end() should return this
PR-URL: https://github.com/nodejs/node/pull/18780
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-02-19 08:59:32 +01:00
Matteo Collina
f6721c20df stream: writable.end should return this.
PR-URL: https://github.com/nodejs/node/pull/18780
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-02-19 08:59:12 +01:00
Alhadis
ef7f5a11e8
doc: refactor manpage to use mdoc(7) macros
Like man(7), mdoc(7) is a macro package for marking up computer manuals.
The main difference is that mdoc is semantic rather than presentational,
providing authors with a full DSL to abstract page markup from low-level
Roff commands. By contrast, `man` is minimalist and leaves formatting to
the author, who is expected to have a working amount of Roff knowledge.

Therefore the use of `mdoc` for marking up Node's manpage is a decidedly
better choice than bare `man`. Less room is left for error and mandoc(1)
offers very robust error-checking and linting.

PR-URL: https://github.com/nodejs/node/pull/18559
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
2018-02-17 15:43:29 +01:00
Bartosz Sosnowski
ea1a07656e
doc: mark accessing IPC channel fd as undefined
Adds note that accessing the fd of the IPC channel in any other way
than process.send, or using the IPC channel with child processes that
is not Node.js is not supported.

PR-URL: https://github.com/nodejs/node/pull/17545
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-02-17 15:24:38 +01:00
Michaël Zasso
513d939720 fs: move fs.promises API to fs/promises
PR-URL: https://github.com/nodejs/node/pull/18777
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2018-02-17 10:15:20 +01:00
Anna Henningsen
cbe6d5c519 doc: warn against concurrent http2stream.respondWithFD
Upcoming changes to move away from synchronous I/O on the main
thread will imply that using the same file descriptor to
respond on multiple HTTP/2 streams at the same time is invalid,
because at least on Windows `uv_fs_read()` is race-y.

Therefore, warn against such usage.

PR-URL: https://github.com/nodejs/node/pull/18762
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-02-16 13:54:14 -08:00
Ivan Filenko
755d805bf4 doc: add fs declarations to stream doc js examples
PR-URL: https://github.com/nodejs/node/pull/18804
Reviewed-By: Weijia Wang <starkwang@126.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
2018-02-16 23:34:32 +02:00
Ruben Bridgewater
69f7ce9cea
doc: activate no-multiple-empty-lines rule
This enables the `no-multiple-empty-lines` eslint rule for the docs.

PR-URL: https://github.com/nodejs/node/pull/18747
Reviewed-By: Weijia Wang <starkwang@126.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: Matheus Marchini <matheus@sthima.com>
2018-02-16 21:58:26 +01:00
Gibson Fahnestock
61e3e6d56f
doc: note that linting is required in releases.md
Refs: https://github.com/nodejs/node/pull/18769

PR-URL: https://github.com/nodejs/node/pull/18776
Refs: https://github.com/nodejs/node/pull/18769
Reviewed-By: Matheus Marchini <matheus@sthima.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-02-16 19:41:19 +01:00
Sho Miyamoto
9a18b0e668
doc: add missing Returns in fs & util
PR-URL: https://github.com/nodejs/node/pull/18775
Reviewed-By: Weijia Wang <starkwang@126.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2018-02-16 19:40:06 +01:00
Sho Miyamoto
ff471da1a8
doc: fix a typo in util.isDeepStrictEqual
PR-URL: https://github.com/nodejs/node/pull/18775
Reviewed-By: Weijia Wang <starkwang@126.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2018-02-16 19:40:05 +01:00
Ruben Bridgewater
463d1a490f
test,benchmark,doc: enable dot-notation rule
This enables the eslint dot-notation rule for all code instead of
only in /lib.

PR-URL: https://github.com/nodejs/node/pull/18749
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matheus Marchini <matheus@sthima.com>
2018-02-16 19:37:43 +01:00
Ruben Bridgewater
703e37cf3f
process: deprecate process.assert()
This was never documented and the `assert` module should be used
instead.

PR-URL: https://github.com/nodejs/node/pull/18666
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-02-16 17:02:38 +01:00
Ruben Bridgewater
1bd32087ee
doc: fix deprecation number
PR-URL: https://github.com/nodejs/node/pull/18818
Refs: efb32592e1
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-02-16 16:59:40 +01:00
Ruben Bridgewater
15bb8437fd
tools: add assert.doesNotThrow eslint rule
Prohibit the usage of `assert.doesNotThrow()`.

PR-URL: https://github.com/nodejs/node/pull/18669
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2018-02-16 16:54:57 +01:00
Ruben Bridgewater
759a083d44
doc: update buffer examples
Move the print statements below a console.log call.

PR-URL: https://github.com/nodejs/node/pull/18758
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
2018-02-16 16:01:28 +01:00
Ali Ijaz Sheikh
efb32592e1 src: deprecate legacy node::MakeCallback
The legacy MakeCallback functions do not provide a mechanism to
propagate async context. This means that any native modules using these
directly is likely breaking async debugging & tracing tools. For
example it is possible that such a module will cause incorrect async
stack traces to be reported (even when the module is not on the stack).

The new MakeCallback allow the user to specify the async context in
which the callback is to be executed.

Ref: https://github.com/nodejs/node/issues/13254
PR-URL: https://github.com/nodejs/node/pull/18632
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Jan Krems <jan.krems@gmail.com>
Reviewed-By: Andreas Madsen <amwebdk@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
2018-02-15 17:44:48 -08:00
Miles Elam
baf8495078 http: process 100, 102-199 according to specs.
Adding ServerResponse.writeProcessing to send 102 status codes.

Added an `'information'` event to ClientRequest to handle
1xx status codes except 101 Upgrade.
101 Upgrade is excluded due to its non-informational
processing according to RFC7231, Section 6.2.2.

This affects several modules downstream that use the http
module, e.g., node-fetch, all of whom violate HTTP RFCs
due to this module. As such, this could introduce a
breaking change for downstream if HTTP standards were
ignored in an ad-hoc fashion.

See also RFC2518 RFC8297.

PR-URL: https://github.com/nodejs/node/pull/18033
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
2018-02-15 11:57:57 +01:00
Antoine AMARA
138bdf6114 doc: update crypo Certficate class.
Update the dead link to <keygen> documentation.
Add a link to mozilla developper documentation because
W3C deleted the reference to this element.

Add a note to inform <keygen> element is deprecated since HTML 5.2.

PR-URL: https://github.com/nodejs/node/pull/18721
Fixes: https://github.com/nodejs/node/issues/18662
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
2018-02-14 23:05:56 +02:00
Guy Bedford
f1fc426cce module: support main w/o extension, pjson cache
This adds support for ensuring that the top-level main into Node is
supported loading when it has no extension for backwards-compat with
NodeJS bin workflows.

In addition package.json caching is implemented in the module lookup
process.

PR-URL: https://github.com/nodejs/node/pull/18728
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2018-02-14 16:35:12 +02:00
Anna Henningsen
80ac941407
doc: make linter happy
This was not caught by the linter because the release commit
for 6.13.0 came from a different branch, where we don’t apply it
like we do on the main branch.

Example failure: https://ci.nodejs.org/job/node-test-linter/16132/console

PR-URL: https://github.com/nodejs/node/pull/18769
Reviewed-By: Matheus Marchini <matheus@sthima.com>
2018-02-14 00:46:09 +01:00
Myles Borins
60e612d0b0
2018-01-13, Version 6.13.0 'Boron' (LTS)
This LTS release comes with 112 commits, 17 of which are considered
Semver-Minor. This includes 32 which are doc related, 30 which are test
related, 8 which are build / tool related and 1 commit which updates
a dependency.

Notable Changes:

* console:
  - added console.count() and console.clear() (James M Snell)
    https://github.com/nodejs/node/pull/12678
* crypto:
  - expose ECDH class (Bryan English)
    https://github.com/nodejs/node/pull/8188
  - added cypto.randomFill() and crypto.randomFillSync() (Evan Lucas)
    https://github.com/nodejs/node/pull/10209
  - warn on invalid authentication tag length (Tobias Nießen)
    https://github.com/nodejs/node/pull/17566
* deps:
  - upgrade libuv to 1.16.1 (cjihrig)
    https://github.com/nodejs/node/pull/16835
* dgram:
  - added socket.setMulticastInterface() (Will Young)
    https://github.com/nodejs/node/pull/7855
* http:
  - add agent.keepSocketAlive and agent.reuseSocket as to allow
    overridable keep-alive behavior of `Agent` (Fedor Indutny)
    https://github.com/nodejs/node/pull/13005
* lib:
  - return this from net.Socket.end() (Sam Roberts)
    https://github.com/nodejs/node/pull/13481
* module:
  - add builtinModules api that provides list of all builtin modules in
    Node (Jon Moss)
    https://github.com/nodejs/node/pull/16386
* net:
  - return this from getConnections() (Sam Roberts)
    https://github.com/nodejs/node/pull/13553
* promises:
  - more robust stringification for unhandled rejections (Timothy Gu)
    https://github.com/nodejs/node/pull/13784
* repl:
  - improve require() autocompletion (Alexey Orlenko)
    https://github.com/nodejs/node/pull/14409
* src:
  - add openssl-system-ca-path configure option (Daniel Bevenius)
    https://github.com/nodejs/node/pull/16790
  - add --use-bundled-ca --use-openssl-ca check (Daniel Bevenius)
    https://github.com/nodejs/node/pull/12087
  - add process.ppid (cjihrig)
    https://github.com/nodejs/node/pull/16839
* tls:
  - accept `lookup` option for `tls.connect()` (Fedor Indutny)
    https://github.com/nodejs/node/pull/12839
* tools, build:
  - a new macOS installer! (JP Wesselink)
    https://github.com/nodejs/node/pull/15179
* url:
  - WHATWG URL api support (James M Snell)
    https://github.com/nodejs/node/pull/7448
* util:
  - add %i and %f formatting specifiers (Roman Reiss)
    https://github.com/nodejs/node/pull/10308

PR-URL: https://github.com/nodejs/node/pull/18342
2018-02-13 14:01:52 -05:00
James M Snell
2287deab94
fs: make URL paths no longer experimental
PR-URL: https://github.com/nodejs/node/pull/18591
Reviewed-By: Weijia Wang <starkwang@126.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-02-12 16:21:18 +01:00
Ruben Bridgewater
60c9ad7979
repl: remove deprecated NODE_REPL_HISTORY_FILE
PR-URL: https://github.com/nodejs/node/pull/13876
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-02-12 14:58:55 +01:00
Ali Ijaz Sheikh
9f6a565901 async_hooks: rename PromiseWrap.parentId
Rename the `parentId` property on the PromiseWrap object to a
`isChainedPromise` property. The former wasn't quite useful as it was
always defined to be the same value as the trigger id available in the
init hook. Instead rename the property to be closer to the information
it communicates: whether the promise is a chained promise or not.

PR-URL: https://github.com/nodejs/node/pull/18633
Fixes: https://github.com/nodejs/node/issues/18470
Reviewed-By: Andreas Madsen <amwebdk@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
2018-02-12 07:13:52 -05:00
Tobias Nießen
a1bab826c4
doc: mark NAPI_AUTO_LENGTH as code
PR-URL: https://github.com/nodejs/node/pull/18697
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-02-11 12:12:16 +01:00
Evan Lucas
540cbf84af
doc: add error check to fs example
Previously, the err passed to the callback of fs.open() was not checked.

PR-URL: https://github.com/nodejs/node/pull/18681
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2018-02-10 16:05:31 +01:00
Aonghus O Nia
2bead4ba9e
doc: fix exporting a function example
Missing the length argument in napi_create_function.

PR-URL: https://github.com/nodejs/node/pull/18661
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2018-02-10 16:03:01 +01:00
Steven
fafd5b0758
doc: add history for url.parse
PR-URL: https://github.com/nodejs/node/pull/18685
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
2018-02-10 16:02:09 +01:00
Tobias Nießen
38bac4266a
crypto: allow passing null as IV unless required
PR-URL: https://github.com/nodejs/node/pull/18644
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-02-10 15:58:46 +01:00
Jeff Principe
6007a9cc0e
https: add extra options to Agent#getName()
Adds the remaining options from tls.createSecureContext() to the
string generated by Agent#getName(). This allows https.request() to
accept the options and generate unique sockets appropriately.

PR-URL: https://github.com/nodejs/node/pull/16402
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-02-10 14:15:57 +01:00
Justin Lee
37c88f080d doc: fix links to Style Guide and CPP Style Guide
PR-URL: https://github.com/nodejs/node/pull/18683
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-02-10 03:12:12 +02:00
Ali Ijaz Sheikh
523a1550a3 async_hooks: deprecate unsafe emit{Before,After}
The emit{Before,After} APIs in AsyncResource are problematic.

* emit{Before,After} are named to suggest that the only thing they do
  is emit the before and after hooks. However, they in fact, mutate
  the current execution context.
* They must be properly nested. Failure to do so by user code leads
  to catastrophic (unrecoverable) exceptions. It is very easy for the
  users to forget that they must be using a try/finally block around
  the code that must be surrounded by these operations. Even the
  example provided in the official docs makes this mistake. Failing
  to use a finally can lead to a catastrophic crash if the callback
  ends up throwing.

This change provides a safer `runInAsyncScope` API as an alternative
and deprecates emit{Before,After}.

PR-URL: https://github.com/nodejs/node/pull/18513
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Andreas Madsen <amwebdk@gmail.com>
2018-02-09 13:03:34 -08:00
Peter Marton
e5f101fe7b
http2: add req and res options to server creation
Add optional Http2ServerRequest and Http2ServerResponse options
to createServer and createSecureServer. Allows custom req & res
classes that extend the default ones to be used without
overriding the prototype.

PR-URL: https://github.com/nodejs/node/pull/15560
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2018-02-09 12:54:18 -05:00
Anatoli Papirovski
dbd1d1d43f
doc: fix arg definition in fs
Currently doc building doesn't support ES-style default params in
function definitions which causes an error.

PR-URL: https://github.com/nodejs/node/pull/18678
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Gus Caplan <me@gus.host>
2018-02-09 11:28:16 -05:00
Vse Mozhet Byt
8e70811cc8 doc: fix links in YAML metadata of assert.md
PR-URL: https://github.com/nodejs/node/pull/18670
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-02-09 17:15:47 +02:00
Andreas Madsen
14bc3e22f3
domain: runtime deprecate MakeCallback
Users of MakeCallback that adds the domain property to carry context,
should start using the async_context variant of MakeCallback or the
AsyncResource class.

PR-URL: https://github.com/nodejs/node/pull/17417
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-02-09 10:38:50 +01:00
Tobias Nießen
95a35bcf06
doc: add missing meta for createCipheriv
PR-URL: https://github.com/nodejs/node/pull/18651
Refs: https://github.com/nodejs/node/pull/8281
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
2018-02-09 01:26:39 +01:00
Tobias Nießen
4927d94f4d
doc: fix description of createDecipheriv
PR-URL: https://github.com/nodejs/node/pull/18651
Refs: https://github.com/nodejs/node/pull/12223
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
2018-02-09 01:26:35 +01:00
James M Snell
d3569b623c
doc: remove **Note:** tags
Remove the various **Note:** prefixes throughout the docs.

PR-URL: https://github.com/nodejs/node/pull/18592
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2018-02-08 11:57:14 -05:00
Vse Mozhet Byt
259f62a8e8 doc: fix MDN links to avoid redirections
developer.mozilla.org/en/... -> developer.mozilla.org/en-US/...

PR-URL: https://github.com/nodejs/node/pull/18631
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2018-02-08 01:48:58 +02:00
Vse Mozhet Byt
f783d61ad3 doc: fix link in https.md
PR-URL: https://github.com/nodejs/node/pull/18630
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-02-08 01:30:42 +02:00
Tim O. Peters
4ac7be94f0
doc: be more explicit in the sypnosis
Assuming less knowledge on the part of the reader, making it easier
to get start using Node.js.

PR-URL: https://github.com/nodejs/node/pull/17977
Fixes: https://github.com/nodejs/node/issues/17970,
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2018-02-07 15:06:14 +01:00
Guy Bedford
93df1169ea
lib,doc: revert format name to cjs over commonjs
PR-URL: https://github.com/nodejs/node/pull/18596
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-02-07 15:02:01 +01:00
Vse Mozhet Byt
bff5d5b8f0 tools: add FileHandle to doc/type-parser.js
PR-URL: https://github.com/nodejs/node/pull/18601
Refs: https://github.com/nodejs/node/pull/18407
Refs: https://github.com/nodejs/node/pull/18444
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-02-07 00:27:43 +02:00
Luigi Pinca
610cac26f0
doc: add missing "changes" key in YAML comment
PR-URL: https://github.com/nodejs/node/pull/18605
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
2018-02-06 23:01:12 +01:00
Vse Mozhet Byt
d1d9e2fce5 doc: fix typo in http2.md
PR-URL: https://github.com/nodejs/node/pull/18602
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-02-06 20:45:17 +02:00
Vse Mozhet Byt
ac829f0135 doc: add missing URL types in fs promise API
This seems to be slipped in https://github.com/nodejs/node/pull/18297

PR-URL: https://github.com/nodejs/node/pull/18599
Refs: https://github.com/nodejs/node/pull/18309
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Khaidi Chu <i@2333.moe>
2018-02-06 17:31:48 +02:00
Peter Marton
f6e1466352
http2: add http fallback options to .createServer
This adds the Http1IncomingMessage and Http1ServerReponse options
to http2.createServer().

PR-URL: https://github.com/nodejs/node/pull/15752
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
2018-02-06 15:40:25 +01:00
Peter Marton
a899576c97
http: add options to http.createServer()
This adds the optional options argument to `http.createServer()`.
It contains two options: the `IncomingMessage` and `ServerReponse`
option.

PR-URL: https://github.com/nodejs/node/pull/15752
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
2018-02-06 15:40:24 +01:00
Anna Henningsen
82a7347050
doc,assert,timers: assign deprecation codes
Overlooked when landing the respective PRs.

PR-URL: https://github.com/nodejs/node/pull/18564
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
2018-02-06 13:57:31 +01:00
Gus Caplan
9686d876d1
doc: update onboarding-extras
Mention the new modules team.

PR-URL: https://github.com/nodejs/node/pull/18545
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Bradley Farias <bradley.meck@gmail.com>
2018-02-06 13:55:38 +01:00
陈刚
766eea6ca4
doc: modify the return value of request.write()
PR-URL: https://github.com/nodejs/node/pull/18526
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-02-06 13:54:16 +01:00
Vse Mozhet Byt
6101bd209e doc: fix typo in n-api.md
PR-URL: https://github.com/nodejs/node/pull/18590
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Weijia Wang <starkwang@126.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
2018-02-06 12:44:29 +02:00
Weijia Wang
bc51428bf8 doc: add introduce about cli options
PR-URL: https://github.com/nodejs/node/pull/18475
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-02-06 15:26:20 +08:00
James M Snell
329fc78e49 fs: add initial set of fs.promises APIs
Initial set of fs.promises APIs with documentation and one
benchmark.

PR-URL: https://github.com/nodejs/node/pull/18297
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2018-02-05 20:31:04 -08:00
Michael Dawson
a555397185 n-api: add methods to open/close callback scope
Add support for the following methods;
  napi_open_callback_scope
  napi_close_callback_scope

These are needed when running asynchronous methods directly
using uv.

PR-URL: https://github.com/nodejs/node/pull/18089
Fixes: https://github.com/nodejs/node/issues/15604
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2018-02-05 17:10:19 -05:00
iskore
c2b9048ac8 doc: small typo in n-api.md
PR-URL: https://github.com/nodejs/node/pull/18555
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
2018-02-05 15:43:00 -05:00
Michael Dawson
629a4476f0 doc: remove usage of you in n-api doc
We avoid using 'you' in the documentation based on our
guidelines. Remove usage in the n-api doc.

PR-URL: https://github.com/nodejs/node/pull/18528
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
2018-02-05 15:16:19 -05:00
Ali Ijaz Sheikh
d4b605b990 doc: expand on promises and async_hooks
AsyncHooks have a few subtleties with being able to track promises.
This commit adds a section to the docs that explains things the issues.

PR-URL: https://github.com/nodejs/node/pull/18540
Fixes: https://github.com/nodejs/node/issues/18520
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-02-05 09:36:42 -08:00
Anna Henningsen
05e702d9f1
doc: fix REPLACEME in changelog PR URLs
PR-URL: https://github.com/nodejs/node/pull/18561
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
2018-02-04 19:28:12 +01:00
jvelezpo
95eb02dc74
doc: shell option for the execFile and execFileSync functions
Useful for executing in a shell because it accepts arguments as
an array instead of a string as exec does.
Depending on the circumstances,
that can prove to be useful if the arguments are already prepared.

PR-URL: https://github.com/nodejs/node/pull/18237
Fixes: https://github.com/nodejs/node/issues/18199
Reviewed-By: Julian Duque <julianduquej@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Adrian Estrada <edsadr@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-02-04 16:51:49 +01:00
Guangcong Luo
27ee08363b
doc: improve http.request documentation
PR-URL: https://github.com/nodejs/node/pull/18289
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-02-04 16:48:51 +01:00
Kelvin Jin
71b15e8c7b
doc: remove removed apis from http2 docs
PR-URL: https://github.com/nodejs/node/pull/18439
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
2018-02-04 16:33:53 +01:00
Gus Caplan
6d84ecefcd
vm: flip Module#link's signature
The specifier parameter is deemed to be more essential than
referencingModule. Flipping the parameter order allows developers to
write simple linker functions that only take in a specifier.

PR-URL: https://github.com/nodejs/node/pull/18471
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-02-03 11:04:34 -08:00
Jeremiah Senkpiel
68783ae0b8 timers: runtime-deprecate {un}enroll()
This was never a Very Good API, and generally just left so many open
ends for inconsistent behavior. The "optimization" benefit of this API
is little to none. Makes a starting step towards removing it so that in
the future timers, especially in their async_hooks interactions, can be
simplified.

PR-URL: https://github.com/nodejs/node/pull/18066
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-02-02 14:05:43 -05:00
Ruben Bridgewater
70dcacd710
assert: deprecate assert.fail partially
Using `assert.fail()` with more than one argument is not intuitive
to use and has no benefit over using a message on its own.

Therefore this introduces a runtime deprecation in case it is used
in that way.

PR-URL: https://github.com/nodejs/node/pull/18418
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2018-02-02 19:05:22 +01:00
James M Snell
6e7992e8b8 crypto: docs-only deprecate crypto.fips, replace
Docs-only deprecate the getter/setter crypto.fips and replace
with crypto.setFips() and crypto.getFips()

This is specifically in preparation for ESM module support

PR-URL: https://github.com/nodejs/node/pull/18335
Refs: https://github.com/nodejs/node/pull/18131
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-02-02 07:50:31 -08:00
James M Snell
2ac6658296 crypto,doc: fix unassignd deprecation codes
Missed when landing the original PRs

PR-URL: https://github.com/nodejs/node/pull/18492
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-02-01 08:09:38 -08:00
Michaël Zasso
9e1a6f8cb1
src,lib: implement import.meta
Implement the C++ callback that is required to configure the
`import.meta` object and add one property:
- url: absolute URL of the module

PR-URL: https://github.com/nodejs/node/pull/18368
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Reviewed-By: Bradley Farias <bradley.meck@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
2018-02-01 13:46:56 +01:00
Leko
7ff4888ed2
src: allow --perf-(basic-)?prof in NODE_OPTIONS
PR-URL: https://github.com/nodejs/node/pull/17600
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2018-02-01 13:38:24 +01:00
陈刚
3ca79350d9
doc: improve stream documentation
PR-URL: https://github.com/nodejs/node/pull/18375
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-02-01 11:49:18 +01:00
Hackzzila
300f5ce346
doc: deprecate top-level this
PR-URL: https://github.com/nodejs/node/pull/16878
Fixes: https://github.com/nodejs/node/issues/9623
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-02-01 11:35:22 +01:00
Jamie Davis
67a4ce1c6e
fs: partition readFile against pool exhaustion
Problem:

Node implements fs.readFile as:
- a call to stat, then
- a C++ -> libuv request to read the entire file using the stat size

Why is this bad?
The effect is to place on the libuv threadpool a potentially-large
read request, occupying the libuv thread until it completes.
While readFile certainly requires buffering the entire file contents,
it can partition the read into smaller buffers
(as is done on other read paths)
along the way to avoid threadpool exhaustion.

If the file is relatively large or stored on a slow medium, reading
the entire file in one shot seems particularly harmful,
and presents a possible DoS vector.

Solution:

Partition the read into multiple smaller requests.

Considerations:

1. Correctness

I don't think partitioning the read like this raises
any additional risk of read-write races on the FS.
If the application is concurrently readFile'ing and modifying the file,
it will already see funny behavior. Though libuv uses preadv where
available, this doesn't guarantee read atomicity in the presence of
concurrent writes.

2. Performance

Downside: Partitioning means that a single large readFile will
  require into many "out and back" requests to libuv,
  introducing overhead.
Upside: In between each "out and back", other work pending on the
  threadpool can take a turn.

In short, although partitioning will slow down a large request,
it will lead to better throughput if the threadpool is handling
more than one type of request.

Fixes: https://github.com/nodejs/node/issues/17047

PR-URL: https://github.com/nodejs/node/pull/17054
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-02-01 11:11:48 +01:00
Ruben Bridgewater
936eea5099
doc: document asserts Weak(Map|Set) behavior
Right now it is not documentated that WeakMap entries are not
compared. This might result in some confusion. This adds a note
about the behavior in `assert.deepStrictEqual`. This documentation
is also references in `util.isDeepStrictEqual`, so we do not have
to document it again for that function as the underlying algorithm
is the same.

PR-URL: https://github.com/nodejs/node/pull/18248
Fixes: https://github.com/nodejs/node/issues/18228
Refs: https://github.com/nodejs/node/pull/18228
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2018-02-01 09:41:47 +01:00
Ruben Bridgewater
3cd7977a42
assert: use a default message in assert
In case no arguments are passed to `assert.ok` it should just
use a default message. Otherwise `assert.ok` can not be used as
a callback.

PR-URL: https://github.com/nodejs/node/pull/18319
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Weijia Wang <starkwang@126.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2018-02-01 09:21:38 +01:00
James M Snell
6035beea93 crypto: runtime deprecate DEFAULT_ENCODING
Runtime deprecate the crypto.DEFAULT_ENCODING property.

This is specifically in preparation for eventual ESM support
Refs: https://github.com/nodejs/node/pull/18131

PR-URL: https://github.com/nodejs/node/pull/18333
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2018-01-31 17:33:41 -08:00
Vse Mozhet Byt
fd3a0cfb7c doc: linkify missing types
Also, alphabetize all types in type-parser.js
and fix some nits in type formats.

PR-URL: https://github.com/nodejs/node/pull/18444
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-02-01 02:52:31 +02:00
Evan Lucas
83d0f4c92b 2018-01-31, Version 9.5.0 (Current)
Notable changes:

* cluster
  - add cwd to cluster.settings (cjihrig) [#18399](https://github.com/nodejs/node/pull/18399)
* deps
  - upgrade libuv to 1.19.1 (cjihrig) [#18260](https://github.com/nodejs/node/pull/18260)
* meta
  - add Leko to collaborators (Leko) [#18117](https://github.com/nodejs/node/pull/18117)
  - add vdeturckheim as collaborator (vdeturckheim) [#18432](https://github.com/nodejs/node/pull/18432)
* n-api
  - expose n-api version in process.versions (Michael Dawson) [#18067](https://github.com/nodejs/node/pull/18067)
* perf_hooks
  - add performance.clear() (James M Snell) [#18046](https://github.com/nodejs/node/pull/18046)
* stream
  - avoid writeAfterEnd() while ending (陈刚) [#18170](https://github.com/nodejs/node/pull/18170)

PR-URL: https://github.com/nodejs/node/pull/18464
2018-01-31 18:06:32 -06:00
Myles Borins
ba3d55a3b8
module: enable dynamic import flag for esmodules
currently if you want to use dynamic import you must use both the
`--experimental-modules` and the `--harmony-dynamic-imports` flags.
Chrome is currently shipping dynamic import unflagged, the flag
only remains in V8 to guard embedders who have not set the appropriate
callback from throwing an unhandled rejection when the feature is used.

As such it is reasonable to enable the flag by default for
`--experimental-modules`

PR-URL: https://github.com/nodejs/node/pull/18387
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jan Krems <jan.krems@gmail.com>
Reviewed-By: Bradley Farias <bradley.meck@gmail.com>
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2018-01-31 16:05:23 -08:00
James M Snell
6bcd31f2f4 perf_hooks: add warning when too many entries in the timeline
PR-URL: https://github.com/nodejs/node/pull/18087
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2018-01-31 15:24:58 -08:00
Michaël Zasso
312414662b url: expose the WHATWG URL API globally
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>
2018-01-31 16:00:51 +01:00
Gus Caplan
0993fbe5b2
vm: add modules
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>
2018-01-30 17:00:57 -08:00
Сковорода Никита Андреевич
4efde4d0d4 doc: add pending-deprecation to deprecations list
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>
2018-01-31 01:22:43 +03:00
Roman Reiss
e56189ed58
doc: fix manpage warnings
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>
2018-01-30 18:51:26 +01:00
Tobias Nießen
a1781230cd
doc: warn about GCM authenticity
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>
2018-01-30 16:37:53 +01:00
cjihrig
e0864e50ec
cluster: add cwd to cluster.settings
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>
2018-01-29 10:24:45 -05:00
Vse Mozhet Byt
5c8ce90c2f doc: unify type linkification
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>
2018-01-28 03:48:27 +02:00
Adam Engebretson
287f21e31d doc: fix typo in REPL docs
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>
2018-01-27 03:36:41 +02:00
Matheus Marchini
756a34e863
src, test: node internals' postmortem metadata
Before these changes, only V8 added postmortem metadata to Node's
binary, limiting the possibilities for debugger's developers to add some
features that rely on investigating Node's internal structures.

These changes are first steps towards empowering debug tools to
navigate Node's internal structures. One example of what can be
achieved with this is shown at nodejs/llnode#122 (a command which prints
information about handles and requests on the queue for a core dump
file). Node postmortem metadata are prefixed with nodedbg_.

This also adds tests to validate if all postmortem metadata are
calculated correctly, plus some documentation on what is postmortem
metadata and a few care to be taken to avoid breaking it.

Ref: https://github.com/nodejs/llnode/pull/122
Ref: https://github.com/nodejs/post-mortem/issues/46

PR-URL: https://github.com/nodejs/node/pull/14901
Refs: https://github.com/nodejs/post-mortem/issues/46
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2018-01-26 08:55:36 +08:00
sreepurnajasti
c016cc2b17 doc: fix e.g., to e.g. in docs
PR-URL: https://github.com/nodejs/node/pull/18369
Fixes: https://github.com/nodejs/code-and-learn/issues/58
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2018-01-25 16:29:50 +02:00
Rod Vagg
57bd27eda8 Revert "build,test: make building addon tests less fragile"
This reverts commit d9b59def72.

Breaks downloadable source tarball builds as we remove some files prior
to creating a tarball but those files are included in the comprehensive
list of dependencies listed in .deps.

Ref: https://github.com/nodejs/node/pull/17407
PR-URL: https://github.com/nodejs/node/pull/18287
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2018-01-25 08:18:24 +11:00
Peter Dalgaard-Jensen
b886c424fb doc: fix documentation of http2Stream.pushstream()
Improve documentation of callback signature of
http2Stream.pushStream() function to align with
the changes made in https://github.com/nodejs/node/pull/17406.

PR-URL: https://github.com/nodejs/node/pull/18258
Fixes: https://github.com/nodejs/node/issues/18198
Refs: https://github.com/nodejs/node/pull/17406
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-01-24 21:04:01 +02:00
Peter Dalgaard-Jensen
553d4ee57d doc: fix return value for require.resolve.paths()
Update documentation of modules.md for require.resolve.paths()
to include the possibillity of null as a return value if
the request string given matches a core module name.

PR-URL: https://github.com/nodejs/node/pull/18350
Fixes: https://github.com/nodejs/node/issues/18230
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-01-24 20:44:30 +02:00
Ali Ijaz Sheikh
98d9540dd7 src: use uv_hrtime as tracing timestamp
Override the V8 TracingController to provide uv_hrtime based
timestamps. This allows tracing timestamps to be comparable with
process.hrtime timestamps.

Fixes: https://github.com/nodejs/node/issues/17349
PR-URL: https://github.com/nodejs/node/pull/18196
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Andreas Madsen <amwebdk@gmail.com>
2018-01-24 09:58:28 -08:00
Ruben Bridgewater
e65a6e81ef
assert: stricter ifError
This makes `assert.ifError` stricter by only accepting `null` and
`undefined` from now on. Before any truthy value was accepted.

PR-URL: https://github.com/nodejs/node/pull/18247
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-01-24 13:16:09 +01:00
Ruben Bridgewater
72bb4445c6
assert: wrap original error in ifError
It is hard to know where ifError is actually triggered due to the
original error being thrown.
This changes it by wrapping the original error in a AssertionError.
This has the positive effect of also making clear that it is indeed
a assertion function that triggered that error.

The original stack can still be accessed by checking the `actual`
property.

PR-URL: https://github.com/nodejs/node/pull/18247
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-01-24 13:16:07 +01:00
Ruben Bridgewater
bb9cedb0f0
tty: add getColorDepth function
Right now it is very difficult to determine if a terminal supports
colors or not. This function adds this functionality by detecting
environment variables and checking process.

PR-URL: https://github.com/nodejs/node/pull/17615
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2018-01-24 13:07:35 +01:00
Ruben Bridgewater
2d9e87695e
assert: improve error messages
From now on all error messages produced by `assert` in strict mode
will produce a error diff.

PR-URL: https://github.com/nodejs/node/pull/17615
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2018-01-24 13:07:34 +01:00
Robert Adamian
cb88f35a73 doc: add missing word in modules.md
PR-URL: https://github.com/nodejs/node/pull/18343
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-01-24 13:48:19 +02:00
Antony Tran
d8263a0677 doc: add doc for performance.clearGC()
PR-URL: https://github.com/nodejs/node/pull/18331
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Khaidi Chu <i@2333.moe>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
2018-01-24 13:39:57 +02:00
Joyee Cheung
62880503dd
doc: document the collaborator nomination process
PR-URL: https://github.com/nodejs/node/pull/18268
Fixes: https://github.com/nodejs/node/issues/18090
Refs: https://github.com/nodejs/TSC/pull/472
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Shingo Inoue <leko.noor@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Weijia Wang <starkwang@126.com>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
2018-01-24 18:42:09 +08:00
Joyee Cheung
0e7050ec86
doc: improve the instructions of onboarding PR
PR-URL: https://github.com/nodejs/node/pull/18268
Fixes: https://github.com/nodejs/node/issues/18090
Refs: https://github.com/nodejs/TSC/pull/472
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Shingo Inoue <leko.noor@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Weijia Wang <starkwang@126.com>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
2018-01-24 18:42:01 +08:00
Joyee Cheung
695ed671fc
doc: split CONTRIBUTING.md
PR-URL: https://github.com/nodejs/node/pull/18271
Fixes: https://github.com/nodejs/node/issues/17842
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-01-24 03:23:40 +08:00
Matthew Turner
6a56a0a3f8 doc: fix typos in async_hooks
PR-URL: https://github.com/nodejs/node/pull/18314
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-01-23 20:24:58 +02:00
Vse Mozhet Byt
914538803d doc: add missing URL argument types in fs.md
PR-URL: https://github.com/nodejs/node/pull/18309
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2018-01-23 20:13:45 +02:00
Vse Mozhet Byt
9870b53810 doc: remove confusing signature in fs.md
PR-URL: https://github.com/nodejs/node/pull/18310
Fixes: https://github.com/nodejs/node/issues/18305
Refs: https://github.com/nodejs/node/pull/13424
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2018-01-23 12:48:59 +02:00
Tobias Nießen
a65b0b90c9
doc: use PBKDF2 in text
Use upper case variant in text in compliance with RFC 2898.

PR-URL: https://github.com/nodejs/node/pull/18279
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Vladimir Kurchatkin <vladimir.kurchatkin@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-01-22 12:53:50 +01:00
Matthew Turner
55a93756ee doc: fix typo in async_hooks.md
Fix typo in `async_hooks.executionAsyncId()` explanation.

PR-URL: https://github.com/nodejs/node/pull/18286
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
2018-01-22 13:47:10 +02:00
Leko
08ada72cc6
doc: Add example of null to assert.ifError
PR-URL: https://github.com/nodejs/node/pull/18236
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2018-01-21 02:32:45 +01:00
Ben Noordhuis
d9b59def72
build,test: make building addon tests less fragile
* Get rid of recursive `make` when building the node binary.  An earlier
  commit makes GYP write out rules that we can use for proper dependency
  tracking.

* Use module name 'binding' in addons.md and addons-napi/*/binding.gyp.
  This massively simplifies the logic for generating the build rules.

* Check in auto-generated add-on tests from `doc/api/addons.md`.  The
  files change rarely and generating them dynamically causes no end of
  race conditions and special-casing during the build.

PR-URL: https://github.com/nodejs/node/pull/17407
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2018-01-21 02:19:46 +01:00
Joyee Cheung
4af1bba6d0
util: implement util.getSystemErrorName()
Reimplement uv.errname() as internal/util.getSystemErrorName() to
avoid the memory leaks caused by unknown error codes
and avoid calling into C++ for the error names. Also
expose it as a public API for external use.

PR-URL: https://github.com/nodejs/node/pull/18186
Refs: http://docs.libuv.org/en/v1.x/errors.html#c.uv_err_name
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-01-20 08:51:47 +08:00
Mars Wong
36b13eb0e9
doc: improve process.platform
PR-URL: https://github.com/nodejs/node/pull/18057
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-01-19 13:29:24 +01:00
Gus Caplan
3815f0c880
doc: cjs format is now commonjs
PR-URL: https://github.com/nodejs/node/pull/18165
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-01-19 13:16:56 +01:00
Franziska Hinkelmann
0c417821a0
doc: V8 branch used in 8.x not active anymore
Add 8.x to the LTS versions that use a V8 branch that is
not active anymore.

PR-URL: https://github.com/nodejs/node/pull/18155
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-01-18 22:40:18 +01:00
Stephen Belanger
dadf28271c
doc: add change info for async_hooks.executionAsyncId()
Add meta information to async_hooks documentation informing that
executionAsyncId was renamed from currentId at Node.js 8.2.0.

PR-URL: https://github.com/nodejs/node/pull/17813
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
2018-01-18 22:36:58 +01:00
Anatoli Papirovski
c1234673bb
timers: allow Immediates to be unrefed
Refactor Immediates handling to allow for them to be unrefed, similar
to setTimeout, but without extra handles.

Document the new `immediate.ref()` and `immediate.unref()` methods.

Add SetImmediateUnref on the C++ side.

PR-URL: https://github.com/nodejs/node/pull/18139
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-01-18 15:55:59 -05:00
Michael Dawson
f054855bbf doc: remove uannecessary Require
This was the only instance were we said a parameter
was required.  It is assumed parameters are required unless
the doc says they are option.  Remove `Required` to make
consistent with the rest of the doc

PR-URL: https://github.com/nodejs/node/pull/18184
Reviewed-By: Colin Ihrig <cjihrig@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: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
2018-01-18 10:45:46 -05:00
Rich Trott
359a232348 doc: fix typo in esm.md
Change `run time` to `runtime` for both correctness and consistency with
every other instance of the expression in the docs.

PR-URL: https://github.com/nodejs/node/pull/18142
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Khaidi Chu <i@2333.moe>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
2018-01-18 04:46:41 -08:00
Vse Mozhet Byt
6c76de13c5 doc: add missing link references
PR-URL: https://github.com/nodejs/node/pull/18222
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-01-18 13:21:23 +02:00
Rich Trott
c6bee70eec doc: simplify sentences that use "considered"
Change many instances of "x is considered to be y" to "x is y".

PR-URL: https://github.com/nodejs/node/pull/18095
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-01-17 21:22:53 -08:00
Vse Mozhet Byt
f7c709fdd0 doc: dedupe links
Replace some repeated full links
with concise ones and bottom references.

PR-URL: https://github.com/nodejs/node/pull/18213
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-01-18 03:15:02 +02:00
Michael Dawson
5aa0f3ee16
doc: update sample output for process.versions
Update so that it includes some of the more recent additions.

PR-URL: https://github.com/nodejs/node/pull/18167
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2018-01-17 20:55:55 +01:00
Yosuke Furukawa
98f744cbc9 doc: fix typo in TextEncoding section
PR-URL: https://github.com/nodejs/node/pull/18201
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Khaidi Chu <i@2333.moe>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Weijia Wang <starkwang@126.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2018-01-17 20:23:23 +02:00
cjihrig
dbdcf12187
doc: correct buffer changelog ordering
This commit reorders the function level changelogs of
Buffer.prototype.fill() and Buffer.alloc() to reflect the order
in which the entries were added.

PR-URL: https://github.com/nodejs/node/pull/18129
Fixes: https://github.com/nodejs/node/issues/18128
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
2018-01-17 09:06:03 -05:00
cjihrig
1e802539b2
buffer: throw when filling with empty buffers
Prior to this commit, Node would enter an infinite loop when
attempting to fill a non-zero length buffer with a zero length
buffer. This commit introduces a thrown exception in this scenario.

PR-URL: https://github.com/nodejs/node/pull/18129
Fixes: https://github.com/nodejs/node/issues/18128
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
2018-01-17 09:05:52 -05:00
Moritz Peters
d3600e513a
doc: fix typo in http2stream.close param default
PR-URL: https://github.com/nodejs/node/pull/18166
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-01-17 08:48:26 +08:00
Roman Reiss
82b0783519
src,doc,test: Fix common misspellings
PR-URL: https://github.com/nodejs/node/pull/18151
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2018-01-16 23:44:27 +01:00
Jinho Bang
316b5efd6b n-api: throw RangeError napi_create_typedarray()
According to the ECMA spec, we should throw a RangeError in the
following cases:
  - `(length * elementSize) + offset` > the size of the array passed in
  - `offset % elementSize` != `0`

In the current implementation, this check was omitted. So, the following
code will cause a crash.
  ```
  napi_create_typedarray(env, napi_uint16_array, 2 /* length */,
                         buffer, 1 /* byte_offset */, &output_array);
  ```

This change fixes the problem and write some related tests.

Refs:
https://tc39.github.io/ecma262/#sec-typedarray-buffer-byteoffset-length

PR-URL: https://github.com/nodejs/node/pull/18037
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2018-01-16 15:22:36 -05:00
Ruben Bridgewater
4319780389
doc: remove double line break
This is the only double line break in the file and for
consistency one is removed.

PR-URL: https://github.com/nodejs/node/pull/17581
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ron Korving <ron@ronkorving.nl>
2018-01-16 19:57:36 +01:00
Ruben Bridgewater
d07c6f9739
assert: throw without args in ok
`assert.ok()` should always receive a value. Otherwise there
might be a bug or it was intended to use `assert.fail()`.

PR-URL: https://github.com/nodejs/node/pull/17581
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ron Korving <ron@ronkorving.nl>
2018-01-16 19:57:36 +01:00
Ruben Bridgewater
f76ef50432
assert: improve simple assert
This improves the error message in simple asserts by using the
real call information instead of the already evaluated part.

PR-URL: https://github.com/nodejs/node/pull/17581
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ron Korving <ron@ronkorving.nl>
2018-01-16 19:57:35 +01:00
Joyee Cheung
1c29da8236
tls: migrate C++ errors to internal/errors.js
* 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-17 02:20:36 +08:00
Ali Ijaz Sheikh
f75bc2c1a5 doc: napi: make header style consistent
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-16 09:25:06 -08:00
Ali Ijaz Sheikh
3e062762e4 doc: napi: fix unbalanced emphasis
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-16 09:25:00 -08:00
Ruben Bridgewater
8f153092d8
util: change %o depth default
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-16 15:34:04 +01:00
Ruben Bridgewater
b994b8eff6
util: change util.inspect depth default
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-16 15:34:03 +01:00
现充
85739b6c5b child_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-15 13:51:11 +01:00
Tobias Nießen
858b48b692
crypto: assign deprecation code for setAuthTag/GCM
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-14 18:41:42 +01:00
Jon Moss
c770f43a91 doc: add documentation for deprecation properties
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-13 12:08:08 -05:00
Vse Mozhet Byt
c3fde98d4d doc: capitalize non-primitive types
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-12 02:51:14 +02:00
Vse Mozhet Byt
d955645e4b doc: decapitalize primitive types
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-12 02:47:22 +02:00
James M Snell
ee2e7fcd5f http2: remember sent headers
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-11 11:55:19 -08:00
James M Snell
20fe04f113 perf_hooks,http2: add performance.clear()
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-11 10:41:49 -08:00
James M Snell
47a282293f doc: fix s/rstStream/close in example
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-11 10:14:20 -08:00
James M Snell
078b7a2a65 doc: update pushStream docs to use err first
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-11 10:14:14 -08:00
Rich Trott
470bd39390 doc: be less tentative about undefined behavior
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-11 09:51:40 -08:00
Matteo Collina
61b4d60c5d stream: added experimental support for for-await
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-11 12:34:41 +01:00
Michaël Zasso
3dc3063275 tools: move eslint from tools to tools/node_modules
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-11 09:48:05 +01:00
Anna Henningsen
6e3818f2a2
doc: un-mark Socket#write “removal” as notable change
Since the method is inherited from `Writable`, usage of the method
does not change at all after its removal as an explicit method.

Calling it out as notable might therefore be more confusing than
helpful.

PR-URL: https://github.com/nodejs/node/pull/18083
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-01-10 17:21:40 +01:00
Myles Borins
e688175c50
2019-01-10 Version 9.4.0 (Current)
Notable change:

* async_hooks:
  - deprecate AsyncHooks Sensitive API and runInAsyncIdScope. Neither
    API were documented. (Andreas Madsen)
    https://github.com/nodejs/node/pull/16972
* deps:
  - update nghttp2 to 1.29.0 (James M Snell)
    https://github.com/nodejs/node/pull/17908
  - upgrade npm to 5.6.0 (Kat Marchán)
    https://github.com/nodejs/node/pull/17535
  - cherry-pick 50f7455 from upstream V8 (Michaël Zasso)
    https://github.com/nodejs/node/pull/16591
* events:
  - remove reaches into _events internals (Anatoli Papirovski)
    https://github.com/nodejs/node/pull/17440
* http:
  - add rawPacket in err of `clientError` event (XadillaX)
    https://github.com/nodejs/node/pull/17672
* http2:
  - implement maxSessionMemory (James M Snell)
    https://github.com/nodejs/node/pull/17967
  - add initial support for originSet (James M Snell)
    https://github.com/nodejs/node/pull/17935
  - add altsvc support (James M Snell)
    https://github.com/nodejs/node/pull/17917
  - perf_hooks integration (James M Snell)
    https://github.com/nodejs/node/pull/17906
  - Refactoring and cleanup of Http2Session and Http2Stream destroy
    (James M Snell) https://github.com/nodejs/node/pull/17406
* net:
  - remove Socket.prototype.write (Anna Henningsen)
    https://github.com/nodejs/node/pull/17644
  - remove Socket.prototype.listen (Ruben Bridgewater)
    https://github.com/nodejs/node/pull/13735
* repl:
  - show lexically scoped vars in tab completion (Michaël Zasso)
    https://github.com/nodejs/node/pull/16591
* stream:
  - rm {writeable/readable}State.length (Calvin Metcalf)
    https://github.com/nodejs/node/pull/12857
  - add flow and buffer properties to streams (Calvin Metcalf)
    https://github.com/nodejs/node/pull/12855
* util:
  - allow wildcards in NODE_DEBUG variable (Tyler)
    https://github.com/nodejs/node/pull/17609
* zlib:
  - add ArrayBuffer support (Jem Bezooyen)
    https://github.com/nodejs/node/pull/16042
* Addedew collaborator**
  - [starkwang](https://github.com/starkwang) Weijia Wang
* Addedew TSC member**
  - [danbev](https://github.com/danbev) Daniel Bevenius

PR-URL: https://github.com/nodejs/node/pull/18069
2018-01-10 10:24:22 -05:00
Matteo Collina
1e0f3315c7 stream: always defer 'readable' with nextTick
Emit 'readable' always in the next tick, resulting in a single
call to _read() per microtick. This removes the need for the
user to implement buffering if they wanted to call this.push()
multiple times in an asynchronous fashion, as this.push() triggers
this._read() call.

PR-URL: https://github.com/nodejs/node/pull/17979
Fixes: https://github.com/nodejs/node/issues/3203
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2018-01-10 10:48:03 +01:00
James M Snell
800caac236 doc: add descriptions of state properties
Fixes: https://github.com/nodejs/node/issues/15268

PR-URL: https://github.com/nodejs/node/pull/18044
Fixes: https://github.com/nodejs/node/issues/15268
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-01-09 16:38:06 -08:00
Jinho Bang
91c1ccd84f n-api: throw RangeError in napi_create_dataview() with invalid range
The API is required that `byte_length + byte_offset` is less than or
equal to the size in bytes of the array passed in. If not, a RangeError
exception is raised[1].

[1] https://nodejs.org/api/n-api.html#n_api_napi_create_dataview

PR-URL: https://github.com/nodejs/node/pull/17869
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-01-09 16:20:19 -08:00
Rich Trott
0e98f2971f doc: multiple updates to child_process.md
* use serial comma in child_process.md
* use American spelling of unsanitized in child_process.md
* hyphenate general-purpose in child_process.md
* remove errant commas in child_process.md

PR-URL: https://github.com/nodejs/node/pull/17990
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
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>
2018-01-09 15:57:50 -08:00
Mykola Bilochub
bcb01de515 doc: fix incorrect argument type in fs.readSync
The `buffer` argument must be either Buffer or Uint8Array, string
values are not supported.

PR-URL: https://github.com/nodejs/node/pull/18022
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Weijia Wang <starkwang@126.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-01-09 15:26:32 -08:00
James M Snell
a02fcd2716 http2: use aliased buffer for perf stats, add stats
Add an aliased buffer for session and stream statistics,
add a few more metrics

PR-URL: https://github.com/nodejs/node/pull/18020
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
2018-01-09 12:33:13 -08:00
Joyee Cheung
89d865715a
doc: add guide on maintaining build files
PR-URL: https://github.com/nodejs/node/pull/16975
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
2018-01-09 17:07:26 +08:00
Michael Dawson
8a86d9c1cf
doc: updates examples to use NULL
Examples in the N-API doc used a mix of nullptr and NULL.
We should be consistent and because N-API is a 'C' API I believe
using NULL is better.  This will avoid any potential confusion
as to whether N-API can be used with plain C.

PR-URL: https://github.com/nodejs/node/pull/18008
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
2018-01-07 12:40:02 +01:00
Rich Trott
33123b9710 doc: grammar fixes in http2.md
PR-URL: https://github.com/nodejs/node/pull/17972
Reviewed-By: Weijia Wang <starkwang@126.com>
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>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2018-01-05 12:59:14 -08:00
James M Snell
882e7ef354 http2: implement maxSessionMemory
The maxSessionMemory is a cap for the amount of memory an
Http2Session is permitted to consume. If exceeded, new
`Http2Stream` sessions will be rejected with an
`ENHANCE_YOUR_CALM` error and existing `Http2Stream`
instances that are still receiving headers will be
terminated with an `ENHANCE_YOUR_CALM` error.

PR-URL: https://github.com/nodejs/node/pull/17967
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2018-01-05 12:35:33 -08:00
Sebastian Van Sande
d964ffeec3
buffer: check byteLength in readInt(B|L)E
The 'byteLength' argument should be required and of type 'number'.
It should have a value between 1 and 6.

PR-URL: https://github.com/nodejs/node/pull/11146
Fixes: https://github.com/nodejs/node/issues/10515
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
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: Colin Ihrig <cjihrig@gmail.com>
2018-01-05 12:37:38 +01:00
Todd Wong
7914b7524d
cluster: support windowsHide option for workers
Fixes: https://github.com/nodejs/node/issues/17370

PR-URL: https://github.com/nodejs/node/pull/17412
Fixes: https://github.com/nodejs/node/issues/17370
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-01-05 02:51:49 +01:00
Rich Trott
26607b825e doc: edit for concision
This removes some wordy phrases (notably "it is important to note
that").

PR-URL: https://github.com/nodejs/node/pull/17891
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2018-01-03 17:18:30 -08:00
Gibson Fahnestock
ecf6e79362
doc: remove x86 from os.arch() options
It is not possible for `process.arch` (which comes from V8's
`target_arch`) to be `x86`.

Also updates `process.arch` to have the same information.

PR-URL: https://github.com/nodejs/node/pull/17899
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
2018-01-03 23:31:34 +00:00
James M Snell
efdadcc193 http2: add aligned padding strategy
Add a padding strategy option that makes a best attempt to ensure
that total frame length for DATA and HEADERS frames are aligned
on multiples of 8-bytes.

PR-URL: https://github.com/nodejs/node/pull/17938
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2018-01-03 12:57:18 -08:00
James M Snell
060babd665 http2: add initial support for originSet
Add new properties to `Http2Session` to identify alpnProtocol,
and indicator about whether the session is TLS or not, and
initial support for origin set (preparinng for `ORIGIN` frame
support and the client-side `Pool` implementation.

The `originSet` is the set of origins for which an `Http2Session`
may be considered authoritative. Per the `ORIGIN` frame spec,
the originSet is only valid on TLS connections, so this is only
exposed when using a `TLSSocket`.

PR-URL: https://github.com/nodejs/node/pull/17935
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Sebastiaan Deckers <sebdeckers83@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
2018-01-03 11:29:43 -08:00
James M Snell
ce22d6f917 http2: add altsvc support
Add support for sending and receiving ALTSVC frames.

PR-URL: https://github.com/nodejs/node/pull/17917
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2018-01-03 08:45:58 -08:00
Rich Trott
f51067a85d doc: remove non-style information from style guide
While tools should be used insofar as possible, that information
does not belong in the style guide. Move to onboarding doc.

PR-URL: https://github.com/nodejs/node/pull/17866
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Khaidi Chu <i@2333.moe>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-01-02 21:33:32 -08:00
Gibson Fahnestock
ec9fb6dd53
2018-01-02 Node.js v8.9.4 'Carbon' (LTS) Release
PR-URL: https://github.com/nodejs/node/pull/17774

Notable Changes:

* deps:
  * upgrade npm to 5.6.0 (Kat Marchán) [#17535](https://github.com/nodejs/node/pull/17535)
* build:
  * configure can now be run from any directory (Gibson Fahnestock) [#17321](https://github.com/nodejs/node/pull/17321)
2018-01-03 04:19:17 +00:00
Myles Borins
02e4c8d981
2018-01-02, Version 6.12.3 'Boron' (LTS)
Notable Changes:

* build:
  - configure can now be run from any directory (Gibson Fahnestock)
    https://github.com/nodejs/node/pull/17321

PR-URL: https://github.com/nodejs/node/pull/17776
2018-01-02 14:09:57 -05:00
James M Snell
231b1166cf http2: perf_hooks integration
Collect and report basic timing information about `Http2Session`
and `Http2Stream` instances.

PR-URL: https://github.com/nodejs/node/pull/17906
Refs: https://github.com/nodejs/node/issues/17746
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2018-01-02 08:56:30 -08:00
Vse Mozhet Byt
11a1bc1136 doc: replace wrong U+00A0 by common spaces
PR-URL: https://github.com/nodejs/node/pull/17940
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
2018-01-02 01:58:15 +02:00
Tobias Nießen
d74a1ed7d9
doc: remove duplicate words in API docs
PR-URL: https://github.com/nodejs/node/pull/17937
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
2018-01-02 00:13:02 +01:00
sreepurnajasti
b21e3f0711
doc: fix duplicate words & spellings in docs
PR-URL: https://github.com/nodejs/node/pull/17923
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
2017-12-31 18:14:25 +01:00
sreepurnajasti
27470e4ec7
doc: correct spelling
PR-URL: https://github.com/nodejs/node/pull/17911
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Weijia Wang <starkwang@126.com>
2017-12-30 17:59:05 +01:00
Tobias Nießen
a82b1b7b30
errors: remove ERR_OUTOFMEMORY
PR-URL: https://github.com/nodejs/node/pull/17877
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2017-12-29 21:16:14 +01:00
Tyson Andre
214bbb5228 doc: doc imitating the old behavior of http.Server.keepAliveTimeout
Documenting the best way to imitate the old behavior saves time for people
migrating from older versions. (E.g. for unexpected ECONNRESET)

It isn't immediately obvious if earlier nodejs versions behaved the same
way as nodejs 8 does with keepAliveTimeout = 0.
From 0aa7ef5950, it seems like they behave
the same way.

Related to issues such as #13391 that show up when migrating to node 8

PR-URL: https://github.com/nodejs/node/pull/17660
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
2017-12-28 10:10:26 -08:00
Kelvin Jin
120ea9b5c4 http2: implement ref() and unref() on client sessions
PR-URL: https://github.com/nodejs/node/pull/17620
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2017-12-28 09:32:54 -08:00
James M Snell
286a5d0e74 doc: fs doc improvements
PR-URL: https://github.com/nodejs/node/pull/17831
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2017-12-28 08:50:29 -08:00
Tobias Nießen
fd724c5c63
doc: fix typo
PR-URL: https://github.com/nodejs/node/pull/17900
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-12-28 16:42:46 +01:00
Rich Trott
62a44a32ad doc: improve module.builtinModules text
`module is maintained by a third-party module` seems confusing. Changed
to `module is maintained by a third-party`.

PR-URL: https://github.com/nodejs/node/pull/17865
Reviewed-By: Weijia Wang <starkwang@126.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-12-27 15:59:48 -08:00