@angular/core 21.0.0-next.2 → 21.0.0-next.4

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 (79) 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 +44 -18
  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 +253 -87
  9. package/fesm2022/core.mjs.map +1 -1
  10. package/fesm2022/debug_node.mjs +516 -690
  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 +2 -2
  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 +55 -39
  25. package/fesm2022/root_effect_scheduler.mjs.map +1 -1
  26. package/fesm2022/rxjs-interop.mjs +3 -1
  27. package/fesm2022/rxjs-interop.mjs.map +1 -1
  28. package/fesm2022/signal.mjs +32 -11
  29. package/fesm2022/signal.mjs.map +1 -1
  30. package/fesm2022/testing.mjs +4 -4
  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/graph.d.d.ts +24 -4
  35. package/index.d.ts +16 -135
  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 +2 -2
  40. package/rxjs-interop/index.d.ts +3 -1
  41. package/schematics/bundles/add-bootstrap-context-to-server-main.cjs +135 -0
  42. package/schematics/bundles/application-config-core.cjs +6 -6
  43. package/schematics/bundles/{apply_import_manager-B3czqUhF.cjs → apply_import_manager-DroqamMP.cjs} +3 -3
  44. package/schematics/bundles/bootstrap-options-migration.cjs +715 -0
  45. package/schematics/bundles/cleanup-unused-imports.cjs +5 -5
  46. package/schematics/bundles/{compiler_host-B9qvCnmC.cjs → compiler_host-aKaS4KRz.cjs} +2 -2
  47. package/schematics/bundles/control-flow-migration.cjs +4 -4
  48. package/schematics/bundles/{imports-26VeX8i-.cjs → imports-DwPXlGFl.cjs} +27 -1
  49. package/schematics/bundles/{index-B6-f9bil.cjs → index-BI97t1U8.cjs} +130 -34
  50. package/schematics/bundles/{index-DN8W1c8n.cjs → index-DaB-z4lP.cjs} +4 -4
  51. package/schematics/bundles/inject-migration.cjs +5 -5
  52. package/schematics/bundles/leading_space-D9nQ8UQC.cjs +1 -1
  53. package/schematics/bundles/{migrate_ts_type_references-DawXRJzI.cjs → migrate_ts_type_references-DPuwhGod.cjs} +5 -5
  54. package/schematics/bundles/{ng_component_template-DUAg-x1h.cjs → ng_component_template-CytqBs-q.cjs} +3 -3
  55. package/schematics/bundles/{ng_decorators-CtYwz9Lw.cjs → ng_decorators-BI0uV7KI.cjs} +2 -2
  56. package/schematics/bundles/ngclass-to-class-migration.cjs +9 -9
  57. package/schematics/bundles/ngstyle-to-style-migration.cjs +490 -0
  58. package/schematics/bundles/nodes-B16H9JUd.cjs +1 -1
  59. package/schematics/bundles/output-migration.cjs +6 -6
  60. package/schematics/bundles/parse_html-CeQjkdOK.cjs +132 -0
  61. package/schematics/bundles/{project_paths-D64fJzoa.cjs → project_paths-Cz4x-QiT.cjs} +3 -3
  62. package/schematics/bundles/{project_tsconfig_paths-DZ17BWwk.cjs → project_tsconfig_paths-Clg7WX1w.cjs} +170 -198
  63. package/schematics/bundles/property_name-BBwFuqMe.cjs +1 -1
  64. package/schematics/bundles/route-lazy-loading.cjs +48 -4
  65. package/schematics/bundles/router-current-navigation.cjs +6 -6
  66. package/schematics/bundles/router-last-successful-navigation.cjs +6 -6
  67. package/schematics/bundles/self-closing-tags-migration.cjs +8 -8
  68. package/schematics/bundles/signal-input-migration.cjs +17 -9
  69. package/schematics/bundles/signal-queries-migration.cjs +7 -7
  70. package/schematics/bundles/signals.cjs +7 -7
  71. package/schematics/bundles/standalone-migration.cjs +7 -7
  72. package/schematics/bundles/{symbol-VPWguRxr.cjs → symbol-BObKoqes.cjs} +3 -2
  73. package/schematics/collection.json +6 -0
  74. package/schematics/migrations/ngclass-to-class-migration/schema.json +1 -1
  75. package/schematics/migrations/ngstyle-to-style-migration/schema.json +20 -0
  76. package/schematics/migrations.json +10 -0
  77. package/testing/index.d.ts +1 -1
  78. package/weak_ref.d.d.ts +1 -1
  79. package/schematics/bundles/parse_html-C8TYlOyu.cjs +0 -41
@@ -1,22 +1,22 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v21.0.0-next.2
3
+ * @license Angular v21.0.0-next.4
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-DawXRJzI.cjs');
9
+ var migrate_ts_type_references = require('./migrate_ts_type_references-DPuwhGod.cjs');
10
10
  var ts = require('typescript');
11
11
  require('os');
12
- var project_tsconfig_paths = require('./project_tsconfig_paths-DZ17BWwk.cjs');
13
- var index$1 = require('./index-B6-f9bil.cjs');
12
+ var project_tsconfig_paths = require('./project_tsconfig_paths-Clg7WX1w.cjs');
13
+ var index$1 = require('./index-BI97t1U8.cjs');
14
14
  require('path');
15
15
  require('node:path');
16
- var project_paths = require('./project_paths-D64fJzoa.cjs');
17
- var index = require('./index-DN8W1c8n.cjs');
16
+ var project_paths = require('./project_paths-Cz4x-QiT.cjs');
17
+ var index = require('./index-DaB-z4lP.cjs');
18
18
  var assert = require('assert');
19
- var apply_import_manager = require('./apply_import_manager-B3czqUhF.cjs');
19
+ var apply_import_manager = require('./apply_import_manager-DroqamMP.cjs');
20
20
  require('@angular-devkit/core');
21
21
  require('node:path/posix');
22
22
  require('./leading_space-D9nQ8UQC.cjs');
@@ -396,7 +396,15 @@ function extractSourceCodeInput(node, host, reflector, evaluator) {
396
396
  isRequired = !!evaluatedInputOpts.get('required');
397
397
  }
398
398
  if (evaluatedInputOpts.has('transform') && evaluatedInputOpts.get('transform') != null) {
399
- transformResult = parseTransformOfInput(evaluatedInputOpts, node, reflector);
399
+ const result = parseTransformOfInput(evaluatedInputOpts, node, reflector);
400
+ if (result === 'parsingError') {
401
+ if (!host.config.bestEffortMode) {
402
+ return null;
403
+ }
404
+ }
405
+ else {
406
+ transformResult = result;
407
+ }
400
408
  }
401
409
  }
402
410
  }
@@ -443,7 +451,7 @@ function parseTransformOfInput(evaluatedInputOpts, node, reflector) {
443
451
  // TODO: implement error handling.
444
452
  // See failing case: e.g. inherit_definition_feature_spec.ts
445
453
  console.error(`${e.node.getSourceFile().fileName}: ${e.toString()}`);
446
- return null;
454
+ return 'parsingError';
447
455
  }
448
456
  }
449
457
 
@@ -1,22 +1,22 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v21.0.0-next.2
3
+ * @license Angular v21.0.0-next.4
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-DZ17BWwk.cjs');
9
+ var project_tsconfig_paths = require('./project_tsconfig_paths-Clg7WX1w.cjs');
10
10
  var ts = require('typescript');
11
11
  require('os');
12
- var index$1 = require('./index-B6-f9bil.cjs');
12
+ var index$1 = require('./index-BI97t1U8.cjs');
13
13
  require('path');
14
14
  require('node:path');
15
- var project_paths = require('./project_paths-D64fJzoa.cjs');
16
- var apply_import_manager = require('./apply_import_manager-B3czqUhF.cjs');
17
- var migrate_ts_type_references = require('./migrate_ts_type_references-DawXRJzI.cjs');
15
+ var project_paths = require('./project_paths-Cz4x-QiT.cjs');
16
+ var apply_import_manager = require('./apply_import_manager-DroqamMP.cjs');
17
+ var migrate_ts_type_references = require('./migrate_ts_type_references-DPuwhGod.cjs');
18
18
  var assert = require('assert');
19
- var index = require('./index-DN8W1c8n.cjs');
19
+ var index = require('./index-DaB-z4lP.cjs');
20
20
  require('@angular-devkit/core');
21
21
  require('node:path/posix');
22
22
  require('fs');
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v21.0.0-next.2
3
+ * @license Angular v21.0.0-next.4
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-DZ17BWwk.cjs');
13
+ require('./project_tsconfig_paths-Clg7WX1w.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-B6-f9bil.cjs');
21
+ require('./index-BI97t1U8.cjs');
22
22
  require('node:path');
23
- require('./project_paths-D64fJzoa.cjs');
23
+ require('./project_paths-Cz4x-QiT.cjs');
24
24
  require('node:path/posix');
25
- require('./apply_import_manager-B3czqUhF.cjs');
26
- require('./migrate_ts_type_references-DawXRJzI.cjs');
25
+ require('./apply_import_manager-DroqamMP.cjs');
26
+ require('./migrate_ts_type_references-DPuwhGod.cjs');
27
27
  require('assert');
28
- require('./index-DN8W1c8n.cjs');
28
+ require('./index-DaB-z4lP.cjs');
29
29
  require('./leading_space-D9nQ8UQC.cjs');
30
30
 
31
31
  function migrate(options) {
@@ -1,22 +1,22 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v21.0.0-next.2
3
+ * @license Angular v21.0.0-next.4
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-B6-f9bil.cjs');
10
+ var index = require('./index-BI97t1U8.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-B9qvCnmC.cjs');
15
- var project_tsconfig_paths = require('./project_tsconfig_paths-DZ17BWwk.cjs');
16
- var ng_decorators = require('./ng_decorators-CtYwz9Lw.cjs');
14
+ var compiler_host = require('./compiler_host-aKaS4KRz.cjs');
15
+ var project_tsconfig_paths = require('./project_tsconfig_paths-Clg7WX1w.cjs');
16
+ var ng_decorators = require('./ng_decorators-BI0uV7KI.cjs');
17
17
  var nodes = require('./nodes-B16H9JUd.cjs');
18
- var symbol = require('./symbol-VPWguRxr.cjs');
19
- var imports = require('./imports-26VeX8i-.cjs');
18
+ var symbol = require('./symbol-BObKoqes.cjs');
19
+ var imports = require('./imports-DwPXlGFl.cjs');
20
20
  require('os');
21
21
  require('module');
22
22
  require('url');
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v21.0.0-next.2
3
+ * @license Angular v21.0.0-next.4
4
4
  * (c) 2010-2025 Google LLC. https://angular.io/
5
5
  * License: MIT
6
6
  */
@@ -13,7 +13,8 @@ function isReferenceToImport(typeChecker, node, importSpecifier) {
13
13
  // If this function is called on an identifier (should be most cases), we can quickly rule out
14
14
  // non-matches by comparing the identifier's string and the local name of the import specifier
15
15
  // which saves us some calls to the type checker.
16
- if (ts.isIdentifier(node) && node.text !== importSpecifier.name.text) {
16
+ if (importSpecifier === null ||
17
+ (ts.isIdentifier(node) && node.text !== importSpecifier.name.text)) {
17
18
  return false;
18
19
  }
19
20
  const nodeSymbol = typeChecker.getTypeAtLocation(node).getSymbol();
@@ -63,6 +63,12 @@
63
63
  "factory": "./bundles/ngclass-to-class-migration.cjs#migrate",
64
64
  "schema": "./migrations/ngclass-to-class-migration/schema.json",
65
65
  "aliases": ["ngclass-to-class"]
66
+ },
67
+ "ngstyle-to-style-migration": {
68
+ "description": "Updates usages of `ngStyle` directives to the `style` bindings where possible",
69
+ "factory": "./bundles/ngstyle-to-style-migration.cjs#migrate",
70
+ "schema": "./migrations/ngstyle-to-style-migration/schema.json",
71
+ "aliases": ["ngstyle-to-style"]
66
72
  }
67
73
  }
68
74
  }
@@ -14,7 +14,7 @@
14
14
  "type": "boolean",
15
15
  "description": "Enables the migration of object literals with space-separated keys",
16
16
  "x-prompt": "Should the migration also migrate space-separated keys?",
17
- "default": "false"
17
+ "default": false
18
18
  }
19
19
  }
20
20
  }
@@ -0,0 +1,20 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema",
3
+ "$id": "AngularNgStyleToStyleMigration",
4
+ "title": "Angular ngStyle to style Migration Schema",
5
+ "type": "object",
6
+ "properties": {
7
+ "path": {
8
+ "type": "string",
9
+ "description": "Path to the directory where all templates should be migrated.",
10
+ "x-prompt": "Which directory do you want to migrate?",
11
+ "default": "./"
12
+ },
13
+ "bestEffortMode": {
14
+ "type": "boolean",
15
+ "description": "Enables the migration of object references",
16
+ "x-prompt": "Should the migration also migrate object references?",
17
+ "default": false
18
+ }
19
+ }
20
+ }
@@ -21,6 +21,16 @@
21
21
  "version": "21.0.0",
22
22
  "description": "Moves imports of `ApplicationConfig` from `@angular/platform-browser` to `@angular/core`",
23
23
  "factory": "./bundles/application-config-core.cjs#migrate"
24
+ },
25
+ "add-bootstrap-context-to-server-main": {
26
+ "version": "21.0.0",
27
+ "description": "Adds `BootstrapContext` to `bootstrapApplication` calls in `main.server.ts` to support server rendering.",
28
+ "factory": "./bundles/add-bootstrap-context-to-server-main.cjs#migrate"
29
+ },
30
+ "bootstrap-options-migration": {
31
+ "version": "21.0.0",
32
+ "description": "Migrates deprecated bootstrap options to providers.",
33
+ "factory": "./bundles/bootstrap-options-migration.cjs#migrate"
24
34
  }
25
35
  }
26
36
  }
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v21.0.0-next.2
2
+ * @license Angular v21.0.0-next.4
3
3
  * (c) 2010-2025 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
package/weak_ref.d.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v21.0.0-next.2
2
+ * @license Angular v21.0.0-next.4
3
3
  * (c) 2010-2025 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -1,41 +0,0 @@
1
- 'use strict';
2
- /**
3
- * @license Angular v21.0.0-next.2
4
- * (c) 2010-2025 Google LLC. https://angular.io/
5
- * License: MIT
6
- */
7
- 'use strict';
8
-
9
- var project_tsconfig_paths = require('./project_tsconfig_paths-DZ17BWwk.cjs');
10
-
11
- /**
12
- * parses the template string into the Html AST
13
- */
14
- function parseTemplate(template) {
15
- let parsed;
16
- try {
17
- // Note: we use the HtmlParser here, instead of the `parseTemplate` function, because the
18
- // latter returns an Ivy AST, not an HTML AST. The HTML AST has the advantage of preserving
19
- // interpolated text as text nodes containing a mixture of interpolation tokens and text tokens,
20
- // rather than turning them into `BoundText` nodes like the Ivy AST does. This allows us to
21
- // easily get the text-only ranges without having to reconstruct the original text.
22
- parsed = new project_tsconfig_paths.HtmlParser().parse(template, '', {
23
- // Allows for ICUs to be parsed.
24
- tokenizeExpansionForms: true,
25
- // Explicitly disable blocks so that their characters are treated as plain text.
26
- tokenizeBlocks: true,
27
- preserveLineEndings: true,
28
- });
29
- // Don't migrate invalid templates.
30
- if (parsed.errors && parsed.errors.length > 0) {
31
- const errors = parsed.errors.map((e) => ({ type: 'parse', error: e }));
32
- return { tree: undefined, errors };
33
- }
34
- }
35
- catch (e) {
36
- return { tree: undefined, errors: [{ type: 'parse', error: e }] };
37
- }
38
- return { tree: parsed, errors: [] };
39
- }
40
-
41
- exports.parseTemplate = parseTemplate;