Back to Explore

sindresorhus/default-browser

GitHub
1 watchersOpen source

Last release: 4 months ago

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

  • The source appears actively maintained, with recent code and update activity (last upstream push on 2026-02-02, followed by a new update v5.5.0 the same day).
  • Apparent update cadence is a few months apart recently (v5.3.0 on 2025-11-12, v5.4.0 on 2025-11-15, then v5.5.0 on 2026-02-02), suggesting ongoing work rather than maintenance-only.

AI summary generated Today

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

Recent updates

  • v5.5.0

    4 months ago

    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

    6 months ago

    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

    6 months ago

    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

    12/27/2023

    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

    12/18/2023

    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

    8/31/2023

    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

    8/31/2023

    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

    3/26/2023

    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

    7/17/2022

    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

    3/7/2021

    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