From 9d99b522036b66df0a4f19acb6f113e234a98227 Mon Sep 17 00:00:00 2001 From: Manuel Trezza <5673677+mtrezza@users.noreply.github.com> Date: Wed, 17 Jul 2024 18:13:50 +0200 Subject: [PATCH 1/8] fix node version --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2cd07c5edc..ae8d4d22a1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -103,7 +103,7 @@ "yaml": "1.10.0" }, "engines": { - "node": "18 || 19 || 20 || 22" + "node": ">=18.0.0 <19.0.0 || >=19.0.0 <20.0.0 || >=20.0.0 <21.0.0 || >=22.0.0 <23.0.0" }, "funding": { "type": "opencollective", diff --git a/package.json b/package.json index f7dbf5c0a8..994adae466 100644 --- a/package.json +++ b/package.json @@ -139,7 +139,7 @@ "madge:circular": "node_modules/.bin/madge ./src --circular" }, "engines": { - "node": "18 || 19 || 20 || 22" + "node": ">=18.0.0 <19.0.0 || >=19.0.0 <20.0.0 || >=20.0.0 <21.0.0 || >=22.0.0 <23.0.0" }, "bin": { "parse-server": "bin/parse-server" From 5e7dc725dae3981e20b6970beb92e5af609fcf47 Mon Sep 17 00:00:00 2001 From: Manuel Trezza <5673677+mtrezza@users.noreply.github.com> Date: Wed, 17 Jul 2024 18:30:27 +0200 Subject: [PATCH 2/8] Update postinstall.js --- postinstall.js | 93 +++++++++++++++++++++++++++----------------------- 1 file changed, 51 insertions(+), 42 deletions(-) diff --git a/postinstall.js b/postinstall.js index fe1fc96bae..61885cb67d 100644 --- a/postinstall.js +++ b/postinstall.js @@ -1,50 +1,59 @@ +const semver = require('semver'); const pkg = require('./package.json'); -const version = parseFloat(process.version.substring(1)); -const minimum = parseFloat(pkg.engines.node.match(/\d+/g).join('.')); - -module.exports = function () { - const openCollective = ` - 1111111111 - 1111111111111111 - 1111111111111111111111 - 11111111111111111111111111 - 111111111111111 11111111 - 1111111111111 111111 - 1111111111111 111111111 111111 - 111111111111 11111111111 111111 - 1111111111111 11111111111 111111 - 1111111111111 1111111111 111111 - 1111111111111111111111111 1111111 - 11111111 11111111 - 111111 1111111111111111111 - 11111 11111 111111111111111111 - 11111 11111111111111111 - 111111 111111111111111111 - 11111111111111111111111111 - 1111111111111111111111 - 111111111111111111 - 11111111111 - - - Thanks for installing parse 🙏 - Please consider donating to our open collective - to help us maintain this package. - - 👉 https://opencollective.com/parse-server - - `; +// Get current Node version without leading 'v' +const currentNodeVersion = process.version; +const normalizedNodeVersion = currentNodeVersion.startsWith('v') ? currentNodeVersion.slice(1) : currentNodeVersion; + +// Check if current Node version satisfies the engines.node version +const requiredNodeVersion = pkg.engines.node; +const isNodeVersionSatisfied = semver.satisfies(normalizedNodeVersion, requiredNodeVersion); + +const openCollective = ` + 1111111111 + 1111111111111111 + 1111111111111111111111 + 11111111111111111111111111 + 111111111111111 11111111 + 1111111111111 111111 + 1111111111111 111111111 111111 + 111111111111 11111111111 111111 + 1111111111111 11111111111 111111 + 1111111111111 1111111111 111111 + 1111111111111111111111111 1111111 + 11111111 11111111 + 111111 1111111111111111111 + 11111 11111 111111111111111111 + 11111 11111111111111111 + 111111 111111111111111111 + 11111111111111111111111111 + 1111111111111111111111 + 111111111111111111 + 11111111111 + + + Thanks for installing parse 🙏 +Please consider donating to our open collective + to help us maintain this package. + +👉 https://opencollective.com/parse-server +`; + +const errorMessage = ` + + ⚠️ Parse Server requires Node.js versions '${requiredNodeVersion}'. + The current Node version ${currentNodeVersion} is not supported. +`; + +function main() { process.stdout.write(openCollective); - if (version >= minimum) { + + if (isNodeVersionSatisfied) { process.exit(0); } - const errorMessage = ` - ⚠️ parse-server requires at least node@${minimum}! - You have node@${version} - - `; - process.stdout.write(errorMessage); process.exit(1); -}; +} + +module.exports = main; From e6e7de350a6a5a468b6dfd356bcfa49510b0dd98 Mon Sep 17 00:00:00 2001 From: Manuel Trezza <5673677+mtrezza@users.noreply.github.com> Date: Wed, 17 Jul 2024 18:39:36 +0200 Subject: [PATCH 3/8] Update postinstall.js --- postinstall.js | 55 +++++++++++++++++++++++++------------------------- 1 file changed, 28 insertions(+), 27 deletions(-) diff --git a/postinstall.js b/postinstall.js index 61885cb67d..4f4aaac011 100644 --- a/postinstall.js +++ b/postinstall.js @@ -10,38 +10,39 @@ const requiredNodeVersion = pkg.engines.node; const isNodeVersionSatisfied = semver.satisfies(normalizedNodeVersion, requiredNodeVersion); const openCollective = ` - 1111111111 - 1111111111111111 - 1111111111111111111111 - 11111111111111111111111111 - 111111111111111 11111111 - 1111111111111 111111 - 1111111111111 111111111 111111 - 111111111111 11111111111 111111 - 1111111111111 11111111111 111111 - 1111111111111 1111111111 111111 - 1111111111111111111111111 1111111 - 11111111 11111111 - 111111 1111111111111111111 - 11111 11111 111111111111111111 - 11111 11111111111111111 - 111111 111111111111111111 - 11111111111111111111111111 - 1111111111111111111111 - 111111111111111111 - 11111111111 - - - Thanks for installing parse 🙏 -Please consider donating to our open collective - to help us maintain this package. - + 1111111111 + 1111111111111111 + 1111111111111111111111 + 11111111111111111111111111 + 111111111111111 11111111 + 1111111111111 111111 + 1111111111111 111111111 111111 + 111111111111 11111111111 111111 + 1111111111111 11111111111 111111 + 1111111111111 1111111111 111111 + 1111111111111111111111111 1111111 + 11111111 11111111 + 111111 1111111111111111111 + 11111 11111 111111111111111111 + 11111 11111111111111111 + 111111 111111111111111111 + 11111111111111111111111111 + 1111111111111111111111 + 111111111111111111 + 11111111111 + + + Thank you for using Parse Platform 🙏 + https://parseplatform.org + +Please consider donating to help us maintain + this package. 👉 https://opencollective.com/parse-server `; const errorMessage = ` - ⚠️ Parse Server requires Node.js versions '${requiredNodeVersion}'. + Parse Server requires Node.js versions '${requiredNodeVersion}'. The current Node version ${currentNodeVersion} is not supported. `; From 447407c3dc9dd9bfc0e00f7c32d7eea93d2c7ac9 Mon Sep 17 00:00:00 2001 From: Manuel Trezza <5673677+mtrezza@users.noreply.github.com> Date: Wed, 17 Jul 2024 18:42:30 +0200 Subject: [PATCH 4/8] Update postinstall.js --- postinstall.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/postinstall.js b/postinstall.js index 4f4aaac011..76bba7845e 100644 --- a/postinstall.js +++ b/postinstall.js @@ -31,13 +31,12 @@ const openCollective = ` 111111111111111111 11111111111 - - Thank you for using Parse Platform 🙏 + Thank you for using Parse Platform! https://parseplatform.org Please consider donating to help us maintain this package. -👉 https://opencollective.com/parse-server +👉 https://opencollective.com/parse-server 👈 `; const errorMessage = ` From 38693151fc2a817d12648dfd4bd21571576cdad5 Mon Sep 17 00:00:00 2001 From: Manuel Trezza <5673677+mtrezza@users.noreply.github.com> Date: Wed, 17 Jul 2024 18:46:07 +0200 Subject: [PATCH 5/8] remove version check --- postinstall.js | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/postinstall.js b/postinstall.js index 76bba7845e..7ae911ff94 100644 --- a/postinstall.js +++ b/postinstall.js @@ -1,14 +1,3 @@ -const semver = require('semver'); -const pkg = require('./package.json'); - -// Get current Node version without leading 'v' -const currentNodeVersion = process.version; -const normalizedNodeVersion = currentNodeVersion.startsWith('v') ? currentNodeVersion.slice(1) : currentNodeVersion; - -// Check if current Node version satisfies the engines.node version -const requiredNodeVersion = pkg.engines.node; -const isNodeVersionSatisfied = semver.satisfies(normalizedNodeVersion, requiredNodeVersion); - const openCollective = ` 1111111111 1111111111111111 @@ -39,21 +28,9 @@ Please consider donating to help us maintain 👉 https://opencollective.com/parse-server 👈 `; -const errorMessage = ` - - Parse Server requires Node.js versions '${requiredNodeVersion}'. - The current Node version ${currentNodeVersion} is not supported. -`; - function main() { process.stdout.write(openCollective); - - if (isNodeVersionSatisfied) { - process.exit(0); - } - - process.stdout.write(errorMessage); - process.exit(1); + process.exit(0); } module.exports = main; From b8abf49796e71d0a7e975a865c98f8f1b6437cc7 Mon Sep 17 00:00:00 2001 From: Manuel Trezza <5673677+mtrezza@users.noreply.github.com> Date: Wed, 17 Jul 2024 18:49:25 +0200 Subject: [PATCH 6/8] fix parse logo --- postinstall.js | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/postinstall.js b/postinstall.js index 7ae911ff94..bc9162382e 100644 --- a/postinstall.js +++ b/postinstall.js @@ -1,19 +1,19 @@ const openCollective = ` 1111111111 - 1111111111111111 + 1111111111111111 1111111111111111111111 11111111111111111111111111 111111111111111 11111111 - 1111111111111 111111 + 1111111111111 111111 1111111111111 111111111 111111 111111111111 11111111111 111111 - 1111111111111 11111111111 111111 - 1111111111111 1111111111 111111 - 1111111111111111111111111 1111111 - 11111111 11111111 + 1111111111111 11111111111 111111 + 1111111111111 1111111111 111111 + 1111111111111111111111111 1111111 + 11111111 11111111 111111 1111111111111111111 11111 11111 111111111111111111 - 11111 11111111111111111 + 11111 11111111111111111 111111 111111111111111111 11111111111111111111111111 1111111111111111111111 @@ -26,6 +26,7 @@ const openCollective = ` Please consider donating to help us maintain this package. 👉 https://opencollective.com/parse-server 👈 + `; function main() { From fea76f727fd7641d7aa37a1996dd224081f03ac1 Mon Sep 17 00:00:00 2001 From: Manuel Trezza <5673677+mtrezza@users.noreply.github.com> Date: Wed, 17 Jul 2024 19:03:59 +0200 Subject: [PATCH 7/8] fix logo --- postinstall.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/postinstall.js b/postinstall.js index bc9162382e..2b0840df57 100644 --- a/postinstall.js +++ b/postinstall.js @@ -1,19 +1,19 @@ -const openCollective = ` +const message = ` 1111111111 1111111111111111 1111111111111111111111 11111111111111111111111111 111111111111111 11111111 - 1111111111111 111111 + 1111111111111 111 111111 1111111111111 111111111 111111 111111111111 11111111111 111111 1111111111111 11111111111 111111 1111111111111 1111111111 111111 1111111111111111111111111 1111111 11111111 11111111 - 111111 1111111111111111111 + 111111 111 1111111111111111111 11111 11111 111111111111111111 - 11111 11111111111111111 + 11111 1 11111111111111111 111111 111111111111111111 11111111111111111111111111 1111111111111111111111 @@ -30,7 +30,7 @@ Please consider donating to help us maintain `; function main() { - process.stdout.write(openCollective); + process.stdout.write(message); process.exit(0); } From c37f2ccc71bfcafb59d978c0126b8e114244ca8b Mon Sep 17 00:00:00 2001 From: Manuel Trezza <5673677+mtrezza@users.noreply.github.com> Date: Wed, 17 Jul 2024 19:06:00 +0200 Subject: [PATCH 8/8] minor style --- postinstall.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/postinstall.js b/postinstall.js index 2b0840df57..409ad04e05 100644 --- a/postinstall.js +++ b/postinstall.js @@ -20,11 +20,12 @@ const message = ` 111111111111111111 11111111111 - Thank you for using Parse Platform! - https://parseplatform.org + Thank you for using Parse Platform! + https://parseplatform.org Please consider donating to help us maintain - this package. + this package: + 👉 https://opencollective.com/parse-server 👈 `;