diff --git a/packages/angular/cli/package.json b/packages/angular/cli/package.json index fd427a343b..130b858902 100644 --- a/packages/angular/cli/package.json +++ b/packages/angular/cli/package.json @@ -52,7 +52,9 @@ "@angular/cli": "0.0.0", "@angular-devkit/build-angular": "0.0.0", "@angular-devkit/build-ng-packagr": "0.0.0", - "@angular-devkit/build-webpack": "0.0.0" + "@angular-devkit/build-webpack": "0.0.0", + "@angular-devkit/core": "0.0.0", + "@angular-devkit/schematics": "0.0.0" } } } diff --git a/packages/schematics/angular/migrations/update-9/update-dependencies.ts b/packages/schematics/angular/migrations/update-9/update-dependencies.ts index db910f64f5..3a447135f6 100644 --- a/packages/schematics/angular/migrations/update-9/update-dependencies.ts +++ b/packages/schematics/angular/migrations/update-9/update-dependencies.ts @@ -14,7 +14,7 @@ import { import { latestVersions } from '../../utility/latest-versions'; export function updateDependencies(): Rule { - return host => { + return (host, context) => { const dependenciesToUpdate: Record = { '@angular-devkit/build-angular': latestVersions.DevkitBuildAngular, '@angular-devkit/build-ng-packagr': latestVersions.DevkitBuildNgPackagr, @@ -42,5 +42,17 @@ export function updateDependencies(): Rule { // `@angular/pwa` package is only needed when running `ng-add`. removePackageJsonDependency(host, '@angular/pwa'); + + // Check for @angular-devkit/schematics and @angular-devkit/core + for (const name of ['@angular-devkit/schematics', '@angular-devkit/core']) { + const current = getPackageJsonDependency(host, name); + if (current) { + context.logger.info( + `Package "${name}" found in the workspace package.json. ` + + 'This package typically does not need to be installed manually. ' + + 'If it is not being used by project code, it can be removed from the package.json.', + ); + } + } }; }