From f39cd942f9dda3689bff35d472fda25011ef1086 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rouven=20We=C3=9Fling?= Date: Wed, 4 Apr 2018 11:21:20 +0200 Subject: [PATCH] Remove workarounds for old Node.js versions --- lib/extensions.js | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/lib/extensions.js b/lib/extensions.js index 4c410f5d5..e071f8499 100644 --- a/lib/extensions.js +++ b/lib/extensions.js @@ -306,10 +306,6 @@ function getBinaryPath() { binaryPath = path.join(getBinaryDir(), getBinaryName().replace(/_(?=binding\.node)/, '/')); } - if (process.versions.modules < 46) { - return binaryPath; - } - try { return trueCasePathSync(binaryPath) || binaryPath; } catch (e) { @@ -430,12 +426,6 @@ function getPlatformVariant() { try { contents = fs.readFileSync(process.execPath); - // Buffer.indexOf was added in v1.5.0 so cast to string for old node - // Delay contents.toStrings because it's expensive - if (!contents.indexOf) { - contents = contents.toString(); - } - if (contents.indexOf('libc.musl-x86_64.so.1') !== -1) { return 'musl'; }