Skip to content

Commit

Permalink
Require Node.js 14
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Jul 22, 2022
1 parent f9a6283 commit 5be749e
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 15 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@ jobs:
fail-fast: false
matrix:
node-version:
- 18
- 16
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: npm install
Expand Down
8 changes: 4 additions & 4 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
export interface Options {
/**
Replace comments with whitespace instead of stripping them entirely.
Strip trailing commas in addition to comments.
@default true
*/
readonly whitespace?: boolean;
readonly trailingCommas?: boolean;

/**
Strip trailing commas in addition to comments.
Replace comments and trailing commas with whitespace instead of stripping them entirely.
@default true
*/
readonly trailingCommas?: boolean;
readonly whitespace?: boolean;
}

/**
Expand Down
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@
},
"type": "module",
"exports": "./index.js",
"types": "./index.d.ts",
"engines": {
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
"node": ">=14.16"
},
"scripts": {
"test": "xo && ava && tsd",
Expand Down Expand Up @@ -41,10 +42,10 @@
"jsonc"
],
"devDependencies": {
"ava": "^3.15.0",
"ava": "^4.3.1",
"matcha": "^0.7.0",
"tsd": "^0.17.0",
"xo": "^0.44.0"
"tsd": "^0.22.0",
"xo": "^0.51.0"
},
"xo": {
"rules": {
Expand Down
9 changes: 4 additions & 5 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ Also available as a [Gulp](https://github.com/sindresorhus/gulp-strip-json-comme

## Install

```
$ npm install strip-json-comments
```sh
npm install strip-json-comments
```

## Usage
Expand Down Expand Up @@ -49,7 +49,6 @@ Accepts a string with JSON and returns a string without comments.

Type: `object`


##### trailingCommas

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

## Benchmark

```
$ npm run bench
```sh
npm run bench
```

## Related
Expand Down

0 comments on commit 5be749e

Please sign in to comment.