@angular/compiler-cli 18.2.0-next.2 → 18.2.0-next.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/{chunk-XNL3EK5H.js → chunk-3W345P4E.js} +7 -7
- package/bundles/{chunk-YDQXTFSY.js → chunk-A35M6UXY.js} +18 -21
- package/bundles/{chunk-YDQXTFSY.js.map → chunk-A35M6UXY.js.map} +1 -1
- package/bundles/{chunk-THQF5ZZE.js → chunk-ERN7RQQ7.js} +5 -5
- package/bundles/{chunk-CW5TTYLY.js → chunk-JN25LQVK.js} +148 -138
- package/bundles/chunk-JN25LQVK.js.map +6 -0
- package/bundles/{chunk-GJ2BX3NZ.js → chunk-KCKRBU6N.js} +31 -31
- package/bundles/{chunk-6OFVLEJY.js → chunk-LRE5TVUW.js} +81 -81
- package/bundles/{chunk-6OFVLEJY.js.map → chunk-LRE5TVUW.js.map} +1 -1
- package/bundles/{chunk-SBDNBITT.js → chunk-LYJKWJUC.js} +3 -3
- package/bundles/{chunk-BR33BNGB.js → chunk-OPQN45UO.js} +3 -3
- package/bundles/{chunk-WR7TUJ7M.js → chunk-QYV344EV.js} +7 -7
- package/bundles/{chunk-I56P56EE.js → chunk-WYWH4ABE.js} +117 -51
- package/bundles/{chunk-I56P56EE.js.map → chunk-WYWH4ABE.js.map} +1 -1
- package/bundles/{chunk-XVC3L7YN.js → chunk-Y6YVL6KE.js} +5 -5
- package/bundles/index.js +12 -12
- package/bundles/linker/babel/index.js +12 -12
- package/bundles/linker/index.js +4 -4
- package/bundles/ngcc/index.js +1 -1
- package/bundles/private/bazel.js +1 -1
- package/bundles/private/localize.js +3 -3
- package/bundles/private/migrations.js +4 -4
- package/bundles/private/tooling.js +6 -6
- package/bundles/src/bin/ng_xi18n.js +10 -10
- package/bundles/src/bin/ngc.js +8 -8
- package/bundles_metadata.json +1 -1
- package/linker/src/file_linker/partial_linkers/util.d.ts +1 -1
- package/package.json +2 -2
- package/src/ngtsc/annotations/ng_module/src/handler.d.ts +3 -2
- package/src/ngtsc/core/api/src/options.d.ts +1 -1
- package/src/ngtsc/transform/jit/src/initializer_api_transforms/transform_api.d.ts +1 -1
- package/src/ngtsc/translator/src/import_manager/import_manager.d.ts +17 -0
- package/src/ngtsc/translator/src/import_manager/import_typescript_transform.d.ts +1 -0
- package/bundles/chunk-CW5TTYLY.js.map +0 -6
- /package/bundles/{chunk-XNL3EK5H.js.map → chunk-3W345P4E.js.map} +0 -0
- /package/bundles/{chunk-THQF5ZZE.js.map → chunk-ERN7RQQ7.js.map} +0 -0
- /package/bundles/{chunk-GJ2BX3NZ.js.map → chunk-KCKRBU6N.js.map} +0 -0
- /package/bundles/{chunk-SBDNBITT.js.map → chunk-LYJKWJUC.js.map} +0 -0
- /package/bundles/{chunk-BR33BNGB.js.map → chunk-OPQN45UO.js.map} +0 -0
- /package/bundles/{chunk-WR7TUJ7M.js.map → chunk-QYV344EV.js.map} +0 -0
- /package/bundles/{chunk-XVC3L7YN.js.map → chunk-Y6YVL6KE.js.map} +0 -0
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { MaybeForwardRefExpression, outputAst as o, R3DeclareDependencyMetadata, R3DependencyMetadata, R3Reference } from '@angular/compiler';
|
|
9
9
|
import { AstObject, AstValue } from '../../ast/ast_value';
|
|
10
|
-
export declare const PLACEHOLDER_VERSION = "18.2.0-next.
|
|
10
|
+
export declare const PLACEHOLDER_VERSION = "18.2.0-next.4";
|
|
11
11
|
export declare function wrapReference<TExpression>(wrapped: o.WrappedNodeExpr<TExpression>): R3Reference;
|
|
12
12
|
/**
|
|
13
13
|
* Parses the value of an enum from the AST value's symbol name.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular/compiler-cli",
|
|
3
|
-
"version": "18.2.0-next.
|
|
3
|
+
"version": "18.2.0-next.4",
|
|
4
4
|
"description": "Angular - the compiler CLI for Node.js",
|
|
5
5
|
"typings": "index.d.ts",
|
|
6
6
|
"bin": {
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"yargs": "^17.2.1"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
56
|
-
"@angular/compiler": "18.2.0-next.
|
|
56
|
+
"@angular/compiler": "18.2.0-next.4",
|
|
57
57
|
"typescript": ">=5.4 <5.6"
|
|
58
58
|
},
|
|
59
59
|
"repository": {
|
|
@@ -15,7 +15,7 @@ import { PerfRecorder } from '../../../perf';
|
|
|
15
15
|
import { ClassDeclaration, Decorator, ReflectionHost } from '../../../reflection';
|
|
16
16
|
import { LocalModuleScopeRegistry } from '../../../scope';
|
|
17
17
|
import { AnalysisOutput, CompilationMode, CompileResult, DecoratorHandler, DetectResult, HandlerPrecedence, ResolveResult } from '../../../transform';
|
|
18
|
-
import { InjectableClassRegistry, ReferencesRegistry } from '../../common';
|
|
18
|
+
import { InjectableClassRegistry, JitDeclarationRegistry, ReferencesRegistry } from '../../common';
|
|
19
19
|
export interface NgModuleAnalysis {
|
|
20
20
|
mod: R3NgModuleMetadata;
|
|
21
21
|
inj: R3InjectorMetadata;
|
|
@@ -84,7 +84,8 @@ export declare class NgModuleDecoratorHandler implements DecoratorHandler<Decora
|
|
|
84
84
|
private includeSelectorScope;
|
|
85
85
|
private readonly compilationMode;
|
|
86
86
|
private readonly localCompilationExtraImportsTracker;
|
|
87
|
-
|
|
87
|
+
private readonly jitDeclarationRegistry;
|
|
88
|
+
constructor(reflector: ReflectionHost, evaluator: PartialEvaluator, metaReader: MetadataReader, metaRegistry: MetadataRegistry, scopeRegistry: LocalModuleScopeRegistry, referencesRegistry: ReferencesRegistry, exportedProviderStatusResolver: ExportedProviderStatusResolver, semanticDepGraphUpdater: SemanticDepGraphUpdater | null, isCore: boolean, refEmitter: ReferenceEmitter, annotateForClosureCompiler: boolean, onlyPublishPublicTypings: boolean, injectableRegistry: InjectableClassRegistry, perf: PerfRecorder, includeClassMetadata: boolean, includeSelectorScope: boolean, compilationMode: CompilationMode, localCompilationExtraImportsTracker: LocalCompilationExtraImportsTracker | null, jitDeclarationRegistry: JitDeclarationRegistry);
|
|
88
89
|
readonly precedence = HandlerPrecedence.PRIMARY;
|
|
89
90
|
readonly name = "NgModuleDecoratorHandler";
|
|
90
91
|
detect(node: ClassDeclaration, decorators: Decorator[] | null): DetectResult<Decorator> | undefined;
|
|
@@ -19,7 +19,7 @@ export interface TestOnlyOptions {
|
|
|
19
19
|
* Whether components that are poisoned should still be processed.
|
|
20
20
|
* E.g. for generation of type check blocks and diagnostics.
|
|
21
21
|
*/
|
|
22
|
-
|
|
22
|
+
_compilePoisonedComponents?: boolean;
|
|
23
23
|
/**
|
|
24
24
|
* An option to enable ngtsc's internal performance tracing.
|
|
25
25
|
*
|
|
@@ -12,7 +12,7 @@ import { ImportManager } from '../../../../translator';
|
|
|
12
12
|
/** Function that can be used to transform class properties. */
|
|
13
13
|
export type PropertyTransform = (member: Pick<ClassMember, 'name' | 'accessLevel' | 'value'> & {
|
|
14
14
|
node: ts.PropertyDeclaration;
|
|
15
|
-
}, host: ReflectionHost, factory: ts.NodeFactory, importTracker: ImportedSymbolsTracker, importManager: ImportManager, classDecorator: Decorator, isCore: boolean) => ts.PropertyDeclaration;
|
|
15
|
+
}, sourceFile: ts.SourceFile, host: ReflectionHost, factory: ts.NodeFactory, importTracker: ImportedSymbolsTracker, importManager: ImportManager, classDecorator: Decorator, isCore: boolean) => ts.PropertyDeclaration;
|
|
16
16
|
/**
|
|
17
17
|
* Creates an import and access for a given Angular core import while
|
|
18
18
|
* ensuring the decorator symbol access can be traced back to an Angular core
|
|
@@ -43,6 +43,13 @@ export type ModuleName = string & {
|
|
|
43
43
|
export declare class ImportManager implements ImportGenerator<ts.SourceFile, ts.Identifier | ts.PropertyAccessExpression> {
|
|
44
44
|
/** List of new imports that will be inserted into given source files. */
|
|
45
45
|
private newImports;
|
|
46
|
+
/**
|
|
47
|
+
* Keeps track of imports marked for removal. The root-level key is the file from which the
|
|
48
|
+
* import should be removed, the inner map key is the name of the module from which the symbol
|
|
49
|
+
* is being imported. The value of the inner map is a set of symbol names that should be removed.
|
|
50
|
+
* Note! the inner map tracks the original names of the imported symbols, not their local aliases.
|
|
51
|
+
*/
|
|
52
|
+
private removedImports;
|
|
46
53
|
private nextUniqueIndex;
|
|
47
54
|
private config;
|
|
48
55
|
private reuseSourceFileImportsTracker;
|
|
@@ -60,6 +67,14 @@ export declare class ImportManager implements ImportGenerator<ts.SourceFile, ts.
|
|
|
60
67
|
addImport(request: ImportRequest<ts.SourceFile> & {
|
|
61
68
|
asTypeReference?: undefined;
|
|
62
69
|
}): ts.Identifier | ts.PropertyAccessExpression;
|
|
70
|
+
/**
|
|
71
|
+
* Marks all imported symbols with a specific name for removal.
|
|
72
|
+
* Call `addImport` to undo this operation.
|
|
73
|
+
* @param requestedFile File from which to remove the imports.
|
|
74
|
+
* @param exportSymbolName Declared name of the symbol being removed.
|
|
75
|
+
* @param moduleSpecifier Module from which the symbol is being imported.
|
|
76
|
+
*/
|
|
77
|
+
removeImport(requestedFile: ts.SourceFile, exportSymbolName: string, moduleSpecifier: string): void;
|
|
63
78
|
private _generateNewImport;
|
|
64
79
|
/**
|
|
65
80
|
* Finalizes the import manager by computing all necessary import changes
|
|
@@ -74,6 +89,7 @@ export declare class ImportManager implements ImportGenerator<ts.SourceFile, ts.
|
|
|
74
89
|
updatedImports: Map<ts.NamedImports, ts.NamedImports>;
|
|
75
90
|
newImports: Map<string, ts.ImportDeclaration[]>;
|
|
76
91
|
reusedOriginalAliasDeclarations: Set<AliasImportDeclaration>;
|
|
92
|
+
deletedImports: Set<ts.ImportDeclaration>;
|
|
77
93
|
};
|
|
78
94
|
/**
|
|
79
95
|
* Gets a TypeScript transform for the import manager.
|
|
@@ -90,4 +106,5 @@ export declare class ImportManager implements ImportGenerator<ts.SourceFile, ts.
|
|
|
90
106
|
*/
|
|
91
107
|
transformTsFile(ctx: ts.TransformationContext, file: ts.SourceFile, extraStatementsAfterImports?: ts.Statement[]): ts.SourceFile;
|
|
92
108
|
private _getNewImportsTrackerForFile;
|
|
109
|
+
private _canAddSpecifier;
|
|
93
110
|
}
|
|
@@ -13,5 +13,6 @@ import type { ImportManager } from './import_manager';
|
|
|
13
13
|
* - The transform updates existing imports with new symbols to be added.
|
|
14
14
|
* - The transform adds new necessary imports.
|
|
15
15
|
* - The transform inserts additional optional statements after imports.
|
|
16
|
+
* - The transform deletes any nodes that are marked for deletion by the manager.
|
|
16
17
|
*/
|
|
17
18
|
export declare function createTsTransformForImportManager(manager: ImportManager, extraStatementsForFiles?: Map<string, ts.Statement[]>): ts.TransformerFactory<ts.SourceFile>;
|