Shigeki Ohtsu
9cb1da765a
openssl: fix keypress requirement in apps on win32
...
Reapply b910613792 .
Fixes: https://github.com/iojs/io.js/issues/589
PR-URL: https://github.com/iojs/io.js/pull/1389
Reviewed-By: Fedor Indutny <fedor@indutny.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
2017-06-03 00:44:53 +09:00
Shigeki Ohtsu
b8a03a3664
deps: fix asm build error of openssl in x86_win32
...
See
https://mta.openssl.org/pipermail/openssl-dev/2015-February/000651.html
iojs needs to stop using masm and move to nasm or yasm on Win32.
Fixes: https://github.com/iojs/io.js/issues/589
PR-URL: https://github.com/iojs/io.js/pull/1389
Reviewed-By: Fedor Indutny <fedor@indutny.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
2017-06-03 00:44:51 +09:00
Fedor Indutny
025dc56872
deps: fix openssl assembly error on ia32 win32
...
`x86masm.pl` was mistakenly using .486 instruction set, why `cpuid` (and
perhaps others) are requiring .686 .
Fixes: https://github.com/iojs/io.js/issues/589
PR-URL: https://github.com/iojs/io.js/pull/1389
Reviewed-By: Fedor Indutny <fedor@indutny.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Shigeki Ohtsu <ohtsu@iij.ad.jp >
2017-06-03 00:44:48 +09:00
Daniel Bevenius
51ed26e432
deps: copy all openssl header files to include dir
...
All symlink files in deps/openssl/openssl/include/openssl/ are removed
and replaced with real header files to avoid issues on Windows. Two
files of opensslconf.h in crypto and include dir are replaced to refer
config/opensslconf.h.
Fixes: https://github.com/nodejs/node/issues/13161
PR-URL: https://github.com/nodejs/node/pull/13233
Reviewed-By: Shigeki Ohtsu <ohtsu@ohtsu.org >
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
2017-06-03 00:44:39 +09:00
Daniel Bevenius
bd4a53493b
deps: upgrade openssl sources to 1.0.2l
...
This replaces all sources of openssl-1.0.2l.tar.gz into
deps/openssl/openssl
Fixes: https://github.com/nodejs/node/issues/13161
PR-URL: https://github.com/nodejs/node/pull/13233
Reviewed-By: Shigeki Ohtsu <ohtsu@ohtsu.org >
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
2017-06-03 00:41:47 +09:00
Vse Mozhet Byt
a235e670a8
doc: refine spaces in example from vm.md
...
PR-URL: https://github.com/nodejs/node/pull/13334
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2017-06-02 16:47:47 +03:00
Jesus Seijas
41919626e5
util: refactor format method.Performance improved.
...
Method format refactored to make it more maintenable, replacing the
switch by a function factory, that returns the appropiated function
given the character (d, i , f, j, s).
Also, performance when formatting an string that contains several
consecutive % symbols is improved. The test:
`const numSamples = 10000000;
const strPercents = '%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%s%%%%%%%%%%%%%%%%%i%%%%%%%%%%%%%%%%%%%%%%%%%%';
var s;
console.time('Percents');
for (let i = 0; i < numSamples; i++) {
s = util.format(strPercents, 'test', 12);
}
console.timeEnd('Percents');`
Original time: 28399.708ms
After refactor: 23763.788ms
Improved: 16%
PR-URL: https://github.com/nodejs/node/pull/12407
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Roman Reiss <me@silverwind.io >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Brian White <mscdex@mscdex.net >
2017-06-02 15:35:27 +02:00
Nikolai Vavilov
3fe980d3e6
build: fix typo
...
PR-URL: https://github.com/nodejs/node/pull/13396
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
2017-06-02 16:14:56 +03:00
Daniel Bevenius
7dfeb36143
test: check inspector support in test/inspector
...
When configuring node --without-ssl or --without-inspector these test
will fail. The underlying issue will be:
Inspector support is not available with this Node.js build
/work/nodejs/node/out/Release/node: bad option: --inspect=0
This commit adds checks to see if inspector support is enabled and if
not skips these tests.
PR-URL: https://github.com/nodejs/node/pull/13324
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Eugene Ostroukhov <eostroukhov@chromium.org >
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-06-02 08:12:08 +02:00
rmdm
b1ed55f259
assert: fix deepEqual RangeError: Maximum call stack size exceeded
...
Fixes: https://github.com/nodejs/node/issues/13314
Refs: https://github.com/nodejs/node/issues/6416
This commit changes semantics of the memos cycles tracker. Before
the change it was used to track all currently wisited nodes of an
object tree, which is a bit shifted from its original intention of
tracking cycles. The change brings intended semantics, by tracking
only objects of the current branch of the object tree.
PR-URL: https://github.com/nodejs/node/pull/13318
Fixes: https://github.com/nodejs/node/issues/13314
Ref: https://github.com/nodejs/node/issues/6416
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2017-06-01 20:48:59 -07:00
David D Lowe
592d7d2f2a
test: add known_test request with Unicode in the URL
...
This test currently fails. It illustrates that Unicode in the URL does
not arrive intact to the server, there is silent data corruption along
the way at some point.
This test is for the issue https://github.com/nodejs/node/issues/13296 .
PR-URL: https://github.com/nodejs/node/pull/13297
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-06-01 20:20:49 -07:00
Bidisha Pyne
a9f798ebcc
errors,http_server: migrate to use internal/errors.js
...
PR-URL: https://github.com/nodejs/node/pull/13301
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-06-01 20:09:30 -07:00
sreepurnajasti
28227963fa
errors,repl: migrate to use internal/errors.js
...
PR-URL: https://github.com/nodejs/node/pull/13299
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-06-01 20:04:55 -07:00
Brian White
3c989de207
dns: use faster IP address type check on results
...
PR-URL: https://github.com/nodejs/node/pull/13261
Reviewed-By: Roman Reiss <me@silverwind.io >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-06-01 22:00:55 -04:00
Brian White
656bb71867
dns: improve callback performance
...
It appears that either c-ares no longer calls callbacks synchronously
or we have since explicitly taken care of the scenarios in which
c-ares would call callbacks synchronously (e.g. resolving an IP
address or an empty hostname). Therefore we no longer need to have
machinery in place to handle possible synchronous callback invocation.
This improves performance significantly.
PR-URL: https://github.com/nodejs/node/pull/13261
Reviewed-By: Roman Reiss <me@silverwind.io >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-06-01 22:00:50 -04:00
Brian White
8d7ff6dd75
test: improve dns internet test case
...
0.0.0.0 is more common than other special ipv4 addresses, so
it is possible that we may not get ENOTFOUND for such addresses.
Instead, this commit uses a less common address that is reserved
for documentation (RFC) use only.
PR-URL: https://github.com/nodejs/node/pull/13261
Reviewed-By: Roman Reiss <me@silverwind.io >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-06-01 21:59:57 -04:00
Timothy Gu
95eef9b044
url: more precise URLSearchParams constructor
...
PR-URL: https://github.com/nodejs/node/pull/13026
Ref: https://github.com/w3c/web-platform-tests/pull/5813
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-06-01 16:47:20 -07:00
Sam Roberts
3fba3d6409
http: describe parse err in debug output
...
PR-URL: https://github.com/nodejs/node/pull/13206
Reviewed-By: Refael Ackermann <refack@gmail.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: Brian White <mscdex@mscdex.net >
2017-06-01 16:41:29 -07:00
Josh Ferge
7f545f083d
src: added newline in help message
...
PR-URL: https://github.com/nodejs/node/pull/13315
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-06-01 16:28:23 -07:00
Gibson Fahnestock
7d53abad8b
readline: clean up event listener in onNewListener
...
Once the Readline interface is closed, the 'data' event listener should
be removed.
PR-URL: https://github.com/nodejs/node/pull/13266
Ref: https://github.com/nodejs/node/pull/9447#discussion_r86599214
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-06-01 16:20:03 -07:00
Myles Borins
b7d143842c
tools: be explicit about including key-id
...
gpg 2.1 no longer includes the key-id by default which breaks
the release script. This makes sure we are explicit about it.
PR-URL: https://github.com/nodejs/node/pull/13309
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2017-06-01 16:07:18 -07:00
Sam Roberts
26ab769940
inspector: refactor to rename and comment methods
...
Pure refactor, makes no functional changes but the renaming helped me
see more clearly what the relationship was between methods and
variables.
* Renamed methods to reduce number of slightly different names for the
same thing ("thread" vs "io thread", etc.).
* Added comments where it was useful to me.
PR-URL: https://github.com/nodejs/node/pull/13321
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-06-01 15:54:34 -07:00
Rich Trott
ce5745bf92
test: improve test-https-server-keep-alive-timeout
...
The test is flaky under load. These changes greatly improve reliability.
* Use a recurring interval to determine when the test should end rather
than a timer.
* Increase server timeout to 500ms to allow for events being delayed by
system load
Changing to an interval has the added benefit of reducing the test run
time from over 2 seconds to under 1 second.
Fixes: https://github.com/nodejs/node/issues/13307
PR-URL: https://github.com/nodejs/node/pull/13312
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com >
2017-06-01 15:47:42 -07:00
James, please
17e10b33c2
doc: fix link in CHANGELOG_V8
...
PR-URL: https://github.com/nodejs/node/pull/13313
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2017-06-01 15:42:31 -07:00
Refael Ackermann
45d78393a9
test: mark inspector-port-zero-cluster as flaky
...
Ref: https://github.com/nodejs/node/issues/13343
2017-06-01 18:22:06 -04:00
Dan Fabulich
65531d0e86
fs: promisify exists correctly
...
PR-URL: https://github.com/nodejs/node/pull/13316
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Vladimir Kurchatkin <vladimir.kurchatkin@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Timothy Gu <timothygu99@gmail.com >
2017-06-01 15:19:29 -07:00
Vse Mozhet Byt
38cec08ff7
doc: add async_hooks, n-api to _toc.md and all.md
...
PR-URL: https://github.com/nodejs/node/pull/13379
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-06-02 01:13:46 +03:00
Michael Dawson
449dd71631
doc: remove 'you' from writing-tests.md
...
Noticed this while reading through writing-tests.md today.
As per style guide avoid the use of you, your etc.
Rational as per: http://www2.ivcc.edu/rambo/tip_formal_writing_voice.htm
PR-URL: https://github.com/nodejs/node/pull/13319
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2017-06-01 17:55:17 -04:00
Michael Dawson
7a7ac1c6db
test: consolidate n-api test addons
...
It takes time to build each of the addons used to test n-api.
Consolidate a few of the smaller ones to save build time.
PR-URL: https://github.com/nodejs/node/pull/13317
Reviewed-By: Jason Ginchereau <jasongin@microsoft.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2017-06-01 17:50:14 -04:00
Myles Borins
8440777553
doc: fix date for 8.0.0 changelog
...
Fixes #13356
PR-URL: https://github.com/nodejs/node/pull/13360
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Timothy Gu <timothygu99@gmail.com >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-06-01 14:23:47 -07:00
Thorsten Lorenz
126170a05f
doc: async-hooks documentation
...
Author: Thorsten Lorenz <thlorenz@gmx.de >
Author: Andreas Madsen <amwebdk@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/13287
Reviewed-By: Trevor Norris <trev.norris@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2017-06-01 23:03:51 +02:00
Jason Ginchereau
8ab8c33985
n-api: enable napi_wrap() to work with any object
...
Previously, napi_wrap() would only work with objects created from a
constructor returned by napi_define_class(). While the N-API team
was aware of this limitation, it was not clearly documented and is
likely to cause confusion anyway. It's much simpler if addons are
allowed to use any JS object. Also, the specific behavior of the
limitation is difficult to reimplement on other VMs that work
differently from V8.
V8 requires object internal fields to be declared on the object
prototype (which napi_define_class() used to do). Since it's too
late to modify the object prototype by the time napi_wrap() is
called, napi_wrap() now inserts a new object (with the internal
field) into the supplied object's prototype chain. Then it can be
retrieved from there later by napi_unwrap().
This change also includes improvements to the documentation for
napi_create_external(), partly to explain how it is different from
napi_wrap().
PR-URL: https://github.com/nodejs/node/pull/13250
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
2017-06-01 11:46:55 -07:00
Tobias Nießen
9b730620a7
doc: add tniessen to collaborators
...
PR-URL: https://github.com/nodejs/node/pull/13371
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
2017-06-01 17:27:30 +02:00
Vse Mozhet Byt
862bf1bbc2
doc: modernize and fix code examples in util.md
...
* Remove useless constructor.
* Use template literals.
* Update code example.
Now all arrays with just holes are outputted the same way.
In the fixed example, it was `[ <101 empty items> ]` twice.
PR-URL: https://github.com/nodejs/node/pull/13298
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-06-01 17:45:27 +03:00
Rich Trott
e824c75c3e
test: refactor test-net-server-bind
...
* Use common.mustNotCall() and common.mustCall() as appropriate
* Use block scoping
* Move assertions out of `exit` handler and into callbacks
* Order assert.strictEqual() args per docs
* Remove console.log() calls
* Move test from `parallel` to `sequential` so `common.PORT` can be used
without conflicting with OS-provided ports in other `parallel` tests
PR-URL: https://github.com/nodejs/node/pull/13273
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2017-05-31 22:09:54 -07:00
Vse Mozhet Byt
f1b2e68d65
doc: fix code examples in url.md
...
* Update outputs.
* Refine spaces.
* Restore missing part.
PR-URL: https://github.com/nodejs/node/pull/13288
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
2017-06-01 02:23:11 +03:00
Anna Henningsen
ae6c7044c8
Revert "lib: lazy instantiation of fs.Stats dates"
...
This reverts commit 9836cf5717 .
Ref: https://github.com/npm/npm/issues/16734
PR-URL: https://github.com/nodejs/node/pull/13256
Reviewed-By: Timothy Gu <timothygu99@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2017-06-01 00:44:37 +02:00
Alexander O'Mara
e7100364f4
zlib: expose amount of data read for engines
...
Added bytesRead property to Zlib engines
Fixes: https://github.com/nodejs/node/issues/8874
PR-URL: https://github.com/nodejs/node/pull/13088
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
2017-06-01 00:22:23 +02:00
Alexander O'Mara
d0b1b52edb
zlib: option for engine in convenience methods
...
Added option to expose engine to convenience methods
Refs: https://github.com/nodejs/node/issues/8874
PR-URL: https://github.com/nodejs/node/pull/13089
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2017-06-01 00:21:32 +02:00
Rich Trott
36867786d0
test: use mustCall() in test-readline-interface
...
Use `common.mustCall()` to make sure noop function is called as
expected.
PR-URL: https://github.com/nodejs/node/pull/13259
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-05-31 11:32:53 -07:00
Rich Trott
102e1aa4e3
doc: fix ordering error in errors.md
...
PR-URL: https://github.com/nodejs/node/pull/13274
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-05-31 10:21:29 -07:00
Ryan Kelly
f6665334e7
crypto: clear err stack after ECDH::BufferToPoint
...
Functions that call `ECDH::BufferToPoint` were not clearing the
error stack on failure, so an invalid key could leave leftover
error state and cause subsequent (unrelated) signing operations
to fail.
PR-URL: https://github.com/nodejs/node/pull/13275
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-05-31 07:37:51 -07:00
Yihong Wang
716e9e07fd
http: suppress data event if req aborted
...
Re-enable test-http-abort-stream-end and put it into parallel
category. Use system random port when calling server.listen()
and fix eslint errors.
After calling request.abort(), in order to avoid the buffered
data to trigger the 'data' event, explicitly remove 'data' event
listeners.
PR-URL: https://github.com/nodejs/node/pull/13260
Reviewed-By: Brian White <mscdex@mscdex.net >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2017-05-31 10:39:17 +02:00
JongChan Choi
fd54b10500
doc: fix typo in n-api.md
...
PR-URL: https://github.com/nodejs/node/pull/13323
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2017-05-31 10:35:39 +03:00
Rich Trott
3b12a8d6e7
test: fix flaky test-fs-watchfile on macOS
...
On macOS, a watcher created with fs.watch() does not necessarily
start receiving events immediately. So it can miss a change by
fs.writefile() if it comes very soon after the watcher is created. Fix
test flakiness caused by this by using `setInterval()` to repeat the
write action.
PR-URL: https://github.com/nodejs/node/pull/13252
Fixes: https://github.com/nodejs/node/issues/13248
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-05-30 13:47:24 -07:00
Rich Trott
64ded9f9bc
test: use mustNotCall() in test-stream2-objects
...
Use `common.mustNotCall()` in test-stream2-objects.js to confirm that
noop function is never invoked.
PR-URL: https://github.com/nodejs/node/pull/13249
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-05-30 13:23:42 -07:00
Jason Ginchereau
bb91879f31
test: Make N-API weak-ref GC tests asynchronous
...
One of the N-API weak-reference test cases already had to be made
asynchronous to handle different behavior in a newer V8 version:
https://github.com/nodejs/node/pull/12864
When porting N-API to Node-ChakraCore, we found more of the test
cases needed similar treatment:
https://github.com/nodejs/node-chakracore/issues/246 So to make
thes tests more robust (and avoid having differences in the test code
for Node-ChakraCore), I am refactoring the tests in this file to
insert a `setImmedate()` callback before every call to `gc()` and
assertions about the effects of the GC.
PR-URL: https://github.com/nodejs/node/pull/13121
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
2017-05-30 12:45:27 -07:00
James M Snell
43e4efdf21
2017-05-30, Version 8.0.0 (Current)
...
* **Async Hooks**
* The `async_hooks` module has landed in core
[[`4a7233c178`](https://github.com/nodejs/node/commit/4a7233c178 )]
[#12892 ](https://github.com/nodejs/node/pull/12892 ).
* **Buffer**
* Using the `--pending-deprecation` flag will cause Node.js to emit a
deprecation warning when using `new Buffer(num)` or `Buffer(num)`.
[[`d2d32ea5a2`](https://github.com/nodejs/node/commit/d2d32ea5a2 )]
[#11968 ](https://github.com/nodejs/node/pull/11968 ).
* `new Buffer(num)` and `Buffer(num)` will zero-fill new `Buffer` instances
[[`7eb1b4658e`](https://github.com/nodejs/node/commit/7eb1b4658e )]
[#12141 ](https://github.com/nodejs/node/pull/12141 ).
* Many `Buffer` methods now accept `Uint8Array` as input
[[`beca3244e2`](https://github.com/nodejs/node/commit/beca3244e2 )]
[#10236 ](https://github.com/nodejs/node/pull/10236 ).
* **Child Process**
* Argument and kill signal validations have been improved
[[`97a77288ce`](https://github.com/nodejs/node/commit/97a77288ce )]
[#12348 ](https://github.com/nodejs/node/pull/12348 ),
[[`d75fdd96aa`](https://github.com/nodejs/node/commit/d75fdd96aa )]
[#10423 ](https://github.com/nodejs/node/pull/10423 ).
* Child Process methods accept `Uint8Array` as input
[[`627ecee9ed`](https://github.com/nodejs/node/commit/627ecee9ed )]
[#10653 ](https://github.com/nodejs/node/pull/10653 ).
* **Console**
* Error events emitted when using `console` methods are now supressed.
[[`f18e08d820`](https://github.com/nodejs/node/commit/f18e08d820 )]
[#9744 ](https://github.com/nodejs/node/pull/9744 ).
* **Dependencies**
* The npm client has been updated to 5.0.0
[[`3c3b36af0f`](https://github.com/nodejs/node/commit/3c3b36af0f )]
[#12936 ](https://github.com/nodejs/node/pull/12936 ).
* V8 has been updated to 5.8 with forward ABI stability to 6.0
[[`60d1aac8d2`](https://github.com/nodejs/node/commit/60d1aac8d2 )]
[#12784 ](https://github.com/nodejs/node/pull/12784 ).
* **Domains**
* Native `Promise` instances are now `Domain` aware
[[`84dabe8373`](https://github.com/nodejs/node/commit/84dabe8373 )]
[#12489 ](https://github.com/nodejs/node/pull/12489 ).
* **Errors**
* We have started assigning static error codes to errors generated by Node.js.
This has been done through multiple commits and is still a work in
progress.
* **File System**
* The utility class `fs.SyncWriteStream` has been deprecated
[[`7a55e34ef4`](https://github.com/nodejs/node/commit/7a55e34ef4 )]
[#10467 ](https://github.com/nodejs/node/pull/10467 ).
* The deprecated `fs.read()` string interface has been removed
[[`3c2a9361ff`](https://github.com/nodejs/node/commit/3c2a9361ff )]
[#9683 ](https://github.com/nodejs/node/pull/9683 ).
* **HTTP**
* Improved support for userland implemented Agents
[[`90403dd1d0`](https://github.com/nodejs/node/commit/90403dd1d0 )]
[#11567 ](https://github.com/nodejs/node/pull/11567 ).
* Outgoing Cookie headers are concatenated into a single string
[[`d3480776c7`](https://github.com/nodejs/node/commit/d3480776c7 )]
[#11259 ](https://github.com/nodejs/node/pull/11259 ).
* The `httpResponse.writeHeader()` method has been deprecated
[[`fb71ba4921`](https://github.com/nodejs/node/commit/fb71ba4921 )]
[#11355 ](https://github.com/nodejs/node/pull/11355 ).
* New methods for accessing HTTP headers have been added to `OutgoingMessage`
[[`3e6f1032a4`](https://github.com/nodejs/node/commit/3e6f1032a4 )]
[#10805 ](https://github.com/nodejs/node/pull/10805 ).
* **Lib**
* All deprecation messages have been assigned static identifiers
[[`5de3cf099c`](https://github.com/nodejs/node/commit/5de3cf099c )]
[#10116 ](https://github.com/nodejs/node/pull/10116 ).
* The legacy `linkedlist` module has been removed
[[`84a23391f6`](https://github.com/nodejs/node/commit/84a23391f6 )]
[#12113 ](https://github.com/nodejs/node/pull/12113 ).
* **N-API**
* Experimental support for the new N-API API has been added
[[`56e881d0b0`](https://github.com/nodejs/node/commit/56e881d0b0 )]
[#11975 ](https://github.com/nodejs/node/pull/11975 ).
* **Process**
* Process warning output can be redirected to a file using the
`--redirect-warnings` command-line argument
[[`03e89b3ff2`](https://github.com/nodejs/node/commit/03e89b3ff2 )]
[#10116 ](https://github.com/nodejs/node/pull/10116 ).
* Process warnings may now include additional detail
[[`dd20e68b0f`](https://github.com/nodejs/node/commit/dd20e68b0f )]
[#12725 ](https://github.com/nodejs/node/pull/12725 ).
* **REPL**
* REPL magic mode has been deprecated
[[`3f27f02da0`](https://github.com/nodejs/node/commit/3f27f02da0 )]
[#11599 ](https://github.com/nodejs/node/pull/11599 ).
* **Src**
* `NODE_MODULE_VERSION` has been updated to 57
(https://github.com/nodejs/node/commit/ec7cbaf266 )]
[#12995 ](https://github.com/nodejs/node/pull/12995 ).
* Add `--pending-deprecation` command-line argument and
`NODE_PENDING_DEPRECATION` environment variable
[[`a16b570f8c`](https://github.com/nodejs/node/commit/a16b570f8c )]
[#11968 ](https://github.com/nodejs/node/pull/11968 ).
* The `--debug` command-line argument has been deprecated. Note that
using `--debug` will enable the *new* Inspector-based debug protocol
as the legacy Debugger protocol previously used by Node.js has been
removed. [[`010f864426`](https://github.com/nodejs/node/commit/010f864426 )]
[#12949 ](https://github.com/nodejs/node/pull/12949 ).
* Throw when the `-c` and `-e` command-line arguments are used at the same
time [[`a5f91ab230`](https://github.com/nodejs/node/commit/a5f91ab230 )]
[#11689 ](https://github.com/nodejs/node/pull/11689 ).
* Throw when the `--use-bundled-ca` and `--use-openssl-ca` command-line
arguments are used at the same time.
[[`8a7db9d4b5`](https://github.com/nodejs/node/commit/8a7db9d4b5 )]
[#12087 ](https://github.com/nodejs/node/pull/12087 ).
* **Stream**
* `Stream` now supports `destroy()` and `_destroy()` APIs
[[`b6e1d22fa6`](https://github.com/nodejs/node/commit/b6e1d22fa6 )]
[#12925 ](https://github.com/nodejs/node/pull/12925 ).
* `Stream` now supports the `_final()` API
[[`07c7f198db`](https://github.com/nodejs/node/commit/07c7f198db )]
[#12828 ](https://github.com/nodejs/node/pull/12828 ).
* **TLS**
* The `rejectUnauthorized` option now defaults to `true`
[[`348cc80a3c`](https://github.com/nodejs/node/commit/348cc80a3c )]
[#5923 ](https://github.com/nodejs/node/pull/5923 ).
* The `tls.createSecurePair()` API now emits a runtime deprecation
[[`a2ae08999b`](https://github.com/nodejs/node/commit/a2ae08999b )]
[#11349 ](https://github.com/nodejs/node/pull/11349 ).
* A runtime deprecation will now be emitted when `dhparam` is less than
2048 bits [[`d523eb9c40`](https://github.com/nodejs/node/commit/d523eb9c40 )]
[#11447 ](https://github.com/nodejs/node/pull/11447 ).
* **URL**
* The WHATWG URL implementation is now a fully-supported Node.js API
[[`d080ead0f9`](https://github.com/nodejs/node/commit/d080ead0f9 )]
[#12710 ](https://github.com/nodejs/node/pull/12710 ).
* **Util**
* `Symbol` keys are now displayed by default when using `util.inspect()`
[[`5bfd13b81e`](https://github.com/nodejs/node/commit/5bfd13b81e )]
[#9726 ](https://github.com/nodejs/node/pull/9726 ).
* `toJSON` errors will be thrown when formatting `%j`
[[`455e6f1dd8`](https://github.com/nodejs/node/commit/455e6f1dd8 )]
[#11708 ](https://github.com/nodejs/node/pull/11708 ).
* Convert `inspect.styles` and `inspect.colors` to prototype-less objects
[[`aab0d202f8`](https://github.com/nodejs/node/commit/aab0d202f8 )]
[#11624 ](https://github.com/nodejs/node/pull/11624 ).
* The new `util.promisify()` API has been added
[[`99da8e8e02`](https://github.com/nodejs/node/commit/99da8e8e02 )]
[#12442 ](https://github.com/nodejs/node/pull/12442 ).
* **Zlib**
* Support `Uint8Array` in Zlib convenience methods
[[`91383e47fd`](https://github.com/nodejs/node/commit/91383e47fd )]
[#12001 ](https://github.com/nodejs/node/pull/12001 ).
* Zlib errors now use `RangeError` and `TypeError` consistently
[[`b514bd231e`](https://github.com/nodejs/node/commit/b514bd231e )]
[#11391 ](https://github.com/nodejs/node/pull/11391 ).
2017-05-30 10:58:31 -07:00
Michael Dawson
effeff1843
test: improve n-api coverage for typed arrays
...
Add testing for all types of typed arrays.
Add testing for napi_is_arraybuffer.
PR-URL: https://github.com/nodejs/node/pull/13244
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Jason Ginchereau <jasongin@microsoft.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Kunal Pathak <kunal.pathak@microsoft.com >
Reviewed-By: Hitesh Kanwathirtha <digitalinfinity@gmail.com >
2017-05-30 13:50:45 -04:00
Daijiro Wachi
1d60fc3aa5
doc: fix doc styles
...
BUILDING.md
+ L122: Missing code-language flag
+ L170: Strong should use `*` as a marker
doc/changelogs/CHANGELOG_V6.md
+ L1494: Don't pad `emphasis` with inner spaces
doc/guides/maintaining-V8.md
+ L3: Don't use multiple top level headings
+ L16: Don't use multiple top level headings
+ L40: Don't use multiple top level headings
+ L124: Don't use multiple top level headings
+ L182: Missing code-language flag
+ L223: Don't use multiple top level headings
+ L288: Don't use multiple top level headings
+ L307: Don't use multiple top level headings
doc/guides/writing-tests.md
+ L322: Missing code-language flag
+ L329: Missing code-language flag
doc/releases.md
+ L299: Missing code-language flag
PR-URL: https://github.com/nodejs/node/pull/13270
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
2017-05-30 19:18:48 +02:00