Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: sindresorhus/open
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v8.0.9
Choose a base ref
...
head repository: sindresorhus/open
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v8.1.0
Choose a head ref
  • 2 commits
  • 5 files changed
  • 2 contributors

Commits on May 22, 2021

  1. Add open.apps.edge (#252)

    Kudo authored May 22, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    aff3e84 View commit details
  2. 8.1.0

    sindresorhus committed May 22, 2021
    Copy the full SHA
    0347d3b View commit details
Showing with 13 additions and 3 deletions.
  1. +2 −1 index.d.ts
  2. +8 −0 index.js
  3. +1 −1 package.json
  4. +1 −0 readme.md
  5. +1 −1 xdg-open
3 changes: 2 additions & 1 deletion index.d.ts
Original file line number Diff line number Diff line change
@@ -43,7 +43,8 @@ declare namespace open {

type AppName =
| 'chrome'
| 'firefox';
| 'firefox'
| 'edge';

type App = {
name: string | readonly string[];
8 changes: 8 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -265,6 +265,14 @@ defineLazyProperty(apps, 'firefox', () => detectPlatformBinary({
wsl: '/mnt/c/Program Files/Mozilla Firefox/firefox.exe'
}));

defineLazyProperty(apps, 'edge', () => detectPlatformBinary({
darwin: 'microsoft edge',
win32: 'msedge',
linux: 'microsoft-edge'
}, {
wsl: '/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe'
}));

open.apps = apps;

module.exports = open;
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "open",
"version": "8.0.9",
"version": "8.1.0",
"description": "Open stuff like URLs, files, executables. Cross-platform.",
"license": "MIT",
"repository": "sindresorhus/open",
1 change: 1 addition & 0 deletions readme.md
Original file line number Diff line number Diff line change
@@ -117,6 +117,7 @@ await open('https://google.com', {

- [`chrome`](https://www.google.com/chrome) - Web browser
- [`firefox`](https://www.mozilla.org/firefox) - Web browser
- [`edge`](https://www.microsoft.com/edge) - Web browser

## Caveats

2 changes: 1 addition & 1 deletion xdg-open
Original file line number Diff line number Diff line change
@@ -926,7 +926,7 @@ open_generic()
if [ x"$BROWSER" = x"" ]; then
BROWSER=www-browser:links2:elinks:links:lynx:w3m
if has_display; then
BROWSER=x-www-browser:firefox:iceweasel:seamonkey:mozilla:epiphany:konqueror:chromium:chromium-browser:google-chrome:$BROWSER
BROWSER=x-www-browser:firefox:iceweasel:seamonkey:mozilla:epiphany:konqueror:chromium:chromium-browser:google-chrome:microsoft-edge:$BROWSER
fi
fi