From 6e5abc4ad6ffcbacdef4d31a11898af0dbbc6f4e Mon Sep 17 00:00:00 2001 From: Filip Skokan Date: Mon, 23 Jan 2023 11:35:42 +0100 Subject: [PATCH] refactor: remove engines entry, update runtime node version check --- lib/provider.js | 6 +++--- package.json | 3 --- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/lib/provider.js b/lib/provider.js index 4912d4ffc..a5602e6e8 100644 --- a/lib/provider.js +++ b/lib/provider.js @@ -26,9 +26,9 @@ import get from './helpers/_/get.js'; import DPoPNonces from './helpers/dpop_nonces.js'; const minimal = 'Hydrogen'; -const { lts } = process.release; -if (!lts || lts.charCodeAt(0) < minimal.charCodeAt(0)) { - attention.warn('Unsupported Node.js runtime version.'); +const { lts: codename } = process.release || {}; +if (!codename || codename.charCodeAt(0) < minimal.charCodeAt(0)) { + attention.warn('Unsupported runtime. Use Node.js v18.x LTS, or a later LTS release.'); } async function getInteraction(req, res) { diff --git a/package.json b/package.json index d812ad460..7c8cca8c0 100644 --- a/package.json +++ b/package.json @@ -96,8 +96,5 @@ "sinon": "^15.0.0", "supertest": "^6.3.1", "timekeeper": "^2.2.0" - }, - "engines": { - "node": "18" } }