Skip to content

Commit

Permalink
fix: opn is deprecated, use open instead (#3161)
Browse files Browse the repository at this point in the history
* Update dotenv-expand to allow overriding of falsy values (#2971)

* Use open instead of opn

opn was renamed and deprecated to open
  • Loading branch information
jamesgeorge007 authored and devongovett committed Jul 14, 2019
1 parent a547688 commit 6f06b5b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/core/parcel-bundler/package.json
Expand Up @@ -61,7 +61,7 @@
"mkdirp": "^0.5.1",
"node-forge": "^0.7.1",
"node-libs-browser": "^2.0.0",
"opn": "^5.1.0",
"open": "^6.3.0",
"postcss": "^7.0.11",
"postcss-value-parser": "^3.3.1",
"posthtml": "^0.11.2",
Expand Down
4 changes: 2 additions & 2 deletions packages/core/parcel-bundler/src/utils/openInBrowser.js
@@ -1,10 +1,10 @@
const opn = require('opn');
const open = require('open');

const openInBrowser = async (url, browser) => {
try {
const options = typeof browser === 'string' ? {app: browser} : undefined;

await opn(url, options);
await open(url, options);
} catch (err) {
console.error(`Unexpected error while opening in browser: ${browser}`);
console.error(err);
Expand Down

0 comments on commit 6f06b5b

Please sign in to comment.