Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/modules/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ ESLint plugin.
- [`ora`](./ora.md)
- [`path-exists`](./path-exists.md)
- [`portal-vue`](./portal-vue.md)
- [`portfinder`](./portfinder.md)
- [`pkg-dir`](./pkg-dir.md)
Comment on lines 83 to 85
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- [`portal-vue`](./portal-vue.md)
- [`portfinder`](./portfinder.md)
- [`pkg-dir`](./pkg-dir.md)
- [`pkg-dir`](./pkg-dir.md)
- [`portal-vue`](./portal-vue.md)
- [`portfinder`](./portfinder.md)

I think this is the correct order if we're doing alphabetical

- [`qs`](./qs.md)
- [`react-helmet`](./react-helmet.md)
Expand Down
19 changes: 19 additions & 0 deletions docs/modules/portfinder.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
description: Modern alternatives to the portfinder package for finding an available port
---

# Replacements for `portfinder`

## `get-port`

[`get-port`](https://github.com/sindresorhus/get-port) is a lighter and more modern package for finding an available port.

Example:

```ts
import portfinder from 'portfinder' // [!code --]
import getPort from 'get-port' // [!code ++]

const port = await portfinder.getPortPromise() // [!code --]
const port = await getPort() // [!code ++]
```
12 changes: 12 additions & 0 deletions manifests/preferred.json
Original file line number Diff line number Diff line change
Expand Up @@ -2448,6 +2448,12 @@
"replacements": ["Teleport"],
"url": {"type": "e18e", "id": "portal-vue"}
},
"portfinder": {
"type": "module",
"moduleName": "portfinder",
"replacements": ["get-port"],
"url": {"type": "e18e", "id": "portfinder"}
},
"preferred-pm": {
"type": "module",
"moduleName": "preferred-pm",
Expand Down Expand Up @@ -3068,6 +3074,12 @@
},
"url": {"type": "node", "id": "api/fs.html#fspromisesrmdirpath-options"}
},
"get-port": {
"id": "get-port",
"type": "documented",
"url": {"type": "e18e", "id": "portfinder"},
"replacementModule": "get-port"
},
"grammy": {
"id": "grammy",
"type": "documented",
Expand Down