From 5e9c2fa44508ffbc5cf89042d44dc22c13b260d2 Mon Sep 17 00:00:00 2001 From: Alex Potsides Date: Fri, 19 May 2023 13:10:24 +0100 Subject: [PATCH] fix: do not enforce engines in package.json (#1277) The engines field causes warnings on npm but errors on yarn when the required node version is not met. Not all of our modules require LTS node and they are used by projects outside of libp2p/helia/etc. This change removes the automatic addition of an engines field to a project's `package.json` while running the `check-project` command, instead projects that do require a certain node version are free to define it and deal with the breakage that subsequently occurs. Partial revert of: #1184 Refs: https://github.com/ipfs/aegir/issues/1276 --- src/check-project/utils.js | 4 ---- src/config/.npmpackagejsonlintrc.json | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/check-project/utils.js b/src/check-project/utils.js index 8c1944bc8..3efa619de 100644 --- a/src/check-project/utils.js +++ b/src/check-project/utils.js @@ -248,10 +248,6 @@ export function constructManifest (manifest, manifestFields, repoUrl, homePage = url: `${repoUrl}/issues` }, keywords: manifest.keywords ? manifest.keywords.sort() : undefined, - engines: { - node: '>=18.0.0', - npm: '>=8.6.0' - }, bin: manifest.bin, ...manifestFields, scripts: manifest.scripts, diff --git a/src/config/.npmpackagejsonlintrc.json b/src/config/.npmpackagejsonlintrc.json index 3e3cf1d7c..0a3756afe 100644 --- a/src/config/.npmpackagejsonlintrc.json +++ b/src/config/.npmpackagejsonlintrc.json @@ -11,7 +11,7 @@ "require-description": "error", "require-devDependencies": "off", "require-directories": "off", - "require-engines": "error", + "require-engines": "off", "require-files": "error", "require-funding": "off", "require-homepage": "error" ,