chore: named export is Project not LernaProjcet

This commit is contained in:
blam
2021-02-12 10:48:58 +01:00
parent 1d2bceafd5
commit dc9d67f288
7 changed files with 14 additions and 14 deletions
+2 -2
View File
@@ -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();
}
+2 -2
View File
@@ -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
+2 -2
View File
@@ -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({
+2 -2
View File
@@ -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[]>();
+2 -2
View File
@@ -24,8 +24,8 @@ const chalk = require('chalk');
async function main() {
// This is from lerna, and cba polluting root package.json
// eslint-disable-next-line import/no-extraneous-dependencies
const { LernaProject } = require('@lerna/project');
const project = new LernaProject(resolvePath('.'));
const { Project } = require('@lerna/project');
const project = new Project(resolvePath('.'));
const packages = await project.getPackages();
let hadErrors = false;
+2 -2
View File
@@ -18,7 +18,7 @@
const path = require('path');
const childProcess = require('child_process');
// eslint-disable-next-line import/no-extraneous-dependencies
const { LernaProject } = require('@lerna/project');
const { Project } = require('@lerna/project');
// Prepare a release of the provided packages, e.g. @backstage/core
async function main(args) {
@@ -28,7 +28,7 @@ async function main(args) {
process.exit(1);
}
const project = new LernaProject(__dirname);
const project = new Project(__dirname);
const packages = await project.getPackages();
const ignoreArgs = packages
.filter(p => !args.includes(p.name))