import { WorkspacePackage } from '../../../package-json/collect-package-jsons.js'; import { LintConfig } from './config.js'; /** information about a mismatch between a package and its dependencies */ export interface ExternalDepsError { type: 'external'; /** package name where the mismatch occurred */ package: string; /** name of the mismatched dependency */ dependency: string; /** version of the mismatched dependency */ version: string; /** type of dependency (`dependencies`, `devDependencies`, etc) */ at: string; /** package name where the dependency was originally declared */ otherPackage: string; /** original version of the dependency */ otherVersion: string; } export interface InternalDepsError { type: 'internal'; /** package name where the mismatch occurred */ package: string; /** name of the mismatched dependency */ dependency: string; /** * sub-type of the error * - not_workspace_proto: internal dependencies must be linked with workspace: protocol * - not_workspace_dep: `workspace:` protocol is used to link to a package not found in the workspace */ subtype: 'not_workspace_proto' | 'not_workspace_dep'; } export type WorkspaceDepsError = ExternalDepsError | InternalDepsError; /** * validate the external dependencies of a workspace */ export declare function validateWorkspaceDeps(params: { workspaceRoot: string | URL; packages?: WorkspacePackage[]; config?: LintConfig; }): Promise;