yarn-frozen-dependencies
Version:
A yarn plugin who freeze the workspace dependencies to prevent undesired updates.
13 lines (9 loc) • 632 B
text/typescript
import {formatUtils} from '@yarnpkg/core';
import {OperationReporter} from "./operation-reporter";
export class WarnOperationReporter extends OperationReporter {
reportOperation(): void {
const {operation, target, formattedFields, workspace: {project: {configuration}}} = this;
const warningText = formatUtils.pretty(configuration, formatUtils.applyStyle(configuration, 'Warning:', 2), 'red');
console.log(formatUtils.pretty(configuration, `${warningText} you will ${operation} ${formattedFields.dependency} but ${target} are indicated as sealed in ${formattedFields.workspace}.`, 'yellow'));
}
}