Skip to content

Commit

Permalink
chore(deps): move devDependencies from packages to root (#1891)
Browse files Browse the repository at this point in the history
  • Loading branch information
snitin315 authored Oct 7, 2020
1 parent 414a33e commit ec3baa8
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 20 deletions.
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
"@babel/preset-env": "^7.11.0",
"@commitlint/cli": "^11.0.0",
"@commitlint/config-lerna-scopes": "^11.0.0",
"@types/cross-spawn": "^6.0.1",
"@types/jest": "^25.1.4",
"@types/node": "13.9.8",
"@typescript-eslint/eslint-plugin": "^2.34.0",
Expand Down Expand Up @@ -91,6 +92,7 @@
"typescript": "^3.9.7",
"webpack": "^4.44.2",
"webpack-bundle-analyzer": "^3.9.0",
"webpack-dev-server": "3.10.3",
"yeoman-test": "^2.7.0"
}
}
9 changes: 7 additions & 2 deletions packages/package-utils/__tests__/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
'use strict';

jest.mock('@webpack-cli/package-utils');
jest.mock('../lib/packageUtils', () => {
return {
packageExists: jest.fn(),
promptInstallation: jest.fn(),
};
});

import { packageExists, promptInstallation } from '@webpack-cli/package-utils';
import { packageExists, promptInstallation } from '../lib/packageUtils';
import { run } from '../../webpack-cli/lib/commands/resolveCommand';

describe('@webpack-cli/package-utils', () => {
Expand Down
4 changes: 0 additions & 4 deletions packages/package-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,6 @@
"execa": "^4.0.0",
"global-modules": "^2.0.0"
},
"devDependencies": {
"@types/cross-spawn": "^6.0.1",
"@webpack-cli/package-utils": "^1.0.1-rc.1"
},
"peerDependenciesMeta": {
"webpack": {
"optional": true
Expand Down
2 changes: 1 addition & 1 deletion packages/serve/__tests__/startDevServer.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jest.mock('webpack-dev-server/lib/Server');
describe('startDevServer', () => {
// eslint-disable-next-line @typescript-eslint/no-var-requires, node/no-extraneous-require
const webpack = require('webpack');
// eslint-disable-next-line @typescript-eslint/no-var-requires
// eslint-disable-next-line @typescript-eslint/no-var-requires, node/no-extraneous-require
const DevServer = require('webpack-dev-server/lib/Server');

beforeEach(() => {
Expand Down
3 changes: 0 additions & 3 deletions packages/serve/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
"access": "public"
},
"license": "MIT",
"devDependencies": {
"webpack-dev-server": "3.10.3"
},
"peerDependencies": {
"webpack-cli": "4.x.x"
},
Expand Down
1 change: 1 addition & 0 deletions packages/serve/src/parseArgs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ type ArgsType = {
export default function parseArgs(cli: WebpackCLIType, args: string[]): ArgsType {
let devServerFlags: object[];
try {
// eslint-disable-next-line node/no-extraneous-require
devServerFlags = require('webpack-dev-server/bin/cli-flags').devServer;
} catch (err) {
throw new Error(`You need to install 'webpack-dev-server' for running 'webpack serve'.\n${err}`);
Expand Down
2 changes: 1 addition & 1 deletion packages/serve/src/startDevServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import mergeOptions from './mergeOptions';
* @returns {Object[]} array of resulting servers
*/
export default function startDevServer(compiler, devServerArgs): object[] {
// eslint-disable-next-line @typescript-eslint/no-var-requires
// eslint-disable-next-line @typescript-eslint/no-var-requires, node/no-extraneous-require
const Server = require('webpack-dev-server/lib/Server');
const cliOptions = createConfig(devServerArgs);
const devServerOptions = getDevServerOptions(compiler);
Expand Down
10 changes: 1 addition & 9 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2494,7 +2494,7 @@
chalk "^4.1.0"
rxjs ">=6.4.0"

"@types/yeoman-generator@*":
"@types/yeoman-generator@*", "@types/yeoman-generator@^4.11.2":
version "4.11.2"
resolved "https://registry.yarnpkg.com/@types/yeoman-generator/-/yeoman-generator-4.11.2.tgz#c46b294a46fc8b3a5c46dff8a8712eaad02a7665"
integrity sha512-9QYsdVTLlUHg+aiDT1uqWf63oQXedCT4ty5L4KC4nd8gsp1Ef9UdXxpcc4yBU9ciRf4DqE1pViqxc6LTSosdsg==
Expand All @@ -2506,14 +2506,6 @@
"@types/yeoman-environment" "*"
rxjs ">=6.4.0"

"@types/[email protected]", "@types/yeoman-generator@^3.1.4":
version "3.1.4"
resolved "https://registry.yarnpkg.com/@types/yeoman-generator/-/yeoman-generator-3.1.4.tgz#21d6599515d41447eb84e2bc45033f1a640bbaf2"
integrity sha512-5oG9Qlk119qSHQpSClGonDIs4djxZSPurtg6faHItjeg8cffhkKs4twVYE+Wa0crAKJZDOwSd/Vmc6BSqJtgMA==
dependencies:
"@types/inquirer" "*"
rxjs ">=6.4.0"

"@types/yeoman-test@^2.0.3":
version "2.0.4"
resolved "https://registry.yarnpkg.com/@types/yeoman-test/-/yeoman-test-2.0.4.tgz#4c85e8cf95490411351e1bad57d1a2d6e71a5300"
Expand Down

0 comments on commit ec3baa8

Please sign in to comment.