cleanup(repo): replaced deprecated opn package with open (#5236)
This commit is contained in:
parent
bff5d431c9
commit
0e99ffca2f
@ -186,8 +186,7 @@
|
||||
"ngrx-store-freeze": "0.2.4",
|
||||
"node-watch": "0.7.0",
|
||||
"npm-run-all": "^4.1.5",
|
||||
"open": "6.4.0",
|
||||
"opn": "^5.3.0",
|
||||
"open": "^7.4.2",
|
||||
"parse-markdown-links": "^1.0.4",
|
||||
"parse5": "4.0.0",
|
||||
"postcss": "8.2.4",
|
||||
|
||||
@ -77,8 +77,7 @@
|
||||
"mini-css-extract-plugin": "0.8.0",
|
||||
"minimatch": "3.0.4",
|
||||
"parse5": "4.0.0",
|
||||
"open": "6.4.0",
|
||||
"opn": "^5.3.0",
|
||||
"open": "^7.4.2",
|
||||
"postcss": "8.2.4",
|
||||
"postcss-import": "14.0.0",
|
||||
"postcss-loader": "4.2.0",
|
||||
|
||||
@ -9,8 +9,9 @@ import { join } from 'path';
|
||||
jest.mock('tsconfig-paths-webpack-plugin');
|
||||
import ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');
|
||||
import { logger } from '@nrwl/devkit';
|
||||
jest.mock('opn');
|
||||
import * as opn from 'opn';
|
||||
import open = require('open');
|
||||
|
||||
jest.mock('open');
|
||||
|
||||
describe('getDevServerConfig', () => {
|
||||
let buildInput: WebBuildBuilderOptions;
|
||||
@ -135,7 +136,6 @@ describe('getDevServerConfig', () => {
|
||||
};
|
||||
|
||||
spyOn(logger, 'info');
|
||||
opn.mockImplementation(() => {});
|
||||
});
|
||||
|
||||
it('should print out the URL of the server', () => {
|
||||
@ -163,7 +163,7 @@ describe('getDevServerConfig', () => {
|
||||
|
||||
result.onListening(mockServer);
|
||||
|
||||
expect(opn).not.toHaveBeenCalled();
|
||||
expect(open).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('should open the url if --open is passed', () => {
|
||||
@ -177,9 +177,7 @@ describe('getDevServerConfig', () => {
|
||||
|
||||
result.onListening(mockServer);
|
||||
|
||||
expect(opn).toHaveBeenCalledWith('http://example.com:9999/', {
|
||||
wait: false,
|
||||
});
|
||||
expect(open).toHaveBeenCalledWith('http://example.com:9999/');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import { logger } from '@nrwl/devkit';
|
||||
import { Configuration as WebpackDevServerConfiguration } from 'webpack-dev-server';
|
||||
|
||||
import * as opn from 'opn';
|
||||
import * as open from 'open';
|
||||
import * as url from 'url';
|
||||
import { readFileSync } from 'fs';
|
||||
import * as path from 'path';
|
||||
@ -68,9 +68,7 @@ function getDevServerPartial(
|
||||
|
||||
logger.info(`NX Web Development Server is listening at ${serverUrl}`);
|
||||
if (options.open) {
|
||||
opn(serverUrl, {
|
||||
wait: false,
|
||||
});
|
||||
open(serverUrl);
|
||||
}
|
||||
},
|
||||
stats: false,
|
||||
|
||||
@ -63,7 +63,7 @@
|
||||
"dotenv": "8.2.0",
|
||||
"ignore": "^5.0.4",
|
||||
"npm-run-all": "^4.1.5",
|
||||
"opn": "^5.3.0",
|
||||
"open": "^7.4.2",
|
||||
"rxjs": "^6.5.4",
|
||||
"semver": "7.3.4",
|
||||
"strip-json-comments": "2.0.1",
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import { exists, readFile, readFileSync, statSync, writeFileSync } from 'fs';
|
||||
import { copySync } from 'fs-extra';
|
||||
import * as http from 'http';
|
||||
import * as opn from 'opn';
|
||||
import * as open from 'open';
|
||||
import { join, normalize, parse, dirname } from 'path';
|
||||
import { ensureDirSync } from 'fs-extra';
|
||||
import * as url from 'url';
|
||||
@ -331,7 +331,5 @@ function startServer(html: string, host: string, port = 4211) {
|
||||
title: `Dep graph started at http://${host}:${port}`,
|
||||
});
|
||||
|
||||
opn(`http://${host}:${port}`, {
|
||||
wait: false,
|
||||
});
|
||||
open(`http://${host}:${port}`);
|
||||
}
|
||||
|
||||
@ -16196,7 +16196,7 @@ open@7.4.0:
|
||||
is-docker "^2.0.0"
|
||||
is-wsl "^2.1.1"
|
||||
|
||||
open@^7.0.2, open@^7.0.3:
|
||||
open@^7.0.2, open@^7.0.3, open@^7.4.2:
|
||||
version "7.4.2"
|
||||
resolved "https://registry.yarnpkg.com/open/-/open-7.4.2.tgz#b8147e26dcf3e426316c730089fd71edd29c2321"
|
||||
integrity sha512-MVHddDVweXZF3awtlAS+6pgKLlm/JgxZ90+/NBurBoQctVOOB/zDdVjcyPzQ+0laDGbsWgrRkflI65sQeOgT9Q==
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user