Back to Explore

unjs/get-port-please

GitHub
1 watchersOpen source

Last release: 11 months ago

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, with an upstream push on 2026-06-05 and the most recent tagged update being v3.2.0 on 2025-07-11.
  • Apparent update cadence is somewhat irregular, with updates at v3.2.0 (2025-07-11), then a long gap to v3.1.2 (2024-01-09), and another gap to v3.1.1 (2023-09-06).

AI summary generated Today

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

Recent updates

  • v3.2.0

    11 months ago

    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

    1/9/2024

    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

    9/6/2023

    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

    9/6/2023

    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