Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: cleanup package-utils package #1822

Merged
merged 12 commits into from Oct 10, 2020
Merged
3 changes: 1 addition & 2 deletions .eslintignore
Expand Up @@ -7,7 +7,6 @@ packages/generators/lib
packages/info/lib
packages/init/lib
packages/migrate/lib
packages/package-utils/lib
packages/serve/lib
packages/utils/lib
packages/webpack-scaffold/lib
Expand All @@ -28,4 +27,4 @@ test/loader/test-loader/examples/simple/webpack.config.js
test/loader/test-loader/examples/simple/src/static-esm-module.js
test/loader/test-loader/examples/simple/src/lazy-module.js
test/loader/test-loader/examples/simple/example_dist/**
lib/test/loader/error-test/src/index.d.ts
lib/test/loader/error-test/src/index.d.ts
2 changes: 2 additions & 0 deletions .gitignore
Expand Up @@ -52,6 +52,8 @@ packages/**/*.map
# build files
packages/**/lib
packages/**/yarn.lock
!packages/webpack-cli/lib/utils/__tests__/**/yarn.lock
!packages/webpack-cli/lib/utils/__tests__/**/package-lock.json
!packages/webpack-cli/lib

# test output files
Expand Down
4 changes: 2 additions & 2 deletions packages/generators/__tests__/addon-generator.test.ts
@@ -1,12 +1,12 @@
jest.setMock('@webpack-cli/package-utils', {
jest.setMock('@webpack-cli/utils', {
getPackageManager: jest.fn(),
});

import fs from 'fs';
import path from 'path';
import mkdirp from 'mkdirp';
import rimraf from 'rimraf';
import { getPackageManager } from '@webpack-cli/package-utils';
import { getPackageManager } from 'webpack-cli/lib/utils/get-package-manager';
import addonGenerator from '../src/addon-generator';

// TODO: enable after jest release
Expand Down
1 change: 0 additions & 1 deletion packages/generators/package.json
Expand Up @@ -14,7 +14,6 @@
"templates"
],
"dependencies": {
"@webpack-cli/package-utils": "^1.0.1-rc.1",
"@webpack-cli/utils": "^1.0.1-rc.1",
"@webpack-cli/webpack-scaffold": "^1.0.1-rc.1",
"colorette": "^1.2.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/generators/src/addon-generator.ts
Expand Up @@ -2,8 +2,8 @@ import logger from 'webpack-cli/lib/utils/logger';
import mkdirp from 'mkdirp';
import path from 'path';
import Generator from 'yeoman-generator';
import { getPackageManager } from '@webpack-cli/package-utils';
import { generatorCopy, generatorCopyTpl } from '@webpack-cli/utils';
import { getPackageManager } from 'webpack-cli/lib/utils/get-package-manager';

/**
* Creates a Yeoman Generator that generates a project conforming
Expand Down
2 changes: 1 addition & 1 deletion packages/generators/src/init-generator.ts
Expand Up @@ -2,7 +2,7 @@ import { blue, green, bold } from 'colorette';
import logger from 'webpack-cli/lib/utils/logger';
import logSymbols from 'log-symbols';
import path from 'path';
import { getPackageManager } from '@webpack-cli/package-utils';
import { getPackageManager } from 'webpack-cli/lib/utils/get-package-manager';
import { Confirm, Input, List } from '@webpack-cli/webpack-scaffold';

import {
Expand Down
2 changes: 1 addition & 1 deletion packages/generators/tsconfig.json
Expand Up @@ -5,5 +5,5 @@
"rootDir": "src"
},
"include": ["src"],
"references": [{ "path": "../package-utils" }, { "path": "../utils" }, { "path": "../webpack-scaffold" }]
"references": [{ "path": "../utils" }, { "path": "../webpack-scaffold" }]
}
34 changes: 0 additions & 34 deletions packages/package-utils/CHANGELOG.md

This file was deleted.

11 changes: 0 additions & 11 deletions packages/package-utils/README.md

This file was deleted.

26 changes: 0 additions & 26 deletions packages/package-utils/__tests__/index.test.ts

This file was deleted.

183 changes: 0 additions & 183 deletions packages/package-utils/__tests__/packageUtils.test.ts

This file was deleted.

57 changes: 0 additions & 57 deletions packages/package-utils/package.json

This file was deleted.

2 changes: 0 additions & 2 deletions packages/package-utils/src/index.ts

This file was deleted.