Skip to content

Commit f2d4f13

Browse files
authored
chore(deps): introduce open and remove opn (#1865)
Because opn was renamed to open.
1 parent 2323d45 commit f2d4f13

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

lib/utils/runOpen.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict';
22

3-
const open = require('opn');
3+
const open = require('open');
44

55
function runOpen(uri, options, log) {
66
let openOptions = {};

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
"ip": "^1.1.5",
4949
"killable": "^1.0.1",
5050
"loglevel": "^1.6.2",
51-
"opn": "^5.5.0",
51+
"open": "^6.2.0",
5252
"portfinder": "^1.0.20",
5353
"schema-utils": "^1.0.0",
5454
"selfsigned": "^1.10.4",

test/Server.test.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
const { relative, sep } = require('path');
44
const webpack = require('webpack');
55
const request = require('supertest');
6-
// Mock opn before loading Server
7-
jest.mock('opn');
6+
// Mock open before loading Server
7+
jest.mock('open');
88
// eslint-disable-next-line import/newline-after-import
9-
const opn = require('opn');
10-
opn.mockImplementation(() => {
9+
const open = require('open');
10+
open.mockImplementation(() => {
1111
return {
1212
catch: jest.fn(),
1313
};
@@ -176,8 +176,8 @@ describe('Server', () => {
176176
});
177177

178178
compiler.hooks.done.tap('webpack-dev-server', () => {
179-
expect(opn.mock.calls[0]).toEqual(['http://localhost:8080/', {}]);
180-
expect(opn.mock.invocationCallOrder[0]).toEqual(1);
179+
expect(open.mock.calls[0]).toEqual(['http://localhost:8080/', {}]);
180+
expect(open.mock.invocationCallOrder[0]).toEqual(1);
181181
server.close(done);
182182
});
183183

0 commit comments

Comments
 (0)