Joyee Cheung
13bc53fb26
build: make lint-js independent of local node
...
PR-URL: https://github.com/nodejs/node/pull/18272
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-01-24 03:49:54 +08:00
Joyee Cheung
be0778b361
build: make lint-md independent of local node
...
PR-URL: https://github.com/nodejs/node/pull/18272
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-01-24 03:49:42 +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
Ben Noordhuis
b2b9d11a14
src: fix fs.write() externalized string handling
...
* Respect `encoding` argument when the string is externalized.
* Copy the string when the write request can outlive the externalized
string.
This commit removes `StringBytes::GetExternalParts()` because it is
fundamentally broken.
Fixes: https://github.com/nodejs/node/issues/18146
PR-URL: https://github.com/nodejs/node/pull/18216
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2018-01-23 19:17:39 +01:00
Ben Noordhuis
0b1841d83f
build: define NOMINMAX on windows
...
Build with `-DNOMINMAX` to stop `<windows.h>` from defining macros that
conflict with `std::min()` and `std::max()`.
PR-URL: https://github.com/nodejs/node/pull/18216
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2018-01-23 19:17:39 +01: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
ryanmahan
f5d9169ded
test: change assert message to default
...
assert.strictEqual message argument removed to replace
with default assert message to show the expected vs
actual values
PR-URL: https://github.com/nodejs/node/pull/18259
Refs: https://github.com/nodejs/node/issues/13296
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Shingo Inoue <leko.noor@gmail.com >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-01-22 16:34:55 -08:00
Ruben Bridgewater
6394c8d99d
benchmark: use destructuring
...
This applies to all `async_hooks`, `dns`, `cluster`, `domain` and
`module` benchmarks.
PR-URL: https://github.com/nodejs/node/pull/18250
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-01-23 01:29:34 +01:00
Ruben Bridgewater
b2966043c9
benchmark: (dgram) use destructuring
...
PR-URL: https://github.com/nodejs/node/pull/18250
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-01-23 01:29:33 +01:00
Ruben Bridgewater
d49580d812
benchmark: (child_process) use destructuring
...
PR-URL: https://github.com/nodejs/node/pull/18250
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-01-23 01:29:32 +01:00
Ruben Bridgewater
8e3d7623a5
benchmark: (buffers) use destructuring
...
PR-URL: https://github.com/nodejs/node/pull/18250
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-01-23 01:29:31 +01:00
Ruben Bridgewater
896397b5dc
benchmark: (events) use destructuring
...
PR-URL: https://github.com/nodejs/node/pull/18250
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-01-23 01:29:30 +01:00
Ruben Bridgewater
ed91f58414
benchmark: (es) use destructuring
...
PR-URL: https://github.com/nodejs/node/pull/18250
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-01-23 01:29:30 +01:00
Ruben Bridgewater
7e03ffcc12
benchmark: (fs) use destructuring
...
PR-URL: https://github.com/nodejs/node/pull/18250
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-01-23 01:29:29 +01:00
Ruben Bridgewater
a52878c239
benchmark: (http) use destructuring
...
PR-URL: https://github.com/nodejs/node/pull/18250
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-01-23 01:29:28 +01:00
Ruben Bridgewater
fd45187d34
benchmark: (misc) use destructuring
...
PR-URL: https://github.com/nodejs/node/pull/18250
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-01-23 01:29:27 +01:00
Ruben Bridgewater
50d2554dd1
benchmark: (http2) use destructuring
...
PR-URL: https://github.com/nodejs/node/pull/18250
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-01-23 01:29:26 +01:00
Ruben Bridgewater
fa3149308e
benchmark: (string_decoder) use destructuring
...
PR-URL: https://github.com/nodejs/node/pull/18250
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-01-23 01:29:25 +01:00
Ruben Bridgewater
92953fa194
benchmark: (path) use destructuring
...
PR-URL: https://github.com/nodejs/node/pull/18250
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-01-23 01:29:24 +01:00
Ruben Bridgewater
32b3cad576
benchmark: (os) use destructuring
...
PR-URL: https://github.com/nodejs/node/pull/18250
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-01-23 01:29:23 +01:00
Ruben Bridgewater
19bdfa5380
benchmark: (net) use destructuring
...
PR-URL: https://github.com/nodejs/node/pull/18250
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-01-23 01:29:23 +01:00
Ruben Bridgewater
d163a6b8c2
benchmark: (process) use destructuring
...
PR-URL: https://github.com/nodejs/node/pull/18250
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-01-23 01:29:22 +01:00
Ruben Bridgewater
8d6df4f00e
benchmark: (querystring) use destructuring
...
PR-URL: https://github.com/nodejs/node/pull/18250
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-01-23 01:29:21 +01:00
Ruben Bridgewater
592454e703
benchmark: (streams) use destructuring
...
PR-URL: https://github.com/nodejs/node/pull/18250
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-01-23 01:29:20 +01:00
Ruben Bridgewater
5dc289b3f0
benchmark: (timers) use destructuring
...
PR-URL: https://github.com/nodejs/node/pull/18250
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-01-23 01:29:19 +01:00
Ruben Bridgewater
e49d86437d
benchmark: (tls) use destructuring
...
PR-URL: https://github.com/nodejs/node/pull/18250
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-01-23 01:29:18 +01:00
Ruben Bridgewater
7a24b1c565
benchmark: (util/v8/vm) use destructuring
...
PR-URL: https://github.com/nodejs/node/pull/18250
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-01-23 01:29:17 +01:00
Ruben Bridgewater
5dfb93d2fa
benchmark: (zlib) use destructuring
...
PR-URL: https://github.com/nodejs/node/pull/18250
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-01-23 01:29:16 +01:00
Ruben Bridgewater
49f5e08188
benchmark: (url) use destructuring
...
PR-URL: https://github.com/nodejs/node/pull/18250
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-01-23 01:29:16 +01:00
Ruben Bridgewater
366fd03af0
benchmark: (assert) use destructuring
...
PR-URL: https://github.com/nodejs/node/pull/18250
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-01-23 01:29:15 +01:00
Ruben Bridgewater
0beef3f030
benchmark: (arrays) use destructuring
...
PR-URL: https://github.com/nodejs/node/pull/18250
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-01-23 01:29:14 +01:00
Anatoli Papirovski
a3555d0583
test: fix a bug & lint issues in inspector-helper
...
PR-URL: https://github.com/nodejs/node/pull/18293
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Guy Bedford <guybedford@gmail.com >
2018-01-22 13:23:11 -05:00
Guy Bedford
e7ff00d0c5
inspector: --inspect-brk for es modules
...
Reworked rebase of PR #17360 with feedback
PR-URL: https://github.com/nodejs/node/pull/18194
Fixes: https://github.com/nodejs/node/issues/17340
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-01-22 18:39:21 +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
Anatoli Papirovski
8803b69c72
async_wrap: schedule destroy hook as unref
...
Since the `DestroyAsyncIdsCallback` in Node.js can be scheduled as
a result of GC, that means that it can accidentally keep the event
loop open when it shouldn't.
Replace `SetImmediate` with the newly introduced `SetUnrefImmediate`
and in addition introduce RunBeforeExit callbacks, of which
`DestroyAsyncIdsCallback` is now the first. These callbacks will run
before the `beforeExit` event is emitted (which will now only be
emitted if the event loop is still not active).
PR-URL: https://github.com/nodejs/node/pull/18241
Fixes: https://github.com/nodejs/node/issues/18190
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Andreas Madsen <amwebdk@gmail.com >
2018-01-21 12:39:41 -05:00
Anatoli Papirovski
d62566e1b1
promises: refactor rejection handling
...
Remove the unnecessary microTasksTickObject for scheduling microtasks
and instead use TickInfo to keep track of whether promise rejections
exist that need to be emitted. Consequently allow the microtasks to
execute on average fewer times, in more predictable manner than
previously.
Simplify unhandled & handled rejection tracking to do more in C++ to
avoid needing to expose additional info in JS.
When new unhandledRejections are emitted within an unhandledRejection
handler, allow the event loop to proceed first instead. This means
that if the end-user code handles all promise rejections on nextTick,
rejections within unhandledRejection now won't spiral into an infinite
loop.
PR-URL: https://github.com/nodejs/node/pull/18207
Fixes: https://github.com/nodejs/node/issues/17913
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2018-01-21 12:37:43 -05:00
Gilles De Mey
9545c48a5e
lib: fix typo in trace_events_async_hooks.js
...
chrome://traceing does not exist
PR-URL: https://github.com/nodejs/node/pull/18280
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2018-01-21 17:39:44 +02:00
leeseean
5164a12618
http: use strict comparison
...
PR-URL: https://github.com/nodejs/node/pull/17011
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
2018-01-21 02:58:37 +01:00
Mandeep Singh
7d2b08a3b5
test: use countdown timer
...
PR-URL: https://github.com/nodejs/node/pull/17326
Refs: https://github.com/nodejs/node/issues/17169
Reviewed-By: Jon Moss <me@jonathanmoss.me >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-01-21 02:54:38 +01:00
Omar Crisostomo
080a72c349
test: check fs.read and fs.readsync input
...
Added tests to extend the code coverage.
PR-URL: https://github.com/nodejs/node/pull/17910
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Weijia Wang <starkwang@126.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2018-01-21 02:49:29 +01:00
Luigi Pinca
93f1d9e10b
http: free the parser before emitting 'upgrade'
...
Ensure that the parser is freed before emitting the 'connect' or
'upgrade' event.
PR-URL: https://github.com/nodejs/node/pull/18209
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-01-21 02:42:19 +01: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
143b235274
test: fix flaky cluster unix socket test
...
Ensure `common.tmpDir` exists before trying to chdir into it. Fixes a
"ENOENT: no such file or directory, uv_chdir" error when the temporary
directory is removed before running the test.
PR-URL: https://github.com/nodejs/node/pull/17407
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
2018-01-21 02:19:48 +01:00
Ben Noordhuis
2cb9e2a6f7
build,tools: check freshness of doc addons
...
Add a `--check` flag to `tools/doc/addon-verify.js` and use that in the
`make test` target to determine if the generated files in `test/addons`
are fresh or stale.
PR-URL: https://github.com/nodejs/node/pull/17407
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
2018-01-21 02:19:47 +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
Ben Noordhuis
c6682636be
tools: simplify tools/doc/addon-verify.js
...
Make the script synchronous and clean it up. This is preparatory work
for follow-ups commits.
PR-URL: https://github.com/nodejs/node/pull/17407
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
2018-01-21 02:19:45 +01:00
Ben Noordhuis
920c13203d
tools: teach gyp to write an 'all deps' rule
...
Make GYP write a .deps file in the top-level directory that we can use
in the Makefile to get a proper dependency chain for the `node` target.
Preparatory work for getting rid of recursive make invocations.
PR-URL: https://github.com/nodejs/node/pull/17407
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
2018-01-21 02:19:44 +01:00