@angular/core 20.3.4 → 20.3.5
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/api.d.d.ts +1 -1
- package/chrome_dev_tools_performance.d.d.ts +3 -1
- package/discovery.d.d.ts +1 -1
- package/effect.d.d.ts +1 -1
- package/event_dispatcher.d.d.ts +1 -1
- package/fesm2022/attribute.mjs +1 -1
- package/fesm2022/attribute.mjs.map +1 -1
- package/fesm2022/core.mjs +2 -2
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/debug_node.mjs +35 -22
- package/fesm2022/debug_node.mjs.map +1 -1
- package/fesm2022/effect.mjs +1 -1
- package/fesm2022/effect.mjs.map +1 -1
- package/fesm2022/not_found.mjs +1 -1
- package/fesm2022/not_found.mjs.map +1 -1
- package/fesm2022/primitives/di.mjs +1 -1
- package/fesm2022/primitives/di.mjs.map +1 -1
- package/fesm2022/primitives/event-dispatch.mjs +1 -1
- package/fesm2022/primitives/event-dispatch.mjs.map +1 -1
- package/fesm2022/primitives/signals.mjs +1 -1
- package/fesm2022/primitives/signals.mjs.map +1 -1
- package/fesm2022/resource.mjs +1 -1
- package/fesm2022/resource.mjs.map +1 -1
- package/fesm2022/root_effect_scheduler.mjs +7 -2
- package/fesm2022/root_effect_scheduler.mjs.map +1 -1
- package/fesm2022/rxjs-interop.mjs +1 -1
- package/fesm2022/rxjs-interop.mjs.map +1 -1
- package/fesm2022/signal.mjs +1 -1
- package/fesm2022/signal.mjs.map +1 -1
- package/fesm2022/testing.mjs +1 -1
- package/fesm2022/testing.mjs.map +1 -1
- package/fesm2022/weak_ref.mjs +1 -1
- package/fesm2022/weak_ref.mjs.map +1 -1
- package/formatter.d.d.ts +1 -1
- package/index.d.ts +15 -8
- package/package.json +2 -2
- package/primitives/di/index.d.ts +1 -1
- package/primitives/event-dispatch/index.d.ts +1 -1
- package/primitives/signals/index.d.ts +1 -1
- package/rxjs-interop/index.d.ts +1 -1
- package/schematics/bundles/add-bootstrap-context-to-server-main.cjs +5 -5
- package/schematics/bundles/{apply_import_manager-CUBvPp_2.cjs → apply_import_manager-_3Mx7H7A.cjs} +3 -3
- package/schematics/bundles/cleanup-unused-imports.cjs +5 -5
- package/schematics/bundles/{compiler_host-DJHZ7M9N.cjs → compiler_host-DXiKJabk.cjs} +2 -2
- package/schematics/bundles/control-flow-migration.cjs +21 -20
- package/schematics/bundles/document-core.cjs +5 -5
- package/schematics/bundles/imports-CIX-JgAN.cjs +1 -1
- package/schematics/bundles/{index-BZJ8bv9v.cjs → index-BDeOF3Gn.cjs} +125 -58
- package/schematics/bundles/{index-DU_evmAi.cjs → index-C8BhVtUr.cjs} +4 -4
- package/schematics/bundles/inject-flags.cjs +5 -5
- package/schematics/bundles/inject-migration.cjs +3 -3
- package/schematics/bundles/leading_space-D9nQ8UQC.cjs +1 -1
- package/schematics/bundles/{migrate_ts_type_references-58gA72Ti.cjs → migrate_ts_type_references-BlSjvHVC.cjs} +47 -5
- package/schematics/bundles/ng_decorators-B5HCqr20.cjs +1 -1
- package/schematics/bundles/nodes-B16H9JUd.cjs +1 -1
- package/schematics/bundles/output-migration.cjs +6 -6
- package/schematics/bundles/{project_paths-DcM18127.cjs → project_paths-C8LDPZ5A.cjs} +3 -3
- package/schematics/bundles/{project_tsconfig_paths-Dqd0J7st.cjs → project_tsconfig_paths-tTmeFlcz.cjs} +145 -3
- package/schematics/bundles/property_name-BBwFuqMe.cjs +1 -1
- package/schematics/bundles/route-lazy-loading.cjs +3 -3
- package/schematics/bundles/router-current-navigation.cjs +4 -4
- package/schematics/bundles/self-closing-tags-migration.cjs +4 -4
- package/schematics/bundles/signal-input-migration.cjs +7 -7
- package/schematics/bundles/signal-queries-migration.cjs +7 -7
- package/schematics/bundles/signals.cjs +7 -7
- package/schematics/bundles/standalone-migration.cjs +4 -4
- package/schematics/bundles/symbol-VPWguRxr.cjs +1 -1
- package/schematics/bundles/test-bed-get.cjs +4 -4
- package/testing/index.d.ts +1 -1
- package/weak_ref.d.d.ts +1 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v20.3.
|
|
3
|
+
* @license Angular v20.3.5
|
|
4
4
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
5
5
|
* License: MIT
|
|
6
6
|
*/
|
|
7
7
|
'use strict';
|
|
8
8
|
|
|
9
|
-
var project_tsconfig_paths = require('./project_tsconfig_paths-
|
|
9
|
+
var project_tsconfig_paths = require('./project_tsconfig_paths-tTmeFlcz.cjs');
|
|
10
10
|
var ts = require('typescript');
|
|
11
11
|
var p = require('path');
|
|
12
12
|
require('os');
|
|
@@ -891,7 +891,7 @@ const MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION = '18.0.0';
|
|
|
891
891
|
function compileDeclareClassMetadata(metadata) {
|
|
892
892
|
const definitionMap = new project_tsconfig_paths.DefinitionMap();
|
|
893
893
|
definitionMap.set('minVersion', project_tsconfig_paths.literal(MINIMUM_PARTIAL_LINKER_VERSION$5));
|
|
894
|
-
definitionMap.set('version', project_tsconfig_paths.literal('20.3.
|
|
894
|
+
definitionMap.set('version', project_tsconfig_paths.literal('20.3.5'));
|
|
895
895
|
definitionMap.set('ngImport', project_tsconfig_paths.importExpr(project_tsconfig_paths.Identifiers.core));
|
|
896
896
|
definitionMap.set('type', metadata.type);
|
|
897
897
|
definitionMap.set('decorators', metadata.decorators);
|
|
@@ -909,7 +909,7 @@ function compileComponentDeclareClassMetadata(metadata, dependencies) {
|
|
|
909
909
|
callbackReturnDefinitionMap.set('ctorParameters', metadata.ctorParameters ?? project_tsconfig_paths.literal(null));
|
|
910
910
|
callbackReturnDefinitionMap.set('propDecorators', metadata.propDecorators ?? project_tsconfig_paths.literal(null));
|
|
911
911
|
definitionMap.set('minVersion', project_tsconfig_paths.literal(MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION));
|
|
912
|
-
definitionMap.set('version', project_tsconfig_paths.literal('20.3.
|
|
912
|
+
definitionMap.set('version', project_tsconfig_paths.literal('20.3.5'));
|
|
913
913
|
definitionMap.set('ngImport', project_tsconfig_paths.importExpr(project_tsconfig_paths.Identifiers.core));
|
|
914
914
|
definitionMap.set('type', metadata.type);
|
|
915
915
|
definitionMap.set('resolveDeferredDeps', compileComponentMetadataAsyncResolver(dependencies));
|
|
@@ -1004,7 +1004,7 @@ function createDirectiveDefinitionMap(meta) {
|
|
|
1004
1004
|
const definitionMap = new project_tsconfig_paths.DefinitionMap();
|
|
1005
1005
|
const minVersion = getMinimumVersionForPartialOutput(meta);
|
|
1006
1006
|
definitionMap.set('minVersion', project_tsconfig_paths.literal(minVersion));
|
|
1007
|
-
definitionMap.set('version', project_tsconfig_paths.literal('20.3.
|
|
1007
|
+
definitionMap.set('version', project_tsconfig_paths.literal('20.3.5'));
|
|
1008
1008
|
// e.g. `type: MyDirective`
|
|
1009
1009
|
definitionMap.set('type', meta.type.value);
|
|
1010
1010
|
if (meta.isStandalone !== undefined) {
|
|
@@ -1420,7 +1420,7 @@ const MINIMUM_PARTIAL_LINKER_VERSION$4 = '12.0.0';
|
|
|
1420
1420
|
function compileDeclareFactoryFunction(meta) {
|
|
1421
1421
|
const definitionMap = new project_tsconfig_paths.DefinitionMap();
|
|
1422
1422
|
definitionMap.set('minVersion', project_tsconfig_paths.literal(MINIMUM_PARTIAL_LINKER_VERSION$4));
|
|
1423
|
-
definitionMap.set('version', project_tsconfig_paths.literal('20.3.
|
|
1423
|
+
definitionMap.set('version', project_tsconfig_paths.literal('20.3.5'));
|
|
1424
1424
|
definitionMap.set('ngImport', project_tsconfig_paths.importExpr(project_tsconfig_paths.Identifiers.core));
|
|
1425
1425
|
definitionMap.set('type', meta.type.value);
|
|
1426
1426
|
definitionMap.set('deps', compileDependencies(meta.deps));
|
|
@@ -1455,7 +1455,7 @@ function compileDeclareInjectableFromMetadata(meta) {
|
|
|
1455
1455
|
function createInjectableDefinitionMap(meta) {
|
|
1456
1456
|
const definitionMap = new project_tsconfig_paths.DefinitionMap();
|
|
1457
1457
|
definitionMap.set('minVersion', project_tsconfig_paths.literal(MINIMUM_PARTIAL_LINKER_VERSION$3));
|
|
1458
|
-
definitionMap.set('version', project_tsconfig_paths.literal('20.3.
|
|
1458
|
+
definitionMap.set('version', project_tsconfig_paths.literal('20.3.5'));
|
|
1459
1459
|
definitionMap.set('ngImport', project_tsconfig_paths.importExpr(project_tsconfig_paths.Identifiers.core));
|
|
1460
1460
|
definitionMap.set('type', meta.type.value);
|
|
1461
1461
|
// Only generate providedIn property if it has a non-null value
|
|
@@ -1506,7 +1506,7 @@ function compileDeclareInjectorFromMetadata(meta) {
|
|
|
1506
1506
|
function createInjectorDefinitionMap(meta) {
|
|
1507
1507
|
const definitionMap = new project_tsconfig_paths.DefinitionMap();
|
|
1508
1508
|
definitionMap.set('minVersion', project_tsconfig_paths.literal(MINIMUM_PARTIAL_LINKER_VERSION$2));
|
|
1509
|
-
definitionMap.set('version', project_tsconfig_paths.literal('20.3.
|
|
1509
|
+
definitionMap.set('version', project_tsconfig_paths.literal('20.3.5'));
|
|
1510
1510
|
definitionMap.set('ngImport', project_tsconfig_paths.importExpr(project_tsconfig_paths.Identifiers.core));
|
|
1511
1511
|
definitionMap.set('type', meta.type.value);
|
|
1512
1512
|
definitionMap.set('providers', meta.providers);
|
|
@@ -1539,7 +1539,7 @@ function createNgModuleDefinitionMap(meta) {
|
|
|
1539
1539
|
throw new Error('Invalid path! Local compilation mode should not get into the partial compilation path');
|
|
1540
1540
|
}
|
|
1541
1541
|
definitionMap.set('minVersion', project_tsconfig_paths.literal(MINIMUM_PARTIAL_LINKER_VERSION$1));
|
|
1542
|
-
definitionMap.set('version', project_tsconfig_paths.literal('20.3.
|
|
1542
|
+
definitionMap.set('version', project_tsconfig_paths.literal('20.3.5'));
|
|
1543
1543
|
definitionMap.set('ngImport', project_tsconfig_paths.importExpr(project_tsconfig_paths.Identifiers.core));
|
|
1544
1544
|
definitionMap.set('type', meta.type.value);
|
|
1545
1545
|
// We only generate the keys in the metadata if the arrays contain values.
|
|
@@ -1590,7 +1590,7 @@ function compileDeclarePipeFromMetadata(meta) {
|
|
|
1590
1590
|
function createPipeDefinitionMap(meta) {
|
|
1591
1591
|
const definitionMap = new project_tsconfig_paths.DefinitionMap();
|
|
1592
1592
|
definitionMap.set('minVersion', project_tsconfig_paths.literal(MINIMUM_PARTIAL_LINKER_VERSION));
|
|
1593
|
-
definitionMap.set('version', project_tsconfig_paths.literal('20.3.
|
|
1593
|
+
definitionMap.set('version', project_tsconfig_paths.literal('20.3.5'));
|
|
1594
1594
|
definitionMap.set('ngImport', project_tsconfig_paths.importExpr(project_tsconfig_paths.Identifiers.core));
|
|
1595
1595
|
// e.g. `type: MyPipe`
|
|
1596
1596
|
definitionMap.set('type', meta.type.value);
|
|
@@ -5623,7 +5623,7 @@ class InjectableClassRegistry {
|
|
|
5623
5623
|
* If no such metadata is present, this function returns `null`. Otherwise, the call is returned
|
|
5624
5624
|
* as a `Statement` for inclusion along with the class.
|
|
5625
5625
|
*/
|
|
5626
|
-
function extractClassMetadata(clazz, reflection, isCore, annotateForClosureCompiler, angularDecoratorTransform = (dec) => dec) {
|
|
5626
|
+
function extractClassMetadata(clazz, reflection, isCore, annotateForClosureCompiler, angularDecoratorTransform = (dec) => dec, undecoratedMetadataExtractor = () => null) {
|
|
5627
5627
|
if (!reflection.isClass(clazz)) {
|
|
5628
5628
|
return null;
|
|
5629
5629
|
}
|
|
@@ -5657,21 +5657,47 @@ function extractClassMetadata(clazz, reflection, isCore, annotateForClosureCompi
|
|
|
5657
5657
|
// Do the same for property decorators.
|
|
5658
5658
|
let metaPropDecorators = null;
|
|
5659
5659
|
const classMembers = reflection.getMembersOfClass(clazz).filter((member) => !member.isStatic &&
|
|
5660
|
-
member.decorators !== null &&
|
|
5661
|
-
member.decorators.length > 0 &&
|
|
5662
5660
|
// Private fields are not supported in the metadata emit
|
|
5663
5661
|
member.accessLevel !== project_tsconfig_paths.ClassMemberAccessLevel.EcmaScriptPrivate);
|
|
5664
|
-
const
|
|
5665
|
-
|
|
5662
|
+
const decoratedMembers = [];
|
|
5663
|
+
const seenMemberNames = new Set();
|
|
5664
|
+
let duplicateDecoratedMembers = null;
|
|
5665
|
+
for (const member of classMembers) {
|
|
5666
|
+
const shouldQuoteName = member.nameNode !== null && ts.isStringLiteralLike(member.nameNode);
|
|
5667
|
+
if (member.decorators !== null && member.decorators.length > 0) {
|
|
5668
|
+
decoratedMembers.push({
|
|
5669
|
+
key: member.name,
|
|
5670
|
+
quoted: shouldQuoteName,
|
|
5671
|
+
value: decoratedClassMemberToMetadata(member.decorators, isCore),
|
|
5672
|
+
});
|
|
5673
|
+
if (seenMemberNames.has(member.name)) {
|
|
5674
|
+
duplicateDecoratedMembers ??= [];
|
|
5675
|
+
duplicateDecoratedMembers.push(member);
|
|
5676
|
+
}
|
|
5677
|
+
else {
|
|
5678
|
+
seenMemberNames.add(member.name);
|
|
5679
|
+
}
|
|
5680
|
+
}
|
|
5681
|
+
else {
|
|
5682
|
+
const undecoratedMetadata = undecoratedMetadataExtractor(member);
|
|
5683
|
+
if (undecoratedMetadata !== null) {
|
|
5684
|
+
decoratedMembers.push({
|
|
5685
|
+
key: member.name,
|
|
5686
|
+
quoted: shouldQuoteName,
|
|
5687
|
+
value: undecoratedMetadata,
|
|
5688
|
+
});
|
|
5689
|
+
}
|
|
5690
|
+
}
|
|
5691
|
+
}
|
|
5692
|
+
if (duplicateDecoratedMembers !== null) {
|
|
5666
5693
|
// This should theoretically never happen, because the only way to have duplicate instance
|
|
5667
5694
|
// member names is getter/setter pairs and decorators cannot appear in both a getter and the
|
|
5668
5695
|
// corresponding setter.
|
|
5669
5696
|
throw new project_tsconfig_paths.FatalDiagnosticError(project_tsconfig_paths.ErrorCode.DUPLICATE_DECORATED_PROPERTIES, duplicateDecoratedMembers[0].nameNode ?? clazz, `Duplicate decorated properties found on class '${clazz.name.text}': ` +
|
|
5670
5697
|
duplicateDecoratedMembers.map((member) => member.name).join(', '));
|
|
5671
5698
|
}
|
|
5672
|
-
const decoratedMembers = classMembers.map((member) => classMemberToMetadata(member.nameNode ?? member.name, member.decorators, isCore));
|
|
5673
5699
|
if (decoratedMembers.length > 0) {
|
|
5674
|
-
metaPropDecorators =
|
|
5700
|
+
metaPropDecorators = project_tsconfig_paths.literalMap(decoratedMembers);
|
|
5675
5701
|
}
|
|
5676
5702
|
return {
|
|
5677
5703
|
type: new project_tsconfig_paths.WrappedNodeExpr(id),
|
|
@@ -5705,12 +5731,11 @@ function ctorParameterToMetadata(param, isCore) {
|
|
|
5705
5731
|
/**
|
|
5706
5732
|
* Convert a reflected class member to metadata.
|
|
5707
5733
|
*/
|
|
5708
|
-
function
|
|
5734
|
+
function decoratedClassMemberToMetadata(decorators, isCore) {
|
|
5709
5735
|
const ngDecorators = decorators
|
|
5710
5736
|
.filter((dec) => isAngularDecorator$1(dec, isCore))
|
|
5711
|
-
.map((decorator) => decoratorToMetadata(decorator));
|
|
5712
|
-
|
|
5713
|
-
return ts.factory.createPropertyAssignment(name, decoratorMeta);
|
|
5737
|
+
.map((decorator) => new project_tsconfig_paths.WrappedNodeExpr(decoratorToMetadata(decorator)));
|
|
5738
|
+
return new project_tsconfig_paths.LiteralArrayExpr(ngDecorators);
|
|
5714
5739
|
}
|
|
5715
5740
|
/**
|
|
5716
5741
|
* Convert a reflected decorator to metadata.
|
|
@@ -7885,9 +7910,11 @@ class DirectiveDecoratorHandler {
|
|
|
7885
7910
|
this.usePoisonedData = usePoisonedData;
|
|
7886
7911
|
this.typeCheckHostBindings = typeCheckHostBindings;
|
|
7887
7912
|
this.emitDeclarationOnly = emitDeclarationOnly;
|
|
7913
|
+
this.undecoratedMetadataExtractor = project_tsconfig_paths.getDirectiveUndecoratedMetadataExtractor(reflector, importTracker);
|
|
7888
7914
|
}
|
|
7889
7915
|
precedence = project_tsconfig_paths.HandlerPrecedence.PRIMARY;
|
|
7890
7916
|
name = 'DirectiveDecoratorHandler';
|
|
7917
|
+
undecoratedMetadataExtractor;
|
|
7891
7918
|
detect(node, decorators) {
|
|
7892
7919
|
// If a class is undecorated but uses Angular features, we detect it as an
|
|
7893
7920
|
// abstract directive. This is an unsupported pattern as of v10, but we want
|
|
@@ -7940,7 +7967,7 @@ class DirectiveDecoratorHandler {
|
|
|
7940
7967
|
hostDirectives: directiveResult.hostDirectives,
|
|
7941
7968
|
rawHostDirectives: directiveResult.rawHostDirectives,
|
|
7942
7969
|
classMetadata: this.includeClassMetadata
|
|
7943
|
-
? extractClassMetadata(node, this.reflector, this.isCore, this.annotateForClosureCompiler)
|
|
7970
|
+
? extractClassMetadata(node, this.reflector, this.isCore, this.annotateForClosureCompiler, undefined, this.undecoratedMetadataExtractor)
|
|
7944
7971
|
: null,
|
|
7945
7972
|
baseClass: project_tsconfig_paths.readBaseClass(node, this.reflector, this.evaluator),
|
|
7946
7973
|
typeCheckMeta: project_tsconfig_paths.extractDirectiveTypeCheckMeta(node, directiveResult.inputs, this.reflector),
|
|
@@ -10278,6 +10305,7 @@ class ComponentDecoratorHandler {
|
|
|
10278
10305
|
enableSelectorless: this.enableSelectorless,
|
|
10279
10306
|
preserveSignificantWhitespace: this.i18nPreserveSignificantWhitespace,
|
|
10280
10307
|
};
|
|
10308
|
+
this.undecoratedMetadataExtractor = project_tsconfig_paths.getDirectiveUndecoratedMetadataExtractor(reflector, importTracker);
|
|
10281
10309
|
// Dependencies can't be deferred during HMR, because the HMR update module can't have
|
|
10282
10310
|
// dynamic imports and its dependencies need to be passed in directly. If dependencies
|
|
10283
10311
|
// are deferred, their imports will be deleted so we may lose the reference to them.
|
|
@@ -10285,6 +10313,7 @@ class ComponentDecoratorHandler {
|
|
|
10285
10313
|
}
|
|
10286
10314
|
literalCache = new Map();
|
|
10287
10315
|
elementSchemaRegistry = new project_tsconfig_paths.DomElementSchemaRegistry();
|
|
10316
|
+
undecoratedMetadataExtractor;
|
|
10288
10317
|
/**
|
|
10289
10318
|
* During the asynchronous preanalyze phase, it's necessary to parse the template to extract
|
|
10290
10319
|
* any potential <link> tags which might need to be loaded. This cache ensures that work is not
|
|
@@ -10743,7 +10772,7 @@ class ComponentDecoratorHandler {
|
|
|
10743
10772
|
},
|
|
10744
10773
|
typeCheckMeta: project_tsconfig_paths.extractDirectiveTypeCheckMeta(node, inputs, this.reflector),
|
|
10745
10774
|
classMetadata: this.includeClassMetadata
|
|
10746
|
-
? extractClassMetadata(node, this.reflector, this.isCore, this.annotateForClosureCompiler, (dec) => transformDecoratorResources(dec, component, styles, template))
|
|
10775
|
+
? extractClassMetadata(node, this.reflector, this.isCore, this.annotateForClosureCompiler, (dec) => transformDecoratorResources(dec, component, styles, template), this.undecoratedMetadataExtractor)
|
|
10747
10776
|
: null,
|
|
10748
10777
|
classDebugInfo: extractClassDebugInfo(node, this.reflector, this.compilerHost, this.rootDirs,
|
|
10749
10778
|
/* forbidOrphanRenderering */ this.forbidOrphanRendering),
|
|
@@ -12333,7 +12362,7 @@ class PipeDecoratorHandler {
|
|
|
12333
12362
|
* @description
|
|
12334
12363
|
* Entry point for all public APIs of the compiler-cli package.
|
|
12335
12364
|
*/
|
|
12336
|
-
new project_tsconfig_paths.Version('20.3.
|
|
12365
|
+
new project_tsconfig_paths.Version('20.3.5');
|
|
12337
12366
|
|
|
12338
12367
|
/**
|
|
12339
12368
|
* Whether a given decorator should be treated as an Angular decorator.
|
|
@@ -16454,32 +16483,23 @@ class InterpolatedSignalCheck extends TemplateCheckWithVisitor {
|
|
|
16454
16483
|
.filter((item) => item instanceof project_tsconfig_paths.PropertyRead)
|
|
16455
16484
|
.flatMap((item) => buildDiagnosticForSignal(ctx, item, component));
|
|
16456
16485
|
}
|
|
16457
|
-
// bound
|
|
16458
|
-
else if (node instanceof project_tsconfig_paths.
|
|
16459
|
-
const
|
|
16460
|
-
|
|
16461
|
-
|
|
16462
|
-
|
|
16463
|
-
|
|
16464
|
-
|
|
16465
|
-
|
|
16466
|
-
|
|
16467
|
-
|
|
16468
|
-
|
|
16469
|
-
|
|
16470
|
-
|
|
16471
|
-
|
|
16472
|
-
|
|
16473
|
-
|
|
16474
|
-
// or an attribute binding like `[attr.role]="mySignal"`
|
|
16475
|
-
node.type === project_tsconfig_paths.BindingType.Attribute ||
|
|
16476
|
-
// or an animation binding like `[animate.enter]="mySignal"`
|
|
16477
|
-
node.type === project_tsconfig_paths.BindingType.Animation ||
|
|
16478
|
-
// or an animation binding like `[@myAnimation]="mySignal"`
|
|
16479
|
-
node.type === project_tsconfig_paths.BindingType.LegacyAnimation) &&
|
|
16480
|
-
nodeAst) {
|
|
16481
|
-
return buildDiagnosticForSignal(ctx, nodeAst, component);
|
|
16482
|
-
}
|
|
16486
|
+
// check bound inputs like `[prop]="mySignal"` on an element or inline template
|
|
16487
|
+
else if (node instanceof project_tsconfig_paths.Element$1 && node.inputs.length > 0) {
|
|
16488
|
+
const directivesOfElement = ctx.templateTypeChecker.getDirectivesOfNode(component, node);
|
|
16489
|
+
return node.inputs.flatMap((input) => checkBoundAttribute(ctx, component, directivesOfElement, input));
|
|
16490
|
+
}
|
|
16491
|
+
else if (node instanceof project_tsconfig_paths.Template && node.tagName === 'ng-template') {
|
|
16492
|
+
const directivesOfElement = ctx.templateTypeChecker.getDirectivesOfNode(component, node);
|
|
16493
|
+
const inputDiagnostics = node.inputs.flatMap((input) => {
|
|
16494
|
+
return checkBoundAttribute(ctx, component, directivesOfElement, input);
|
|
16495
|
+
});
|
|
16496
|
+
const templateAttrDiagnostics = node.templateAttrs.flatMap((attr) => {
|
|
16497
|
+
if (!(attr instanceof project_tsconfig_paths.BoundAttribute)) {
|
|
16498
|
+
return [];
|
|
16499
|
+
}
|
|
16500
|
+
return checkBoundAttribute(ctx, component, directivesOfElement, attr);
|
|
16501
|
+
});
|
|
16502
|
+
return inputDiagnostics.concat(templateAttrDiagnostics);
|
|
16483
16503
|
}
|
|
16484
16504
|
// if blocks like `@if(mySignal) { ... }`
|
|
16485
16505
|
else if (node instanceof project_tsconfig_paths.IfBlock) {
|
|
@@ -16505,6 +16525,32 @@ class InterpolatedSignalCheck extends TemplateCheckWithVisitor {
|
|
|
16505
16525
|
return [];
|
|
16506
16526
|
}
|
|
16507
16527
|
}
|
|
16528
|
+
function checkBoundAttribute(ctx, component, directivesOfElement, node) {
|
|
16529
|
+
// we skip the check if the node is an input binding
|
|
16530
|
+
if (directivesOfElement !== null &&
|
|
16531
|
+
directivesOfElement.some((dir) => dir.inputs.getByBindingPropertyName(node.name) !== null)) {
|
|
16532
|
+
return [];
|
|
16533
|
+
}
|
|
16534
|
+
// otherwise, we check if the node is
|
|
16535
|
+
const nodeAst = isPropertyReadNodeAst(node);
|
|
16536
|
+
if (
|
|
16537
|
+
// a bound property like `[prop]="mySignal"`
|
|
16538
|
+
(node.type === project_tsconfig_paths.BindingType.Property ||
|
|
16539
|
+
// or a class binding like `[class.myClass]="mySignal"`
|
|
16540
|
+
node.type === project_tsconfig_paths.BindingType.Class ||
|
|
16541
|
+
// or a style binding like `[style.width]="mySignal"`
|
|
16542
|
+
node.type === project_tsconfig_paths.BindingType.Style ||
|
|
16543
|
+
// or an attribute binding like `[attr.role]="mySignal"`
|
|
16544
|
+
node.type === project_tsconfig_paths.BindingType.Attribute ||
|
|
16545
|
+
// or an animation binding like `[animate.enter]="mySignal"`
|
|
16546
|
+
node.type === project_tsconfig_paths.BindingType.Animation ||
|
|
16547
|
+
// or an animation binding like `[@myAnimation]="mySignal"`
|
|
16548
|
+
node.type === project_tsconfig_paths.BindingType.LegacyAnimation) &&
|
|
16549
|
+
nodeAst) {
|
|
16550
|
+
return buildDiagnosticForSignal(ctx, nodeAst, component);
|
|
16551
|
+
}
|
|
16552
|
+
return [];
|
|
16553
|
+
}
|
|
16508
16554
|
function isPropertyReadNodeAst(node) {
|
|
16509
16555
|
if (node.value instanceof project_tsconfig_paths.ASTWithSource === false) {
|
|
16510
16556
|
return undefined;
|
|
@@ -16537,9 +16583,11 @@ function buildDiagnosticForSignal(ctx, node, component) {
|
|
|
16537
16583
|
// error.
|
|
16538
16584
|
// We also check for `{{ mySignal.set }}` or `{{ mySignal.update }}` or
|
|
16539
16585
|
// `{{ mySignal.asReadonly }}` as these are the names of instance properties of Signal
|
|
16586
|
+
if (!isFunctionInstanceProperty(node.name) && !isSignalInstanceProperty(node.name)) {
|
|
16587
|
+
return [];
|
|
16588
|
+
}
|
|
16540
16589
|
const symbolOfReceiver = ctx.templateTypeChecker.getSymbolOfNode(node.receiver, component);
|
|
16541
|
-
if (
|
|
16542
|
-
symbolOfReceiver !== null &&
|
|
16590
|
+
if (symbolOfReceiver !== null &&
|
|
16543
16591
|
symbolOfReceiver.kind === project_tsconfig_paths.SymbolKind.Expression &&
|
|
16544
16592
|
isSignalReference(symbolOfReceiver)) {
|
|
16545
16593
|
const templateMapping = ctx.templateTypeChecker.getSourceMappingAtTcbLocation(symbolOfReceiver.tcbLocation);
|
|
@@ -18052,6 +18100,10 @@ function requireIdentifiers () {
|
|
|
18052
18100
|
|
|
18053
18101
|
const numeric = /^[0-9]+$/;
|
|
18054
18102
|
const compareIdentifiers = (a, b) => {
|
|
18103
|
+
if (typeof a === 'number' && typeof b === 'number') {
|
|
18104
|
+
return a === b ? 0 : a < b ? -1 : 1
|
|
18105
|
+
}
|
|
18106
|
+
|
|
18055
18107
|
const anum = numeric.test(a);
|
|
18056
18108
|
const bnum = numeric.test(b);
|
|
18057
18109
|
|
|
@@ -18194,11 +18246,25 @@ function requireSemver$1 () {
|
|
|
18194
18246
|
other = new SemVer(other, this.options);
|
|
18195
18247
|
}
|
|
18196
18248
|
|
|
18197
|
-
|
|
18198
|
-
|
|
18199
|
-
|
|
18200
|
-
|
|
18201
|
-
|
|
18249
|
+
if (this.major < other.major) {
|
|
18250
|
+
return -1
|
|
18251
|
+
}
|
|
18252
|
+
if (this.major > other.major) {
|
|
18253
|
+
return 1
|
|
18254
|
+
}
|
|
18255
|
+
if (this.minor < other.minor) {
|
|
18256
|
+
return -1
|
|
18257
|
+
}
|
|
18258
|
+
if (this.minor > other.minor) {
|
|
18259
|
+
return 1
|
|
18260
|
+
}
|
|
18261
|
+
if (this.patch < other.patch) {
|
|
18262
|
+
return -1
|
|
18263
|
+
}
|
|
18264
|
+
if (this.patch > other.patch) {
|
|
18265
|
+
return 1
|
|
18266
|
+
}
|
|
18267
|
+
return 0
|
|
18202
18268
|
}
|
|
18203
18269
|
|
|
18204
18270
|
comparePre (other) {
|
|
@@ -19219,6 +19285,7 @@ function requireRange () {
|
|
|
19219
19285
|
// already replaced the hyphen ranges
|
|
19220
19286
|
// turn into a set of JUST comparators.
|
|
19221
19287
|
const parseComparator = (comp, options) => {
|
|
19288
|
+
comp = comp.replace(re[t.BUILD], '');
|
|
19222
19289
|
debug('comp', comp, options);
|
|
19223
19290
|
comp = replaceCarets(comp, options);
|
|
19224
19291
|
debug('caret', comp);
|
|
@@ -20437,7 +20504,7 @@ var semver = /*@__PURE__*/getDefaultExportFromCjs(semverExports);
|
|
|
20437
20504
|
* @param minVersion Minimum required version for the feature.
|
|
20438
20505
|
*/
|
|
20439
20506
|
function coreVersionSupportsFeature(coreVersion, minVersion) {
|
|
20440
|
-
// A version of `20.3.
|
|
20507
|
+
// A version of `20.3.5` usually means that core is at head so it supports
|
|
20441
20508
|
// all features. Use string interpolation prevent the placeholder from being replaced
|
|
20442
20509
|
// with the current version during build time.
|
|
20443
20510
|
if (coreVersion === `0.0.0-${'PLACEHOLDER'}`) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v20.3.
|
|
3
|
+
* @license Angular v20.3.5
|
|
4
4
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
5
5
|
* License: MIT
|
|
6
6
|
*/
|
|
@@ -8,11 +8,11 @@
|
|
|
8
8
|
|
|
9
9
|
var ts = require('typescript');
|
|
10
10
|
require('os');
|
|
11
|
-
var project_tsconfig_paths = require('./project_tsconfig_paths-
|
|
12
|
-
var index = require('./index-
|
|
11
|
+
var project_tsconfig_paths = require('./project_tsconfig_paths-tTmeFlcz.cjs');
|
|
12
|
+
var index = require('./index-BDeOF3Gn.cjs');
|
|
13
13
|
require('path');
|
|
14
14
|
require('node:path');
|
|
15
|
-
var project_paths = require('./project_paths-
|
|
15
|
+
var project_paths = require('./project_paths-C8LDPZ5A.cjs');
|
|
16
16
|
|
|
17
17
|
function getMemberName(member) {
|
|
18
18
|
if (member.name === undefined) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v20.3.
|
|
3
|
+
* @license Angular v20.3.5
|
|
4
4
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
5
5
|
* License: MIT
|
|
6
6
|
*/
|
|
@@ -8,12 +8,12 @@
|
|
|
8
8
|
|
|
9
9
|
var ts = require('typescript');
|
|
10
10
|
require('os');
|
|
11
|
-
var project_tsconfig_paths = require('./project_tsconfig_paths-
|
|
12
|
-
require('./index-
|
|
11
|
+
var project_tsconfig_paths = require('./project_tsconfig_paths-tTmeFlcz.cjs');
|
|
12
|
+
require('./index-BDeOF3Gn.cjs');
|
|
13
13
|
require('path');
|
|
14
14
|
require('node:path');
|
|
15
|
-
var project_paths = require('./project_paths-
|
|
16
|
-
var apply_import_manager = require('./apply_import_manager-
|
|
15
|
+
var project_paths = require('./project_paths-C8LDPZ5A.cjs');
|
|
16
|
+
var apply_import_manager = require('./apply_import_manager-_3Mx7H7A.cjs');
|
|
17
17
|
var imports = require('./imports-CIX-JgAN.cjs');
|
|
18
18
|
require('@angular-devkit/core');
|
|
19
19
|
require('node:path/posix');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v20.3.
|
|
3
|
+
* @license Angular v20.3.5
|
|
4
4
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
5
5
|
* License: MIT
|
|
6
6
|
*/
|
|
@@ -8,13 +8,13 @@
|
|
|
8
8
|
|
|
9
9
|
var schematics = require('@angular-devkit/schematics');
|
|
10
10
|
var p = require('path');
|
|
11
|
-
var compiler_host = require('./compiler_host-
|
|
11
|
+
var compiler_host = require('./compiler_host-DXiKJabk.cjs');
|
|
12
12
|
var ts = require('typescript');
|
|
13
13
|
var ng_decorators = require('./ng_decorators-B5HCqr20.cjs');
|
|
14
14
|
var imports = require('./imports-CIX-JgAN.cjs');
|
|
15
15
|
var nodes = require('./nodes-B16H9JUd.cjs');
|
|
16
16
|
var leading_space = require('./leading_space-D9nQ8UQC.cjs');
|
|
17
|
-
var project_tsconfig_paths = require('./project_tsconfig_paths-
|
|
17
|
+
var project_tsconfig_paths = require('./project_tsconfig_paths-tTmeFlcz.cjs');
|
|
18
18
|
require('os');
|
|
19
19
|
require('fs');
|
|
20
20
|
require('module');
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v20.3.
|
|
3
|
+
* @license Angular v20.3.5
|
|
4
4
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
5
5
|
* License: MIT
|
|
6
6
|
*/
|
|
7
7
|
'use strict';
|
|
8
8
|
|
|
9
|
-
var project_tsconfig_paths = require('./project_tsconfig_paths-
|
|
9
|
+
var project_tsconfig_paths = require('./project_tsconfig_paths-tTmeFlcz.cjs');
|
|
10
10
|
var ts = require('typescript');
|
|
11
11
|
require('os');
|
|
12
12
|
var assert = require('assert');
|
|
13
|
-
var index = require('./index-
|
|
14
|
-
var project_paths = require('./project_paths-
|
|
13
|
+
var index = require('./index-C8BhVtUr.cjs');
|
|
14
|
+
var project_paths = require('./project_paths-C8LDPZ5A.cjs');
|
|
15
15
|
var leading_space = require('./leading_space-D9nQ8UQC.cjs');
|
|
16
|
-
require('./index-
|
|
16
|
+
require('./index-BDeOF3Gn.cjs');
|
|
17
17
|
require('path');
|
|
18
18
|
require('node:path');
|
|
19
19
|
var assert$1 = require('node:assert');
|
|
@@ -1351,6 +1351,18 @@ function migrateStandardTsReference(tsReferencesWithNarrowing, checker, info, re
|
|
|
1351
1351
|
if (ts.isArrowFunction(parent) && !ts.isBlock(parent.body)) {
|
|
1352
1352
|
replacements.push(...createNewBlockToInsertVariable(parent, filePath, temporaryVariableStr));
|
|
1353
1353
|
}
|
|
1354
|
+
else if (shouldInsertAtMethodStart(reference, recommendedNode, referenceNodeInBlock)) {
|
|
1355
|
+
const blockNode = recommendedNode;
|
|
1356
|
+
const firstStatement = blockNode.statements[0];
|
|
1357
|
+
const leadingSpace = firstStatement
|
|
1358
|
+
? ts.getLineAndCharacterOfPosition(sf, firstStatement.getStart())
|
|
1359
|
+
: ts.getLineAndCharacterOfPosition(sf, referenceNodeInBlock.getStart());
|
|
1360
|
+
replacements.push(new project_paths.Replacement(filePath, new project_paths.TextUpdate({
|
|
1361
|
+
position: firstStatement.getStart(),
|
|
1362
|
+
end: firstStatement.getStart(),
|
|
1363
|
+
toInsert: `${temporaryVariableStr}\n${' '.repeat(leadingSpace.character)}`,
|
|
1364
|
+
})));
|
|
1365
|
+
}
|
|
1354
1366
|
else {
|
|
1355
1367
|
const leadingSpace = ts.getLineAndCharacterOfPosition(sf, referenceNodeInBlock.getStart());
|
|
1356
1368
|
replacements.push(new project_paths.Replacement(filePath, new project_paths.TextUpdate({
|
|
@@ -1367,6 +1379,36 @@ function migrateStandardTsReference(tsReferencesWithNarrowing, checker, info, re
|
|
|
1367
1379
|
}
|
|
1368
1380
|
}
|
|
1369
1381
|
}
|
|
1382
|
+
/**
|
|
1383
|
+
* Determines if a temporary variable should be inserted at the start of a method.
|
|
1384
|
+
*
|
|
1385
|
+
* This function performs several checks to ensure it's safe to insert a temporary variable:
|
|
1386
|
+
* 1. Verifies the recommended node is a method declaration block
|
|
1387
|
+
* 2. Ensures all references are contained within the method body
|
|
1388
|
+
* 3. Confirms the reference node is the first statement in the method
|
|
1389
|
+
* 4. Validates the reference node is an expression statement with an assignment operation
|
|
1390
|
+
*/
|
|
1391
|
+
function shouldInsertAtMethodStart(references, recommendedNode, referenceNodeInBlock) {
|
|
1392
|
+
if (!ts.isBlock(recommendedNode) || !ts.isMethodDeclaration(recommendedNode.parent)) {
|
|
1393
|
+
return false;
|
|
1394
|
+
}
|
|
1395
|
+
const methodBody = recommendedNode;
|
|
1396
|
+
const allReferencesInMethod = references.accesses.every((access) => {
|
|
1397
|
+
let current = access;
|
|
1398
|
+
while (current && current !== methodBody) {
|
|
1399
|
+
current = current.parent;
|
|
1400
|
+
}
|
|
1401
|
+
return current === methodBody;
|
|
1402
|
+
});
|
|
1403
|
+
if (!allReferencesInMethod) {
|
|
1404
|
+
return false;
|
|
1405
|
+
}
|
|
1406
|
+
return (methodBody.statements.length > 0 &&
|
|
1407
|
+
ts.isExpressionStatement(referenceNodeInBlock) &&
|
|
1408
|
+
methodBody.statements[0] === referenceNodeInBlock &&
|
|
1409
|
+
ts.isBinaryExpression(referenceNodeInBlock.expression) &&
|
|
1410
|
+
referenceNodeInBlock.expression.operatorToken.kind === ts.SyntaxKind.EqualsToken);
|
|
1411
|
+
}
|
|
1370
1412
|
|
|
1371
1413
|
/**
|
|
1372
1414
|
* Migrates TypeScript input references to be signal compatible.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v20.3.
|
|
3
|
+
* @license Angular v20.3.5
|
|
4
4
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
5
5
|
* License: MIT
|
|
6
6
|
*/
|
|
@@ -8,13 +8,13 @@
|
|
|
8
8
|
|
|
9
9
|
var ts = require('typescript');
|
|
10
10
|
require('os');
|
|
11
|
-
var project_tsconfig_paths = require('./project_tsconfig_paths-
|
|
12
|
-
var index$1 = require('./index-
|
|
11
|
+
var project_tsconfig_paths = require('./project_tsconfig_paths-tTmeFlcz.cjs');
|
|
12
|
+
var index$1 = require('./index-BDeOF3Gn.cjs');
|
|
13
13
|
require('path');
|
|
14
14
|
require('node:path');
|
|
15
|
-
var project_paths = require('./project_paths-
|
|
16
|
-
var apply_import_manager = require('./apply_import_manager-
|
|
17
|
-
var index = require('./index-
|
|
15
|
+
var project_paths = require('./project_paths-C8LDPZ5A.cjs');
|
|
16
|
+
var apply_import_manager = require('./apply_import_manager-_3Mx7H7A.cjs');
|
|
17
|
+
var index = require('./index-C8BhVtUr.cjs');
|
|
18
18
|
require('@angular-devkit/core');
|
|
19
19
|
require('node:path/posix');
|
|
20
20
|
require('fs');
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v20.3.
|
|
3
|
+
* @license Angular v20.3.5
|
|
4
4
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
5
5
|
* License: MIT
|
|
6
6
|
*/
|
|
7
7
|
'use strict';
|
|
8
8
|
|
|
9
|
-
var index = require('./index-
|
|
9
|
+
var index = require('./index-BDeOF3Gn.cjs');
|
|
10
10
|
var schematics = require('@angular-devkit/schematics');
|
|
11
11
|
var core = require('@angular-devkit/core');
|
|
12
12
|
var posixPath = require('node:path/posix');
|
|
13
13
|
var os = require('os');
|
|
14
14
|
var ts = require('typescript');
|
|
15
|
-
var project_tsconfig_paths = require('./project_tsconfig_paths-
|
|
15
|
+
var project_tsconfig_paths = require('./project_tsconfig_paths-tTmeFlcz.cjs');
|
|
16
16
|
require('path');
|
|
17
17
|
var path = require('node:path');
|
|
18
18
|
|