UNPKG

yarn-frozen-dependencies

Version:

A yarn plugin who freeze the workspace dependencies to prevent undesired updates.

14 lines (10 loc) 602 B
import {ReportError, MessageName, formatUtils} from '@yarnpkg/core'; import {OperationReporter} from "./operation-reporter"; export class ErrorOperationReporter extends OperationReporter { reportOperation(): void { const {operation, target, formattedFields, workspace: {project: {configuration}}} = this; const error = new ReportError(MessageName.UNNAMED, formatUtils.pretty(configuration, `Unable to ${operation} ${formattedFields.dependency} because ${target} are sealed in ${formattedFields.workspace}.`, 'red')); error.stack = undefined; throw error; } }