cli: refactor to use @backstage/cli-node
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
@@ -31,6 +31,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@backstage/cli-common": "workspace:^",
|
||||
"@backstage/cli-node": "workspace:^",
|
||||
"@backstage/config": "workspace:^",
|
||||
"@backstage/config-loader": "workspace:^",
|
||||
"@backstage/errors": "workspace:^",
|
||||
|
||||
@@ -16,7 +16,8 @@
|
||||
|
||||
import { OptionValues } from 'commander';
|
||||
import { buildPackage, Output } from '../../lib/builder';
|
||||
import { findRoleFromCommand, getRoleInfo } from '../../lib/role';
|
||||
import { findRoleFromCommand } from '../../lib/role';
|
||||
import { PackageRoles } from '@backstage/cli-node';
|
||||
import { paths } from '../../lib/paths';
|
||||
import { buildFrontend } from './buildFrontend';
|
||||
import { buildBackend } from './buildBackend';
|
||||
@@ -47,7 +48,7 @@ export async function command(opts: OptionValues): Promise<void> {
|
||||
});
|
||||
}
|
||||
|
||||
const roleInfo = getRoleInfo(role);
|
||||
const roleInfo = PackageRoles.getRoleInfo(role);
|
||||
|
||||
const outputs = new Set<Output>();
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ import { ESLint } from 'eslint';
|
||||
import { join as joinPath, basename } from 'path';
|
||||
import fs from 'fs-extra';
|
||||
import { isChildPath } from '@backstage/cli-common';
|
||||
import { PackageGraph } from '../lib/monorepo';
|
||||
import { PackageGraph } from '@backstage/cli-node';
|
||||
|
||||
function isTestPath(filePath: string) {
|
||||
if (!isChildPath(joinPath(paths.targetDir, 'src'), filePath)) {
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
import fs from 'fs-extra';
|
||||
import { resolve as resolvePath } from 'path';
|
||||
import { ExtendedPackageJSON, PackageGraph } from '../../lib/monorepo';
|
||||
import { BackstagePackageJson, PackageGraph } from '@backstage/cli-node';
|
||||
|
||||
function trimRelative(path: string): string {
|
||||
if (path.startsWith('./')) {
|
||||
@@ -94,7 +94,7 @@ export async function command() {
|
||||
|
||||
newPackageJson = Object.fromEntries(
|
||||
newPkgEntries,
|
||||
) as ExtendedPackageJSON;
|
||||
) as BackstagePackageJson;
|
||||
changed = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
import fs from 'fs-extra';
|
||||
import { resolve as resolvePath } from 'path';
|
||||
import { PackageGraph } from '../../lib/monorepo';
|
||||
import { PackageGraph } from '@backstage/cli-node';
|
||||
import { runPlain } from '../../lib/run';
|
||||
|
||||
const PREFIX = `module.exports = require('@backstage/cli/config/eslint-factory')`;
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
import fs from 'fs-extra';
|
||||
import { resolve as resolvePath } from 'path';
|
||||
import { getPackages } from '@manypkg/get-packages';
|
||||
import { PackageRoles } from '@backstage/cli-node';
|
||||
import { paths } from '../../lib/paths';
|
||||
import { getRoleFromPackage, detectRoleFromPackage } from '../../lib/role';
|
||||
|
||||
export default async () => {
|
||||
const { packages } = await getPackages(paths.targetDir);
|
||||
@@ -26,12 +26,12 @@ export default async () => {
|
||||
await Promise.all(
|
||||
packages.map(async ({ dir, packageJson: pkg }) => {
|
||||
const { name } = pkg;
|
||||
const existingRole = getRoleFromPackage(pkg);
|
||||
const existingRole = PackageRoles.getRoleFromPackage(pkg);
|
||||
if (existingRole) {
|
||||
return;
|
||||
}
|
||||
|
||||
const detectedRole = detectRoleFromPackage(pkg);
|
||||
const detectedRole = PackageRoles.detectRoleFromPackage(pkg);
|
||||
if (!detectedRole) {
|
||||
console.error(`No role detected for package ${name}`);
|
||||
return;
|
||||
|
||||
@@ -16,8 +16,7 @@
|
||||
|
||||
import fs from 'fs-extra';
|
||||
import { resolve as resolvePath } from 'path';
|
||||
import { PackageGraph } from '../../lib/monorepo';
|
||||
import { getRoleFromPackage, getRoleInfo, PackageRole } from '../../lib/role';
|
||||
import { PackageGraph, PackageRoles, PackageRole } from '@backstage/cli-node';
|
||||
|
||||
const configArgPattern = /--config[=\s][^\s$]+/;
|
||||
|
||||
@@ -28,12 +27,12 @@ export async function command() {
|
||||
|
||||
await Promise.all(
|
||||
packages.map(async ({ dir, packageJson }) => {
|
||||
const role = getRoleFromPackage(packageJson);
|
||||
const role = PackageRoles.getRoleFromPackage(packageJson);
|
||||
if (!role) {
|
||||
return;
|
||||
}
|
||||
|
||||
const roleInfo = getRoleInfo(role);
|
||||
const roleInfo = PackageRoles.getRoleInfo(role);
|
||||
const hasStart = !noStartRoles.includes(role);
|
||||
const needsPack = !(roleInfo.output.includes('bundle') || role === 'cli');
|
||||
const scripts = packageJson.scripts ?? {};
|
||||
|
||||
@@ -16,8 +16,7 @@
|
||||
|
||||
import fs from 'fs-extra';
|
||||
import { resolve as resolvePath } from 'path';
|
||||
import { PackageGraph } from '../../lib/monorepo';
|
||||
import { getRoleFromPackage } from '../../lib/role';
|
||||
import { PackageGraph, PackageRoles } from '@backstage/cli-node';
|
||||
|
||||
const REACT_ROUTER_DEPS = ['react-router', 'react-router-dom'];
|
||||
const REACT_ROUTER_RANGE = '6.0.0-beta.0 || ^6.3.0';
|
||||
@@ -27,7 +26,7 @@ export async function command() {
|
||||
|
||||
await Promise.all(
|
||||
packages.map(async ({ dir, packageJson }) => {
|
||||
const role = getRoleFromPackage(packageJson);
|
||||
const role = PackageRoles.getRoleFromPackage(packageJson);
|
||||
if (role === 'frontend') {
|
||||
console.log(`Skipping ${packageJson.name}`);
|
||||
return;
|
||||
|
||||
@@ -19,10 +19,10 @@ import fs from 'fs-extra';
|
||||
import { join as joinPath } from 'path';
|
||||
import { OptionValues } from 'commander';
|
||||
import { FactoryRegistry } from '../../lib/new/FactoryRegistry';
|
||||
import { isMonoRepo } from '@backstage/cli-node';
|
||||
import { paths } from '../../lib/paths';
|
||||
import { assertError } from '@backstage/errors';
|
||||
import { Task } from '../../lib/tasks';
|
||||
import { isMonoRepo } from '../../lib/monorepo/isMonoRepo';
|
||||
|
||||
function parseOptions(optionStrings: string[]): Record<string, string> {
|
||||
const options: Record<string, string> = {};
|
||||
|
||||
@@ -18,11 +18,13 @@ import chalk from 'chalk';
|
||||
import { Command, OptionValues } from 'commander';
|
||||
import { relative as relativePath } from 'path';
|
||||
import { buildPackages, getOutputsForRole } from '../../lib/builder';
|
||||
import { PackageGraph } from '../../lib/monorepo';
|
||||
import { ExtendedPackage } from '../../lib/monorepo/PackageGraph';
|
||||
import { runParallelWorkers } from '../../lib/parallel';
|
||||
import { paths } from '../../lib/paths';
|
||||
import { detectRoleFromPackage } from '../../lib/role';
|
||||
import {
|
||||
PackageGraph,
|
||||
BackstagePackage,
|
||||
PackageRoles,
|
||||
} from '@backstage/cli-node';
|
||||
import { runParallelWorkers } from '../../lib/parallel';
|
||||
import { buildFrontend } from '../build/buildFrontend';
|
||||
import { buildBackend } from '../build/buildBackend';
|
||||
|
||||
@@ -93,14 +95,15 @@ export async function command(opts: OptionValues, cmd: Command): Promise<void> {
|
||||
packages = Array.from(withDevDependents).map(name => graph.get(name)!);
|
||||
}
|
||||
|
||||
const apps = new Array<ExtendedPackage>();
|
||||
const backends = new Array<ExtendedPackage>();
|
||||
const apps = new Array<BackstagePackage>();
|
||||
const backends = new Array<BackstagePackage>();
|
||||
|
||||
const parseBuildScript = createScriptOptionsParser(cmd, ['package', 'build']);
|
||||
|
||||
const options = packages.flatMap(pkg => {
|
||||
const role =
|
||||
pkg.packageJson.backstage?.role ?? detectRoleFromPackage(pkg.packageJson);
|
||||
pkg.packageJson.backstage?.role ??
|
||||
PackageRoles.detectRoleFromPackage(pkg.packageJson);
|
||||
if (!role) {
|
||||
console.warn(`Ignored ${pkg.packageJson.name} because it has no role`);
|
||||
return [];
|
||||
|
||||
@@ -18,7 +18,7 @@ import { execFile as execFileCb } from 'child_process';
|
||||
import fs from 'fs-extra';
|
||||
import { resolve as resolvePath } from 'path';
|
||||
import { promisify } from 'util';
|
||||
import { PackageGraph } from '../../lib/monorepo';
|
||||
import { PackageGraph } from '@backstage/cli-node';
|
||||
import { paths } from '../../lib/paths';
|
||||
|
||||
const execFile = promisify(execFileCb);
|
||||
|
||||
@@ -17,11 +17,11 @@
|
||||
import chalk from 'chalk';
|
||||
import { OptionValues } from 'commander';
|
||||
import { relative as relativePath } from 'path';
|
||||
import { PackageGraph, ExtendedPackageJSON } from '../../lib/monorepo';
|
||||
import { runWorkerQueueThreads } from '../../lib/parallel';
|
||||
import { PackageGraph, BackstagePackageJson } from '@backstage/cli-node';
|
||||
import { paths } from '../../lib/paths';
|
||||
import { runWorkerQueueThreads } from '../../lib/parallel';
|
||||
|
||||
function depCount(pkg: ExtendedPackageJSON) {
|
||||
function depCount(pkg: BackstagePackageJson) {
|
||||
const deps = pkg.dependencies ? Object.keys(pkg.dependencies).length : 0;
|
||||
const devDeps = pkg.devDependencies
|
||||
? Object.keys(pkg.devDependencies).length
|
||||
|
||||
@@ -18,8 +18,8 @@ import chalk from 'chalk';
|
||||
import { ESLint } from 'eslint';
|
||||
import { OptionValues } from 'commander';
|
||||
import { join as joinPath, relative as relativePath } from 'path';
|
||||
import { PackageGraph } from '@backstage/cli-node';
|
||||
import { paths } from '../../lib/paths';
|
||||
import { PackageGraph } from '../../lib/monorepo';
|
||||
|
||||
export async function command(opts: OptionValues) {
|
||||
const packages = await PackageGraph.listTargetPackages();
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
import os from 'os';
|
||||
import { Command, OptionValues } from 'commander';
|
||||
import { PackageGraph } from '../../lib/monorepo';
|
||||
import { PackageGraph } from '@backstage/cli-node';
|
||||
import { paths } from '../../lib/paths';
|
||||
import { runCheck } from '../../lib/run';
|
||||
|
||||
|
||||
@@ -19,10 +19,10 @@ import chalk from 'chalk';
|
||||
import uniq from 'lodash/uniq';
|
||||
import { serveBundle } from '../../lib/bundler';
|
||||
import { loadCliConfig } from '../../lib/config';
|
||||
import { paths } from '../../lib/paths';
|
||||
import { PackageGraph } from '@backstage/cli-node';
|
||||
import { Lockfile } from '../../lib/versioning';
|
||||
import { forbiddenDuplicatesFilter, includedFilter } from '../versions/lint';
|
||||
import { PackageGraph } from '../../lib/monorepo';
|
||||
import { paths } from '../../lib/paths';
|
||||
|
||||
interface StartAppOptions {
|
||||
verifyVersions?: boolean;
|
||||
|
||||
@@ -39,7 +39,7 @@ import {
|
||||
ReleaseManifest,
|
||||
} from '@backstage/release-manifests';
|
||||
import 'global-agent/bootstrap';
|
||||
import { PackageGraph } from '../../lib/monorepo';
|
||||
import { PackageGraph } from '@backstage/cli-node';
|
||||
|
||||
const DEP_TYPES = [
|
||||
'dependencies',
|
||||
|
||||
@@ -18,7 +18,7 @@ import { OptionValues } from 'commander';
|
||||
import { Lockfile } from '../../lib/versioning';
|
||||
import { paths } from '../../lib/paths';
|
||||
import partition from 'lodash/partition';
|
||||
import { PackageGraph } from '../../lib/monorepo';
|
||||
import { PackageGraph } from '@backstage/cli-node';
|
||||
|
||||
// Packages that we try to avoid duplicates for
|
||||
const INCLUDED = [/^@backstage\//];
|
||||
|
||||
@@ -30,9 +30,9 @@ import { RollupOptions, OutputOptions, RollupWarning } from 'rollup';
|
||||
import { forwardFileImports } from './plugins';
|
||||
import { BuildOptions, Output } from './types';
|
||||
import { paths } from '../paths';
|
||||
import { BackstagePackageJson } from '@backstage/cli-node';
|
||||
import { svgrTemplate } from '../svgrTemplate';
|
||||
import { ExtendedPackageJSON } from '../monorepo';
|
||||
import { readEntryPoints } from '../monorepo/entryPoints';
|
||||
import { readEntryPoints } from '../entryPoints';
|
||||
|
||||
const SCRIPT_EXTS = ['.js', '.jsx', '.ts', '.tsx'];
|
||||
|
||||
@@ -58,7 +58,7 @@ export async function makeRollupConfigs(
|
||||
let targetPkg = options.packageJson;
|
||||
if (!targetPkg) {
|
||||
const packagePath = resolvePath(targetDir, 'package.json');
|
||||
targetPkg = (await fs.readJson(packagePath)) as ExtendedPackageJSON;
|
||||
targetPkg = (await fs.readJson(packagePath)) as BackstagePackageJson;
|
||||
}
|
||||
|
||||
const onwarn = ({ code, message }: RollupWarning) => {
|
||||
|
||||
@@ -22,7 +22,7 @@ import { paths } from '../paths';
|
||||
import { makeRollupConfigs } from './config';
|
||||
import { BuildOptions, Output } from './types';
|
||||
import { buildTypeDefinitions } from './buildTypeDefinitions';
|
||||
import { getRoleInfo } from '../role';
|
||||
import { PackageRoles } from '@backstage/cli-node';
|
||||
import { runParallelWorkers } from '../parallel';
|
||||
|
||||
export function formatErrorMessage(error: any) {
|
||||
@@ -152,7 +152,7 @@ export const buildPackages = async (options: BuildOptions[]) => {
|
||||
export function getOutputsForRole(role: string): Set<Output> {
|
||||
const outputs = new Set<Output>();
|
||||
|
||||
for (const output of getRoleInfo(role).output) {
|
||||
for (const output of PackageRoles.getRoleInfo(role).output) {
|
||||
if (output === 'cjs') {
|
||||
outputs.add(Output.cjs);
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { ExtendedPackageJSON } from '../monorepo';
|
||||
import { BackstagePackageJson } from '@backstage/cli-node';
|
||||
|
||||
export enum Output {
|
||||
esm,
|
||||
@@ -25,7 +25,7 @@ export enum Output {
|
||||
export type BuildOptions = {
|
||||
logPrefix?: string;
|
||||
targetDir?: string;
|
||||
packageJson?: ExtendedPackageJSON;
|
||||
packageJson?: BackstagePackageJson;
|
||||
outputs: Set<Output>;
|
||||
minify?: boolean;
|
||||
useApiExtractor?: boolean;
|
||||
|
||||
@@ -32,12 +32,12 @@ import { LinkedPackageResolvePlugin } from './LinkedPackageResolvePlugin';
|
||||
import { BundlingOptions, BackendBundlingOptions } from './types';
|
||||
import { version } from '../../lib/version';
|
||||
import { paths as cliPaths } from '../../lib/paths';
|
||||
import { BackstagePackage } from '@backstage/cli-node';
|
||||
import { runPlain } from '../run';
|
||||
import ESLintPlugin from 'eslint-webpack-plugin';
|
||||
import pickBy from 'lodash/pickBy';
|
||||
import yn from 'yn';
|
||||
import { readEntryPoints } from '../monorepo/entryPoints';
|
||||
import { ExtendedPackage } from '../monorepo';
|
||||
import { readEntryPoints } from '../entryPoints';
|
||||
|
||||
const BUILD_CACHE_ENV_VAR = 'BACKSTAGE_CLI_EXPERIMENTAL_BUILD_CACHE';
|
||||
|
||||
@@ -235,7 +235,7 @@ export async function createBackendConfig(
|
||||
// Find all local monorepo packages and their node_modules, and mark them as external.
|
||||
const { packages } = await getPackages(cliPaths.targetDir);
|
||||
const localPackageEntryPoints = packages.flatMap(p => {
|
||||
const entryPoints = readEntryPoints((p as ExtendedPackage).packageJson);
|
||||
const entryPoints = readEntryPoints((p as BackstagePackage).packageJson);
|
||||
return entryPoints.map(e => posixPath.join(p.packageJson.name, e.mount));
|
||||
});
|
||||
const moduleDirs = packages.map(p => resolvePath(p.dir, 'node_modules'));
|
||||
|
||||
@@ -23,7 +23,7 @@ import { ConfigReader } from '@backstage/config';
|
||||
import { paths } from './paths';
|
||||
import { isValidUrl } from './urls';
|
||||
import { getPackages } from '@manypkg/get-packages';
|
||||
import { PackageGraph } from './monorepo';
|
||||
import { PackageGraph } from '@backstage/cli-node';
|
||||
|
||||
type Options = {
|
||||
args: string[];
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
|
||||
import { extname } from 'path';
|
||||
import { BackstagePackageJson } from './PackageGraph';
|
||||
import { BackstagePackageJson } from '@backstage/cli-node';
|
||||
|
||||
export interface EntryPoint {
|
||||
mount: string;
|
||||
|
||||
@@ -30,7 +30,6 @@ import {
|
||||
dependencies as cliDependencies,
|
||||
devDependencies as cliDevDependencies,
|
||||
} from '../../../package.json';
|
||||
import { PackageGraph, PackageGraphNode } from '../monorepo';
|
||||
import {
|
||||
BuildOptions,
|
||||
buildPackages,
|
||||
@@ -38,7 +37,11 @@ import {
|
||||
Output,
|
||||
} from '../builder';
|
||||
import { productionPack } from './productionPack';
|
||||
import { getRoleInfo } from '../role';
|
||||
import {
|
||||
PackageRoles,
|
||||
PackageGraph,
|
||||
PackageGraphNode,
|
||||
} from '@backstage/cli-node';
|
||||
import { runParallelWorkers } from '../parallel';
|
||||
|
||||
// These packages aren't safe to pack in parallel since the CLI depends on them
|
||||
@@ -172,7 +175,7 @@ export async function createDistWorkspace(
|
||||
continue;
|
||||
}
|
||||
|
||||
if (getRoleInfo(role).output.includes('bundle')) {
|
||||
if (PackageRoles.getRoleInfo(role).output.includes('bundle')) {
|
||||
console.warn(
|
||||
`Building ${pkg.packageJson.name} separately because it is a bundled package`,
|
||||
);
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
import fs from 'fs-extra';
|
||||
import npmPackList from 'npm-packlist';
|
||||
import { resolve as resolvePath, posix as posixPath } from 'path';
|
||||
import { ExtendedPackageJSON } from '../monorepo';
|
||||
import { readEntryPoints } from '../monorepo/entryPoints';
|
||||
import { BackstagePackageJson } from '@backstage/cli-node';
|
||||
import { readEntryPoints } from '../entryPoints';
|
||||
|
||||
const PKG_PATH = 'package.json';
|
||||
const PKG_BACKUP_PATH = 'package.json-prepack';
|
||||
@@ -35,7 +35,7 @@ export async function productionPack(options: ProductionPackOptions) {
|
||||
const { packageDir, targetDir } = options;
|
||||
const pkgPath = resolvePath(packageDir, PKG_PATH);
|
||||
const pkgContent = await fs.readFile(pkgPath, 'utf8');
|
||||
const pkg = JSON.parse(pkgContent) as ExtendedPackageJSON;
|
||||
const pkg = JSON.parse(pkgContent) as BackstagePackageJson;
|
||||
|
||||
// If we're making the update in-line, back up the package.json
|
||||
if (!targetDir) {
|
||||
@@ -147,7 +147,7 @@ function resolveEntrypoint(pkg: any, name: string) {
|
||||
|
||||
// Writes e.g. alpha/package.json
|
||||
async function writeReleaseStageEntrypoint(
|
||||
pkg: ExtendedPackageJSON,
|
||||
pkg: BackstagePackageJson,
|
||||
stage: 'alpha' | 'beta',
|
||||
targetDir: string,
|
||||
) {
|
||||
@@ -178,7 +178,7 @@ const EXPORT_MAP = {
|
||||
* entry points for importers that don't support exports.
|
||||
*/
|
||||
async function prepareExportsEntryPoints(
|
||||
pkg: ExtendedPackageJSON,
|
||||
pkg: BackstagePackageJson,
|
||||
packageDir: string,
|
||||
) {
|
||||
const distPath = resolvePath(packageDir, 'dist');
|
||||
|
||||
@@ -17,16 +17,17 @@
|
||||
import fs from 'fs-extra';
|
||||
import { OptionValues } from 'commander';
|
||||
import { paths } from './paths';
|
||||
import { PackageRoles, PackageRole } from '@backstage/cli-node';
|
||||
|
||||
export async function findRoleFromCommand(
|
||||
opts: OptionValues,
|
||||
): Promise<PackageRole> {
|
||||
if (opts.role) {
|
||||
return getRoleInfo(opts.role)?.role;
|
||||
return PackageRoles.getRoleInfo(opts.role)?.role;
|
||||
}
|
||||
|
||||
const pkg = await fs.readJson(paths.resolveTarget('package.json'));
|
||||
const info = getRoleFromPackage(pkg);
|
||||
const info = PackageRoles.getRoleFromPackage(pkg);
|
||||
if (!info) {
|
||||
throw new Error(`Target package must have 'backstage.role' set`);
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
import fs from 'fs-extra';
|
||||
import mockFs from 'mock-fs';
|
||||
import { ExtendedPackage } from '../monorepo';
|
||||
import { BackstagePackage } from '@backstage/cli-node';
|
||||
import { Lockfile } from './Lockfile';
|
||||
|
||||
const LEGACY_HEADER = `# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
||||
@@ -290,7 +290,7 @@ describe('New Lockfile', () => {
|
||||
'b',
|
||||
{
|
||||
packageJson: { version: '2.0.1' },
|
||||
} as ExtendedPackage,
|
||||
} as BackstagePackage,
|
||||
],
|
||||
]),
|
||||
});
|
||||
|
||||
@@ -18,7 +18,7 @@ import fs from 'fs-extra';
|
||||
import semver from 'semver';
|
||||
import { parseSyml, stringifySyml } from '@yarnpkg/parsers';
|
||||
import { stringify as legacyStringifyLockfile } from '@yarnpkg/lockfile';
|
||||
import { ExtendedPackage } from '../monorepo';
|
||||
import { BackstagePackage } from '@backstage/cli-node';
|
||||
|
||||
const ENTRY_PATTERN = /^((?:@[^/]+\/)?[^@/]+)@(.+)$/;
|
||||
|
||||
@@ -156,7 +156,7 @@ export class Lockfile {
|
||||
/** Analyzes the lockfile to identify possible actions and warnings for the entries */
|
||||
analyze(options: {
|
||||
filter?: (name: string) => boolean;
|
||||
localPackages: Map<string, ExtendedPackage>;
|
||||
localPackages: Map<string, BackstagePackage>;
|
||||
}): AnalyzeResult {
|
||||
const { filter, localPackages } = options;
|
||||
const result: AnalyzeResult = {
|
||||
|
||||
Reference in New Issue
Block a user