feat(@angular/cli): add support for ng update --next

This commit is contained in:
Hans Larsen 2018-02-06 15:46:15 -08:00 committed by clydin
parent 2f25296018
commit d699392fc4
3 changed files with 16 additions and 1 deletions

7
package-lock.json generated
View File

@ -1069,6 +1069,12 @@
"resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz",
"integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk="
},
"builtin-modules": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz",
"integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=",
"dev": true
},
"builtin-status-codes": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz",
@ -9102,6 +9108,7 @@
"dev": true,
"requires": {
"babel-code-frame": "6.26.0",
"builtin-modules": "1.1.1",
"chalk": "2.2.0",
"commander": "2.11.0",
"diff": "3.3.1",

View File

@ -16,6 +16,12 @@ const UpdateCommand = Command.extend({
default: false,
aliases: ['d'],
description: 'Run through without making any changes.'
},
{
name: 'next',
type: Boolean,
default: false,
description: 'Install the next version, instead of the latest.'
}
],

View File

@ -4,6 +4,7 @@ import SchematicRunTask from './schematic-run';
export interface UpdateTaskOptions {
dryRun: boolean;
force: boolean;
next: boolean;
}
export const UpdateTask: any = Task.extend({
@ -17,7 +18,8 @@ export const UpdateTask: any = Task.extend({
const schematicRunOptions = {
taskOptions: {
dryRun: options.dryRun
dryRun: options.dryRun,
version: options.next ? 'next' : undefined
},
workingDir: this.project.root,
collectionName,