0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-29 23:16:30 +01:00
Commit Graph

25592 Commits

Author SHA1 Message Date
ZYSzys
519a11b24f
test: more tests for internal/util/types
PR-URL: https://github.com/nodejs/node/pull/25225
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2019-01-09 01:36:47 +01:00
Ruben Bridgewater
aa07dd6248
util: inspect ArrayBuffers contents as well
Inspecting an ArrayBuffer now also shows their binary contents.

PR-URL: https://github.com/nodejs/node/pull/25006
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2019-01-09 01:34:25 +01:00
Anna Henningsen
8d893f213d
src: initialize Environment members in class definition
Initialize primitive members of `Environment` in the class definition
for clarity.

PR-URL: https://github.com/nodejs/node/pull/25369
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
Reviewed-By: Matheus Marchini <mat@mmarchini.me>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2019-01-09 00:47:35 +01:00
Rich Trott
005363ad37 doc: use lowercase for zlib
PR-URL: https://github.com/nodejs/node/pull/25371
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2019-01-08 15:45:28 -08:00
Anna Henningsen
63d4cae009
worker: remove --experimental-worker flag
Having an experimental feature behind a flag makes change
if we are expecting significant breaking changes to its API.

Since the Worker API has been essentially stable since
its initial introduction, and no noticeable doubt about
possibly not keeping the feature around has been voiced,
removing the flag and thereby reducing the barrier to experimentation,
and consequently receiving feedback on the implementation,
seems like a good idea.

PR-URL: https://github.com/nodejs/node/pull/25361
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Yuta Hiroto <hello@hiroppy.me>
Reviewed-By: Shingo Inoue <leko.noor@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Masashi Hirano <shisama07@gmail.com>
Reviewed-By: Weijia Wang <starkwang@126.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2019-01-09 00:31:33 +01:00
Anna Henningsen
8ec3c350f5
src: use generic helper for splitting strings
PR-URL: https://github.com/nodejs/node/pull/25363
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2019-01-09 00:26:01 +01:00
Gus Caplan
0c8dedd103
test: clean up wasm fixtures
PR-URL: https://github.com/nodejs/node/pull/25360
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2019-01-08 12:57:24 -06:00
Rich Trott
9987f1abb9 test: tune test-uv-threadpool-schedule
test-uv-threadpool-schedule has been failing consistently in
node-daily-master CI. It also fails consistently on my personal laptop.
These changes make it pass consistently with current master but fail
consistently with Node.js 10.11 (which was the last release in the 10.x
line before the fix that the test is for). It succeeds/fails as expected
whether or not I am connected to the network.

Fixes: https://github.com/nodejs/node/issues/25305

PR-URL: https://github.com/nodejs/node/pull/25358
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2019-01-07 19:08:05 -08:00
Sam Roberts
4a6ec3bd05
src: check curve ID existence instead of asn flags
Simplify the code. The flag check was in the OpenSSL source, but reading
through the docs and source, it is not necessary.

Refs: https://github.com/nodejs/node/pull/24358/files#r243099693
PR-URL: https://github.com/nodejs/node/pull/25345
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2019-01-08 01:08:03 +01:00
Tobias Nießen
bf3cb3f9b1
crypto: remove deprecated crypto._toBuf
PR-URL: https://github.com/nodejs/node/pull/25338
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2019-01-08 01:04:18 +01:00
Kazushi Kitaya
3255ae4cd1
doc: fix heading in cpp style guide
Names of c-like structs do not have to end with an underscore.

PR-URL: https://github.com/nodejs/node/pull/25303
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2019-01-08 00:54:36 +01:00
ZYSzys
ff0f99b725
test: remove redundant fchmod test
PR-URL: https://github.com/nodejs/node/pull/25282
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2019-01-08 00:52:55 +01:00
Ali Ijaz Sheikh
f39b3e3371
src: trace_events: fix race with metadata events
Multiple threads may be concurrently adding to the metadata_events list.
Protect access with a mutex.

Fixes: https://github.com/nodejs/node/issues/24129

PR-URL: https://github.com/nodejs/node/pull/25235
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2019-01-08 00:43:48 +01:00
Anna Henningsen
86ae2c182b
doc: fix process.stdin example
Fixes: https://github.com/nodejs/node/issues/20503

PR-URL: https://github.com/nodejs/node/pull/25344
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-01-08 00:33:58 +01:00
Joyee Cheung
9db9e7e541
src: move per-process global variables into node::per_process
So that it's easier to tell whether we are manipulating per-process
global states that may need to be treated with care to avoid races.

Also added comments about these variables and moved some of them
to a more suitable compilation unit:

- Move `v8_initialized` to `util.h` since it's only used in
  `util.cc` and `node.cc`
- Rename `process_mutex` to `tty_mutex` and move it into
  `node_errors.cc` since that's the only place it's used
  to guard the tty.
- Move `per_process_opts_mutex` and `per_process_opts`
  into `node_options.h` and rename them to
  `per_process::cli_options[_mutex]`
- Rename `node_isolate[_mutex]` to `per_process::main_isolate[_mutex]`

PR-URL: https://github.com/nodejs/node/pull/25302
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2019-01-08 00:28:16 +01:00
Tobias Nießen
ae2d1f0e05
crypto: always accept private keys as public keys
Some APIs already accept private keys instead of public keys. This
changes all relevant crypto APIs to do so.

PR-URL: https://github.com/nodejs/node/pull/25217
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>
2019-01-08 00:20:09 +01:00
Vse Mozhet Byt
27a03b84c4 doc: make modules.md more accurate
PR-URL: https://github.com/nodejs/node/pull/25357
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2019-01-08 01:16:51 +02:00
Roy Sommer
5774688e26
lib: support overriding http\s.globalAgent
Overriding `require('http[s]').globalAgent` is now respected by
consequent requests.

In order to achieve that, the following changes were made:

1. Implmentation in `http`: `module.exports.globalAgent` is now defined
through `Object.defineProperty`. Its getter and setter return \ set
`require('_http_agent').globalAgent`.

2. Implementation in `https`: the https `globalAgent` is not the same
as `_http_agent`, and is defined in `https` module itself. Therefore,
the fix here was to simply use `module.exports.globalAgent` to support
mutation.

3. According tests were added for both `http` and `https`, where in
both we create a server, set the default agent to a newly created
instance and make a request to that server. We then assert that the
given instance was actually used by inspecting its sockets property.

Fixes: https://github.com/nodejs/node/issues/23281

PR-URL: https://github.com/nodejs/node/pull/25170
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-01-08 00:10:36 +01:00
Sakthipriyan Vairamani (thefourtheye)
309e7723ea
doc: update behaviour of fs.writeFile
As per the decision in https://github.com/nodejs/node/issues/23433,
the `fs.writeFile` will always write from the current position if it
is used with file descriptors. This patch updates it.

Ref: https://github.com/nodejs/node/pull/23709

PR-URL: https://github.com/nodejs/node/pull/25080
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Weijia Wang <starkwang@126.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2019-01-08 00:02:02 +01:00
Rich Trott
0066fdb072 test: move test-tls-securepair-client out of pummel
test-tls-securepair-client does not seem to need to be in the pummel
directory. Move it to sequential. (It can't go into parallel because it
uses common.PORT and therefore might conflict with another test that is
using system-assigned available ports.)

PR-URL: https://github.com/nodejs/node/pull/25222
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-01-07 11:36:39 -08:00
Rich Trott
a5c9491e73 test: fix test-tls-securepair-client
test-tls-securepair-client has been failing for over a year but no one
noticed because pummel tests are almost never run.

In preparation for running pummel tests once a day in CI, fix
test-tls-securepair-client.

PR-URL: https://github.com/nodejs/node/pull/25222
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-01-07 11:36:35 -08:00
cjihrig
ec5884a94f
tools: update ESLint to 5.12.0
Update ESLint to 5.12.0.

PR-URL: https://github.com/nodejs/node/pull/25347
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Yuta Hiroto <hello@hiroppy.me>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
2019-01-07 08:49:17 -05:00
Furqan Shaikh
076d8b9f9d test: http2 origin length ERR_HTTP2_ORIGIN_LENGTH
PR-URL: https://github.com/nodejs/node/pull/25296
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2019-01-07 08:49:05 +01:00
Ben Noordhuis
5717dc2ae1 src: remove unused method declaration
PR-URL: https://github.com/nodejs/node/pull/25329
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-01-07 08:40:42 +01:00
Tobias Nießen
7afdfaec08 crypto: fix key object wrapping in sync keygen
PR-URL: https://github.com/nodejs/node/pull/25326
Fixes: https://github.com/nodejs/node/issues/25322
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-01-07 07:33:35 +01:00
Rich Trott
7ed790e9db test: remove flag for test-addon-uv-handle-leak
test-addon-uv-handle-leak only requires worker_threads for the
subprocess which it explicitly calls with --experimental-worker. The
main test itself does not need it. Remove Flags: comment and move
loading of worker_threads into subprocess-only logic.

PR-URL: https://github.com/nodejs/node/pull/25327
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-01-06 15:49:19 -08:00
Rich Trott
6f27f5350c test: fix test-benchmark-zlib
The addition of brotli to zlib benchmarks means that test-benchmark-zlib
needs to be modified. This is that modification.

PR-URL: https://github.com/nodejs/node/pull/25365
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2019-01-06 15:41:13 -08:00
Corey Farrell
e7c6f4f68a
doc: fs.mkdir('/') throws EPERM on Windows
Fixes: https://github.com/nodejs/node/issues/25110

PR-URL: https://github.com/nodejs/node/pull/25340
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ben Coe <bencoe@gmail.com>
2019-01-06 11:50:46 -08:00
Daniel Bevenius
398916a821
src: remove unused isolate variable
Currently the following compiler warning is generated:
../src/node_task_queue.cc:93:12: warning:
unused variable 'isolate' [-Wunused-variable]
  Isolate* isolate = env->isolate();
           ^
1 warning generated.

This commit removes the unused variable.

PR-URL: https://github.com/nodejs/node/pull/25368
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2019-01-06 19:43:19 +01:00
cjihrig
853bee0acf
lib: move DEP0023 to end of life
This commit moves DEP0023 to end of life status. The
os.getNetworkInterfaces() method was introduced in the
unstable 0.5.0 release, and runtime deprecated in 0.6.0, the
first stable release of its existence.

This commit also fixes an inaccuracy in the deprecation, as the
replacement (os.networkInterfaces()) is actually a method.

PR-URL: https://github.com/nodejs/node/pull/25280
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2019-01-06 11:50:19 -05:00
Joyee Cheung
6c0162149b
src: move arch, platform and release into node_metadata.cc
Move definitions of more metadata into node_metadata{.h, .cc}
so the data can be reused and easily inspected in C++.

PR-URL: https://github.com/nodejs/node/pull/25293
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-01-06 10:44:57 +08:00
Joyee Cheung
d18b0a0132
process: make tick callback and promise rejection callback more robust
- Rename `internalTickCallback` to `processTicksAndRejections`, make
  sure it does not get called if it's not set in C++.
- Rename `emitPromiseRejectionWarnings` to `processPromiseRejections`
  since it also emit events that are not warnings.
- Sets `SetPromiseRejectCallback` in the `Environment` constructor
  to make sure it only gets called once per-isolate, and make
  sure it does not get called if it's not set in C++.
- Wrap promise rejection callback initialization into
  `listenForRejections()`.
- Add comments.

PR-URL: https://github.com/nodejs/node/pull/25200
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-01-06 10:28:47 +08:00
Joyee Cheung
bf566718b2
src: refactor tickInfo access
- Wrap access to tickInfo fields in functions
- Rename `kHasScheduled` to `kHasTickScheduled` and
  `kHasPromiseRejections` to `kHasRejectionToWarn` for clarity - note
  the latter will be set to false if the rejection does not lead to
  a warning so the previous description is not accurate.
- Set `kHasRejectionToWarn` in JS land of relying on C++ to use
  an implict contract (return value of the promise rejection handler)
  to set it, as the decision is made entirely in JS land.
- Destructure promise reject event constants.

PR-URL: https://github.com/nodejs/node/pull/25200
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-01-06 10:28:44 +08:00
Anna Henningsen
f6a1d88c5d
src: split LoadEnvironment() at startExecution()
This makes it easier to cater to embedders which wish to skip
the `startExecution()` part.

PR-URL: https://github.com/nodejs/node/pull/25320
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
2019-01-06 02:15:47 +01:00
P. Mike
728505acd5 buffer: refactor checks for SlowBuffer creation
PR-URL: https://github.com/nodejs/node/pull/25266
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-01-05 16:04:22 -08:00
Anna Henningsen
0a549aaeac
worker: enable transferring WASM modules
Enable in-memory transfer of WASM modules without recompilation.

Previously, the serialization step worked, but deserialization failed
because we did not explicitly enable decoding inline WASM modules,
and so the message was not successfully received.

PR-URL: https://github.com/nodejs/node/pull/25314
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2019-01-06 00:54:13 +01:00
Anna Henningsen
47a9eea8c8
v8: enable inline WASM in serialization API
Since the API we expose through the `v8` module is Buffer-based,
we cannot transfer WASM modules directly. Instead, we enable
the V8-provided inline WASM (de)serialization for WASM modules.

PR-URL: https://github.com/nodejs/node/pull/25313
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Gus Caplan <me@gus.host>
2019-01-06 00:52:57 +01:00
Anna Henningsen
b91093f0e5
doc: add documentation for brotli support
PR-URL: https://github.com/nodejs/node/pull/24938
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Jan Krems <jan.krems@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
2019-01-05 21:36:48 +01:00
Anna Henningsen
b7da5b79c3
benchmark,test: add brotli
Co-authored-by: Hackzzila <admin@hackzzila.com>

PR-URL: https://github.com/nodejs/node/pull/24938
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Jan Krems <jan.krems@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
2019-01-05 21:36:47 +01:00
Anna Henningsen
73753d4863
zlib: add brotli support
Refs: https://github.com/nodejs/node/pull/20458

Co-authored-by: Hackzzila <admin@hackzzila.com>

PR-URL: https://github.com/nodejs/node/pull/24938
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Jan Krems <jan.krems@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
2019-01-05 21:36:46 +01:00
Hackzzila
b857d713f5
deps,tools: update license-builder.sh and LICENSE
PR-URL: https://github.com/nodejs/node/pull/24938
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Jan Krems <jan.krems@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
2019-01-05 21:36:45 +01:00
Hackzzila
a3f3cfc7c5
deps: add brotli
Co-authored-by: Anna Henningsen <anna@addaleax.net>

PR-URL: https://github.com/nodejs/node/pull/24938
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Jan Krems <jan.krems@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
2019-01-05 21:36:44 +01:00
Tobias Nießen
345d3f380b
doc: document key encryption options
PR-URL: https://github.com/nodejs/node/pull/23632
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
2019-01-05 17:54:43 +01:00
Michael Dawson
992c8ab476 src: add NAPI_VERSION_EXPERIMENTAL
Refs: https://github.com/nodejs/node-addon-api/issues/421

Define NAPI_VERSION_EXPERIMENTAL so that it can be
used to guard code in addons that need to check
if a function they want to use is available.

PR-URL: https://github.com/nodejs/node/pull/25319
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2019-01-04 16:48:56 -05:00
Anna Henningsen
9dfbc391fa
worker: improve JS-side debugging
Do not print debug messages that indicate that a stdio stream
has drained; because `util.debuglog()` uses `console.log`, which
in turn uses stdio streams, this would otherwise have lead to an
endless loop.

PR-URL: https://github.com/nodejs/node/pull/25312
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-01-04 19:27:38 +01:00
Joyee Cheung
b22c86ed3b
src: use internalBinding('config').hasInspector in JS land
Instead of `process.config.variables.v8_enable_inspector`
which depends on the variable name in gyp files, or detecting
`internalBinding('inspector').Connection`.

PR-URL: https://github.com/nodejs/node/pull/25291
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-01-05 01:25:31 +08:00
cjihrig
d4934ae6f2
lib: move DEP0006 to end of life
This commit moves DEP0006, which has been runtime deprecated
since Node 0.11, to end of life status.

PR-URL: https://github.com/nodejs/node/pull/25279
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
2019-01-04 09:14:35 -05:00
Rich Trott
7d453ff212 test: replace internals with public API
Remove instances where `--expose-internals` is used to gain access to
buffer.kStringMaxLength. The property is availalble without a flag. It
is undocumented but the same as the documented
`buffer.constants.MAX_STRING_LENGTH` so use that. (We even have a test
that confirms that they are the same value.)

PR-URL: https://github.com/nodejs/node/pull/25309
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-01-03 22:58:26 -08:00
Anna Henningsen
1f1a373df0
worker: use engine-provided deleter for SharedArrayBuffers
Store the full information we have on a given `SharedArrayBuffer`,
and use the deleter provided by the JS engine to free the memory
when that is needed.

This fixes memory lifetime management for WASM buffers that are
passed through a `MessageChannel` (e.g. between threads).

PR-URL: https://github.com/nodejs/node/pull/25307
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
2019-01-03 23:44:52 +01:00
Rich Trott
7e15f0490a lib,test: remove lib/internal/test/unicode.js
Remove lib/internal/test/unicode.js and associated test. When we added
the file and test, only comments in lib had non-ASCII characters. Now,
lib/internal/cli_table.js has non-ASCII characters. Tests that exercise
the `console.table()` therefore fulfill the need to test non-ASCII
characters in built-in modules.

PR-URL: https://github.com/nodejs/node/pull/25298
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-01-03 10:25:59 -08:00