@angular/compiler-cli 19.1.0-next.0 → 19.1.0-next.2
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-DHTI5OKE.js → chunk-34FJ6PKD.js} +81 -81
- package/bundles/{chunk-ZEPJHGBL.js → chunk-3OT7XV3K.js} +152 -134
- package/bundles/{chunk-ZEPJHGBL.js.map → chunk-3OT7XV3K.js.map} +3 -3
- package/bundles/{chunk-77D5CI2U.js → chunk-5UDS2TPQ.js} +7 -7
- package/bundles/{chunk-W3RHSPCT.js → chunk-A7ZZMLHV.js} +5 -5
- package/bundles/{chunk-FKXFEX7K.js → chunk-GBKXY6BH.js} +3 -3
- package/bundles/{chunk-Q2WE7ECN.js → chunk-I6R3GL3L.js} +5 -5
- package/bundles/{chunk-NFCGJ6UU.js → chunk-MIHO36SM.js} +12 -12
- package/bundles/{chunk-P6YTDBL7.js → chunk-NQFS66HQ.js} +31 -31
- package/bundles/{chunk-NC4E5UYB.js → chunk-P5OLJFAE.js} +43 -43
- package/bundles/{chunk-37JMVF7H.js → chunk-STORTTKY.js} +8 -8
- package/bundles/{chunk-5ZWV2XEF.js → chunk-YCOYUOYB.js} +3 -3
- 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/declaration_scope.d.ts +1 -1
- package/linker/src/file_linker/partial_linkers/util.d.ts +1 -1
- package/package.json +2 -2
- package/src/ngtsc/core/api/src/public_options.d.ts +2 -2
- package/src/ngtsc/diagnostics/src/error_code.d.ts +13 -13
- package/src/ngtsc/hmr/src/{extract_locals.d.ts → extract_dependencies.d.ts} +6 -4
- package/src/ngtsc/imports/src/patch_alias_reference_resolution.d.ts +1 -1
- package/src/ngtsc/translator/src/type_emitter.d.ts +2 -2
- /package/bundles/{chunk-DHTI5OKE.js.map → chunk-34FJ6PKD.js.map} +0 -0
- /package/bundles/{chunk-77D5CI2U.js.map → chunk-5UDS2TPQ.js.map} +0 -0
- /package/bundles/{chunk-W3RHSPCT.js.map → chunk-A7ZZMLHV.js.map} +0 -0
- /package/bundles/{chunk-FKXFEX7K.js.map → chunk-GBKXY6BH.js.map} +0 -0
- /package/bundles/{chunk-Q2WE7ECN.js.map → chunk-I6R3GL3L.js.map} +0 -0
- /package/bundles/{chunk-NFCGJ6UU.js.map → chunk-MIHO36SM.js.map} +0 -0
- /package/bundles/{chunk-P6YTDBL7.js.map → chunk-NQFS66HQ.js.map} +0 -0
- /package/bundles/{chunk-NC4E5UYB.js.map → chunk-P5OLJFAE.js.map} +0 -0
- /package/bundles/{chunk-37JMVF7H.js.map → chunk-STORTTKY.js.map} +0 -0
- /package/bundles/{chunk-5ZWV2XEF.js.map → chunk-YCOYUOYB.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 = "19.1.0-next.
|
|
10
|
+
export declare const PLACEHOLDER_VERSION = "19.1.0-next.2";
|
|
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": "19.1.0-next.
|
|
3
|
+
"version": "19.1.0-next.2",
|
|
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": "19.1.0-next.
|
|
56
|
+
"@angular/compiler": "19.1.0-next.2",
|
|
57
57
|
"typescript": ">=5.5 <5.8"
|
|
58
58
|
},
|
|
59
59
|
"repository": {
|
|
@@ -265,14 +265,14 @@ export interface BazelAndG3Options {
|
|
|
265
265
|
*
|
|
266
266
|
* A consumer of such a path-mapped library will write an import like:
|
|
267
267
|
*
|
|
268
|
-
* ```
|
|
268
|
+
* ```ts
|
|
269
269
|
* import {LibModule} from 'lib/deep/path/to/module';
|
|
270
270
|
* ```
|
|
271
271
|
*
|
|
272
272
|
* The compiler will attempt to generate imports of directives/pipes from that same module
|
|
273
273
|
* specifier (the compiler does not rewrite the user's given import path, unlike View Engine).
|
|
274
274
|
*
|
|
275
|
-
* ```
|
|
275
|
+
* ```ts
|
|
276
276
|
* import {LibDir, LibCmp, LibPipe} from 'lib/deep/path/to/module';
|
|
277
277
|
* ```
|
|
278
278
|
*
|
|
@@ -255,7 +255,7 @@ export declare enum ErrorCode {
|
|
|
255
255
|
* The tracking expression of a `for` loop block is accessing a variable that is unavailable,
|
|
256
256
|
* for example:
|
|
257
257
|
*
|
|
258
|
-
* ```
|
|
258
|
+
* ```angular-html
|
|
259
259
|
* <ng-template let-ref>
|
|
260
260
|
* @for (item of items; track ref) {}
|
|
261
261
|
* </ng-template>
|
|
@@ -266,7 +266,7 @@ export declare enum ErrorCode {
|
|
|
266
266
|
* The trigger of a `defer` block cannot access its trigger element,
|
|
267
267
|
* either because it doesn't exist or it's in a different view.
|
|
268
268
|
*
|
|
269
|
-
* ```
|
|
269
|
+
* ```angular-html
|
|
270
270
|
* @defer (on interaction(trigger)) {...}
|
|
271
271
|
*
|
|
272
272
|
* <ng-template>
|
|
@@ -279,7 +279,7 @@ export declare enum ErrorCode {
|
|
|
279
279
|
* A control flow node is projected at the root of a component and is preventing its direct
|
|
280
280
|
* descendants from being projected, because it has more than one root node.
|
|
281
281
|
*
|
|
282
|
-
* ```
|
|
282
|
+
* ```angular-html
|
|
283
283
|
* <comp>
|
|
284
284
|
* @if (expr) {
|
|
285
285
|
* <div projectsIntoSlot></div>
|
|
@@ -314,7 +314,7 @@ export declare enum ErrorCode {
|
|
|
314
314
|
* A two way binding in a template has an incorrect syntax,
|
|
315
315
|
* parentheses outside brackets. For example:
|
|
316
316
|
*
|
|
317
|
-
* ```
|
|
317
|
+
* ```html
|
|
318
318
|
* <div ([foo])="bar" />
|
|
319
319
|
* ```
|
|
320
320
|
*/
|
|
@@ -322,7 +322,7 @@ export declare enum ErrorCode {
|
|
|
322
322
|
/**
|
|
323
323
|
* The left side of a nullish coalescing operation is not nullable.
|
|
324
324
|
*
|
|
325
|
-
* ```
|
|
325
|
+
* ```html
|
|
326
326
|
* {{ foo ?? bar }}
|
|
327
327
|
* ```
|
|
328
328
|
* When the type of foo doesn't include `null` or `undefined`.
|
|
@@ -337,7 +337,7 @@ export declare enum ErrorCode {
|
|
|
337
337
|
* A text attribute is not interpreted as a binding but likely intended to be.
|
|
338
338
|
*
|
|
339
339
|
* For example:
|
|
340
|
-
* ```
|
|
340
|
+
* ```html
|
|
341
341
|
* <div
|
|
342
342
|
* attr.x="value"
|
|
343
343
|
* class.blue="true"
|
|
@@ -354,7 +354,7 @@ export declare enum ErrorCode {
|
|
|
354
354
|
* in their statement.
|
|
355
355
|
*
|
|
356
356
|
* For example:
|
|
357
|
-
* ```
|
|
357
|
+
* ```html
|
|
358
358
|
* <ul><li *ngFor="item of items">{{item["name"]}};</li></ul>
|
|
359
359
|
* ```
|
|
360
360
|
*/
|
|
@@ -373,7 +373,7 @@ export declare enum ErrorCode {
|
|
|
373
373
|
/**
|
|
374
374
|
* The left side of an optional chain operation is not nullable.
|
|
375
375
|
*
|
|
376
|
-
* ```
|
|
376
|
+
* ```html
|
|
377
377
|
* {{ foo?.bar }}
|
|
378
378
|
* {{ foo?.['bar'] }}
|
|
379
379
|
* {{ foo?.() }}
|
|
@@ -385,7 +385,7 @@ export declare enum ErrorCode {
|
|
|
385
385
|
* `ngSkipHydration` should not be a binding (it should be a static attribute).
|
|
386
386
|
*
|
|
387
387
|
* For example:
|
|
388
|
-
* ```
|
|
388
|
+
* ```html
|
|
389
389
|
* <my-cmp [ngSkipHydration]="someTruthyVar" />
|
|
390
390
|
* ```
|
|
391
391
|
*
|
|
@@ -397,7 +397,7 @@ export declare enum ErrorCode {
|
|
|
397
397
|
* Signal functions should be invoked when interpolated in templates.
|
|
398
398
|
*
|
|
399
399
|
* For example:
|
|
400
|
-
* ```
|
|
400
|
+
* ```html
|
|
401
401
|
* {{ mySignal() }}
|
|
402
402
|
* ```
|
|
403
403
|
*/
|
|
@@ -405,7 +405,7 @@ export declare enum ErrorCode {
|
|
|
405
405
|
/**
|
|
406
406
|
* Initializer-based APIs can only be invoked from inside of an initializer.
|
|
407
407
|
*
|
|
408
|
-
* ```
|
|
408
|
+
* ```ts
|
|
409
409
|
* // Allowed
|
|
410
410
|
* myInput = input();
|
|
411
411
|
*
|
|
@@ -420,7 +420,7 @@ export declare enum ErrorCode {
|
|
|
420
420
|
* A function in an event binding is not called.
|
|
421
421
|
*
|
|
422
422
|
* For example:
|
|
423
|
-
* ```
|
|
423
|
+
* ```html
|
|
424
424
|
* <button (click)="myFunc"></button>
|
|
425
425
|
* ```
|
|
426
426
|
*
|
|
@@ -432,7 +432,7 @@ export declare enum ErrorCode {
|
|
|
432
432
|
* A `@let` declaration in a template isn't used.
|
|
433
433
|
*
|
|
434
434
|
* For example:
|
|
435
|
-
* ```
|
|
435
|
+
* ```angular-html
|
|
436
436
|
* @let used = 1; <!-- Not an error -->
|
|
437
437
|
* @let notUsed = 2; <!-- Error -->
|
|
438
438
|
*
|
|
@@ -5,16 +5,18 @@
|
|
|
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
|
-
import { R3CompiledExpression, outputAst as o } from '@angular/compiler';
|
|
8
|
+
import { R3CompiledExpression, R3HmrNamespaceDependency, outputAst as o } from '@angular/compiler';
|
|
9
9
|
import { DeclarationNode } from '../../reflection';
|
|
10
10
|
import { CompileResult } from '../../transform';
|
|
11
11
|
/**
|
|
12
|
-
* Determines the
|
|
13
|
-
* initializer needs to capture and pass along.
|
|
12
|
+
* Determines the file-level dependencies that the HMR initializer needs to capture and pass along.
|
|
14
13
|
* @param sourceFile File in which the file is being compiled.
|
|
15
14
|
* @param definition Compiled component definition.
|
|
16
15
|
* @param factory Compiled component factory.
|
|
17
16
|
* @param classMetadata Compiled `setClassMetadata` expression, if any.
|
|
18
17
|
* @param debugInfo Compiled `setClassDebugInfo` expression, if any.
|
|
19
18
|
*/
|
|
20
|
-
export declare function
|
|
19
|
+
export declare function extractHmrDependencies(node: DeclarationNode, definition: R3CompiledExpression, factory: CompileResult, classMetadata: o.Statement | null, debugInfo: o.Statement | null): {
|
|
20
|
+
local: string[];
|
|
21
|
+
external: R3HmrNamespaceDependency[];
|
|
22
|
+
};
|
|
@@ -29,7 +29,7 @@ export type AliasImportDeclaration = ts.ImportSpecifier | ts.NamespaceImport | t
|
|
|
29
29
|
* results in a slow-down due to the type checker being involved multiple times. The CLI worked
|
|
30
30
|
* around this import preserving issue by having another complex post-process step that detects and
|
|
31
31
|
* elides unused imports. Note that these unused imports could cause unused chunks being generated
|
|
32
|
-
* by
|
|
32
|
+
* by webpack if the application or library is not marked as side-effect free.
|
|
33
33
|
*
|
|
34
34
|
* This is not ideal though, as we basically re-implement the complex import usage resolution
|
|
35
35
|
* from TypeScript. We can do better by letting TypeScript do the import eliding, but providing
|
|
@@ -27,7 +27,7 @@ export declare function canEmitType(type: ts.TypeNode, canEmit: (type: ts.TypeRe
|
|
|
27
27
|
*
|
|
28
28
|
* For example, consider the following code:
|
|
29
29
|
*
|
|
30
|
-
* ```
|
|
30
|
+
* ```ts
|
|
31
31
|
* import {NgIterable} from '@angular/core';
|
|
32
32
|
*
|
|
33
33
|
* class NgForOf<T, U extends NgIterable<T>> {}
|
|
@@ -39,7 +39,7 @@ export declare function canEmitType(type: ts.TypeNode, canEmit: (type: ts.TypeRe
|
|
|
39
39
|
* `NgIterable` type reference to a type reference that is valid in the context in which it is
|
|
40
40
|
* emitted, for example:
|
|
41
41
|
*
|
|
42
|
-
* ```
|
|
42
|
+
* ```ts
|
|
43
43
|
* import * as i0 from '@angular/core';
|
|
44
44
|
* import * as i1 from '@angular/common';
|
|
45
45
|
*
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|