Matteo Collina
cf5f9867ff
stream: 'readable' have precedence over flowing
...
In Streams3 the 'readable' event/.read() method had a lower precedence
than the `'data'` event that made them impossible to use them together.
This make `.resume()` a no-op if there is a listener for the
`'readable'` event, making the stream non-flowing if there is a
`'data'` listener.
Fixes: https://github.com/nodejs/node/issues/18058
PR-URL: https://github.com/nodejs/node/pull/18994
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2018-04-06 13:50:15 +02:00
Tobias Nießen
1e07acd476
crypto: add support for AES-CCM
...
This commit adds support for another AEAD algorithm and introduces
required API changes and extensions. Due to the design of CCM itself and
the way OpenSSL implements it, there are some restrictions when using
this mode as outlined in the updated documentation.
PR-URL: https://github.com/nodejs/node/pull/18138
Fixes: https://github.com/nodejs/node/issues/2383
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Shigeki Ohtsu <ohtsu@ohtsu.org >
Reviewed-By: Rod Vagg <rod@vagg.org >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
2018-04-06 13:02:43 +02:00
Ujjwal Sharma
38a692963f
fs: make ReadStream throw TypeError on NaN
...
Make ReadStream (and thus createReadStream) throw a TypeError signalling
towards an invalid argument type when either options.start or
options.end (or obviously, both) are set to NaN.
Also add regression tests for the same.
PR-URL: https://github.com/nodejs/node/pull/19775
Fixes: https://github.com/nodejs/node/issues/19715
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-04-06 10:51:35 +02:00
Luigi Pinca
496d6023e0
net,stream: remove DuplexBase
...
`DuplexBase` was added to prevent the "no-half-open enforcer" from
being inherited by `net.Socket`. The main reason to use it instead
of `Duplex` was that it allowed to not copy the options object but
since commit 5e3f516 the options object is copyed anyway so it is
no longer useful.
PR-URL: https://github.com/nodejs/node/pull/19779
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-04-06 10:23:22 +02:00
Michaël Zasso
dca09a77d5
doc: update AUTHORS list
...
PR-URL: https://github.com/nodejs/node/pull/19768
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-04-06 09:06:12 +02:00
cjihrig
a16d88d9e9
fs: expose copy-on-write flags for fs.copyFile()
...
This commit exposes the UV_FS_COPYFILE_FICLONE and
UV_FS_COPYFILE_FICLONE_FORCE flags added in libuv 1.20.0.
Fixes: https://github.com/nodejs/node/issues/19152
PR-URL: https://github.com/nodejs/node/pull/19759
Fixes: https://github.com/nodejs/node/issues/19152
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-04-05 23:11:20 -04:00
Rich Trott
617946779c
doc: improve prepositions in buffer.md
...
* `at which to begin copying to` -> `at which to begin writing`
* `at which to begin copying from` -> `from which to begin copying`
* wrap at 80 chars
PR-URL: https://github.com/nodejs/node/pull/19817
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-04-05 19:19:23 -07:00
Rich Trott
3db0d62c68
doc: reword poolSize explanation in buffer.md
...
The original explanation was overly wordy, contained mildly questionable
punctuation, and did not wrap at 80 characters. This rewording fixes all
of these issues.
PR-URL: https://github.com/nodejs/node/pull/19785
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
2018-04-05 19:10:14 -07:00
Trivikram Kamat
8b1db6df80
doc: add instructions to update local git config
...
this code change updates pull-requests.md to instruct developers to
update their local git config instead of global. This way their global
git config won't be overwritten if they use different email ID for work
or personal or non-Github projects
PR-URL: https://github.com/nodejs/node/pull/19777
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-04-05 18:40:53 -07:00
Trivikram Kamat
f02e4b90a2
doc: create list for commonly edited files in PRs
...
PR-URL: https://github.com/nodejs/node/pull/19776
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-04-05 18:39:17 -07:00
Daniel Bevenius
682b85036e
test: fix multiple expectedWarnings bug
...
Commit 8fb4ea9f75 ("test: add deprecation code to expectWarning") did
not take into account that the same warning could be expected multiple
times. This bug was discovered in
https://github.com/nodejs/node/pull/18138 and this commit adds a fix for
this issue.
PR-URL: https://github.com/nodejs/node/pull/19766
Refs: https://github.com/nodejs/node/pull/18138
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-04-06 03:14:08 +02:00
Anna Henningsen
e37effe4ce
Revert "deps: upgrade npm to 5.8.0"
...
This reverts commit 25a816dcda .
PR-URL: https://github.com/nodejs/node/pull/19837
Reviewed-By: Gus Caplan <me@gus.host >
2018-04-05 23:00:02 +02:00
Anna Henningsen
026f6b787a
Revert "deps: manually add 10.x support to npm"
...
This reverts commit 55557babca .
PR-URL: https://github.com/nodejs/node/pull/19837
Reviewed-By: Gus Caplan <me@gus.host >
2018-04-05 22:59:57 +02:00
Myles Borins
55557babca
deps: manually add 10.x support to npm
...
Currently npm explicitly doesn't support 10.x and will fail on master.
This patch manually adds support for 10.x so that we can keep an up to
date version of npm on master.
refs: https://github.com/nodejs/node/pull/17535
Backport-PR-URL: https://github.com/nodejs/node/pull/19560
PR-URL: https://github.com/nodejs/node/pull/17777
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
2018-04-05 16:01:08 -04:00
FallenRiteMonk
25a816dcda
deps: upgrade npm to 5.8.0
...
PR-URL: https://github.com/nodejs/node/pull/19560
Fixes: https://github.com/nodejs/node/issues/19271
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Myles Borins <myles.borins@gmail.com >
2018-04-05 16:01:07 -04:00
Ruben Bridgewater
b29c36b807
errors: make dns errors consistent
...
Right now the hostname could in some cases be missed, depending on
the libuv error number. This makes sure there the hostname is always
added, if available.
PR-URL: https://github.com/nodejs/node/pull/19754
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-04-05 19:29:02 +02:00
Ruben Bridgewater
22da2f731d
errors: make message non-enumerable
...
A error message should always be non-enumerable. This makes sure
that is true for dns errors as well. It also adds another check
in `common.expectsError` to make sure no other regressions are
introduced going forward.
Fixes #19716
PR-URL: https://github.com/nodejs/node/pull/19719
Fixes: https://github.com/nodejs/node/issues/19716
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-04-05 11:07:41 +02:00
Sergey Golovin
354849eeb5
url: replace "magic" numbers by constants
...
PR-URL: https://github.com/nodejs/node/pull/19300
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
2018-04-05 08:38:46 +02:00
Trivikram Kamat
422ac61535
doc: remove link to "breaking changes" wiki
...
Breaking changes wiki is not updated, so removing the paragraph
PR-URL: https://github.com/nodejs/node/pull/19795
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-04-04 23:27:52 -07:00
Myles Borins
49e9893d85
2018-04-05, Version 9.11.1 (Current)
...
Notable changes:
An infrastructure issue caused a non-functioning msi installer for x64 to be promoted.
The patch release is to ensure that all binaries and installers work as expected.
2018-04-05 01:20:09 -04:00
willhayslett
126b03e2f9
test: add tests for fs/promises.js fileHandle methods
...
Working to increase test code coverage for fs/promises.js.
Added tests for fileHandle.appendFile and fileHandle.chmod.
PR-URL: https://github.com/nodejs/node/pull/19605
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2018-04-04 19:05:29 -07:00
John-David Dalton
0876a0314d
lib: ensure --check flag works with --require
...
PR-URL: https://github.com/nodejs/node/pull/19600
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
2018-04-04 17:31:45 -07:00
cjihrig
ae2b5bcb7c
deps: upgrade libuv to 1.20.0
...
Notable changes:
- uv_fs_copyfile() adds support for copy-on-write behavior.
- uv_relative_path() now uses the long directory name
for handle->dirw.
- File operations on files > 2 GB on 32-bit platforms are
working again.
- uv_fs_fchmod() on Windows works on files with the
Archive flag cleared.
Fixes: https://github.com/nodejs/node/issues/19170
Fixes: https://github.com/nodejs/node/issues/19455
Fixes: https://github.com/nodejs/node/issues/12803
PR-URL: https://github.com/nodejs/node/pull/19758
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-04-04 20:02:17 -04:00
Michaël Zasso
67cce8d68a
2018-04-04, Version 9.11.0 (Current)
...
Notable changes:
* deps:
- Updated ICU to 61.1 (Steven R. Loomis)
[#19621 ](https://github.com/nodejs/node/pull/19621 )
Includes CLDR 33 (many new languages and data improvements).
* fs:
- Emit 'ready' event for `ReadStream` and `WriteStream` (Sameer
Srivastava) [#19408 ](https://github.com/nodejs/node/pull/19408 )
* n-api:
- Bump version of n-api supported (Michael Dawson)
[#19497 ](https://github.com/nodejs/node/pull/19497 )
* net:
- Emit 'ready' event for `Socket` (Sameer Srivastava)
[#19408 ](https://github.com/nodejs/node/pull/19408 )
* Added new collaborators
- [mafintosh](https://github.com/mafintosh ) Mathias Buus
2018-04-04 17:17:17 -04:00
Joyee Cheung
7d06761f83
errors: improve SystemError messages
...
This commit improves the SystemError messages by allowing user
to combine a custom message and the libuv error message. Also
since we now prefer use subclasses to construct the errors instead
of using `new errors.SystemError()` directly, this removes
the behavior of assigning a default error code `ERR_SYSTEM_ERROR`
to SystemError and requires the user to directly use the
`ERR_SYSTEM_ERROR` class to construct errors instead.
Also merges `makeNodeError` into the SystemError class definition
since that's the only place the function gets used and it seems
unnecessary to introduce another level of inheritance. SystemError
now directly inherits from Error instead of an intermmediate Error
class that inherits from Error.
Class hierarchy before this patch:
ERR_SOCKET_BUFFER_SIZE -> Error (use message formatted by SystemError)
ERR_SYSTEM_ERROR -> NodeError (temp) -> Error
After:
ERR_SOCKET_BUFFER_SIZE -> SystemError -> Error
ERR_TTY_INIT_FAILED -> SystemError -> Error
ERR_SYSTEM_ERROR -> SystemError -> Error
Error messages before this patch:
```
const dgram = require('dgram');
const socket = dgram.createSocket('udp4');
socket.setRecvBufferSize(8192);
// Error [ERR_SOCKET_BUFFER_SIZE]: Could not get or set buffer
// size: Error [ERR_SYSTEM_ERROR]: bad file descriptor:
// EBADF [uv_recv_buffer_size]
// at bufferSize (dgram.js:191:11)
// at Socket.setRecvBufferSize (dgram.js:689:3)
const tty = require('tty');
new tty.WriteStream(1 << 30);
// Error [ERR_SYSTEM_ERROR]: invalid argument: EINVAL [uv_tty_init]
// at new WriteStream (tty.js:84:11)
```
After:
```
const dgram = require('dgram');
const socket = dgram.createSocket('udp4');
socket.setRecvBufferSize(8192);
// SystemError [ERR_SOCKET_BUFFER_SIZE]: Could not get or set buffer
// size: uv_recv_buffer_size returned EBADF (bad file descriptor)
// at bufferSize (dgram.js:191:11)
// at Socket.setRecvBufferSize (dgram.js:689:3)
const tty = require('tty');
new tty.WriteStream(1 << 30);
// SystemError [ERR_TTY_INIT_FAILED]: TTY initialization failed:
// uv_tty_init returned EINVAL (invalid argument)
// at new WriteStream (tty.js:84:11)
```
PR-URL: https://github.com/nodejs/node/pull/19514
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-04-05 04:46:26 +08:00
Joyee Cheung
3e0d40d4af
test: add info option to common.expectsError
...
PR-URL: https://github.com/nodejs/node/pull/19514
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-04-05 04:46:19 +08:00
Rich Trott
acc328ef58
doc: move mafintosh to Collaborators
...
mafintosh was accidentally added to the TSC list rather than the
Collaborators list. This corrects that.
PR-URL: https://github.com/nodejs/node/pull/19806
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2018-04-04 11:04:08 -07:00
Daniel Bevenius
b22a189b43
deps: fix typo in openssl upgrading doc
...
PR-URL: https://github.com/nodejs/node/pull/19789
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2018-04-04 19:42:18 +02:00
Gabriel Schulhof
a972ed4d50
build: allow vcbuild to merely build addon tests
...
RE: https://github.com/nodejs/build/issues/1097
PR-URL: https://github.com/nodejs/node/pull/19637
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
2018-04-04 13:12:19 -04:00
Ruben Bridgewater
3567ea034e
doc: fix added value for assert module
...
PR-URL: https://github.com/nodejs/node/pull/19724
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-04-04 15:20:59 +02:00
Ruben Bridgewater
5bdd6a7b9e
doc: properly document AssertionError
...
The AssertionError was always exposed but never properly documented.
This explains how it is used and what options it accepts.
PR-URL: https://github.com/nodejs/node/pull/19724
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-04-04 15:20:58 +02:00
Ruben Bridgewater
ceaeee0120
tty: add color support for more terminals
...
This adds support for a couple more terminals.
PR-URL: https://github.com/nodejs/node/pull/19730
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2018-04-04 15:14:05 +02:00
Ruben Bridgewater
1b715221b9
tty: add attribution for chalk
...
This adds attributions for the getColorDepth function as it got
inspired by https://github.com/chalk/supports-color and more sources.
PR-URL: https://github.com/nodejs/node/pull/19730
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2018-04-04 15:14:04 +02:00
Rich Trott
3d61e14704
buffer: shorten deprecation warning
...
Shorten the deprecation warning for Buffer constructor.
PR-URL: https://github.com/nodejs/node/pull/19741
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com >
2018-04-04 05:41:30 -07:00
Vse Mozhet Byt
de0053cc32
doc: fix various nits
...
* Replace 2 hyphens (--) by spaced m-dashes (—) as per STYLE_GUIDE.md.
* Space infix operators.
* Unify quotes in inline code spans (use only single quotes).
* Unify `* Returns:` (eliminate deviations).
* Dedupe spaces.
PR-URL: https://github.com/nodejs/node/pull/19743
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2018-04-04 13:45:39 +03:00
Vse Mozhet Byt
237cbe10fb
doc,tools: formalize, unify, codify default values
...
PR-URL: https://github.com/nodejs/node/pull/19737
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2018-04-04 12:30:36 +03:00
Joyee Cheung
f7049a2006
fs: refactor stats array to be more generic
...
- Pass kFsStatsFieldsLength between JS and C++ instead of using the
magic number 14
- Pass the global stats array to the completion callback of
asynchronous FSReqWrap similar to how the stats arrays are passed
to the FSReqPromise resolvers
- Abstract the stats converter and take an offset to compute the
old stats in fs.watchFile
- Use templates in node::FillStatsArray and FSReqPromise in preparation
for BigInt intergration
- Put the global stat array filler in node_internals.h because it is
shared by node_file.cc and node_stat_watcher.cc
PR-URL: https://github.com/nodejs/node/pull/19714
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-04-04 15:25:59 +08:00
Joyee Cheung
30fe55e248
buffer: use v8::TypedArray::kMaxLength as buffer::kMaxLength
...
This was added in v8 6.2, looks like a safe replacement for
our own buffer::kMaxLength.
PR-URL: https://github.com/nodejs/node/pull/19738
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2018-04-04 14:09:51 +08:00
Ruben Bridgewater
2fef227a61
test: check all properties in common.expectsError
...
This makes sure all properties that are meant to be checked will
actually be tested for.
PR-URL: https://github.com/nodejs/node/pull/19722
Reviewed-By: Weijia Wang <starkwang@126.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2018-04-04 07:52:26 +02:00
Joyee Cheung
2f8df6b0f2
build: introduce make jstest
...
Add a `make jstest` target that runs tests written in JavaScript
(excluding documentation tests which are run in `make test-doc`).
PR-URL: https://github.com/nodejs/node/pull/19324
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Matheus Marchini <matheus@sthima.com >
2018-04-04 13:45:34 +08:00
Divyanshu Singh
83444b7c66
test: test process.setuid for bad argument types
...
Test process.setuid with an object as an argument. An equivalent test
exists for process.seteuid.
PR-URL: https://github.com/nodejs/node/pull/19703
Fixes: https://github.com/nodejs/node/issues/19591
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-04-04 07:41:49 +02:00
Rich Trott
8271215118
doc: improve Buffer.allocUnsafeSlow() and related
...
* Fixed "cleanup" being misused as a verb
* "Use of Foo should only be used" construction changed to "Foo should
only be used..."
* Otherwise-unmentioned "`Persistent`" changed to more understandable
"persistent"
* remove an instance of unnecessary italics
* wrap at 80 characters
Change all "initialize a...instance to zeroes" to say "with zeroes"
instead. Previously, both formulations appeared.
PR-URL: https://github.com/nodejs/node/pull/19742
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2018-04-03 22:09:34 -07:00
Teddy Katz
fdb35d8960
assert: ensure .rejects() disallows sync throws
...
This updates `assert.rejects()` to disallow any errors that are thrown
synchronously from the given function. Previously, throwing an error
would cause the same behavior as returning a rejected Promise.
Fixes: https://github.com/nodejs/node/issues/19646
PR-URL: https://github.com/nodejs/node/pull/19650
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-04-03 22:41:01 -04:00
Teddy Katz
8995125c14
test: ensure failed assertions cause build to fail
...
This updates the test in `test/parallel/test-assert-async.js` to add an
assertion that the Promises used in the test end up fulfilled.
Previously, if an assertion failure occurred, the Promises would have
rejected and a warning would have been logged, but the test would still
have exit code 0.
PR-URL: https://github.com/nodejs/node/pull/19650
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-04-03 22:41:01 -04:00
Rich Trott
88910724c8
test: update test to comply with lint rule
...
Ref: https://github.com/nodejs/node/pull/19502#issuecomment-378450321
PR-URL: https://github.com/nodejs/node/pull/19784
Reviewed-By: Teddy Katz <teddy.katz@gmail.com >
Reviewed-By: Matheus Marchini <matheus@sthima.com >
2018-04-03 19:39:22 -07:00
fatahn
625971271b
test: improve assert message
...
Use the default assert.strictEqual() message so that unequal values are
shown in the event of an AssertionError.
PR-URL: https://github.com/nodejs/node/pull/19629
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2018-04-03 18:48:45 -07:00
Forrest Wolf
14310b5c1f
test: remove third argument from call to assert.strictEqual()
...
Remove the message argument from call to assert.strictEqual so
that the AssertionError will report the value of er.code, and add
a comment with the message.
PR-URL: https://github.com/nodejs/node/pull/19659
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2018-04-03 16:00:49 -07:00
XadillaX
b06f686f88
http: fix request when setHost is true
...
Fixes: https://github.com/nodejs/node/issues/19457
PR-URL: https://github.com/nodejs/node/pull/19502
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Yuta Hiroto <hello@hiroppy.me >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2018-04-03 15:43:40 -07:00
James M Snell
2ec6995555
perf_hooks: simplify perf_hooks
...
Remove the `performance.getEntries()` and `performance.clear*()`
variants and eliminate the accumulation of the global timeline
entries. The design of this particular bit of the API is a memory
leak and performance footgun. The `PerformanceObserver` API is
a better approach to consuming the data in a more transient way.
PR-URL: https://github.com/nodejs/node/pull/19563
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2018-04-03 13:57:41 -07:00
Mathias Buus
d54f651910
doc: add mafintosh to collaborators
...
PR-URL: https://github.com/nodejs/node/pull/19773
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
2018-04-03 18:38:52 +02:00