refactor(compiler): remove all source-level traces to tsc-wrapped (#18966)

- temporarily keeps the old sources under packages/tsc-wrapped
  until the build scripts are changed to use compiler-cli everywhere.
- removes the compiler options `disableTransformerPipeline` that was introduced
  in a previous beta of Angular 5, i.e. the transformer based compiler
  is now always enabled.

PR Close #18966
This commit is contained in:
Matias Niemelä
2017-09-13 16:55:42 -07:00
parent 42c69d3ba6
commit 4695c69cf1
44 changed files with 5350 additions and 516 deletions

View File

@ -7,11 +7,13 @@
*/
import {AotCompilerHost, StaticSymbol, UrlResolver, createOfflineCompileUrlResolver, syntaxError} from '@angular/compiler';
import {AngularCompilerOptions, CollectorOptions, MetadataCollector, ModuleMetadata} from '@angular/tsc-wrapped';
import * as fs from 'fs';
import * as path from 'path';
import * as ts from 'typescript';
import {CollectorOptions, MetadataCollector, ModuleMetadata} from './metadata/index';
import {CompilerOptions} from './transformers/api';
const EXT = /(\.ts|\.d\.ts|\.js|\.jsx|\.tsx)$/;
const DTS = /\.d\.ts$/;
const NODE_MODULES = '/node_modules/';
@ -34,8 +36,7 @@ export abstract class BaseAotCompilerHost<C extends BaseAotCompilerHostContext>
private flatModuleIndexRedirectNames = new Set<string>();
constructor(
protected program: ts.Program, protected options: AngularCompilerOptions,
protected context: C,
protected program: ts.Program, protected options: CompilerOptions, protected context: C,
protected metadataProvider: MetadataProvider = new MetadataCollector()) {}
abstract moduleNameToFileName(m: string, containingFile: string): string|null;
@ -230,6 +231,7 @@ export interface CompilerHostContext extends ts.ModuleResolutionHost {
assumeFileExists(fileName: string): void;
}
// TODO(tbosch): remove this once G3 uses the transformer compiler!
export class CompilerHost extends BaseAotCompilerHost<CompilerHostContext> {
protected basePath: string;
private moduleFileNames = new Map<string, string|null>();
@ -239,7 +241,7 @@ export class CompilerHost extends BaseAotCompilerHost<CompilerHostContext> {
private urlResolver: UrlResolver;
constructor(
program: ts.Program, options: AngularCompilerOptions, context: CompilerHostContext,
program: ts.Program, options: CompilerOptions, context: CompilerHostContext,
collectorOptions?: CollectorOptions,
metadataProvider: MetadataProvider = new MetadataCollector(collectorOptions)) {
super(program, options, context, metadataProvider);