@angular/core 20.3.15 → 20.3.17

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 (70) 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/attribute.mjs.map +1 -1
  8. package/fesm2022/core.mjs +1 -1
  9. package/fesm2022/core.mjs.map +1 -1
  10. package/fesm2022/debug_node.mjs +31 -16
  11. package/fesm2022/debug_node.mjs.map +1 -1
  12. package/fesm2022/effect.mjs +1 -1
  13. package/fesm2022/effect.mjs.map +1 -1
  14. package/fesm2022/not_found.mjs +1 -1
  15. package/fesm2022/not_found.mjs.map +1 -1
  16. package/fesm2022/primitives/di.mjs +1 -1
  17. package/fesm2022/primitives/di.mjs.map +1 -1
  18. package/fesm2022/primitives/event-dispatch.mjs +1 -1
  19. package/fesm2022/primitives/event-dispatch.mjs.map +1 -1
  20. package/fesm2022/primitives/signals.mjs +1 -1
  21. package/fesm2022/primitives/signals.mjs.map +1 -1
  22. package/fesm2022/resource.mjs +1 -1
  23. package/fesm2022/resource.mjs.map +1 -1
  24. package/fesm2022/root_effect_scheduler.mjs +2 -2
  25. package/fesm2022/root_effect_scheduler.mjs.map +1 -1
  26. package/fesm2022/rxjs-interop.mjs +1 -1
  27. package/fesm2022/rxjs-interop.mjs.map +1 -1
  28. package/fesm2022/signal.mjs +1 -1
  29. package/fesm2022/signal.mjs.map +1 -1
  30. package/fesm2022/testing.mjs +1 -1
  31. package/fesm2022/testing.mjs.map +1 -1
  32. package/fesm2022/weak_ref.mjs +1 -1
  33. package/fesm2022/weak_ref.mjs.map +1 -1
  34. package/formatter.d.d.ts +1 -1
  35. package/index.d.ts +1 -1
  36. package/package.json +2 -2
  37. package/primitives/di/index.d.ts +1 -1
  38. package/primitives/event-dispatch/index.d.ts +1 -1
  39. package/primitives/signals/index.d.ts +1 -1
  40. package/rxjs-interop/index.d.ts +1 -1
  41. package/schematics/bundles/add-bootstrap-context-to-server-main.cjs +5 -5
  42. package/schematics/bundles/{apply_import_manager-BKP1lF28.cjs → apply_import_manager-C-hIllzM.cjs} +3 -3
  43. package/schematics/bundles/cleanup-unused-imports.cjs +5 -5
  44. package/schematics/bundles/{compiler_host-CNpC4-d2.cjs → compiler_host-C7zi7NDP.cjs} +2 -2
  45. package/schematics/bundles/control-flow-migration.cjs +3 -3
  46. package/schematics/bundles/document-core.cjs +5 -5
  47. package/schematics/bundles/imports-CIX-JgAN.cjs +1 -1
  48. package/schematics/bundles/{index-DxdWo-Gr.cjs → index-BdbAclL_.cjs} +4 -4
  49. package/schematics/bundles/{index-Cu2VLWJC.cjs → index-CEqacA4Q.cjs} +12 -12
  50. package/schematics/bundles/inject-flags.cjs +5 -5
  51. package/schematics/bundles/inject-migration.cjs +3 -3
  52. package/schematics/bundles/leading_space-D9nQ8UQC.cjs +1 -1
  53. package/schematics/bundles/{migrate_ts_type_references-Cyyq9Vr9.cjs → migrate_ts_type_references-BJnim1Tm.cjs} +5 -5
  54. package/schematics/bundles/ng_decorators-B5HCqr20.cjs +1 -1
  55. package/schematics/bundles/nodes-B16H9JUd.cjs +1 -1
  56. package/schematics/bundles/output-migration.cjs +6 -6
  57. package/schematics/bundles/{project_paths-Ck6Mza_h.cjs → project_paths-qw-vHpyb.cjs} +3 -3
  58. package/schematics/bundles/{project_tsconfig_paths-CgKwP2MX.cjs → project_tsconfig_paths-C5dXM8JP.cjs} +7 -3
  59. package/schematics/bundles/property_name-BBwFuqMe.cjs +1 -1
  60. package/schematics/bundles/route-lazy-loading.cjs +3 -3
  61. package/schematics/bundles/router-current-navigation.cjs +4 -4
  62. package/schematics/bundles/self-closing-tags-migration.cjs +4 -4
  63. package/schematics/bundles/signal-input-migration.cjs +7 -7
  64. package/schematics/bundles/signal-queries-migration.cjs +7 -7
  65. package/schematics/bundles/signals.cjs +7 -7
  66. package/schematics/bundles/standalone-migration.cjs +4 -4
  67. package/schematics/bundles/symbol-VPWguRxr.cjs +1 -1
  68. package/schematics/bundles/test-bed-get.cjs +4 -4
  69. package/testing/index.d.ts +1 -1
  70. package/weak_ref.d.d.ts +1 -1
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v20.3.15
2
+ * @license Angular v20.3.17
3
3
  * (c) 2010-2025 Google LLC. https://angular.dev/
4
4
  * License: MIT
5
5
  */
@@ -6192,6 +6192,9 @@ function ɵɵtrustConstantResourceUrl(url) {
6192
6192
  }
6193
6193
  return trustedScriptURLFromString(url[0]);
6194
6194
  }
6195
+ // Define sets outside the function for O(1) lookups and memory efficiency
6196
+ const SRC_RESOURCE_TAGS = new Set(['embed', 'frame', 'iframe', 'media', 'script']);
6197
+ const HREF_RESOURCE_TAGS = new Set(['base', 'link', 'script']);
6195
6198
  /**
6196
6199
  * Detects which sanitizer to use for URL property, based on tag name and prop name.
6197
6200
  *
@@ -6200,16 +6203,10 @@ function ɵɵtrustConstantResourceUrl(url) {
6200
6203
  * If tag and prop names don't match Resource URL schema, use URL sanitizer.
6201
6204
  */
6202
6205
  function getUrlSanitizer(tag, prop) {
6203
- if ((prop === 'src' &&
6204
- (tag === 'embed' ||
6205
- tag === 'frame' ||
6206
- tag === 'iframe' ||
6207
- tag === 'media' ||
6208
- tag === 'script')) ||
6209
- (prop === 'href' && (tag === 'base' || tag === 'link'))) {
6210
- return ɵɵsanitizeResourceUrl;
6211
- }
6212
- return ɵɵsanitizeUrl;
6206
+ const isResource = (prop === 'src' && SRC_RESOURCE_TAGS.has(tag)) ||
6207
+ (prop === 'href' && HREF_RESOURCE_TAGS.has(tag)) ||
6208
+ (prop === 'xlink:href' && tag === 'script');
6209
+ return isResource ? ɵɵsanitizeResourceUrl : ɵɵsanitizeUrl;
6213
6210
  }
6214
6211
  /**
6215
6212
  * Sanitizes URL, selecting sanitizer function based on tag and property names.
@@ -14723,7 +14720,7 @@ class ComponentFactory extends ComponentFactory$1 {
14723
14720
  }
14724
14721
  function createRootTView(rootSelectorOrNode, componentDef, componentBindings, directives) {
14725
14722
  const tAttributes = rootSelectorOrNode
14726
- ? ['ng-version', '20.3.15']
14723
+ ? ['ng-version', '20.3.17']
14727
14724
  : // Extract attributes and classes from the first selector only to match VE behavior.
14728
14725
  extractAttrsAndClassesFromSelector(componentDef.selectors[0]);
14729
14726
  let creationBindings = null;
@@ -25246,7 +25243,6 @@ function walkIcuTree(ast, tView, tIcu, lView, sharedUpdateOpCodes, create, remov
25246
25243
  const attr = elAttrs.item(i);
25247
25244
  const lowerAttrName = attr.name.toLowerCase();
25248
25245
  const hasBinding = !!attr.value.match(BINDING_REGEXP);
25249
- // we assume the input string is safe, unless it's using a binding
25250
25246
  if (hasBinding) {
25251
25247
  if (VALID_ATTRS.hasOwnProperty(lowerAttrName)) {
25252
25248
  if (URI_ATTRS[lowerAttrName]) {
@@ -25263,8 +25259,27 @@ function walkIcuTree(ast, tView, tIcu, lView, sharedUpdateOpCodes, create, remov
25263
25259
  `(see ${XSS_SECURITY_URL})`);
25264
25260
  }
25265
25261
  }
25262
+ else if (VALID_ATTRS[lowerAttrName]) {
25263
+ if (URI_ATTRS[lowerAttrName]) {
25264
+ // Don't sanitize, because no value is acceptable in sensitive attributes.
25265
+ // Translators are not allowed to create URIs.
25266
+ if (typeof ngDevMode !== 'undefined' && ngDevMode) {
25267
+ console.warn(`WARNING: ignoring unsafe attribute ` +
25268
+ `${lowerAttrName} on element ${tagName} ` +
25269
+ `(see ${XSS_SECURITY_URL})`);
25270
+ }
25271
+ addCreateAttribute(create, newIndex, attr.name, 'unsafe:blocked');
25272
+ }
25273
+ else {
25274
+ addCreateAttribute(create, newIndex, attr.name, attr.value);
25275
+ }
25276
+ }
25266
25277
  else {
25267
- addCreateAttribute(create, newIndex, attr);
25278
+ if (typeof ngDevMode !== 'undefined' && ngDevMode) {
25279
+ console.warn(`WARNING: ignoring unknown attribute name ` +
25280
+ `${lowerAttrName} on element ${tagName} ` +
25281
+ `(see ${XSS_SECURITY_URL})`);
25282
+ }
25268
25283
  }
25269
25284
  }
25270
25285
  const elementNode = {
@@ -25333,8 +25348,8 @@ function addCreateNodeAndAppend(create, marker, text, appendToParentIdx, createA
25333
25348
  }
25334
25349
  create.push(text, createAtIdx, icuCreateOpCode(0 /* IcuCreateOpCode.AppendChild */, appendToParentIdx, createAtIdx));
25335
25350
  }
25336
- function addCreateAttribute(create, newIndex, attr) {
25337
- create.push((newIndex << 1 /* IcuCreateOpCode.SHIFT_REF */) | 1 /* IcuCreateOpCode.Attr */, attr.name, attr.value);
25351
+ function addCreateAttribute(create, newIndex, attrName, attrValue) {
25352
+ create.push((newIndex << 1 /* IcuCreateOpCode.SHIFT_REF */) | 1 /* IcuCreateOpCode.Attr */, attrName, attrValue);
25338
25353
  }
25339
25354
 
25340
25355
  // i18nPostprocess consts