Skip to content

Commit ad9ef54

Browse files
authored
fix(devtools-proxy-support): fix node version check (#480)
`process.version === 'v' + process.versions.node` 🙃
1 parent bd599ce commit ad9ef54

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

packages/devtools-proxy-support/src/system-ca.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,13 +165,12 @@ export function sortByExpirationDate(ca: ParsedX509Cert[]) {
165165
});
166166
}
167167

168-
const nodeVersion = process.versions.node.slice(1).split('.').map(Number);
168+
const nodeVersion = process.versions.node.split('.').map(Number);
169169

170170
export function tlsSupportsAllowPartialTrustChainFlag(): boolean {
171171
// TODO: Remove this flag and all X.509 parsing here once all our products
172172
// are at least on these Node.js versions
173173
return (
174-
!!(process as any).__tlsSupportsAllowPartialTrustChainFlag || // for mongosh patch
175174
(nodeVersion[0] >= 22 && nodeVersion[1] >= 9) || // https://github.com/nodejs/node/commit/c2bf0134c
176175
(nodeVersion[0] === 20 && nodeVersion[1] >= 18)
177176
); // https://github.com/nodejs/node/commit/1b3420274

0 commit comments

Comments
 (0)