Skip to content

Commit 5cc3422

Browse files
committedJun 4, 2023
Require Node.js 16
1 parent bd8a403 commit 5cc3422

File tree

4 files changed

+16
-26
lines changed

4 files changed

+16
-26
lines changed
 

‎.github/workflows/main.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ jobs:
1414
- windows-latest
1515
- macos-latest
1616
node-version:
17+
- 20
18+
- 18
1719
- 16
18-
- 14
19-
- 12
2020
steps:
21-
- uses: actions/checkout@v2
22-
- uses: actions/setup-node@v2
21+
- uses: actions/checkout@v3
22+
- uses: actions/setup-node@v3
2323
with:
2424
node-version: ${{ matrix.node-version }}
2525
- run: npm install

‎index.d.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import {ListenOptions} from 'node:net';
1+
import {type ListenOptions} from 'node:net';
22

3-
export interface Options extends Omit<ListenOptions, 'port'> {
3+
export type Options = {
44
/**
55
A preferred port or an iterable of preferred ports to use.
66
*/
@@ -19,7 +19,7 @@ export interface Options extends Omit<ListenOptions, 'port'> {
1919
By default, it checks availability on all local addresses defined in [OS network interfaces](https://nodejs.org/api/os.html#os_os_networkinterfaces). If this option is set, it will only check the given host.
2020
*/
2121
readonly host?: string;
22-
}
22+
} & Omit<ListenOptions, 'port'>;
2323

2424
/**
2525
Get an available TCP port number.

‎package.json

+9-7
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,12 @@
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+
},
1518
"engines": {
16-
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
19+
"node": ">=16"
1720
},
1821
"scripts": {
1922
"test": "xo && ava && tsd"
@@ -40,11 +43,10 @@
4043
"chosen"
4144
],
4245
"devDependencies": {
43-
"@types/node": "^16.10.2",
44-
"ava": "^3.15.0",
45-
"tsd": "^0.17.0",
46-
"typescript": "^4.4.3",
47-
"xo": "^0.45.0"
46+
"@types/node": "^20.2.5",
47+
"ava": "^5.3.0",
48+
"tsd": "^0.28.1",
49+
"xo": "^0.54.2"
4850
},
4951
"sideEffects": false
5052
}

‎readme.md

-12
Original file line numberDiff line numberDiff line change
@@ -103,15 +103,3 @@ Race conditions in the same process are mitigated against by using a lightweight
103103
## Related
104104

105105
- [get-port-cli](https://github.com/sindresorhus/get-port-cli) - CLI for this module
106-
107-
---
108-
109-
<div align="center">
110-
<b>
111-
<a href="https://tidelift.com/subscription/pkg/npm-get-port?utm_source=npm-get-port&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
112-
</b>
113-
<br>
114-
<sub>
115-
Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
116-
</sub>
117-
</div>

0 commit comments

Comments
 (0)
Please sign in to comment.