style(compiler-cli): reformat of codebase with new clang-format version (#36520)
This commit reformats the packages/compiler-cli tree using the new version of clang-format. PR Close #36520
This commit is contained in:
@ -8,9 +8,9 @@
|
||||
|
||||
import {Component} from '@angular/core';
|
||||
import {TestBed} from '@angular/core/testing';
|
||||
import {ServerTestingModule, platformServerTesting} from '@angular/platform-server/testing';
|
||||
import {platformServerTesting, ServerTestingModule} from '@angular/platform-server/testing';
|
||||
|
||||
import {SomeDep, SomeDirective, SomeModule, SomePipe, SomePrivateComponent, SomeService, expectInstanceCreated} from '../src/jit_summaries';
|
||||
import {expectInstanceCreated, SomeDep, SomeDirective, SomeModule, SomePipe, SomePrivateComponent, SomeService} from '../src/jit_summaries';
|
||||
import {SomeModuleNgSummary} from '../src/jit_summaries.ngsummary';
|
||||
|
||||
describe('Jit Summaries', () => {
|
||||
@ -18,7 +18,9 @@ describe('Jit Summaries', () => {
|
||||
TestBed.initTestEnvironment(ServerTestingModule, platformServerTesting(), SomeModuleNgSummary);
|
||||
});
|
||||
|
||||
afterEach(() => { TestBed.resetTestEnvironment(); });
|
||||
afterEach(() => {
|
||||
TestBed.resetTestEnvironment();
|
||||
});
|
||||
|
||||
it('should use directive metadata from summaries', () => {
|
||||
@Component({template: '<div someDir></div>'})
|
||||
|
@ -10,7 +10,7 @@ import './init';
|
||||
import {ComponentUsingThirdParty} from '../src/comp_using_3rdp';
|
||||
import {ComponentUsingFlatModule} from '../src/comp_using_flat_module';
|
||||
import {MainModule} from '../src/module';
|
||||
import {CompUsingLibModuleDirectiveAndPipe, CompUsingRootModuleDirectiveAndPipe, SOME_TOKEN, ServiceUsingLibModule, SomeLibModule, SomeService} from '../src/module_fixtures';
|
||||
import {CompUsingLibModuleDirectiveAndPipe, CompUsingRootModuleDirectiveAndPipe, ServiceUsingLibModule, SOME_TOKEN, SomeLibModule, SomeService} from '../src/module_fixtures';
|
||||
|
||||
import {createComponent, createModule} from './util';
|
||||
|
||||
|
@ -19,7 +19,6 @@ describe('child queries', () => {
|
||||
debugElement.query(By.directive(CompWithChildQuery));
|
||||
expect(childQueryCompFixture.componentInstance.child).toBeDefined();
|
||||
expect(childQueryCompFixture.componentInstance.child instanceof CompForChildQuery).toBe(true);
|
||||
|
||||
});
|
||||
|
||||
it('should support compiling children queries', () => {
|
||||
|
@ -31,7 +31,7 @@ function getSourcePositionForStack(stack: string): {source: string, line: number
|
||||
const htmlLocations = stack
|
||||
.split('\n')
|
||||
// e.g. at View_MyComp_0 (...html:153:40)
|
||||
.map(line => /\((.*\.html):(\d+):(\d+)/.exec(line) !)
|
||||
.map(line => /\((.*\.html):(\d+):(\d+)/.exec(line)!)
|
||||
.filter(match => !!match)
|
||||
.map(match => ({
|
||||
source: match[1],
|
||||
|
@ -22,10 +22,15 @@ import {createProgram, readConfiguration} from '@angular/compiler-cli';
|
||||
* properly read and wrote.
|
||||
*/
|
||||
function main() {
|
||||
Promise.resolve().then(() => lazyRoutesTest()).then(() => { process.exit(0); }).catch((err) => {
|
||||
console.error(err.stack);
|
||||
process.exit(1);
|
||||
});
|
||||
Promise.resolve()
|
||||
.then(() => lazyRoutesTest())
|
||||
.then(() => {
|
||||
process.exit(0);
|
||||
})
|
||||
.catch((err) => {
|
||||
console.error(err.stack);
|
||||
process.exit(1);
|
||||
});
|
||||
}
|
||||
|
||||
function lazyRoutesTest() {
|
||||
@ -36,7 +41,8 @@ function lazyRoutesTest() {
|
||||
const host = ts.createCompilerHost(config.options, true);
|
||||
const program = createProgram({
|
||||
rootNames: config.rootNames,
|
||||
options: config.options, host,
|
||||
options: config.options,
|
||||
host,
|
||||
});
|
||||
|
||||
config.options.basePath = basePath;
|
||||
|
@ -13,7 +13,7 @@ import {platformServerTesting} from '@angular/platform-server/testing';
|
||||
import {MainModule} from '../src/module';
|
||||
import {MainModuleNgFactory} from '../src/module.ngfactory';
|
||||
|
||||
let mainModuleRef: NgModuleRef<MainModule> = null !;
|
||||
let mainModuleRef: NgModuleRef<MainModule> = null!;
|
||||
beforeEach((done) => {
|
||||
platformServerTesting().bootstrapModuleFactory(MainModuleNgFactory).then((moduleRef: any) => {
|
||||
mainModuleRef = moduleRef;
|
||||
|
Reference in New Issue
Block a user