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

deps: update V8 to 9.8 #41610

Closed
wants to merge 19 commits into from
Closed

deps: update V8 to 9.8 #41610

wants to merge 19 commits into from

Conversation

targos
Copy link
Member

@targos targos commented Jan 20, 2022

ETA: Tue, Feb 1, 2022

@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/gyp
  • @nodejs/v8-update

@targos targos added the semver-major PRs that contain breaking changes and should be released in the next major version. label Jan 20, 2022
@nodejs-github-bot nodejs-github-bot added build Issues and PRs related to build files or the CI. needs-ci PRs that need a full CI run. v8 engine Issues and PRs related to the V8 dependency. labels Jan 20, 2022
@nodejs-github-bot
Copy link
Collaborator

nodejs-github-bot commented Jan 20, 2022

@targos targos added the wip Issues and PRs that are still a work in progress. label Jan 20, 2022
@targos
Copy link
Member Author

targos commented Jan 20, 2022

Needs a fix for Windows:

C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.30.30705\include\memory(3086,1): error C2027: utilisation du type non défini 'v8::internal::EmbedderState' [D:\Git\nodejs\node\libnode.vcxproj]
D:\Git\nodejs\node\deps\v8\include\v8-embedder-state-scope.h(17): message : voir la déclaration de 'v8::internal::EmbedderState' [D:\Git\nodejs\node\libnode.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.30.30705\include\memory(3085): message : pendant la compilation de la fonction membre classe modèle 'void std::default_delete<v8::internal::EmbedderState>::operator ()(_Ty *) noexcept const' [D:\Git\nodejs\node\libnode.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.30.30705\include\memory(3195): message : voir la référence à l'instanciation de la fonction modèle 'void std::default_delete<v8::internal::EmbedderState>::operator ()(_Ty *) noexcept const' en cours de compilation [D:\Git\nodejs\node\libnode.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.30.30705\include\memory(3122): message : voir la référence à l'instanciation classe modèle 'std::default_delete<v8::internal::EmbedderState>' en cours de compilation [D:\Git\nodejs\node\libnode.vcxproj]
D:\Git\nodejs\node\deps\v8\include\v8-embedder-state-scope.h(43): message : voir la référence à l'instanciation classe modèle 'std::unique_ptr<v8::internal::EmbedderState,std::default_delete<v8::internal::EmbedderState>>' en cours de compilation [D:\Git\nodejs\node\libnode.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.30.30705\include\memory(3086,25): error C2338: can't delete an incomplete type [D:\Git\nodejs\node\libnode.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.30.30705\include\memory(3087,1): warning C4150: suppression de pointeur vers type incomplet 'v8::internal::EmbedderState' ; aucun destructeur appelé [D:\Git\nodejs\node\libnode.vcxproj]
D:\Git\nodejs\node\deps\v8\include\v8-embedder-state-scope.h(17): message : voir la déclaration de 'v8::internal::EmbedderState' [D:\Git\nodejs\node\libnode.vcxproj]

Repro: https://godbolt.org/z/r5c8K6qcn

@targos
Copy link
Member Author

targos commented Jan 20, 2022

/cc @nodejs/platform-windows

@targos
Copy link
Member Author

targos commented Jan 23, 2022

Opened a V8 issue: https://bugs.chromium.org/p/v8/issues/detail?id=12570

@nassau-t
Copy link

Looks like this https://stackoverflow.com/questions/57322087/c2027-use-of-undefined-type-v8internalobject
As if you need to add #include EmbedderState.h

@targos targos removed the wip Issues and PRs that are still a work in progress. label Jan 29, 2022
@nodejs-github-bot
Copy link
Collaborator

@targos
Copy link
Member Author

targos commented Jan 29, 2022

Got help from the V8 folks. It turns out a fix was already merged to main. I cherry-picked it here: 8367941

RaisinTen
RaisinTen previously approved these changes Jan 29, 2022
Copy link
Contributor

@RaisinTen RaisinTen left a comment

Choose a reason for hiding this comment

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

RSLGTM

@targos targos added the wip Issues and PRs that are still a work in progress. label Jan 29, 2022
@targos
Copy link
Member Author

targos commented Jan 29, 2022

There's another failure to investigate: https://ci.nodejs.org/job/node-test-commit-arm-debug/598/nodes=ubuntu1804-arm64/testReport/junit/(root)/test/parallel_test_inspector_multisession_ws/

[err] #
[err] # Fatal error in ../deps/v8/src/inspector/v8-debugger-agent-impl.cc, line 1851
[err] # Debug check failed: hitReasons.size() > 0 || !hitBreakpoints.empty() || breakReasons.contains(v8::debug::BreakReason::kAgent).
[err] #
[err] #
[err] #
[err] #FailureMessage Object: 0xffffccaa1928
[err]
[err]  1: 0xaaaabe5ac110 node::DumpBacktrace(_IO_FILE*) [/home/iojs/build/workspace/node-test-commit-arm-debug/out/Debug/node]
[err]
[err]  2: 0xaaaabe761640  [/home/iojs/build/workspace/node-test-commit-arm-debug/out/Debug/node]
[err]
[err]  3: 0xaaaabe76166c  [/home/iojs/build/workspace/node-test-commit-arm-debug/out/Debug/node]
[err]
[err]  4: 0xaaaabff98f74 V8_Fatal(char const*, int, char const*, ...) [/home/iojs/build/workspace/node-test-commit-arm-debug/out/Debug/node]
[err]
[err]  5: 0xaaaabff98fa0 V8_Dcheck(char const*, int, char const*) [/home/iojs/build/workspace/node-test-commit-arm-debug/out/Debug/node]
[err]
[err]  6: 0xaaaabf313c48 v8_inspector::V8DebuggerAgentImpl::didPause(int, v8::Local<v8::Value>, std::vector<int, std::allocator<int> > const&, v8::debug::ExceptionType, bool, v8::base::EnumSet<v8::debug::BreakReason, int>) [/home/iojs/build/workspace/node-test-commit-arm-debug/out/Debug/node]
[err]
[err]  7: 0xaaaabf3216d8 v8_inspector::V8InspectorImpl::forEachSession(int, std::function<void (v8_inspector::V8InspectorSessionImpl*)> const&) [/home/iojs/build/workspace/node-test-commit-arm-debug/out/Debug/node]
[err]
[err]  8: 0xaaaabf300914 v8_inspector::V8Debugger::handleProgramBreak(v8::Local<v8::Context>, v8::Local<v8::Value>, std::vector<int, std::allocator<int> > const&, v8::base::EnumSet<v8::debug::BreakReason, int>, v8::debug::ExceptionType, bool) [/home/iojs/build/workspace/node-test-commit-arm-debug/out/Debug/node]
[err]
[err]  9: 0xaaaabeb56eb0 v8::internal::Debug::OnDebugBreak(v8::internal::Handle<v8::internal::FixedArray>, v8::internal::StepAction, v8::base::EnumSet<v8::debug::BreakReason, int>) [/home/iojs/build/workspace/node-test-commit-arm-debug/out/Debug/node]
[err]
[err] 10: 0xaaaabeb57490 v8::internal::Debug::HandleDebugBreak(v8::internal::IgnoreBreakMode, v8::base::EnumSet<v8::debug::BreakReason, int>) [/home/iojs/build/workspace/node-test-commit-arm-debug/out/Debug/node]
[err]
[err] 11: 0xaaaabeb2ea9c v8::debug::BreakRightNow(v8::Isolate*, v8::base::EnumSet<v8::debug::BreakReason, int>) [/home/iojs/build/workspace/node-test-commit-arm-debug/out/Debug/node]
[err]
[err] 12: 0xaaaabebdef14 v8::internal::Isolate::InvokeApiInterruptCallbacks() [/home/iojs/build/workspace/node-test-commit-arm-debug/out/Debug/node]
[err]
[err] 13: 0xaaaabec09064 v8::internal::StackGuard::HandleInterrupts() [/home/iojs/build/workspace/node-test-commit-arm-debug/out/Debug/node]
[err]
[err] 14: 0xaaaabf1f15f4 v8::internal::Runtime_StackGuard(int, unsigned long*, v8::internal::Isolate*) [/home/iojs/build/workspace/node-test-commit-arm-debug/out/Debug/node]
[err]
[err] 15: 0xaaaabf74c0ec  [/home/iojs/build/workspace/node-test-commit-arm-debug/out/Debug/node]
[err]
[err] child process crashed, signal SIGTRAP
Timed out waiting for matching notification (SessionA paused)

@RaisinTen
Copy link
Contributor

@targos does ./node test/parallel/test-inspector-multisession-ws.js crash for release builds later on after it crosses the DCHECK?

@targos
Copy link
Member Author

targos commented Jan 29, 2022

On my M1 mac, it only crashes with the debug build.

@targos
Copy link
Member Author

targos commented Jan 29, 2022

The DCHECK was added in https://chromium-review.googlesource.com/c/v8/v8/+/3300134
/cc @ktran

@targos
Copy link
Member Author

targos commented Jan 29, 2022

I have no idea how to debug this, so I added the following line:

printf("breakReasons: %d\n", breakReasons.ToIntegral());

It prints: breakReasons: 0

I also found that the test doesn't always crash.

Without crash
$ ./node_g test/parallel/test-inspector-multisession-ws.js
[test] Connecting to a child Node process
[test] Testing /json/list
[test] Connecting to a child Node process
[test] Testing /json/list
[err] Debugger listening on ws://127.0.0.1:63900/634f9889-2920-462e-b207-f20cede34d09
[err] For help, see: https://nodejs.org/en/docs/inspector
[err]
[err] Debugger attached.
[err] Debugger attached.
[err]
[test] Breaking in code and verifying events are fired
[out] breakReasons: 256
[out]
[out] breakReasons: 256
[out]
[out] Ready
[out]
[out] Ready
[out]
[out] breakReasons: 256
[out]
[out] breakReasons: 256
[out]
[out] breakReasons: 256
[out]
[test] Should shut down after both sessions disconnect
[test] Verify node waits for the frontend to disconnect
[err] Waiting for the debugger to disconnect...
[err]
With crash
$ ./node_g test/parallel/test-inspector-multisession-ws.js
[test] Connecting to a child Node process
[test] Testing /json/list
[test] Connecting to a child Node process
[test] Testing /json/list
[err] Debugger listening on ws://127.0.0.1:63905/848fb778-008b-4f2d-b087-c6c99528e3fd
[err] For help, see: https://nodejs.org/en/docs/inspector
[err]
[err] Debugger attached.
[err] Debugger attached.
[err]
[test] Breaking in code and verifying events are fired
[out] breakReasons: 256
[out]
[out] breakReasons: 256
[out]
[out] Ready
[out]
[out] Ready
[out]
[out] breakReasons: 0
[out]
[err]
[err]
[err] #
[err] # Fatal error in ../../deps/v8/src/inspector/v8-debugger-agent-impl.cc, line 1852
[err] # Debug check failed: hitReasons.size() > 0 || !hitBreakpoints.empty() || breakReasons.contains(v8::debug::BreakReason::kAgent).
[err] #
[err] #
[err] #
[err] #FailureMessage Object: 0x16b949708
[err]
[err]  1: 0x10459a3c0 node::DumpBacktrace(__sFILE*) [/Users/targos/git/nodejs/v8-next-update/out/Debug/node]
[err]
[err]  2: 0x1047fedac node::NodePlatform::GetStackTracePrinter()::$_3::operator()() const [/Users/targos/git/nodejs/v8-next-update/out/Debug/node]
[err]
[err]  3: 0x1047fed6c node::NodePlatform::GetStackTracePrinter()::$_3::__invoke() [/Users/targos/git/nodejs/v8-next-update/out/Debug/node]
[err]
[err]  4: 0x106038904 V8_Fatal(char const*, int, char const*, ...) [/Users/targos/git/nodejs/v8-next-update/out/Debug/node]
[err]
[err]  5: 0x1060384a0 std::__1::enable_if<((!(std::is_function<std::__1::remove_pointer<char>::type>::value)) && (!(std::is_enum<char>::value))) && (has_output_operator<char, v8::base::CheckMessageStream>::value), std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >::type v8::base::PrintCheckOperand<char>(char) [/Users/targos/git/nodejs/v8-next-update/out/Debug/node]
[err]
[err]  6: 0x10545780c v8_inspector::V8DebuggerAgentImpl::didPause(int, v8::Local<v8::Value>, std::__1::vector<int, std::__1::allocator<int> > const&, v8::debug::ExceptionType, bool, v8::base::EnumSet<v8::debug::BreakReason, int>) [/Users/targos/git/nodejs/v8-next-update/out/Debug/node]
[err]
[err]  7: 0x10546847c v8_inspector::V8InspectorImpl::forEachSession(int, std::__1::function<void (v8_inspector::V8InspectorSessionImpl*)> const&) [/Users/targos/git/nodejs/v8-next-update/out/Debug/node]
[err]
[err]  8: 0x10544fbe4 v8_inspector::V8Debugger::handleProgramBreak(v8::Local<v8::Context>, v8::Local<v8::Value>, std::__1::vector<int, std::__1::allocator<int> > const&, v8::base::EnumSet<v8::debug::BreakReason, int>, v8::debug::ExceptionType, bool) [/Users/targos/git/nodejs/v8-next-update/out/Debug/node]
[err]
[err]  9: 0x104cd2074 v8::internal::Debug::OnDebugBreak(v8::internal::Handle<v8::internal::FixedArray>, v8::internal::StepAction, v8::base::EnumSet<v8::debug::BreakReason, int>) [/Users/targos/git/nodejs/v8-next-update/out/Debug/node]
[err]
[err] 10: 0x104cdbce0 v8::internal::Debug::HandleDebugBreak(v8::internal::IgnoreBreakMode, v8::base::EnumSet<v8::debug::BreakReason, int>) [/Users/targos/git/nodejs/v8-next-update/out/Debug/node]
[err]
[err] 11: 0x104cb6d9c v8::debug::BreakRightNow(v8::Isolate*, v8::base::EnumSet<v8::debug::BreakReason, int>) [/Users/targos/git/nodejs/v8-next-update/out/Debug/node]
[err]
[err] 12: 0x104d4f7a4 v8::internal::Isolate::InvokeApiInterruptCallbacks() [/Users/targos/git/nodejs/v8-next-update/out/Debug/node]
[err]
[err] 13: 0x104d75e98 v8::internal::StackGuard::HandleInterrupts() [/Users/targos/git/nodejs/v8-next-update/out/Debug/node]
[err]
[err] 14: 0x1053603cc v8::internal::Runtime_StackGuard(int, unsigned long*, v8::internal::Isolate*) [/Users/targos/git/nodejs/v8-next-update/out/Debug/node]
[err]
[err] 15: 0x1058565cc Builtins_CEntry_Return1_DontSaveFPRegs_ArgvOnStack_NoBuiltinExit [/Users/targos/git/nodejs/v8-next-update/out/Debug/node]
[err]
[err] 16: 0x1057d3048 Builtins_InterpreterEntryTrampoline [/Users/targos/git/nodejs/v8-next-update/out/Debug/node]
[err]
[err] 17: 0x1057d2f98 Builtins_InterpreterEntryTrampoline [/Users/targos/git/nodejs/v8-next-update/out/Debug/node]
[err]
[err] 18: 0x1057d0770 Builtins_JSEntryTrampoline [/Users/targos/git/nodejs/v8-next-update/out/Debug/node]
[err]
[err] 19: 0x1057d0404 Builtins_JSEntry [/Users/targos/git/nodejs/v8-next-update/out/Debug/node]
[err]
[err] 20: 0x104d35084 v8::internal::(anonymous namespace)::Invoke(v8::internal::Isolate*, v8::internal::(anonymous namespace)::InvokeParams const&) [/Users/targos/git/nodejs/v8-next-update/out/Debug/node]
[err]
[err] 21: 0x104d33f00 v8::internal::Execution::Call(v8::internal::Isolate*, v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>, int, v8::internal::Handle<v8::internal::Object>*) [/Users/targos/git/nodejs/v8-next-update/out/Debug/node]
[err]
[err] 22: 0x104b16b64 v8::Function::Call(v8::Local<v8::Context>, v8::Local<v8::Value>, int, v8::Local<v8::Value>*) [/Users/targos/git/nodejs/v8-next-update/out/Debug/node]
[err]
[err] 23: 0x104524994 node::InternalCallbackScope::Close() [/Users/targos/git/nodejs/v8-next-update/out/Debug/node]
[err]
[err] 24: 0x1045246ac node::InternalCallbackScope::~InternalCallbackScope() [/Users/targos/git/nodejs/v8-next-update/out/Debug/node]
[err]
[err] 25: 0x104523f7c node::InternalCallbackScope::~InternalCallbackScope() [/Users/targos/git/nodejs/v8-next-update/out/Debug/node]
[err]
[err] 26: 0x10464e524 node::StartExecution(node::Environment*, std::__1::function<v8::MaybeLocal<v8::Value> (node::StartExecutionCallbackInfo const&)>) [/Users/targos/git/nodejs/v8-next-update/out/Debug/node]
[err]
[err] 27: 0x104530354 node::LoadEnvironment(node::Environment*, std::__1::function<v8::MaybeLocal<v8::Value> (node::StartExecutionCallbackInfo const&)>) [/Users/targos/git/nodejs/v8-next-update/out/Debug/node]
[err]
[err] 28: 0x10476d208 node::NodeMainInstance::Run(int*, node::Environment*) [/Users/targos/git/nodejs/v8-next-update/out/Debug/node]
[err]
[err] 29: 0x10476cce8 node::NodeMainInstance::Run(node::EnvSerializeInfo const*) [/Users/targos/git/nodejs/v8-next-update/out/Debug/node]
[err]
[err] 30: 0x104650ba8 node::Start(int, char**) [/Users/targos/git/nodejs/v8-next-update/out/Debug/node]
[err]
[err] 31: 0x105ca8e5c main [/Users/targos/git/nodejs/v8-next-update/out/Debug/node]
[err] 32: 0x10b8250f4
[err]
[err] child process crashed, signal SIGTRAP

@RaisinTen
Copy link
Contributor

RaisinTen commented Jan 29, 2022

hitReasons and hitBreakpoints are both empty when this crashes, right?

@targos
Copy link
Member Author

targos commented Jan 29, 2022

hitReasons and hitBreakpoints are both empty when this crashes, right?

Yes

VoltrexKeyva pushed a commit to VoltrexKeyva/node that referenced this pull request Feb 3, 2022
Major V8 updates are usually API/ABI incompatible with previous
versions. This commit adapts NODE_MODULE_VERSION for V8 9.8.

Refs: https://github.com/nodejs/CTC/blob/master/meetings/2016-09-28.md

PR-URL: nodejs#41610
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
VoltrexKeyva pushed a commit to VoltrexKeyva/node that referenced this pull request Feb 3, 2022
Original commit message:

    Fix destructor for EmbedderStateScope

    EmbedderState is forward declared in public header for
    EmbedderStateScope. Default std::unique_ptr's destructor needs a fully
    defined class. Defining default destructor in implementation file fixes
    this.

    Bug: chromium:1263871
    Change-Id: I8ccc58f56a758927dc5d7a39387188185e7d3827
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3338697
    Auto-Submit: Corentin Pescheloche <cpescheloche@fb.com>
    Reviewed-by: Camillo Bruni <cbruni@chromium.org>
    Commit-Queue: Camillo Bruni <cbruni@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#78363}

Refs: v8/v8@79a9d2e

PR-URL: nodejs#41610
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
VoltrexKeyva pushed a commit to VoltrexKeyva/node that referenced this pull request Feb 3, 2022
Original commit message:

    [debugger] Pass break reason for interrupt along with BreakRightNow

    This explicitly passes along the break reason when requesting a pause
    that is handled via an interrupt. Pushing the break reason is not
    enough (as done before), as the reason may be used and consumed on
    another pause call that triggers a setPauseOnNextCall.

    Fixed: chromium:1292519
    Change-Id: If8635c9397a7b9a1e6757be8048c9edc613c27f8
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3427208
    Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
    Commit-Queue: Kim-Anh Tran <kimanh@chromium.org>
    Auto-Submit: Kim-Anh Tran <kimanh@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#78885}

Refs: v8/v8@50d5fb7

PR-URL: nodejs#41610
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
VoltrexKeyva pushed a commit to VoltrexKeyva/node that referenced this pull request Feb 3, 2022
PR-URL: nodejs#41610
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
VoltrexKeyva pushed a commit to VoltrexKeyva/node that referenced this pull request Feb 3, 2022
PR-URL: nodejs#41610
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
VoltrexKeyva pushed a commit to VoltrexKeyva/node that referenced this pull request Feb 3, 2022
V8::ShutdownPlatform has been deprecated and does the same.

PR-URL: nodejs#41610
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
VoltrexKeyva pushed a commit to VoltrexKeyva/node that referenced this pull request Feb 3, 2022
PR-URL: nodejs#41610
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
@XieJiSS
Copy link

XieJiSS commented Feb 21, 2022

Hi @targos, will this update be backported to the v17.x branch? Thanks!

@targos
Copy link
Member Author

targos commented Feb 21, 2022

I can't speak for others, but it won't be backported by me

targos added a commit to targos/node that referenced this pull request Feb 23, 2022
Original commit message:

    [debugger] Pass break reason for interrupt along with BreakRightNow

    This explicitly passes along the break reason when requesting a pause
    that is handled via an interrupt. Pushing the break reason is not
    enough (as done before), as the reason may be used and consumed on
    another pause call that triggers a setPauseOnNextCall.

    Fixed: chromium:1292519
    Change-Id: If8635c9397a7b9a1e6757be8048c9edc613c27f8
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3427208
    Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
    Commit-Queue: Kim-Anh Tran <kimanh@chromium.org>
    Auto-Submit: Kim-Anh Tran <kimanh@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#78885}

Refs: v8/v8@50d5fb7

PR-URL: nodejs#41610
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
targos added a commit to targos/node that referenced this pull request Mar 1, 2022
Original commit message:

    [debugger] Pass break reason for interrupt along with BreakRightNow

    This explicitly passes along the break reason when requesting a pause
    that is handled via an interrupt. Pushing the break reason is not
    enough (as done before), as the reason may be used and consumed on
    another pause call that triggers a setPauseOnNextCall.

    Fixed: chromium:1292519
    Change-Id: If8635c9397a7b9a1e6757be8048c9edc613c27f8
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3427208
    Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
    Commit-Queue: Kim-Anh Tran <kimanh@chromium.org>
    Auto-Submit: Kim-Anh Tran <kimanh@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#78885}

Refs: v8/v8@50d5fb7

PR-URL: nodejs#41610
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
targos added a commit to targos/node that referenced this pull request Mar 7, 2022
Original commit message:

    [debugger] Pass break reason for interrupt along with BreakRightNow

    This explicitly passes along the break reason when requesting a pause
    that is handled via an interrupt. Pushing the break reason is not
    enough (as done before), as the reason may be used and consumed on
    another pause call that triggers a setPauseOnNextCall.

    Fixed: chromium:1292519
    Change-Id: If8635c9397a7b9a1e6757be8048c9edc613c27f8
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3427208
    Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
    Commit-Queue: Kim-Anh Tran <kimanh@chromium.org>
    Auto-Submit: Kim-Anh Tran <kimanh@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#78885}

Refs: v8/v8@50d5fb7

PR-URL: nodejs#41610
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
targos added a commit to targos/node that referenced this pull request Mar 17, 2022
Original commit message:

    [debugger] Pass break reason for interrupt along with BreakRightNow

    This explicitly passes along the break reason when requesting a pause
    that is handled via an interrupt. Pushing the break reason is not
    enough (as done before), as the reason may be used and consumed on
    another pause call that triggers a setPauseOnNextCall.

    Fixed: chromium:1292519
    Change-Id: If8635c9397a7b9a1e6757be8048c9edc613c27f8
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3427208
    Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
    Commit-Queue: Kim-Anh Tran <kimanh@chromium.org>
    Auto-Submit: Kim-Anh Tran <kimanh@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#78885}

Refs: v8/v8@50d5fb7

PR-URL: nodejs#41610
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
targos added a commit to targos/node that referenced this pull request Mar 17, 2022
Original commit message:

    [debugger] Pass break reason for interrupt along with BreakRightNow

    This explicitly passes along the break reason when requesting a pause
    that is handled via an interrupt. Pushing the break reason is not
    enough (as done before), as the reason may be used and consumed on
    another pause call that triggers a setPauseOnNextCall.

    Fixed: chromium:1292519
    Change-Id: If8635c9397a7b9a1e6757be8048c9edc613c27f8
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3427208
    Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
    Commit-Queue: Kim-Anh Tran <kimanh@chromium.org>
    Auto-Submit: Kim-Anh Tran <kimanh@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#78885}

Refs: v8/v8@50d5fb7

PR-URL: nodejs#41610
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
BethGriggs added a commit that referenced this pull request Apr 18, 2022
Notable Changes:

Deprecations and Removals:

- (SEMVER-MAJOR) fs: runtime deprecate string coercion in `fs.write`,
  `fs.writeFileSync`
  (Livia Medeiros) (#42607)
- (SEMVER-MAJOR) dns: remove `dns.lookup` and `dnsPromises.lookup`
  options type coercion
  (Antoine du Hamel) (#41431)
- (SEMVER-MAJOR) process: runtime deprecate multipleResolves
  (Benjamin Gruenbaum) (#41896)
- (SEMVER-MAJOR) stream: remove thenable support (Robert Nagy)
  (#40773)
- (SEMVER-MAJOR) tls: move tls.parseCertString to end-of-life
  (Tobias Nießen) (#41479)

fetch (experimental):

An experimental fetch API is available on the global scope by default.
The implementation is based upon https://undici.nodejs.org/#/,
an HTTP/1.1 client written for Node.js by contributors to the project.

Through this addition, the following globals are made available: `fetch`
, `FormData`, `Headers`, `Request`, `Response`.

Disable this API with the `--no-experimental-fetch` command-line flag.

Contributed by Michaël Zasso in #41811.

HTTP Timeouts:

`server.headersTimeout`, which limits the amount of time the parser will
wait to receive the complete HTTP headers, is now set to `60000` (60
seconds) by default.

`server.requestTimeout`, which sets the timeout value in milliseconds
for receiving the entire request from the client, is now set to `300000`
(5 minutes) by default.

If these timeouts expire, the server responds with status 408 without
forwarding the request to the request listener and then closes the
connection.

Both timeouts must be set to a non-zero value to protect against
potential Denial-of-Service attacks in case the server is deployed
without a reverse proxy in front.

Contributed by Paolo Insogna in #41263.

Test Runner module (experimental):

The `node:test` module facilitates the creation of JavaScript tests that
report results in TAP format. This module is only available under the
`node:` scheme.

Contributed by Colin Ihrig in #42325.

Toolchain and Compiler Upgrades:

- Prebuilt binaries for Linux are now built on Red Hat Enterprise Linux
  (RHEL) 8 and are compatible with Linux distributions based on glibc
  2.28 or later, for example, Debian 10, RHEL 8, Ubuntu 20.04.
- Prebuilt binaries for macOS now require macOS 10.15 or later.
- For AIX the minimum supported architecture has been raised from Power
  7 to Power 8.

Prebuilt binaries for 32-bit Windows will initially not be available due
to issues building the V8 dependency in Node.js. We hope to restore
32-bit Windows binaries for Node.js 18 with a future V8 update.

Node.js does not support running on operating systems that are no longer
supported by their vendor. For operating systems where their vendor has
planned to end support earlier than April 2025, such as Windows 8.1
(January 2023) and Windows Server 2012 R2 (October 2023), support for
Node.js 18 will end at the earlier date.

Full details about the supported toolchains and compilers are documented
in the Node.js `BUILDING.md` file.

Contributed by Richard Lau in #42292,
#42604 and #42659
, and Michaël Zasso in #42105 and
#42666.

V8 10.1:

The V8 engine is updated to version 10.1, which is part of Chromium 101.
Compared to the version included in Node.js 17.9.0, the following new
features are included:

- The `findLast` and `findLastIndex` array methods.
- Improvements to the `Intl.Locale` API.
- The `Intl.supportedValuesOf` function.
- Improved performance of class fields and private class methods (the
  initialization of them is now as fast as ordinary property stores).

The data format returned by the serialization API (`v8.serialize(value)`)
has changed, and cannot be deserialized by earlier versions of Node.js.
On the other hand, it is still possible to deserialize the previous
format, as the API is backwards-compatible.

Contributed by Michaël Zasso in #42657.

Web Streams API (experimental):

Node.js now exposes the experimental implementation of the Web Streams
API on the global scope. This means the following APIs are now globally
available:

- `ReadableStream`, `ReadableStreamDefaultReader`,
`ReadableStreamBYOBReader`, `ReadableStreamBYOBRequest`,
`ReadableByteStreamController`, `ReadableStreamDefaultController`,
`TransformStream`, `TransformStreamDefaultController`, `WritableStream`,
`WritableStreamDefaultWriter`, `WritableStreamDefaultController`,
`ByteLengthQueuingStrategy`, `CountQueuingStrategy`, `TextEncoderStream`,
`TextDecoderStream`, `CompressionStream`, `DecompressionStream`.

Contributed James Snell in #39062,
and Antoine du Hamel in #42225.

Other Notable Changes:

- (SEMVER-MAJOR) buffer: expose Blob as a global
  (James M Snell) (#41270)
- (SEMVER-MAJOR) child\_process: improve argument validation
  (Rich Trott) (#41305)
- doc: add RafaelGSS to collaborators
  (RafaelGSS) (#42718)
- (SEMVER-MAJOR) http: make TCP noDelay enabled by default
  (Paolo Insogna) (#42163)
- (SEMVER-MAJOR) net: make `server.address()` return an integer for
  `family`
  (Antoine du Hamel) (#41431)
- (SEMVER-MAJOR) worker: expose BroadcastChannel as a global
  (James M Snell) (#41271)
- (SEMVER-MAJOR) worker: graduate BroadcastChannel to supported
  (James M Snell) (#41271)

Semver-Major Commits:

- (SEMVER-MAJOR) assert,util: compare RegExp.lastIndex while using deep
  equal checks
  (Ruben Bridgewater) (#41020)
- (SEMVER-MAJOR) buffer: refactor `byteLength` to remove outdated
  optimizations
  (Rongjian Zhang) (#38545)
- (SEMVER-MAJOR) buffer: expose Blob as a global
  (James M Snell) (#41270)
- (SEMVER-MAJOR) buffer: graduate Blob from experimental
  (James M Snell) (#41270)
- (SEMVER-MAJOR) build: make x86 Windows support temporarily
  experimental
  (Michaël Zasso) (#42666)
- (SEMVER-MAJOR) build: bump macOS deployment target to 10.15
  (Richard Lau) (#42292)
- (SEMVER-MAJOR) build: downgrade Windows 8.1 and server 2012 R2 to
  experimental
  (Michaël Zasso) (#42105)
- (SEMVER-MAJOR) child\_process: improve argument validation
  (Rich Trott) (#41305)
- (SEMVER-MAJOR) cluster: make `kill` to be just `process.kill`
  (Bar Admoni) (#34312)
- (SEMVER-MAJOR) crypto: cleanup validation
  (Mohammed Keyvanzadeh) (#39841)
- (SEMVER-MAJOR) crypto: prettify othername in PrintGeneralName
  (Tobias Nießen) (#42123)
- (SEMVER-MAJOR) crypto: fix X509Certificate toLegacyObject
  (Tobias Nießen) (#42124)
- (SEMVER-MAJOR) crypto: use RFC2253 format in PrintGeneralName
  (Tobias Nießen) (#42002)
- (SEMVER-MAJOR) crypto: change default check(Host|Email) behavior
  (Tobias Nießen) (#41600)
- (SEMVER-MAJOR) deps: V8: cherry-pick semver-major commits from 10.2
  (Michaël Zasso) (#42657)
- (SEMVER-MAJOR) deps: update V8 to 10.1.124.6
  (Michaël Zasso) (#42657)
- (SEMVER-MAJOR) deps: update V8 to 9.8.177.9
  (Michaël Zasso) (#41610)
- (SEMVER-MAJOR) deps: update V8 to 9.7.106.18
  (Michaël Zasso) (#40907)
- (SEMVER-MAJOR) dns: remove `dns.lookup` and `dnsPromises.lookup`
  options type coercion
  (Antoine du Hamel) (#41431)
- (SEMVER-MAJOR) doc: update minimum glibc requirements for Linux
  (Richard Lau) (#42659)
- (SEMVER-MAJOR) doc: update AIX minimum supported arch
  (Richard Lau) (#42604)
- (SEMVER-MAJOR) fs: runtime deprecate string coercion in `fs.write`,
  `fs.writeFileSync`
  (Livia Medeiros) (#42607)
- (SEMVER-MAJOR) http: refactor headersTimeout and requestTimeout logic
  (Paolo Insogna) (#41263)
- (SEMVER-MAJOR) http: make TCP noDelay enabled by default
  (Paolo Insogna) (#42163)
- (SEMVER-MAJOR) lib: enable fetch by default
  (Michaël Zasso) (#41811)
- (SEMVER-MAJOR) lib: replace validator and error
  (Mohammed Keyvanzadeh) (#41678)
- (SEMVER-MAJOR) module,repl: support 'node:'-only core modules
  (Colin Ihrig) (#42325)
- (SEMVER-MAJOR) net: make `server.address()` return an integer for
  `family`
  (Antoine du Hamel) (#41431)
- (SEMVER-MAJOR) process: disallow some uses of Object.defineProperty()
  on process.env
  (Himself65) (#28006)
- (SEMVER-MAJOR) process: runtime deprecate multipleResolves
  (Benjamin Gruenbaum) (#41896)
- (SEMVER-MAJOR) readline: fix question still called after closed
  (Xuguang Mei) (#42464)
- (SEMVER-MAJOR) stream: remove thenable support
  (Robert Nagy) (#40773)
- (SEMVER-MAJOR) stream: expose web streams globals, remove runtime
  experimental warning
  (Antoine du Hamel) (#42225)
- (SEMVER-MAJOR) stream: need to cleanup event listeners if last stream
  is readable
  (Xuguang Mei) (#41954)
- (SEMVER-MAJOR) stream: revert revert `map` spec compliance
  (Benjamin Gruenbaum) (#41933)
- (SEMVER-MAJOR) stream: throw invalid arg type from End Of Stream
  (Jithil P Ponnan) (#41766)
- (SEMVER-MAJOR) stream: don't emit finish after destroy
  (Robert Nagy) (#40852)
- (SEMVER-MAJOR) stream: add errored and closed props
  (Robert Nagy) (#40696)
- (SEMVER-MAJOR) test: add initial test module
  (Colin Ihrig) (#42325)
- (SEMVER-MAJOR) timers: refactor internal classes to ES2015 syntax
  (Rabbit) (#37408)
- (SEMVER-MAJOR) tls: represent registeredID numerically always
  (Tobias Nießen) (#41561)
- (SEMVER-MAJOR) tls: move tls.parseCertString to end-of-life
  (Tobias Nießen) (#41479)
- (SEMVER-MAJOR) url: throw on NULL in IPv6 hostname
  (Rich Trott) (#42313)
- (SEMVER-MAJOR) v8: make v8.writeHeapSnapshot() error codes consistent
  (Darshan Sen) (#42577)
- (SEMVER-MAJOR) v8: make writeHeapSnapshot throw if fopen fails
  (Antonio Román) (#41373)
- (SEMVER-MAJOR) worker: expose BroadcastChannel as a global
  (James M Snell) (#41271)
- (SEMVER-MAJOR) worker: graduate BroadcastChannel to supported
  (James M Snell) (#41271)

PR-URL: #42262
BethGriggs added a commit that referenced this pull request Apr 19, 2022
Notable Changes:

Deprecations and Removals:

- (SEMVER-MAJOR) fs: runtime deprecate string coercion in `fs.write`,
  `fs.writeFileSync`
  (Livia Medeiros) (#42607)
- (SEMVER-MAJOR) dns: remove `dns.lookup` and `dnsPromises.lookup`
  options type coercion
  (Antoine du Hamel) (#41431)
- (SEMVER-MAJOR) process: runtime deprecate multipleResolves
  (Benjamin Gruenbaum) (#41896)
- (SEMVER-MAJOR) stream: remove thenable support (Robert Nagy)
  (#40773)
- (SEMVER-MAJOR) tls: move tls.parseCertString to end-of-life
  (Tobias Nießen) (#41479)

fetch (experimental):

An experimental fetch API is available on the global scope by default.
The implementation is based upon https://undici.nodejs.org/#/,
an HTTP/1.1 client written for Node.js by contributors to the project.

Through this addition, the following globals are made available: `fetch`
, `FormData`, `Headers`, `Request`, `Response`.

Disable this API with the `--no-experimental-fetch` command-line flag.

Contributed by Michaël Zasso in #41811.

HTTP Timeouts:

`server.headersTimeout`, which limits the amount of time the parser will
wait to receive the complete HTTP headers, is now set to `60000` (60
seconds) by default.

`server.requestTimeout`, which sets the timeout value in milliseconds
for receiving the entire request from the client, is now set to `300000`
(5 minutes) by default.

If these timeouts expire, the server responds with status 408 without
forwarding the request to the request listener and then closes the
connection.

Both timeouts must be set to a non-zero value to protect against
potential Denial-of-Service attacks in case the server is deployed
without a reverse proxy in front.

Contributed by Paolo Insogna in #41263.

Test Runner module (experimental):

The `node:test` module facilitates the creation of JavaScript tests that
report results in TAP format. This module is only available under the
`node:` scheme.

Contributed by Colin Ihrig in #42325.

Toolchain and Compiler Upgrades:

- Prebuilt binaries for Linux are now built on Red Hat Enterprise Linux
  (RHEL) 8 and are compatible with Linux distributions based on glibc
  2.28 or later, for example, Debian 10, RHEL 8, Ubuntu 20.04.
- Prebuilt binaries for macOS now require macOS 10.15 or later.
- For AIX the minimum supported architecture has been raised from Power
  7 to Power 8.

Prebuilt binaries for 32-bit Windows will initially not be available due
to issues building the V8 dependency in Node.js. We hope to restore
32-bit Windows binaries for Node.js 18 with a future V8 update.

Node.js does not support running on operating systems that are no longer
supported by their vendor. For operating systems where their vendor has
planned to end support earlier than April 2025, such as Windows 8.1
(January 2023) and Windows Server 2012 R2 (October 2023), support for
Node.js 18 will end at the earlier date.

Full details about the supported toolchains and compilers are documented
in the Node.js `BUILDING.md` file.

Contributed by Richard Lau in #42292,
#42604 and #42659
, and Michaël Zasso in #42105 and
#42666.

V8 10.1:

The V8 engine is updated to version 10.1, which is part of Chromium 101.
Compared to the version included in Node.js 17.9.0, the following new
features are included:

- The `findLast` and `findLastIndex` array methods.
- Improvements to the `Intl.Locale` API.
- The `Intl.supportedValuesOf` function.
- Improved performance of class fields and private class methods (the
  initialization of them is now as fast as ordinary property stores).

The data format returned by the serialization API (`v8.serialize(value)`)
has changed, and cannot be deserialized by earlier versions of Node.js.
On the other hand, it is still possible to deserialize the previous
format, as the API is backwards-compatible.

Contributed by Michaël Zasso in #42657.

Web Streams API (experimental):

Node.js now exposes the experimental implementation of the Web Streams
API on the global scope. This means the following APIs are now globally
available:

- `ReadableStream`, `ReadableStreamDefaultReader`,
`ReadableStreamBYOBReader`, `ReadableStreamBYOBRequest`,
`ReadableByteStreamController`, `ReadableStreamDefaultController`,
`TransformStream`, `TransformStreamDefaultController`, `WritableStream`,
`WritableStreamDefaultWriter`, `WritableStreamDefaultController`,
`ByteLengthQueuingStrategy`, `CountQueuingStrategy`, `TextEncoderStream`,
`TextDecoderStream`, `CompressionStream`, `DecompressionStream`.

Contributed James Snell in #39062,
and Antoine du Hamel in #42225.

Other Notable Changes:

- (SEMVER-MAJOR) buffer: expose Blob as a global
  (James M Snell) (#41270)
- (SEMVER-MAJOR) child\_process: improve argument validation
  (Rich Trott) (#41305)
- doc: add RafaelGSS to collaborators
  (RafaelGSS) (#42718)
- (SEMVER-MAJOR) http: make TCP noDelay enabled by default
  (Paolo Insogna) (#42163)
- (SEMVER-MAJOR) net: make `server.address()` return an integer for
  `family`
  (Antoine du Hamel) (#41431)
- (SEMVER-MAJOR) worker: expose BroadcastChannel as a global
  (James M Snell) (#41271)
- (SEMVER-MAJOR) worker: graduate BroadcastChannel to supported
  (James M Snell) (#41271)

Semver-Major Commits:

- (SEMVER-MAJOR) assert,util: compare RegExp.lastIndex while using deep
  equal checks
  (Ruben Bridgewater) (#41020)
- (SEMVER-MAJOR) buffer: refactor `byteLength` to remove outdated
  optimizations
  (Rongjian Zhang) (#38545)
- (SEMVER-MAJOR) buffer: expose Blob as a global
  (James M Snell) (#41270)
- (SEMVER-MAJOR) buffer: graduate Blob from experimental
  (James M Snell) (#41270)
- (SEMVER-MAJOR) build: make x86 Windows support temporarily
  experimental
  (Michaël Zasso) (#42666)
- (SEMVER-MAJOR) build: bump macOS deployment target to 10.15
  (Richard Lau) (#42292)
- (SEMVER-MAJOR) build: downgrade Windows 8.1 and server 2012 R2 to
  experimental
  (Michaël Zasso) (#42105)
- (SEMVER-MAJOR) child\_process: improve argument validation
  (Rich Trott) (#41305)
- (SEMVER-MAJOR) cluster: make `kill` to be just `process.kill`
  (Bar Admoni) (#34312)
- (SEMVER-MAJOR) crypto: cleanup validation
  (Mohammed Keyvanzadeh) (#39841)
- (SEMVER-MAJOR) crypto: prettify othername in PrintGeneralName
  (Tobias Nießen) (#42123)
- (SEMVER-MAJOR) crypto: fix X509Certificate toLegacyObject
  (Tobias Nießen) (#42124)
- (SEMVER-MAJOR) crypto: use RFC2253 format in PrintGeneralName
  (Tobias Nießen) (#42002)
- (SEMVER-MAJOR) crypto: change default check(Host|Email) behavior
  (Tobias Nießen) (#41600)
- (SEMVER-MAJOR) deps: V8: cherry-pick semver-major commits from 10.2
  (Michaël Zasso) (#42657)
- (SEMVER-MAJOR) deps: update V8 to 10.1.124.6
  (Michaël Zasso) (#42657)
- (SEMVER-MAJOR) deps: update V8 to 9.8.177.9
  (Michaël Zasso) (#41610)
- (SEMVER-MAJOR) deps: update V8 to 9.7.106.18
  (Michaël Zasso) (#40907)
- (SEMVER-MAJOR) dns: remove `dns.lookup` and `dnsPromises.lookup`
  options type coercion
  (Antoine du Hamel) (#41431)
- (SEMVER-MAJOR) doc: update minimum glibc requirements for Linux
  (Richard Lau) (#42659)
- (SEMVER-MAJOR) doc: update AIX minimum supported arch
  (Richard Lau) (#42604)
- (SEMVER-MAJOR) fs: runtime deprecate string coercion in `fs.write`,
  `fs.writeFileSync`
  (Livia Medeiros) (#42607)
- (SEMVER-MAJOR) http: refactor headersTimeout and requestTimeout logic
  (Paolo Insogna) (#41263)
- (SEMVER-MAJOR) http: make TCP noDelay enabled by default
  (Paolo Insogna) (#42163)
- (SEMVER-MAJOR) lib: enable fetch by default
  (Michaël Zasso) (#41811)
- (SEMVER-MAJOR) lib: replace validator and error
  (Mohammed Keyvanzadeh) (#41678)
- (SEMVER-MAJOR) module,repl: support 'node:'-only core modules
  (Colin Ihrig) (#42325)
- (SEMVER-MAJOR) net: make `server.address()` return an integer for
  `family`
  (Antoine du Hamel) (#41431)
- (SEMVER-MAJOR) process: disallow some uses of Object.defineProperty()
  on process.env
  (Himself65) (#28006)
- (SEMVER-MAJOR) process: runtime deprecate multipleResolves
  (Benjamin Gruenbaum) (#41896)
- (SEMVER-MAJOR) readline: fix question still called after closed
  (Xuguang Mei) (#42464)
- (SEMVER-MAJOR) stream: remove thenable support
  (Robert Nagy) (#40773)
- (SEMVER-MAJOR) stream: expose web streams globals, remove runtime
  experimental warning
  (Antoine du Hamel) (#42225)
- (SEMVER-MAJOR) stream: need to cleanup event listeners if last stream
  is readable
  (Xuguang Mei) (#41954)
- (SEMVER-MAJOR) stream: revert revert `map` spec compliance
  (Benjamin Gruenbaum) (#41933)
- (SEMVER-MAJOR) stream: throw invalid arg type from End Of Stream
  (Jithil P Ponnan) (#41766)
- (SEMVER-MAJOR) stream: don't emit finish after destroy
  (Robert Nagy) (#40852)
- (SEMVER-MAJOR) stream: add errored and closed props
  (Robert Nagy) (#40696)
- (SEMVER-MAJOR) test: add initial test module
  (Colin Ihrig) (#42325)
- (SEMVER-MAJOR) timers: refactor internal classes to ES2015 syntax
  (Rabbit) (#37408)
- (SEMVER-MAJOR) tls: represent registeredID numerically always
  (Tobias Nießen) (#41561)
- (SEMVER-MAJOR) tls: move tls.parseCertString to end-of-life
  (Tobias Nießen) (#41479)
- (SEMVER-MAJOR) url: throw on NULL in IPv6 hostname
  (Rich Trott) (#42313)
- (SEMVER-MAJOR) v8: make v8.writeHeapSnapshot() error codes consistent
  (Darshan Sen) (#42577)
- (SEMVER-MAJOR) v8: make writeHeapSnapshot throw if fopen fails
  (Antonio Román) (#41373)
- (SEMVER-MAJOR) worker: expose BroadcastChannel as a global
  (James M Snell) (#41271)
- (SEMVER-MAJOR) worker: graduate BroadcastChannel to supported
  (James M Snell) (#41271)

PR-URL: #42262
xtx1130 pushed a commit to xtx1130/node that referenced this pull request Apr 25, 2022
Notable Changes:

Deprecations and Removals:

- (SEMVER-MAJOR) fs: runtime deprecate string coercion in `fs.write`,
  `fs.writeFileSync`
  (Livia Medeiros) (nodejs#42607)
- (SEMVER-MAJOR) dns: remove `dns.lookup` and `dnsPromises.lookup`
  options type coercion
  (Antoine du Hamel) (nodejs#41431)
- (SEMVER-MAJOR) process: runtime deprecate multipleResolves
  (Benjamin Gruenbaum) (nodejs#41896)
- (SEMVER-MAJOR) stream: remove thenable support (Robert Nagy)
  (nodejs#40773)
- (SEMVER-MAJOR) tls: move tls.parseCertString to end-of-life
  (Tobias Nießen) (nodejs#41479)

fetch (experimental):

An experimental fetch API is available on the global scope by default.
The implementation is based upon https://undici.nodejs.org/#/,
an HTTP/1.1 client written for Node.js by contributors to the project.

Through this addition, the following globals are made available: `fetch`
, `FormData`, `Headers`, `Request`, `Response`.

Disable this API with the `--no-experimental-fetch` command-line flag.

Contributed by Michaël Zasso in nodejs#41811.

HTTP Timeouts:

`server.headersTimeout`, which limits the amount of time the parser will
wait to receive the complete HTTP headers, is now set to `60000` (60
seconds) by default.

`server.requestTimeout`, which sets the timeout value in milliseconds
for receiving the entire request from the client, is now set to `300000`
(5 minutes) by default.

If these timeouts expire, the server responds with status 408 without
forwarding the request to the request listener and then closes the
connection.

Both timeouts must be set to a non-zero value to protect against
potential Denial-of-Service attacks in case the server is deployed
without a reverse proxy in front.

Contributed by Paolo Insogna in nodejs#41263.

Test Runner module (experimental):

The `node:test` module facilitates the creation of JavaScript tests that
report results in TAP format. This module is only available under the
`node:` scheme.

Contributed by Colin Ihrig in nodejs#42325.

Toolchain and Compiler Upgrades:

- Prebuilt binaries for Linux are now built on Red Hat Enterprise Linux
  (RHEL) 8 and are compatible with Linux distributions based on glibc
  2.28 or later, for example, Debian 10, RHEL 8, Ubuntu 20.04.
- Prebuilt binaries for macOS now require macOS 10.15 or later.
- For AIX the minimum supported architecture has been raised from Power
  7 to Power 8.

Prebuilt binaries for 32-bit Windows will initially not be available due
to issues building the V8 dependency in Node.js. We hope to restore
32-bit Windows binaries for Node.js 18 with a future V8 update.

Node.js does not support running on operating systems that are no longer
supported by their vendor. For operating systems where their vendor has
planned to end support earlier than April 2025, such as Windows 8.1
(January 2023) and Windows Server 2012 R2 (October 2023), support for
Node.js 18 will end at the earlier date.

Full details about the supported toolchains and compilers are documented
in the Node.js `BUILDING.md` file.

Contributed by Richard Lau in nodejs#42292,
nodejs#42604 and nodejs#42659
, and Michaël Zasso in nodejs#42105 and
nodejs#42666.

V8 10.1:

The V8 engine is updated to version 10.1, which is part of Chromium 101.
Compared to the version included in Node.js 17.9.0, the following new
features are included:

- The `findLast` and `findLastIndex` array methods.
- Improvements to the `Intl.Locale` API.
- The `Intl.supportedValuesOf` function.
- Improved performance of class fields and private class methods (the
  initialization of them is now as fast as ordinary property stores).

The data format returned by the serialization API (`v8.serialize(value)`)
has changed, and cannot be deserialized by earlier versions of Node.js.
On the other hand, it is still possible to deserialize the previous
format, as the API is backwards-compatible.

Contributed by Michaël Zasso in nodejs#42657.

Web Streams API (experimental):

Node.js now exposes the experimental implementation of the Web Streams
API on the global scope. This means the following APIs are now globally
available:

- `ReadableStream`, `ReadableStreamDefaultReader`,
`ReadableStreamBYOBReader`, `ReadableStreamBYOBRequest`,
`ReadableByteStreamController`, `ReadableStreamDefaultController`,
`TransformStream`, `TransformStreamDefaultController`, `WritableStream`,
`WritableStreamDefaultWriter`, `WritableStreamDefaultController`,
`ByteLengthQueuingStrategy`, `CountQueuingStrategy`, `TextEncoderStream`,
`TextDecoderStream`, `CompressionStream`, `DecompressionStream`.

Contributed James Snell in nodejs#39062,
and Antoine du Hamel in nodejs#42225.

Other Notable Changes:

- (SEMVER-MAJOR) buffer: expose Blob as a global
  (James M Snell) (nodejs#41270)
- (SEMVER-MAJOR) child\_process: improve argument validation
  (Rich Trott) (nodejs#41305)
- doc: add RafaelGSS to collaborators
  (RafaelGSS) (nodejs#42718)
- (SEMVER-MAJOR) http: make TCP noDelay enabled by default
  (Paolo Insogna) (nodejs#42163)
- (SEMVER-MAJOR) net: make `server.address()` return an integer for
  `family`
  (Antoine du Hamel) (nodejs#41431)
- (SEMVER-MAJOR) worker: expose BroadcastChannel as a global
  (James M Snell) (nodejs#41271)
- (SEMVER-MAJOR) worker: graduate BroadcastChannel to supported
  (James M Snell) (nodejs#41271)

Semver-Major Commits:

- (SEMVER-MAJOR) assert,util: compare RegExp.lastIndex while using deep
  equal checks
  (Ruben Bridgewater) (nodejs#41020)
- (SEMVER-MAJOR) buffer: refactor `byteLength` to remove outdated
  optimizations
  (Rongjian Zhang) (nodejs#38545)
- (SEMVER-MAJOR) buffer: expose Blob as a global
  (James M Snell) (nodejs#41270)
- (SEMVER-MAJOR) buffer: graduate Blob from experimental
  (James M Snell) (nodejs#41270)
- (SEMVER-MAJOR) build: make x86 Windows support temporarily
  experimental
  (Michaël Zasso) (nodejs#42666)
- (SEMVER-MAJOR) build: bump macOS deployment target to 10.15
  (Richard Lau) (nodejs#42292)
- (SEMVER-MAJOR) build: downgrade Windows 8.1 and server 2012 R2 to
  experimental
  (Michaël Zasso) (nodejs#42105)
- (SEMVER-MAJOR) child\_process: improve argument validation
  (Rich Trott) (nodejs#41305)
- (SEMVER-MAJOR) cluster: make `kill` to be just `process.kill`
  (Bar Admoni) (nodejs#34312)
- (SEMVER-MAJOR) crypto: cleanup validation
  (Mohammed Keyvanzadeh) (nodejs#39841)
- (SEMVER-MAJOR) crypto: prettify othername in PrintGeneralName
  (Tobias Nießen) (nodejs#42123)
- (SEMVER-MAJOR) crypto: fix X509Certificate toLegacyObject
  (Tobias Nießen) (nodejs#42124)
- (SEMVER-MAJOR) crypto: use RFC2253 format in PrintGeneralName
  (Tobias Nießen) (nodejs#42002)
- (SEMVER-MAJOR) crypto: change default check(Host|Email) behavior
  (Tobias Nießen) (nodejs#41600)
- (SEMVER-MAJOR) deps: V8: cherry-pick semver-major commits from 10.2
  (Michaël Zasso) (nodejs#42657)
- (SEMVER-MAJOR) deps: update V8 to 10.1.124.6
  (Michaël Zasso) (nodejs#42657)
- (SEMVER-MAJOR) deps: update V8 to 9.8.177.9
  (Michaël Zasso) (nodejs#41610)
- (SEMVER-MAJOR) deps: update V8 to 9.7.106.18
  (Michaël Zasso) (nodejs#40907)
- (SEMVER-MAJOR) dns: remove `dns.lookup` and `dnsPromises.lookup`
  options type coercion
  (Antoine du Hamel) (nodejs#41431)
- (SEMVER-MAJOR) doc: update minimum glibc requirements for Linux
  (Richard Lau) (nodejs#42659)
- (SEMVER-MAJOR) doc: update AIX minimum supported arch
  (Richard Lau) (nodejs#42604)
- (SEMVER-MAJOR) fs: runtime deprecate string coercion in `fs.write`,
  `fs.writeFileSync`
  (Livia Medeiros) (nodejs#42607)
- (SEMVER-MAJOR) http: refactor headersTimeout and requestTimeout logic
  (Paolo Insogna) (nodejs#41263)
- (SEMVER-MAJOR) http: make TCP noDelay enabled by default
  (Paolo Insogna) (nodejs#42163)
- (SEMVER-MAJOR) lib: enable fetch by default
  (Michaël Zasso) (nodejs#41811)
- (SEMVER-MAJOR) lib: replace validator and error
  (Mohammed Keyvanzadeh) (nodejs#41678)
- (SEMVER-MAJOR) module,repl: support 'node:'-only core modules
  (Colin Ihrig) (nodejs#42325)
- (SEMVER-MAJOR) net: make `server.address()` return an integer for
  `family`
  (Antoine du Hamel) (nodejs#41431)
- (SEMVER-MAJOR) process: disallow some uses of Object.defineProperty()
  on process.env
  (Himself65) (nodejs#28006)
- (SEMVER-MAJOR) process: runtime deprecate multipleResolves
  (Benjamin Gruenbaum) (nodejs#41896)
- (SEMVER-MAJOR) readline: fix question still called after closed
  (Xuguang Mei) (nodejs#42464)
- (SEMVER-MAJOR) stream: remove thenable support
  (Robert Nagy) (nodejs#40773)
- (SEMVER-MAJOR) stream: expose web streams globals, remove runtime
  experimental warning
  (Antoine du Hamel) (nodejs#42225)
- (SEMVER-MAJOR) stream: need to cleanup event listeners if last stream
  is readable
  (Xuguang Mei) (nodejs#41954)
- (SEMVER-MAJOR) stream: revert revert `map` spec compliance
  (Benjamin Gruenbaum) (nodejs#41933)
- (SEMVER-MAJOR) stream: throw invalid arg type from End Of Stream
  (Jithil P Ponnan) (nodejs#41766)
- (SEMVER-MAJOR) stream: don't emit finish after destroy
  (Robert Nagy) (nodejs#40852)
- (SEMVER-MAJOR) stream: add errored and closed props
  (Robert Nagy) (nodejs#40696)
- (SEMVER-MAJOR) test: add initial test module
  (Colin Ihrig) (nodejs#42325)
- (SEMVER-MAJOR) timers: refactor internal classes to ES2015 syntax
  (Rabbit) (nodejs#37408)
- (SEMVER-MAJOR) tls: represent registeredID numerically always
  (Tobias Nießen) (nodejs#41561)
- (SEMVER-MAJOR) tls: move tls.parseCertString to end-of-life
  (Tobias Nießen) (nodejs#41479)
- (SEMVER-MAJOR) url: throw on NULL in IPv6 hostname
  (Rich Trott) (nodejs#42313)
- (SEMVER-MAJOR) v8: make v8.writeHeapSnapshot() error codes consistent
  (Darshan Sen) (nodejs#42577)
- (SEMVER-MAJOR) v8: make writeHeapSnapshot throw if fopen fails
  (Antonio Román) (nodejs#41373)
- (SEMVER-MAJOR) worker: expose BroadcastChannel as a global
  (James M Snell) (nodejs#41271)
- (SEMVER-MAJOR) worker: graduate BroadcastChannel to supported
  (James M Snell) (nodejs#41271)

PR-URL: nodejs#42262
codebytere added a commit to electron/electron that referenced this pull request Oct 12, 2022
codebytere added a commit to electron/electron that referenced this pull request Oct 17, 2022
codebytere added a commit to electron/electron that referenced this pull request Oct 19, 2022
codebytere added a commit to electron/electron that referenced this pull request Oct 19, 2022
codebytere added a commit to electron/electron that referenced this pull request Oct 24, 2022
codebytere added a commit to electron/electron that referenced this pull request Nov 8, 2022
codebytere added a commit to electron/electron that referenced this pull request Nov 8, 2022
codebytere added a commit to electron/electron that referenced this pull request Nov 10, 2022
* chore: update to Node.js v18

* child_process: improve argument validation

nodejs/node#41305

* bootstrap: support configure-time user-land snapshot

nodejs/node#42466

* chore: update GN patch

* src: disambiguate terms used to refer to builtins and addons

nodejs/node#44135

* src: use a typed array internally for process._exiting

nodejs/node#43883

* chore: lib/internal/bootstrap -> lib/internal/process

* src: disambiguate terms used to refer to builtins and addons

nodejs/node#44135

* chore: remove redudant browserGlobals patch

* chore: update BoringSSL patch

* src: allow embedder-provided PageAllocator in NodePlatform

nodejs/node#38362

* chore: fixup Node.js crypto tests

- nodejs/node#44171
- nodejs/node#41600

* lib: add Promise methods to avoid-prototype-pollution lint rule

nodejs/node#43849

* deps: update V8 to 10.1

nodejs/node#42657

* src: add kNoBrowserGlobals flag for Environment

nodejs/node#40532

* chore: consolidate asar initialization patches

* deps: update V8 to 10.1

nodejs/node#42657

* deps: update V8 to 9.8

nodejs/node#41610

* src,crypto: remove AllocatedBuffers from crypto_spkac

nodejs/node#40752

* build: enable V8's shared read-only heap

nodejs/node#42809

* src: fix ssize_t error from nghttp2.h

nodejs/node#44393

* chore: fixup ESM patch

* chore: fixup patch indices

* src: merge NativeModuleEnv into NativeModuleLoader

nodejs/node#43824

* [API] Pass OOMDetails to OOMErrorCallback

https://chromium-review.googlesource.com/c/v8/v8/+/3647827

* src: iwyu in cleanup_queue.cc

* src: return Maybe from a couple of functions

nodejs/node#39603

* src: clean up embedder API

nodejs/node#35897

* src: refactor DH groups to delete crypto_groups.h

nodejs/node#43896

* deps,src: use SIMD for normal base64 encoding

nodejs/node#39775

* chore: remove deleted source file

* chore: update patches

* chore: remove deleted source file

* lib: add fetch

nodejs/node#41749

* chore: remove nonexistent node specs

* test: split report OOM tests

nodejs/node#44389

* src: trace fs async api

nodejs/node#44057

* http: trace http request / response

nodejs/node#44102

* test: split test-crypto-dh.js

nodejs/node#40451

* crypto: introduce X509Certificate API

nodejs/node#36804

* src: split property helpers from node::Environment

nodejs/node#44056

* nodejs/node#38905

bootstrap: implement run-time user-land snapshots via --build-snapshot and --snapshot-blob

* lib,src: implement WebAssembly Web API

nodejs/node#42701

* fixup! deps,src: use SIMD for normal base64 encoding

* fixup! src: refactor DH groups to delete crypto_groups.h

* chore: fixup base64 GN file

* fix: check that node::InitializeContext() returns true

* chore: delete _noBrowserGlobals usage

* chore: disable fetch in renderer procceses

* dns: default to verbatim=true in dns.lookup()

nodejs/node#39987

Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
khalwa pushed a commit to solarwindscloud/electron that referenced this pull request Feb 22, 2023
* chore: update to Node.js v18

* child_process: improve argument validation

nodejs/node#41305

* bootstrap: support configure-time user-land snapshot

nodejs/node#42466

* chore: update GN patch

* src: disambiguate terms used to refer to builtins and addons

nodejs/node#44135

* src: use a typed array internally for process._exiting

nodejs/node#43883

* chore: lib/internal/bootstrap -> lib/internal/process

* src: disambiguate terms used to refer to builtins and addons

nodejs/node#44135

* chore: remove redudant browserGlobals patch

* chore: update BoringSSL patch

* src: allow embedder-provided PageAllocator in NodePlatform

nodejs/node#38362

* chore: fixup Node.js crypto tests

- nodejs/node#44171
- nodejs/node#41600

* lib: add Promise methods to avoid-prototype-pollution lint rule

nodejs/node#43849

* deps: update V8 to 10.1

nodejs/node#42657

* src: add kNoBrowserGlobals flag for Environment

nodejs/node#40532

* chore: consolidate asar initialization patches

* deps: update V8 to 10.1

nodejs/node#42657

* deps: update V8 to 9.8

nodejs/node#41610

* src,crypto: remove AllocatedBuffers from crypto_spkac

nodejs/node#40752

* build: enable V8's shared read-only heap

nodejs/node#42809

* src: fix ssize_t error from nghttp2.h

nodejs/node#44393

* chore: fixup ESM patch

* chore: fixup patch indices

* src: merge NativeModuleEnv into NativeModuleLoader

nodejs/node#43824

* [API] Pass OOMDetails to OOMErrorCallback

https://chromium-review.googlesource.com/c/v8/v8/+/3647827

* src: iwyu in cleanup_queue.cc

* src: return Maybe from a couple of functions

nodejs/node#39603

* src: clean up embedder API

nodejs/node#35897

* src: refactor DH groups to delete crypto_groups.h

nodejs/node#43896

* deps,src: use SIMD for normal base64 encoding

nodejs/node#39775

* chore: remove deleted source file

* chore: update patches

* chore: remove deleted source file

* lib: add fetch

nodejs/node#41749

* chore: remove nonexistent node specs

* test: split report OOM tests

nodejs/node#44389

* src: trace fs async api

nodejs/node#44057

* http: trace http request / response

nodejs/node#44102

* test: split test-crypto-dh.js

nodejs/node#40451

* crypto: introduce X509Certificate API

nodejs/node#36804

* src: split property helpers from node::Environment

nodejs/node#44056

* nodejs/node#38905

bootstrap: implement run-time user-land snapshots via --build-snapshot and --snapshot-blob

* lib,src: implement WebAssembly Web API

nodejs/node#42701

* fixup! deps,src: use SIMD for normal base64 encoding

* fixup! src: refactor DH groups to delete crypto_groups.h

* chore: fixup base64 GN file

* fix: check that node::InitializeContext() returns true

* chore: delete _noBrowserGlobals usage

* chore: disable fetch in renderer procceses

* dns: default to verbatim=true in dns.lookup()

nodejs/node#39987

Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Issues and PRs related to build files or the CI. needs-ci PRs that need a full CI run. semver-major PRs that contain breaking changes and should be released in the next major version. v8 engine Issues and PRs related to the V8 dependency.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet