From 279e816ea7db640ac851e658d7fd635555696bcb Mon Sep 17 00:00:00 2001 From: Misko Hevery Date: Tue, 14 Jun 2016 19:49:53 -0700 Subject: [PATCH] chore: Remove unnecessary calls to Parse5DomAdapter This reverts commit 80deac5cded4d3534771c3484f937b0f8dde143c. --- .../@angular/compiler-cli/integrationtest/test/animate_spec.ts | 1 - .../@angular/compiler-cli/integrationtest/test/basic_spec.ts | 1 - .../@angular/compiler-cli/integrationtest/test/i18n_spec.ts | 2 -- modules/@angular/compiler-cli/src/codegen.ts | 3 --- modules/@angular/compiler-cli/src/extract_i18n.ts | 3 --- 5 files changed, 10 deletions(-) diff --git a/modules/@angular/compiler-cli/integrationtest/test/animate_spec.ts b/modules/@angular/compiler-cli/integrationtest/test/animate_spec.ts index 9b6d8b098b..608ea42865 100644 --- a/modules/@angular/compiler-cli/integrationtest/test/animate_spec.ts +++ b/modules/@angular/compiler-cli/integrationtest/test/animate_spec.ts @@ -1,5 +1,4 @@ require('reflect-metadata'); -require('@angular/platform-server/src/parse5_adapter.js').Parse5DomAdapter.makeCurrent(); require('zone.js/dist/zone-node.js'); require('zone.js/dist/long-stack-trace-zone.js'); diff --git a/modules/@angular/compiler-cli/integrationtest/test/basic_spec.ts b/modules/@angular/compiler-cli/integrationtest/test/basic_spec.ts index ad9543d2da..def42faba8 100644 --- a/modules/@angular/compiler-cli/integrationtest/test/basic_spec.ts +++ b/modules/@angular/compiler-cli/integrationtest/test/basic_spec.ts @@ -2,7 +2,6 @@ // TODO(alexeagle): maybe remove that check? require('reflect-metadata'); -require('@angular/platform-server/src/parse5_adapter.js').Parse5DomAdapter.makeCurrent(); require('zone.js/dist/zone-node.js'); require('zone.js/dist/long-stack-trace-zone.js'); diff --git a/modules/@angular/compiler-cli/integrationtest/test/i18n_spec.ts b/modules/@angular/compiler-cli/integrationtest/test/i18n_spec.ts index 26118bc662..858f6ad04c 100644 --- a/modules/@angular/compiler-cli/integrationtest/test/i18n_spec.ts +++ b/modules/@angular/compiler-cli/integrationtest/test/i18n_spec.ts @@ -1,8 +1,6 @@ // Only needed to satisfy the check in core/src/util/decorators.ts // TODO(alexeagle): maybe remove that check? require('reflect-metadata'); - -require('@angular/platform-server/src/parse5_adapter.js').Parse5DomAdapter.makeCurrent(); require('zone.js/dist/zone-node.js'); require('zone.js/dist/long-stack-trace-zone.js'); let serializer = require('@angular/compiler/src/i18n/xmb_serializer.js'); diff --git a/modules/@angular/compiler-cli/src/codegen.ts b/modules/@angular/compiler-cli/src/codegen.ts index 2192653b72..a0bcde9f46 100644 --- a/modules/@angular/compiler-cli/src/codegen.ts +++ b/modules/@angular/compiler-cli/src/codegen.ts @@ -4,7 +4,6 @@ */ import * as compiler from '@angular/compiler'; import {ViewEncapsulation, lockRunMode} from '@angular/core'; -import {Parse5DomAdapter} from '@angular/platform-server'; import {AngularCompilerOptions} from '@angular/tsc-wrapped'; import * as path from 'path'; import * as ts from 'typescript'; @@ -108,8 +107,6 @@ export class CodeGenerator { } codegen(): Promise { - Parse5DomAdapter.makeCurrent(); - let stylesheetPromises: Promise[] = []; const generateOneFile = (absSourcePath: string) => Promise.all(this.readComponents(absSourcePath)) diff --git a/modules/@angular/compiler-cli/src/extract_i18n.ts b/modules/@angular/compiler-cli/src/extract_i18n.ts index fa54ace503..2e22cf79d1 100644 --- a/modules/@angular/compiler-cli/src/extract_i18n.ts +++ b/modules/@angular/compiler-cli/src/extract_i18n.ts @@ -16,8 +16,6 @@ import {ViewEncapsulation, lockRunMode} from '@angular/core'; import {StaticReflector} from './static_reflector'; import {CompileMetadataResolver, HtmlParser, DirectiveNormalizer, Lexer, Parser, TemplateParser, DomElementSchemaRegistry, StyleCompiler, ViewCompiler, TypeScriptEmitter, MessageExtractor, removeDuplicates, ExtractionResult, Message, ParseError, serializeXmb,} from './compiler_private'; -import {Parse5DomAdapter} from '@angular/platform-server'; - import {ReflectorHost} from './reflector_host'; import {StaticAndDynamicReflectionCapabilities} from './static_reflection_capabilities'; @@ -99,7 +97,6 @@ class Extractor { } extract(): Promise { - Parse5DomAdapter.makeCurrent(); _dirPaths.clear(); const promises = this._program.getSourceFiles()