Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v12.4.0 release proposal #28040

Merged
merged 108 commits into from
Jun 4, 2019
Merged

v12.4.0 release proposal #28040

merged 108 commits into from
Jun 4, 2019

Conversation

targos
Copy link
Member

@targos targos commented Jun 3, 2019

2019-06-04, Version 12.4.0 (Current), @targos

Notable changes

  • doc:
    • The JSON variant of the API documentation is no longer experimental (Rich Trott) #27842.
  • esm:
    • JSON module support is always enabled under --experimental-modules. The
      --experimental-json-modules flag has been removed (Myles Borins) #27752.
  • http,http2:
    • A new flag has been added for overriding the default HTTP server socket
      timeout (which is two minutes). Pass --http-server-default-timeout=milliseconds
      or --http-server-default-timeout=0 to respectively change or disable the timeout.
      Starting with Node.js 13.0.0, the timeout will be disabled by default (Ali Ijaz Sheikh) #27704.
  • inspector:
    • Added an experimental --heap-prof flag to start the V8 heap profiler
      on startup and write the heap profile to disk before exit (Joyee Cheung) #27596.
  • stream:
    • The readable.unshift() method now correctly converts strings to buffers.
      Additionally, a new optional argument is accepted to specify the string's
      encoding, such as 'utf8' or 'ascii' (Marcos Casagrande) #27194.
  • v8:
    • The object returned by v8.getHeapStatistics() has two new properties:
      number_of_native_contexts and number_of_detached_contexts (Yuriy Vasiyarov) #27933.

Commits

  • [5bbc6d79c3] - assert: remove unreachable code (Rich Trott) #27840
  • [530e63a4eb] - assert: remove unreachable code (Rich Trott) #27786
  • [9b08c458be] - build,aix: link with noerrmsg to eliminate warnings (Refael Ackermann) #27773
  • [08b0ca9645] - build,win: create junction instead of symlink to out\\%config% (Refael Ackermann) #27736
  • [ea2d550507] - child_process: move exports to bottom for consistent code style (himself65) #27845
  • [a9f95572c3] - child_process: remove extra shallow copy (zero1five) #27801
  • [449ee8dd42] - console: fix table() output (Brian White) #27917
  • [9220a68a76] - crypto: fix KeyObject handle type error message (Alexander Avakov) #27904
  • [3b6424fa29] - deps: histogram: unexport symbols (Ben Noordhuis) #27779
  • [ef25ac5223] - doc: clarify wording in modules.md (Alex Temny) #27853
  • [c683cd99d7] - doc: improve explanation for directory with fs.rename() (Rich Trott) #27963
  • [70b485478c] - doc: fix the wrong name of AssertionError (Kyle Zhang) #27982
  • [11c3ddb4cb] - doc: simplify system call material in doc overview (Rich Trott) #27966
  • [c56640138a] - doc: warn about relying on fs gc close behavior (Benjamin Gruenbaum) #27972
  • [bab9f5a891] - doc: add information to revoked deprecations (cjihrig) #27952
  • [f4fc75d245] - doc: add missing status to DEP0121 (cjihrig) #27950
  • [77ff597faa] - doc: add missing --experimental-wasm-modules docs (cjihrig) #27948
  • [6ca4f03ccf] - doc: revise additional Experimental status text (Rich Trott) #27931
  • [a1788de0a4] - doc: adds link to nightly code coverage report (Tariq Ramlall) #27922
  • [b7cd0de145] - doc: fix typo in pipe from async iterator example (Luigi Pinca) #27870
  • [f621b8f178] - doc: reword Experimental stability index (Rich Trott) #27879
  • [7a7fc4e7e6] - doc: update n-api support matrix (teams2ua) #27567
  • [9d9b32eff5] - doc: fix for OutgoingMessage.prototype._headers/_headerNames (Daniel Nalborczyk) #27574
  • [263e53317b] - doc: reposition "How to Contribute" README section (Anish Asrani) #27811
  • [85f505c292] - doc: add version info for types (Michael Dawson) #27754
  • [e3bb2aef60] - doc: remove experimental status for JSON documentation (Rich Trott) #27842
  • [6981565c20] - doc: edit stability index overview (Rich Trott) #27831
  • [1a8e67cc1f] - doc: simplify contributing documentation (Rich Trott) #27785
  • [041b2220be] - doc,n-api: fix typo in N-API introduction (Richard Lau) #27833
  • [6cd64c8279] - doc,test: clarify that Http2Stream is destroyed after data is read (Alba Mendez) #27891
  • [cc69d5af8e] - doc,tools: get altDocs versions from CHANGELOG.md (Richard Lau) #27661
  • [e72d4aa522] - errors: create internal connResetException (Rich Trott) #27953
  • [be1166fd01] - esm: refactor createDynamicModule() (cjihrig) #27809
  • [e66648e887] - (SEMVER-MINOR) esm: remove experimental status from JSON modules (Myles Borins) #27752
  • [d948656635] - http: fix deferToConnect comments (Robert Nagy) #27876
  • [24eaeed393] - http: fix socketOnWrap edge cases (Anatoli Papirovski) #27968
  • [8b38dfbf39] - http: call write callback even if there is no message body (Luigi Pinca) #27777
  • [588fd0c20d] - (SEMVER-MINOR) http, http2: flag for overriding server timeout (Ali Ijaz Sheikh) #27704
  • [799aeca134] - http2: respect inspect() depth (cjihrig) #27983
  • [83aaef87d0] - http2: fix tracking received data for maxSessionMemory (Anna Henningsen) #27914
  • [8c35198499] - http2: support net.Server options (Luigi Pinca) #27782
  • [23119cacf8] - inspector: supported NodeRuntime domain in worker (Aleksei Koziatinskii) #27706
  • [89483be254] - inspector: more conservative minimum stack size (Ben Noordhuis) #27855
  • [512ab1fddf] - inspector: removing checking of non existent field in lib/inspector.js (Keroosha) #27919
  • [d99e70381e] - SEMVER-MINOR inspector: implement --heap-prof (Joyee Cheung) #27596
  • [25eb05a97a] - lib: removed unnecessary fs.realpath options arg check + tests (Alex Pry) #27909
  • [9b90385825] - Revert "lib: print to stdout/stderr directly instead of using console" (Richard Lau) #27823
  • [18650579e8] - meta: correct personal info (Refael Ackermann (רפאל פלחי)) #27940
  • [d982f0b7e2] - meta: create github support file (Gus Caplan) #27926
  • [2b7ad122b2] - n-api: DRY napi_coerce_to_x() API methods (Ben Noordhuis) #27796
  • [1da5acbf91] - os: assume UTF-8 for hostname (Anna Henningsen) #27849
  • [d406785814] - src: unimplement deprecated v8-platform methods (Michaël Zasso) #27872
  • [33236b7c54] - (SEMVER-MINOR) src: export number_of_native_contexts and number_of_detached_contexts (Yuriy Vasiyarov) #27933
  • [1a179e1736] - src: use ArrayBufferViewContents more frequently (Anna Henningsen) #27920
  • [b9cc4072e6] - src: make UNREACHABLE variadic (Refael Ackermann) #27877
  • [44846aebd2] - src: move DiagnosticFilename inlines into a -inl.h (Sam Roberts) #27839
  • [d774ea5cce] - src: remove env-inl.h from header files (Sam Roberts) #27755
  • [02f794a53f] - src: remove memory_tracker-inl.h from header files (Sam Roberts) #27755
  • [940577bd76] - src: move ThreadPoolWork inlines into a -inl.h (Sam Roberts) #27755
  • [c0cf17388c] - src: ignore SIGXFSZ, don't terminate (ulimit -f) (Ben Noordhuis) #27798
  • [a47ee80114] - (SEMVER-MINOR) stream: convert string to Buffer when calling unshift(\<string\>) (Marcos Casagrande) #27194
  • [5eccd642ef] - stream: convert existing buffer when calling .setEncoding (Anna Henningsen) #27936
  • [6a5ce36fb8] - test: handle unknown message type in worker threads (Rich Trott) #27995
  • [182725651b] - test: add coverage for unserializable worker thread error (Rich Trott) #27995
  • [887dd604f1] - test: simplify fs promises test (Daniel Nalborczyk) #27242
  • [9229825496] - test: covering destroying when worker already disconnected (Keroosha) #27896
  • [10bdd13972] - test: rename test-performance to test-perf-hooks (Ujjwal Sharma) #27969
  • [6129376cd9] - test: add coverage for sparse array maxArrayLength (went.out) #27901
  • [38e3827ca8] - test: add util inspect null getter test (Mikhail Kuklin) #27884
  • [0e1ce2055e] - test: rsa-pss generateKeyPairSync invalid option hash (Evgenii Shchepotev) #27883
  • [0d74198123] - test: cover import of a *.node file with a policy manifest (Evgenii Shchepotev) #27903
  • [6f9aa3f722] - test: add test cases for paramEncoding 'explicit' (oksana) #27900
  • [682319f449] - test: switch assertEqual arguments (Evgenii Shchepotev) #27910
  • [b5b234deff] - test: add testcase for SourceTextModule custom inspect (Grigory Gorshkov) #27889
  • [630cc3ac30] - test: cover util.inspect on boxed primitive with colors (Alexander Avakov) #27897
  • [67b692bdb9] - test: add test case for checking typeof mgf1Hash (Levin Eugene) #27892
  • [2a509d40f4] - test: switch assertEqual arguments (Evgenii Shchepotev) #27912
  • [3ba354aaaa] - test: add test for util.inspect (Levin Eugene) #27906
  • [313077ea62] - test: expect wpt/encoding/encodeInto.any.js to fail (Joyee Cheung) #27860
  • [8fc6914d09] - test: update wpt/encoding to 7287608f90 (Joyee Cheung) #27860
  • [0f86c2b185] - test: run WPT in subdirectories (Joyee Cheung) #27860
  • [51ccdae445] - test: expect wpt/encoding/streams to fail (Joyee Cheung) #27860
  • [652cadba1c] - test: fix arguments order of comparsion functions (martyns0n) #27907
  • [b117f6d5d8] - test: switch assertEqual arguments (Evgenii Shchepotev) #27913
  • [e7966bcb80] - test: unhardcode server port (MurkyMeow) #27908
  • [b83571d236] - test: add a test case for the path.posix.resolve (Grigorii K. Shartsev) #27905
  • [f5bb1b380f] - test: switch actual value argument and expected in deepStrictEqual call (Kopachyov Vitaliy) #27888
  • [531669b917] - test: fix test-http2-multiheaders-raw (Grigorii K. Shartsev) #27885
  • [724d9c89bc] - test: change expected and actual values in assert call (oksana) #27881
  • [34ef9e4a2b] - test: detect missing postmortem metadata (cjihrig) #27828
  • [bfcbab4c0c] - test: fix test-https-agent-additional-options (Rich Trott) #27830
  • [a4c1fd5ffc] - test: refactor test-https-agent-additional-options (Rich Trott) #27830
  • [17abc8c942] - test: favor arrow functions for anonymous callbacks (Rich Trott) #27830
  • [155b947251] - test: replace flag with option (Rich Trott) #27830
  • [144db48b6d] - test: update wpt/url to 418f7fabeb (Joyee Cheung) #27822
  • [65d4f734e0] - test: use ShellTestEnvironment in WPT (Joyee Cheung) #27822
  • [a9a400e604] - test: update wpt/resources to e1fddfbf80 (Joyee Cheung) #27822
  • [8040d8b321] - test: increase debugging information on failure (Rich Trott) #27790
  • [6548b91835] - tls: trace errors can show up as SSL errors (Sam Roberts) #27841
  • [0fe16edfab] - tls: group chunks into TLS segments (Alba Mendez) #27861
  • [e8fa0671a4] - tls: destroy trace BIO instead of leaking it (Sam Roberts) #27834
  • [10e0d7f2ac] - tls: support the hints option (Luigi Pinca) #27816
  • [4716caa12e] - tls: set tlsSocket.servername as early as possible (oyyd) #27759
  • [2ce24a9452] - tools: fix js2c regression (Refael Ackermann) #27980
  • [a75a59d3e3] - tools: update inspector_protocol to 0aafd2 (Michaël Zasso) #27770
  • [728bc2f59a] - tools: update dependencies in tools/doc (Rich Trott) #27927
  • [b54f3e0405] - tools: edit .eslintrc.js for minor maintainability improvements (Rich Trott) #27789

MylesBorins and others added 30 commits May 23, 2019 16:15
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: #27752
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Gus Caplan <[email protected]>
Reviewed-By: Bradley Farias <[email protected]>
Reviewed-By: Jeremiah Senkpiel <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Guy Bedford <[email protected]>
Reviewed-By: Yuta Hiroto <[email protected]>
Reviewed-By: Yongsheng Zhang <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Сковорода Никита Андреевич <[email protected]>
Reviewed-By: Jan Krems <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
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: #27785
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
This commit makes `TLSSocket` set the `servername` property on
`SSL_CTX_set_tlsext_servername_callback` so that we could get it
later even if errors happen.

Fixes: #27699

PR-URL: #27759
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Sam Roberts <[email protected]>
Fixes: nodejs/node-gyp#1755
Fixes: #27778
PR-URL: #27779
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Ignore SIGXFSZ signals so that exceeding RLIMIT_FSIZE makes the
offending system call fail with EFBIG instead of terminating the
process.

PR-URL: #27798
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Make it possible to override the default http server timeout. Ideally
there should be no server timeout - as done on the master branch. This
is a non-breaking way to enable platform providers to override the
value.

Ref: #27558
Ref: #27556

PR-URL: #27704
Refs: #27558
Refs: #27556
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Myles Borins <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Increase the information displayed when
test-child-process-pipe-dataflow.js fails.

PR-URL: #27790
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
The presence of the inline definitions in node_internals.h can cause all
files that include node_internals.h to depend on util-inl.h, even if
they never use ThreadPoolWork. Whether this happens depends on the
toolchain, gcc will strip unused definitions, clang won't.

PR-URL: #27755
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Inline headers should only be included into the .cc files that use them.

PR-URL: #27755
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Inline headers should only be included into the .cc files that use them.

PR-URL: #27755
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
In lib/internal/assert/assertion_error.js, line 391 assures that
`operator` is 'deepEqual' so there is no need to check the value of
`operator` in a ternary on the next line (line 392). Remove the ternary.

PR-URL: #27786
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Yongsheng Zhang <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
PR-URL: #27796
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: James M Snell <[email protected]>
PR-URL: #27801
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Yongsheng Zhang <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
This commit refactors createDynamicModule() for readability:

- The map() callback functions are named and moved to a higher
  scope.
- The two export map() loops are combined.
- JSON.stringify() is only called once per import.

PR-URL: #27809
Reviewed-By: Gus Caplan <[email protected]>
Reviewed-By: Daniel Bevenius <[email protected]>
Reviewed-By: Guy Bedford <[email protected]>
Reviewed-By: Jeremiah Senkpiel <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Yongsheng Zhang <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Using `git node wpt resources`

PR-URL: #27822
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
So we no longer need to hack the global.location and pretend
that we are in a worker anymore.

PR-URL: #27822
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Using `git node wpt url`

PR-URL: #27822
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
* Add a comment explaining the Module._findPath() hacks so that someone
  else doesn't do what I do and try to remove them because they seem
  unnecessary for `make lint` and friends.
* Add a trailing comma for consistency with the rest of the file.

PR-URL: #27789
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Gus Caplan <[email protected]>
test-https-agent-additional-options is invoked with a command-line flag.
However, there is an equivalent option that can be enabled within the
code. Do that instead.

PR-URL: #27830
Reviewed-By: Sam Roberts <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
In test-https-agent-additional-options, use arrow functions for
anonymous callbacks. Replace a use of `this` with the relevant constant.

PR-URL: #27830
Reviewed-By: Sam Roberts <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Move callback to location where it is less confusing.

PR-URL: #27830
Reviewed-By: Sam Roberts <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
test-https-agent-additional-options can occasionally fail if a socket
closes before the checks near the end of the test. Modify the test to
check the freeSockets pool after each request.

PR-URL: #27830
Fixes: #24449
Reviewed-By: Sam Roberts <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Edit the stability index overview to be more concise. Remove some
awkward and unclear phrasing.

PR-URL: #27831
Reviewed-By: Daniel Bevenius <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Make `tls.connect()` support the `hints` option for feature parity with
`net.connect()`.

PR-URL: #27816
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Yongsheng Zhang <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Sam Roberts <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
There is only one entry in `kReadableOperator` that ends in `Unequal`.
So the value assigned on line 392 can only be truthy if `operator` is
`notDeepEqual`. Therefore, the ternary condition on line 394 is always
true. Remove the ternary. Coverage reports confirm that the removed code
is unused.

PR-URL: #27840
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Beth Griggs <[email protected]>
Reviewed-By: Ouyang Yadong <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
PR-URL: #27833
Reviewed-By: Daniel Bevenius <[email protected]>
Reviewed-By: Sam Roberts <[email protected]>
Reviewed-By: Yongsheng Zhang <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
The JSON documentation is relied up on by some consumers. It has been in
Experimental status for a long time. Promote it to Stable.

Reword the JSON documentation overview for brevity and clarity.

PR-URL: #27842
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Сковорода Никита Андреевич <[email protected]>
Reviewed-By: Yongsheng Zhang <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Add version info for types in N-API doc.

PR-URL: #27754
Fixes: #27486
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Fixes: #27636 (comment)

PR-URL: #27834
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
himself65 and others added 7 commits June 3, 2019 13:14
PR-URL: #27845
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Yongsheng Zhang <[email protected]>
Simplify test, fix comment.

PR-URL: #27242
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Yongsheng Zhang <[email protected]>
Reviewed-By: Masashi Hirano <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
`readable.unshift` can take a string as an argument, but that
string wasn't being converted to a Buffer, which caused a
<TypeError: Argument must be a buffer> in some cases. Also if a
string was passed, that string was coerced to utf8 encoding.

A second optional argument `encoding` was added to `unshift` to
fix the encoding issue.

Fixes: #27192
PR-URL: #27194
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Check that the main thread handles unserializable errors in a worker
thread as expected.

PR-URL: #27995
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Check that main thread handles an unknown message type from a worker
thread as expected.

PR-URL: #27995
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
NodeRuntime domain was introduced to give inspector client way to
fetch captured information before Node process is gone. We need
similar capability for work.

With current protocol inspector client can force worker to wait
on start by passing waitForDebuggerOnStart flag to NodeWorker.enable
method. So client has some time to setup environment, e.g. start
profiler. At the same time there is no way to prevent worker from
being terminated. So we can start capturing profile but we can not
reliably get captured data back.

This PR implemented NodeRuntime.notifyWhenWaitingForDisconnect
method for worker. When NodeRuntime.waitingForDisconnect notification
is enabled, worker will wait for explicit NodeWorker.detach call.

With this PR worker tooling story is nicely aligned with main thread
tooling story. The only difference is that main thread by default is
waiting for disconnect but worker thread is not waiting.

Issue: #27677

PR-URL: #27706
Reviewed-By: Eugene Ostroukhov <[email protected]>
Notable changes:

* doc:
  * The JSON variant of the API documentation is no longer experimental
    (Rich Trott) #27842.
* esm:
  * JSON module support is always enabled under
    `--experimental-modules`. The `--experimental-json-modules` flag
    has been removed (Myles Borins)
    #27752.
* http,http2:
  * A new flag has been added for overriding the default HTTP server
    socket timeout (which is two minutes). Pass
    `--http-server-default-timeout=milliseconds`
    or `--http-server-default-timeout=0` to respectively change or
    disable the timeout. Starting with Node.js 13.0.0, the timeout will
    be disabled by default
    (Ali Ijaz Sheikh) #27704.
* inspector:
  * Added an experimental `--heap-prof` flag to start the V8 heap
    profiler on startup and write the heap profile to disk before exit
    (Joyee Cheung) #27596.
* stream:
  * The `readable.unshift()` method now correctly converts strings to
    buffers. Additionally, a new optional argument is accepted to
    specify the string's encoding, such as `'utf8'` or `'ascii'`
    (Marcos Casagrande) #27194.
* v8:
  * The object returned by `v8.getHeapStatistics()` has two new
    properties: `number_of_native_contexts` and
    `number_of_detached_contexts` (Yuriy Vasiyarov)
    #27933.

PR-URL: #28040
@targos
Copy link
Member Author

targos commented Jun 3, 2019

/cc @nodejs/collaborators @nodejs/tsc @nodejs/releasers

@targos
Copy link
Member Author

targos commented Jun 3, 2019

Copy link
Contributor

@ryzokuken ryzokuken left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks :)

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@targos targos merged commit 6421974 into v12.x Jun 4, 2019
targos added a commit that referenced this pull request Jun 4, 2019
pull bot pushed a commit to Rachelmorrell/node that referenced this pull request Jun 4, 2019
Notable changes:

* doc:
  * The JSON variant of the API documentation is no longer experimental
    (Rich Trott) nodejs#27842.
* esm:
  * JSON module support is always enabled under
    `--experimental-modules`. The `--experimental-json-modules` flag
    has been removed (Myles Borins)
    nodejs#27752.
* http,http2:
  * A new flag has been added for overriding the default HTTP server
    socket timeout (which is two minutes). Pass
    `--http-server-default-timeout=milliseconds`
    or `--http-server-default-timeout=0` to respectively change or
    disable the timeout. Starting with Node.js 13.0.0, the timeout will
    be disabled by default
    (Ali Ijaz Sheikh) nodejs#27704.
* inspector:
  * Added an experimental `--heap-prof` flag to start the V8 heap
    profiler on startup and write the heap profile to disk before exit
    (Joyee Cheung) nodejs#27596.
* stream:
  * The `readable.unshift()` method now correctly converts strings to
    buffers. Additionally, a new optional argument is accepted to
    specify the string's encoding, such as `'utf8'` or `'ascii'`
    (Marcos Casagrande) nodejs#27194.
* v8:
  * The object returned by `v8.getHeapStatistics()` has two new
    properties: `number_of_native_contexts` and
    `number_of_detached_contexts` (Yuriy Vasiyarov)
    nodejs#27933.

PR-URL: nodejs#28040
targos added a commit to nodejs/nodejs.org that referenced this pull request Jun 4, 2019
targos added a commit to nodejs/nodejs.org that referenced this pull request Jun 4, 2019
@targos targos deleted the v12.4.0-proposal branch June 4, 2019 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.