Skip to content

Commit d699392

Browse files
hanslclydin
authored andcommitted
feat(@angular/cli): add support for ng update --next
1 parent 2f25296 commit d699392

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

package-lock.json

+7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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

+6
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ const UpdateCommand = Command.extend({
1616
default: false,
1717
aliases: ['d'],
1818
description: 'Run through without making any changes.'
19+
},
20+
{
21+
name: 'next',
22+
type: Boolean,
23+
default: false,
24+
description: 'Install the next version, instead of the latest.'
1925
}
2026
],
2127

packages/@angular/cli/tasks/update.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import SchematicRunTask from './schematic-run';
44
export interface UpdateTaskOptions {
55
dryRun: boolean;
66
force: boolean;
7+
next: boolean;
78
}
89

910
export const UpdateTask: any = Task.extend({
@@ -17,7 +18,8 @@ export const UpdateTask: any = Task.extend({
1718

1819
const schematicRunOptions = {
1920
taskOptions: {
20-
dryRun: options.dryRun
21+
dryRun: options.dryRun,
22+
version: options.next ? 'next' : undefined
2123
},
2224
workingDir: this.project.root,
2325
collectionName,

0 commit comments

Comments
 (0)