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.
This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™ 2023-07-12 15:03:23 +02:00 committed by GitHub
parent e5620ab1e4
commit b701dcb8ef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 26 additions and 57 deletions

View file

@ -23,10 +23,10 @@ A clear and concise description of what you expected to happen.
**Environment (please complete the following information):** **Environment (please complete the following information):**
- OS: [e.g. Ubuntu Linux 22.04] - OS: [e.g. Ubuntu Linux 22.04]
- n8n Version [e.g. 0.200.1] - n8n Version [e.g. 1.0.1]
- Node.js Version [e.g. 16.17.0] - Node.js Version [e.g. 18.16.0]
- Database system [e.g. SQLite; n8n uses SQLite as default otherwise changed] - 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** **Additional context**
Add any other context about the problem here. Add any other context about the problem here.

View file

@ -13,7 +13,7 @@ jobs:
strategy: strategy:
matrix: matrix:
node-version: [16.x, 18.x] node-version: [18.x, 20.x]
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3

View file

@ -7,10 +7,11 @@ on:
description: 'Node.js version to build this image with.' description: 'Node.js version to build this image with.'
type: choice type: choice
required: true required: true
default: '16' default: '18'
options: options:
- '16' - '16'
- '18' - '18'
- '20'
jobs: jobs:
build: build:

View file

@ -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

View file

@ -1,4 +1,4 @@
ARG NODE_VERSION=16 ARG NODE_VERSION=18
FROM node:${NODE_VERSION}-alpine FROM node:${NODE_VERSION}-alpine
WORKDIR /home/node WORKDIR /home/node

View file

@ -1,4 +1,4 @@
ARG NODE_VERSION=16 ARG NODE_VERSION=18
FROM n8nio/base:${NODE_VERSION} FROM n8nio/base:${NODE_VERSION}
ARG N8N_VERSION ARG N8N_VERSION

View file

@ -4,7 +4,7 @@
"private": true, "private": true,
"homepage": "https://n8n.io", "homepage": "https://n8n.io",
"engines": { "engines": {
"node": ">=16.9", "node": ">=18.10",
"pnpm": ">=8.6" "pnpm": ">=8.6"
}, },
"packageManager": "pnpm@8.6.1", "packageManager": "pnpm@8.6.1",

View file

@ -2,6 +2,20 @@
This list shows all the versions which include breaking changes and how to upgrade. 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 ## 0.234.0
### What changed? ### What changed?

View file

@ -21,10 +21,10 @@ if (process.argv.length === 2) {
const nodeVersion = process.versions.node; const nodeVersion = process.versions.node;
const nodeVersionMajor = require('semver').major(nodeVersion); const nodeVersionMajor = require('semver').major(nodeVersion);
if (![16, 18].includes(nodeVersionMajor)) { if (![18, 20].includes(nodeVersionMajor)) {
console.log(` console.log(`
Your Node.js version (${nodeVersion}) is currently not supported by n8n. 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); process.exit(1);
} }

View file

@ -53,7 +53,7 @@
"workflow" "workflow"
], ],
"engines": { "engines": {
"node": ">=16.9" "node": ">=18.10"
}, },
"files": [ "files": [
"bin", "bin",