From 770f7e3bff7faf2a7f1196d7bcd428a7d48b5c7c Mon Sep 17 00:00:00 2001 From: Thomas Hunter II Date: Mon, 6 Nov 2023 11:43:25 -0800 Subject: [PATCH 1/3] remove superfluous patching of store methods for v20.0-v20.5 --- checks.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/checks.js b/checks.js index 155ea2b..576c1c6 100644 --- a/checks.js +++ b/checks.js @@ -38,7 +38,7 @@ function hasZeroSubscribersBug() { module.exports.hasZeroSubscribersBug = hasZeroSubscribersBug; function hasChannelStoreMethods() { - return hasFullSupport() + return MAJOR === 20 || (MAJOR === 19 && MINOR >= 9); } module.exports.hasChannelStoreMethods = hasChannelStoreMethods; From 6a6da38ffe8837a55440e2b930112859567d6251 Mon Sep 17 00:00:00 2001 From: Thomas Hunter II Date: Mon, 6 Nov 2023 11:53:35 -0800 Subject: [PATCH 2/3] no longer repatch tracing channel for node v20.0-v20.5 --- checks.js | 2 +- test/test-diagnostics-channel-tracing-channel-async.spec.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/checks.js b/checks.js index 576c1c6..5dde005 100644 --- a/checks.js +++ b/checks.js @@ -9,7 +9,7 @@ function hasFullSupport() { module.exports.hasFullSupport = hasFullSupport; function hasTracingChannel() { - return hasFullSupport(); + return MAJOR >= 20; } module.exports.hasTracingChannel = hasTracingChannel; diff --git a/test/test-diagnostics-channel-tracing-channel-async.spec.js b/test/test-diagnostics-channel-tracing-channel-async.spec.js index 2950088..f583bc1 100644 --- a/test/test-diagnostics-channel-tracing-channel-async.spec.js +++ b/test/test-diagnostics-channel-tracing-channel-async.spec.js @@ -57,7 +57,7 @@ test('test-diagnostics-channel-tracing-channel-async', (t) => { try { channel.traceCallback(common.mustNotCall(), 0, input, thisArg, 1, 2, 3); } catch (err) { - if (MAJOR >= 20 && MINOR >= 6) { + if (MAJOR >= 20) { // By default, this error message is used for all of v20 // However, patch-sync-unsubscribe-bug causes the error to change to the older version mentioning Array t.ok(/"callback" argument must be of type function/.test(err.message)); From f7a677a0c93a0ce47061429a54c3adcfaf97b48c Mon Sep 17 00:00:00 2001 From: Thomas Hunter II Date: Mon, 6 Nov 2023 11:54:59 -0800 Subject: [PATCH 3/3] no longer repatch top subscribe unsubscribe v20.0-v20.5 --- checks.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/checks.js b/checks.js index 5dde005..e517b9c 100644 --- a/checks.js +++ b/checks.js @@ -21,7 +21,7 @@ function hasDiagnosticsChannel() { module.exports.hasDiagnosticsChannel = hasDiagnosticsChannel; function hasTopSubscribeUnsubscribe() { - return hasFullSupport() + return MAJOR >= 20 || (MAJOR === 16 && MINOR >= 17) || (MAJOR === 18 && MINOR >= 7); }