Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions packages/angular/cli/commands/version-impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import * as path from 'path';
import { Command } from '../models/command';
import { colors } from '../utilities/color';
import { JSONFile } from '../utilities/json-file';
import { Schema as VersionCommandSchema } from './version';

interface PartialPackageInfo {
Expand Down Expand Up @@ -125,7 +124,6 @@ export class VersionCommand extends Command<VersionCommandSchema> {
return acc;
}, [])
.join('\n... ')}
Ivy Workspace: ${workspacePackage ? this.getIvyWorkspace() : ''}

Package${namePad.slice(7)}Version
-------${namePad.replace(/ /g, '-')}------------------
Expand Down Expand Up @@ -165,16 +163,4 @@ export class VersionCommand extends Command<VersionCommandSchema> {

return version || '<error>';
}

private getIvyWorkspace(): string {
try {
const json = new JSONFile(path.resolve(this.context.root, 'tsconfig.json'));

return json.get(['angularCompilerOptions', 'enableIvy']) === false
? 'No'
: 'Yes';
} catch {
return '<error>';
}
}
}
12 changes: 0 additions & 12 deletions tests/legacy-cli/e2e/tests/misc/version.ts
Original file line number Diff line number Diff line change
@@ -1,25 +1,13 @@
import { getGlobalVariable } from '../../utils/env';
import { deleteFile } from '../../utils/fs';
import { ng } from '../../utils/process';


export default async function() {
const { stdout: commandOutput } = await ng('version');
const { stdout: optionOutput } = await ng('--version');
if (!optionOutput.includes('Angular CLI:')) {
throw new Error('version not displayed');
}

const argv = getGlobalVariable('argv');
const veProject = argv['ve'];

const ivyWorkspaceMatch = veProject
? 'Ivy Workspace: No'
: 'Ivy Workspace: Yes';
if (!optionOutput.includes(ivyWorkspaceMatch)) {
throw new Error(`Expected output to contain ${ivyWorkspaceMatch}`);
}

if (commandOutput !== optionOutput) {
throw new Error('version variants have differing output');
}
Expand Down