build: complete removal of bazel format yarn commands (#37148)

Remove bazel yarn format deprecation message to complete the removal of
formatting bazel related files via yarn command command.

PR Close #37148
This commit is contained in:
Joey Perrott 2020-05-15 16:01:38 -07:00 committed by Kara Erickson
parent 7db177d181
commit 59e7203a40
2 changed files with 8 additions and 32 deletions

View File

@ -34,35 +34,9 @@ export function buildFormatParser(localYargs: yargs.Argv) {
const executionCmd = check ? checkFiles : formatFiles; const executionCmd = check ? checkFiles : formatFiles;
executionCmd(allChangedFilesSince(sha)); executionCmd(allChangedFilesSince(sha));
}) })
.command( .command('files <files..>', 'Run the formatter on provided files', {}, ({check, files}) => {
'files <files..>', 'Run the formatter on provided files', {}, const executionCmd = check ? checkFiles : formatFiles;
({check, files}) => { executionCmd(files);
const executionCmd = check ? checkFiles : formatFiles;
executionCmd(files);
})
// TODO(josephperrott): remove this hidden command after deprecation period.
.command('deprecation-warning [originalCommand]', false, {}, ({originalCommand}) => {
console.warn(`\`yarn ${
originalCommand}\` is deprecated in favor of running the formatter via ng-dev`);
console.warn();
console.warn(`As a replacement of \`yarn ${originalCommand}\`, run:`);
switch (originalCommand) {
case 'bazel:format':
case 'bazel:lint-fix':
console.warn(` yarn ng-dev format all`);
break;
case 'bazel:lint':
console.warn(` yarn ng-dev format all --check`);
break;
default:
console.warn(`Error: Unrecognized previous command.`);
}
console.warn();
console.warn(`You can find more usage information by running:`);
console.warn(` yarn ng-dev format --help`);
console.warn();
console.warn(`For more on the rationale and effects of this deprecation visit:`);
console.warn(` https://github.com/angular/angular/pull/36842#issue-410321447`);
}); });
} }

View File

@ -16,9 +16,11 @@
"url": "https://github.com/angular/angular.git" "url": "https://github.com/angular/angular.git"
}, },
"scripts": { "scripts": {
"bazel:format": "yarn -s ng-dev format deprecation-warning bazel:format", "/": "",
"bazel:lint": "yarn -s ng-dev format deprecation-warning bazel:lint", "// 1": "Many developer of our checks/scripts/tools have moved to our ng-dev tool",
"bazel:lint-fix": "yarn -s ng-dev format deprecation-warning bazel:lint-fix", "// 2": "Find the usage you are looking for with:",
"// 3": "yarn ng-dev --help",
"/ ": "",
"preinstall": "node tools/yarn/check-yarn.js", "preinstall": "node tools/yarn/check-yarn.js",
"postinstall": "node scripts/webdriver-manager-update.js && node --preserve-symlinks --preserve-symlinks-main ./tools/postinstall-patches.js", "postinstall": "node scripts/webdriver-manager-update.js && node --preserve-symlinks --preserve-symlinks-main ./tools/postinstall-patches.js",
"check-env": "gulp check-env", "check-env": "gulp check-env",