feat: make the Ivy compiler the default for ngc (#32219)
This commit switches the default value of the enableIvy flag to true. Applications that run ngc will now by default receive an Ivy build! This does not affect the way Bazel builds in the Angular repo work, since those are still switched based on the value of the --define=compile flag. Additionally, projects using @angular/bazel still use View Engine builds by default. Since most of the Angular repo tests are still written against View Engine (particularly because we still publish VE packages to NPM), this switch also requires lots of `enableIvy: false` flags in tsconfigs throughout the repo. Congrats to the team for reaching this milestone! PR Close #32219
This commit is contained in:

committed by
Andrew Kushnir

parent
2b64031ddc
commit
ec4381dd40
@ -26,7 +26,10 @@ describe('Google3 explicitQueryTiming TSLint rule', () => {
|
||||
tmpDir = join(process.env['TEST_TMPDIR'] !, 'google3-test');
|
||||
shx.mkdir('-p', tmpDir);
|
||||
|
||||
writeFile('tsconfig.json', JSON.stringify({compilerOptions: {module: 'es2015'}}));
|
||||
writeFile(
|
||||
'tsconfig.json',
|
||||
JSON.stringify(
|
||||
{compilerOptions: {module: 'es2015'}, angularCompilerOptions: {enableIvy: false}}));
|
||||
});
|
||||
|
||||
afterEach(() => shx.rm('-r', tmpDir));
|
||||
|
@ -21,7 +21,10 @@ describe('Google3 missing injectable tslint rule', () => {
|
||||
tmpDir = join(process.env['TEST_TMPDIR'] !, 'google3-test');
|
||||
shx.mkdir('-p', tmpDir);
|
||||
|
||||
writeFile('tsconfig.json', JSON.stringify({compilerOptions: {module: 'es2015'}}));
|
||||
writeFile(
|
||||
'tsconfig.json',
|
||||
JSON.stringify(
|
||||
{compilerOptions: {module: 'es2015'}, angularCompilerOptions: {enableIvy: false}}));
|
||||
});
|
||||
|
||||
afterEach(() => shx.rm('-r', tmpDir));
|
||||
|
@ -21,7 +21,10 @@ describe('Google3 noTemplateVariableAssignment TSLint rule', () => {
|
||||
tmpDir = join(process.env['TEST_TMPDIR'] !, 'google3-test');
|
||||
shx.mkdir('-p', tmpDir);
|
||||
|
||||
writeFile('tsconfig.json', JSON.stringify({compilerOptions: {module: 'es2015'}}));
|
||||
writeFile(
|
||||
'tsconfig.json',
|
||||
JSON.stringify(
|
||||
{compilerOptions: {module: 'es2015'}, angularCompilerOptions: {enableIvy: false}}));
|
||||
});
|
||||
|
||||
afterEach(() => shx.rm('-r', tmpDir));
|
||||
|
@ -34,7 +34,8 @@ describe('Google3 Renderer to Renderer2 TSLint rule', () => {
|
||||
paths: {
|
||||
'@angular/core': ['angular.d.ts'],
|
||||
}
|
||||
}
|
||||
},
|
||||
angularCompilerOptions: {enableIvy: false}
|
||||
}));
|
||||
});
|
||||
|
||||
|
@ -29,7 +29,8 @@ describe('Missing injectable migration', () => {
|
||||
compilerOptions: {
|
||||
experimentalDecorators: true,
|
||||
lib: ['es2015'],
|
||||
}
|
||||
},
|
||||
angularCompilerOptions: {enableIvy: false}
|
||||
}));
|
||||
writeFile('/angular.json', JSON.stringify({
|
||||
projects: {t: {architect: {build: {options: {tsConfig: './tsconfig.json'}}}}}
|
||||
|
@ -27,7 +27,8 @@ describe('move-document migration', () => {
|
||||
writeFile('/tsconfig.json', JSON.stringify({
|
||||
compilerOptions: {
|
||||
lib: ['es2015'],
|
||||
}
|
||||
},
|
||||
angularCompilerOptions: {enableIvy: false}
|
||||
}));
|
||||
writeFile('/angular.json', JSON.stringify({
|
||||
projects: {t: {architect: {build: {options: {tsConfig: './tsconfig.json'}}}}}
|
||||
|
@ -28,7 +28,8 @@ describe('Renderer to Renderer2 migration', () => {
|
||||
compilerOptions: {
|
||||
lib: ['es2015'],
|
||||
strictNullChecks: true,
|
||||
}
|
||||
},
|
||||
angularCompilerOptions: {enableIvy: false}
|
||||
}));
|
||||
writeFile('/angular.json', JSON.stringify({
|
||||
projects: {t: {architect: {build: {options: {tsConfig: './tsconfig.json'}}}}}
|
||||
|
@ -30,7 +30,8 @@ describe('static-queries migration with template strategy', () => {
|
||||
compilerOptions: {
|
||||
experimentalDecorators: true,
|
||||
lib: ['es2015'],
|
||||
}
|
||||
},
|
||||
angularCompilerOptions: {enableIvy: false}
|
||||
}));
|
||||
writeFile('/angular.json', JSON.stringify({
|
||||
projects: {t: {architect: {build: {options: {tsConfig: './tsconfig.json'}}}}}
|
||||
@ -681,6 +682,7 @@ describe('static-queries migration with template strategy', () => {
|
||||
angularCompilerOptions: {
|
||||
flatModuleId: 'flat-module',
|
||||
flatModuleOutFile: 'flat-module-bundle.js',
|
||||
enableIvy: false,
|
||||
},
|
||||
files: ['index.ts']
|
||||
}));
|
||||
|
@ -34,7 +34,8 @@ describe('static-queries migration with usage strategy', () => {
|
||||
writeFile('/tsconfig.json', JSON.stringify({
|
||||
compilerOptions: {
|
||||
lib: ['es2015'],
|
||||
}
|
||||
},
|
||||
angularCompilerOptions: {enableIvy: false}
|
||||
}));
|
||||
writeFile('/angular.json', JSON.stringify({
|
||||
projects: {t: {architect: {build: {options: {tsConfig: './tsconfig.json'}}}}}
|
||||
|
@ -28,7 +28,8 @@ describe('template variable assignment migration', () => {
|
||||
writeFile('/tsconfig.json', JSON.stringify({
|
||||
compilerOptions: {
|
||||
lib: ['es2015'],
|
||||
}
|
||||
},
|
||||
angularCompilerOptions: {enableIvy: false}
|
||||
}));
|
||||
writeFile('/angular.json', JSON.stringify({
|
||||
projects: {t: {architect: {build: {options: {tsConfig: './tsconfig.json'}}}}}
|
||||
|
@ -31,7 +31,8 @@ describe('Undecorated classes with DI migration', () => {
|
||||
writeFile('/tsconfig.json', JSON.stringify({
|
||||
compilerOptions: {
|
||||
lib: ['es2015'],
|
||||
}
|
||||
},
|
||||
angularCompilerOptions: {enableIvy: false}
|
||||
}));
|
||||
writeFile('/angular.json', JSON.stringify({
|
||||
projects: {t: {architect: {build: {options: {tsConfig: './tsconfig.json'}}}}}
|
||||
@ -1259,6 +1260,7 @@ describe('Undecorated classes with DI migration', () => {
|
||||
generateCodeForLibraries: false,
|
||||
allowEmptyCodegenFiles: true,
|
||||
enableSummariesForJit: true,
|
||||
enableIvy: false,
|
||||
}
|
||||
}));
|
||||
|
||||
|
Reference in New Issue
Block a user