From 92411c49f766c15475db4061770db39d384e39d2 Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Mon, 7 Oct 2024 16:15:39 +0200 Subject: [PATCH] fix(devtools-proxy-support): fix node version check MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `process.version === 'v' + process.versions.node` 🙃 --- packages/devtools-proxy-support/src/system-ca.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/devtools-proxy-support/src/system-ca.ts b/packages/devtools-proxy-support/src/system-ca.ts index 2800c58..be97037 100644 --- a/packages/devtools-proxy-support/src/system-ca.ts +++ b/packages/devtools-proxy-support/src/system-ca.ts @@ -165,13 +165,12 @@ export function sortByExpirationDate(ca: ParsedX509Cert[]) { }); } -const nodeVersion = process.versions.node.slice(1).split('.').map(Number); +const nodeVersion = process.versions.node.split('.').map(Number); export function tlsSupportsAllowPartialTrustChainFlag(): boolean { // TODO: Remove this flag and all X.509 parsing here once all our products // are at least on these Node.js versions return ( - !!(process as any).__tlsSupportsAllowPartialTrustChainFlag || // for mongosh patch (nodeVersion[0] >= 22 && nodeVersion[1] >= 9) || // https://github.com/nodejs/node/commit/c2bf0134c (nodeVersion[0] === 20 && nodeVersion[1] >= 18) ); // https://github.com/nodejs/node/commit/1b3420274