31275 Commits

Author SHA1 Message Date
Robert Nagy
c7e55c6b72 stream: fix writable.end callback behavior
Changes so that the end() callback behaves the same way in relation
to _final as write() does to _write/_writev.

PR-URL: https://github.com/nodejs/node/pull/34101
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2020-07-01 18:18:04 +02:00
Rich Trott
e2b468eb5c doc: change "currently not considered public" to "not supported"
PR-URL: https://github.com/nodejs/node/pull/34114
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2020-06-30 21:56:11 -07:00
Rich Trott
70ec18c4eb doc: clarify that APIs are no longer experimental
Change "no longer considered experimental" to "no longer experimental".
It's more clear and direct.

PR-URL: https://github.com/nodejs/node/pull/34113
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Zeyu Yang <himself65@outlook.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2020-06-30 21:54:52 -07:00
Rich Trott
8ff8c684d6 doc: clarify O_EXCL text in fs.md
PR-URL: https://github.com/nodejs/node/pull/34096
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ujjwal Sharma <ryzokuken@disroot.org>
2020-06-30 21:53:48 -07:00
Rich Trott
584fc7e965 doc: clarify ambiguous rdev description
Replace "is considered 'special'" with "represents a device". The latter
is more clear and is derived from the stat() man page. The former is
also derived from the man page, but is ambiguous because:

* "considered" introduces doubt. Is it, or isn't it?
* "special" is never defined. "represents a device" communicates more
  meaning.
* "special" is in scare-quotes, introducing more doubt as to what
  exactly it means.

Refs: https://man7.org/linux/man-pages/man2/fstat.2.html

PR-URL: https://github.com/nodejs/node/pull/34094
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ujjwal Sharma <ryzokuken@disroot.org>
2020-06-30 21:52:40 -07:00
James M Snell
31d6d9d0f7 quic: reduce duplication of code
PR-URL: https://github.com/nodejs/node/pull/34137
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: David Carlier <devnexen@gmail.com>
2020-06-30 17:50:59 -07:00
James M Snell
b5fe31ef19 quic: avoid using private JS fields for now
They introduce a significant performance bottleneck at the moment.

PR-URL: https://github.com/nodejs/node/pull/34137
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: David Carlier <devnexen@gmail.com>
2020-06-30 17:50:57 -07:00
James M Snell
2afc1abd05 quic: fixup constant exports, export all protocol error codes
PR-URL: https://github.com/nodejs/node/pull/34137
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: David Carlier <devnexen@gmail.com>
2020-06-30 17:50:54 -07:00
James M Snell
b1fab88ff0 quic: remove unused callback function
PR-URL: https://github.com/nodejs/node/pull/34137
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: David Carlier <devnexen@gmail.com>
2020-06-30 17:50:52 -07:00
James M Snell
3bae2d5073 quic: consolidate onSessionClose and onSessionSilentClose
Use a single callback function for both

PR-URL: https://github.com/nodejs/node/pull/34137
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: David Carlier <devnexen@gmail.com>
2020-06-30 17:50:50 -07:00
James M Snell
def8e76999 quic: fixup set_final_size
Ignore subsequent calls to set_final_size unless the new size
is more than the previous, in which case, we have us a bug.

PR-URL: https://github.com/nodejs/node/pull/34137
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: David Carlier <devnexen@gmail.com>
2020-06-30 17:50:47 -07:00
James M Snell
d6034186d6 quic: cleanups for QuicSocket
PR-URL: https://github.com/nodejs/node/pull/34137
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: David Carlier <devnexen@gmail.com>
2020-06-30 17:50:45 -07:00
James M Snell
73a51bb9dc quic: cleanups in JS API
PR-URL: https://github.com/nodejs/node/pull/34137
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: David Carlier <devnexen@gmail.com>
2020-06-30 17:50:42 -07:00
James M Snell
e20beaf004 meta: fixup CODEOWNERS so it hopefully works
the CODEOWNERS rules for QUIC are not working and it's not entirely clear why.
Hoping it's just the way the paths were specified.

PR-URL: https://github.com/nodejs/node/pull/34147
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
2020-06-30 17:43:54 -07:00
Shelley Vohr
eb8fc2bf0f
2020-06-30, Version 14.5.0 (Current)
Notable changes:

build:
  * (SEMVER-MINOR) reset embedder string to "-node.0" (Michaël Zasso) https://github.com/nodejs/node/pull/33376
cli:
  * (SEMVER-MINOR) add alias for report-directory to make it consistent (AshCripps) https://github.com/nodejs/node/pull/33587
crypto:
  * (SEMVER-MINOR) allow KeyObjects in postMessage (Tobias Nießen) https://github.com/nodejs/node/pull/33360
deps:
  * (SEMVER-MINOR) V8: cherry-pick 0d6debcc5f08 (Michaël Zasso) https://github.com/nodejs/node/pull/33376
  * (SEMVER-MINOR) update V8 to 8.3.110.9 (Michaël Zasso) https://github.com/nodejs/node/pull/33376
dgram:
  * (SEMVER-MINOR) allow typed arrays in .send() (Sarat Addepalli) https://github.com/nodejs/node/pull/22413
events:
  * (SEMVER-MINOR) initial implementation of experimental EventTarget (James M Snell) https://github.com/nodejs/node/pull/33556
fs:
  * (SEMVER-MINOR) implement lutimes (Maël Nison) https://github.com/nodejs/node/pull/33399
http:
  * (SEMVER-MINOR) expose host and protocol on ClientRequest (wenningplus) https://github.com/nodejs/node/pull/33803
  * (SEMVER-MINOR) add maxTotalSockets to agent class (rickyes) https://github.com/nodejs/node/pull/33617
  * (SEMVER-MINOR) return this from OutgoingMessage#destroy() (Colin Ihrig) https://github.com/nodejs/node/pull/32789
  * (SEMVER-MINOR) return this from ClientRequest#destroy() (Colin Ihrig) https://github.com/nodejs/node/pull/32789
  * (SEMVER-MINOR) return this from IncomingMessage#destroy() (Colin Ihrig) https://github.com/nodejs/node/pull/32789
  * (SEMVER-MINOR) added scheduling option to http agent (delvedor) https://github.com/nodejs/node/pull/33278
http2:
  * (SEMVER-MINOR) return this for Http2ServerRequest#setTimeout (Pranshu Srivastava) https://github.com/nodejs/node/pull/33994
  * (SEMVER-MINOR) do not modify explicity set date headers (Pranshu Srivastava) https://github.com/nodejs/node/pull/33160
process:
  * (SEMVER-MINOR) add unhandled-rejection throw and warn-with-error-code (Dan Fabulich) https://github.com/nodejs/node/pull/33475
src:
  * (SEMVER-MINOR) store key data in separate class (Tobias Nießen) https://github.com/nodejs/node/pull/33360
  * (SEMVER-MINOR) add NativeKeyObject base class (Tobias Nießen) https://github.com/nodejs/node/pull/33360
  * (SEMVER-MINOR) rename internal key handles to KeyObjectHandle (Tobias Nießen) https://github.com/nodejs/node/pull/33360
  * (SEMVER-MINOR) add equality operators for BaseObjectPtr (Anna Henningsen) https://github.com/nodejs/node/pull/33772
  * (SEMVER-MINOR) introduce BaseObject base FunctionTemplate (Anna Henningsen) https://github.com/nodejs/node/pull/33772
  * (SEMVER-MINOR) add public APIs to manage v8::TracingController (Anna Henningsen) https://github.com/nodejs/node/pull/33850
stream*:
  * runtime deprecate Transform._transformState (Robert Nagy) https://github.com/nodejs/node/pull/32763
win:
  * (SEMVER-MINOR) allow skipping the supported platform check (João Reis) https://github.com/nodejs/node/pull/33176
worker:
  * (SEMVER-MINOR) add public method for marking objects as untransferable (Anna Henningsen) https://github.com/nodejs/node/pull/33979
  * (SEMVER-MINOR) emit `'messagerror'` events for failed deserialization (Anna Henningsen) https://github.com/nodejs/node/pull/33772
  * (SEMVER-MINOR) allow passing JS wrapper objects via postMessage (Anna Henningsen) https://github.com/nodejs/node/pull/33772
  * (SEMVER-MINOR) allow transferring/cloning generic BaseObjects (Anna Henningsen) https://github.com/nodejs/node/pull/33772
worker,fs:
  * (SEMVER-MINOR) make FileHandle transferable (Anna Henningsen) https://github.com/nodejs/node/pull/33772
zlib:
  * (SEMVER-MINOR) add `maxOutputLength` option (unknown) https://github.com/nodejs/node/pull/33516

PR-URL: https://github.com/nodejs/node/pull/34093
2020-06-30 15:27:43 -07:00
Robert Nagy
0edeeec3ec net: doc deprecate bufferSize
PR-URL: https://github.com/nodejs/node/pull/34088
Refs: https://github.com/nodejs/node/issues/34078
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2020-06-30 22:36:51 +02:00
Robert Nagy
312a4f3255 net: fix bufferSize
bufferSize should only look at writableLength otherwise it will
always show more than what is actually pending.

PR-URL: https://github.com/nodejs/node/pull/34088
Refs: https://github.com/nodejs/node/issues/34078
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2020-06-30 22:36:50 +02:00
Robert Nagy
8f4b4f272e stream: destroy wrapped streams on error
Stream should be destroyed and update state accordingly when
the wrapped stream emits error.

Does some additional cleanup with future TODOs that might be worth
looking into.

PR-URL: https://github.com/nodejs/node/pull/34102
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2020-06-30 22:35:36 +02:00
James M Snell
204f20f2d1 quic: minor cleanups in quic_buffer
PR-URL: https://github.com/nodejs/node/pull/34087
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: David Carlier <devnexen@gmail.com>
2020-06-30 12:52:50 -07:00
gengjiawen
68634d2592 quic: remove redundant cast
PR-URL: https://github.com/nodejs/node/pull/34086
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
2020-06-30 10:22:50 -07:00
Richard Lau
b613933055
test: update test-child-process-spawn-loop for Python 3
Fixes `SyntaxError: Missing parentheses in call to 'print'.` error when
`python` resolves to Python 3.

Signed-off-by: Richard Lau <riclau@uk.ibm.com>

PR-URL: https://github.com/nodejs/node/pull/34071
Refs: https://github.com/nodejs/node/pull/29298
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Zeyu Yang <himself65@outlook.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2020-06-30 09:41:04 -04:00
Beth Griggs
cb673e1b61
2020-06-30, Version 12.18.2 'Erbium' (LTS)
Notable changes:

- deps: V8: backport fb26d0bb1835 (Matheus Marchini)
  [#33573](https://github.com/nodejs/node/pull/33573)
- src: use symbol to store `AsyncWrap` resource (Anna Henningsen)
  [#31745](https://github.com/nodejs/node/pull/31745)

PR-URL: https://github.com/nodejs/node/pull/34077
2020-06-30 14:31:59 +01:00
Shelley Vohr
c23d2fd3f8
src: allow embedders to disable esm loader
PR-URL: https://github.com/nodejs/node/pull/34060
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
2020-06-29 09:12:11 -07:00
Gus Caplan
9e135accbb
wasi: add reactor support
PR-URL: https://github.com/nodejs/node/pull/34046
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2020-06-29 09:52:09 -05:00
Andrey Pechkurov
da8a1ef21b zlib: remove redundant variable in zlibBufferOnEnd
PR-URL: https://github.com/nodejs/node/pull/34072
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2020-06-29 10:35:39 +03:00
Rich Trott
90d5f35f7a doc: make minor improvements to paragraph in child_process.md
Use shorter and more direct phrasing.

PR-URL: https://github.com/nodejs/node/pull/34063
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
2020-06-28 21:47:33 -07:00
Rich Trott
95eecd58b3 doc: improve paragraph in esm.md
Edit for clarity, correct tense, and brevity.

PR-URL: https://github.com/nodejs/node/pull/34064
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2020-06-28 20:26:27 -07:00
Gus Caplan
b327d335ff
n-api: add version to wasm registration
PR-URL: https://github.com/nodejs/node/pull/34045
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2020-06-28 10:51:31 -05:00
Guy Bedford
f89530fccc doc: clarify require/import mutual exclusivity
PR-URL: https://github.com/nodejs/node/pull/33832
Reviewed-By: Jan Krems <jan.krems@gmail.com>
Reviewed-By: Geoffrey Booth <webmaster@geoffreybooth.com>
2020-06-27 21:18:54 -07:00
Anna Henningsen
f63436d190
vm: add run-after-evaluate microtask mode
This allows timeouts to apply to e.g. `Promise`s and `async function`s
from code running inside of `vm.Context`s, by giving the Context its
own microtasks queue.

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

PR-URL: https://github.com/nodejs/node/pull/34023
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
2020-06-26 11:41:33 -07:00
Alec Davidson
e68563e31c
doc: add dynamic source code links
Fixes: https://github.com/nodejs/node/pull/33977

PR-URL: https://github.com/nodejs/node/pull/33996
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-06-26 10:25:14 -07:00
Anna Henningsen
db6e6e3b26
test: add non-ASCII character embedding test
Add a test that verifies that non-ASCII characters may be used
in the source code provided to `LoadEnvironment()`.

PR-URL: https://github.com/nodejs/node/pull/33972
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-06-26 10:13:13 -07:00
Pranshu Srivastava
074df495ed
doc: specify maxHeaderCount alias for maxHeaderListPairs
Fixes: https://github.com/nodejs/node/issues/32388

PR-URL: https://github.com/nodejs/node/pull/33519
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Zeyu Yang <himself65@outlook.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-06-26 10:09:28 -07:00
himself65
870f0fc5e8
src: add errorProperties on process.report
PR-URL: https://github.com/nodejs/node/pull/28426
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2020-06-26 10:06:22 -07:00
Anna Henningsen
e18afe45d2 events: fix add-remove-add case in EventTarget
Make sure that listeners are added properly if there has previously
been one but currently are none for a given event type.

PR-URL: https://github.com/nodejs/node/pull/34056
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2020-06-25 19:28:45 -07:00
Anna Henningsen
072feec1b0 Revert "repl: always check for NODE_REPL_MODE environment variable"
This reverts commit b831b081c499a614c1ee3f0272c9de1783395402.

This presumably unbreaks the ASAN github action build.

Example failure:

    2020-06-25T19:59:15.1448178Z === release test-repl-envvars ===
    2020-06-25T19:59:15.1448872Z Path: parallel/test-repl-envvars
    2020-06-25T19:59:15.1449449Z --- stderr ---
    2020-06-25T19:59:15.1449835Z assert.js:103
    2020-06-25T19:59:15.1450194Z   throw new AssertionError(obj);
    2020-06-25T19:59:15.1450524Z   ^
    2020-06-25T19:59:15.1450817Z
    2020-06-25T19:59:15.1451431Z AssertionError [ERR_ASSERTION]: Expected values to be strictly deep-equal:
    2020-06-25T19:59:15.1452000Z + actual - expected
    2020-06-25T19:59:15.1452298Z
    2020-06-25T19:59:15.1452634Z   {
    2020-06-25T19:59:15.1452978Z     terminal: true,
    2020-06-25T19:59:15.1453321Z +   useColors: false
    2020-06-25T19:59:15.1453861Z -   useColors: true
    2020-06-25T19:59:15.1454225Z   }
    2020-06-25T19:59:15.1454841Z     at /home/runner/work/node/node/test/parallel/test-repl-envvars.js:55:12
    2020-06-25T19:59:15.1455246Z     at internal/repl.js:33:5

PR-URL: https://github.com/nodejs/node/pull/34058
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2020-06-25 19:18:55 -07:00
Kirill Shatskiy
82f13fa803
fs: fix readdir failure when libuv returns UV_DIRENT_UNKNOWN
Fixes: https://github.com/nodejs/node/issues/33348

PR-URL: https://github.com/nodejs/node/pull/33395
Refs: https://github.com/nodejs/node/issues/33348
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-06-25 11:58:50 -07:00
Ruben Bridgewater
b831b081c4
repl: always check for NODE_REPL_MODE environment variable
This makes sure all REPL instances check for the NODE_REPL_MODE
environment variable in case the `replMode` is not passed through
as option.

At the same time this simplifies the internal REPL code significantly.

Signed-off-by: Ruben Bridgewater <ruben@bridgewater.de>

PR-URL: https://github.com/nodejs/node/pull/33461
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-06-25 11:54:46 -07:00
Ben Noordhuis
40bc3095ab
lib,src: remove cpu profiler idle notifier
I added it in commit 57231d5286 ("src: notify V8 profiler when we're
idle") from October 2013 as a stop-gap measure to measure CPU time
rather than wall clock time, otherwise processes that spend a lot
of time sleeping in system calls give a false impression of being
very busy.

That fix is not without drawbacks because the idle flag is set before
libuv makes I/O callbacks and cleared again after. I/O callbacks can
result into calls into JS code and executing JS code is as non-idle
as you can get.

In commit 96ffcb9a21 ("src: reduce cpu profiler overhead") from January
2015, I made Node.js block off the SIGPROF signal that V8's CPU profiler
uses before Node.js goes to sleep. The goal of that commit is to reduce
the overhead from EINTR system call wakeups but it also has the pleasant
side effect of fixing what the idle notifier tried to fix.

This commit removes the idle notifier and turns the JS process object
methods into no-ops.

Fixes: https://github.com/nodejs/node/issues/19009
Refs: https://github.com/nodejs/node/pull/33138

PR-URL: https://github.com/nodejs/node/pull/34010
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2020-06-25 11:52:53 -07:00
patr0nus
cb2c8106a7
src: tolerate EPERM returned from tcsetattr
macOS app sandbox makes tcsetattr return EPERM. The CHECK_EQ(0, err)
here would fail when a sandboxed Node.js process is exiting. This commit
fixes this issue.

* test: add test for running in macOS app sandbox

Bare-bone command-line executables cannot run directly in the app sandbox.
To test that Node.js is able to run in the sandbox (and to test the fix in
317621b4a12562eb75055a67bb2c5556f53fe017), this commit creates a typical
Cocoa app bundle, puts the node executable in it and calles Apple's codesign
command to enable sandbox.

* test: use process.execPath to get path of testing node

PR-URL: https://github.com/nodejs/node/pull/33944
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-06-25 10:56:34 -07:00
Yash Ladha
56124e92e8
src: clang_format base_object
PR-URL: https://github.com/nodejs/node/pull/33680
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-06-25 10:50:24 -07:00
Pranshu Srivastava
fe6e46842e
test: add test for Http2ServerResponse#[writableCorked,cork,uncork]
PR-URL: https://github.com/nodejs/node/pull/33956
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-06-25 09:30:24 -07:00
sapics
bc23d108c8
src: fix ParseEncoding
"utf-16LE" was parsed "UNKNOWN", this fixes to "UCS2"
"utf-buffer" was parsed "BUFFER", this fixes to "UNKNOWN"
"utf-16leNOT" was parsed "UCS2", this fixes to "UNKNOWN"

PR-URL: https://github.com/nodejs/node/pull/33957
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-06-25 09:14:23 -07:00
ExE Boss
50228cf6ff
assert: add assert/strict alias module
Refs: https://github.com/nodejs/node/pull/31553
Refs: https://github.com/nodejs/node/pull/32953

PR-URL: https://github.com/nodejs/node/pull/34001
Refs: https://github.com/nodejs/node/pull/34002
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Zeyu Yang <himself65@outlook.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-06-25 08:37:48 -07:00
Anna Henningsen
88fb5a5c79
worker: add public method for marking objects as untransferable
We currently mark a number of `ArrayBuffer`s as not transferable,
including the `Buffer` pool and ones with finalizers provided
by C++ addons.

There is no good reason to assume that userland code might not
encounter similar problems, for example when doing `ArrayBuffer`
pooling similar to ours. Therefore, provide an API that lets
userland code also mark objects as not transferable.

PR-URL: https://github.com/nodejs/node/pull/33979
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
2020-06-25 08:33:29 -07:00
sapics
a80000ec08
src: remove unnecessary calculation in base64.h
PR-URL: https://github.com/nodejs/node/pull/33839
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2020-06-25 16:44:04 +02:00
Pranshu Srivastava
ac80fed3b8
http2: return this for Http2ServerRequest#setTimeout
Fixes: https://github.com/nodejs/node/issues/33993

PR-URL: https://github.com/nodejs/node/pull/33994
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Zeyu Yang <himself65@outlook.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
2020-06-25 16:26:04 +02:00
Ruben Bridgewater
3646872f60
util: fix width detection for DEL without ICU
This makes sure the DEL character (ASCII 127) is detected as a zero
width character even if Node.js is not built with ICU.

Signed-off-by: Ruben Bridgewater <ruben@bridgewater.de>

PR-URL: https://github.com/nodejs/node/pull/33650
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2020-06-25 06:42:38 -07:00
Ruben Bridgewater
66679ce334
util: support Combining Diacritical Marks for Symbols
This adds support for the "Combining Diacritical Marks for Symbols"
unicode group to calculate a zero length width even if Node.js is
built without ICU.

Signed-off-by: Ruben Bridgewater <ruben@bridgewater.de>

PR-URL: https://github.com/nodejs/node/pull/33650
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2020-06-25 06:42:34 -07:00
Derek Lewis
e405e82f74 doc: add allowed info strings to style guide
This commit adds the list of agreed-upon info strings to the
documentation style guide to aid with future development and
maintenance.

Refs: https://github.com/nodejs/node/pull/33510
Refs: https://github.com/nodejs/node/pull/33507
Refs: https://github.com/nodejs/node/pull/33483
Refs: https://github.com/nodejs/node/pull/33531
Refs: https://github.com/nodejs/node/pull/33542
Refs: https://github.com/nodejs/node/pull/33028
Refs: https://github.com/nodejs/node/pull/33548
Refs: https://github.com/nodejs/node/pull/33486

PR-URL: https://github.com/nodejs/node/pull/34024
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2020-06-24 19:00:21 -07:00