Skip to content

Commit 8c12290

Browse files
filipesilvaZhicheng Wang
authored and
Zhicheng Wang
committed
feat(@angular/cli): don't use config file version (angular#4795)
We're not updating this number anymore since ng init/update is gone, so at best it's useless and at worst it's confusing since it appears on ng version.
1 parent 63cd9c1 commit 8c12290

File tree

3 files changed

+1
-5
lines changed

3 files changed

+1
-5
lines changed

packages/@angular/cli/blueprints/ng2/files/angular-cli.json

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
22
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
33
"project": {
4-
"version": "<%= version %>",
54
"name": "<%= htmlComponentName %>"
65
},
76
"apps": [

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

-3
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,6 @@ const VersionCommand = Command.extend({
4444
}
4545
const config = CliConfig.fromProject();
4646
if (config && config.config && config.config.project) {
47-
if (config.config.project.version !== pkg.version) {
48-
ngCliVersion += ` [${config.config.project.version}]`;
49-
}
5047
if (config.config.project.ejected) {
5148
ngCliVersion += ' (e)';
5249
}

packages/@angular/cli/upgrade/version.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ export class Version {
7676

7777
try {
7878
const json = JSON.parse(configJson);
79-
return new Version(json.project && json.project.version);
79+
return new Version(json.project);
8080
} catch (e) {
8181
return new Version(null);
8282
}

0 commit comments

Comments
 (0)