@angular/core 20.3.19 → 20.3.20

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.
Files changed (58) hide show
  1. package/api.d.d.ts +1 -1
  2. package/chrome_dev_tools_performance.d.d.ts +1 -1
  3. package/discovery.d.d.ts +1 -1
  4. package/effect.d.d.ts +1 -1
  5. package/event_dispatcher.d.d.ts +1 -1
  6. package/fesm2022/attribute.mjs +1 -1
  7. package/fesm2022/core.mjs +1 -1
  8. package/fesm2022/debug_node.mjs +28 -13
  9. package/fesm2022/debug_node.mjs.map +1 -1
  10. package/fesm2022/effect.mjs +1 -1
  11. package/fesm2022/not_found.mjs +1 -1
  12. package/fesm2022/primitives/di.mjs +1 -1
  13. package/fesm2022/primitives/event-dispatch.mjs +1 -1
  14. package/fesm2022/primitives/signals.mjs +1 -1
  15. package/fesm2022/resource.mjs +1 -1
  16. package/fesm2022/root_effect_scheduler.mjs +2 -2
  17. package/fesm2022/root_effect_scheduler.mjs.map +1 -1
  18. package/fesm2022/rxjs-interop.mjs +1 -1
  19. package/fesm2022/signal.mjs +1 -1
  20. package/fesm2022/testing.mjs +1 -1
  21. package/fesm2022/weak_ref.mjs +1 -1
  22. package/formatter.d.d.ts +1 -1
  23. package/index.d.ts +2 -2
  24. package/package.json +2 -2
  25. package/primitives/di/index.d.ts +1 -1
  26. package/primitives/event-dispatch/index.d.ts +1 -1
  27. package/primitives/signals/index.d.ts +1 -1
  28. package/rxjs-interop/index.d.ts +1 -1
  29. package/schematics/bundles/add-bootstrap-context-to-server-main.cjs +5 -5
  30. package/schematics/bundles/{apply_import_manager-CTzEuFJw.cjs → apply_import_manager-Clb1Y0Nb.cjs} +3 -3
  31. package/schematics/bundles/cleanup-unused-imports.cjs +5 -5
  32. package/schematics/bundles/{compiler_host-Ber_JSyo.cjs → compiler_host-AFZotBLM.cjs} +2 -2
  33. package/schematics/bundles/control-flow-migration.cjs +3 -3
  34. package/schematics/bundles/document-core.cjs +5 -5
  35. package/schematics/bundles/imports-CIX-JgAN.cjs +1 -1
  36. package/schematics/bundles/{index-B8IUVpRW.cjs → index-CD4aCRVu.cjs} +4 -4
  37. package/schematics/bundles/{index-DUHSh_FI.cjs → index-kR-YjYku.cjs} +12 -12
  38. package/schematics/bundles/inject-flags.cjs +5 -5
  39. package/schematics/bundles/inject-migration.cjs +3 -3
  40. package/schematics/bundles/leading_space-D9nQ8UQC.cjs +1 -1
  41. package/schematics/bundles/{migrate_ts_type_references-DLcyIMjy.cjs → migrate_ts_type_references-BgYfSnnL.cjs} +5 -5
  42. package/schematics/bundles/ng_decorators-B5HCqr20.cjs +1 -1
  43. package/schematics/bundles/nodes-B16H9JUd.cjs +1 -1
  44. package/schematics/bundles/output-migration.cjs +6 -6
  45. package/schematics/bundles/{project_paths-D9GYMpqK.cjs → project_paths-Bq_k0pof.cjs} +3 -3
  46. package/schematics/bundles/{project_tsconfig_paths-MdN5DRlX.cjs → project_tsconfig_paths-D2eb40pS.cjs} +46 -9
  47. package/schematics/bundles/property_name-BBwFuqMe.cjs +1 -1
  48. package/schematics/bundles/route-lazy-loading.cjs +3 -3
  49. package/schematics/bundles/router-current-navigation.cjs +4 -4
  50. package/schematics/bundles/self-closing-tags-migration.cjs +4 -4
  51. package/schematics/bundles/signal-input-migration.cjs +7 -7
  52. package/schematics/bundles/signal-queries-migration.cjs +7 -7
  53. package/schematics/bundles/signals.cjs +7 -7
  54. package/schematics/bundles/standalone-migration.cjs +4 -4
  55. package/schematics/bundles/symbol-VPWguRxr.cjs +1 -1
  56. package/schematics/bundles/test-bed-get.cjs +4 -4
  57. package/testing/index.d.ts +1 -1
  58. package/weak_ref.d.d.ts +1 -1
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v20.3.19
3
+ * @license Angular v20.3.20
4
4
  * (c) 2010-2025 Google LLC. https://angular.io/
5
5
  * License: MIT
6
6
  */
@@ -29656,8 +29656,9 @@ class HtmlAstToIvyAst {
29656
29656
  // Note that validation is skipped and property mapping is disabled
29657
29657
  // due to the fact that we need to make sure a given prop is not an
29658
29658
  // input of a directive and directive matching happens at runtime.
29659
+ const isAttrOn = prop.name.toLowerCase().startsWith('attr.on');
29659
29660
  const bep = this.bindingParser.createBoundElementProperty(elementName, prop,
29660
- /* skipValidation */ true,
29661
+ /* skipValidation */ !isAttrOn,
29661
29662
  /* mapPropertyName */ false);
29662
29663
  bound.push(BoundAttribute.fromBoundElementProperty(bep, i18n));
29663
29664
  }
@@ -30553,8 +30554,30 @@ function verifyHostBindings(bindings, sourceSpan) {
30553
30554
  const bindingParser = makeBindingParser();
30554
30555
  bindingParser.createDirectiveHostEventAsts(bindings.listeners, sourceSpan);
30555
30556
  bindingParser.createBoundHostProperties(bindings.properties, sourceSpan);
30557
+ validateNoEventBindings(bindings, bindingParser, sourceSpan);
30556
30558
  return bindingParser.errors;
30557
30559
  }
30560
+ /**
30561
+ * Validates that there are no event attribute bindings in the host bindings.
30562
+ * @param bindings - Map of host bindings for the component.
30563
+ * @param bindingParser - Binding parser used to create the binding expression.
30564
+ * @param sourceSpan - Source span where the host bindings were defined.
30565
+ */
30566
+ function validateNoEventBindings(bindings, bindingParser, sourceSpan) {
30567
+ for (const prop in bindings.properties) {
30568
+ const isAttr = prop.startsWith('attr.');
30569
+ const boundName = isAttr ? prop.slice(5) : prop;
30570
+ if (boundName.toLowerCase().startsWith('on')) {
30571
+ const errorType = isAttr ? 'attribute' : 'property';
30572
+ const suggestion = `(${boundName.slice(2)})=...`;
30573
+ let msg = `Binding to event ${errorType} '${boundName}' is disallowed for security reasons, please use ${suggestion}`;
30574
+ if (!isAttr) {
30575
+ msg += `\nIf '${prop}' is a directive input, make sure the directive is imported by the current module.`;
30576
+ }
30577
+ bindingParser.errors.push(new ParseError(sourceSpan, msg));
30578
+ }
30579
+ }
30580
+ }
30558
30581
  function compileStyles(styles, selector, hostSelector) {
30559
30582
  const shadowCss = new ShadowCss();
30560
30583
  return styles.map((style) => {
@@ -32196,11 +32219,6 @@ function createR3ComponentDeferMetadata(boundTarget, deferBlockDependencies) {
32196
32219
  function extractHostBindings$1(propMetadata, sourceSpan, host) {
32197
32220
  // First parse the declarations from the metadata.
32198
32221
  const bindings = parseHostBindings(host || {});
32199
- // After that check host bindings for errors
32200
- const errors = verifyHostBindings(bindings, sourceSpan);
32201
- if (errors.length) {
32202
- throw new Error(errors.map((error) => error.msg).join('\n'));
32203
- }
32204
32222
  // Next, loop over the properties of the object, looking for @HostBinding and @HostListener.
32205
32223
  for (const field in propMetadata) {
32206
32224
  if (propMetadata.hasOwnProperty(field)) {
@@ -32217,6 +32235,11 @@ function extractHostBindings$1(propMetadata, sourceSpan, host) {
32217
32235
  });
32218
32236
  }
32219
32237
  }
32238
+ // After that check host bindings for errors
32239
+ const errors = verifyHostBindings(bindings, sourceSpan);
32240
+ if (errors.length) {
32241
+ throw new Error(errors.map((error) => error.msg).join('\n'));
32242
+ }
32220
32243
  return bindings;
32221
32244
  }
32222
32245
  function isHostBinding(value) {
@@ -32831,7 +32854,7 @@ function isAttrNode(ast) {
32831
32854
  * @description
32832
32855
  * Entry point for all public APIs of the compiler package.
32833
32856
  */
32834
- const VERSION = new Version('20.3.19');
32857
+ const VERSION = new Version('20.3.20');
32835
32858
 
32836
32859
  //////////////////////////////////////
32837
32860
  // THIS FILE HAS GLOBAL SIDE EFFECT //
@@ -33893,7 +33916,7 @@ class NodeJSPathManipulation {
33893
33916
  // G3-ESM-MARKER: G3 uses CommonJS, but externally everything in ESM.
33894
33917
  // CommonJS/ESM interop for determining the current file name and containing dir.
33895
33918
  const isCommonJS = typeof __filename !== 'undefined';
33896
- const currentFileUrl = isCommonJS ? null : (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('project_tsconfig_paths-MdN5DRlX.cjs', document.baseURI).href));
33919
+ const currentFileUrl = isCommonJS ? null : (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('project_tsconfig_paths-D2eb40pS.cjs', document.baseURI).href));
33897
33920
  // Note, when this code loads in the browser, `url` may be an empty `{}` due to the Closure shims.
33898
33921
  const currentFileName = isCommonJS
33899
33922
  ? __filename
@@ -43366,6 +43389,13 @@ class RegistryDomSchemaChecker {
43366
43389
  }
43367
43390
  }
43368
43391
  checkTemplateElementProperty(id, tagName, name, span, schemas, hostIsStandalone) {
43392
+ const report = REGISTRY$1.validateProperty(name);
43393
+ if (report.error) {
43394
+ const mapping = this.resolver.getTemplateSourceMapping(id);
43395
+ const diag = makeTemplateDiagnostic(id, mapping, span, ts.DiagnosticCategory.Error, ngErrorCode(exports.ErrorCode.SCHEMA_INVALID_ATTRIBUTE), report.msg);
43396
+ this._diagnostics.push(diag);
43397
+ return;
43398
+ }
43369
43399
  if (!REGISTRY$1.hasProperty(tagName, name, schemas)) {
43370
43400
  const mapping = this.resolver.getTemplateSourceMapping(id);
43371
43401
  const decorator = hostIsStandalone ? '@Component' : '@NgModule';
@@ -43389,6 +43419,13 @@ class RegistryDomSchemaChecker {
43389
43419
  }
43390
43420
  }
43391
43421
  checkHostElementProperty(id, element, name, span, schemas) {
43422
+ const report = REGISTRY$1.validateProperty(name);
43423
+ if (report.error) {
43424
+ const mapping = this.resolver.getHostBindingsMapping(id);
43425
+ const diag = makeTemplateDiagnostic(id, mapping, span, ts.DiagnosticCategory.Error, ngErrorCode(exports.ErrorCode.SCHEMA_INVALID_ATTRIBUTE), report.msg);
43426
+ this._diagnostics.push(diag);
43427
+ return;
43428
+ }
43392
43429
  for (const tagName of element.tagNames) {
43393
43430
  if (REGISTRY$1.hasProperty(tagName, name, schemas)) {
43394
43431
  continue;
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v20.3.19
3
+ * @license Angular v20.3.20
4
4
  * (c) 2010-2025 Google LLC. https://angular.io/
5
5
  * License: MIT
6
6
  */
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v20.3.19
3
+ * @license Angular v20.3.20
4
4
  * (c) 2010-2025 Google LLC. https://angular.io/
5
5
  * License: MIT
6
6
  */
@@ -9,8 +9,8 @@
9
9
  var schematics = require('@angular-devkit/schematics');
10
10
  var fs = require('fs');
11
11
  var p = require('path');
12
- var compiler_host = require('./compiler_host-Ber_JSyo.cjs');
13
- var project_tsconfig_paths = require('./project_tsconfig_paths-MdN5DRlX.cjs');
12
+ var compiler_host = require('./compiler_host-AFZotBLM.cjs');
13
+ var project_tsconfig_paths = require('./project_tsconfig_paths-D2eb40pS.cjs');
14
14
  var ts = require('typescript');
15
15
  var property_name = require('./property_name-BBwFuqMe.cjs');
16
16
  require('os');
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v20.3.19
3
+ * @license Angular v20.3.20
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
- require('./project_tsconfig_paths-MdN5DRlX.cjs');
12
- require('./index-DUHSh_FI.cjs');
11
+ require('./project_tsconfig_paths-D2eb40pS.cjs');
12
+ require('./index-kR-YjYku.cjs');
13
13
  require('path');
14
14
  require('node:path');
15
- var project_paths = require('./project_paths-D9GYMpqK.cjs');
15
+ var project_paths = require('./project_paths-Bq_k0pof.cjs');
16
16
  var imports = require('./imports-CIX-JgAN.cjs');
17
17
  var symbol = require('./symbol-VPWguRxr.cjs');
18
18
  require('@angular-devkit/core');
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v20.3.19
3
+ * @license Angular v20.3.20
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-MdN5DRlX.cjs');
12
- require('./index-DUHSh_FI.cjs');
11
+ var project_tsconfig_paths = require('./project_tsconfig_paths-D2eb40pS.cjs');
12
+ require('./index-kR-YjYku.cjs');
13
13
  require('path');
14
14
  require('node:path');
15
- var project_paths = require('./project_paths-D9GYMpqK.cjs');
15
+ var project_paths = require('./project_paths-Bq_k0pof.cjs');
16
16
  var ng_decorators = require('./ng_decorators-B5HCqr20.cjs');
17
17
  var property_name = require('./property_name-BBwFuqMe.cjs');
18
18
  require('@angular-devkit/core');
@@ -1,23 +1,23 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v20.3.19
3
+ * @license Angular v20.3.20
4
4
  * (c) 2010-2025 Google LLC. https://angular.io/
5
5
  * License: MIT
6
6
  */
7
7
  'use strict';
8
8
 
9
- var migrate_ts_type_references = require('./migrate_ts_type_references-DLcyIMjy.cjs');
9
+ var migrate_ts_type_references = require('./migrate_ts_type_references-BgYfSnnL.cjs');
10
10
  var ts = require('typescript');
11
11
  require('os');
12
- var project_tsconfig_paths = require('./project_tsconfig_paths-MdN5DRlX.cjs');
13
- var index$1 = require('./index-DUHSh_FI.cjs');
12
+ var project_tsconfig_paths = require('./project_tsconfig_paths-D2eb40pS.cjs');
13
+ var index$1 = require('./index-kR-YjYku.cjs');
14
14
  require('path');
15
15
  require('node:path');
16
- var project_paths = require('./project_paths-D9GYMpqK.cjs');
17
- var index = require('./index-B8IUVpRW.cjs');
16
+ var project_paths = require('./project_paths-Bq_k0pof.cjs');
17
+ var index = require('./index-CD4aCRVu.cjs');
18
18
  var assert$1 = require('assert');
19
19
  var assert = require('node:assert');
20
- var apply_import_manager = require('./apply_import_manager-CTzEuFJw.cjs');
20
+ var apply_import_manager = require('./apply_import_manager-Clb1Y0Nb.cjs');
21
21
  require('@angular-devkit/core');
22
22
  require('node:path/posix');
23
23
  require('./leading_space-D9nQ8UQC.cjs');
@@ -1,23 +1,23 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v20.3.19
3
+ * @license Angular v20.3.20
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-MdN5DRlX.cjs');
9
+ var project_tsconfig_paths = require('./project_tsconfig_paths-D2eb40pS.cjs');
10
10
  var ts = require('typescript');
11
11
  require('os');
12
- var index$1 = require('./index-DUHSh_FI.cjs');
12
+ var index$1 = require('./index-kR-YjYku.cjs');
13
13
  require('path');
14
14
  require('node:path');
15
- var project_paths = require('./project_paths-D9GYMpqK.cjs');
16
- var apply_import_manager = require('./apply_import_manager-CTzEuFJw.cjs');
17
- var migrate_ts_type_references = require('./migrate_ts_type_references-DLcyIMjy.cjs');
15
+ var project_paths = require('./project_paths-Bq_k0pof.cjs');
16
+ var apply_import_manager = require('./apply_import_manager-Clb1Y0Nb.cjs');
17
+ var migrate_ts_type_references = require('./migrate_ts_type_references-BgYfSnnL.cjs');
18
18
  var assert = require('assert');
19
19
  require('node:assert');
20
- var index = require('./index-B8IUVpRW.cjs');
20
+ var index = require('./index-CD4aCRVu.cjs');
21
21
  require('@angular-devkit/core');
22
22
  require('node:path/posix');
23
23
  require('fs');
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v20.3.19
3
+ * @license Angular v20.3.20
4
4
  * (c) 2010-2025 Google LLC. https://angular.io/
5
5
  * License: MIT
6
6
  */
@@ -10,7 +10,7 @@ var schematics = require('@angular-devkit/schematics');
10
10
  var signalQueriesMigration = require('./signal-queries-migration.cjs');
11
11
  var signalInputMigration = require('./signal-input-migration.cjs');
12
12
  var outputMigration = require('./output-migration.cjs');
13
- require('./project_tsconfig_paths-MdN5DRlX.cjs');
13
+ require('./project_tsconfig_paths-D2eb40pS.cjs');
14
14
  require('typescript');
15
15
  require('os');
16
16
  require('fs');
@@ -18,14 +18,14 @@ require('module');
18
18
  require('path');
19
19
  require('url');
20
20
  require('@angular-devkit/core');
21
- require('./index-DUHSh_FI.cjs');
21
+ require('./index-kR-YjYku.cjs');
22
22
  require('node:path');
23
- require('./project_paths-D9GYMpqK.cjs');
23
+ require('./project_paths-Bq_k0pof.cjs');
24
24
  require('node:path/posix');
25
- require('./apply_import_manager-CTzEuFJw.cjs');
26
- require('./migrate_ts_type_references-DLcyIMjy.cjs');
25
+ require('./apply_import_manager-Clb1Y0Nb.cjs');
26
+ require('./migrate_ts_type_references-BgYfSnnL.cjs');
27
27
  require('assert');
28
- require('./index-B8IUVpRW.cjs');
28
+ require('./index-CD4aCRVu.cjs');
29
29
  require('./leading_space-D9nQ8UQC.cjs');
30
30
  require('node:assert');
31
31
 
@@ -1,18 +1,18 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v20.3.19
3
+ * @license Angular v20.3.20
4
4
  * (c) 2010-2025 Google LLC. https://angular.io/
5
5
  * License: MIT
6
6
  */
7
7
  'use strict';
8
8
 
9
9
  var schematics = require('@angular-devkit/schematics');
10
- var index = require('./index-DUHSh_FI.cjs');
10
+ var index = require('./index-kR-YjYku.cjs');
11
11
  var fs = require('fs');
12
12
  var p = require('path');
13
13
  var ts = require('typescript');
14
- var compiler_host = require('./compiler_host-Ber_JSyo.cjs');
15
- var project_tsconfig_paths = require('./project_tsconfig_paths-MdN5DRlX.cjs');
14
+ var compiler_host = require('./compiler_host-AFZotBLM.cjs');
15
+ var project_tsconfig_paths = require('./project_tsconfig_paths-D2eb40pS.cjs');
16
16
  var ng_decorators = require('./ng_decorators-B5HCqr20.cjs');
17
17
  var nodes = require('./nodes-B16H9JUd.cjs');
18
18
  var symbol = require('./symbol-VPWguRxr.cjs');
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v20.3.19
3
+ * @license Angular v20.3.20
4
4
  * (c) 2010-2025 Google LLC. https://angular.io/
5
5
  * License: MIT
6
6
  */
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v20.3.19
3
+ * @license Angular v20.3.20
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
- require('./project_tsconfig_paths-MdN5DRlX.cjs');
12
- require('./index-DUHSh_FI.cjs');
11
+ require('./project_tsconfig_paths-D2eb40pS.cjs');
12
+ require('./index-kR-YjYku.cjs');
13
13
  require('path');
14
14
  require('node:path');
15
- var project_paths = require('./project_paths-D9GYMpqK.cjs');
15
+ var project_paths = require('./project_paths-Bq_k0pof.cjs');
16
16
  var imports = require('./imports-CIX-JgAN.cjs');
17
17
  var symbol = require('./symbol-VPWguRxr.cjs');
18
18
  require('@angular-devkit/core');
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v20.3.19
2
+ * @license Angular v20.3.20
3
3
  * (c) 2010-2025 Google LLC. https://angular.dev/
4
4
  * License: MIT
5
5
  */
package/weak_ref.d.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v20.3.19
2
+ * @license Angular v20.3.20
3
3
  * (c) 2010-2025 Google LLC. https://angular.dev/
4
4
  * License: MIT
5
5
  */