fix(deps): update dependency open to v8 (#806)

* fix(deps): update dependency open to v8

* Changes

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Nathan Bierema <nbierema@gmail.com>
This commit is contained in:
renovate[bot] 2021-08-29 19:09:57 +00:00 committed by GitHub
parent b32b08552e
commit 9aac647de1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 11 additions and 11 deletions

View File

@ -58,7 +58,7 @@
"lodash": "^4.17.21",
"minimist": "^1.2.5",
"morgan": "^1.10.0",
"open": "^7.4.2",
"open": "^8.2.1",
"react": "^16.14.0",
"react-dom": "^16.14.0",
"semver": "^7.3.5",

View File

@ -3,7 +3,7 @@ import path from 'path';
import spawn from 'cross-spawn';
import { Options } from '../options';
export default function openApp(app: boolean | string, options: Options) {
export default async function openApp(app: true | string, options: Options) {
if (app === true || app === 'electron') {
try {
const port = options.port ? `--port=${options.port}` : '';
@ -31,9 +31,9 @@ export default function openApp(app: boolean | string, options: Options) {
}
return;
}
// eslint-disable-next-line @typescript-eslint/no-floating-promises
open(
await open(
`http://localhost:${options.port}/`,
app !== 'browser' ? { app: app as string } : undefined
app !== 'browser' ? { app: { name: app } } : undefined
);
}

View File

@ -90,8 +90,8 @@ if (argv.injectserver) {
// eslint-disable-next-line @typescript-eslint/no-floating-promises
server(argv).then(function (r) {
if (argv.open && argv.open !== 'false') {
r.on('ready', function () {
openApp(argv.open, options);
r.on('ready', async function () {
await openApp(argv.open, options);
});
}
});

View File

@ -14,7 +14,7 @@ export interface ExtendedOptions extends Options {
export default function (argv: { [arg: string]: any }): Promise<{
portAlreadyUsed?: boolean;
on: (status: 'ready', cb: () => void) => void;
on: (status: 'ready', cb: (() => void) | (() => Promise<void>)) => void;
}> {
const options = Object.assign(getOptions(argv), {
workerController: __dirname + '/worker.js',

View File

@ -4954,7 +4954,7 @@ __metadata:
minimist: ^1.2.5
morgan: ^1.10.0
ncp: ^2.0.0
open: ^7.4.2
open: ^8.2.1
react: ^16.14.0
react-dom: ^16.14.0
semver: ^7.3.5
@ -22783,7 +22783,7 @@ fsevents@^1.2.7:
languageName: node
linkType: hard
"open@npm:^7.0.2, open@npm:^7.0.3, open@npm:^7.4.2":
"open@npm:^7.0.2, open@npm:^7.0.3":
version: 7.4.2
resolution: "open@npm:7.4.2"
dependencies:
@ -22793,7 +22793,7 @@ fsevents@^1.2.7:
languageName: node
linkType: hard
"open@npm:^8.0.9":
"open@npm:^8.0.9, open@npm:^8.2.1":
version: 8.2.1
resolution: "open@npm:8.2.1"
dependencies: