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: michaellzc/better-opn
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v3.0.1
Choose a base ref
...
head repository: michaellzc/better-opn
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v3.0.2
Choose a head ref
  • 4 commits
  • 4 files changed
  • 3 contributors

Commits on Nov 5, 2021

  1. chore(release): 3.0.1

    michaellzc committed Nov 5, 2021
    Copy the full SHA
    39e961a View commit details

Commits on Jan 7, 2022

  1. Verified

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

Commits on Jan 21, 2022

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    0535875 View commit details
  2. chore(release): 3.0.2

    michaellzc committed Jan 21, 2022
    Copy the full SHA
    dd6af81 View commit details
Showing with 17 additions and 12 deletions.
  1. +6 −0 CHANGELOG.md
  2. +1 −1 README.md
  3. +5 −5 package.json
  4. +5 −6 src/index.js
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [3.0.1] - 2021-11-04

### Changed

- Urls are opened twice (#33) @jfirebaugh

## [2.1.1] - 2020-10-21

### Changed
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@

## Usage

If you wish to overwrite the default browser, override `BROWSER` environment variable to your desire browser name (name is platform dependent).
If you wish to overwrite the default browser, override `BROWSER` environment variable to your desired browser name (name is platform dependent).

```js
const opn = require('better-opn');
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "better-opn",
"version": "3.0.0",
"version": "3.0.2",
"description": "A better opn. Reuse the same tab on Chrome for 👨‍💻.",
"main": "dist/index.js",
"repository": {
@@ -37,10 +37,10 @@
]
},
"ava": {
"files": [
"tests/**/*",
"!test/host-only.js"
]
"files": [
"tests/**/*",
"!test/host-only.js"
]
},
"scripts": {
"build": "babel src -d dist",
11 changes: 5 additions & 6 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -98,14 +98,13 @@ const startBrowserProcess = (browser, url, opts = {}, args = []) => {
browser = undefined;
}

// If there are arguments, they must be passed as array with the browser
if (typeof browser === 'string' && args.length > 0) {
browser = [browser].concat(args);
}

// Fallback to opn
// (It will always open new tab)
const options = {app: browser, url: true, wait: false, ...opts};
const options = {
app: {name: browser, arguments: args},
wait: false,
...opts,
};
return require('open')(url, options);
};