From e1df30bd5c46ec8d99d5758df748f035ec93b44b Mon Sep 17 00:00:00 2001 From: David Mehren Date: Thu, 22 Apr 2021 18:46:01 +0200 Subject: [PATCH 1/3] Raise minimum required Node.js version to 12 As Node 10 will be EOL at April 30th, we should stop supporting and/or promoting the usage of that version. See also https://endoflife.date/nodejs Signed-off-by: David Mehren --- bin/setup | 4 ++-- docs/content/setup/manual-setup.md | 2 +- package.json | 2 +- public/docs/release-notes.md | 3 +++ 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/bin/setup b/bin/setup index 43df07ff9..dc3c1cbf1 100755 --- a/bin/setup +++ b/bin/setup @@ -31,11 +31,11 @@ EOF exit 1 fi -if version_lt "$(node --version)" 'v10.13.0'; then +if version_lt "$(node --version)" 'v12.0.0'; then cat << EOF FATAL: Your Node.js version is outdated. -Please upgrade to version 10.13 or higher and try again. +Please upgrade to version 12 or higher and try again. We recommend running the latest LTS release, see https://nodejs.org/en/about/releases/ for details. EOF exit 1 diff --git a/docs/content/setup/manual-setup.md b/docs/content/setup/manual-setup.md index acc739cae..64ad57c51 100644 --- a/docs/content/setup/manual-setup.md +++ b/docs/content/setup/manual-setup.md @@ -1,7 +1,7 @@ # Manual Installation !!! info "Requirements on your server" - - Node.js 10.13 or higher + - Node.js 12 or higher - Database (PostgreSQL, MySQL, MariaDB, SQLite, MSSQL) The database must use charset `utf8`. This is typically the default in PostgreSQL and SQLite. In MySQL and MariaDB UTF-8 might need to be set with `alter database character set utf8 collate utf8_bin;` diff --git a/package.json b/package.json index 3367cee44..9eef8df71 100644 --- a/package.json +++ b/package.json @@ -145,7 +145,7 @@ "**/request": "^2.88.0" }, "engines": { - "node": ">=10.13" + "node": ">=12" }, "bugs": "https://github.com/hedgedoc/hedgedoc/issues", "keywords": [ diff --git a/public/docs/release-notes.md b/public/docs/release-notes.md index b12644a24..02746a1a5 100644 --- a/public/docs/release-notes.md +++ b/public/docs/release-notes.md @@ -1,5 +1,8 @@ # Release Notes ## 1.8.0 UNRELEASED + +**Please note:** This release dropped support for Node 10, which is end-of-life since April 2021. You now need at least Node 12 to run HedgeDoc, but we recommend running [the latest LTS release](https://nodejs.org/en/about/releases/). + ### Features - Database migrations are now automatically applied on application startup. The separate `.sequelizerc` configuration file is no longer necessary and can be safely deleted. From 29e08cdb9fa421f5577d60359aaaa11627686efb Mon Sep 17 00:00:00 2001 From: David Mehren Date: Thu, 22 Apr 2021 18:47:22 +0200 Subject: [PATCH 2/3] CI: Stop running tests with Node.js 10 Signed-off-by: David Mehren --- .github/workflows/node.js.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index ad7fe8be9..791b29d81 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -39,7 +39,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node-version: [10.x, 12.x, 14.x, 15.x, 16.x] + node-version: [12.x, 14.x, 15.x, 16.x] steps: - uses: actions/checkout@v2 - name: Use Node.js ${{ matrix.node-version }} @@ -63,7 +63,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node-version: [10.x, 12.x, 14.x, 15.x, 16.x] + node-version: [12.x, 14.x, 15.x, 16.x] steps: - uses: actions/checkout@v2 - name: Use Node.js ${{ matrix.node-version }} From d52a43e81110126e900fbeb46f2255c1375520ce Mon Sep 17 00:00:00 2001 From: David Mehren Date: Thu, 22 Apr 2021 18:56:52 +0200 Subject: [PATCH 3/3] Fix version error wording in bin/setup The previous error message stated that the version of Node or Yarn is "outdated", which might be accurate coincidentally, but is not what the script checks. This commit changes the wording to use "not supported", which is more accurate to the true check in the script. Signed-off-by: David Mehren --- bin/setup | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/setup b/bin/setup index dc3c1cbf1..1ab9c3930 100755 --- a/bin/setup +++ b/bin/setup @@ -23,7 +23,7 @@ fi if version_lt "$(yarn --version)" '1.22.0'; then cat << EOF -FATAL: Your Yarn version is outdated. +FATAL: Your Yarn version is not supported. Please upgrade to version 1.22.0 or higher and try again. See https://classic.yarnpkg.com/en/docs/install for instructions. @@ -33,7 +33,7 @@ fi if version_lt "$(node --version)" 'v12.0.0'; then cat << EOF -FATAL: Your Node.js version is outdated. +FATAL: Your Node.js version is not supported. Please upgrade to version 12 or higher and try again. We recommend running the latest LTS release, see https://nodejs.org/en/about/releases/ for details.