Luigi Pinca
165916b1f3
http2: support net.Server options
...
Make `http2.createServer()` support `net.Server` options.
PR-URL: https://github.com/nodejs/node/pull/27782
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2019-05-23 05:35:19 +02:00
Rich Trott
78f2bb1c82
doc: simplify contributing documentation
...
Remove out-of-place detail about filesystem layout and tools for
generating documentation. Link to the issue tracker and the contribution
guide with clear, concise sentences.
PR-URL: https://github.com/nodejs/node/pull/27785
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2019-05-22 16:21:40 -07:00
Myles Borins
c3f72510c8
esm: remove experimental status from JSON modules
...
The HTML spec has officially landed JSON Modules and as such I think
we can move them out of the "experimental" status. They will still
be behind the `--experimental-modules` flag until the entire esm
implementation moves out of experimental.
Refs: https://html.spec.whatwg.org/#creating-a-json-module-script
PR-URL: https://github.com/nodejs/node/pull/27752
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Bradley Farias <bradley.meck@gmail.com >
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Guy Bedford <guybedford@gmail.com >
Reviewed-By: Yuta Hiroto <hello@hiroppy.me >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com >
Reviewed-By: Jan Krems <jan.krems@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2019-05-22 04:06:34 -04:00
Ruben Bridgewater
9fec70a703
2019-05-21, Version 12.3.0 (Current)
...
Notable changes:
* esm:
* Added the `--experimental-wasm-modules` flag to support
WebAssembly modules (Myles Borins & Guy Bedford)
https://github.com/nodejs/node/pull/27659
* process:
* Log errors using `util.inspect` in case of fatal exceptions
(Ruben Bridgewater) https://github.com/nodejs/node/pull/27243
* repl:
* Add `process.on('uncaughtException')` support (Ruben Bridgewater)
https://github.com/nodejs/node/pull/27151
* stream:
* Implemented `Readable.from` async iterator utility (Guy Bedford)
https://github.com/nodejs/node/pull/27660
* tls:
* Expose built-in root certificates (Ben Noordhuis)
https://github.com/nodejs/node/pull/26415
* Support `net.Server` options (Luigi Pinca)
https://github.com/nodejs/node/pull/27665
* Expose `keylog` event on TLSSocket (Alba Mendez)
https://github.com/nodejs/node/pull/27654
* worker:
* Added the ability to unshift messages from the `MessagePort`
(Anna Henningsen) https://github.com/nodejs/node/pull/27294
PR-URL: https://github.com/nodejs/node/pull/27799
2019-05-21 21:23:52 +02:00
Dan Beglin
0ca9297c39
doc: corrected tlsSocket.getPeerCertificate response type
...
Within tls.md, the documentation for the response of
tlsSocket.getPeerCertificate() included subjectaltname
documented as an array of values. However these values are
actually returned as a single string of concatenated values.
The documentation has been updated to reflect this.
PR-URL: https://github.com/nodejs/node/pull/27757
Fixes: https://github.com/nodejs/node/issues/27721
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2019-05-21 05:28:24 +02:00
himself65
2e5bc8047e
doc: correct parameter type on 'subprocess.kill([signal])'
...
PR-URL: https://github.com/nodejs/node/pull/27760
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2019-05-20 23:00:31 +08:00
cjihrig
1b381d630a
doc: replace createRequireFromPath() references
...
This commit replaces createRequireFromPath() references with
createRequire() references.
PR-URL: https://github.com/nodejs/node/pull/27762
Fixes: https://github.com/nodejs/node/issues/27758
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com >
2019-05-20 10:22:56 -04:00
cjihrig
58a59a8d6b
doc: improve createRequire() example
...
Update the example to use import and import.meta.url instead
of require() and require.resolve().
PR-URL: https://github.com/nodejs/node/pull/27762
Fixes: https://github.com/nodejs/node/issues/27758
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com >
2019-05-20 10:22:44 -04:00
Ruben Bridgewater
9f71dbc334
util: include reference anchor for circular structures
...
This adds a reference anchor to circular structures when using
`util.inspect`. That way it's possible to identify with what object
the circular reference corresponds too.
PR-URL: https://github.com/nodejs/node/pull/27685
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
2019-05-20 14:20:59 +02:00
Ruben Bridgewater
5518664d41
util: if present, fallback to toString using the %s formatter
...
This makes sure that `util.format` uses `String` to stringify an object
in case the object has an own property named `toString` with type
`function`. That way objects that do not have such function are still
inspected using `util.inspect` and the old behavior is preserved as
well.
PR-URL: https://github.com/nodejs/node/pull/27621
Refs: https://github.com/facebook/jest/issues/8443
Reviewed-By: Roman Reiss <me@silverwind.io >
2019-05-20 14:18:18 +02:00
Ruben Bridgewater
182b48aa77
doc: update util.format formatters documentation
...
This includes the information that some inputs are handled
differently than others (e.g., `Symbols` are partially represented
as `NaN`).
PR-URL: https://github.com/nodejs/node/pull/27621
Reviewed-By: Roman Reiss <me@silverwind.io >
2019-05-20 14:18:14 +02:00
Ben Noordhuis
f1a3968a01
tls: expose built-in root certificates
...
Fixes: https://github.com/nodejs/node/issues/25824
PR-URL: https://github.com/nodejs/node/pull/26415
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Ron Korving <ron@ronkorving.nl >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
2019-05-20 11:09:02 +02:00
Michael Dawson
4a218fd96f
doc: remove stability highlight for stable functions
...
We don't have the stability functions for all stable
functions, only those that were previously experimental and
then when stable. Remove the stability indicator to be
consistent with the rest of the functions.
PR-URL: https://github.com/nodejs/node/pull/27753
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-05-19 23:07:16 -07:00
Guy Bedford
1a9a577a96
bootstrap: --frozen-intrinsics unfreeze console
...
PR-URL: https://github.com/nodejs/node/pull/27663
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2019-05-20 05:21:01 +02:00
Anto Aravinth
b4735ecebb
stream: use readableObjectMode public api for js stream
...
PR-URL: https://github.com/nodejs/node/pull/27655
Refs: https://github.com/nodejs/node/issues/445
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
2019-05-19 23:37:51 +02:00
Rich Trott
bd895af1f8
doc: rewrite "About this Documentation" section
...
Replace the "About this Documentation" section with a simple welcome
message and a concise description of Node.js
PR-URL: https://github.com/nodejs/node/pull/27725
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2019-05-19 23:06:59 +02:00
Richard Lau
98a552df77
doc,n-api: update N-API version matrix for v12.x
...
PR-URL: https://github.com/nodejs/node/pull/27745
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2019-05-19 22:29:57 +02:00
Richard Lau
b3ffd1fbb0
doc,n-api: fix introduced_in metadata
...
Node.js v7.10.0 did not contain N-API. Update the `introduced_in`
metadata to prevent a broken 7.x "View another version" link in the
N-API docs.
PR-URL: https://github.com/nodejs/node/pull/27745
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2019-05-19 22:29:55 +02:00
Anna Henningsen
76f2168393
worker: add ability to unshift message from MessagePort
...
In combination with Atomics, this makes it possible to implement
generic synchronous functionality, e.g. `importScript()`, in Workers
purely by communicating with other threads.
This is a continuation of https://github.com/nodejs/node/pull/26686 ,
where a preference for a solution was voiced that allowed reading
individual messages, rather than emitting all messages through events.
PR-URL: https://github.com/nodejs/node/pull/27294
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2019-05-19 22:01:34 +02:00
Gaelan
13d2df530b
doc: clarify behavior of fs.mkdir
...
PR-URL: https://github.com/nodejs/node/pull/27505
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-05-19 09:35:26 -07:00
Luigi Pinca
5112b3d9a6
tls: support net.Server options
...
Pass `tls.Server` constructor options to the parent constructor.
PR-URL: https://github.com/nodejs/node/pull/27665
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2019-05-18 19:46:55 -07:00
Guy Bedford
030fa2ea44
stream: implement Readable.from async iterator utility
...
PR-URL: https://github.com/nodejs/node/pull/27660
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2019-05-18 09:15:01 +02:00
Myles Borins
bbc254db5d
esm: --experimental-wasm-modules integration support
...
PR-URL: https://github.com/nodejs/node/pull/27659
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Myles Borins <myles.borins@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2019-05-17 02:25:20 +02:00
dnalborczyk
545b59e18f
doc: remove non-existent entry-type flag
...
PR-URL: https://github.com/nodejs/node/pull/27678
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Guy Bedford <guybedford@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2019-05-17 01:44:41 +02:00
Alba Mendez
53bef423f3
tls: expose keylog event on TLSSocket
...
Exposes SSL_CTX_set_keylog_callback in the form of a `keylog` event
that is emitted on clients and servers. This enables easy debugging
of TLS connections with i.e. Wireshark, which is a long-requested
feature.
PR-URL: https://github.com/nodejs/node/pull/27654
Refs: https://github.com/nodejs/node/issues/2363
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2019-05-15 05:32:33 +02:00
Daniel Nalborczyk
523a9fbcb4
doc: format correction for experimental loader hooks
...
PR-URL: https://github.com/nodejs/node/pull/27537
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Jan Krems <jan.krems@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2019-05-14 05:30:54 +02:00
jvelezpo
fd8d5e7d9e
doc: dns.lookup() documentation error code
...
dns.lookup() will always return ENOTFOUND on a empty lookup
or when the host not found.
https://github.com/nodejs/node/blob/master/lib/internal/errors.js#L503
Fixes: https://github.com/nodejs/node/issues/27604
PR-URL: https://github.com/nodejs/node/pull/27625
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-05-13 16:57:07 -07:00
Gabriel Schulhof
6be5c3bdae
doc: add call-once note to napi_queue_async_work
...
Add note to `napi_queue_async_work()` indicating that, upon successful
return, it must not be called again with the same work item.
Fixes: https://github.com/nodejs/node/issues/27217
PR-URL: https://github.com/nodejs/node/pull/27582
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2019-05-13 09:56:10 -07:00
Rich Trott
b49d2aad2a
doc: simplify About This Documentation text
...
Remove some unnecessary words and simplify some phrases in
documentation.md.
PR-URL: https://github.com/nodejs/node/pull/27619
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-05-11 01:14:05 -07:00
cjihrig
6259c52877
doc: doc deprecate the legacy http parser
...
PR-URL: https://github.com/nodejs/node/pull/27498
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Masashi Hirano <shisama07@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2019-05-09 15:30:58 -04:00
Ali Ijaz Sheikh
c30ef3cbd2
http, http2: remove default server timeout
...
Timing out and closing the socket after two minutes have elapsed is
surprising and problematic for users. This behavior was specific to
Node.js, and doesn't seem to be common in other language runtimes.
Fixes: https://github.com/nodejs/node/issues/27556
PR-URL: https://github.com/nodejs/node/pull/27558
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2019-05-09 08:54:04 -07:00
Ruben Bridgewater
422e8f7628
repl: handle uncaughtException properly
...
When running the REPL as standalone program it's now possible to use
`process.on('uncaughtException', listener)`. It is going to use those
listeners from now on and the regular error output is suppressed.
It also fixes the issue that REPL instances started inside of an
application would silence all application errors. It is now prohibited
to add the exception listener in such REPL instances. Trying to add
such listeners throws an `ERR_INVALID_REPL_INPUT` error.
Fixes: https://github.com/nodejs/node/issues/19998
PR-URL: https://github.com/nodejs/node/pull/27151
Fixes: https://github.com/nodejs/node/issues/19998
Reviewed-By: Lance Ball <lball@redhat.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2019-05-08 08:15:15 +02:00
Michaël Zasso
e006a8545e
2019-05-07, Version 12.2.0 (Current)
...
Notable changes:
* deps:
* Updated llhttp to 1.1.3. This fixes a bug that made Node.js' HTTP
parser refuse any request URL that contained the "|" (vertical bar)
character. https://github.com/nodejs/node/pull/27595
* tls:
* Added an `enableTrace()` method to `TLSSocket` and an `enableTrace`
option to `tls.createServer()`. When enabled, TSL packet trace
information is written to `stderr`. This can be used to debug TLS
connection problems. https://github.com/nodejs/node/pull/27497
https://github.com/nodejs/node/pull/27376
* cli:
* Added a `--trace-tls` command-line flag that enables tracing of TLS
connections without the need to modify existing application code.
https://github.com/nodejs/node/pull/27497
* Added a `--cpu-prof-interval` command-line flag. It can be used to
specify the sampling interval for the CPU profiles generated by
`--cpu-prof`. https://github.com/nodejs/node/pull/27535
* module:
* Added the `createRequire()` method. It allows to create a require
function from a file URL object, a file URL string or an absolute
path string. The existing `createRequireFromPath()` method is now
deprecated https://github.com/nodejs/node/pull/27405 .
* Throw on `require('./path.mjs')`. This is technically a breaking
change that should have landed with Node.js 12.0.0. It is necessary
to have this to keep the possibility for a future minor version to
load ES Modules with the require function.
https://github.com/nodejs/node/pull/27417
* repl:
* The REPL now supports multi-line statements using `BigInt` literals
as well as public and private class fields and methods.
https://github.com/nodejs/node/pull/27400
* The REPL now supports tab autocompletion of file paths with `fs`
methods. https://github.com/nodejs/node/pull/26648
* meta:
* Added Christian Clauss (https://github.com/cclauss ) to
collaborators. https://github.com/nodejs/node/pull/27554
PR-URL: https://github.com/nodejs/node/pull/27578
2019-05-07 20:38:46 +02:00
Tobias Nießen
153c101a12
doc: improve CCM example
...
Applications should never attempt to use the deciphered message
if authentication fails. In reality, this is usually not a problem
since OpenSSL does not disclose the plaintext in this case, but it
is still a design mistake and can lead to critical security problems
in other cipher modes and implementations.
PR-URL: https://github.com/nodejs/node/pull/27396
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2019-05-06 21:40:07 +02:00
Joyee Cheung
7cfcf8069b
inspector: implement --cpu-prof-interval
...
This patch implements --cpu-prof-interval to specify the sampling
interval of the CPU profiler started by --cpu-prof from the command
line. Also adjust the interval to 100 in test-cpu-prof.js to make
the test less flaky - it would fail if the time taken to finish
the workload is smaller than the sampling interval, which was
more likely on powerful machines when the interval was 1000.
PR-URL: https://github.com/nodejs/node/pull/27535
Reviewed-By: Jan Krems <jan.krems@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2019-05-05 10:19:17 -07:00
Sam Roberts
3d98051e20
tls: add --tls-min-v1.2 CLI switch
...
Switch added in v11.x, add it to master/12.x for consistency and
compatibility.
See: https://github.com/nodejs/node/pull/26951 , commit bf2c283555
PR-URL: https://github.com/nodejs/node/pull/27520
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com >
2019-05-05 08:23:43 -07:00
Myles Borins
d370d126c3
module: throw on require('./path.mjs');
...
This is an extremely important part of the ESM implementation
that should have been unflagged as a breaking change in v12.0.0
to allow us to unflag ESM in Node.js 12.x before LTS. Assuming we
can get consensus on this behavior I would argue that this Semver-Major
behavior change could be viewed as a Semver-Patch fix in v12.0.1
PR-URL: https://github.com/nodejs/node/pull/27417
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Rod Vagg <rod@vagg.org >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Jan Krems <jan.krems@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
2019-05-03 12:14:36 -07:00
Myles Borins
411063c6f5
module: add createRequire method
...
This is an abstraction on top of creatRequireFromPath that can accept
both paths, URL Strings, and URL Objects.
PR-URL: https://github.com/nodejs/node/pull/27405
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Jan Krems <jan.krems@gmail.com >
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2019-05-03 12:12:30 -07:00
cjihrig
495822f544
tls,cli: add --trace-tls command-line flag
...
This commit adds a --trace-tls command-line flag. The
purpose is to enable tracing of TLS connections without the
need to modify existing application code.
PR-URL: https://github.com/nodejs/node/pull/27497
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2019-05-02 12:37:54 -04:00
cjihrig
c6a2fdf3aa
tls: support enableTrace in TLSSocket()
...
This commit adds the enableTrace option to the TLSSocket
constructor. It also plumbs the option through other relevant
APIs.
PR-URL: https://github.com/nodejs/node/pull/27497
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2019-05-02 12:37:49 -04:00
Gilles De Mey
e5c8be2bd0
module: allow passing a directory to createRequireFromPath
...
Fixes: https://github.com/nodejs/node/issues/23710
PR-URL: https://github.com/nodejs/node/pull/23818
Reviewed-By: Guy Bedford <guybedford@gmail.com >
Reviewed-By: Myles Borins <myles.borins@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2019-05-01 17:34:12 -07:00
Sam Roberts
dce8806c9d
doc: describe API ERR_INVALID_PROTOCOL context
...
ERR_INVALID_PROTOCOL docs should describe the API it relates to.
See: https://github.com/nodejs/node/pull/27390/files#r278246361
PR-URL: https://github.com/nodejs/node/pull/27393
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com >
2019-04-30 08:44:53 -07:00
Fedor Indutny
98e9de7db9
http: servername === false should disable SNI
...
There is no way to disable SNI extension when sending a request to HTTPS
server. Setting `options.servername` to a falsy value would make Node.js
core override it with either hostname or ip address.
This change introduces a way to disable SNI completely if this is
required for user's application. Setting `options.servername` to ``
in `https.request` would disable overrides and thus disable the
extension.
PR-URL: https://github.com/nodejs/node/pull/27316
Reviewed-By: Steven R Loomis <srloomis@us.ibm.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2019-04-30 06:43:22 -07:00
Sam Roberts
adedbb12e5
tls: allow enabling the TLS debug trace
...
Enable the same trace output that the OpenSSL s_client and s_server
support with their `-trace` option. This is invaluable when debugging
reports of TLS bugs as well as when debugging the internal TLS
implementation.
See:
- https://github.com/nodejs/node/issues/25383
- https://github.com/nodejs/node/issues/17936
- https://github.com/postmanlabs/postman-app-support/issues/5918#issuecomment-465311423
PR-URL: https://github.com/nodejs/node/pull/27376
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
2019-04-29 10:57:55 -07:00
Ruben Bridgewater
31b3dd2842
tools: prohibit assert.doesNotReject() in Node.js core
...
This makes sure we do not use `assert.doesNotReject()` anywhere in
our code base. This is just a simple wrapper that catches the
rejection and then rejects it again in case of an error. Thus, it is
not useful to do that.
The error message for `assert.doesNotThrow()` is also improved.
PR-URL: https://github.com/nodejs/node/pull/27402
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-04-27 18:22:27 +02:00
gengjiawen
38f3526f27
report: print common items first for readability
...
PR-URL: https://github.com/nodejs/node/pull/27367
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
2019-04-27 12:04:36 +02:00
Joyee Cheung
b9f1e57201
lib: throw a special error in internal/assert
...
Instead of using the public AssertionError, use a simplified
error that describes potential causes of these assertions
and suggests the user to open an issue.
PR-URL: https://github.com/nodejs/node/pull/26635
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2019-04-25 01:29:48 +02:00
Ruben Bridgewater
237d9f9716
doc: fix pull request number
...
This fixes a pull request number in `repl.md`.
PR-URL: https://github.com/nodejs/node/pull/27336
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
2019-04-25 01:25:28 +02:00
Sam Roberts
a763de137c
doc: clarify behaviour of writeFile(fd)
...
This is a continuing source of confusion, attempt to make it even more
clear.
Fixes: https://github.com/nodejs/node/issues/24923
PR-URL: https://github.com/nodejs/node/pull/27282
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
2019-04-24 09:03:16 -07:00
Beth Griggs
d896f03578
2019-04-23, Version 12.0.0 (Current)
...
Notable changes:
* assert:
* validate required arguments (Ruben Bridgewater)
[#26641 ](https://github.com/nodejs/node/pull/26641 )
* adjust loose assertions (Ruben Bridgewater)
[#25008 ](https://github.com/nodejs/node/pull/25008 )
* async_hooks:
* remove deprecated `emitBefore` and `emitAfter` (Matteo Collina)
[#26530 ](https://github.com/nodejs/node/pull/26530 )
* remove promise object from resource (Andreas Madsen)
[#23443 ](https://github.com/nodejs/node/pull/23443 )
* bootstrap: make Buffer and process non-enumerable (Ruben Bridgewater)
[#24874 ](https://github.com/nodejs/node/pull/24874 )
* buffer:
* use stricter range checks (Ruben Bridgewater)
[#27045 ](https://github.com/nodejs/node/pull/27045 )
* harden `SlowBuffer` creation (ZYSzys)
[#26272 ](https://github.com/nodejs/node/pull/26272 )
* harden validation of buffer allocation size (ZYSzys)
[#26162 ](https://github.com/nodejs/node/pull/26162 )
* do proper error propagation in addon methods (Anna Henningsen)
[#23939 ](https://github.com/nodejs/node/pull/23939 )
* child_process:
* remove `options.customFds` (cjihrig)
[#25279 ](https://github.com/nodejs/node/pull/25279 )
* harden fork arguments validation (ZYSzys)
[#27039 ](https://github.com/nodejs/node/pull/27039 )
* use non-infinite `maxBuffer` defaults (kohta ito)
[#23027 ](https://github.com/nodejs/node/pull/23027 )
* console:
* don't use ANSI escape codes when `TERM=dumb` (Vladislav Kaminsky)
[#26261 ](https://github.com/nodejs/node/pull/26261 )
* crypto:
* remove legacy native handles (Tobias Nießen)
[#27011 ](https://github.com/nodejs/node/pull/27011 )
* decode missing passphrase errors (Tobias Nießen)
[#25208 ](https://github.com/nodejs/node/pull/25208 )
* remove `Cipher.setAuthTag()` and `Decipher.getAuthTag()`
(Tobias Nießen)
[#26249 ](https://github.com/nodejs/node/pull/26249 )
* remove deprecated `crypto._toBuf()` (Tobias Nießen)
[#25338 ](https://github.com/nodejs/node/pull/25338 )
* set `DEFAULT\_ENCODING` property to non-enumerable
(Antoine du Hamel)
[#23222 ](https://github.com/nodejs/node/pull/23222 )
* deps:
* update V8 to 7.4.288.13
(Michaël Zasso, cjihrig, Refael Ackermann)
(Anna Henningsen, Ujjwal Sharma)
[#26685 ](https://github.com/nodejs/node/pull/26685 )
* bump minimum icu version to 63 (Ujjwal Sharma)
[#25852 ](https://github.com/nodejs/node/pull/25852 )
* update OpenSSL to 1.1.1b (Sam Roberts, Shigeki Ohtsu)
[#26327 ](https://github.com/nodejs/node/pull/26327 )
* errors:
* update error name (Ruben Bridgewater)
[#26738 ](https://github.com/nodejs/node/pull/26738 )
* fs:
* use proper .destroy() implementation for SyncWriteStream
(Matteo Collina)
[#26690 ](https://github.com/nodejs/node/pull/26690 )
* improve mode validation (Ruben Bridgewater)
[#26575 ](https://github.com/nodejs/node/pull/26575 )
* harden validation of start option in `createWriteStream()`
(ZYSzys)
[#25579 ](https://github.com/nodejs/node/pull/25579 )
* make writeFile consistent with readFile wrt fd
(Sakthipriyan Vairamani (thefourtheye))
[#23709 ](https://github.com/nodejs/node/pull/23709 )
* http:
* validate timeout in `ClientRequest()` (cjihrig)
[#26214 ](https://github.com/nodejs/node/pull/26214 )
* return HTTP 431 on `HPE_HEADER_OVERFLOW` error (Albert Still)
[#25605 ](https://github.com/nodejs/node/pull/25605 )
* switch default parser to llhttp (Anna Henningsen)
[#24870 ](https://github.com/nodejs/node/pull/24870 )
* Runtime-deprecate `outgoingMessage._headers` and
`outgoingMessage._headerNames` (Morgan Roderick)
[#24167 ](https://github.com/nodejs/node/pull/24167 )
* lib:
* remove `Atomics.wake()` (Gus Caplan)
[#27033 ](https://github.com/nodejs/node/pull/27033 )
* move DTRACE\_\* probes out of global scope (James M Snell)
[#26541 ](https://github.com/nodejs/node/pull/26541 )
* deprecate `_stream_wrap` (Sam Roberts)
[#26245 ](https://github.com/nodejs/node/pull/26245 )
* use ES6 class inheritance style (Ruben Bridgewater)
[#24755 ](https://github.com/nodejs/node/pull/24755 )
* module:
* remove unintended access to deps/ (Anna Henningsen)
[#25138 ](https://github.com/nodejs/node/pull/25138 )
* improve error message for MODULE\_NOT\_FOUND (Ali Ijaz Sheikh)
[#25690 ](https://github.com/nodejs/node/pull/25690 )
* requireStack property for MODULE\_NOT\_FOUND (Ali Ijaz Sheikh)
[#25690 ](https://github.com/nodejs/node/pull/25690 )
* remove dead code (Ruben Bridgewater)
[#26983 ](https://github.com/nodejs/node/pull/26983 )
* make `require('.')` never resolve outside the current directory
(Ruben Bridgewater)
[#26973 ](https://github.com/nodejs/node/pull/26973 )
* throw an error for invalid package.json main entries
(Ruben Bridgewater)
[#26823 ](https://github.com/nodejs/node/pull/26823 )
* don't search in `require.resolve.paths` (cjihrig)
[#23683 ](https://github.com/nodejs/node/pull/23683 )
* net:
* remove `Server.listenFD()` (cjihrig)
[#27127 ](https://github.com/nodejs/node/pull/27127 )
* do not add `.host` and `.port` properties to DNS error
(Ruben Bridgewater)
[#26751 ](https://github.com/nodejs/node/pull/26751 )
* emit "write after end" errors in the next tick (Ouyang Yadong)
[#24457 ](https://github.com/nodejs/node/pull/24457 )
* deprecate `_setSimultaneousAccepts()` undocumented function
(James M Snell)
[#23760 ](https://github.com/nodejs/node/pull/23760 )
* os:
* implement `os.type()` using `uv_os_uname()` (cjihrig)
[#25659 ](https://github.com/nodejs/node/pull/25659 )
* remove `os.getNetworkInterfaces()` (cjihrig)
[#25280 ](https://github.com/nodejs/node/pull/25280 )
* process:
* make global.process, global.Buffer getters (Guy Bedford)
[#26882 ](https://github.com/nodejs/node/pull/26882 )
* move DEP0062 (node --debug) to end-of-life (Joyee Cheung)
[#25828 ](https://github.com/nodejs/node/pull/25828 )
* exit on --debug and --debug-brk after option parsing
(Joyee Cheung)
[#25828 ](https://github.com/nodejs/node/pull/25828 )
* improve `--redirect-warnings` handling (Ruben Bridgewater)
[#24965 ](https://github.com/nodejs/node/pull/24965 )
* readline:
* support TERM=dumb (Vladislav Kaminsky)
[#26261 ](https://github.com/nodejs/node/pull/26261 )
* repl:
* add welcome message (gengjiawen)
[#25947 ](https://github.com/nodejs/node/pull/25947 )
* fix terminal default setting (Ruben Bridgewater)
[#26518 ](https://github.com/nodejs/node/pull/26518 )
* check colors with `.getColorDepth()` (Vladislav Kaminsky)
[#26261 ](https://github.com/nodejs/node/pull/26261 )
* deprecate REPLServer.rli (Ruben Bridgewater)
[#26260 ](https://github.com/nodejs/node/pull/26260 )
* src:
* remove unused `INT_MAX` constant (Sam Roberts)
[#27078 ](https://github.com/nodejs/node/pull/27078 )
* update `NODE_MODULE_VERSION` to 72 (Ujjwal Sharma)
[#26685 ](https://github.com/nodejs/node/pull/26685 )
* remove `AddPromiseHook()` (Anna Henningsen)
[#26574 ](https://github.com/nodejs/node/pull/26574 )
* clean up `MultiIsolatePlatform` interface (Anna Henningsen)
[#26384 ](https://github.com/nodejs/node/pull/26384 )
* properly configure default heap limits (Ali Ijaz Sheikh)
[#25576 ](https://github.com/nodejs/node/pull/25576 )
* remove `icuDataDir` from node config (GauthamBanasandra)
[#24780 ](https://github.com/nodejs/node/pull/24780 )
* tls:
* support TLSv1.3 (Sam Roberts)
[#26209 ](https://github.com/nodejs/node/pull/26209 )
* return correct version from `getCipher()` (Sam Roberts)
[#26625 ](https://github.com/nodejs/node/pull/26625 )
* check arg types of renegotiate() (Sam Roberts)
[#25876 ](https://github.com/nodejs/node/pull/25876 )
* add code for `ERR_TLS_INVALID_PROTOCOL_METHOD` (Sam Roberts)
[#24729 ](https://github.com/nodejs/node/pull/24729 )
* emit a warning when servername is an IP address (Rodger Combs)
[#23329 ](https://github.com/nodejs/node/pull/23329 )
* disable TLS v1.0 and v1.1 by default (Ben Noordhuis)
[#23814 ](https://github.com/nodejs/node/pull/23814 )
* remove unused arg to createSecureContext() (Sam Roberts)
[#24241 ](https://github.com/nodejs/node/pull/24241 )
* deprecate `Server.prototype.setOptions()` (cjihrig)
[#23820 ](https://github.com/nodejs/node/pull/23820 )
* load `NODE_EXTRA_CA_CERTS` at startup (Ouyang Yadong)
[#23354 ](https://github.com/nodejs/node/pull/23354 )
* util:
* remove `util.print()`, `util.puts()`, `util.debug()`
and `util.error()` (cjihrig)
[#25377 ](https://github.com/nodejs/node/pull/25377 )
* change inspect compact and breakLength default
(Ruben Bridgewater)
[#27109 ](https://github.com/nodejs/node/pull/27109 )
* improve inspect edge cases (Ruben Bridgewater)
[#27109 ](https://github.com/nodejs/node/pull/27109 )
* only the first line of the error message (Simon Zünd)
[#26685 ](https://github.com/nodejs/node/pull/26685 )
* don't set the prototype of callbackified functions
(Ruben Bridgewater)
[#26893 ](https://github.com/nodejs/node/pull/26893 )
* rename callbackified function (Ruben Bridgewater)
[#26893 ](https://github.com/nodejs/node/pull/26893 )
* increase function length when using `callbackify()`
(Ruben Bridgewater)
[#26893 ](https://github.com/nodejs/node/pull/26893 )
* prevent tampering with internals in `inspect()`
(Ruben Bridgewater)
[#26577 ](https://github.com/nodejs/node/pull/26577 )
* prevent Proxy traps being triggered by `.inspect()`
(Ruben Bridgewater)
[#26241 ](https://github.com/nodejs/node/pull/26241 )
* prevent leaking internal properties (Ruben Bridgewater)
[#24971 ](https://github.com/nodejs/node/pull/24971 )
* protect against monkeypatched Object prototype for inspect()
(Rich Trott)
[#25953 ](https://github.com/nodejs/node/pull/25953 )
* treat format arguments equally (Roman Reiss)
[#23162 ](https://github.com/nodejs/node/pull/23162 )
* win, fs:
* detect if symlink target is a directory (Bartosz Sosnowski)
[#23724 ](https://github.com/nodejs/node/pull/23724 )
* zlib:
* throw TypeError if callback is missing (Anna Henningsen)
[#24929 ](https://github.com/nodejs/node/pull/24929 )
* make “bare” constants un-enumerable (Anna Henningsen)
[#24824 ](https://github.com/nodejs/node/pull/24824 )
PR-URL: https://github.com/nodejs/node/pull/26930
2019-04-23 16:46:54 +01:00