From a6bfe21b05b7fe32762fa8744700fc0cda736287 Mon Sep 17 00:00:00 2001
From: Will Hunt <will@half-shot.uk>
Date: Mon, 25 Jul 2022 17:14:31 +0100
Subject: [PATCH] Drop support for Node 12, default to Node 16 (#811)

* Drop support for Node 12
Enable support for Node 18

* Don't be too hasty

* changelog
---
 .github/workflows/tests.yml | 4 ++--
 Dockerfile                  | 4 ++--
 changelog.d/811.removal     | 1 +
 package.json                | 4 ++--
 4 files changed, 7 insertions(+), 6 deletions(-)
 create mode 100644 changelog.d/811.removal

diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index 3b33cee..4901c70 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -10,14 +10,14 @@ jobs:
     - name: Use Node.js
       uses: actions/setup-node@v1
       with:
-        node-version: 14
+        node-version: 16
     - run: yarn
     - run: yarn lint
   test:
     runs-on: ubuntu-latest
     strategy:
       matrix:
-        node_version: [12, 14, 16]
+        node_version: [14, 16, 18]
     steps:
       - uses: actions/checkout@v2
       - name: Use Node.js ${{ matrix.node_version }}
diff --git a/Dockerfile b/Dockerfile
index c9c379c..9d6cdad 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,11 +1,11 @@
-FROM node:14-alpine AS BUILD
+FROM node:16-alpine AS BUILD
 COPY . /tmp/src
 # install some dependencies needed for the build process
 RUN apk add --no-cache -t build-deps make gcc g++ python ca-certificates libc-dev wget git
 RUN cd /tmp/src \
     && yarn
 
-FROM node:14-alpine
+FROM node:16-alpine
 ENV NODE_ENV=production
 COPY --from=BUILD /tmp/src/build /build
 COPY --from=BUILD /tmp/src/config /config
diff --git a/changelog.d/811.removal b/changelog.d/811.removal
new file mode 100644
index 0000000..711123c
--- /dev/null
+++ b/changelog.d/811.removal
@@ -0,0 +1 @@
+Node.JS 12 is now unsupported, please upgrade to Node.JS 14 or later. Node.JS 16 becomes the new default version.
\ No newline at end of file
diff --git a/package.json b/package.json
index 25dea0c..1ede9b4 100644
--- a/package.json
+++ b/package.json
@@ -5,7 +5,7 @@
   "main": "discordas.js",
   "engines": {
     "npm": "please-use-yarn",
-    "node": "12.x - 16.x"
+    "node": "14.x - 18.x"
   },
   "scripts": {
     "test": "mocha -r ts-node/register test/config.ts test/test_*.ts test/**/test_*.ts",
@@ -69,7 +69,7 @@
     "@types/marked": "^1.1.0",
     "@types/mime": "^2.0.2",
     "@types/mocha": "^7.0.2",
-    "@types/node": "^12",
+    "@types/node": "^14",
     "@typescript-eslint/eslint-plugin": "^5.4.0",
     "@typescript-eslint/parser": "^5.4.0",
     "chai": "^4.2.0",
-- 
GitLab