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/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..e0569498 100644 --- a/package.json +++ b/package.json @@ -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)