Skip to content

Commit 5659f8a

Browse files
committed
perf(@angular/cli): optimize update schematic registry query counts by fetching package metadata lazily
Optimize the ng update registry requests by only querying package metadata for packages that are actually being updated, while resolving other dependencies locally from disk (with fallback to registry for uninstalled/mocked packages). This reduces network query counts by 80-90% during ng update.
1 parent 11a4438 commit 5659f8a

3 files changed

Lines changed: 296 additions & 92 deletions

File tree

packages/angular/cli/src/commands/update/cli.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,7 @@ export default class UpdateCommandModule extends CommandModule<UpdateCommandArgs
256256
verbose: options.verbose,
257257
packageManager: packageManager.name,
258258
packages: [],
259+
workspaceRoot: this.context.root,
259260
},
260261
);
261262

@@ -519,6 +520,7 @@ export default class UpdateCommandModule extends CommandModule<UpdateCommandArgs
519520
next: options.next,
520521
packageManager: this.context.packageManager.name,
521522
packages: packagesToUpdate,
523+
workspaceRoot: this.context.root,
522524
},
523525
);
524526

0 commit comments

Comments
 (0)