Skip to content

Commit 5be749e

Browse files
committed
Require Node.js 14
1 parent f9a6283 commit 5be749e

File tree

4 files changed

+16
-15
lines changed

4 files changed

+16
-15
lines changed

.github/workflows/main.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,11 @@ jobs:
1010
fail-fast: false
1111
matrix:
1212
node-version:
13+
- 18
1314
- 16
1415
steps:
15-
- uses: actions/checkout@v2
16-
- uses: actions/setup-node@v2
16+
- uses: actions/checkout@v3
17+
- uses: actions/setup-node@v3
1718
with:
1819
node-version: ${{ matrix.node-version }}
1920
- run: npm install

index.d.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
export interface Options {
22
/**
3-
Replace comments with whitespace instead of stripping them entirely.
3+
Strip trailing commas in addition to comments.
44
55
@default true
66
*/
7-
readonly whitespace?: boolean;
7+
readonly trailingCommas?: boolean;
88

99
/**
10-
Strip trailing commas in addition to comments.
10+
Replace comments and trailing commas with whitespace instead of stripping them entirely.
1111
1212
@default true
1313
*/
14-
readonly trailingCommas?: boolean;
14+
readonly whitespace?: boolean;
1515
}
1616

1717
/**

package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@
1212
},
1313
"type": "module",
1414
"exports": "./index.js",
15+
"types": "./index.d.ts",
1516
"engines": {
16-
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
17+
"node": ">=14.16"
1718
},
1819
"scripts": {
1920
"test": "xo && ava && tsd",
@@ -41,10 +42,10 @@
4142
"jsonc"
4243
],
4344
"devDependencies": {
44-
"ava": "^3.15.0",
45+
"ava": "^4.3.1",
4546
"matcha": "^0.7.0",
46-
"tsd": "^0.17.0",
47-
"xo": "^0.44.0"
47+
"tsd": "^0.22.0",
48+
"xo": "^0.51.0"
4849
},
4950
"xo": {
5051
"rules": {

readme.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ Also available as a [Gulp](https://github.com/sindresorhus/gulp-strip-json-comme
1717

1818
## Install
1919

20-
```
21-
$ npm install strip-json-comments
20+
```sh
21+
npm install strip-json-comments
2222
```
2323

2424
## Usage
@@ -49,7 +49,6 @@ Accepts a string with JSON and returns a string without comments.
4949

5050
Type: `object`
5151

52-
5352
##### trailingCommas
5453

5554
Type: `boolean`\
@@ -66,8 +65,8 @@ Replace comments and trailing commas with whitespace instead of stripping them e
6665

6766
## Benchmark
6867

69-
```
70-
$ npm run bench
68+
```sh
69+
npm run bench
7170
```
7271

7372
## Related

0 commit comments

Comments
 (0)