diff --git a/npm/oxlint/bin/oxlint b/npm/oxlint/bin/oxlint index 80d1a716e099a..40a5c240103a4 100755 --- a/npm/oxlint/bin/oxlint +++ b/npm/oxlint/bin/oxlint @@ -20,7 +20,7 @@ const isMuslFromFilesystem = () => { const { readFileSync } = require("fs"); try { return readFileSync("/usr/bin/ldd", "utf-8").includes("musl"); - } catch { + } catch(_error) { return null; } }; @@ -91,9 +91,9 @@ const PLATFORMS = { }; let binPath = ( - PLATFORMS && - PLATFORMS[platform] && - PLATFORMS[platform][arch] && + PLATFORMS && + PLATFORMS[platform] && + PLATFORMS[platform][arch] && PLATFORMS[platform][arch][isMusl() ? "musl" : "gnu"] ) || null; @@ -104,12 +104,11 @@ if (binPath) { { shell: false, stdio: "inherit", - env: { - ...env, + env: Object.assign({}, env, { JS_RUNTIME_VERSION: version, JS_RUNTIME_NAME: release.name, NODE_PACKAGE_MANAGER: detectPackageManager(), - }, + }), } ); diff --git a/npm/oxlint/package.json b/npm/oxlint/package.json index f5fab415accb9..c22329c3a1722 100644 --- a/npm/oxlint/package.json +++ b/npm/oxlint/package.json @@ -20,7 +20,7 @@ "url": "https://github.com/sponsors/Boshen" }, "engines": { - "node": ">=14.*" + "node": ">=8.*" }, "files": [ "bin/oxlint",