Skip to content

Commit f8f8835

Browse files
authored
chore(node): deprecate node 16 (#200)
Take minor bumps from dependabot
1 parent 66d0c96 commit f8f8835

File tree

6 files changed

+186
-130
lines changed

6 files changed

+186
-130
lines changed

.github/workflows/main-health-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
runs-on: ubuntu-latest
1111
strategy:
1212
matrix:
13-
node: [ '16.x', '18.x' ]
13+
node: [ '18.x' ] # This package cannot be tested under node 20+ in cicd due to the changed formatting system. See Readme.
1414
name: Node ${{ matrix.node }}
1515
steps:
1616
- uses: actions/checkout@v2

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212
strategy:
1313
matrix:
14-
node: [ '16.x', '18.x' ]
14+
node: [ '18.x' ] # This package cannot be tested under node 20+ in cicd due to the changed formatting system. See Readme.
1515
name: Node ${{ matrix.node }}
1616
steps:
1717
- uses: actions/checkout@v2

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,12 @@ message** section in the [contribution guidelines](./CONTRIBUTING.md).
8686

8787
<br />
8888

89+
## Node 20 and above.
90+
91+
This package has been updated to be compatible with Node 20 and Node 22, however since the JSON error messages changed in these versions, automated testing for these versions is not possible.
92+
93+
When Node 18 is EOL, test targets for 20 and 22 will be added.
94+
8995
## 🏆 Contributing
9096

9197
See [contributing guidelines](./CONTRIBUTING.md)

index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,8 @@ function jsonParseContext(serialized, reviver, opts) {
152152
try {
153153
return JSON.parse(serialized, reviver);
154154
} catch (e) {
155-
const syntaxErr = e.message.match(/^unexpected .*position\s+(\d+)/i);
155+
const syntaxErr = e.message.match(/^unexpected .*position\s+(\d+)/i)
156+
|| e.message.match(/^expected .*at position\s+(\d+)/i);
156157
const endOfJsonErr = e.message.match(/^unexpected end of json.*/i) ? serialized.length - 1 : null;
157158
const errIdx = syntaxErr
158159
? +syntaxErr[1]

0 commit comments

Comments
 (0)