@angular/compiler-cli 21.0.0-next.9 → 21.0.0-rc.0
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-3UF7UI6H.js → chunk-3CWKYDQ7.js} +16729 -16217
- package/bundles/chunk-DT6FD4OE.js +1 -1
- package/bundles/{chunk-IE2YQNTQ.js → chunk-HSIRUBJU.js} +1 -1
- package/bundles/chunk-ZOLVJRLX.js +644 -0
- package/bundles/{chunk-SIOKS4LN.js → chunk-ZOZ6XVF3.js} +183 -796
- package/bundles/index.js +18 -18
- package/bundles/private/migrations.js +49 -5
- package/bundles/private/testing.js +526 -0
- package/bundles/private/tooling.js +1 -2
- package/bundles/src/bin/ng_xi18n.js +4 -4
- package/bundles/src/bin/ngc.js +4 -4
- package/index.d.ts +1 -1
- package/linker/src/file_linker/partial_linkers/util.d.ts +1 -1
- package/package.json +5 -13
- package/private/migrations.d.ts +11 -5
- package/private/testing.d.ts +11 -0
- package/src/ngtsc/annotations/index.d.ts +3 -2
- package/src/ngtsc/core/index.d.ts +1 -0
- package/src/ngtsc/file_system/testing/index.d.ts +12 -0
- package/src/ngtsc/file_system/testing/src/mock_file_system.d.ts +71 -0
- package/src/ngtsc/file_system/testing/src/mock_file_system_native.d.ts +15 -0
- package/src/ngtsc/file_system/testing/src/mock_file_system_posix.d.ts +12 -0
- package/src/ngtsc/file_system/testing/src/mock_file_system_windows.d.ts +12 -0
- package/src/ngtsc/file_system/testing/src/test_helper.d.ts +16 -0
- package/bundles/chunk-HRLHX4UA.js +0 -548
package/bundles/src/bin/ngc.js
CHANGED
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
|
|
6
6
|
import {
|
|
7
7
|
main
|
|
8
|
-
} from "../../chunk-
|
|
9
|
-
import "../../chunk-
|
|
10
|
-
import "../../chunk-
|
|
11
|
-
import "../../chunk-
|
|
8
|
+
} from "../../chunk-HSIRUBJU.js";
|
|
9
|
+
import "../../chunk-ZOLVJRLX.js";
|
|
10
|
+
import "../../chunk-ZOZ6XVF3.js";
|
|
11
|
+
import "../../chunk-3CWKYDQ7.js";
|
|
12
12
|
import "../../chunk-LS5RJ5CS.js";
|
|
13
13
|
import {
|
|
14
14
|
setFileSystem
|
package/index.d.ts
CHANGED
|
@@ -11,6 +11,6 @@ export { NgTscPlugin, PluginCompilerHost } from './src/ngtsc/tsc_plugin';
|
|
|
11
11
|
export { NgtscProgram } from './src/ngtsc/program';
|
|
12
12
|
export { OptimizeFor } from './src/ngtsc/typecheck/api';
|
|
13
13
|
export { ConsoleLogger, Logger, LogLevel } from './src/ngtsc/logging';
|
|
14
|
-
export { NodeJSFileSystem, absoluteFrom, FileSystem, AbsoluteFsPath } from './src/ngtsc/file_system';
|
|
14
|
+
export { NodeJSFileSystem, absoluteFrom, FileSystem, AbsoluteFsPath, NgtscCompilerHost, getFileSystem, setFileSystem, isLocalRelativePath, } from './src/ngtsc/file_system';
|
|
15
15
|
export * from './src/ngtsc/docs';
|
|
16
16
|
export { isLocalCompilationDiagnostics, ErrorCode, ngErrorCode } from './src/ngtsc/diagnostics';
|
|
@@ -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 = "21.0.0-
|
|
10
|
+
export declare const PLACEHOLDER_VERSION = "21.0.0-rc.0";
|
|
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": "21.0.0-
|
|
3
|
+
"version": "21.0.0-rc.0",
|
|
4
4
|
"description": "Angular - the compiler CLI for Node.js",
|
|
5
5
|
"typings": "index.d.ts",
|
|
6
6
|
"bin": {
|
|
@@ -24,17 +24,9 @@
|
|
|
24
24
|
"types": "./linker/babel/index.d.ts",
|
|
25
25
|
"default": "./bundles/linker/babel/index.js"
|
|
26
26
|
},
|
|
27
|
-
"./private
|
|
28
|
-
"types": "./private
|
|
29
|
-
"default": "./bundles/private
|
|
30
|
-
},
|
|
31
|
-
"./private/migrations": {
|
|
32
|
-
"types": "./private/migrations.d.ts",
|
|
33
|
-
"default": "./bundles/private/migrations.js"
|
|
34
|
-
},
|
|
35
|
-
"./private/tooling": {
|
|
36
|
-
"types": "./private/tooling.d.ts",
|
|
37
|
-
"default": "./bundles/private/tooling.js"
|
|
27
|
+
"./private/*": {
|
|
28
|
+
"types": "./private/*.d.ts",
|
|
29
|
+
"default": "./bundles/private/*.js"
|
|
38
30
|
}
|
|
39
31
|
},
|
|
40
32
|
"dependencies": {
|
|
@@ -48,7 +40,7 @@
|
|
|
48
40
|
"yargs": "^18.0.0"
|
|
49
41
|
},
|
|
50
42
|
"peerDependencies": {
|
|
51
|
-
"@angular/compiler": "21.0.0-
|
|
43
|
+
"@angular/compiler": "21.0.0-rc.0",
|
|
52
44
|
"typescript": ">=5.9 <6.0"
|
|
53
45
|
},
|
|
54
46
|
"peerDependenciesMeta": {
|
package/private/migrations.d.ts
CHANGED
|
@@ -9,10 +9,16 @@
|
|
|
9
9
|
* @fileoverview The API from compiler-cli that the `@angular/core`
|
|
10
10
|
* package requires for migration schematics.
|
|
11
11
|
*/
|
|
12
|
-
export { createForwardRefResolver } from '../src/ngtsc/annotations';
|
|
13
|
-
export { AbsoluteFsPath } from '../src/ngtsc/file_system';
|
|
14
|
-
export {
|
|
12
|
+
export { createForwardRefResolver, ExternalTemplateDeclaration, extractDecoratorQueryMetadata, extractTemplate, findAngularDecorator, getAngularDecorators, InlineTemplateDeclaration, queryDecoratorNames, QueryFunctionName, ResourceLoader, unwrapExpression, parseDecoratorInputTransformFunction, } from '../src/ngtsc/annotations';
|
|
13
|
+
export { AbsoluteFsPath, FileSystem, getFileSystem, isLocalRelativePath, NodeJSFileSystem, } from '../src/ngtsc/file_system';
|
|
14
|
+
export { CompilationMode } from '../src/ngtsc/transform';
|
|
15
|
+
export { DiagnosticCategoryLabel, NgCompiler, NgCompilerOptions, UnifiedModulesHost, } from '../src/ngtsc/core';
|
|
16
|
+
export { Reference, ReferenceEmitter, ReferenceEmitKind } from '../src/ngtsc/imports';
|
|
17
|
+
export { DecoratorInputTransform, DtsMetadataReader, MetadataReader, DirectiveMeta, InputMapping, } from '../src/ngtsc/metadata';
|
|
15
18
|
export { DynamicValue, PartialEvaluator, ResolvedValue, ResolvedValueMap, StaticInterpreter, } from '../src/ngtsc/partial_evaluator';
|
|
16
|
-
export { reflectObjectLiteral, TypeScriptReflectionHost } from '../src/ngtsc/reflection';
|
|
17
|
-
export { PotentialImport, PotentialImportKind, PotentialImportMode, TemplateTypeChecker, } from '../src/ngtsc/typecheck/api';
|
|
19
|
+
export { ClassDeclaration, Decorator, ReflectionHost, reflectObjectLiteral, TypeScriptReflectionHost, } from '../src/ngtsc/reflection';
|
|
20
|
+
export { PotentialImport, PotentialImportKind, PotentialImportMode, SymbolKind, TemplateTypeChecker, } from '../src/ngtsc/typecheck/api';
|
|
21
|
+
export { getRootDirs } from '../src/ngtsc/util/src/typescript';
|
|
22
|
+
export { FatalDiagnosticError } from '../src/ngtsc/diagnostics';
|
|
23
|
+
export { isShim } from '../src/ngtsc/shims';
|
|
18
24
|
export { ImportManager } from '../src/ngtsc/translator';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright Google LLC All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
7
|
+
*/
|
|
8
|
+
export { ImportedSymbolsTracker } from '../src/ngtsc/imports';
|
|
9
|
+
export { TypeScriptReflectionHost } from '../src/ngtsc/reflection';
|
|
10
|
+
export { getInitializerApiJitTransform } from '../src/ngtsc/transform/jit';
|
|
11
|
+
export { initMockFileSystem, MockFileSystem } from '../src/ngtsc/file_system/testing';
|
|
@@ -5,9 +5,10 @@
|
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
6
|
* found in the LICENSE file at https://angular.dev/license
|
|
7
7
|
*/
|
|
8
|
-
export { createForwardRefResolver, findAngularDecorator, getAngularDecorators, isAngularDecorator, NoopReferencesRegistry, ReferencesRegistry, ResourceLoader, ResourceLoaderContext, JitDeclarationRegistry, } from './common';
|
|
8
|
+
export { createForwardRefResolver, findAngularDecorator, getAngularDecorators, isAngularDecorator, NoopReferencesRegistry, ReferencesRegistry, ResourceLoader, ResourceLoaderContext, JitDeclarationRegistry, unwrapExpression, } from './common';
|
|
9
9
|
export { ComponentDecoratorHandler } from './component';
|
|
10
|
-
export {
|
|
10
|
+
export { extractTemplate, ExternalTemplateDeclaration, InlineTemplateDeclaration, } from './component/src/resources';
|
|
11
|
+
export { DirectiveDecoratorHandler, InitializerApiFunction, INPUT_INITIALIZER_FN, MODEL_INITIALIZER_FN, OUTPUT_INITIALIZER_FNS, QUERY_INITIALIZER_FNS, queryDecoratorNames, QueryFunctionName, tryParseInitializerApi, tryParseInitializerBasedOutput, tryParseSignalInputMapping, tryParseSignalModelMapping, tryParseSignalQueryFromInitializer, extractDecoratorQueryMetadata, parseDecoratorInputTransformFunction, } from './directive';
|
|
11
12
|
export { NgModuleDecoratorHandler } from './ng_module';
|
|
12
13
|
export { InjectableDecoratorHandler } from './src/injectable';
|
|
13
14
|
export { PipeDecoratorHandler } from './src/pipe';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright Google LLC All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
7
|
+
*/
|
|
8
|
+
export { Folder, MockFileSystem } from './src/mock_file_system';
|
|
9
|
+
export { MockFileSystemNative } from './src/mock_file_system_native';
|
|
10
|
+
export { MockFileSystemPosix } from './src/mock_file_system_posix';
|
|
11
|
+
export { MockFileSystemWindows } from './src/mock_file_system_windows';
|
|
12
|
+
export { initMockFileSystem, runInEachFileSystem, TestFile } from './src/test_helper';
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright Google LLC All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
7
|
+
*/
|
|
8
|
+
import { AbsoluteFsPath, FileStats, FileSystem, PathSegment, PathString } from '../../src/types';
|
|
9
|
+
/**
|
|
10
|
+
* An in-memory file system that can be used in unit tests.
|
|
11
|
+
*/
|
|
12
|
+
export declare abstract class MockFileSystem implements FileSystem {
|
|
13
|
+
private _isCaseSensitive;
|
|
14
|
+
private _fileTree;
|
|
15
|
+
private _cwd;
|
|
16
|
+
constructor(_isCaseSensitive?: boolean, cwd?: AbsoluteFsPath);
|
|
17
|
+
isCaseSensitive(): boolean;
|
|
18
|
+
exists(path: AbsoluteFsPath): boolean;
|
|
19
|
+
readFile(path: AbsoluteFsPath): string;
|
|
20
|
+
readFileBuffer(path: AbsoluteFsPath): Uint8Array;
|
|
21
|
+
writeFile(path: AbsoluteFsPath, data: string | Uint8Array, exclusive?: boolean): void;
|
|
22
|
+
removeFile(path: AbsoluteFsPath): void;
|
|
23
|
+
symlink(target: AbsoluteFsPath, path: AbsoluteFsPath): void;
|
|
24
|
+
readdir(path: AbsoluteFsPath): PathSegment[];
|
|
25
|
+
lstat(path: AbsoluteFsPath): FileStats;
|
|
26
|
+
stat(path: AbsoluteFsPath): FileStats;
|
|
27
|
+
copyFile(from: AbsoluteFsPath, to: AbsoluteFsPath): void;
|
|
28
|
+
moveFile(from: AbsoluteFsPath, to: AbsoluteFsPath): void;
|
|
29
|
+
ensureDir(path: AbsoluteFsPath): Folder;
|
|
30
|
+
removeDeep(path: AbsoluteFsPath): void;
|
|
31
|
+
isRoot(path: AbsoluteFsPath): boolean;
|
|
32
|
+
extname(path: AbsoluteFsPath | PathSegment): string;
|
|
33
|
+
realpath(filePath: AbsoluteFsPath): AbsoluteFsPath;
|
|
34
|
+
pwd(): AbsoluteFsPath;
|
|
35
|
+
chdir(path: AbsoluteFsPath): void;
|
|
36
|
+
getDefaultLibLocation(): AbsoluteFsPath;
|
|
37
|
+
abstract resolve(...paths: string[]): AbsoluteFsPath;
|
|
38
|
+
abstract dirname<T extends string>(file: T): T;
|
|
39
|
+
abstract join<T extends string>(basePath: T, ...paths: string[]): T;
|
|
40
|
+
abstract relative<T extends PathString>(from: T, to: T): PathSegment | AbsoluteFsPath;
|
|
41
|
+
abstract basename(filePath: string, extension?: string): PathSegment;
|
|
42
|
+
abstract isRooted(path: string): boolean;
|
|
43
|
+
abstract normalize<T extends PathString>(path: T): T;
|
|
44
|
+
protected abstract splitPath<T extends PathString>(path: T): string[];
|
|
45
|
+
dump(): Folder;
|
|
46
|
+
init(folder: Folder): void;
|
|
47
|
+
mount(path: AbsoluteFsPath, folder: Folder): void;
|
|
48
|
+
private cloneFolder;
|
|
49
|
+
private copyInto;
|
|
50
|
+
protected findFromPath(path: AbsoluteFsPath, options?: {
|
|
51
|
+
followSymLinks: boolean;
|
|
52
|
+
}): FindResult;
|
|
53
|
+
protected splitIntoFolderAndFile(path: AbsoluteFsPath): [AbsoluteFsPath, string];
|
|
54
|
+
protected getCanonicalPath<T extends string>(p: T): T;
|
|
55
|
+
}
|
|
56
|
+
export interface FindResult {
|
|
57
|
+
path: AbsoluteFsPath;
|
|
58
|
+
entity: Entity | null;
|
|
59
|
+
}
|
|
60
|
+
export type Entity = Folder | File | SymLink;
|
|
61
|
+
export interface Folder {
|
|
62
|
+
[pathSegments: string]: Entity;
|
|
63
|
+
}
|
|
64
|
+
export type File = string | Uint8Array;
|
|
65
|
+
export declare class SymLink {
|
|
66
|
+
path: AbsoluteFsPath;
|
|
67
|
+
constructor(path: AbsoluteFsPath);
|
|
68
|
+
}
|
|
69
|
+
export declare function isFile(item: Entity | null): item is File;
|
|
70
|
+
export declare function isSymLink(item: Entity | null): item is SymLink;
|
|
71
|
+
export declare function isFolder(item: Entity | null): item is Folder;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { AbsoluteFsPath, PathSegment, PathString } from '../../src/types';
|
|
2
|
+
import { MockFileSystem } from './mock_file_system';
|
|
3
|
+
export declare class MockFileSystemNative extends MockFileSystem {
|
|
4
|
+
constructor(cwd?: AbsoluteFsPath);
|
|
5
|
+
resolve(...paths: string[]): AbsoluteFsPath;
|
|
6
|
+
dirname<T extends string>(file: T): T;
|
|
7
|
+
join<T extends string>(basePath: T, ...paths: string[]): T;
|
|
8
|
+
relative<T extends PathString>(from: T, to: T): PathSegment | AbsoluteFsPath;
|
|
9
|
+
basename(filePath: string, extension?: string): PathSegment;
|
|
10
|
+
isCaseSensitive(): boolean;
|
|
11
|
+
isRooted(path: string): boolean;
|
|
12
|
+
isRoot(path: AbsoluteFsPath): boolean;
|
|
13
|
+
normalize<T extends PathString>(path: T): T;
|
|
14
|
+
protected splitPath<T>(path: string): string[];
|
|
15
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { AbsoluteFsPath, PathSegment, PathString } from '../../src/types';
|
|
2
|
+
import { MockFileSystem } from './mock_file_system';
|
|
3
|
+
export declare class MockFileSystemPosix extends MockFileSystem {
|
|
4
|
+
resolve(...paths: string[]): AbsoluteFsPath;
|
|
5
|
+
dirname<T extends string>(file: T): T;
|
|
6
|
+
join<T extends string>(basePath: T, ...paths: string[]): T;
|
|
7
|
+
relative<T extends PathString>(from: T, to: T): PathSegment | AbsoluteFsPath;
|
|
8
|
+
basename(filePath: string, extension?: string): PathSegment;
|
|
9
|
+
isRooted(path: string): boolean;
|
|
10
|
+
protected splitPath<T extends PathString>(path: T): string[];
|
|
11
|
+
normalize<T extends PathString>(path: T): T;
|
|
12
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { AbsoluteFsPath, PathSegment, PathString } from '../../src/types';
|
|
2
|
+
import { MockFileSystem } from './mock_file_system';
|
|
3
|
+
export declare class MockFileSystemWindows extends MockFileSystem {
|
|
4
|
+
resolve(...paths: string[]): AbsoluteFsPath;
|
|
5
|
+
dirname<T extends string>(path: T): T;
|
|
6
|
+
join<T extends string>(basePath: T, ...paths: string[]): T;
|
|
7
|
+
relative<T extends PathString>(from: T, to: T): PathSegment | AbsoluteFsPath;
|
|
8
|
+
basename(filePath: string, extension?: string): PathSegment;
|
|
9
|
+
isRooted(path: string): boolean;
|
|
10
|
+
protected splitPath<T extends PathString>(path: T): string[];
|
|
11
|
+
normalize<T extends PathString>(path: T): T;
|
|
12
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { AbsoluteFsPath } from '../../src/types';
|
|
2
|
+
import { MockFileSystem } from './mock_file_system';
|
|
3
|
+
export interface TestFile {
|
|
4
|
+
name: AbsoluteFsPath;
|
|
5
|
+
contents: string;
|
|
6
|
+
isRoot?: boolean | undefined;
|
|
7
|
+
}
|
|
8
|
+
export interface RunInEachFileSystemFn {
|
|
9
|
+
(callback: (os: string) => void): void;
|
|
10
|
+
windows(callback: (os: string) => void): void;
|
|
11
|
+
unix(callback: (os: string) => void): void;
|
|
12
|
+
native(callback: (os: string) => void): void;
|
|
13
|
+
osX(callback: (os: string) => void): void;
|
|
14
|
+
}
|
|
15
|
+
export declare const runInEachFileSystem: RunInEachFileSystemFn;
|
|
16
|
+
export declare function initMockFileSystem(os: string, cwd?: AbsoluteFsPath): MockFileSystem;
|