bug: Upgrade to Lerna 4
This commit is contained in:
@@ -72,7 +72,7 @@ async function readBuildInfo() {
|
||||
}
|
||||
|
||||
async function loadLernaPackages(): Promise<LernaPackage[]> {
|
||||
const LernaProject = require('@lerna/project');
|
||||
const { LernaProject } = require('@lerna/project');
|
||||
const project = new LernaProject(cliPaths.targetDir);
|
||||
return project.getPackages();
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ 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 { LernaProject } = require('@lerna/project');
|
||||
const project = new LernaProject(paths.targetDir);
|
||||
const packages = await project.getPackages();
|
||||
|
||||
|
||||
@@ -219,7 +219,7 @@ async function moveToDistWorkspace(
|
||||
}
|
||||
|
||||
async function findTargetPackages(pkgNames: string[]): Promise<LernaPackage[]> {
|
||||
const LernaProject = require('@lerna/project');
|
||||
const { LernaProject } = require('@lerna/project');
|
||||
const PackageGraph = require('@lerna/package-graph');
|
||||
|
||||
const project = new LernaProject(paths.targetDir);
|
||||
|
||||
@@ -59,7 +59,7 @@ 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 { LernaProject } = require('@lerna/project');
|
||||
const project = new LernaProject(paths.targetDir);
|
||||
await project.getPackages();
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@ export async function fetchPackageInfo(
|
||||
export async function mapDependencies(
|
||||
targetDir: string,
|
||||
): Promise<Map<string, PkgVersionInfo[]>> {
|
||||
const LernaProject = require('@lerna/project');
|
||||
const { LernaProject } = require('@lerna/project');
|
||||
const project = new LernaProject(targetDir);
|
||||
const packages = await project.getPackages();
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ 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 { LernaProject } = require('@lerna/project');
|
||||
const project = new LernaProject(resolvePath('.'));
|
||||
const packages = await project.getPackages();
|
||||
|
||||
|
||||
@@ -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 { LernaProject } = require('@lerna/project');
|
||||
|
||||
// Prepare a release of the provided packages, e.g. @backstage/core
|
||||
async function main(args) {
|
||||
|
||||
Reference in New Issue
Block a user