chore: named export is Project not LernaProjcet
This commit is contained in:
@@ -72,8 +72,8 @@ async function readBuildInfo() {
|
||||
}
|
||||
|
||||
async function loadLernaPackages(): Promise<LernaPackage[]> {
|
||||
const { LernaProject } = require('@lerna/project');
|
||||
const project = new LernaProject(cliPaths.targetDir);
|
||||
const { Project } = require('@lerna/project');
|
||||
const project = new Project(cliPaths.targetDir);
|
||||
return project.getPackages();
|
||||
}
|
||||
|
||||
|
||||
@@ -28,8 +28,8 @@ export async function loadCliConfig(options: Options) {
|
||||
const configPaths = options.args.map(arg => paths.resolveTarget(arg));
|
||||
|
||||
// Consider all packages in the monorepo when loading in config
|
||||
const { LernaProject } = require('@lerna/project');
|
||||
const project = new LernaProject(paths.targetDir);
|
||||
const { Project } = require('@lerna/project');
|
||||
const project = new Project(paths.targetDir);
|
||||
const packages = await project.getPackages();
|
||||
|
||||
const localPackageNames = options.fromPackage
|
||||
|
||||
@@ -219,10 +219,10 @@ async function moveToDistWorkspace(
|
||||
}
|
||||
|
||||
async function findTargetPackages(pkgNames: string[]): Promise<LernaPackage[]> {
|
||||
const { LernaProject } = require('@lerna/project');
|
||||
const { Project } = require('@lerna/project');
|
||||
const PackageGraph = require('@lerna/package-graph');
|
||||
|
||||
const project = new LernaProject(paths.targetDir);
|
||||
const project = new Project(paths.targetDir);
|
||||
const packages = await project.getPackages();
|
||||
const graph = new PackageGraph(packages);
|
||||
|
||||
|
||||
@@ -59,8 +59,8 @@ describe('mapDependencies', () => {
|
||||
|
||||
it('should read dependencies', async () => {
|
||||
// Make sure all modules involved in package discovery are in the module cache before we mock fs
|
||||
const { LernaProject } = require('@lerna/project');
|
||||
const project = new LernaProject(paths.targetDir);
|
||||
const { Project } = require('@lerna/project');
|
||||
const project = new Project(paths.targetDir);
|
||||
await project.getPackages();
|
||||
|
||||
mockFs({
|
||||
|
||||
@@ -67,8 +67,8 @@ export async function fetchPackageInfo(
|
||||
export async function mapDependencies(
|
||||
targetDir: string,
|
||||
): Promise<Map<string, PkgVersionInfo[]>> {
|
||||
const { LernaProject } = require('@lerna/project');
|
||||
const project = new LernaProject(targetDir);
|
||||
const { Project } = require('@lerna/project');
|
||||
const project = new Project(targetDir);
|
||||
const packages = await project.getPackages();
|
||||
|
||||
const dependencyMap = new Map<string, PkgVersionInfo[]>();
|
||||
|
||||
Reference in New Issue
Block a user