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
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
陈刚
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
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