Skip to content

Commit 76671cc

Browse files
committed
Require Node.js 18
1 parent e5722c2 commit 76671cc

File tree

6 files changed

+24
-44
lines changed

6 files changed

+24
-44
lines changed

.github/funding.yml

Lines changed: 0 additions & 4 deletions
This file was deleted.

.github/workflows/main.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,12 @@ jobs:
1010
fail-fast: false
1111
matrix:
1212
node-version:
13-
- 16
13+
- 22
14+
- 20
15+
- 18
1416
steps:
15-
- uses: actions/checkout@v2
16-
- uses: actions/setup-node@v2
17+
- uses: actions/checkout@v4
18+
- uses: actions/setup-node@v4
1719
with:
1820
node-version: ${{ matrix.node-version }}
1921
- run: npm install

index.test-d.ts

Lines changed: 0 additions & 13 deletions
This file was deleted.

package.json

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,16 @@
1111
"url": "https://sindresorhus.com"
1212
},
1313
"type": "module",
14-
"exports": "./index.js",
14+
"exports": {
15+
"types": "./index.d.ts",
16+
"default": "./index.js"
17+
},
18+
"sideEffects": false,
1519
"engines": {
16-
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
20+
"node": ">=18"
1721
},
1822
"scripts": {
19-
"test": "xo && ava && tsd"
23+
"test": "xo && ava && tsc index.d.ts"
2024
},
2125
"files": [
2226
"index.js",
@@ -38,12 +42,15 @@
3842
"command-line"
3943
],
4044
"dependencies": {
41-
"restore-cursor": "^4.0.0"
45+
"restore-cursor": "^5.0.0"
4246
},
4347
"devDependencies": {
44-
"@types/node": "^16.7.1",
45-
"ava": "^3.15.0",
46-
"tsd": "^0.17.0",
47-
"xo": "^0.44.0"
48+
"@types/node": "^20.14.12",
49+
"ava": "^6.1.3",
50+
"typescript": "^5.5.4",
51+
"xo": "^0.59.2"
52+
},
53+
"ava": {
54+
"workerThreads": false
4855
}
4956
}

readme.md

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ The cursor is [gracefully restored](https://github.com/sindresorhus/restore-curs
66

77
## Install
88

9-
```
10-
$ npm install cli-cursor
9+
```sh
10+
npm install cli-cursor
1111
```
1212

1313
## Usage
@@ -37,15 +37,3 @@ Useful for showing or hiding the cursor based on a boolean.
3737

3838
Type: `stream.Writable`\
3939
Default: `process.stderr`
40-
41-
---
42-
43-
<div align="center">
44-
<b>
45-
<a href="https://tidelift.com/subscription/pkg/npm-cli-cursor?utm_source=npm-cli-cursor&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
46-
</b>
47-
<br>
48-
<sub>
49-
Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
50-
</sub>
51-
</div>

test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ const HIDE = '\u001B[?25l';
99

1010
process.stderr.isTTY = true;
1111

12-
function getStderr(fn) {
12+
function getStderr(function_) {
1313
let result = '';
1414

1515
process.stderr.setEncoding('utf8');
1616
process.stderr.write = string => {
1717
result += string;
1818
};
1919

20-
fn();
20+
function_();
2121
process.stderr.write = write;
2222
return result;
2323
}

0 commit comments

Comments
 (0)