feat(compiler-cli): make enableIvy ngtsc/true equivalent (#28616)
Currently setting `enableIvy` to true runs a hybrid mode of `ngc` and `ngtsc`. This is counterintuitive given the name of the flag itself. This PR makes the `true` value equivalent to the previous `ngtsc`, and `ngtsc` becomes an alias for `true`. Effectively this removes the hybrid mode as well since there's no other way to enable it. PR Close #28616
This commit is contained in:
@ -54,8 +54,7 @@ export function mainDiagnosticsForTest(
|
||||
}
|
||||
|
||||
function createEmitCallback(options: api.CompilerOptions): api.TsEmitCallback|undefined {
|
||||
const transformDecorators = options.enableIvy !== 'ngtsc' && options.enableIvy !== 'tsc' &&
|
||||
options.annotationsAs !== 'decorators';
|
||||
const transformDecorators = !options.enableIvy && options.annotationsAs !== 'decorators';
|
||||
const transformTypesToClosure = options.annotateForClosureCompiler;
|
||||
if (!transformDecorators && !transformTypesToClosure) {
|
||||
return undefined;
|
||||
@ -192,7 +191,7 @@ function reportErrorsAndExit(
|
||||
const errorsAndWarnings = filterErrorsAndWarnings(allDiagnostics);
|
||||
if (errorsAndWarnings.length) {
|
||||
const formatHost = getFormatDiagnosticsHost(options);
|
||||
if (options && (options.enableIvy === true || options.enableIvy === 'ngtsc')) {
|
||||
if (options && options.enableIvy === true) {
|
||||
const ngDiagnostics = errorsAndWarnings.filter(api.isNgDiagnostic);
|
||||
const tsDiagnostics = errorsAndWarnings.filter(api.isTsDiagnostic);
|
||||
consoleError(replaceTsWithNgInErrors(
|
||||
|
Reference in New Issue
Block a user