From 10f3d69fc3db47a05197cf784228613418fc4179 Mon Sep 17 00:00:00 2001
From: Karel Ledru <karel@ledrumathe.com>
Date: Sun, 7 May 2023 22:15:49 -0400
Subject: [PATCH] Bump to 8.x.x

---
 .github/workflows/node.js.yml | 2 +-
 CHANGELOG.md                  | 5 +++++
 README.md                     | 5 ++++-
 docs/migration.md             | 6 ++++++
 package.json                  | 4 ++--
 test/parser.test.js           | 4 ++--
 6 files changed, 20 insertions(+), 6 deletions(-)

diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml
index b6ef6bf1..5460bbfb 100644
--- a/.github/workflows/node.js.yml
+++ b/.github/workflows/node.js.yml
@@ -14,7 +14,7 @@ jobs:
     runs-on: ubuntu-latest
     strategy:
       matrix:
-        node-version: [14.x, 16.x, 18.x]
+        node-version: [16.x, 18.x, 20.x]
     steps:
     - uses: actions/checkout@v3
     - name: Use Node.js ${{ matrix.node-version }}
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 54dd80fd..c77471fd 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,10 @@
 # Changelog
 
+# 8.0.0
+
+- Drop support for node 14
+- Add support for node 20
+
 # 7.9.0
 
 - Add support for string concatenation in default values #817
diff --git a/README.md b/README.md
index 322b2870..3c04b971 100644
--- a/README.md
+++ b/README.md
@@ -23,12 +23,15 @@ Finally, if you want to make this process even less painful, I invite you to che
 - Supports i18next features:
   - **Context**: keys of the form `key_context`
   - **Plural**: keys of the form `key_zero`, `key_one`, `key_two`, `key_few`, `key_many` and `key_other` as described [here](https://www.i18next.com/translation-function/plurals)
-- `6.x` is tested on Node 14 and 16.
 
 ## Versions
 
 You can find information about major releases on the [dedicated page](https://github.com/i18next/i18next-parser/releases). The [migration documentation](docs/migration.md) will help you figure out the breaking changes between versions.
 
+- `8.x` is tested on Node 16, 18 and 20.
+- `7.x` is tested on Node 14, 16 and 18.
+- `6.x` is tested on Node 14 and 16.
+
 ## Usage
 
 ### CLI
diff --git a/docs/migration.md b/docs/migration.md
index 72703e81..1aa5e399 100644
--- a/docs/migration.md
+++ b/docs/migration.md
@@ -1,3 +1,9 @@
+# Migrating from `7.x` to `8.x`
+
+## Breaking changes
+
+- Support for Node 14 is dropped. Node 16, 18 and 20 are supported.
+
 # Migrating from `6.x` to `7.x`
 
 ## Breaking changes
diff --git a/package.json b/package.json
index c9674716..2aabc0da 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
 {
   "name": "i18next-parser",
   "description": "Command Line tool for i18next",
-  "version": "7.9.0",
+  "version": "8.0.0",
   "type": "module",
   "license": "MIT",
   "author": "Karel Ledru",
@@ -11,7 +11,7 @@
     "i18next": "./bin/cli.js"
   },
   "engines": {
-    "node": "^14.13.1 || >=16.0.0 || >=18.0.0",
+    "node": ">=16.0.0 || >=18.0.0 || >=20.0.0",
     "npm": ">=6",
     "yarn": ">=1"
   },
diff --git a/test/parser.test.js b/test/parser.test.js
index a6b02334..a559fa69 100644
--- a/test/parser.test.js
+++ b/test/parser.test.js
@@ -2484,7 +2484,7 @@ describe('parser', () => {
       i18nextParser.end(fakeFile)
     })
 
-    it('emits a `error` event if the catalog is not valid json', (done) => {
+    it.only('emits a `error` event if the catalog is not valid json', (done) => {
       const i18nextParser = new i18nTransform({
         output: 'test/locales/$LOCALE/$NAMESPACE.json',
       })
@@ -2494,7 +2494,7 @@ describe('parser', () => {
       })
 
       i18nextParser.on('error', (error) => {
-        assert.equal(error.message.startsWith('Unexpected token /'), true)
+        assert.match(error.message, /^Unexpected token '?\/'?/)
         done()
       })
       i18nextParser.end(fakeFile)