mirror of
https://github.com/angular/angular.git
synced 2026-11-28 17:37:50 -05:00
refactor(ivy): move ngcc into a higher level folder (#29092)
PR Close #29092
This commit is contained in:
committed by
Matias Niemelä
parent
cf4718c366
commit
a770aa231d
@@ -34,9 +34,9 @@ ng_package(
|
|||||||
visibility = [
|
visibility = [
|
||||||
"//packages/bazel/test/ng_package:__pkg__",
|
"//packages/bazel/test/ng_package:__pkg__",
|
||||||
"//packages/compiler-cli/integrationtest:__pkg__",
|
"//packages/compiler-cli/integrationtest:__pkg__",
|
||||||
|
"//packages/compiler-cli/ngcc/test:__pkg__",
|
||||||
"//packages/compiler-cli/test:__pkg__",
|
"//packages/compiler-cli/test:__pkg__",
|
||||||
"//packages/compiler-cli/test/diagnostics:__pkg__",
|
"//packages/compiler-cli/test/diagnostics:__pkg__",
|
||||||
"//packages/compiler-cli/test/ngcc:__pkg__",
|
|
||||||
"//packages/compiler-cli/test/transformers:__pkg__",
|
"//packages/compiler-cli/test/transformers:__pkg__",
|
||||||
"//packages/compiler/test:__pkg__",
|
"//packages/compiler/test:__pkg__",
|
||||||
"//packages/language-service/test:__pkg__",
|
"//packages/language-service/test:__pkg__",
|
||||||
|
|||||||
@@ -60,6 +60,6 @@ npm_package(
|
|||||||
],
|
],
|
||||||
deps = [
|
deps = [
|
||||||
":compiler-cli",
|
":compiler-cli",
|
||||||
"//packages/compiler-cli/src/ngcc",
|
"//packages/compiler-cli/ngcc",
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ This conversion will allow such "legacy" packages to be used by the Ivy renderin
|
|||||||
The project is built using Bazel:
|
The project is built using Bazel:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
yarn bazel build //packages/compiler-cli/src/ngcc
|
yarn bazel build //packages/compiler-cli/ngcc
|
||||||
```
|
```
|
||||||
|
|
||||||
## Unit Testing
|
## Unit Testing
|
||||||
@@ -18,7 +18,7 @@ yarn bazel build //packages/compiler-cli/src/ngcc
|
|||||||
The unit tests are built and run using Bazel:
|
The unit tests are built and run using Bazel:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
yarn bazel test //packages/compiler-cli/src/ngcc/test
|
yarn bazel test //packages/compiler-cli/ngcc/test
|
||||||
```
|
```
|
||||||
|
|
||||||
## Integration Testing
|
## Integration Testing
|
||||||
@@ -26,5 +26,5 @@ yarn bazel test //packages/compiler-cli/src/ngcc/test
|
|||||||
There are tests that check the behavior of the overall executable:
|
There are tests that check the behavior of the overall executable:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
yarn bazel test //packages/compiler-cli/test/ngcc
|
yarn bazel test //packages/compiler-cli/ngcc/test:integration
|
||||||
```
|
```
|
||||||
+7
-7
@@ -10,13 +10,13 @@ import * as path from 'canonical-path';
|
|||||||
import * as fs from 'fs';
|
import * as fs from 'fs';
|
||||||
import * as ts from 'typescript';
|
import * as ts from 'typescript';
|
||||||
|
|
||||||
import {BaseDefDecoratorHandler, ComponentDecoratorHandler, DirectiveDecoratorHandler, InjectableDecoratorHandler, NgModuleDecoratorHandler, PipeDecoratorHandler, ReferencesRegistry, ResourceLoader} from '../../../ngtsc/annotations';
|
import {BaseDefDecoratorHandler, ComponentDecoratorHandler, DirectiveDecoratorHandler, InjectableDecoratorHandler, NgModuleDecoratorHandler, PipeDecoratorHandler, ReferencesRegistry, ResourceLoader} from '../../../src/ngtsc/annotations';
|
||||||
import {CycleAnalyzer, ImportGraph} from '../../../ngtsc/cycles';
|
import {CycleAnalyzer, ImportGraph} from '../../../src/ngtsc/cycles';
|
||||||
import {AbsoluteModuleStrategy, LocalIdentifierStrategy, LogicalProjectStrategy, ModuleResolver, NOOP_DEFAULT_IMPORT_RECORDER, ReferenceEmitter} from '../../../ngtsc/imports';
|
import {AbsoluteModuleStrategy, LocalIdentifierStrategy, LogicalProjectStrategy, ModuleResolver, NOOP_DEFAULT_IMPORT_RECORDER, ReferenceEmitter} from '../../../src/ngtsc/imports';
|
||||||
import {PartialEvaluator} from '../../../ngtsc/partial_evaluator';
|
import {PartialEvaluator} from '../../../src/ngtsc/partial_evaluator';
|
||||||
import {AbsoluteFsPath, LogicalFileSystem} from '../../../ngtsc/path';
|
import {AbsoluteFsPath, LogicalFileSystem} from '../../../src/ngtsc/path';
|
||||||
import {LocalModuleScopeRegistry, MetadataDtsModuleScopeResolver} from '../../../ngtsc/scope';
|
import {LocalModuleScopeRegistry, MetadataDtsModuleScopeResolver} from '../../../src/ngtsc/scope';
|
||||||
import {CompileResult, DecoratorHandler, DetectResult, HandlerPrecedence} from '../../../ngtsc/transform';
|
import {CompileResult, DecoratorHandler, DetectResult, HandlerPrecedence} from '../../../src/ngtsc/transform';
|
||||||
import {DecoratedClass} from '../host/decorated_class';
|
import {DecoratedClass} from '../host/decorated_class';
|
||||||
import {NgccReflectionHost} from '../host/ngcc_host';
|
import {NgccReflectionHost} from '../host/ngcc_host';
|
||||||
import {isDefined} from '../utils';
|
import {isDefined} from '../utils';
|
||||||
+3
-3
@@ -7,9 +7,9 @@
|
|||||||
*/
|
*/
|
||||||
import * as ts from 'typescript';
|
import * as ts from 'typescript';
|
||||||
|
|
||||||
import {ReferencesRegistry} from '../../../ngtsc/annotations';
|
import {ReferencesRegistry} from '../../../src/ngtsc/annotations';
|
||||||
import {Reference} from '../../../ngtsc/imports';
|
import {Reference} from '../../../src/ngtsc/imports';
|
||||||
import {Declaration} from '../../../ngtsc/reflection';
|
import {Declaration} from '../../../src/ngtsc/reflection';
|
||||||
import {NgccReflectionHost} from '../host/ngcc_host';
|
import {NgccReflectionHost} from '../host/ngcc_host';
|
||||||
import {isDefined} from '../utils';
|
import {isDefined} from '../utils';
|
||||||
|
|
||||||
+3
-3
@@ -7,9 +7,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import * as ts from 'typescript';
|
import * as ts from 'typescript';
|
||||||
import {ReferencesRegistry} from '../../../ngtsc/annotations';
|
import {ReferencesRegistry} from '../../../src/ngtsc/annotations';
|
||||||
import {Reference} from '../../../ngtsc/imports';
|
import {Reference} from '../../../src/ngtsc/imports';
|
||||||
import {Declaration, ReflectionHost} from '../../../ngtsc/reflection';
|
import {Declaration, ReflectionHost} from '../../../src/ngtsc/reflection';
|
||||||
import {hasNameIdentifier} from '../utils';
|
import {hasNameIdentifier} from '../utils';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
+1
-1
@@ -7,7 +7,7 @@
|
|||||||
*/
|
*/
|
||||||
import * as ts from 'typescript';
|
import * as ts from 'typescript';
|
||||||
|
|
||||||
import {Declaration} from '../../../ngtsc/reflection';
|
import {Declaration} from '../../../src/ngtsc/reflection';
|
||||||
import {NgccReflectionHost} from '../host/ngcc_host';
|
import {NgccReflectionHost} from '../host/ngcc_host';
|
||||||
import {hasNameIdentifier, isDefined} from '../utils';
|
import {hasNameIdentifier, isDefined} from '../utils';
|
||||||
import {NgccReferencesRegistry} from './ngcc_references_registry';
|
import {NgccReferencesRegistry} from './ngcc_references_registry';
|
||||||
+1
-1
@@ -7,7 +7,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import * as ts from 'typescript';
|
import * as ts from 'typescript';
|
||||||
import {Decorator} from '../../../ngtsc/reflection';
|
import {Decorator} from '../../../src/ngtsc/reflection';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A simple container that holds the details of a decorated class that has been
|
* A simple container that holds the details of a decorated class that has been
|
||||||
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
import * as ts from 'typescript';
|
import * as ts from 'typescript';
|
||||||
|
|
||||||
import {ClassMember, ClassMemberKind, CtorParameter, Decorator, Import, TypeScriptReflectionHost, reflectObjectLiteral} from '../../../ngtsc/reflection';
|
import {ClassMember, ClassMemberKind, CtorParameter, Decorator, Import, TypeScriptReflectionHost, reflectObjectLiteral} from '../../../src/ngtsc/reflection';
|
||||||
import {BundleProgram} from '../packages/bundle_program';
|
import {BundleProgram} from '../packages/bundle_program';
|
||||||
import {findAll, getNameText, isDefined} from '../utils';
|
import {findAll, getNameText, isDefined} from '../utils';
|
||||||
|
|
||||||
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
import * as ts from 'typescript';
|
import * as ts from 'typescript';
|
||||||
|
|
||||||
import {ClassMember, ClassMemberKind, Declaration, Decorator, FunctionDefinition, Parameter, reflectObjectLiteral} from '../../../ngtsc/reflection';
|
import {ClassMember, ClassMemberKind, Declaration, Decorator, FunctionDefinition, Parameter, reflectObjectLiteral} from '../../../src/ngtsc/reflection';
|
||||||
import {getNameText, hasNameIdentifier} from '../utils';
|
import {getNameText, hasNameIdentifier} from '../utils';
|
||||||
|
|
||||||
import {Esm2015ReflectionHost, ParamInfo, getPropertyValueFromSymbol, isAssignmentStatement} from './esm2015_host';
|
import {Esm2015ReflectionHost, ParamInfo, getPropertyValueFromSymbol, isAssignmentStatement} from './esm2015_host';
|
||||||
+1
-1
@@ -6,7 +6,7 @@
|
|||||||
* found in the LICENSE file at https://angular.io/license
|
* found in the LICENSE file at https://angular.io/license
|
||||||
*/
|
*/
|
||||||
import * as ts from 'typescript';
|
import * as ts from 'typescript';
|
||||||
import {ReflectionHost} from '../../../ngtsc/reflection';
|
import {ReflectionHost} from '../../../src/ngtsc/reflection';
|
||||||
import {DecoratedClass} from './decorated_class';
|
import {DecoratedClass} from './decorated_class';
|
||||||
|
|
||||||
export const PRE_R3_MARKER = '__PRE_R3__';
|
export const PRE_R3_MARKER = '__PRE_R3__';
|
||||||
+1
-1
@@ -7,7 +7,7 @@
|
|||||||
*/
|
*/
|
||||||
import * as ts from 'typescript';
|
import * as ts from 'typescript';
|
||||||
|
|
||||||
import {AbsoluteFsPath} from '../../../ngtsc/path';
|
import {AbsoluteFsPath} from '../../../src/ngtsc/path';
|
||||||
|
|
||||||
import {BundleProgram, makeBundleProgram} from './bundle_program';
|
import {BundleProgram, makeBundleProgram} from './bundle_program';
|
||||||
import {EntryPoint, EntryPointFormat} from './entry_point';
|
import {EntryPoint, EntryPointFormat} from './entry_point';
|
||||||
+1
-1
@@ -13,7 +13,7 @@ import {CompiledClass} from '../analysis/decoration_analyzer';
|
|||||||
import {RedundantDecoratorMap, Renderer, stripExtension} from './renderer';
|
import {RedundantDecoratorMap, Renderer, stripExtension} from './renderer';
|
||||||
import {EntryPointBundle} from '../packages/entry_point_bundle';
|
import {EntryPointBundle} from '../packages/entry_point_bundle';
|
||||||
import {ExportInfo} from '../analysis/private_declarations_analyzer';
|
import {ExportInfo} from '../analysis/private_declarations_analyzer';
|
||||||
import {isDtsPath} from '../../../ngtsc/util/src/typescript';
|
import {isDtsPath} from '../../../src/ngtsc/util/src/typescript';
|
||||||
|
|
||||||
export class EsmRenderer extends Renderer {
|
export class EsmRenderer extends Renderer {
|
||||||
constructor(
|
constructor(
|
||||||
+1
-1
@@ -7,7 +7,7 @@
|
|||||||
* found in the LICENSE file at https://angular.io/license
|
* found in the LICENSE file at https://angular.io/license
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {ImportRewriter, validateAndRewriteCoreSymbol} from '../../../ngtsc/imports';
|
import {ImportRewriter, validateAndRewriteCoreSymbol} from '../../../src/ngtsc/imports';
|
||||||
|
|
||||||
export class NgccFlatImportRewriter implements ImportRewriter {
|
export class NgccFlatImportRewriter implements ImportRewriter {
|
||||||
shouldImportSymbol(symbol: string, specifier: string): boolean {
|
shouldImportSymbol(symbol: string, specifier: string): boolean {
|
||||||
+1
-1
@@ -15,7 +15,7 @@ import * as ts from 'typescript';
|
|||||||
|
|
||||||
import {NoopImportRewriter, ImportRewriter, R3SymbolsImportRewriter, NOOP_DEFAULT_IMPORT_RECORDER} from '@angular/compiler-cli/src/ngtsc/imports';
|
import {NoopImportRewriter, ImportRewriter, R3SymbolsImportRewriter, NOOP_DEFAULT_IMPORT_RECORDER} from '@angular/compiler-cli/src/ngtsc/imports';
|
||||||
import {CompileResult} from '@angular/compiler-cli/src/ngtsc/transform';
|
import {CompileResult} from '@angular/compiler-cli/src/ngtsc/transform';
|
||||||
import {translateStatement, translateType, ImportManager} from '../../../ngtsc/translator';
|
import {translateStatement, translateType, ImportManager} from '../../../src/ngtsc/translator';
|
||||||
import {NgccFlatImportRewriter} from './ngcc_import_rewriter';
|
import {NgccFlatImportRewriter} from './ngcc_import_rewriter';
|
||||||
import {CompiledClass, CompiledFile, DecorationAnalyses} from '../analysis/decoration_analyzer';
|
import {CompiledClass, CompiledFile, DecorationAnalyses} from '../analysis/decoration_analyzer';
|
||||||
import {ModuleWithProvidersInfo, ModuleWithProvidersAnalyses} from '../analysis/module_with_providers_analyzer';
|
import {ModuleWithProvidersInfo, ModuleWithProvidersAnalyses} from '../analysis/module_with_providers_analyzer';
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user