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

21130 Commits

Author SHA1 Message Date
Michael Dawson
fe442f6b5f test: properly tag anonymous namespaces
For tests that use anonymous namespaces, some tagged the close
of the namespace with 'namespace' while others used
'anonymous namespace'. It was suggested I should use
'anonymous namespace' in a recent PR review so make all of the
tests consistent with this.

PR-URL: https://github.com/nodejs/node/pull/18583
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-02-08 18:43:36 -05:00
Anatoli Papirovski
6963a93d0e
test: fix flaky timers-block-eventloop test
Due to extensive reliance on timings and the fs module, this test
is currently inherently flaky. Refactor it to simply use setImmediate
and only one busy loop.

PR-URL: https://github.com/nodejs/node/pull/18567
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-02-08 15:33:02 -05:00
Anna Henningsen
ef78a1e584
net: remove Socket.prototoype.read
Unused since 34b535f4ca.

PR-URL: https://github.com/nodejs/node/pull/18568
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Khaidi Chu <i@2333.moe>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-02-08 13:38:05 -05: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
Ruben Bridgewater
809af1fe8a
benchmark: improve compare output
The current output uses JSON.stringify to escape the config values.
This switches to util.inspect to have a better readable output.

PR-URL: https://github.com/nodejs/node/pull/18597
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Andreas Madsen <amwebdk@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-02-08 11:38:25 -05:00
陈刚
86c659ba61 stream: add a test case for the underlying cause.
The original test case hides the underlying cause by using
`PassThrough`. This change adds a test case for the underlying cause.
This makes it clearer and easier to be understood.

Refs: https://github.com/nodejs/node/pull/18372

PR-URL: https://github.com/nodejs/node/pull/18575
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2018-02-08 16:31:47 +01:00
Anatoli Papirovski
8204b0f9c6
timers: simplify clearTimeout & clearInterval
Remove unnecessary condition from timeout & interval clearing.

PR-URL: https://github.com/nodejs/node/pull/18579
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-02-08 09:01:54 -05:00
Anatoli Papirovski
c11cb038a1
timers: async track unref timers
When async hooks integration for Timers was introduced, it was
not included in the code for unref'd or subsequently ref'd
timers which means those timers only have Timerwrap hooks.

PR-URL: https://github.com/nodejs/node/pull/18579
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-02-08 09:01:54 -05:00
Anatoli Papirovski
568b6a5c9e
timers: be more defensive with intervals
It's possible for user-code to flip an existing timeout to
be an interval during its execution, in which case the
current code would crash due to start being undefined. Fix
this by providing a default start value within rearm.

PR-URL: https://github.com/nodejs/node/pull/18579
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-02-08 09:01:54 -05:00
Anatoli Papirovski
1b05d7bc86
timers: remove unused variable
A recent commit removed the usage of the second argument of
tryOnTimeout but left the definition in place. Remove it.

PR-URL: https://github.com/nodejs/node/pull/18579
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-02-08 09:01:53 -05:00
Joyee Cheung
b1c6ecb2c6
fs: fix misplaced errors in fs.symlinkSync
The ctx.error is supposed to be handled in fs.readlinkSync,
but was handled in fs.symlinkSync by mistake.

Also fix the error number check in readlink to be consistent
with SYNC_CALL.

PR-URL: https://github.com/nodejs/node/pull/18548
Refs: https://github.com/nodejs/node/pull/18348
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-02-08 21:38:00 +08:00
Luigi Pinca
e9b5b4fae3 stream: fix misleading error message
The method to implement is `_write` not `_transform`.

PR-URL: https://github.com/nodejs/node/pull/18604
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2018-02-08 13:48:23 +01:00
Matteo Collina
87b9bceacb stream: always defer readable in EOF when sync
Fix a regression introduced by
https://github.com/nodejs/node/pull/18515 that broke
the dicer module tests.

See: https://github.com/nodejs/node/pull/18515

PR-URL: https://github.com/nodejs/node/pull/18615
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2018-02-08 11:58:04 +01:00
Joyee Cheung
d8f73385e2
fs: throw errors on invalid paths synchronously
- Throw getPathFromURL() and nullCheck() errors synchronously instead
  of deferring them to the next tick, since we already throw
  validatePath() errors synchronously.
- Merge nullCheck() into validatePath()
- Never throws in `fs.exists()`, instead, invoke the callback with
  false, or emit a warning when the callback is not a function.
  This is to bring it inline with fs.existsSync(), which never throws.
- Updates the comment of rethrow()
- Throw ERR_INVALID_ARG_VALUE for null checks

PR-URL: https://github.com/nodejs/node/pull/18308
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-02-08 18:15:04 +08:00
Joyee Cheung
b50571602a
build: do not suppress output in make doc-only
This helps to show the cause of errors in the CI.

PR-URL: https://github.com/nodejs/node/pull/18507
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-02-08 17:56:07 +08:00
Ben Noordhuis
8ccd320549 src: don't abort when package.json is a directory
PR-URL: https://github.com/nodejs/node/pull/18270
Fixes: https://github.com/nodejs/node/issues/8307
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Bradley Farias <bradley.meck@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2018-02-07 20:49:58 -08: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
cjihrig
ffb385bff5
test: refactor test-http-abort-before-end
This test was added over six years ago, and the behavior
seems to have changed since then. When the test was originally
written, common.mustCall() did not exist. The only assertion
in this test was not actually executing. Instead of an 'error'
event being emitted as expected, an 'abort' event was emitted.

PR-URL: https://github.com/nodejs/node/pull/18508
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-02-07 13:42:36 -05:00
Anatoli Papirovski
92ba624fa1
tls: provide now value from C++
Instead of separately calling into C++ from JS to retrieve
the Timer.now() value, pass it in as an argument.

PR-URL: https://github.com/nodejs/node/pull/18562
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-02-07 12:21:42 -05:00
Anatoli Papirovski
1573e4563a
src: move GetNow to Environment
PR-URL: https://github.com/nodejs/node/pull/18562
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-02-07 12:21:41 -05:00
Myles Borins
d0e4d4e0a1
deps: patch V8 to 6.4.388.42
PR-URL: https://github.com/nodejs/node/pull/18578
Refs: https://github.com/v8/v8/compare/6.4.388.41...6.4.388.42
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-02-07 10:47:31 -05:00
Anatoli Papirovski
af5632e4f4
readline: use Date.now() and move test to parallel
The readline module wants a truthy time while using Timer.now() doesn't
necessarily guarantee that early on in the process' life. It also
doesn't actually resolve the timing issues experienced in an earlier
issue. Instead, this PR fixes the related tests and moves them back
to parallel.

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

PR-URL: https://github.com/nodejs/node/pull/18563
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-02-07 15:11:06 +01:00
Bhavani Shankar
5ecd2e15b8
test: improve error message output
PR-URL: https://github.com/nodejs/node/pull/18498
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2018-02-07 15:09:14 +01: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
Anatoli Papirovski
b8f7f84fc2
test: fix flaky test-http2-session-unref
This test should exit naturally or will timeout on its own,
a separate unrefed timer is not necessary.

PR-URL: https://github.com/nodejs/node/pull/18589
Fixes: https://github.com/nodejs/node/issues/18587
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-02-07 14:58:35 +01:00
Joyee Cheung
e542920467
test: do not check TXT content in test-dns-any
google.com added another TXT record which broke this test.
This removes the check on the content of the TXT record
since that depends on an external state subject to change.

PR-URL: https://github.com/nodejs/node/pull/18547
Reviewed-By: Khaidi Chu <i@2333.moe>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-02-07 21:57:06 +08:00
Shobhit Chittora
d797775fb8
tools: add fixer for prefer-assert-iferror.js
PR-URL: https://github.com/nodejs/node/pull/16648
Refs: https://github.com/nodejs/node/issues/16636
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-02-07 14:56:01 +01:00
Joyee Cheung
c0762c2f54
errors: move error creation helpers to errors.js
This commit moves error creation helpers scattered around
under lib/ into lib/internal/errors.js in the hope of being clearer
about the differences of errors that we throw into the user land.

- Move util._errnoException and util._exceptionWithHostPort
  into internal/errors.js and simplify their logic so it's
  clearer what the properties these helpers create.
- Move the errnoException helper in dns.js to internal/errors.js
  into internal/errors.js and rename it to dnsException. Simplify
  it's logic so it no longer calls errnoException and skips
  the unnecessary argument checks.

PR-URL: https://github.com/nodejs/node/pull/18546
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-02-07 18:42:40 +08:00
Joyee Cheung
030384833f
fs: do not call new when creating uvException
We cannot make uvException a proper class due to compatibility
reasons for now, so there is no need to call new since
it only returns a newly-created Error.

PR-URL: https://github.com/nodejs/node/pull/18546
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-02-07 18:42:35 +08:00
Joyee Cheung
12ae33476a
util: skip type checks in internal getSystemErrorName
PR-URL: https://github.com/nodejs/node/pull/18546
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-02-07 18:42:27 +08: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
Anna Henningsen
ee67dd0a47
test: add test for stream unpipe with 'data' listeners
PR-URL: https://github.com/nodejs/node/pull/18516
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-02-06 23:04:11 +01:00
Anna Henningsen
e7cb694a60
stream: always reset awaitDrain when emitting data
The complicated `awaitDrain` machinery can be made a bit
slimmer, and more correct, by just resetting the value
each time `stream.emit('data')` is called.

By resetting the value before emitting the data chunk, and
seeing whether any pipe destinations return `.write() === false`,
we always end up in a consistent state and don’t need to worry
about odd situations (like `dest.write(chunk)` emitting more data).

PR-URL: https://github.com/nodejs/node/pull/18516
Fixes: https://github.com/nodejs/node/issues/18484
Fixes: https://github.com/nodejs/node/issues/18512
Refs: https://github.com/nodejs/node/pull/18515
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-02-06 23:04:04 +01: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
BufoViridis
6a29630c30
src: fix crypto.pbkdf2 callback error argument
Callbacks should always return `null` instead of `undefined` if no
error occurred.

PR-URL: https://github.com/nodejs/node/pull/18458
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-02-06 13:49:09 +01:00
Luca Maraschi
075eef5956
test: added input validation test for fchmod
Added a test to ensure input validation for FD and mode for fs.fchmod.
Removed check for values lower than 0 for `mode` as it's already checked
by `validateUint32`.

PR-URL: https://github.com/nodejs/node/pull/18217
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2018-02-06 11:58:31 +01:00
Ruben Bridgewater
a27f48d619
assert: fix generatedMessage
The generatedMessage was wrong in case simple assert was used and
a message was auto generated. This fixed the TODO.

PR-URL: https://github.com/nodejs/node/pull/18322
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2018-02-06 11:53:26 +01:00
Ruben Bridgewater
3e910fb8f7
assert: do not read Node.js modules
Prevent reading a Node.js module. That could theoretically lead to
false errors being thrown otherwise.

PR-URL: https://github.com/nodejs/node/pull/18322
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2018-02-06 11:53:25 +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
Camilo Gonzalez
0548034272 build: add doc linting when runnning make lint
Fixes: https://github.com/nodejs/node/issues/18466

PR-URL: https://github.com/nodejs/node/pull/18472
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2018-02-06 11:29:18 +01:00
Mathias Buus
563fff2938 stream: defer readable and flow when sync
PR-URL: https://github.com/nodejs/node/pull/18515
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-02-06 09:54:48 +01:00