Back to Explore

sindresorhus/default-browser

GitHub
1 updates · last 90 days2 watchersOpen source

Last release:

A Node.js package that retrieves the system’s currently configured default web browser. It works on macOS, Linux, and Windows and returns browser details such as the name and id, useful for applications that need to open links in the user’s preferred browser.

Project status

  • Actively maintained, with very recent activity (last upstream push 2026-08-16, latest updates v5.5.1 on 2026-08-16, v5.5.0 on 2026-02-02, v5.4.0 on 2025-11-15).
  • Apparent update cadence is roughly every 2 to 3 months recently (Nov 2025 to Feb 2026 to Aug 2026), suggesting an ongoing evolution rather than maintenance mode.

AI summary generated

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

Recent updates

  • v5.5.1

    Release v5.5.1 makes Windows lookups more reliable by invoking reg.exe via a fully-qualified path instead of relying on PATH resolution. The change is localized to the Windows implementation of default browser detection.

  • v5.5.0

    v5.5.0 improves Windows default browser detection by matching ProgIds that include hash-like suffixes (using dot and hyphen separators). It also changes how unknown ProgIds are handled during Windows parsing. The release notes mention both improvements.

  • v5.4.0

    v5.4.0 updates the Windows browser detection logic to recognize additional Windows browser ProgIds. The release notes only mention broader Windows support, but the code diff shows concrete changes to the mapping of browser channels to browser IDs.

    BreakingFeatures
  • v5.3.0

    v5.3.0 adds detection support for Microsoft Edge Beta on Windows. The code change maps the Edge Beta ProgId to the browser name "Edge Beta" so existing default-browser resolution can recognize it.

    Features
  • v5.2.1

    v5.2.1 makes a small Linux-specific change to the defaultBrowser() implementation. The documented intent is to fix getting the default browser on Linux (likely related to how xdg-mime output is handled).

  • v5.2.0

    Release v5.2.0 primarily claims to reduce dependencies. The code changes remove the use of `execa` and `titleize` and replace them with Node built-ins (`child_process.execFile` and an inlined titleize implementation), along with a few dependency version bumps.

  • v5.1.0

    Release v5.1.0 adds support for detecting Brave as the Windows default browser by mapping Brave ProgIds to the corresponding browser identifiers. The code change is localized to Windows ProgId parsing, with added test coverage for stable, beta, and nightly variants.

    Features
  • v5.0.0

    v5.0.0 raises the supported Node.js version to 18 and updates the package metadata and dependency set. The release notes only mention the Node.js requirement, but the diff also shows a change to package exports, multiple dependency major bumps, and an updated TypeScript definition comment for the browser.id field.

    Breaking
  • v4.0.0

    v4.0.0 raises the supported Node.js version and updates the implementation and dependency stack for determining the system default browser. The main functional change is on Linux, where browser detection now shells out to `xdg-mime` and formats the display name, instead of using `xdg-default-browser`.

    Breaking
  • v3.1.0

    Release v3.1.0 updates the Windows default browser detection logic to improve the error message when an unknown browser ID is encountered. The only code change is in how the unknown ID is extracted and reported in the UnknownBrowserError.

  • v3.0.0

    v3.0.0 makes the package incompatible with older Node.js runtimes and switches the module format to pure ESM. It also adds Windows support and includes TypeScript type definitions for improved developer experience.

    BreakingFeatures