Back to Explore

unjs/get-port-please

GitHub
1 watchersOpen source

Last release:

get-port-please helps you find an available TCP port to listen on. It provides functions like getPort, checkPort, and waitForPort, with options to choose specific ports, port ranges, host, and random port selection.

Project status

  • Actively maintained, there is an upstream GitHub push dated 2026-06-09, indicating ongoing work rather than complete stasis.
  • Apparent update cadence is mixed: the most recent published update is v3.2.0 on 2025-07-11, which is a long gap relative to today (2026-06-09), even though fresh commits are present.

AI summary generated

AI-generated from public sources. May be inaccurate. Report

Recent updates

  • v3.2.0

    v3.2.0 adds unix domain socket utilities to the package and updates hostname handling to treat 169.254.0.0/16 as disallowed. The code diff also includes test adjustments and multiple developer tooling and CI updates (eslint, Node.js version in CI, corepack handling, and dependency upgrades).

    BreakingFeatures
  • v3.1.2

    v3.1.2 improves get-port-please port selection and hostname handling. It adds IPv6 hostname support, switches port range behavior to closed (inclusive) ranges, and adjusts the selection order to avoid falling back to random ports when the user specified ports or ranges.

    Breaking
  • v3.1.1

    v3.1.1 is primarily a small fix related to host address discovery when computing local hosts for port availability. The release notes call out ignoring IPv6 link-local addresses. The code also adds an additional filter that excludes internal (loopback or otherwise internal) network interface addresses, which is not mentioned in the release notes.

  • v3.1.0

    v3.1.0 adds automatic fallback to a hostname when an invalid host value is provided, improving robustness when obtaining ports. It also tightens hostname validation and improves error handling by skipping ports that fail to listen.

    Features