From b701dcb8efffcee3de939cf1eac6f852d9fb6529 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E0=A4=95=E0=A4=BE=E0=A4=B0=E0=A4=A4=E0=A5=8B=E0=A4=AB?= =?UTF-8?q?=E0=A5=8D=E0=A4=AB=E0=A5=87=E0=A4=B2=E0=A4=B8=E0=A5=8D=E0=A4=95?= =?UTF-8?q?=E0=A5=8D=E0=A4=B0=E0=A4=BF=E0=A4=AA=E0=A5=8D=E0=A4=9F=E2=84=A2?= Date: Wed, 12 Jul 2023 15:03:23 +0200 Subject: [PATCH] ci!: Drop support for Node.js 16. Add initial support for Node.js 20 (#6649) We need to drop node 16 support, [as support for it is ends much earlier now, due to support for openssl 1.1.1 ending](https://nodejs.org/en/blog/announcements/nodejs16-eol). `0.236.x` releases will continue to support Node.js 16 for another two months, and `1.x.x` releases will only support Node.js 18 for now. --- .github/ISSUE_TEMPLATE/bug_report.md | 6 ++-- .github/workflows/ci-master.yml | 2 +- .github/workflows/docker-base-image.yml | 3 +- .github/workflows/docker-image-v1-rc.yml | 46 ------------------------ docker/images/n8n-base/Dockerfile | 2 +- docker/images/n8n/Dockerfile | 2 +- package.json | 2 +- packages/cli/BREAKING-CHANGES.md | 14 ++++++++ packages/cli/bin/n8n | 4 +-- packages/cli/package.json | 2 +- 10 files changed, 26 insertions(+), 57 deletions(-) delete mode 100644 .github/workflows/docker-image-v1-rc.yml diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index fdc96ff873..91b6a5669c 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -23,10 +23,10 @@ A clear and concise description of what you expected to happen. **Environment (please complete the following information):** - OS: [e.g. Ubuntu Linux 22.04] -- n8n Version [e.g. 0.200.1] -- Node.js Version [e.g. 16.17.0] +- n8n Version [e.g. 1.0.1] +- Node.js Version [e.g. 18.16.0] - Database system [e.g. SQLite; n8n uses SQLite as default otherwise changed] -- Operation mode [e.g. own; operation modes are `own`, `main` and `queue`. Default is `own`] +- Operation mode [e.g. own; operation modes are `own`, `main` and `queue`. Default is `main`] **Additional context** Add any other context about the problem here. diff --git a/.github/workflows/ci-master.yml b/.github/workflows/ci-master.yml index 9d5ca23b6c..15c83efd44 100644 --- a/.github/workflows/ci-master.yml +++ b/.github/workflows/ci-master.yml @@ -13,7 +13,7 @@ jobs: strategy: matrix: - node-version: [16.x, 18.x] + node-version: [18.x, 20.x] steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/docker-base-image.yml b/.github/workflows/docker-base-image.yml index 7351e30805..098da1d6b7 100644 --- a/.github/workflows/docker-base-image.yml +++ b/.github/workflows/docker-base-image.yml @@ -7,10 +7,11 @@ on: description: 'Node.js version to build this image with.' type: choice required: true - default: '16' + default: '18' options: - '16' - '18' + - '20' jobs: build: diff --git a/.github/workflows/docker-image-v1-rc.yml b/.github/workflows/docker-image-v1-rc.yml deleted file mode 100644 index 2fcb394a3b..0000000000 --- a/.github/workflows/docker-image-v1-rc.yml +++ /dev/null @@ -1,46 +0,0 @@ -name: Docker Image - V1 RC - -on: - schedule: - - cron: '0 2 * * *' - workflow_dispatch: - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - ref: release-v1 - - - uses: pnpm/action-setup@v2.2.4 - - uses: actions/setup-node@v3 - with: - node-version: 18.x - - run: npm install --prefix=.github/scripts --no-package-lock - - - name: Bump package versions to 1.0.0 - run: | - RELEASE_TYPE=major node .github/scripts/bump-versions.mjs - pnpm i --lockfile-only - - - uses: docker/setup-qemu-action@v2 - - uses: docker/setup-buildx-action@v2 - - - name: Login to DockerHub - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - - name: Build and push - uses: docker/build-push-action@v4 - with: - context: . - file: ./docker/images/n8n-custom/Dockerfile - platforms: linux/amd64 - provenance: false - push: true - tags: ${{ secrets.DOCKER_USERNAME }}/n8n:1.0.0-rc - no-cache: true diff --git a/docker/images/n8n-base/Dockerfile b/docker/images/n8n-base/Dockerfile index 412a45b44a..022325e31a 100644 --- a/docker/images/n8n-base/Dockerfile +++ b/docker/images/n8n-base/Dockerfile @@ -1,4 +1,4 @@ -ARG NODE_VERSION=16 +ARG NODE_VERSION=18 FROM node:${NODE_VERSION}-alpine WORKDIR /home/node diff --git a/docker/images/n8n/Dockerfile b/docker/images/n8n/Dockerfile index 71d14e2e4a..34da16ada2 100644 --- a/docker/images/n8n/Dockerfile +++ b/docker/images/n8n/Dockerfile @@ -1,4 +1,4 @@ -ARG NODE_VERSION=16 +ARG NODE_VERSION=18 FROM n8nio/base:${NODE_VERSION} ARG N8N_VERSION diff --git a/package.json b/package.json index 5fad874cd3..e37ae4779a 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "private": true, "homepage": "https://n8n.io", "engines": { - "node": ">=16.9", + "node": ">=18.10", "pnpm": ">=8.6" }, "packageManager": "pnpm@8.6.1", diff --git a/packages/cli/BREAKING-CHANGES.md b/packages/cli/BREAKING-CHANGES.md index c8f114ba7e..6744029d43 100644 --- a/packages/cli/BREAKING-CHANGES.md +++ b/packages/cli/BREAKING-CHANGES.md @@ -2,6 +2,20 @@ This list shows all the versions which include breaking changes and how to upgrade. +## 1.0.0 + +### What changed? + +The minimum Node.js version required for n8n is now v18. + +### When is action necessary? + +If you're using n8n via npm or PM2 or if you're contributing to n8n. + +### How to upgrade: + +Update the Node.js version to v18 or above. + ## 0.234.0 ### What changed? diff --git a/packages/cli/bin/n8n b/packages/cli/bin/n8n index 92c38b416b..1f81419a84 100755 --- a/packages/cli/bin/n8n +++ b/packages/cli/bin/n8n @@ -21,10 +21,10 @@ if (process.argv.length === 2) { const nodeVersion = process.versions.node; const nodeVersionMajor = require('semver').major(nodeVersion); -if (![16, 18].includes(nodeVersionMajor)) { +if (![18, 20].includes(nodeVersionMajor)) { console.log(` Your Node.js version (${nodeVersion}) is currently not supported by n8n. - Please use Node.js v16 (recommended), or v18 instead! + Please use Node.js v18 (recommended), or v20 instead! `); process.exit(1); } diff --git a/packages/cli/package.json b/packages/cli/package.json index 219654e123..3949647730 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -53,7 +53,7 @@ "workflow" ], "engines": { - "node": ">=16.9" + "node": ">=18.10" }, "files": [ "bin",