From 9bedae52667d91e59a2d63d27a4211bf25890e29 Mon Sep 17 00:00:00 2001 From: Vasili Skurydzin Date: Mon, 29 Oct 2018 10:11:59 -0400 Subject: [PATCH 01/88] deps: cherry-pick 6bc4bfe from V8 upstream Only changes to src/base/debug/stack_trace_posix.cc included Original commit message: Fixes to V8 GN build process on aix platform src/base/debug/stack_trace_posix.cc: suppressed unused function warnings for functions DemangleSymbols, OutputPointer(in order to compile with -Werror flag) test/cctest/test-isolate-independent-builtins.cc: corrections to make ByteInText test case compatible with aix. (affects aix only) Change-Id: I49e45e63545404c77aaed3f51b26557f6f03455e Reviewed-on: https://chromium-review.googlesource.com/927484 Reviewed-by: Jakob Gruber Reviewed-by: Michael Achenbach Commit-Queue: Jakob Gruber Cr-Commit-Position: refs/heads/master@{#52071} PR-URL: https://github.com/nodejs/node/pull/23958 Reviewed-By: Refael Ackermann Reviewed-By: Michael Dawson Reviewed-By: Beth Griggs Reviewed-By: George Adams --- deps/v8/include/v8-version.h | 2 +- deps/v8/src/base/debug/stack_trace_posix.cc | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/deps/v8/include/v8-version.h b/deps/v8/include/v8-version.h index 95cc3573a3f723..96f1cd6d46fb23 100644 --- a/deps/v8/include/v8-version.h +++ b/deps/v8/include/v8-version.h @@ -11,7 +11,7 @@ #define V8_MAJOR_VERSION 6 #define V8_MINOR_VERSION 2 #define V8_BUILD_NUMBER 414 -#define V8_PATCH_LEVEL 72 +#define V8_PATCH_LEVEL 73 // Use 1 for candidates and 0 otherwise. // (Boolean macro values are not supported by all preprocessors.) diff --git a/deps/v8/src/base/debug/stack_trace_posix.cc b/deps/v8/src/base/debug/stack_trace_posix.cc index 87c0a73d191e65..681dfbf9728449 100644 --- a/deps/v8/src/base/debug/stack_trace_posix.cc +++ b/deps/v8/src/base/debug/stack_trace_posix.cc @@ -72,6 +72,7 @@ const char kMangledSymbolPrefix[] = "_Z"; const char kSymbolCharacters[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_"; +#if HAVE_EXECINFO_H // Demangles C++ symbols in the given text. Example: // // "out/Debug/base_unittests(_ZN10StackTraceC1Ev+0x20) [0x817778c]" @@ -81,7 +82,6 @@ void DemangleSymbols(std::string* text) { // Note: code in this function is NOT async-signal safe (std::string uses // malloc internally). -#if HAVE_EXECINFO_H std::string::size_type search_from = 0; while (search_from < text->size()) { @@ -117,9 +117,8 @@ void DemangleSymbols(std::string* text) { search_from = mangled_start + 2; } } - -#endif // HAVE_EXECINFO_H } +#endif // HAVE_EXECINFO_H class BacktraceOutputHandler { public: @@ -129,6 +128,7 @@ class BacktraceOutputHandler { virtual ~BacktraceOutputHandler() {} }; +#if HAVE_EXECINFO_H void OutputPointer(void* pointer, BacktraceOutputHandler* handler) { // This should be more than enough to store a 64-bit number in hex: // 16 hex digits + 1 for null-terminator. @@ -139,7 +139,6 @@ void OutputPointer(void* pointer, BacktraceOutputHandler* handler) { handler->HandleOutput(buf); } -#if HAVE_EXECINFO_H void ProcessBacktrace(void* const* trace, size_t size, BacktraceOutputHandler* handler) { // NOTE: This code MUST be async-signal safe (it's used by in-process From 50347297a106cd592c9638448eba611e09bb39e5 Mon Sep 17 00:00:00 2001 From: Vasili Skurydzin Date: Mon, 29 Oct 2018 10:14:50 -0400 Subject: [PATCH 02/88] deps: cherry-pick d2e0166 from V8 upstream Original commit message: ppc64, aix: Pass CallFrequency object by const reference to avoid value copy error. Bug: v8:8193 GCC bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61976 Change-Id: I0d4efca4da03ef82651325e15ddf2160022bc8de Reviewed-on: https://chromium-review.googlesource.com/1228633 Reviewed-by: Michael Starzinger Reviewed-by: Daniel Clifford Reviewed-by: Junliang Yan Commit-Queue: Junliang Yan Cr-Commit-Position: refs/heads/master@{#56275} PR-URL: https://github.com/nodejs/node/pull/23958 Reviewed-By: Refael Ackermann Reviewed-By: Michael Dawson Reviewed-By: Beth Griggs Reviewed-By: George Adams --- deps/v8/include/v8-version.h | 2 +- deps/v8/src/compiler/bytecode-graph-builder.cc | 2 +- deps/v8/src/compiler/bytecode-graph-builder.h | 2 +- deps/v8/src/compiler/js-inlining.cc | 3 ++- deps/v8/src/compiler/js-operator.cc | 6 ++++-- deps/v8/src/compiler/js-operator.h | 8 ++++---- deps/v8/src/compiler/pipeline.cc | 3 ++- 7 files changed, 15 insertions(+), 11 deletions(-) diff --git a/deps/v8/include/v8-version.h b/deps/v8/include/v8-version.h index 96f1cd6d46fb23..40ea0af674bd0c 100644 --- a/deps/v8/include/v8-version.h +++ b/deps/v8/include/v8-version.h @@ -11,7 +11,7 @@ #define V8_MAJOR_VERSION 6 #define V8_MINOR_VERSION 2 #define V8_BUILD_NUMBER 414 -#define V8_PATCH_LEVEL 73 +#define V8_PATCH_LEVEL 74 // Use 1 for candidates and 0 otherwise. // (Boolean macro values are not supported by all preprocessors.) diff --git a/deps/v8/src/compiler/bytecode-graph-builder.cc b/deps/v8/src/compiler/bytecode-graph-builder.cc index 2d68ed8b0378eb..ca98a5fe28830b 100644 --- a/deps/v8/src/compiler/bytecode-graph-builder.cc +++ b/deps/v8/src/compiler/bytecode-graph-builder.cc @@ -475,7 +475,7 @@ Node* BytecodeGraphBuilder::Environment::Checkpoint( BytecodeGraphBuilder::BytecodeGraphBuilder( Zone* local_zone, Handle shared_info, Handle feedback_vector, BailoutId osr_offset, - JSGraph* jsgraph, CallFrequency invocation_frequency, + JSGraph* jsgraph, CallFrequency& invocation_frequency, SourcePositionTable* source_positions, int inlining_id, JSTypeHintLowering::Flags flags, bool stack_check) : local_zone_(local_zone), diff --git a/deps/v8/src/compiler/bytecode-graph-builder.h b/deps/v8/src/compiler/bytecode-graph-builder.h index 0ec8a1f473c55c..7609ec7279eda6 100644 --- a/deps/v8/src/compiler/bytecode-graph-builder.h +++ b/deps/v8/src/compiler/bytecode-graph-builder.h @@ -28,7 +28,7 @@ class BytecodeGraphBuilder { BytecodeGraphBuilder( Zone* local_zone, Handle shared, Handle feedback_vector, BailoutId osr_offset, - JSGraph* jsgraph, CallFrequency invocation_frequency, + JSGraph* jsgraph, CallFrequency& invocation_frequency, SourcePositionTable* source_positions, int inlining_id = SourcePosition::kNotInlined, JSTypeHintLowering::Flags flags = JSTypeHintLowering::kNoFlags, diff --git a/deps/v8/src/compiler/js-inlining.cc b/deps/v8/src/compiler/js-inlining.cc index b74f94fa72cdf7..abce004367e332 100644 --- a/deps/v8/src/compiler/js-inlining.cc +++ b/deps/v8/src/compiler/js-inlining.cc @@ -539,9 +539,10 @@ Reduction JSInliner::ReduceJSCall(Node* node) { if (info_->is_bailout_on_uninitialized()) { flags |= JSTypeHintLowering::kBailoutOnUninitialized; } + CallFrequency frequency = call.frequency(); BytecodeGraphBuilder graph_builder( zone(), shared_info, feedback_vector, BailoutId::None(), jsgraph(), - call.frequency(), source_positions_, inlining_id, flags, false); + frequency, source_positions_, inlining_id, flags, false); graph_builder.CreateGraph(); // Extract the inlinee start/end nodes. diff --git a/deps/v8/src/compiler/js-operator.cc b/deps/v8/src/compiler/js-operator.cc index 2a680cd6769ad7..6ea5b850c6910a 100644 --- a/deps/v8/src/compiler/js-operator.cc +++ b/deps/v8/src/compiler/js-operator.cc @@ -731,7 +731,8 @@ const Operator* JSOperatorBuilder::CallForwardVarargs(size_t arity, parameters); // parameter } -const Operator* JSOperatorBuilder::Call(size_t arity, CallFrequency frequency, +const Operator* JSOperatorBuilder::Call(size_t arity, + CallFrequency const& frequency, VectorSlotPair const& feedback, ConvertReceiverMode convert_mode) { CallParameters parameters(arity, frequency, feedback, convert_mode); @@ -751,7 +752,8 @@ const Operator* JSOperatorBuilder::CallWithArrayLike(CallFrequency frequency) { } const Operator* JSOperatorBuilder::CallWithSpread( - uint32_t arity, CallFrequency frequency, VectorSlotPair const& feedback) { + uint32_t arity, CallFrequency const& frequency, + VectorSlotPair const& feedback) { CallParameters parameters(arity, frequency, feedback, ConvertReceiverMode::kAny); return new (zone()) Operator1( // -- diff --git a/deps/v8/src/compiler/js-operator.h b/deps/v8/src/compiler/js-operator.h index 5ea288f355eeba..0bf2c589818566 100644 --- a/deps/v8/src/compiler/js-operator.h +++ b/deps/v8/src/compiler/js-operator.h @@ -192,7 +192,7 @@ CallForwardVarargsParameters const& CallForwardVarargsParametersOf( // used as a parameter by JSCall and JSCallWithSpread operators. class CallParameters final { public: - CallParameters(size_t arity, CallFrequency frequency, + CallParameters(size_t arity, CallFrequency const& frequency, VectorSlotPair const& feedback, ConvertReceiverMode convert_mode) : bit_field_(ArityField::encode(arity) | @@ -201,7 +201,7 @@ class CallParameters final { feedback_(feedback) {} size_t arity() const { return ArityField::decode(bit_field_); } - CallFrequency frequency() const { return frequency_; } + CallFrequency const& frequency() const { return frequency_; } ConvertReceiverMode convert_mode() const { return ConvertReceiverModeField::decode(bit_field_); } @@ -647,12 +647,12 @@ class V8_EXPORT_PRIVATE JSOperatorBuilder final const Operator* CallForwardVarargs(size_t arity, uint32_t start_index); const Operator* Call( - size_t arity, CallFrequency frequency = CallFrequency(), + size_t arity, CallFrequency const& frequency = CallFrequency(), VectorSlotPair const& feedback = VectorSlotPair(), ConvertReceiverMode convert_mode = ConvertReceiverMode::kAny); const Operator* CallWithArrayLike(CallFrequency frequency); const Operator* CallWithSpread( - uint32_t arity, CallFrequency frequency = CallFrequency(), + uint32_t arity, CallFrequency const& frequency = CallFrequency(), VectorSlotPair const& feedback = VectorSlotPair()); const Operator* CallRuntime(Runtime::FunctionId id); const Operator* CallRuntime(Runtime::FunctionId id, size_t arity); diff --git a/deps/v8/src/compiler/pipeline.cc b/deps/v8/src/compiler/pipeline.cc index 4b91e9fc4a22fc..e5aac506e67b60 100644 --- a/deps/v8/src/compiler/pipeline.cc +++ b/deps/v8/src/compiler/pipeline.cc @@ -890,10 +890,11 @@ struct GraphBuilderPhase { if (data->info()->is_bailout_on_uninitialized()) { flags |= JSTypeHintLowering::kBailoutOnUninitialized; } + CallFrequency frequency = CallFrequency(1.0f); BytecodeGraphBuilder graph_builder( temp_zone, data->info()->shared_info(), handle(data->info()->closure()->feedback_vector()), - data->info()->osr_offset(), data->jsgraph(), CallFrequency(1.0f), + data->info()->osr_offset(), data->jsgraph(), frequency, data->source_positions(), SourcePosition::kNotInlined, flags); graph_builder.CreateGraph(); } From 4f3c9e6aab54ace23bda9266ffb6999f05ae2009 Mon Sep 17 00:00:00 2001 From: Vasili Skurydzin Date: Mon, 29 Oct 2018 10:26:55 -0400 Subject: [PATCH 03/88] deps,v8: fix gyp build on Aix platform Floating this patch since the code does not exist upstream anymore. deps/v8/testing/gtest.gyp: Supperss -Wnonnull-compare, -Waddress warnings for deps/v8/testing/gtest project; deps/v8/src/compiler/store-store-elimination.cc, deps/v8/src/conversions.cc: Suppress unused function warnings in order to compile with newer (>4.8.5) gcc on Aix. PR-URL: https://github.com/nodejs/node/pull/23958 Reviewed-By: Refael Ackermann Reviewed-By: Michael Dawson Reviewed-By: Beth Griggs Reviewed-By: George Adams --- deps/v8/include/v8-version.h | 2 +- deps/v8/src/compiler/store-store-elimination.cc | 6 ++++++ deps/v8/src/conversions.cc | 6 ++++++ deps/v8/testing/gtest.gyp | 4 ++++ 4 files changed, 17 insertions(+), 1 deletion(-) diff --git a/deps/v8/include/v8-version.h b/deps/v8/include/v8-version.h index 40ea0af674bd0c..62c81f2ca057ad 100644 --- a/deps/v8/include/v8-version.h +++ b/deps/v8/include/v8-version.h @@ -11,7 +11,7 @@ #define V8_MAJOR_VERSION 6 #define V8_MINOR_VERSION 2 #define V8_BUILD_NUMBER 414 -#define V8_PATCH_LEVEL 74 +#define V8_PATCH_LEVEL 75 // Use 1 for candidates and 0 otherwise. // (Boolean macro values are not supported by all preprocessors.) diff --git a/deps/v8/src/compiler/store-store-elimination.cc b/deps/v8/src/compiler/store-store-elimination.cc index 71aa2110bb7808..eaa74328f09c71 100644 --- a/deps/v8/src/compiler/store-store-elimination.cc +++ b/deps/v8/src/compiler/store-store-elimination.cc @@ -251,6 +251,9 @@ void StoreStoreElimination::Run(JSGraph* js_graph, Zone* temp_zone) { } } +#if V8_OS_AIX +ALLOW_UNUSED_TYPE +#endif bool RedundantStoreFinder::IsEffectful(Node* node) { return (node->op()->EffectInputCount() >= 1); } @@ -552,6 +555,9 @@ bool UnobservableStore::operator==(const UnobservableStore other) const { return (id_ == other.id_) && (offset_ == other.offset_); } +#if V8_OS_AIX +ALLOW_UNUSED_TYPE +#endif bool UnobservableStore::operator!=(const UnobservableStore other) const { return !(*this == other); } diff --git a/deps/v8/src/conversions.cc b/deps/v8/src/conversions.cc index 8956a261688b1b..1071c1f2a1b312 100644 --- a/deps/v8/src/conversions.cc +++ b/deps/v8/src/conversions.cc @@ -53,11 +53,17 @@ class StringCharacterStreamIterator { }; +#if V8_OS_AIX +ALLOW_UNUSED_TYPE +#endif StringCharacterStreamIterator::StringCharacterStreamIterator( StringCharacterStream* stream) : stream_(stream) { ++(*this); } +#if V8_OS_AIX +ALLOW_UNUSED_TYPE +#endif uint16_t StringCharacterStreamIterator::operator*() const { return current_; } diff --git a/deps/v8/testing/gtest.gyp b/deps/v8/testing/gtest.gyp index a94ee884fe9f51..0eb93a05b591fd 100644 --- a/deps/v8/testing/gtest.gyp +++ b/deps/v8/testing/gtest.gyp @@ -96,6 +96,10 @@ }], ], }], + ['OS=="aix"', { + 'cflags': [ '-Wno-nonnull-compare', + '-Wno-address' ], + }], ], 'msvs_disabled_warnings': [4800], }, From e2d2ce6706ee853b2da2d0e7cbdc76db93fa2992 Mon Sep 17 00:00:00 2001 From: James M Snell Date: Thu, 18 Oct 2018 18:02:13 -0700 Subject: [PATCH 04/88] doc: remove reference to sslv3 in tls.md PR-URL: https://github.com/nodejs/node/pull/23745 Fixes: https://github.com/nodejs/node/issues/9822 Reviewed-By: Luigi Pinca Reviewed-By: Ruben Bridgewater Reviewed-By: Trivikram Kamat --- doc/api/tls.md | 1 - 1 file changed, 1 deletion(-) diff --git a/doc/api/tls.md b/doc/api/tls.md index ff81999b1d8b74..1c8de9e725c296 100644 --- a/doc/api/tls.md +++ b/doc/api/tls.md @@ -673,7 +673,6 @@ be returned for server sockets or disconnected client sockets. Example responses include: -* `SSLv3` * `TLSv1` * `TLSv1.1` * `TLSv1.2` From 544e64d68dd1d9098602dbdaba1cf595880fc253 Mon Sep 17 00:00:00 2001 From: Elian Gutierrez Date: Sat, 20 Oct 2018 11:12:46 -0400 Subject: [PATCH 05/88] test: fix assertion arguments order MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/23787 Reviewed-By: Denys Otrishko Reviewed-By: Michaël Zasso Reviewed-By: Luigi Pinca Reviewed-By: Colin Ihrig --- test/parallel/test-http-remove-header-stays-removed.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/parallel/test-http-remove-header-stays-removed.js b/test/parallel/test-http-remove-header-stays-removed.js index 6617a1775441b7..337fcd3becd177 100644 --- a/test/parallel/test-http-remove-header-stays-removed.js +++ b/test/parallel/test-http-remove-header-stays-removed.js @@ -44,13 +44,13 @@ const server = http.createServer(function(request, response) { let response = ''; process.on('exit', function() { - assert.strictEqual('beep boop\n', response); + assert.strictEqual(response, 'beep boop\n'); console.log('ok'); }); server.listen(0, function() { http.get({ port: this.address().port }, function(res) { - assert.strictEqual(200, res.statusCode); + assert.strictEqual(res.statusCode, 200); assert.deepStrictEqual(res.headers, { date: 'coffee o clock' }); res.setEncoding('ascii'); From 73d19b15160a39f40ef725ac353066079cd7b5df Mon Sep 17 00:00:00 2001 From: Sam Roberts Date: Mon, 15 Oct 2018 15:15:26 -0700 Subject: [PATCH 06/88] test: ensure openssl version prints correctly MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/23678 Reviewed-By: Anna Henningsen Reviewed-By: James M Snell Reviewed-By: Refael Ackermann Reviewed-By: Richard Lau Reviewed-By: Colin Ihrig Reviewed-By: Gireesh Punathil Reviewed-By: Sakthipriyan Vairamani Reviewed-By: Tobias Nießen Reviewed-By: Ben Noordhuis Reviewed-By: Tiancheng "Timothy" Gu --- test/parallel/test-process-versions.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/parallel/test-process-versions.js b/test/parallel/test-process-versions.js index 29325d531cff27..18484bdf4f155e 100644 --- a/test/parallel/test-process-versions.js +++ b/test/parallel/test-process-versions.js @@ -33,6 +33,10 @@ assert(/^\d+\.\d+\.\d+(?:\.\d+)?(?: \(candidate\))?$/ .test(process.versions.v8)); assert(/^\d+$/.test(process.versions.modules)); +if (common.hasCrypto) { + assert(/^\d+\.\d+\.\d+[a-z]?$/.test(process.versions.openssl)); +} + for (let i = 0; i < expected_keys.length; i++) { const key = expected_keys[i]; const descriptor = Object.getOwnPropertyDescriptor(process.versions, key); From 0f98c4926a620379cff8dbee7cd4619c9f30f4a1 Mon Sep 17 00:00:00 2001 From: Thomas GENTILHOMME Date: Fri, 19 Oct 2018 23:18:30 +0200 Subject: [PATCH 07/88] test: fix strictEqual() arguments order MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/23771 Reviewed-By: James M Snell Reviewed-By: Trivikram Kamat Reviewed-By: Michaël Zasso Reviewed-By: Colin Ihrig --- test/parallel/test-http-parser-bad-ref.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/parallel/test-http-parser-bad-ref.js b/test/parallel/test-http-parser-bad-ref.js index 6e9fb2f9ac6033..c9827b16c77d57 100644 --- a/test/parallel/test-http-parser-bad-ref.js +++ b/test/parallel/test-http-parser-bad-ref.js @@ -81,7 +81,7 @@ demoBug('POST /1/22 HTTP/1.1\r\n' + 'pong'); process.on('exit', function() { - assert.strictEqual(2, headersComplete); - assert.strictEqual(2, messagesComplete); + assert.strictEqual(headersComplete, 2); + assert.strictEqual(messagesComplete, 2); console.log('done!'); }); From ac9134677688643aa350931a0849e9aa60a67656 Mon Sep 17 00:00:00 2001 From: Romain Lanz Date: Fri, 19 Oct 2018 23:23:44 +0200 Subject: [PATCH 08/88] test: fix strictEqual() argument order MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/23768 Reviewed-By: Colin Ihrig Reviewed-By: James M Snell Reviewed-By: Trivikram Kamat Reviewed-By: Michaël Zasso --- test/parallel/test-http-write-empty-string.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/parallel/test-http-write-empty-string.js b/test/parallel/test-http-write-empty-string.js index 35a7aca61b4030..d4ab070667ef6d 100644 --- a/test/parallel/test-http-write-empty-string.js +++ b/test/parallel/test-http-write-empty-string.js @@ -42,13 +42,13 @@ server.listen(0, common.mustCall(function() { http.get({ port: this.address().port }, common.mustCall(function(res) { let response = ''; - assert.strictEqual(200, res.statusCode); + assert.strictEqual(res.statusCode, 200); res.setEncoding('ascii'); res.on('data', function(chunk) { response += chunk; }); res.on('end', common.mustCall(function() { - assert.strictEqual('1\n2\n3\n', response); + assert.strictEqual(response, '1\n2\n3\n'); })); })); })); From e7a573a9e287aece608f05fecde900ff82efe2cf Mon Sep 17 00:00:00 2001 From: Bartosz Sosnowski Date: Tue, 16 Oct 2018 15:54:02 +0200 Subject: [PATCH 09/88] test: fix test-require-symlink on Windows Creating directory symlinks on Windows require 'dir' parameter to be provided. Fixes: https://github.com/nodejs/node/issues/23596 PR-URL: https://github.com/nodejs/node/pull/23691 Reviewed-By: Colin Ihrig Reviewed-By: Refael Ackermann Reviewed-By: James M Snell --- test/parallel/test-require-symlink.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/parallel/test-require-symlink.js b/test/parallel/test-require-symlink.js index d245c21dd1fdb4..fa604aaf56bd76 100644 --- a/test/parallel/test-require-symlink.js +++ b/test/parallel/test-require-symlink.js @@ -58,7 +58,7 @@ const linkScriptTarget = path.join(dirName, 'symlinked.js'); test(); function test() { - fs.symlinkSync(linkTarget, linkDir); + fs.symlinkSync(linkTarget, linkDir, 'dir'); fs.symlinkSync(linkScriptTarget, linkScript); // load symlinked-module From 32ae851710a30f740aed0522b45fdd9d872c8db6 Mon Sep 17 00:00:00 2001 From: James M Snell Date: Thu, 18 Oct 2018 18:12:59 -0700 Subject: [PATCH 10/88] doc: document that addMembership must be called once in a cluster Fixes: https://github.com/nodejs/node/issues/12572 Refs: https://github.com/nodejs/node/pull/16240 PR-URL: https://github.com/nodejs/node/pull/23746 Reviewed-By: Refael Ackermann Reviewed-By: Luigi Pinca Reviewed-By: Trivikram Kamat --- doc/api/dgram.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/doc/api/dgram.md b/doc/api/dgram.md index 652e2baadcdf31..38500359f6b603 100644 --- a/doc/api/dgram.md +++ b/doc/api/dgram.md @@ -95,6 +95,24 @@ Tells the kernel to join a multicast group at the given `multicastAddress` and one interface and will add membership to it. To add membership to every available interface, call `addMembership` multiple times, once per interface. +When sharing a UDP socket across multiple `cluster` workers, the +`socket.addMembership()` function must be called only once or an +`EADDRINUSE` error will occur: + +```js +const cluster = require('cluster'); +const dgram = require('dgram'); +if (cluster.isMaster) { + cluster.fork(); // Works ok. + cluster.fork(); // Fails with EADDRINUSE. +} else { + const s = dgram.createSocket('udp4'); + s.bind(1234, () => { + s.addMembership('224.0.0.114'); + }); +} +``` + ### socket.address() + +* {boolean} + +The `message.complete` property will be `true` if a complete HTTP message has +been received and successfully parsed. + +This property is particularly useful as a means of determining if a client or +server fully transmitted a message before a connection was terminated: + +```js +const req = http.request({ + host: '127.0.0.1', + port: 8080, + method: 'POST' +}, (res) => { + res.resume(); + res.on('end', () => { + if (!res.complete) + console.error( + 'The connection was terminated while the message was still being sent'); + }); +}); +``` + ### message.destroy([error]) +* {Object} + If the Node.js process was spawned with an IPC channel (see the [Child Process][] documentation), the `process.channel` property is a reference to the IPC channel. If no IPC channel exists, this @@ -884,7 +886,7 @@ console.log(process.env.test); added: v0.7.7 --> -* {Object} +* {Array} The `process.execArgv` property returns the set of Node.js-specific command-line options passed when the Node.js process was launched. These options do not @@ -1210,6 +1212,8 @@ the debugger, see [Signal Events][]. added: v0.1.17 --> +* {Object} + The `process.mainModule` property provides an alternative way of retrieving [`require.main`][]. The difference is that if the main module changes at runtime, [`require.main`][] may still refer to the original main module in @@ -1439,6 +1443,8 @@ changes: description: The `lts` property is now supported. --> +* {Object} + The `process.release` property returns an Object containing metadata related to the current release, including URLs for the source tarball and headers-only tarball. From 8338700d05a911c0784e833381f1c727bed4f281 Mon Sep 17 00:00:00 2001 From: juggernaut451 Date: Fri, 16 Feb 2018 00:01:52 +0530 Subject: [PATCH 60/88] doc: add directory structure in writing-tests.md PR-URL: https://github.com/nodejs/node/pull/18802 Fixes: https://github.com/nodejs/node/issues/18774 Reviewed-By: Joyee Cheung Reviewed-By: James M Snell Reviewed-By: Matheus Marchini Reviewed-By: Gibson Fahnestock Reviewed-By: Franziska Hinkelmann Reviewed-By: Shingo Inoue Reviewed-By: Trivikram Kamat --- doc/guides/writing-tests.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/doc/guides/writing-tests.md b/doc/guides/writing-tests.md index ec9398dcb928ec..b5f641289f77b6 100644 --- a/doc/guides/writing-tests.md +++ b/doc/guides/writing-tests.md @@ -18,6 +18,13 @@ Add tests when: - Fixing regressions and bugs. - Expanding test coverage. +## Test directory structure + +See [directory structure overview][] for outline of existing test & locations. +When deciding on whether to expand an existing test file or create a new one, +consider going through the files related to the subsystem. +For example, look for `test-streams` when writing a test for `lib/streams.js`. + ## Test structure Let's analyze this basic test from the Node.js test suite: @@ -376,3 +383,4 @@ will depend on what is being tested if this is required or not. [all maintained branches]: https://github.com/nodejs/lts [node.green]: http://node.green/ [test fixture]: https://github.com/google/googletest/blob/master/googletest/docs/Primer.md#test-fixtures-using-the-same-data-configuration-for-multiple-tests +[directory structure overview]: https://github.com/nodejs/node/blob/master/test/README.md#test-directories From c3ecf05b018da2600d93dc9a4e674ad09ef8e289 Mon Sep 17 00:00:00 2001 From: Ayush Gupta Date: Tue, 13 Mar 2018 20:42:40 +0530 Subject: [PATCH 61/88] doc: document `make docopen` Documented `make docopen` as a way to read documentation in the browser. PR-URL: https://github.com/nodejs/node/pull/19321 Reviewed-By: Anna Henningsen Reviewed-By: Vse Mozhet Byt Reviewed-By: Luigi Pinca Reviewed-By: Yuta Hiroto Reviewed-By: James M Snell Reviewed-By: Trivikram Kamat --- BUILDING.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/BUILDING.md b/BUILDING.md index 3f95f32d72d9b6..08276975ae453b 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -205,6 +205,15 @@ To read the documentation: $ man doc/node.1 ``` +If you prefer to read the documentation in a browser, +run the following after `make doc` is finished: + +```console +$ make docopen +``` + +This will open a browser with the documentation. + To test if Node.js was built correctly: ```console From ea1fda62286615e2d153915f99377684c50f67f4 Mon Sep 17 00:00:00 2001 From: "davis.okoth@kemsa.co.ke" Date: Thu, 22 Mar 2018 22:04:38 +0300 Subject: [PATCH 62/88] test: remove third param from assert.strictEqual MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Removing third argument in calls to assert.strictEqual() so that the values of the first two arguments are shown instead as this is more useful for debugging. Refs: https://nodejs.org/api/assert.html#assert_assert_strictequal_actual_expected_message PR-URL: https://github.com/nodejs/node/pull/19536 Reviewed-By: Colin Ihrig Reviewed-By: Luigi Pinca Reviewed-By: Rich Trott Reviewed-By: Richard Lau Reviewed-By: James M Snell Reviewed-By: Trivikram Kamat Reviewed-By: Franziska Hinkelmann Reviewed-By: Tobias Nießen --- test/parallel/test-fs-mkdir-rmdir.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/parallel/test-fs-mkdir-rmdir.js b/test/parallel/test-fs-mkdir-rmdir.js index 865a5dba951555..6ab2bfcd866837 100644 --- a/test/parallel/test-fs-mkdir-rmdir.js +++ b/test/parallel/test-fs-mkdir-rmdir.js @@ -31,8 +31,8 @@ fs.mkdir(d, 0o666, common.mustCall(function(err) { fs.mkdir(d, 0o666, common.mustCall(function(err) { assert.ok(err, 'got no error'); assert.ok(/^EEXIST/.test(err.message), 'got no EEXIST message'); - assert.strictEqual(err.code, 'EEXIST', 'got no EEXIST code'); - assert.strictEqual(err.path, d, 'got no proper path for EEXIST'); + assert.strictEqual(err.code, 'EEXIST'); + assert.strictEqual(err.path, d); fs.rmdir(d, assert.ifError); })); From 9d249bf6d560d3fa9452a2639f84de485a8451d3 Mon Sep 17 00:00:00 2001 From: Beth Griggs Date: Mon, 26 Mar 2018 12:36:46 +0100 Subject: [PATCH 63/88] doc: add BethGriggs to collaborators PR-URL: https://github.com/nodejs/node/pull/19610 Reviewed-By: Anna Henningsen Reviewed-By: Gibson Fahnestock Reviewed-By: Gireesh Punathil Reviewed-By: Colin Ihrig Reviewed-By: Yuta Hiroto Reviewed-By: Ruben Bridgewater Reviewed-By: Richard Lau Reviewed-By: Vse Mozhet Byt Reviewed-By: Joyee Cheung --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 37a94db558b931..81c024a42fbca5 100644 --- a/README.md +++ b/README.md @@ -309,6 +309,8 @@ For more information about the governance of the Node.js project, see **Bryan English** <bryan@bryanenglish.com> (he/him) * [benjamingr](https://github.com/benjamingr) - **Benjamin Gruenbaum** <benjamingr@gmail.com> +* [BethGriggs](https://github.com/BethGriggs) - +**Beth Griggs** <Bethany.Griggs@uk.ibm.com> (she/her) * [bmeck](https://github.com/bmeck) - **Bradley Farias** <bradley.meck@gmail.com> * [bmeurer](https://github.com/bmeurer) - From e48cc3c4039ea3aab62935d34bff419a6688d7a2 Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Fri, 23 Mar 2018 12:54:48 +0100 Subject: [PATCH 64/88] doc: remove confusing note about child process stdio MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It’s not obvious what the paragraph is supposed to say. In particular, whether and what kind of buffering mechanism a process uses for its stdio streams does not affect that, in general, no guarantees can be made about when it consumes data that was sent to it. PR-URL: https://github.com/nodejs/node/pull/19552 Reviewed-By: Rich Trott Reviewed-By: Trivikram Kamat Reviewed-By: James M Snell --- doc/api/child_process.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/doc/api/child_process.md b/doc/api/child_process.md index cf0ba5a75bab93..4873d4681a7755 100755 --- a/doc/api/child_process.md +++ b/doc/api/child_process.md @@ -32,10 +32,6 @@ stdout in excess of that limit without the output being captured, the child process will block waiting for the pipe buffer to accept more data. This is identical to the behavior of pipes in the shell. Use the `{ stdio: 'ignore' }` option if the output will not be consumed. -It is possible to stream data through these pipes in a non-blocking way. Note, -however, that some programs use line-buffered I/O internally. While that does -not affect Node.js, it can mean that data sent to the child process may not be -immediately consumed. The [`child_process.spawn()`][] method spawns the child process asynchronously, without blocking the Node.js event loop. The [`child_process.spawnSync()`][] From bf95392e86fec7c804ab7ce3c9fcb968e9bf1601 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Mon, 26 Mar 2018 16:06:15 -0700 Subject: [PATCH 65/88] doc: improve assert legacy text This changes a sentence fragment into a full sentence and provides a few other minor improvements. PR-URL: https://github.com/nodejs/node/pull/19622 Reviewed-By: Vse Mozhet Byt Reviewed-By: Shingo Inoue Reviewed-By: Ruben Bridgewater --- doc/api/assert.md | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/doc/api/assert.md b/doc/api/assert.md index 1646145a19bb2c..5df4edbf81dce4 100644 --- a/doc/api/assert.md +++ b/doc/api/assert.md @@ -37,8 +37,8 @@ const assert = require('assert').strict; > Stability: 0 - Deprecated: Use strict mode instead. When accessing `assert` directly instead of using the `strict` property, the -[Abstract Equality Comparison][] will be used for any function without a -"strict" in its name (e.g. [`assert.deepEqual()`][]). +[Abstract Equality Comparison][] will be used for any function without "strict" +in its name, such as [`assert.deepEqual()`][]. It can be accessed using: @@ -47,11 +47,9 @@ const assert = require('assert'); ``` It is recommended to use the [`strict mode`][] instead as the -[Abstract Equality Comparison][] can often have surprising results. Especially -in case of [`assert.deepEqual()`][] as the used comparison rules there are very -lax. - -E.g. +[Abstract Equality Comparison][] can often have surprising results. This is +especially true for [`assert.deepEqual()`][], where the comparison rules are +lax: ```js // WARNING: This does not throw an AssertionError! From 06daf5276f5f7750a4a2133f281a29c687df9f7a Mon Sep 17 00:00:00 2001 From: Thomas Hunter II Date: Mon, 26 Mar 2018 15:10:45 -0700 Subject: [PATCH 66/88] doc: remove use of "random port" re dgram send PR-URL: https://github.com/nodejs/node/pull/19620 Reviewed-By: Rich Trott Reviewed-By: Vse Mozhet Byt Reviewed-By: Anna Henningsen --- doc/api/dgram.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/api/dgram.md b/doc/api/dgram.md index 353013da3c8861..38d0ac988630a2 100644 --- a/doc/api/dgram.md +++ b/doc/api/dgram.md @@ -337,7 +337,7 @@ the error is emitted as an `'error'` event on the `socket` object. Offset and length are optional but both *must* be set if either are used. They are supported only when the first argument is a `Buffer` or `Uint8Array`. -Example of sending a UDP packet to a random port on `localhost`; +Example of sending a UDP packet to a port on `localhost`; ```js const dgram = require('dgram'); @@ -348,8 +348,8 @@ client.send(message, 41234, 'localhost', (err) => { }); ``` -Example of sending a UDP packet composed of multiple buffers to a random port -on `127.0.0.1`; +Example of sending a UDP packet composed of multiple buffers to a port on +`127.0.0.1`; ```js const dgram = require('dgram'); From 0cbe813e904dd04c0976ea535cfb710bb87b9e12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20Nie=C3=9Fen?= Date: Sun, 25 Mar 2018 13:12:38 +0200 Subject: [PATCH 67/88] test: update link according to NIST bibliography According to NIST SP 800 38D, this is the document the link orginally pointed to. Fixes: https://github.com/nodejs/node/issues/17619 PR-URL: https://github.com/nodejs/node/pull/19593 Reviewed-By: Weijia Wang Reviewed-By: Colin Ihrig Reviewed-By: Trivikram Kamat Reviewed-By: Luigi Pinca Reviewed-By: Richard Lau Reviewed-By: Sakthipriyan Vairamani --- test/parallel/test-crypto-authenticated.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/test/parallel/test-crypto-authenticated.js b/test/parallel/test-crypto-authenticated.js index 221009cb4a7a25..6b41b2b3557419 100644 --- a/test/parallel/test-crypto-authenticated.js +++ b/test/parallel/test-crypto-authenticated.js @@ -68,9 +68,8 @@ const TEST_CASES = [ ct: 'dda53a4059aa17b88756984995f7bba3c636cc44', tag: 'd2a35e5c611e5e3d2258360241c5b045', tampered: false }, - // Following test cases are from - // http://csrc.nist.gov/groups/ST/toolkit/BCM/documents/ - // proposedmodes/gcm/gcm-revised-spec.pdf + // Following test cases are from "The Galois/Counter Mode of Operation (GCM)" + // by D. McGrew and J. Viega, published by NIST. // Test case 1 { algo: 'aes-128-gcm', From 17e84217c724781a476325dd7cdf10d3bd4d0fc4 Mon Sep 17 00:00:00 2001 From: Kenji Okamoto Date: Tue, 27 Mar 2018 11:16:21 -0700 Subject: [PATCH 68/88] doc: fix grammar error in process.md PR-URL: https://github.com/nodejs/node/pull/19641 Reviewed-By: Colin Ihrig Reviewed-By: Myles Borins Reviewed-By: Vse Mozhet Byt Reviewed-By: Luigi Pinca --- doc/api/process.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/process.md b/doc/api/process.md index d6cd5bcb70d637..af718446b529f6 100644 --- a/doc/api/process.md +++ b/doc/api/process.md @@ -212,7 +212,7 @@ changes: description: Not handling Promise rejections has been deprecated. - version: v6.6.0 pr-url: https://github.com/nodejs/node/pull/8223 - description: Unhandled Promise rejections have been will now emit + description: Unhandled Promise rejections will now emit a process warning. --> From 8afbd5ce41a05a68eaa879699160741435fe0be0 Mon Sep 17 00:00:00 2001 From: wangzengdi Date: Thu, 29 Mar 2018 09:38:17 +0800 Subject: [PATCH 69/88] lib: fix a typo in lib/timers "read through" PR-URL: https://github.com/nodejs/node/pull/19666 Reviewed-By: Vse Mozhet Byt Reviewed-By: Trivikram Kamat --- lib/timers.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/timers.js b/lib/timers.js index e6655c2f527349..5631878dc24039 100644 --- a/lib/timers.js +++ b/lib/timers.js @@ -66,7 +66,7 @@ const TIMEOUT_MAX = 2147483647; // 2^31-1 // Therefore, it is very important that the timers implementation is performant // and efficient. // -// Note: It is suggested you first read though the lib/internal/linkedlist.js +// Note: It is suggested you first read through the lib/internal/linkedlist.js // linked list implementation, since timers depend on it extensively. It can be // somewhat counter-intuitive at first, as it is not actually a class. Instead, // it is a set of helpers that operate on an existing object. From 8a0ecf4360784e10f556518151bcbfbd605bf99e Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Mon, 26 Mar 2018 21:08:24 -0700 Subject: [PATCH 70/88] test: refactor test-http-expect-continue Use common.mustCall() where appropriate. Remove some logic that is not required when common.mustCall() is used (incrementor/decrementor to make sure everything is called the same number of times). PR-URL: https://github.com/nodejs/node/pull/19625 Reviewed-By: Gireesh Punathil Reviewed-By: Trivikram Kamat Reviewed-By: Colin Ihrig Reviewed-By: James M Snell --- test/parallel/test-http-expect-continue.js | 47 +++++++++------------- 1 file changed, 20 insertions(+), 27 deletions(-) diff --git a/test/parallel/test-http-expect-continue.js b/test/parallel/test-http-expect-continue.js index 7f97ce35927e99..7d910f0778e88a 100644 --- a/test/parallel/test-http-expect-continue.js +++ b/test/parallel/test-http-expect-continue.js @@ -20,70 +20,63 @@ // USE OR OTHER DEALINGS IN THE SOFTWARE. 'use strict'; -require('../common'); +const common = require('../common'); const assert = require('assert'); const http = require('http'); -let outstanding_reqs = 0; const test_req_body = 'some stuff...\n'; const test_res_body = 'other stuff!\n'; let sent_continue = false; let got_continue = false; -function handler(req, res) { - assert.strictEqual(sent_continue, true, - 'Full response sent before 100 Continue'); +const handler = common.mustCall((req, res) => { + assert.ok(sent_continue, 'Full response sent before 100 Continue'); console.error('Server sending full response...'); res.writeHead(200, { 'Content-Type': 'text/plain', 'ABCD': '1' }); res.end(test_res_body); -} +}); -const server = http.createServer(handler); -server.on('checkContinue', function(req, res) { +const server = http.createServer(); +server.on('checkContinue', common.mustCall((req, res) => { console.error('Server got Expect: 100-continue...'); res.writeContinue(); sent_continue = true; setTimeout(function() { handler(req, res); }, 100); -}); +})); server.listen(0); -server.on('listening', function() { +server.on('listening', common.mustCall(() => { const req = http.request({ - port: this.address().port, + port: server.address().port, method: 'POST', path: '/world', headers: { 'Expect': '100-continue' } }); console.error('Client sending request...'); - outstanding_reqs++; let body = ''; - req.on('continue', function() { + req.on('continue', common.mustCall(() => { console.error('Client got 100 Continue...'); got_continue = true; req.end(test_req_body); - }); - req.on('response', function(res) { - assert.strictEqual(got_continue, true, - 'Full response received before 100 Continue'); + })); + req.on('response', common.mustCall((res) => { + assert.ok(got_continue, 'Full response received before 100 Continue'); assert.strictEqual(200, res.statusCode, `Final status code was ${res.statusCode}, not 200.`); res.setEncoding('utf8'); res.on('data', function(chunk) { body += chunk; }); - res.on('end', function() { + res.on('end', common.mustCall(() => { console.error('Got full response.'); - assert.strictEqual(body, test_res_body, 'Response body doesn\'t match.'); + assert.strictEqual(body, test_res_body); assert.ok('abcd' in res.headers, 'Response headers missing.'); - outstanding_reqs--; - if (outstanding_reqs === 0) { - server.close(); - process.exit(); - } - }); - }); -}); + server.close(); + process.exit(); + })); + })); +})); From a62df1b379082465389e20af9a757d5edc7cc84f Mon Sep 17 00:00:00 2001 From: Luigi Pinca Date: Tue, 27 Mar 2018 19:35:03 +0200 Subject: [PATCH 71/88] test: refactor test-net-dns-error - Use `common.mustCall()` and `common.mustNotCall()`. - Use ternary operator. PR-URL: https://github.com/nodejs/node/pull/19640 Reviewed-By: Richard Lau Reviewed-By: Rich Trott Reviewed-By: Trivikram Kamat Reviewed-By: Colin Ihrig Reviewed-By: James M Snell --- test/parallel/test-net-dns-error.js | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/test/parallel/test-net-dns-error.js b/test/parallel/test-net-dns-error.js index a5ae415592fed4..0d943bf6cd54a0 100644 --- a/test/parallel/test-net-dns-error.js +++ b/test/parallel/test-net-dns-error.js @@ -21,27 +21,20 @@ 'use strict'; const common = require('../common'); -const assert = require('assert'); +const assert = require('assert'); const net = require('net'); const host = '*'.repeat(256); +const errCode = common.isOpenBSD ? 'EAI_FAIL' : 'ENOTFOUND'; -let errCode = 'ENOTFOUND'; -if (common.isOpenBSD) - errCode = 'EAI_FAIL'; - -function do_not_call() { - throw new Error('This function should not have been called.'); -} - -const socket = net.connect(42, host, do_not_call); +const socket = net.connect(42, host, common.mustNotCall()); socket.on('error', common.mustCall(function(err) { assert.strictEqual(err.code, errCode); })); -socket.on('lookup', function(err, ip, type) { +socket.on('lookup', common.mustCall(function(err, ip, type) { assert(err instanceof Error); assert.strictEqual(err.code, errCode); assert.strictEqual(ip, undefined); assert.strictEqual(type, undefined); -}); +})); From 8a546e822d0e8f667c04df591f038453a6d2ca5b Mon Sep 17 00:00:00 2001 From: jaspal-yupana Date: Wed, 28 Mar 2018 17:15:59 +0100 Subject: [PATCH 72/88] test: removed default message from assert.strictEqual Use the `assert.strictEqual()` default message instead of a static message to include the actual and expected value. PR-URL: https://github.com/nodejs/node/pull/19660 Reviewed-By: Trivikram Kamat Reviewed-By: Colin Ihrig Reviewed-By: Ruben Bridgewater Reviewed-By: Matteo Collina Reviewed-By: Tiancheng "Timothy" Gu Reviewed-By: Rich Trott Reviewed-By: James M Snell --- test/parallel/test-net-server-pause-on-connect.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/test/parallel/test-net-server-pause-on-connect.js b/test/parallel/test-net-server-pause-on-connect.js index 84cc91d56c3b08..59c39e8816cc5c 100644 --- a/test/parallel/test-net-server-pause-on-connect.js +++ b/test/parallel/test-net-server-pause-on-connect.js @@ -34,7 +34,7 @@ const server1ConnHandler = (socket) => { assert.fail('data event should not have happened yet'); } - assert.strictEqual(data.toString(), msg, 'invalid data received'); + assert.strictEqual(data.toString(), msg); socket.end(); server1.close(); }); @@ -46,12 +46,11 @@ const server1 = net.createServer({ pauseOnConnect: true }, server1ConnHandler); const server2ConnHandler = (socket) => { socket.on('data', function(data) { - assert.strictEqual(data.toString(), msg, 'invalid data received'); + assert.strictEqual(data.toString(), msg); socket.end(); server2.close(); - assert.strictEqual(server1Sock.bytesRead, 0, - 'no data should have been read yet'); + assert.strictEqual(server1Sock.bytesRead, 0); server1Sock.resume(); stopped = false; }); From 3ca10faf00e48fd922416e0a32ffc605df5f1d89 Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Tue, 27 Mar 2018 14:48:02 +0200 Subject: [PATCH 73/88] test: use createReadStream instead of ReadStream This commit updates test-fs-read-stream to use fs.createReadStream instead of using fs.ReadStream. All other places in this test use the former. PR-URL: https://github.com/nodejs/node/pull/19636 Reviewed-By: Colin Ihrig Reviewed-By: Luigi Pinca Reviewed-By: Trivikram Kamat Reviewed-By: Weijia Wang Reviewed-By: James M Snell --- test/parallel/test-fs-read-stream.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/parallel/test-fs-read-stream.js b/test/parallel/test-fs-read-stream.js index 2600f74b5452cb..8527b86925e4f4 100644 --- a/test/parallel/test-fs-read-stream.js +++ b/test/parallel/test-fs-read-stream.js @@ -34,7 +34,7 @@ const rangeFile = fixtures.path('x.txt'); let paused = false; let bytesRead = 0; - const file = fs.ReadStream(fn); + const file = fs.createReadStream(fn); const fileSize = fs.statSync(fn).size; assert.strictEqual(file.bytesRead, 0); From bd9cc92e8d0267b58492ea4b83d5b62876bb0cf2 Mon Sep 17 00:00:00 2001 From: Arian Santrach Date: Fri, 30 Mar 2018 21:13:51 +0200 Subject: [PATCH 74/88] test: remove 3rd argument from assert.strictEqual If there is an AssertionError, the string literal is printed and not the value of `r`. For debugging purposes, it is good to know if `r` is false or null or something else. PR-URL: https://github.com/nodejs/node/pull/19707 Reviewed-By: Rich Trott Reviewed-By: Trivikram Kamat Reviewed-By: Colin Ihrig --- test/parallel/test-http-res-write-after-end.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/parallel/test-http-res-write-after-end.js b/test/parallel/test-http-res-write-after-end.js index 32c6cf2e082668..523a037bcb2b9f 100644 --- a/test/parallel/test-http-res-write-after-end.js +++ b/test/parallel/test-http-res-write-after-end.js @@ -33,7 +33,8 @@ const server = http.Server(common.mustCall(function(req, res) { res.end(); const r = res.write('This should raise an error.'); - assert.strictEqual(r, true, 'write after end should return true'); + // write after end should return true + assert.strictEqual(r, true); })); server.listen(0, function() { From 1bda58289a1256b154e6ae15db23db83a3e6d130 Mon Sep 17 00:00:00 2001 From: Ujjwal Sharma Date: Thu, 29 Mar 2018 08:18:03 +0530 Subject: [PATCH 75/88] test: rename regression tests more expressively - Rename test-fs-truncate-GH-6233 to test-fs-truncate-clear-file-zero - Rename test-process-exit-GH-12322 to test-process-exit-handler PR-URL: https://github.com/nodejs/node/pull/19668 Refs: https://github.com/nodejs/node/issues/19105 Reviewed-By: Gireesh Punathil Reviewed-By: Luigi Pinca Reviewed-By: James M Snell --- ...js => test-fs-truncate-clear-file-zero.js} | 20 +++++++++++++------ test/parallel/test-process-exit-GH-12322.js | 7 ------- test/parallel/test-process-exit-handler.js | 11 ++++++++++ 3 files changed, 25 insertions(+), 13 deletions(-) rename test/parallel/{test-fs-truncate-GH-6233.js => test-fs-truncate-clear-file-zero.js} (81%) delete mode 100644 test/parallel/test-process-exit-GH-12322.js create mode 100644 test/parallel/test-process-exit-handler.js diff --git a/test/parallel/test-fs-truncate-GH-6233.js b/test/parallel/test-fs-truncate-clear-file-zero.js similarity index 81% rename from test/parallel/test-fs-truncate-GH-6233.js rename to test/parallel/test-fs-truncate-clear-file-zero.js index 87663c63616ffa..4f3dce90995d06 100644 --- a/test/parallel/test-fs-truncate-GH-6233.js +++ b/test/parallel/test-fs-truncate-clear-file-zero.js @@ -21,11 +21,15 @@ 'use strict'; const common = require('../common'); +const tmpdir = require('../common/tmpdir'); + +// This test ensures that `fs.truncate` opens the file with `r+` and not `w`, +// which had earlier resulted in the target file's content getting zeroed out. +// https://github.com/nodejs/node-v0.x-archive/issues/6233 + const assert = require('assert'); const fs = require('fs'); -const tmpdir = require('../common/tmpdir'); - const filename = `${tmpdir.path}/truncate-file.txt`; tmpdir.refresh(); @@ -42,8 +46,12 @@ tmpdir.refresh(); { fs.writeFileSync(filename, '0123456789'); assert.strictEqual(fs.readFileSync(filename).toString(), '0123456789'); - fs.truncate(filename, 5, common.mustCall(function(err) { - assert.ifError(err); - assert.strictEqual(fs.readFileSync(filename).toString(), '01234'); - })); + fs.truncate( + filename, + 5, + common.mustCall(function(err) { + assert.ifError(err); + assert.strictEqual(fs.readFileSync(filename).toString(), '01234'); + }) + ); } diff --git a/test/parallel/test-process-exit-GH-12322.js b/test/parallel/test-process-exit-GH-12322.js deleted file mode 100644 index 890dfd4df7bff4..00000000000000 --- a/test/parallel/test-process-exit-GH-12322.js +++ /dev/null @@ -1,7 +0,0 @@ -'use strict'; -require('../common'); - -process.on('exit', () => { - setTimeout(process.abort, 0); // Should not run. - for (const start = Date.now(); Date.now() - start < 10; /* Empty. */); -}); diff --git a/test/parallel/test-process-exit-handler.js b/test/parallel/test-process-exit-handler.js new file mode 100644 index 00000000000000..22d84f34349b73 --- /dev/null +++ b/test/parallel/test-process-exit-handler.js @@ -0,0 +1,11 @@ +'use strict'; +require('../common'); + +// This test ensures that no asynchronous operations are performed in the 'exit' +// handler. +// https://github.com/nodejs/node/issues/12322 + +process.on('exit', () => { + setTimeout(process.abort, 0); // Should not run. + for (const start = Date.now(); Date.now() - start < 10;); +}); From 216e7da8c518886a97819bfaa9db5b574732d318 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Thu, 29 Mar 2018 22:50:52 -0700 Subject: [PATCH 76/88] doc: do not identify string as "JavaScript string" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A parameter that is explicitly identified as a string does not need to be further specified in the text as a "JavaScript string". Remove the type altogether as it is indicated in the argument description. PR-URL: https://github.com/nodejs/node/pull/19689 Reviewed-By: Tiancheng "Timothy" Gu Reviewed-By: Luigi Pinca Reviewed-By: Сковорода Никита Андреевич Reviewed-By: Trivikram Kamat Reviewed-By: Vse Mozhet Byt Reviewed-By: Tobias Nießen Reviewed-By: Colin Ihrig --- doc/api/buffer.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/api/buffer.md b/doc/api/buffer.md index f7f01ca5a9c1b4..f5ae45d469f34d 100644 --- a/doc/api/buffer.md +++ b/doc/api/buffer.md @@ -483,8 +483,8 @@ changes: * `string` {string} String to encode. * `encoding` {string} The encoding of `string`. **Default:** `'utf8'`. -Creates a new `Buffer` containing the given JavaScript string `string`. If -provided, the `encoding` parameter identifies the character encoding of `string`. +Creates a new `Buffer` containing `string`. If provided, the `encoding` +parameter identifies the character encoding of `string`. Examples: @@ -891,8 +891,8 @@ added: v5.10.0 * `string` {string} A string to encode. * `encoding` {string} The encoding of `string`. **Default:** `'utf8'`. -Creates a new `Buffer` containing the given JavaScript string `string`. If -provided, the `encoding` parameter identifies the character encoding of `string`. +Creates a new `Buffer` containing `string`. If provided, the `encoding` +parameter identifies the character encoding of `string`. Examples: From 33b7c500366862297badf99d49cf7fbf72ee47e3 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Thu, 29 Mar 2018 22:54:37 -0700 Subject: [PATCH 77/88] doc: remove "if provided" for optional arguments MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove "if provided" when discussing arguments that are explicitly indicated to be optional and have default values. PR-URL: https://github.com/nodejs/node/pull/19690 Reviewed-By: Tiancheng "Timothy" Gu Reviewed-By: Luigi Pinca Reviewed-By: Trivikram Kamat Reviewed-By: Vse Mozhet Byt Reviewed-By: Shingo Inoue Reviewed-By: Colin Ihrig Reviewed-By: Michaël Zasso Reviewed-By: James M Snell --- doc/api/buffer.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/api/buffer.md b/doc/api/buffer.md index f5ae45d469f34d..9016f8f6a96919 100644 --- a/doc/api/buffer.md +++ b/doc/api/buffer.md @@ -483,8 +483,8 @@ changes: * `string` {string} String to encode. * `encoding` {string} The encoding of `string`. **Default:** `'utf8'`. -Creates a new `Buffer` containing `string`. If provided, the `encoding` -parameter identifies the character encoding of `string`. +Creates a new `Buffer` containing `string`. The `encoding` parameter identifies +the character encoding of `string`. Examples: @@ -891,8 +891,8 @@ added: v5.10.0 * `string` {string} A string to encode. * `encoding` {string} The encoding of `string`. **Default:** `'utf8'`. -Creates a new `Buffer` containing `string`. If provided, the `encoding` -parameter identifies the character encoding of `string`. +Creates a new `Buffer` containing `string`. The `encoding` parameter identifies +the character encoding of `string`. Examples: From a7b3274af4e17328e5247f5d7c3e962e2c01358a Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Fri, 30 Mar 2018 06:15:32 -0700 Subject: [PATCH 78/88] test: fix flaky test-cluster-send-handle-twice Use `common.mustCall()` to make sure connection callback runs exactly once. Use `connect` event instead of `setTimeout` to avoid test failing if timer runs before client is connected. Remove `cluster.worker.disconnect()` after `assert.fail()`. It is unreachable code that is unnecessary. PR-URL: https://github.com/nodejs/node/pull/19700 Reviewed-By: Ruben Bridgewater Reviewed-By: Luigi Pinca Reviewed-By: Trivikram Kamat Reviewed-By: James M Snell --- test/parallel/test-cluster-send-handle-twice.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/test/parallel/test-cluster-send-handle-twice.js b/test/parallel/test-cluster-send-handle-twice.js index fc0d4a03085aec..9eb87d826daa20 100644 --- a/test/parallel/test-cluster-send-handle-twice.js +++ b/test/parallel/test-cluster-send-handle-twice.js @@ -40,10 +40,10 @@ if (cluster.isMaster) { })); } } else { - const server = net.createServer(function(socket) { + const server = net.createServer(common.mustCall((socket) => { process.send('send-handle-1', socket); process.send('send-handle-2', socket); - }); + })); server.listen(0, function() { const client = net.connect({ @@ -51,10 +51,9 @@ if (cluster.isMaster) { port: server.address().port }); client.on('close', common.mustCall(() => { cluster.worker.disconnect(); })); - setTimeout(function() { client.end(); }, 50); + client.on('connect', () => { client.end(); }); }).on('error', function(e) { console.error(e); assert.fail('server.listen failed'); - cluster.worker.disconnect(); }); } From 6d8c65e574e202805165d44b5210f69699312f44 Mon Sep 17 00:00:00 2001 From: willhayslett Date: Fri, 30 Mar 2018 16:49:57 -0500 Subject: [PATCH 79/88] doc: update to adding listens on SIGUSR1 Updated the doc/api/process.md documentation to reflect that listening on SIGUSR1 could impact the debugger. Fixes: https://github.com/nodejs/node/issues/19619 PR-URL: https://github.com/nodejs/node/pull/19709 Reviewed-By: Rich Trott Reviewed-By: Trivikram Kamat Reviewed-By: Ben Noordhuis Reviewed-By: James M Snell --- doc/api/process.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/process.md b/doc/api/process.md index af718446b529f6..8279f596a51fc1 100644 --- a/doc/api/process.md +++ b/doc/api/process.md @@ -375,7 +375,7 @@ process.on('SIGTERM', handle); ``` * `SIGUSR1` is reserved by Node.js to start the [debugger][]. It's possible to - install a listener but doing so will _not_ stop the debugger from starting. + install a listener but doing so might interfere with the debugger. * `SIGTERM` and `SIGINT` have default handlers on non-Windows platforms that reset the terminal mode before exiting with code `128 + signal number`. If one of these signals has a listener installed, its default behavior will be From 086570e4e1476b4c9ccf663a6cd6499964580533 Mon Sep 17 00:00:00 2001 From: Forrest Wolf Date: Tue, 27 Mar 2018 10:34:48 -0400 Subject: [PATCH 80/88] test: remove third argument from call to assert.strictEqual() Remove the message argument from call to assert.strictEqual so that the AssertionError will report the value of er.code, and add a comment with the message. PR-URL: https://github.com/nodejs/node/pull/19659 Reviewed-By: Richard Lau Reviewed-By: James M Snell Reviewed-By: Trivikram Kamat Reviewed-By: Colin Ihrig Reviewed-By: Tiancheng "Timothy" Gu Reviewed-By: Rich Trott --- test/parallel/test-http-destroyed-socket-write2.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/parallel/test-http-destroyed-socket-write2.js b/test/parallel/test-http-destroyed-socket-write2.js index 99a0c4663a8ba3..48899415e37a4f 100644 --- a/test/parallel/test-http-destroyed-socket-write2.js +++ b/test/parallel/test-http-destroyed-socket-write2.js @@ -62,12 +62,13 @@ server.listen(0, function() { break; default: + // Write to a torn down client should RESET or ABORT assert.strictEqual(er.code, - 'ECONNRESET', - 'Write to a torn down client should RESET or ABORT'); + 'ECONNRESET'); break; } + assert.strictEqual(req.output.length, 0); assert.strictEqual(req.outputEncodings.length, 0); server.close(); From 970164f3a82ea7e1ba3613c3d867815d1322c44f Mon Sep 17 00:00:00 2001 From: fatahn Date: Tue, 27 Mar 2018 11:21:05 +0300 Subject: [PATCH 81/88] test: improve assert message Use the default assert.strictEqual() message so that unequal values are shown in the event of an AssertionError. PR-URL: https://github.com/nodejs/node/pull/19629 Reviewed-By: Rich Trott Reviewed-By: James M Snell Reviewed-By: Trivikram Kamat --- test/parallel/test-http-client-timeout-agent.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/parallel/test-http-client-timeout-agent.js b/test/parallel/test-http-client-timeout-agent.js index c0359666bad35a..1b628ea96798b1 100644 --- a/test/parallel/test-http-client-timeout-agent.js +++ b/test/parallel/test-http-client-timeout-agent.js @@ -91,6 +91,6 @@ server.listen(0, options.host, function() { process.on('exit', function() { console.error(`done=${requests_done} sent=${requests_sent}`); - assert.strictEqual(requests_done, requests_sent, - 'timeout on http request called too much'); + // check that timeout on http request was not called too much + assert.strictEqual(requests_done, requests_sent); }); From 5e09a3d4eddad7971a17ebe5398c8c7ce9c71139 Mon Sep 17 00:00:00 2001 From: Divyanshu Singh Date: Fri, 30 Mar 2018 19:38:08 +0530 Subject: [PATCH 82/88] test: test process.setuid for bad argument types Test process.setuid with an object as an argument. An equivalent test exists for process.seteuid. PR-URL: https://github.com/nodejs/node/pull/19703 Fixes: https://github.com/nodejs/node/issues/19591 Reviewed-By: Gireesh Punathil Reviewed-By: Colin Ihrig Reviewed-By: Trivikram Kamat Reviewed-By: James M Snell --- test/parallel/test-process-setuid-setgid.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/parallel/test-process-setuid-setgid.js b/test/parallel/test-process-setuid-setgid.js index e0db8ee00222dd..54341b8564f242 100644 --- a/test/parallel/test-process-setuid-setgid.js +++ b/test/parallel/test-process-setuid-setgid.js @@ -33,6 +33,10 @@ if (common.isWindows) { return; } +assert.throws(() => { + process.setuid({}); +}, /^TypeError: setuid argument must be a number or a string$/); + assert.throws(() => { process.setuid('fhqwhgadshgnsdhjsdbkhsdabkfabkveybvf'); }, /^Error: setuid user id does not exist$/); From 692223182cc2700eb362218dae50b49fdcd56a93 Mon Sep 17 00:00:00 2001 From: Ari Autio Date: Thu, 6 Dec 2018 11:13:33 +0200 Subject: [PATCH 83/88] doc: fix api documentation of http.createServer Fixes: https://github.com/nodejs/node/issues/24105 PR-URL: https://github.com/nodejs/node/pull/24869 Reviewed-By: Luigi Pinca Reviewed-By: Trivikram Kamat --- doc/api/http.md | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/doc/api/http.md b/doc/api/http.md index 2a74dce019eb68..391a2bf4232f7a 100644 --- a/doc/api/http.md +++ b/doc/api/http.md @@ -1720,21 +1720,10 @@ A collection of all the standard HTTP response status codes, and the short description of each. For example, `http.STATUS_CODES[404] === 'Not Found'`. -## http.createServer([options][, requestListener]) +## http.createServer([requestListener]) -- `options` {Object} - * `IncomingMessage` {http.IncomingMessage} Specifies the IncomingMessage class - to be used. Useful for extending the original `IncomingMessage`. - **Default:** `IncomingMessage`. - * `ServerResponse` {http.ServerResponse} Specifies the ServerResponse class to - be used. Useful for extending the original `ServerResponse`. **Default:** - `ServerResponse`. +--> - `requestListener` {Function} * Returns: {http.Server} From 74c1074d53046138947e546462b21c1f216d81c7 Mon Sep 17 00:00:00 2001 From: Benjamin Zaslavsky Date: Tue, 14 Nov 2017 00:08:58 +0100 Subject: [PATCH 84/88] doc: add description for inspector-only console methods. Description inspired by dev tools reference and inspector err messages Added: * intro * console.debug() * console.dirxml() * console.markTimeline() * console.profile() * console.profileEnd() * console.table() * console.timeStamp() * console.timeline() * console.timelineEnd() PR-URL: https://github.com/nodejs/node/pull/17004 Fixes: https://github.com/nodejs/node/issues/16755 Reviewed-By: Khaidi Chu Reviewed-By: Vse Mozhet Byt Reviewed-By: James M Snell Reviewed-By: Rich Trott Reviewed-By: Colin Ihrig --- doc/api/console.md | 99 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) diff --git a/doc/api/console.md b/doc/api/console.md index bb6fb789730e43..eba778416fc82f 100644 --- a/doc/api/console.md +++ b/doc/api/console.md @@ -240,6 +240,10 @@ undefined ### console.debug(data[, ...args]) * `data` {any} * `...args` {any} @@ -417,15 +421,110 @@ added: v0.1.100 The `console.warn()` function is an alias for [`console.error()`][]. +## Inspector only methods +The following methods are exposed by the V8 engine in the general API but do +not display anything unless used in conjunction with the [inspector][] +(`--inspect` flag). + +### console.dirxml(object) + +* `object` {string} + +This method does not display anything unless used in the inspector. The +`console.dirxml()` method displays in `stdout` an XML interactive tree +representation of the descendants of the specified `object` if possible, or the +JavaScript representation if not. Calling `console.dirxml()` on an HTML or XML +element is equivalent to calling `console.log()`. + +### console.markTimeline(label) + +* `label` {string} Defaults to `'default'`. + +This method does not display anything unless used in the inspector. The +`console.markTimeline()` method is the deprecated form of [`console.timeStamp()`][]. + +### console.profile([label]) + +* `label` {string} + +This method does not display anything unless used in the inspector. The +`console.profile()` method starts a JavaScript CPU profile with an optional +label until [`console.profileEnd()`][] is called. The profile is then added to +the **Profile** panel of the inspector. +```js +console.profile('MyLabel'); +// Some code +console.profileEnd(); +// Adds the profile 'MyLabel' to the Profiles panel of the inspector. +``` + +### console.profileEnd() + + +This method does not display anything unless used in the inspector. Stops the +current JavaScript CPU profiling session if one has been started and prints +the report to the **Profiles** panel of the inspector. See +[`console.profile()`][] for an example. + +### console.table(array[, columns]) + +* `array` {Array|Object} +* `columns` {Array} + +This method does not display anything unless used in the inspector. Prints to +`stdout` the array `array` formatted as a table. + +### console.timeStamp([label]) + +* `label` {string} + +This method does not display anything unless used in the inspector. The +`console.timeStamp()` method adds an event with the label `label` to the +**Timeline** panel of the inspector. + +### console.timeline([label]) + +* `label` {string} Defaults to `'default'`. + +This method does not display anything unless used in the inspector. The +`console.timeline()` method is the deprecated form of [`console.time()`][]. + +### console.timelineEnd([label]) + +* `label` {string} Defaults to `'default'`. + +This method does not display anything unless used in the inspector. The +`console.timelineEnd()` method is the deprecated form of [`console.timeEnd()`][]. + [`console.error()`]: #console_console_error_data_args [`console.group()`]: #console_console_group_label [`console.log()`]: #console_console_log_data_args +[`console.profile()`]: #console_console_profile_label +[`console.profileEnd()`]: #console_console_profileend [`console.time()`]: #console_console_time_label [`console.timeEnd()`]: #console_console_timeend_label +[`console.timeStamp()`]: #console_console_timestamp_label [`process.stderr`]: process.html#process_process_stderr [`process.stdout`]: process.html#process_process_stdout [`util.format()`]: util.html#util_util_format_format_args [`util.inspect()`]: util.html#util_util_inspect_object_options [customizing `util.inspect()` colors]: util.html#util_customizing_util_inspect_colors +[inspector]: debugger.html [note on process I/O]: process.html#process_a_note_on_process_i_o [web-api-assert]: https://developer.mozilla.org/en-US/docs/Web/API/console/assert From 62fb5dbec557745f9f828d728ca25f327ca5300c Mon Sep 17 00:00:00 2001 From: Ruben Bridgewater Date: Sun, 2 Dec 2018 14:08:01 +0100 Subject: [PATCH 85/88] assert: revert breaking change It was not intended to change the `assert.doesNotThrow()` message with https://github.com/nodejs/node/pull/23223. This reverts the breaking behavior to the one before. PR-URL: https://github.com/nodejs/node/pull/24786 Refs: https://github.com/nodejs/node/pull/23223 Reviewed-By: Beth Griggs --- lib/assert.js | 2 +- test/parallel/test-assert-async.js | 2 +- test/parallel/test-assert.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/assert.js b/lib/assert.js index 594a5acfbde1e3..e29a381acb746d 100644 --- a/lib/assert.js +++ b/lib/assert.js @@ -782,7 +782,7 @@ function expectsNoError(stackStartFn, actual, error, message) { actual, expected: error, operator: stackStartFn.name, - message: `Got unwanted ${fnType}${details}\n${actual.message}`, + message: `Got unwanted ${fnType}${details}`, stackStartFn }); } diff --git a/test/parallel/test-assert-async.js b/test/parallel/test-assert-async.js index c397a4db081d49..237df0bb66ab28 100644 --- a/test/parallel/test-assert-async.js +++ b/test/parallel/test-assert-async.js @@ -34,7 +34,7 @@ common.crashOnUnhandledRejection(); assert(err instanceof assert.AssertionError, `${err.name} is not instance of AssertionError`); assert.strictEqual(err.code, 'ERR_ASSERTION'); - assert(/^Got unwanted rejection\.\n$/.test(err.message)); + assert(/^Got unwanted rejection\.$/.test(err.message)); assert.strictEqual(err.operator, 'doesNotReject'); assert.ok(!err.stack.includes('at Function.doesNotReject')); return true; diff --git a/test/parallel/test-assert.js b/test/parallel/test-assert.js index 7335982a6c6dc5..acedd9ed4fd75b 100644 --- a/test/parallel/test-assert.js +++ b/test/parallel/test-assert.js @@ -460,7 +460,7 @@ common.expectsError( type: a.AssertionError, code: 'ERR_ASSERTION', operator: 'doesNotThrow', - message: 'Got unwanted exception: user message\n[object Object]' + message: 'Got unwanted exception: user message' } ); From 394cb42962f542127ab3e8309d3143319ab44226 Mon Sep 17 00:00:00 2001 From: Myles Borins Date: Tue, 27 Nov 2018 17:46:59 -0500 Subject: [PATCH 86/88] test: verify order of error in h2 server stream Currently the order of error / closing of an h2 stream is consistent in 10.x, 11.x, and master. There appears to be an unexpected behavior difference in 8.x. This test will be used to bisect the commit that will fix this behavior change and ensure there are no future regressions. PR-URL: https://github.com/nodejs/node/pull/24685 Reviewed-By: Luigi Pinca Reviewed-By: James M Snell --- test/parallel/test-http2-error-order.js | 43 +++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 test/parallel/test-http2-error-order.js diff --git a/test/parallel/test-http2-error-order.js b/test/parallel/test-http2-error-order.js new file mode 100644 index 00000000000000..8bf0f03dba8ea3 --- /dev/null +++ b/test/parallel/test-http2-error-order.js @@ -0,0 +1,43 @@ +'use strict'; + +const common = require('../common'); +if (!common.hasCrypto) + common.skip('missing crypto'); + +const assert = require('assert'); +const { createServer, connect } = require('http2'); + +const messages = []; +const expected = [ + 'Stream:created', + 'Stream:error', + 'Stream:close', + 'Request:error' +]; + +const server = createServer(); + +server.on('stream', (stream) => { + messages.push('Stream:created'); + stream + .on('close', () => messages.push('Stream:close')) + .on('error', (err) => messages.push('Stream:error')) + .respondWithFile('dont exist'); +}); + +server.listen(0); + +const client = connect(`http://localhost:${server.address().port}`); +const req = client.request(); + +req.on('response', common.mustNotCall()); + +req.on('error', () => { + messages.push('Request:error'); + client.close(); +}); + +client.on('close', common.mustCall(() => { + assert.deepStrictEqual(messages, expected); + server.close(); +})); From 4c24a82a654e1d9561af5e47ad98a31c34bca5c3 Mon Sep 17 00:00:00 2001 From: Gerhard Stoebich <18708370+Flarna@users.noreply.github.com> Date: Sun, 2 Dec 2018 19:27:06 +0100 Subject: [PATCH 87/88] http2: fix sequence of error/close events Correct sequence of emitting `error` and `close` events for a `Http2Stream`. PR-URL: https://github.com/nodejs/node/pull/24789 Refs: https://github.com/nodejs/node/pull/22850 Refs: https://github.com/nodejs/node/pull/24685 Fixes: https://github.com/nodejs/node/issues/24559 Reviewed-By: Luigi Pinca Reviewed-By: Matteo Collina Reviewed-By: Trivikram Kamat --- lib/internal/http2/core.js | 3 +-- test/parallel/test-http2-stream-destroy-event-order.js | 9 ++++----- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/lib/internal/http2/core.js b/lib/internal/http2/core.js index 4c184fcfe188df..055009d07c815b 100644 --- a/lib/internal/http2/core.js +++ b/lib/internal/http2/core.js @@ -1997,9 +1997,8 @@ class Http2Stream extends Duplex { // will destroy if it has been closed and there are no other open or // pending streams. session[kMaybeDestroy](); - process.nextTick(emit, this, 'close', code); callback(err); - + process.nextTick(emit, this, 'close', code); } // The Http2Stream can be destroyed if it has closed and if the readable // side has received the final chunk. diff --git a/test/parallel/test-http2-stream-destroy-event-order.js b/test/parallel/test-http2-stream-destroy-event-order.js index 7d4bcb102f0d0a..88e4a99f99eee3 100644 --- a/test/parallel/test-http2-stream-destroy-event-order.js +++ b/test/parallel/test-http2-stream-destroy-event-order.js @@ -1,4 +1,3 @@ -// Flags: --expose-http2 'use strict'; const common = require('../common'); @@ -10,8 +9,8 @@ let client; let req; const server = http2.createServer(); server.on('stream', common.mustCall((stream) => { - stream.on('close', common.mustCall(() => { - stream.on('error', common.mustCall(() => { + stream.on('error', common.mustCall(() => { + stream.on('close', common.mustCall(() => { server.close(); })); })); @@ -22,8 +21,8 @@ server.listen(0, common.mustCall(() => { client = http2.connect(`http://localhost:${server.address().port}`); req = client.request(); req.resume(); - req.on('close', common.mustCall(() => { - req.on('error', common.mustCall(() => { + req.on('error', common.mustCall(() => { + req.on('close', common.mustCall(() => { client.close(); })); })); From 187694e2fa59d71577f9ee99c6d1a3d04c80c37d Mon Sep 17 00:00:00 2001 From: Beth Griggs Date: Tue, 4 Dec 2018 18:26:19 +0000 Subject: [PATCH 88/88] 2018-12-18, Version 8.14.1 'Carbon' (LTS) Notable changes: * **assert**: - revert breaking change (Ruben Bridgewater) [#24786](https://github.com/nodejs/node/pull/24786) * **http2**: - fix sequence of error/close events (Gerhard Stoebich) [#24789](https://github.com/nodejs/node/pull/24789) PR-URL: https://github.com/nodejs/node/pull/24832 --- CHANGELOG.md | 5 +- doc/api/console.md | 2 +- doc/changelogs/CHANGELOG_V8.md | 101 +++++++++++++++++++++++++++++++++ src/node_version.h | 2 +- 4 files changed, 106 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0cb4882200cf85..f3a81c1f648ab5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,8 +27,9 @@ release. -8.14.0
-8.13.0

+8.14.1
+8.14.0
+8.13.0
8.12.0
8.11.4
8.11.3
diff --git a/doc/api/console.md b/doc/api/console.md index eba778416fc82f..79d4408c9dadbd 100644 --- a/doc/api/console.md +++ b/doc/api/console.md @@ -241,7 +241,7 @@ undefined diff --git a/doc/changelogs/CHANGELOG_V8.md b/doc/changelogs/CHANGELOG_V8.md index a6f471aa38c8f8..242bec1616a77e 100644 --- a/doc/changelogs/CHANGELOG_V8.md +++ b/doc/changelogs/CHANGELOG_V8.md @@ -10,6 +10,7 @@ +8.14.1
8.14.0
8.13.0
8.12.0
@@ -59,6 +60,106 @@ [Node.js Long Term Support Plan](https://github.com/nodejs/LTS) and will be supported actively until April 2019 and maintained until December 2019. + +## 2018-12-18, Version 8.14.1 'Carbon' (LTS), @MylesBorins prepared by @BethGriggs + +### Notable changes + +* **assert**: + - revert breaking change (Ruben Bridgewater) [#24786](https://github.com/nodejs/node/pull/24786) +* **http2**: + - fix sequence of error/close events (Gerhard Stoebich) [#24789](https://github.com/nodejs/node/pull/24789) + +### Commits + +* [[`62fb5dbec5`](https://github.com/nodejs/node/commit/62fb5dbec5)] - **assert**: revert breaking change (Ruben Bridgewater) [#24786](https://github.com/nodejs/node/pull/24786) +* [[`a8402fe1c8`](https://github.com/nodejs/node/commit/a8402fe1c8)] - **build**: only check REPLACEME & DEP...X for releases (Rod Vagg) [#24575](https://github.com/nodejs/node/pull/24575) +* [[`26743369d3`](https://github.com/nodejs/node/commit/26743369d3)] - **build**: improve Travis CI settings (Timothy Gu) [#21459](https://github.com/nodejs/node/pull/21459) +* [[`1da04c208d`](https://github.com/nodejs/node/commit/1da04c208d)] - **build**: install markdown linter for travis (Richard Lau) [#21215](https://github.com/nodejs/node/pull/21215) +* [[`7612024939`](https://github.com/nodejs/node/commit/7612024939)] - **build**: initial .travis.yml implementation (Anna Henningsen) [#21059](https://github.com/nodejs/node/pull/21059) +* [[`f70e79a7b2`](https://github.com/nodejs/node/commit/f70e79a7b2)] - **build**: allow for overwriting of use\_openssl\_def (Shelley Vohr) [#23763](https://github.com/nodejs/node/pull/23763) +* [[`15d1f67c60`](https://github.com/nodejs/node/commit/15d1f67c60)] - **build,doc**: remove outdated `lint-md-build` (Michaël Zasso) [#22991](https://github.com/nodejs/node/pull/22991) +* [[`85a6daeaef`](https://github.com/nodejs/node/commit/85a6daeaef)] - **build,meta**: switch to gcc-4.9 on travis (Refael Ackermann) [#23778](https://github.com/nodejs/node/pull/23778) +* [[`313ef6fa73`](https://github.com/nodejs/node/commit/313ef6fa73)] - **build,tools**: tweak the travis config (Refael Ackermann) [#22417](https://github.com/nodejs/node/pull/22417) +* [[`22b41495ea`](https://github.com/nodejs/node/commit/22b41495ea)] - **child_process**: handle undefined/null for fork() args (Shobhit Chittora) [#22416](https://github.com/nodejs/node/pull/22416) +* [[`499605618b`](https://github.com/nodejs/node/commit/499605618b)] - **crypto**: add SET\_INTEGER\_CONSANT macro (Daniel Bevenius) [#23687](https://github.com/nodejs/node/pull/23687) +* [[`34d91296df`](https://github.com/nodejs/node/commit/34d91296df)] - **deps**: icu: apply workaround patch (Steven R. Loomis) [#23764](https://github.com/nodejs/node/pull/23764) +* [[`50347297a1`](https://github.com/nodejs/node/commit/50347297a1)] - **deps**: cherry-pick d2e0166 from V8 upstream (Vasili Skurydzin) [#23958](https://github.com/nodejs/node/pull/23958) +* [[`9bedae5266`](https://github.com/nodejs/node/commit/9bedae5266)] - **deps**: cherry-pick 6bc4bfe from V8 upstream (Vasili Skurydzin) [#23958](https://github.com/nodejs/node/pull/23958) +* [[`4f3c9e6aab`](https://github.com/nodejs/node/commit/4f3c9e6aab)] - **deps,v8**: fix gyp build on Aix platform (Vasili Skurydzin) [#23958](https://github.com/nodejs/node/pull/23958) +* [[`74c1074d53`](https://github.com/nodejs/node/commit/74c1074d53)] - **doc**: add description for inspector-only console methods. (Benjamin Zaslavsky) [#17004](https://github.com/nodejs/node/pull/17004) +* [[`692223182c`](https://github.com/nodejs/node/commit/692223182c)] - **doc**: fix api documentation of http.createServer (Ari Autio) [#24869](https://github.com/nodejs/node/pull/24869) +* [[`6d8c65e574`](https://github.com/nodejs/node/commit/6d8c65e574)] - **doc**: update to adding listens on SIGUSR1 (willhayslett) [#19709](https://github.com/nodejs/node/pull/19709) +* [[`33b7c50036`](https://github.com/nodejs/node/commit/33b7c50036)] - **doc**: remove "if provided" for optional arguments (Rich Trott) [#19690](https://github.com/nodejs/node/pull/19690) +* [[`216e7da8c5`](https://github.com/nodejs/node/commit/216e7da8c5)] - **doc**: do not identify string as "JavaScript string" (Rich Trott) [#19689](https://github.com/nodejs/node/pull/19689) +* [[`17e84217c7`](https://github.com/nodejs/node/commit/17e84217c7)] - **doc**: fix grammar error in process.md (Kenji Okamoto) [#19641](https://github.com/nodejs/node/pull/19641) +* [[`06daf5276f`](https://github.com/nodejs/node/commit/06daf5276f)] - **doc**: remove use of "random port" re dgram send (Thomas Hunter II) [#19620](https://github.com/nodejs/node/pull/19620) +* [[`bf95392e86`](https://github.com/nodejs/node/commit/bf95392e86)] - **doc**: improve assert legacy text (Rich Trott) [#19622](https://github.com/nodejs/node/pull/19622) +* [[`e48cc3c403`](https://github.com/nodejs/node/commit/e48cc3c403)] - **doc**: remove confusing note about child process stdio (Anna Henningsen) [#19552](https://github.com/nodejs/node/pull/19552) +* [[`9d249bf6d5`](https://github.com/nodejs/node/commit/9d249bf6d5)] - **doc**: add BethGriggs to collaborators (Beth Griggs) [#19610](https://github.com/nodejs/node/pull/19610) +* [[`c3ecf05b01`](https://github.com/nodejs/node/commit/c3ecf05b01)] - **doc**: document `make docopen` (Ayush Gupta) [#19321](https://github.com/nodejs/node/pull/19321) +* [[`8338700d05`](https://github.com/nodejs/node/commit/8338700d05)] - **doc**: add directory structure in writing-tests.md (juggernaut451) [#18802](https://github.com/nodejs/node/pull/18802) +* [[`63d8632611`](https://github.com/nodejs/node/commit/63d8632611)] - **doc**: add types for some `process` properties (Vse Mozhet Byt) [#19571](https://github.com/nodejs/node/pull/19571) +* [[`b2fc3b556c`](https://github.com/nodejs/node/commit/b2fc3b556c)] - **doc**: fix n-api example string (Steven R. Loomis) [#19205](https://github.com/nodejs/node/pull/19205) +* [[`d79e7d6e89`](https://github.com/nodejs/node/commit/d79e7d6e89)] - **doc**: minor improvements to buffer.md (Rich Trott) [#19547](https://github.com/nodejs/node/pull/19547) +* [[`06491482f8`](https://github.com/nodejs/node/commit/06491482f8)] - **doc**: update child\_process.md (Ari Leo Frankel) [#19075](https://github.com/nodejs/node/pull/19075) +* [[`4db289ca17`](https://github.com/nodejs/node/commit/4db289ca17)] - **doc**: move StackOverflow to unofficial section (josephleon) [#19416](https://github.com/nodejs/node/pull/19416) +* [[`f5683a9a6d`](https://github.com/nodejs/node/commit/f5683a9a6d)] - **doc**: correct async\_hooks resource names (Gerhard Stoebich) [#24684](https://github.com/nodejs/node/pull/24684) +* [[`ffe1f8033c`](https://github.com/nodejs/node/commit/ffe1f8033c)] - **doc**: sort bottom-of-file markdown links (Sam Roberts) [#24682](https://github.com/nodejs/node/pull/24682) +* [[`78d9a5e6e4`](https://github.com/nodejs/node/commit/78d9a5e6e4)] - **doc**: address bits of proof reading work (Jagannath Bhat) [#23978](https://github.com/nodejs/node/pull/23978) +* [[`d1eebb2e43`](https://github.com/nodejs/node/commit/d1eebb2e43)] - **doc**: revise COLLABORATOR\_GUIDE.md (Rich Trott) [#23990](https://github.com/nodejs/node/pull/23990) +* [[`003eb0c8e1`](https://github.com/nodejs/node/commit/003eb0c8e1)] - **doc**: simplify CODE\_OF\_CONDUCT.md (Rich Trott) [#23989](https://github.com/nodejs/node/pull/23989) +* [[`c1723c8bca`](https://github.com/nodejs/node/commit/c1723c8bca)] - **doc**: add branding to style guide (Rich Trott) [#23967](https://github.com/nodejs/node/pull/23967) +* [[`8bb67a1fb9`](https://github.com/nodejs/node/commit/8bb67a1fb9)] - **doc**: use Node.js instead of Node (Rich Trott) [#23967](https://github.com/nodejs/node/pull/23967) +* [[`73e0bb1f52`](https://github.com/nodejs/node/commit/73e0bb1f52)] - **doc**: fix typographical issues (Denis McDonald) [#23970](https://github.com/nodejs/node/pull/23970) +* [[`6d76f852a9`](https://github.com/nodejs/node/commit/6d76f852a9)] - **doc**: add documentation for http.IncomingMessage$complete (James M Snell) [#23914](https://github.com/nodejs/node/pull/23914) +* [[`3025f351db`](https://github.com/nodejs/node/commit/3025f351db)] - **doc**: remove mailing list (Rich Trott) [#23932](https://github.com/nodejs/node/pull/23932) +* [[`2459e150bb`](https://github.com/nodejs/node/commit/2459e150bb)] - **doc**: add note about ABI compatibility (Myles Borins) [#22237](https://github.com/nodejs/node/pull/22237) +* [[`27b35833bd`](https://github.com/nodejs/node/commit/27b35833bd)] - **doc**: make example more clarified in cluster.md (ZYSzys) [#23931](https://github.com/nodejs/node/pull/23931) +* [[`0d4de59967`](https://github.com/nodejs/node/commit/0d4de59967)] - **doc**: simplify valid security issue descriptions (Rich Trott) [#23881](https://github.com/nodejs/node/pull/23881) +* [[`9afdc09f98`](https://github.com/nodejs/node/commit/9afdc09f98)] - **doc**: simplify path.basename() on POSIX and Windows (ZYSzys) [#23864](https://github.com/nodejs/node/pull/23864) +* [[`3f2a01688d`](https://github.com/nodejs/node/commit/3f2a01688d)] - **doc**: add review suggestions to require() (erickwendel) [#23605](https://github.com/nodejs/node/pull/23605) +* [[`f037942fe7`](https://github.com/nodejs/node/commit/f037942fe7)] - **doc**: move @phillipj to emeriti (Phillip Johnsen) [#23790](https://github.com/nodejs/node/pull/23790) +* [[`e5f75cf82e`](https://github.com/nodejs/node/commit/e5f75cf82e)] - **doc**: add note about removeListener order (James M Snell) [#23762](https://github.com/nodejs/node/pull/23762) +* [[`0ff88a3510`](https://github.com/nodejs/node/commit/0ff88a3510)] - **doc**: document ACL limitation for fs.access on Windows (James M Snell) [#23772](https://github.com/nodejs/node/pull/23772) +* [[`32ae851710`](https://github.com/nodejs/node/commit/32ae851710)] - **doc**: document that addMembership must be called once in a cluster (James M Snell) [#23746](https://github.com/nodejs/node/pull/23746) +* [[`e2d2ce6706`](https://github.com/nodejs/node/commit/e2d2ce6706)] - **doc**: remove reference to sslv3 in tls.md (James M Snell) [#23745](https://github.com/nodejs/node/pull/23745) +* [[`4c24a82a65`](https://github.com/nodejs/node/commit/4c24a82a65)] - **http2**: fix sequence of error/close events (Gerhard Stoebich) [#24789](https://github.com/nodejs/node/pull/24789) +* [[`8afbd5ce41`](https://github.com/nodejs/node/commit/8afbd5ce41)] - **lib**: fix a typo in lib/timers "read through" (wangzengdi) [#19666](https://github.com/nodejs/node/pull/19666) +* [[`fa12532000`](https://github.com/nodejs/node/commit/fa12532000)] - **lib**: remove useless cwd in posix.resolve (ZYSzys) [#23902](https://github.com/nodejs/node/pull/23902) +* [[`e8dbd09414`](https://github.com/nodejs/node/commit/e8dbd09414)] - **src**: use "constants" string instead of creating new one (Ouyang Yadong) [#23894](https://github.com/nodejs/node/pull/23894) +* [[`394cb42962`](https://github.com/nodejs/node/commit/394cb42962)] - **test**: verify order of error in h2 server stream (Myles Borins) [#24685](https://github.com/nodejs/node/pull/24685) +* [[`5e09a3d4ed`](https://github.com/nodejs/node/commit/5e09a3d4ed)] - **test**: test process.setuid for bad argument types (Divyanshu Singh) [#19703](https://github.com/nodejs/node/pull/19703) +* [[`970164f3a8`](https://github.com/nodejs/node/commit/970164f3a8)] - **test**: improve assert message (fatahn) [#19629](https://github.com/nodejs/node/pull/19629) +* [[`086570e4e1`](https://github.com/nodejs/node/commit/086570e4e1)] - **test**: remove third argument from call to assert.strictEqual() (Forrest Wolf) [#19659](https://github.com/nodejs/node/pull/19659) +* [[`a7b3274af4`](https://github.com/nodejs/node/commit/a7b3274af4)] - **test**: fix flaky test-cluster-send-handle-twice (Rich Trott) [#19700](https://github.com/nodejs/node/pull/19700) +* [[`1bda58289a`](https://github.com/nodejs/node/commit/1bda58289a)] - **test**: rename regression tests more expressively (Ujjwal Sharma) [#19668](https://github.com/nodejs/node/pull/19668) +* [[`bd9cc92e8d`](https://github.com/nodejs/node/commit/bd9cc92e8d)] - **test**: remove 3rd argument from assert.strictEqual (Arian Santrach) [#19707](https://github.com/nodejs/node/pull/19707) +* [[`3ca10faf00`](https://github.com/nodejs/node/commit/3ca10faf00)] - **test**: use createReadStream instead of ReadStream (Daniel Bevenius) [#19636](https://github.com/nodejs/node/pull/19636) +* [[`8a546e822d`](https://github.com/nodejs/node/commit/8a546e822d)] - **test**: removed default message from assert.strictEqual (jaspal-yupana) [#19660](https://github.com/nodejs/node/pull/19660) +* [[`a62df1b379`](https://github.com/nodejs/node/commit/a62df1b379)] - **test**: refactor test-net-dns-error (Luigi Pinca) [#19640](https://github.com/nodejs/node/pull/19640) +* [[`8a0ecf4360`](https://github.com/nodejs/node/commit/8a0ecf4360)] - **test**: refactor test-http-expect-continue (Rich Trott) [#19625](https://github.com/nodejs/node/pull/19625) +* [[`0cbe813e90`](https://github.com/nodejs/node/commit/0cbe813e90)] - **test**: update link according to NIST bibliography (Tobias Nießen) [#19593](https://github.com/nodejs/node/pull/19593) +* [[`ea1fda6228`](https://github.com/nodejs/node/commit/ea1fda6228)] - **test**: remove third param from assert.strictEqual (davis.okoth@kemsa.co.ke) [#19536](https://github.com/nodejs/node/pull/19536) +* [[`18c4e5e886`](https://github.com/nodejs/node/commit/18c4e5e886)] - **test**: remove message from assert.strictEqual() (willhayslett) [#19525](https://github.com/nodejs/node/pull/19525) +* [[`146c488bf5`](https://github.com/nodejs/node/commit/146c488bf5)] - **test**: refactor parallel/test-tls-ca-concat.js (juggernaut451) [#19092](https://github.com/nodejs/node/pull/19092) +* [[`8fa5bd3761`](https://github.com/nodejs/node/commit/8fa5bd3761)] - **test**: rename regression tests file names (Ujjwal Sharma) [#19332](https://github.com/nodejs/node/pull/19332) +* [[`d34ade8755`](https://github.com/nodejs/node/commit/d34ade8755)] - **test**: fix strictEqual arguments order (Esteban Sotillo) [#23956](https://github.com/nodejs/node/pull/23956) +* [[`6ae07a9248`](https://github.com/nodejs/node/commit/6ae07a9248)] - **test**: add property for RangeError in test-buffer-copy (mritunjaygoutam12) [#23968](https://github.com/nodejs/node/pull/23968) +* [[`b1e6de80c1`](https://github.com/nodejs/node/commit/b1e6de80c1)] - **test**: fix regression when compiled with FIPS (Adam Majer) [#23871](https://github.com/nodejs/node/pull/23871) +* [[`d0368b8245`](https://github.com/nodejs/node/commit/d0368b8245)] - **test**: fix strictEqual() argument order (Loic) [#23829](https://github.com/nodejs/node/pull/23829) +* [[`3a864d716e`](https://github.com/nodejs/node/commit/3a864d716e)] - **test**: fix strictEqual() arguments order (Nolan Rigo) [#23800](https://github.com/nodejs/node/pull/23800) +* [[`e7a573a9e2`](https://github.com/nodejs/node/commit/e7a573a9e2)] - **test**: fix test-require-symlink on Windows (Bartosz Sosnowski) [#23691](https://github.com/nodejs/node/pull/23691) +* [[`ac91346776`](https://github.com/nodejs/node/commit/ac91346776)] - **test**: fix strictEqual() argument order (Romain Lanz) [#23768](https://github.com/nodejs/node/pull/23768) +* [[`0f98c4926a`](https://github.com/nodejs/node/commit/0f98c4926a)] - **test**: fix strictEqual() arguments order (Thomas GENTILHOMME) [#23771](https://github.com/nodejs/node/pull/23771) +* [[`73d19b1516`](https://github.com/nodejs/node/commit/73d19b1516)] - **test**: ensure openssl version prints correctly (Sam Roberts) [#23678](https://github.com/nodejs/node/pull/23678) +* [[`544e64d68d`](https://github.com/nodejs/node/commit/544e64d68d)] - **test**: fix assertion arguments order (Elian Gutierrez) [#23787](https://github.com/nodejs/node/pull/23787) +* [[`e84c01d1f3`](https://github.com/nodejs/node/commit/e84c01d1f3)] - **tools**: update alternative docs versions (Richard Lau) [#23980](https://github.com/nodejs/node/pull/23980) +* [[`02209c5fa7`](https://github.com/nodejs/node/commit/02209c5fa7)] - **tools**: clarify commit message linting (Rich Trott) [#23742](https://github.com/nodejs/node/pull/23742) +* [[`22043ccb84`](https://github.com/nodejs/node/commit/22043ccb84)] - **tools**: do not lint commit message if var undefined (Rich Trott) [#23725](https://github.com/nodejs/node/pull/23725) +* [[`2a8a28c436`](https://github.com/nodejs/node/commit/2a8a28c436)] - **tools**: make Travis commit linting more robust (Rich Trott) [#23397](https://github.com/nodejs/node/pull/23397) +* [[`c15d236545`](https://github.com/nodejs/node/commit/c15d236545)] - **tools**: apply linting to first commit in PRs (Rich Trott) [#22452](https://github.com/nodejs/node/pull/22452) + ## 2018-11-27, Version 8.14.0 'Carbon' (LTS), @rvagg diff --git a/src/node_version.h b/src/node_version.h index 251aa1f626378b..5d08e257e8ea90 100644 --- a/src/node_version.h +++ b/src/node_version.h @@ -29,7 +29,7 @@ #define NODE_VERSION_IS_LTS 1 #define NODE_VERSION_LTS_CODENAME "Carbon" -#define NODE_VERSION_IS_RELEASE 0 +#define NODE_VERSION_IS_RELEASE 1 #ifndef NODE_STRINGIFY #define NODE_STRINGIFY(n) NODE_STRINGIFY_HELPER(n)